minor
[prop.git] / prop-src / ast.h
blob326c6b185b4d100645ba8ea72557a406f8df2466
1 ///////////////////////////////////////////////////////////////////////////////
2 // This file is generated automatically using Prop (version 2.3.6),
3 // last updated on Nov 2, 1999.
4 // The original source file is "ast.ph".
5 ///////////////////////////////////////////////////////////////////////////////
7 #line 1 "ast.ph"
8 ///////////////////////////////////////////////////////////////////////////////
9 //
10 // This file contains the abstract syntax tree definitions for the
11 // Prop language. For simplicity, C++ statements are currently not
12 // handled directly in the AST.
14 ///////////////////////////////////////////////////////////////////////////////
15 #ifndef abstract_syntax_tree_h
16 #define abstract_syntax_tree_h
18 #include "basics.h"
19 #include "ir.h"
21 ///////////////////////////////////////////////////////////////////////////////
23 // Options to the pattern matching compiler.
25 ///////////////////////////////////////////////////////////////////////////////
26 enum { MATCHnone = 0, // no option (select first matching rule)
27 MATCHall = 1<<0, // select all matching rules
28 MATCHwhile = 1<<1, // loop back
29 MATCHnocheck = 1<<2, // no checking
30 MATCHwithcost = 1<<3, // with cost minimization
31 MATCHwithintcost = 1<<4, // with integer costs
32 MATCHwithexpcost = 1<<5, // with expression costs
33 MATCHwithtreecost = 1<<6, // use cumulative cost
34 MATCHrefutable = 1<<7, // pattern is refutable
35 MATCHscanner = 1<<8, // lexical scanner
36 MATCHcaseinsensitive = 1<<9, // insensitive case during string matching
37 MATCHlexemepat = 1<<10, // with lexeme pattern
38 MATCHnotrace = 1<<11, // no tracing
39 MATCHunification = 1<<12 // unification mode
42 ///////////////////////////////////////////////////////////////////////////////
44 // Forward type declarations.
45 // These are defined in other places.
47 ///////////////////////////////////////////////////////////////////////////////
48 #line 41 "ast.ph"
49 #line 53 "ast.ph"
50 ///////////////////////////////////////////////////////////////////////////////
52 // Forward class definition for Ty
54 ///////////////////////////////////////////////////////////////////////////////
55 #ifndef datatype_Ty_defined
56 #define datatype_Ty_defined
57 class a_Ty;
58 typedef a_Ty * Ty;
59 #endif
61 ///////////////////////////////////////////////////////////////////////////////
63 // Forward class definition for Pat
65 ///////////////////////////////////////////////////////////////////////////////
66 #ifndef datatype_Pat_defined
67 #define datatype_Pat_defined
68 class a_Pat;
69 typedef a_Pat * Pat;
70 #endif
72 ///////////////////////////////////////////////////////////////////////////////
74 // Forward class definition for Cons
76 ///////////////////////////////////////////////////////////////////////////////
77 #ifndef datatype_Cons_defined
78 #define datatype_Cons_defined
79 class a_Cons;
80 typedef a_Cons * Cons;
81 #endif
83 ///////////////////////////////////////////////////////////////////////////////
85 // Forward class definition for Literal
87 ///////////////////////////////////////////////////////////////////////////////
88 #ifndef datatype_Literal_defined
89 #define datatype_Literal_defined
90 class a_Literal;
91 typedef a_Literal * Literal;
92 #endif
94 ///////////////////////////////////////////////////////////////////////////////
96 // Forward class definition for GramExp
98 ///////////////////////////////////////////////////////////////////////////////
99 #ifndef datatype_GramExp_defined
100 #define datatype_GramExp_defined
101 class a_GramExp;
102 typedef a_GramExp * GramExp;
103 #endif
105 ///////////////////////////////////////////////////////////////////////////////
107 // Forward class definition for FieldDef
109 ///////////////////////////////////////////////////////////////////////////////
110 #ifndef datatype_FieldDef_defined
111 #define datatype_FieldDef_defined
112 class a_FieldDef;
113 typedef a_FieldDef * FieldDef;
114 #endif
116 ///////////////////////////////////////////////////////////////////////////////
118 // Forward class definition for FieldLaw
120 ///////////////////////////////////////////////////////////////////////////////
121 #ifndef datatype_FieldLaw_defined
122 #define datatype_FieldLaw_defined
123 class a_FieldLaw;
124 typedef a_FieldLaw * FieldLaw;
125 #endif
127 ///////////////////////////////////////////////////////////////////////////////
129 // Forward class definition for Stmt
131 ///////////////////////////////////////////////////////////////////////////////
132 #ifndef datatype_Stmt_defined
133 #define datatype_Stmt_defined
134 class a_Stmt;
135 typedef a_Stmt * Stmt;
136 #endif
138 ///////////////////////////////////////////////////////////////////////////////
140 // Forward class definition for Def
142 ///////////////////////////////////////////////////////////////////////////////
143 #ifndef datatype_Def_defined
144 #define datatype_Def_defined
145 class a_Def;
146 typedef a_Def * Def;
147 #endif
149 ///////////////////////////////////////////////////////////////////////////////
151 // Forward class definition for Cost
153 ///////////////////////////////////////////////////////////////////////////////
154 #ifndef datatype_Cost_defined
155 #define datatype_Cost_defined
156 class a_Cost;
157 typedef a_Cost * Cost;
158 #endif
160 ///////////////////////////////////////////////////////////////////////////////
162 // Forward class definition for ConstraintSet
164 ///////////////////////////////////////////////////////////////////////////////
165 #ifndef datatype_ConstraintSet_defined
166 #define datatype_ConstraintSet_defined
167 class a_ConstraintSet;
168 typedef a_ConstraintSet * ConstraintSet;
169 #endif
171 ///////////////////////////////////////////////////////////////////////////////
173 // Forward class definition for GraphRewritingRule
175 ///////////////////////////////////////////////////////////////////////////////
176 #ifndef datatype_GraphRewritingRule_defined
177 #define datatype_GraphRewritingRule_defined
178 class a_GraphRewritingRule;
179 typedef a_GraphRewritingRule * GraphRewritingRule;
180 #endif
182 #line 53 "ast.ph"
183 #line 53 "ast.ph"
186 class ClassDefinition;
187 class RewriteIndexing;
189 ///////////////////////////////////////////////////////////////////////////////
191 // Information on a match rule.
193 ///////////////////////////////////////////////////////////////////////////////
194 class MatchRuleInfo : public Loc
195 { MatchRuleInfo (const MatchRuleInfo&); // no copy constructor
196 void operator = (const MatchRuleInfo&); // no assignment
197 public:
198 Bool used; // is the rule being used?
199 Ty ty; // type of pattern
200 int rule_number; // rule number
201 Bool negated; // negation in inference?
202 Bool rewriting; // A rewriting pattern?
203 Bool is_chain_rule; // Chain rule?
204 enum RewritingMode
205 { BEFORE, PREORDER, POSTORDER, TOPDOWN, BOTTOMUP, LAST_REWRITING_MODE
206 } mode; // rewriting mode
207 enum
208 { NO_OPTIONS = 0, CUTREWRITE = 1, REPLACEMENT = 2, FAILREWRITE = 4 };
209 typedef int RewritingOption;
210 RewritingOption option;
212 MatchRuleInfo();
215 ///////////////////////////////////////////////////////////////////////////////
217 // Expressions.
219 ///////////////////////////////////////////////////////////////////////////////
220 #line 89 "ast.ph"
221 #line 399 "ast.ph"
222 ///////////////////////////////////////////////////////////////////////////////
224 // Forward class definition for Exp
226 ///////////////////////////////////////////////////////////////////////////////
227 #ifndef datatype_Exp_defined
228 #define datatype_Exp_defined
229 class a_Exp;
230 typedef a_Exp * Exp;
231 #endif
233 # define NOexp (Exp)0
235 enum SETLOp {
236 ARBop = 0, DOMop = 1, RANop = 2,
237 CARDop = 3, WITHop = 4, WITHASSIGNop = 5,
238 LESSop = 6, LESSASSIGNop = 7
243 ///////////////////////////////////////////////////////////////////////////////
245 // Forward class definition for Generator
247 ///////////////////////////////////////////////////////////////////////////////
248 #ifndef datatype_Generator_defined
249 #define datatype_Generator_defined
250 class a_Generator;
251 typedef a_Generator * Generator;
252 #endif
254 ///////////////////////////////////////////////////////////////////////////////
256 // Forward class definition for MatchExp
258 ///////////////////////////////////////////////////////////////////////////////
259 #ifndef datatype_MatchExp_defined
260 #define datatype_MatchExp_defined
261 class a_MatchExp;
262 typedef a_MatchExp * MatchExp;
263 #endif
265 ///////////////////////////////////////////////////////////////////////////////
267 // Forward class definition for MatchRule
269 ///////////////////////////////////////////////////////////////////////////////
270 #ifndef datatype_MatchRule_defined
271 #define datatype_MatchRule_defined
272 class a_MatchRule;
273 typedef a_MatchRule * MatchRule;
274 #endif
276 ///////////////////////////////////////////////////////////////////////////////
278 // Forward class definition for Decl
280 ///////////////////////////////////////////////////////////////////////////////
281 #ifndef datatype_Decl_defined
282 #define datatype_Decl_defined
283 class a_Decl;
284 typedef a_Decl * Decl;
285 #endif
287 # define NOdecl (Decl)0
289 enum EntryDirection {
290 LEFTdirection = 0, RIGHTdirection = 1
295 ///////////////////////////////////////////////////////////////////////////////
297 // Forward class definition for Protocol
299 ///////////////////////////////////////////////////////////////////////////////
300 #ifndef datatype_Protocol_defined
301 #define datatype_Protocol_defined
302 class a_Protocol;
303 typedef a_Protocol * Protocol;
304 #endif
306 ///////////////////////////////////////////////////////////////////////////////
308 // Forward class definition for DatatypeDef
310 ///////////////////////////////////////////////////////////////////////////////
311 #ifndef datatype_DatatypeDef_defined
312 #define datatype_DatatypeDef_defined
313 class a_DatatypeDef;
314 typedef a_DatatypeDef * DatatypeDef;
315 #endif
317 ///////////////////////////////////////////////////////////////////////////////
319 // Forward class definition for TermDef
321 ///////////////////////////////////////////////////////////////////////////////
322 #ifndef datatype_TermDef_defined
323 #define datatype_TermDef_defined
324 class a_TermDef;
325 typedef a_TermDef * TermDef;
326 #endif
328 ///////////////////////////////////////////////////////////////////////////////
330 // Forward class definition for ViewDef
332 ///////////////////////////////////////////////////////////////////////////////
333 #ifndef datatype_ViewDef_defined
334 #define datatype_ViewDef_defined
335 class a_ViewDef;
336 typedef a_ViewDef * ViewDef;
337 #endif
339 ///////////////////////////////////////////////////////////////////////////////
341 // Forward class definition for LawDef
343 ///////////////////////////////////////////////////////////////////////////////
344 #ifndef datatype_LawDef_defined
345 #define datatype_LawDef_defined
346 class a_LawDef;
347 typedef a_LawDef * LawDef;
348 #endif
350 ///////////////////////////////////////////////////////////////////////////////
352 // Forward class definition for TyDef
354 ///////////////////////////////////////////////////////////////////////////////
355 #ifndef datatype_TyDef_defined
356 #define datatype_TyDef_defined
357 class a_TyDef;
358 typedef a_TyDef * TyDef;
359 #endif
361 ///////////////////////////////////////////////////////////////////////////////
363 // Forward class definition for FunDef
365 ///////////////////////////////////////////////////////////////////////////////
366 #ifndef datatype_FunDef_defined
367 #define datatype_FunDef_defined
368 class a_FunDef;
369 typedef a_FunDef * FunDef;
370 #endif
372 ///////////////////////////////////////////////////////////////////////////////
374 // Forward class definition for QualId
376 ///////////////////////////////////////////////////////////////////////////////
377 #ifndef datatype_QualId_defined
378 #define datatype_QualId_defined
379 class a_QualId;
380 typedef a_QualId * QualId;
381 #endif
383 ///////////////////////////////////////////////////////////////////////////////
385 // Forward class definition for InferenceRule
387 ///////////////////////////////////////////////////////////////////////////////
388 #ifndef datatype_InferenceRule_defined
389 #define datatype_InferenceRule_defined
390 class a_InferenceRule;
391 typedef a_InferenceRule * InferenceRule;
392 #endif
394 ///////////////////////////////////////////////////////////////////////////////
396 // Forward class definition for Conclusion
398 ///////////////////////////////////////////////////////////////////////////////
399 #ifndef datatype_Conclusion_defined
400 #define datatype_Conclusion_defined
401 class a_Conclusion;
402 typedef a_Conclusion * Conclusion;
403 #endif
405 ///////////////////////////////////////////////////////////////////////////////
406 // Definition of type MatchExps
407 ///////////////////////////////////////////////////////////////////////////////
408 #line 375 "ast.ph"
409 typedef a_List<MatchExp> * MatchExps;
411 ///////////////////////////////////////////////////////////////////////////////
412 // Definition of type MatchRules
413 ///////////////////////////////////////////////////////////////////////////////
414 #line 376 "ast.ph"
415 typedef a_List<MatchRule> * MatchRules;
417 ///////////////////////////////////////////////////////////////////////////////
418 // Definition of type Decls
419 ///////////////////////////////////////////////////////////////////////////////
420 #line 377 "ast.ph"
421 typedef a_List<Decl> * Decls;
423 ///////////////////////////////////////////////////////////////////////////////
424 // Definition of type DatatypeDefs
425 ///////////////////////////////////////////////////////////////////////////////
426 #line 378 "ast.ph"
427 typedef a_List<DatatypeDef> * DatatypeDefs;
429 ///////////////////////////////////////////////////////////////////////////////
430 // Definition of type ViewDefs
431 ///////////////////////////////////////////////////////////////////////////////
432 #line 379 "ast.ph"
433 typedef a_List<ViewDef> * ViewDefs;
435 ///////////////////////////////////////////////////////////////////////////////
436 // Definition of type LawDefs
437 ///////////////////////////////////////////////////////////////////////////////
438 #line 380 "ast.ph"
439 typedef a_List<LawDef> * LawDefs;
441 ///////////////////////////////////////////////////////////////////////////////
442 // Definition of type TyDefs
443 ///////////////////////////////////////////////////////////////////////////////
444 #line 381 "ast.ph"
445 typedef a_List<TyDef> * TyDefs;
447 ///////////////////////////////////////////////////////////////////////////////
448 // Definition of type TermDefs
449 ///////////////////////////////////////////////////////////////////////////////
450 #line 382 "ast.ph"
451 typedef a_List<TermDef> * TermDefs;
453 ///////////////////////////////////////////////////////////////////////////////
454 // Definition of type FunDefs
455 ///////////////////////////////////////////////////////////////////////////////
456 #line 383 "ast.ph"
457 typedef a_List<FunDef> * FunDefs;
459 ///////////////////////////////////////////////////////////////////////////////
460 // Definition of type Protocols
461 ///////////////////////////////////////////////////////////////////////////////
462 #line 384 "ast.ph"
463 typedef a_List<Protocol> * Protocols;
465 ///////////////////////////////////////////////////////////////////////////////
466 // Definition of type LabExp
467 ///////////////////////////////////////////////////////////////////////////////
468 #line 385 "ast.ph"
469 typedef struct { Id label; Exp exp; } LabExp;
471 ///////////////////////////////////////////////////////////////////////////////
472 // Definition of type LabMatchRule
473 ///////////////////////////////////////////////////////////////////////////////
474 #line 386 "ast.ph"
475 typedef struct { QualId id; MatchRule rule; Ty return_ty; } LabMatchRule;
477 ///////////////////////////////////////////////////////////////////////////////
478 // Definition of type LabMatchRules
479 ///////////////////////////////////////////////////////////////////////////////
480 #line 387 "ast.ph"
481 typedef struct { QualId id; MatchRules rules; Ty return_ty; } LabMatchRules;
483 ///////////////////////////////////////////////////////////////////////////////
484 // Definition of type Exps
485 ///////////////////////////////////////////////////////////////////////////////
486 #line 388 "ast.ph"
487 typedef a_List<Exp> * Exps;
489 ///////////////////////////////////////////////////////////////////////////////
490 // Definition of type LabExps
491 ///////////////////////////////////////////////////////////////////////////////
492 #line 389 "ast.ph"
493 typedef a_List<LabExp> * LabExps;
495 ///////////////////////////////////////////////////////////////////////////////
496 // Definition of type InferenceRules
497 ///////////////////////////////////////////////////////////////////////////////
498 #line 390 "ast.ph"
499 typedef a_List<InferenceRule> * InferenceRules;
501 ///////////////////////////////////////////////////////////////////////////////
502 // Definition of type Conclusions
503 ///////////////////////////////////////////////////////////////////////////////
504 #line 391 "ast.ph"
505 typedef a_List<Conclusion> * Conclusions;
507 ///////////////////////////////////////////////////////////////////////////////
508 // Definition of type GraphRewritingRules
509 ///////////////////////////////////////////////////////////////////////////////
510 #line 392 "ast.ph"
511 typedef a_List<GraphRewritingRule> * GraphRewritingRules;
513 ///////////////////////////////////////////////////////////////////////////////
514 // Definition of type FieldDefs
515 ///////////////////////////////////////////////////////////////////////////////
516 #line 393 "ast.ph"
517 typedef a_List<FieldDef> * FieldDefs;
519 ///////////////////////////////////////////////////////////////////////////////
520 // Definition of type FieldLaws
521 ///////////////////////////////////////////////////////////////////////////////
522 #line 394 "ast.ph"
523 typedef a_List<FieldLaw> * FieldLaws;
525 ///////////////////////////////////////////////////////////////////////////////
526 // Definition of type ChildNo
527 ///////////////////////////////////////////////////////////////////////////////
528 #line 395 "ast.ph"
529 typedef int ChildNo;
531 ///////////////////////////////////////////////////////////////////////////////
532 // Definition of type RuleNo
533 ///////////////////////////////////////////////////////////////////////////////
534 #line 396 "ast.ph"
535 typedef int RuleNo;
537 ///////////////////////////////////////////////////////////////////////////////
538 // Definition of type MatchOptions
539 ///////////////////////////////////////////////////////////////////////////////
540 #line 397 "ast.ph"
541 typedef int MatchOptions;
543 ///////////////////////////////////////////////////////////////////////////////
544 // Definition of type RewriteIndexings
545 ///////////////////////////////////////////////////////////////////////////////
546 #line 398 "ast.ph"
547 typedef a_List<RewriteIndexing *> * RewriteIndexings;
549 ///////////////////////////////////////////////////////////////////////////////
551 // Base class for datatype Exp
553 ///////////////////////////////////////////////////////////////////////////////
554 class a_Exp : public MEM {
555 public:
556 enum Tag_Exp {
557 tag_LITERALexp = 0, tag_IDexp = 1, tag_RELexp = 2,
558 tag_DOTexp = 3, tag_SELECTORexp = 4, tag_DEREFexp = 5,
559 tag_ARROWexp = 6, tag_INDEXexp = 7, tag_BINOPexp = 8,
560 tag_PREFIXexp = 9, tag_POSTFIXexp = 10, tag_APPexp = 11,
561 tag_ASSIGNexp = 12, tag_IFexp = 13, tag_TUPLEexp = 14,
562 tag_EXTUPLEexp = 15, tag_RECORDexp = 16, tag_LISTexp = 17,
563 tag_VECTORexp = 18, tag_CONSexp = 19, tag_CASTexp = 20,
564 tag_QUALexp = 21, tag_EQexp = 22, tag_UNIFYexp = 23,
565 tag_LTexp = 24, tag_HASHexp = 25, tag_THISCOSTexp = 26,
566 tag_COSTexp = 27, tag_THISSYNexp = 28, tag_SYNexp = 29,
567 tag_SENDexp = 30, tag_SETLexp = 31, tag_LISTCOMPexp = 32,
568 tag_FORALLexp = 33, tag_EXISTSexp = 34, tag_MARKEDexp = 35
571 public:
572 const Tag_Exp tag__; // variant tag
573 protected:
574 inline a_Exp(Tag_Exp t__) : tag__(t__) {}
575 public:
576 #line 155 "ast.ph"
578 Ty ty;
580 #line 157 "ast.ph"
582 inline int boxed(const a_Exp * x) { return x != 0; }
583 inline int untag(const a_Exp * x) { return x ? (x->tag__+1) : 0; }
584 ///////////////////////////////////////////////////////////////////////////////
586 // Class for datatype constructor Exp::LITERALexp
588 ///////////////////////////////////////////////////////////////////////////////
589 class Exp_LITERALexp : public a_Exp {
590 public:
591 #line 96 "ast.ph"
592 Literal LITERALexp;
593 Exp_LITERALexp (Literal x_LITERALexp);
596 ///////////////////////////////////////////////////////////////////////////////
598 // Class for datatype constructor Exp::IDexp
600 ///////////////////////////////////////////////////////////////////////////////
601 class Exp_IDexp : public a_Exp {
602 public:
603 #line 97 "ast.ph"
604 Id IDexp;
605 Exp_IDexp (Id x_IDexp);
608 ///////////////////////////////////////////////////////////////////////////////
610 // Class for datatype constructor Exp::RELexp
612 ///////////////////////////////////////////////////////////////////////////////
613 class Exp_RELexp : public a_Exp {
614 public:
615 #line 98 "ast.ph"
616 int RELexp;
617 Exp_RELexp (int x_RELexp);
620 ///////////////////////////////////////////////////////////////////////////////
622 // Class for datatype constructor Exp::DOTexp
624 ///////////////////////////////////////////////////////////////////////////////
625 class Exp_DOTexp : public a_Exp {
626 public:
627 #line 99 "ast.ph"
628 Exp _1; Id _2;
629 Exp_DOTexp (Exp x_1, Id x_2);
632 ///////////////////////////////////////////////////////////////////////////////
634 // Class for datatype constructor Exp::SELECTORexp
636 ///////////////////////////////////////////////////////////////////////////////
637 class Exp_SELECTORexp : public a_Exp {
638 public:
639 #line 100 "ast.ph"
640 Exp _1; Cons _2; Ty _3;
641 Exp_SELECTORexp (Exp x_1, Cons x_2, Ty x_3);
644 ///////////////////////////////////////////////////////////////////////////////
646 // Class for datatype constructor Exp::DEREFexp
648 ///////////////////////////////////////////////////////////////////////////////
649 class Exp_DEREFexp : public a_Exp {
650 public:
651 #line 101 "ast.ph"
652 Exp DEREFexp;
653 Exp_DEREFexp (Exp x_DEREFexp);
656 ///////////////////////////////////////////////////////////////////////////////
658 // Class for datatype constructor Exp::ARROWexp
660 ///////////////////////////////////////////////////////////////////////////////
661 class Exp_ARROWexp : public a_Exp {
662 public:
663 #line 102 "ast.ph"
664 Exp _1; Id _2;
665 Exp_ARROWexp (Exp x_1, Id x_2);
668 ///////////////////////////////////////////////////////////////////////////////
670 // Class for datatype constructor Exp::INDEXexp
672 ///////////////////////////////////////////////////////////////////////////////
673 class Exp_INDEXexp : public a_Exp {
674 public:
675 #line 103 "ast.ph"
676 Exp _1; Exp _2;
677 Exp_INDEXexp (Exp x_1, Exp x_2);
680 ///////////////////////////////////////////////////////////////////////////////
682 // Class for datatype constructor Exp::BINOPexp
684 ///////////////////////////////////////////////////////////////////////////////
685 class Exp_BINOPexp : public a_Exp {
686 public:
687 #line 104 "ast.ph"
688 Id _1; Exp _2; Exp _3;
689 Exp_BINOPexp (Id x_1, Exp x_2, Exp x_3);
692 ///////////////////////////////////////////////////////////////////////////////
694 // Class for datatype constructor Exp::PREFIXexp
696 ///////////////////////////////////////////////////////////////////////////////
697 class Exp_PREFIXexp : public a_Exp {
698 public:
699 #line 105 "ast.ph"
700 Id _1; Exp _2;
701 Exp_PREFIXexp (Id x_1, Exp x_2);
704 ///////////////////////////////////////////////////////////////////////////////
706 // Class for datatype constructor Exp::POSTFIXexp
708 ///////////////////////////////////////////////////////////////////////////////
709 class Exp_POSTFIXexp : public a_Exp {
710 public:
711 #line 106 "ast.ph"
712 Id _1; Exp _2;
713 Exp_POSTFIXexp (Id x_1, Exp x_2);
716 ///////////////////////////////////////////////////////////////////////////////
718 // Class for datatype constructor Exp::APPexp
720 ///////////////////////////////////////////////////////////////////////////////
721 class Exp_APPexp : public a_Exp {
722 public:
723 #line 107 "ast.ph"
724 Exp _1; Exp _2;
725 Exp_APPexp (Exp x_1, Exp x_2);
728 ///////////////////////////////////////////////////////////////////////////////
730 // Class for datatype constructor Exp::ASSIGNexp
732 ///////////////////////////////////////////////////////////////////////////////
733 class Exp_ASSIGNexp : public a_Exp {
734 public:
735 #line 108 "ast.ph"
736 Exp _1; Exp _2;
737 Exp_ASSIGNexp (Exp x_1, Exp x_2);
740 ///////////////////////////////////////////////////////////////////////////////
742 // Class for datatype constructor Exp::IFexp
744 ///////////////////////////////////////////////////////////////////////////////
745 class Exp_IFexp : public a_Exp {
746 public:
747 #line 109 "ast.ph"
748 Exp _1; Exp _2; Exp _3;
749 Exp_IFexp (Exp x_1, Exp x_2, Exp x_3);
752 ///////////////////////////////////////////////////////////////////////////////
754 // Class for datatype constructor Exp::TUPLEexp
756 ///////////////////////////////////////////////////////////////////////////////
757 class Exp_TUPLEexp : public a_Exp {
758 public:
759 #line 110 "ast.ph"
760 a_List<Exp> * TUPLEexp;
761 Exp_TUPLEexp (a_List<Exp> * x_TUPLEexp);
764 ///////////////////////////////////////////////////////////////////////////////
766 // Class for datatype constructor Exp::EXTUPLEexp
768 ///////////////////////////////////////////////////////////////////////////////
769 class Exp_EXTUPLEexp : public a_Exp {
770 public:
771 #line 111 "ast.ph"
772 a_List<Exp> * EXTUPLEexp;
773 Exp_EXTUPLEexp (a_List<Exp> * x_EXTUPLEexp);
776 ///////////////////////////////////////////////////////////////////////////////
778 // Class for datatype constructor Exp::RECORDexp
780 ///////////////////////////////////////////////////////////////////////////////
781 class Exp_RECORDexp : public a_Exp {
782 public:
783 #line 112 "ast.ph"
784 a_List<LabExp> * RECORDexp;
785 Exp_RECORDexp (a_List<LabExp> * x_RECORDexp);
788 ///////////////////////////////////////////////////////////////////////////////
790 // Class for datatype constructor Exp::LISTexp
792 ///////////////////////////////////////////////////////////////////////////////
793 class Exp_LISTexp : public a_Exp {
794 public:
795 #line 113 "ast.ph"
796 Cons _1; Cons _2; a_List<Exp> * _3; Exp _4;
797 Exp_LISTexp (Cons x_1, Cons x_2, a_List<Exp> * x_3, Exp x_4);
800 ///////////////////////////////////////////////////////////////////////////////
802 // Class for datatype constructor Exp::VECTORexp
804 ///////////////////////////////////////////////////////////////////////////////
805 class Exp_VECTORexp : public a_Exp {
806 public:
807 #line 114 "ast.ph"
808 Cons _1; a_List<Exp> * _2;
809 Exp_VECTORexp (Cons x_1, a_List<Exp> * x_2);
812 ///////////////////////////////////////////////////////////////////////////////
814 // Class for datatype constructor Exp::CONSexp
816 ///////////////////////////////////////////////////////////////////////////////
817 class Exp_CONSexp : public a_Exp {
818 public:
819 #line 115 "ast.ph"
820 Cons _1; a_List<Exp> * _2; Exp _3;
821 Exp_CONSexp (Cons x_1, a_List<Exp> * x_2, Exp x_3);
824 ///////////////////////////////////////////////////////////////////////////////
826 // Class for datatype constructor Exp::CASTexp
828 ///////////////////////////////////////////////////////////////////////////////
829 class Exp_CASTexp : public a_Exp {
830 public:
831 #line 116 "ast.ph"
832 Ty _1; Exp _2;
833 Exp_CASTexp (Ty x_1, Exp x_2);
836 ///////////////////////////////////////////////////////////////////////////////
838 // Class for datatype constructor Exp::QUALexp
840 ///////////////////////////////////////////////////////////////////////////////
841 class Exp_QUALexp : public a_Exp {
842 public:
843 #line 117 "ast.ph"
844 Ty _1; Id _2;
845 Exp_QUALexp (Ty x_1, Id x_2);
848 ///////////////////////////////////////////////////////////////////////////////
850 // Class for datatype constructor Exp::EQexp
852 ///////////////////////////////////////////////////////////////////////////////
853 class Exp_EQexp : public a_Exp {
854 public:
855 #line 125 "ast.ph"
856 Ty _1; Exp _2; Exp _3;
857 Exp_EQexp (Ty x_1, Exp x_2, Exp x_3);
860 ///////////////////////////////////////////////////////////////////////////////
862 // Class for datatype constructor Exp::UNIFYexp
864 ///////////////////////////////////////////////////////////////////////////////
865 class Exp_UNIFYexp : public a_Exp {
866 public:
867 #line 126 "ast.ph"
868 Ty _1; Exp _2; Exp _3;
869 Exp_UNIFYexp (Ty x_1, Exp x_2, Exp x_3);
872 ///////////////////////////////////////////////////////////////////////////////
874 // Class for datatype constructor Exp::LTexp
876 ///////////////////////////////////////////////////////////////////////////////
877 class Exp_LTexp : public a_Exp {
878 public:
879 #line 127 "ast.ph"
880 Ty _1; Exp _2; Exp _3;
881 Exp_LTexp (Ty x_1, Exp x_2, Exp x_3);
884 ///////////////////////////////////////////////////////////////////////////////
886 // Class for datatype constructor Exp::HASHexp
888 ///////////////////////////////////////////////////////////////////////////////
889 class Exp_HASHexp : public a_Exp {
890 public:
891 #line 128 "ast.ph"
892 Ty _1; Exp _2;
893 Exp_HASHexp (Ty x_1, Exp x_2);
896 ///////////////////////////////////////////////////////////////////////////////
898 // Class for datatype constructor Exp::THISCOSTexp
900 ///////////////////////////////////////////////////////////////////////////////
901 class Exp_THISCOSTexp : public a_Exp {
902 public:
903 #line 129 "ast.ph"
905 Exp_THISCOSTexp ();
908 ///////////////////////////////////////////////////////////////////////////////
910 // Class for datatype constructor Exp::COSTexp
912 ///////////////////////////////////////////////////////////////////////////////
913 class Exp_COSTexp : public a_Exp {
914 public:
915 #line 130 "ast.ph"
916 ChildNo COSTexp;
917 Exp_COSTexp (ChildNo x_COSTexp);
920 ///////////////////////////////////////////////////////////////////////////////
922 // Class for datatype constructor Exp::THISSYNexp
924 ///////////////////////////////////////////////////////////////////////////////
925 class Exp_THISSYNexp : public a_Exp {
926 public:
927 #line 131 "ast.ph"
928 RuleNo _1; Ty _2; Bool _3;
929 Exp_THISSYNexp (RuleNo x_1, Ty x_2, Bool x_3);
932 ///////////////////////////////////////////////////////////////////////////////
934 // Class for datatype constructor Exp::SYNexp
936 ///////////////////////////////////////////////////////////////////////////////
937 class Exp_SYNexp : public a_Exp {
938 public:
939 #line 132 "ast.ph"
940 ChildNo _1; RuleNo _2; Ty _3; Bool _4;
941 Exp_SYNexp (ChildNo x_1, RuleNo x_2, Ty x_3, Bool x_4);
944 ///////////////////////////////////////////////////////////////////////////////
946 // Class for datatype constructor Exp::SENDexp
948 ///////////////////////////////////////////////////////////////////////////////
949 class Exp_SENDexp : public a_Exp {
950 public:
951 #line 133 "ast.ph"
952 Id _1; a_List<Exp> * _2;
953 Exp_SENDexp (Id x_1, a_List<Exp> * x_2);
956 ///////////////////////////////////////////////////////////////////////////////
958 // Class for datatype constructor Exp::SETLexp
960 ///////////////////////////////////////////////////////////////////////////////
961 class Exp_SETLexp : public a_Exp {
962 public:
963 #line 140 "ast.ph"
964 SETLOp _1; Exps _2;
965 Exp_SETLexp (SETLOp x_1, Exps x_2);
968 ///////////////////////////////////////////////////////////////////////////////
970 // Class for datatype constructor Exp::LISTCOMPexp
972 ///////////////////////////////////////////////////////////////////////////////
973 class Exp_LISTCOMPexp : public a_Exp {
974 public:
975 #line 141 "ast.ph"
976 Exp exp; a_List<Generator> * generators; Exp guard;
977 Exp_LISTCOMPexp (Exp x_exp, a_List<Generator> * x_generators, Exp x_guard);
980 ///////////////////////////////////////////////////////////////////////////////
982 // Class for datatype constructor Exp::FORALLexp
984 ///////////////////////////////////////////////////////////////////////////////
985 class Exp_FORALLexp : public a_Exp {
986 public:
987 #line 145 "ast.ph"
988 Id _1; Exp _2;
989 Exp_FORALLexp (Id x_1, Exp x_2);
992 ///////////////////////////////////////////////////////////////////////////////
994 // Class for datatype constructor Exp::EXISTSexp
996 ///////////////////////////////////////////////////////////////////////////////
997 class Exp_EXISTSexp : public a_Exp {
998 public:
999 #line 146 "ast.ph"
1000 Id _1; Exp _2;
1001 Exp_EXISTSexp (Id x_1, Exp x_2);
1004 ///////////////////////////////////////////////////////////////////////////////
1006 // Class for datatype constructor Exp::MARKEDexp
1008 ///////////////////////////////////////////////////////////////////////////////
1009 class Exp_MARKEDexp : public a_Exp {
1010 public:
1011 #line 153 "ast.ph"
1012 Loc _1; Exp _2;
1013 Exp_MARKEDexp (Loc x_1, Exp x_2);
1016 ///////////////////////////////////////////////////////////////////////////////
1018 // Datatype constructor functions for Exp
1020 ///////////////////////////////////////////////////////////////////////////////
1021 extern a_Exp * LITERALexp (Literal x_LITERALexp);
1022 extern a_Exp * IDexp (Id x_IDexp);
1023 extern a_Exp * RELexp (int x_RELexp);
1024 extern a_Exp * DOTexp (Exp x_1, Id x_2);
1025 extern a_Exp * SELECTORexp (Exp x_1, Cons x_2, Ty x_3);
1026 extern a_Exp * DEREFexp (Exp x_DEREFexp);
1027 extern a_Exp * ARROWexp (Exp x_1, Id x_2);
1028 extern a_Exp * INDEXexp (Exp x_1, Exp x_2);
1029 extern a_Exp * BINOPexp (Id x_1, Exp x_2, Exp x_3);
1030 extern a_Exp * PREFIXexp (Id x_1, Exp x_2);
1031 extern a_Exp * POSTFIXexp (Id x_1, Exp x_2);
1032 extern a_Exp * APPexp (Exp x_1, Exp x_2);
1033 extern a_Exp * ASSIGNexp (Exp x_1, Exp x_2);
1034 extern a_Exp * IFexp (Exp x_1, Exp x_2, Exp x_3);
1035 extern a_Exp * TUPLEexp (a_List<Exp> * x_TUPLEexp);
1036 extern a_Exp * EXTUPLEexp (a_List<Exp> * x_EXTUPLEexp);
1037 extern a_Exp * RECORDexp (a_List<LabExp> * x_RECORDexp);
1038 extern a_Exp * LISTexp (Cons x_1, Cons x_2, a_List<Exp> * x_3, Exp x_4);
1039 extern a_Exp * VECTORexp (Cons x_1, a_List<Exp> * x_2);
1040 extern a_Exp * CONSexp (Cons x_1, a_List<Exp> * x_2, Exp x_3);
1041 extern a_Exp * CASTexp (Ty x_1, Exp x_2);
1042 extern a_Exp * QUALexp (Ty x_1, Id x_2);
1043 extern a_Exp * EQexp (Ty x_1, Exp x_2, Exp x_3);
1044 extern a_Exp * UNIFYexp (Ty x_1, Exp x_2, Exp x_3);
1045 extern a_Exp * LTexp (Ty x_1, Exp x_2, Exp x_3);
1046 extern a_Exp * HASHexp (Ty x_1, Exp x_2);
1047 extern a_Exp * THISCOSTexp ();
1048 extern a_Exp * COSTexp (ChildNo x_COSTexp);
1049 extern a_Exp * THISSYNexp (RuleNo x_1, Ty x_2, Bool x_3);
1050 extern a_Exp * SYNexp (ChildNo x_1, RuleNo x_2, Ty x_3, Bool x_4);
1051 extern a_Exp * SENDexp (Id x_1, a_List<Exp> * x_2);
1052 extern a_Exp * SETLexp (SETLOp x_1, Exps x_2);
1053 extern a_Exp * LISTCOMPexp (Exp x_exp, a_List<Generator> * x_generators, Exp x_guard);
1054 extern a_Exp * FORALLexp (Id x_1, Exp x_2);
1055 extern a_Exp * EXISTSexp (Id x_1, Exp x_2);
1056 extern a_Exp * MARKEDexp (Loc x_1, Exp x_2);
1059 ///////////////////////////////////////////////////////////////////////////////
1061 // Class for datatype constructor Generator::GENERATOR
1063 ///////////////////////////////////////////////////////////////////////////////
1064 class a_Generator : public Loc {
1065 public:
1066 #line 179 "ast.ph"
1067 Pat pat; Exp guard; Exp exp;
1068 a_Generator (Pat x_pat, Exp x_guard, Exp x_exp);
1070 inline int boxed(const a_Generator *) { return 1; }
1071 inline int untag(const a_Generator *) { return 0; }
1072 ///////////////////////////////////////////////////////////////////////////////
1074 // Datatype constructor functions for Generator
1076 ///////////////////////////////////////////////////////////////////////////////
1077 extern a_Generator * GENERATOR (Pat x_pat, Exp x_guard, Exp x_exp);
1079 ///////////////////////////////////////////////////////////////////////////////
1081 // Class for datatype constructor MatchExp::MATCHexp
1083 ///////////////////////////////////////////////////////////////////////////////
1084 class a_MatchExp : public Loc {
1085 public:
1086 #line 190 "ast.ph"
1087 Exp _1; Id _2;
1088 a_MatchExp (Exp x_1, Id x_2);
1090 inline int boxed(const a_MatchExp *) { return 1; }
1091 inline int untag(const a_MatchExp *) { return 0; }
1092 ///////////////////////////////////////////////////////////////////////////////
1094 // Datatype constructor functions for MatchExp
1096 ///////////////////////////////////////////////////////////////////////////////
1097 extern a_MatchExp * MATCHexp (Exp x_1, Id x_2);
1099 ///////////////////////////////////////////////////////////////////////////////
1101 // Class for datatype constructor MatchRule::MATCHrule
1103 ///////////////////////////////////////////////////////////////////////////////
1104 class a_MatchRule : public MatchRuleInfo {
1105 public:
1106 #line 197 "ast.ph"
1107 Id _1; Pat _2; Exp _3; Cost _4; a_List<Decl> * _5;
1108 a_MatchRule (Id x_1, Pat x_2, Exp x_3, Cost x_4, a_List<Decl> * x_5);
1110 inline int boxed(const a_MatchRule *) { return 1; }
1111 inline int untag(const a_MatchRule *) { return 0; }
1112 ///////////////////////////////////////////////////////////////////////////////
1114 // Datatype constructor functions for MatchRule
1116 ///////////////////////////////////////////////////////////////////////////////
1117 extern a_MatchRule * MATCHrule (Id x_1, Pat x_2, Exp x_3, Cost x_4, a_List<Decl> * x_5);
1119 ///////////////////////////////////////////////////////////////////////////////
1121 // Base class for datatype Decl
1123 ///////////////////////////////////////////////////////////////////////////////
1124 class a_Decl : public MEM {
1125 public:
1126 enum Tag_Decl {
1127 tag_OPAQUEdecl = 0, tag_DATATYPEdecl = 1, tag_INSTANTIATEdecl = 2,
1128 tag_CLASSDEFdecl = 3, tag_INFERENCEdecl = 4, tag_REWRITEdecl = 5,
1129 tag_REWRITINGdecl = 6, tag_REPLACEMENTdecl = 7, tag_CUTREWRITEdecl = 8,
1130 tag_FAILREWRITEdecl = 9, tag_INJECTdecl = 10, tag_GOTOdecl = 11,
1131 tag_SETSTATEdecl = 12, tag_CONSTRAINTdecl = 13, tag_SYNTAXdecl = 14,
1132 tag_ATTRIBUTEGRAMMARdecl = 15, tag_FUNdecl = 16, tag_MATCHdecl = 17,
1133 tag_BITFIELDdecl = 18, tag_SETLSTMTdecl = 19, tag_SETLDEFdecl = 20,
1134 tag_GRAPHREWRITEdecl = 21, tag_DATAFLOWdecl = 22, tag_CLASSOFdecl = 23,
1135 tag_TYPEEXPdecl = 24, tag_EXPdecl = 25, tag_MARKEDdecl = 26
1138 public:
1139 const Tag_Decl tag__; // variant tag
1140 protected:
1141 inline a_Decl(Tag_Decl t__) : tag__(t__) {}
1142 public:
1144 inline int boxed(const a_Decl * x) { return x != 0; }
1145 inline int untag(const a_Decl * x) { return x ? (x->tag__+1) : 0; }
1146 ///////////////////////////////////////////////////////////////////////////////
1148 // Class for datatype constructor Decl::OPAQUEdecl
1150 ///////////////////////////////////////////////////////////////////////////////
1151 class Decl_OPAQUEdecl : public a_Decl {
1152 public:
1153 #line 208 "ast.ph"
1154 char const * OPAQUEdecl;
1155 Decl_OPAQUEdecl (char const * x_OPAQUEdecl);
1158 ///////////////////////////////////////////////////////////////////////////////
1160 // Class for datatype constructor Decl::DATATYPEdecl
1162 ///////////////////////////////////////////////////////////////////////////////
1163 class Decl_DATATYPEdecl : public a_Decl {
1164 public:
1165 #line 211 "ast.ph"
1166 DatatypeDefs _1; ViewDefs _2; LawDefs _3; TyDefs _4;
1167 Decl_DATATYPEdecl (DatatypeDefs x_1, ViewDefs x_2, LawDefs x_3, TyDefs x_4);
1170 ///////////////////////////////////////////////////////////////////////////////
1172 // Class for datatype constructor Decl::INSTANTIATEdecl
1174 ///////////////////////////////////////////////////////////////////////////////
1175 class Decl_INSTANTIATEdecl : public a_Decl {
1176 public:
1177 #line 212 "ast.ph"
1178 Bool _1; Tys _2;
1179 Decl_INSTANTIATEdecl (Bool x_1, Tys x_2);
1182 ///////////////////////////////////////////////////////////////////////////////
1184 // Class for datatype constructor Decl::CLASSDEFdecl
1186 ///////////////////////////////////////////////////////////////////////////////
1187 class Decl_CLASSDEFdecl : public a_Decl {
1188 public:
1189 #line 215 "ast.ph"
1190 ClassDefinition * CLASSDEFdecl;
1191 Decl_CLASSDEFdecl (ClassDefinition * x_CLASSDEFdecl);
1194 ///////////////////////////////////////////////////////////////////////////////
1196 // Class for datatype constructor Decl::INFERENCEdecl
1198 ///////////////////////////////////////////////////////////////////////////////
1199 class Decl_INFERENCEdecl : public a_Decl {
1200 public:
1201 #line 218 "ast.ph"
1202 Id _1; InferenceRules _2;
1203 Decl_INFERENCEdecl (Id x_1, InferenceRules x_2);
1206 ///////////////////////////////////////////////////////////////////////////////
1208 // Class for datatype constructor Decl::REWRITEdecl
1210 ///////////////////////////////////////////////////////////////////////////////
1211 class Decl_REWRITEdecl : public a_Decl {
1212 public:
1213 #line 221 "ast.ph"
1214 Id _1; RewriteIndexings _2; MatchRules _3;
1215 Decl_REWRITEdecl (Id x_1, RewriteIndexings x_2, MatchRules x_3);
1218 ///////////////////////////////////////////////////////////////////////////////
1220 // Class for datatype constructor Decl::REWRITINGdecl
1222 ///////////////////////////////////////////////////////////////////////////////
1223 class Decl_REWRITINGdecl : public a_Decl {
1224 public:
1225 #line 222 "ast.ph"
1226 Protocols _1; Exp _2; Exp _3; RewriteIndexings _4; MatchRules _5; TyQual _6;
1227 Decl_REWRITINGdecl (Protocols x_1, Exp x_2, Exp x_3, RewriteIndexings x_4, MatchRules x_5, TyQual x_6);
1230 ///////////////////////////////////////////////////////////////////////////////
1232 // Class for datatype constructor Decl::REPLACEMENTdecl
1234 ///////////////////////////////////////////////////////////////////////////////
1235 class Decl_REPLACEMENTdecl : public a_Decl {
1236 public:
1237 #line 224 "ast.ph"
1238 Exp _1; MatchRuleInfo::RewritingMode _2;
1239 Decl_REPLACEMENTdecl (Exp x_1, MatchRuleInfo::RewritingMode x_2);
1242 ///////////////////////////////////////////////////////////////////////////////
1244 // Class for datatype constructor Decl::CUTREWRITEdecl
1246 ///////////////////////////////////////////////////////////////////////////////
1247 class Decl_CUTREWRITEdecl : public a_Decl {
1248 public:
1249 #line 225 "ast.ph"
1250 Exp _1; MatchRuleInfo::RewritingMode _2;
1251 Decl_CUTREWRITEdecl (Exp x_1, MatchRuleInfo::RewritingMode x_2);
1254 ///////////////////////////////////////////////////////////////////////////////
1256 // Class for datatype constructor Decl::FAILREWRITEdecl
1258 ///////////////////////////////////////////////////////////////////////////////
1259 class Decl_FAILREWRITEdecl : public a_Decl {
1260 public:
1261 #line 226 "ast.ph"
1262 MatchRuleInfo::RewritingMode FAILREWRITEdecl;
1263 Decl_FAILREWRITEdecl (MatchRuleInfo::RewritingMode x_FAILREWRITEdecl);
1266 ///////////////////////////////////////////////////////////////////////////////
1268 // Class for datatype constructor Decl::INJECTdecl
1270 ///////////////////////////////////////////////////////////////////////////////
1271 class Decl_INJECTdecl : public a_Decl {
1272 public:
1273 #line 227 "ast.ph"
1274 int node_number; EntryDirection direction;
1275 Decl_INJECTdecl (int x_node_number, EntryDirection x_direction);
1278 ///////////////////////////////////////////////////////////////////////////////
1280 // Class for datatype constructor Decl::GOTOdecl
1282 ///////////////////////////////////////////////////////////////////////////////
1283 class Decl_GOTOdecl : public a_Decl {
1284 public:
1285 #line 230 "ast.ph"
1286 Id GOTOdecl;
1287 Decl_GOTOdecl (Id x_GOTOdecl);
1290 ///////////////////////////////////////////////////////////////////////////////
1292 // Class for datatype constructor Decl::SETSTATEdecl
1294 ///////////////////////////////////////////////////////////////////////////////
1295 class Decl_SETSTATEdecl : public a_Decl {
1296 public:
1297 #line 231 "ast.ph"
1298 int SETSTATEdecl;
1299 Decl_SETSTATEdecl (int x_SETSTATEdecl);
1302 ///////////////////////////////////////////////////////////////////////////////
1304 // Class for datatype constructor Decl::CONSTRAINTdecl
1306 ///////////////////////////////////////////////////////////////////////////////
1307 class Decl_CONSTRAINTdecl : public a_Decl {
1308 public:
1309 #line 234 "ast.ph"
1310 Id _1; ConstraintSet _2;
1311 Decl_CONSTRAINTdecl (Id x_1, ConstraintSet x_2);
1314 ///////////////////////////////////////////////////////////////////////////////
1316 // Class for datatype constructor Decl::SYNTAXdecl
1318 ///////////////////////////////////////////////////////////////////////////////
1319 class Decl_SYNTAXdecl : public a_Decl {
1320 public:
1321 #line 237 "ast.ph"
1322 Id _1; GramExp _2;
1323 Decl_SYNTAXdecl (Id x_1, GramExp x_2);
1326 ///////////////////////////////////////////////////////////////////////////////
1328 // Class for datatype constructor Decl::ATTRIBUTEGRAMMARdecl
1330 ///////////////////////////////////////////////////////////////////////////////
1331 class Decl_ATTRIBUTEGRAMMARdecl : public a_Decl {
1332 public:
1333 #line 238 "ast.ph"
1334 Id _1; GramExp _2;
1335 Decl_ATTRIBUTEGRAMMARdecl (Id x_1, GramExp x_2);
1338 ///////////////////////////////////////////////////////////////////////////////
1340 // Class for datatype constructor Decl::FUNdecl
1342 ///////////////////////////////////////////////////////////////////////////////
1343 class Decl_FUNdecl : public a_Decl {
1344 public:
1345 #line 241 "ast.ph"
1346 FunDefs FUNdecl;
1347 Decl_FUNdecl (FunDefs x_FUNdecl);
1350 ///////////////////////////////////////////////////////////////////////////////
1352 // Class for datatype constructor Decl::MATCHdecl
1354 ///////////////////////////////////////////////////////////////////////////////
1355 class Decl_MATCHdecl : public a_Decl {
1356 public:
1357 #line 242 "ast.ph"
1358 MatchExps _1; MatchRules _2; MatchOptions _3; Ty _4;
1359 Decl_MATCHdecl (MatchExps x_1, MatchRules x_2, MatchOptions x_3, Ty x_4);
1362 ///////////////////////////////////////////////////////////////////////////////
1364 // Class for datatype constructor Decl::BITFIELDdecl
1366 ///////////////////////////////////////////////////////////////////////////////
1367 class Decl_BITFIELDdecl : public a_Decl {
1368 public:
1369 #line 245 "ast.ph"
1370 Id name; int width; FieldDefs field_names; FieldLaws laws;
1371 Decl_BITFIELDdecl (Id x_name, int x_width, FieldDefs x_field_names, FieldLaws x_laws);
1374 ///////////////////////////////////////////////////////////////////////////////
1376 // Class for datatype constructor Decl::SETLSTMTdecl
1378 ///////////////////////////////////////////////////////////////////////////////
1379 class Decl_SETLSTMTdecl : public a_Decl {
1380 public:
1381 #line 252 "ast.ph"
1382 Stmt SETLSTMTdecl;
1383 Decl_SETLSTMTdecl (Stmt x_SETLSTMTdecl);
1386 ///////////////////////////////////////////////////////////////////////////////
1388 // Class for datatype constructor Decl::SETLDEFdecl
1390 ///////////////////////////////////////////////////////////////////////////////
1391 class Decl_SETLDEFdecl : public a_Decl {
1392 public:
1393 #line 253 "ast.ph"
1394 Def SETLDEFdecl;
1395 Decl_SETLDEFdecl (Def x_SETLDEFdecl);
1398 ///////////////////////////////////////////////////////////////////////////////
1400 // Class for datatype constructor Decl::GRAPHREWRITEdecl
1402 ///////////////////////////////////////////////////////////////////////////////
1403 class Decl_GRAPHREWRITEdecl : public a_Decl {
1404 public:
1405 #line 256 "ast.ph"
1406 Id name; LabTys args; GraphRewritingRules rules;
1407 Decl_GRAPHREWRITEdecl (Id x_name, LabTys x_args, GraphRewritingRules x_rules);
1410 ///////////////////////////////////////////////////////////////////////////////
1412 // Class for datatype constructor Decl::DATAFLOWdecl
1414 ///////////////////////////////////////////////////////////////////////////////
1415 class Decl_DATAFLOWdecl : public a_Decl {
1416 public:
1417 #line 262 "ast.ph"
1418 Id name;
1419 Decl_DATAFLOWdecl (Id x_name);
1422 ///////////////////////////////////////////////////////////////////////////////
1424 // Class for datatype constructor Decl::CLASSOFdecl
1426 ///////////////////////////////////////////////////////////////////////////////
1427 class Decl_CLASSOFdecl : public a_Decl {
1428 public:
1429 #line 265 "ast.ph"
1430 Id CLASSOFdecl;
1431 Decl_CLASSOFdecl (Id x_CLASSOFdecl);
1434 ///////////////////////////////////////////////////////////////////////////////
1436 // Class for datatype constructor Decl::TYPEEXPdecl
1438 ///////////////////////////////////////////////////////////////////////////////
1439 class Decl_TYPEEXPdecl : public a_Decl {
1440 public:
1441 #line 266 "ast.ph"
1442 Ty TYPEEXPdecl;
1443 Decl_TYPEEXPdecl (Ty x_TYPEEXPdecl);
1446 ///////////////////////////////////////////////////////////////////////////////
1448 // Class for datatype constructor Decl::EXPdecl
1450 ///////////////////////////////////////////////////////////////////////////////
1451 class Decl_EXPdecl : public a_Decl {
1452 public:
1453 #line 267 "ast.ph"
1454 Exp exp; char const * prefix; char const * suffix;
1455 Decl_EXPdecl (Exp x_exp, char const * x_prefix = 0, char const * x_suffix = 0);
1458 ///////////////////////////////////////////////////////////////////////////////
1460 // Class for datatype constructor Decl::MARKEDdecl
1462 ///////////////////////////////////////////////////////////////////////////////
1463 class Decl_MARKEDdecl : public a_Decl {
1464 public:
1465 #line 273 "ast.ph"
1466 Loc _1; Decl _2;
1467 Decl_MARKEDdecl (Loc x_1, Decl x_2);
1470 ///////////////////////////////////////////////////////////////////////////////
1472 // Datatype constructor functions for Decl
1474 ///////////////////////////////////////////////////////////////////////////////
1475 extern a_Decl * OPAQUEdecl (char const * x_OPAQUEdecl);
1476 extern a_Decl * DATATYPEdecl (DatatypeDefs x_1, ViewDefs x_2, LawDefs x_3, TyDefs x_4);
1477 extern a_Decl * INSTANTIATEdecl (Bool x_1, Tys x_2);
1478 extern a_Decl * CLASSDEFdecl (ClassDefinition * x_CLASSDEFdecl);
1479 extern a_Decl * INFERENCEdecl (Id x_1, InferenceRules x_2);
1480 extern a_Decl * REWRITEdecl (Id x_1, RewriteIndexings x_2, MatchRules x_3);
1481 extern a_Decl * REWRITINGdecl (Protocols x_1, Exp x_2, Exp x_3, RewriteIndexings x_4, MatchRules x_5, TyQual x_6);
1482 extern a_Decl * REPLACEMENTdecl (Exp x_1, MatchRuleInfo::RewritingMode x_2);
1483 extern a_Decl * CUTREWRITEdecl (Exp x_1, MatchRuleInfo::RewritingMode x_2);
1484 extern a_Decl * FAILREWRITEdecl (MatchRuleInfo::RewritingMode x_FAILREWRITEdecl);
1485 extern a_Decl * INJECTdecl (int x_node_number, EntryDirection x_direction);
1486 extern a_Decl * GOTOdecl (Id x_GOTOdecl);
1487 extern a_Decl * SETSTATEdecl (int x_SETSTATEdecl);
1488 extern a_Decl * CONSTRAINTdecl (Id x_1, ConstraintSet x_2);
1489 extern a_Decl * SYNTAXdecl (Id x_1, GramExp x_2);
1490 extern a_Decl * ATTRIBUTEGRAMMARdecl (Id x_1, GramExp x_2);
1491 extern a_Decl * FUNdecl (FunDefs x_FUNdecl);
1492 extern a_Decl * MATCHdecl (MatchExps x_1, MatchRules x_2, MatchOptions x_3, Ty x_4);
1493 extern a_Decl * BITFIELDdecl (Id x_name, int x_width, FieldDefs x_field_names, FieldLaws x_laws);
1494 extern a_Decl * SETLSTMTdecl (Stmt x_SETLSTMTdecl);
1495 extern a_Decl * SETLDEFdecl (Def x_SETLDEFdecl);
1496 extern a_Decl * GRAPHREWRITEdecl (Id x_name, LabTys x_args, GraphRewritingRules x_rules);
1497 extern a_Decl * DATAFLOWdecl (Id x_name);
1498 extern a_Decl * CLASSOFdecl (Id x_CLASSOFdecl);
1499 extern a_Decl * TYPEEXPdecl (Ty x_TYPEEXPdecl);
1500 extern a_Decl * EXPdecl (Exp x_exp, char const * x_prefix = 0, char const * x_suffix = 0);
1501 extern a_Decl * MARKEDdecl (Loc x_1, Decl x_2);
1504 ///////////////////////////////////////////////////////////////////////////////
1506 // Class for datatype constructor Protocol::PROTOCOL
1508 ///////////////////////////////////////////////////////////////////////////////
1509 class a_Protocol : public Loc {
1510 public:
1511 #line 288 "ast.ph"
1512 Ty ty; Ty inh; Ty syn;
1513 a_Protocol (Ty x_ty, Ty x_inh, Ty x_syn);
1515 inline int boxed(const a_Protocol *) { return 1; }
1516 inline int untag(const a_Protocol *) { return 0; }
1517 ///////////////////////////////////////////////////////////////////////////////
1519 // Datatype constructor functions for Protocol
1521 ///////////////////////////////////////////////////////////////////////////////
1522 extern a_Protocol * PROTOCOL (Ty x_ty, Ty x_inh, Ty x_syn);
1524 ///////////////////////////////////////////////////////////////////////////////
1526 // Class for datatype constructor DatatypeDef::DATATYPEdef
1528 ///////////////////////////////////////////////////////////////////////////////
1529 class a_DatatypeDef : public Loc {
1530 public:
1531 #line 295 "ast.ph"
1532 Id _1; TyVars _2; Inherits _3; TyQual _4; TermDefs _5; Decls _6;
1533 a_DatatypeDef (Id x_1, TyVars x_2, Inherits x_3, TyQual x_4, TermDefs x_5, Decls x_6);
1535 inline int boxed(const a_DatatypeDef *) { return 1; }
1536 inline int untag(const a_DatatypeDef *) { return 0; }
1537 ///////////////////////////////////////////////////////////////////////////////
1539 // Datatype constructor functions for DatatypeDef
1541 ///////////////////////////////////////////////////////////////////////////////
1542 extern a_DatatypeDef * DATATYPEdef (Id x_1, TyVars x_2, Inherits x_3, TyQual x_4, TermDefs x_5, Decls x_6);
1544 ///////////////////////////////////////////////////////////////////////////////
1546 // Class for datatype constructor TermDef::TERMdef
1548 ///////////////////////////////////////////////////////////////////////////////
1549 class a_TermDef : public Loc {
1550 public:
1551 #line 303 "ast.ph"
1552 Id id; Ty ty; Decls decls; Inherits inherits; Pat pat; PrintFormats print_formats; TyOpt opt; TyQual qual; Exp view_predicate;
1553 a_TermDef (Id x_id, Ty x_ty, Decls x_decls = nil_1_, Inherits x_inherits = nil_1_, Pat x_pat = NOpat, PrintFormats x_print_formats = nil_1_, TyOpt x_opt = OPTnone, TyQual x_qual = QUALnone, Exp x_view_predicate = NOexp);
1555 inline int boxed(const a_TermDef *) { return 1; }
1556 inline int untag(const a_TermDef *) { return 0; }
1557 ///////////////////////////////////////////////////////////////////////////////
1559 // Datatype constructor functions for TermDef
1561 ///////////////////////////////////////////////////////////////////////////////
1562 extern a_TermDef * TERMdef (Id x_id, Ty x_ty, Decls x_decls = nil_1_, Inherits x_inherits = nil_1_, Pat x_pat = NOpat, PrintFormats x_print_formats = nil_1_, TyOpt x_opt = OPTnone, TyQual x_qual = QUALnone, Exp x_view_predicate = NOexp);
1564 ///////////////////////////////////////////////////////////////////////////////
1566 // Class for datatype constructor ViewDef::VIEWdef
1568 ///////////////////////////////////////////////////////////////////////////////
1569 class a_ViewDef : public Loc {
1570 public:
1571 #line 320 "ast.ph"
1572 Pat _1; Exp _2; a_List<LabExp> * _3;
1573 a_ViewDef (Pat x_1, Exp x_2, a_List<LabExp> * x_3);
1575 inline int boxed(const a_ViewDef *) { return 1; }
1576 inline int untag(const a_ViewDef *) { return 0; }
1577 ///////////////////////////////////////////////////////////////////////////////
1579 // Datatype constructor functions for ViewDef
1581 ///////////////////////////////////////////////////////////////////////////////
1582 extern a_ViewDef * VIEWdef (Pat x_1, Exp x_2, a_List<LabExp> * x_3);
1584 ///////////////////////////////////////////////////////////////////////////////
1586 // Class for datatype constructor LawDef::LAWdef
1588 ///////////////////////////////////////////////////////////////////////////////
1589 class a_LawDef : public Loc {
1590 public:
1591 #line 327 "ast.ph"
1592 Id id; Ids args; Exp guard; Pat pat; Bool invert; Ty ty;
1593 a_LawDef (Id x_id, Ids x_args, Exp x_guard, Pat x_pat, Bool x_invert, Ty x_ty = NOty);
1595 inline int boxed(const a_LawDef *) { return 1; }
1596 inline int untag(const a_LawDef *) { return 0; }
1597 ///////////////////////////////////////////////////////////////////////////////
1599 // Datatype constructor functions for LawDef
1601 ///////////////////////////////////////////////////////////////////////////////
1602 extern a_LawDef * LAWdef (Id x_id, Ids x_args, Exp x_guard, Pat x_pat, Bool x_invert, Ty x_ty = NOty);
1604 ///////////////////////////////////////////////////////////////////////////////
1606 // Class for datatype constructor TyDef::TYdef
1608 ///////////////////////////////////////////////////////////////////////////////
1609 class a_TyDef : public Loc {
1610 public:
1611 #line 341 "ast.ph"
1612 Id _1; TyVars _2; Ty _3; Bool _4;
1613 a_TyDef (Id x_1, TyVars x_2, Ty x_3, Bool x_4);
1615 inline int boxed(const a_TyDef *) { return 1; }
1616 inline int untag(const a_TyDef *) { return 0; }
1617 ///////////////////////////////////////////////////////////////////////////////
1619 // Datatype constructor functions for TyDef
1621 ///////////////////////////////////////////////////////////////////////////////
1622 extern a_TyDef * TYdef (Id x_1, TyVars x_2, Ty x_3, Bool x_4);
1624 ///////////////////////////////////////////////////////////////////////////////
1626 // Class for datatype constructor FunDef::FUNdef
1628 ///////////////////////////////////////////////////////////////////////////////
1629 class a_FunDef : public Loc {
1630 public:
1631 #line 348 "ast.ph"
1632 QualId _1; Ty _2; Ty _3; MatchRules _4;
1633 a_FunDef (QualId x_1, Ty x_2, Ty x_3, MatchRules x_4);
1635 inline int boxed(const a_FunDef *) { return 1; }
1636 inline int untag(const a_FunDef *) { return 0; }
1637 ///////////////////////////////////////////////////////////////////////////////
1639 // Datatype constructor functions for FunDef
1641 ///////////////////////////////////////////////////////////////////////////////
1642 extern a_FunDef * FUNdef (QualId x_1, Ty x_2, Ty x_3, MatchRules x_4);
1644 ///////////////////////////////////////////////////////////////////////////////
1646 // Base class for datatype QualId
1648 ///////////////////////////////////////////////////////////////////////////////
1649 class a_QualId : public MEM {
1650 public:
1651 enum Tag_QualId {
1652 tag_NESTEDid = 0, tag_SIMPLEid = 1
1655 public:
1657 inline int boxed(const a_QualId *) { return 1; }
1658 ///////////////////////////////////////////////////////////////////////////////
1660 // Embbeded tag extraction functions
1662 ///////////////////////////////////////////////////////////////////////////////
1663 inline int untagp(const a_QualId * x)
1664 { return (unsigned long)x & 3; }
1665 inline a_QualId * derefp(const a_QualId * x)
1666 { return (a_QualId*)((unsigned long)x & ~3); }
1667 inline int untag(const a_QualId * x) { return untagp(x); }
1668 ///////////////////////////////////////////////////////////////////////////////
1670 // Class for datatype constructor QualId::NESTEDid
1672 ///////////////////////////////////////////////////////////////////////////////
1673 class QualId_NESTEDid : public a_QualId {
1674 public:
1675 #line 355 "ast.ph"
1676 Ty _1; QualId _2;
1677 QualId_NESTEDid (Ty x_1, QualId x_2);
1680 ///////////////////////////////////////////////////////////////////////////////
1682 // Class for datatype constructor QualId::SIMPLEid
1684 ///////////////////////////////////////////////////////////////////////////////
1685 class QualId_SIMPLEid : public a_QualId {
1686 public:
1687 #line 356 "ast.ph"
1688 Id SIMPLEid;
1689 QualId_SIMPLEid (Id x_SIMPLEid);
1692 ///////////////////////////////////////////////////////////////////////////////
1694 // Datatype constructor functions for QualId
1696 ///////////////////////////////////////////////////////////////////////////////
1697 extern a_QualId * NESTEDid (Ty x_1, QualId x_2);
1698 extern a_QualId * SIMPLEid (Id x_SIMPLEid);
1700 ///////////////////////////////////////////////////////////////////////////////
1702 // Class for datatype constructor InferenceRule::INFERENCErule
1704 ///////////////////////////////////////////////////////////////////////////////
1705 class a_InferenceRule : public Loc {
1706 public:
1707 #line 363 "ast.ph"
1708 MatchRules _1; Exp _2; Conclusions _3;
1709 a_InferenceRule (MatchRules x_1, Exp x_2, Conclusions x_3);
1711 inline int boxed(const a_InferenceRule *) { return 1; }
1712 inline int untag(const a_InferenceRule *) { return 0; }
1713 ///////////////////////////////////////////////////////////////////////////////
1715 // Datatype constructor functions for InferenceRule
1717 ///////////////////////////////////////////////////////////////////////////////
1718 extern a_InferenceRule * INFERENCErule (MatchRules x_1, Exp x_2, Conclusions x_3);
1720 ///////////////////////////////////////////////////////////////////////////////
1722 // Base class for datatype Conclusion
1724 ///////////////////////////////////////////////////////////////////////////////
1725 class a_Conclusion : public Loc {
1726 public:
1727 enum Tag_Conclusion {
1728 tag_ASSERTaction = 0, tag_RETRACTaction = 1, tag_STMTaction = 2
1731 public:
1733 inline int boxed(const a_Conclusion *) { return 1; }
1734 ///////////////////////////////////////////////////////////////////////////////
1736 // Embbeded tag extraction functions
1738 ///////////////////////////////////////////////////////////////////////////////
1739 inline int untagp(const a_Conclusion * x)
1740 { return (unsigned long)x & 3; }
1741 inline a_Conclusion * derefp(const a_Conclusion * x)
1742 { return (a_Conclusion*)((unsigned long)x & ~3); }
1743 inline int untag(const a_Conclusion * x) { return untagp(x); }
1744 ///////////////////////////////////////////////////////////////////////////////
1746 // Class for datatype constructor Conclusion::ASSERTaction
1748 ///////////////////////////////////////////////////////////////////////////////
1749 class Conclusion_ASSERTaction : public a_Conclusion {
1750 public:
1751 #line 366 "ast.ph"
1752 Exp ASSERTaction;
1753 Conclusion_ASSERTaction (Exp x_ASSERTaction);
1756 ///////////////////////////////////////////////////////////////////////////////
1758 // Class for datatype constructor Conclusion::RETRACTaction
1760 ///////////////////////////////////////////////////////////////////////////////
1761 class Conclusion_RETRACTaction : public a_Conclusion {
1762 public:
1763 #line 367 "ast.ph"
1764 Exp RETRACTaction;
1765 Conclusion_RETRACTaction (Exp x_RETRACTaction);
1768 ///////////////////////////////////////////////////////////////////////////////
1770 // Class for datatype constructor Conclusion::STMTaction
1772 ///////////////////////////////////////////////////////////////////////////////
1773 class Conclusion_STMTaction : public a_Conclusion {
1774 public:
1775 #line 368 "ast.ph"
1776 Decls STMTaction;
1777 Conclusion_STMTaction (Decls x_STMTaction);
1780 ///////////////////////////////////////////////////////////////////////////////
1782 // Datatype constructor functions for Conclusion
1784 ///////////////////////////////////////////////////////////////////////////////
1785 extern a_Conclusion * ASSERTaction (Exp x_ASSERTaction);
1786 extern a_Conclusion * RETRACTaction (Exp x_RETRACTaction);
1787 extern a_Conclusion * STMTaction (Decls x_STMTaction);
1789 #line 399 "ast.ph"
1790 #line 399 "ast.ph"
1793 ///////////////////////////////////////////////////////////////////////////////
1795 // AST manipulation methods.
1797 ///////////////////////////////////////////////////////////////////////////////
1798 extern Exp component_exp(Exps, int);
1799 extern Exp component_exp(Exps, Id);
1800 extern Exp component_exp(LabExps, Id);
1802 ///////////////////////////////////////////////////////////////////////////////
1804 // Pretty printing methods.
1806 ///////////////////////////////////////////////////////////////////////////////
1807 extern std::ostream& operator << (std::ostream&, Exp);
1808 extern std::ostream& operator << (std::ostream&,
1809 #line 416 "ast.ph"
1810 a_List<Exp> *
1811 #line 416 "ast.ph"
1813 extern std::ostream& operator << (std::ostream&, LabExp);
1814 extern std::ostream& operator << (std::ostream&, a_List<LabExp> *
1815 #line 418 "ast.ph"
1817 extern std::ostream& operator << (std::ostream&, Cost);
1818 extern std::ostream& operator << (std::ostream&, MatchRule);
1819 extern std::ostream& operator << (std::ostream&, QualId);
1821 #endif
1823 ------------------------------- Statistics -------------------------------
1824 Merge matching rules = yes
1825 Number of DFA nodes merged = 0
1826 Number of ifs generated = 0
1827 Number of switches generated = 0
1828 Number of labels = 0
1829 Number of gotos = 0
1830 Adaptive matching = enabled
1831 Fast string matching = disabled
1832 Inline downcasts = enabled
1833 --------------------------------------------------------------------------