1 /* spec-compiler.jj Grammer definition for the specification */
6 Each construct should be embraced by /DOUBLE_STAR ... STAR/ annotation.
7 Within there, any line beginning with a "#" is a comment of the annotation.
8 Each constrcut should begin with @Begin and end with @End. Otherwise, the
9 annotation would be considered as normal comments of the source.
14 # If LANG is not define, it's C++ by default. C does not support class
15 # and template, so if it's defined as C, we should also have a explicit
31 b) Interface construct
35 IDENTIFIER | IDENTIFIER ...
36 @Condition: ... (Optional)
38 IDENTIFIER :: <C_CPP_Condition>
40 @ID: ... (Optional, use default ID)
45 @Post_action: (Optional)
46 @Post_check: (Optional)
49 c) Potential commit construct
51 @Potential_commit_point_define: ...
55 d) Commit point define construct
57 @Commit_point_define_check: ...
64 @Commit_point_define: ...
65 @Potential_commit_point_label: ...
69 // Commit point clear (just as a normal commit point, but it is used to
70 // clear all commit points)
72 @Commit_point_clear: ...
76 e) Entry point construct
81 f) Interface define construct
83 @Interface_define: <Interface_Name>
86 g) Interface declare & define construct
88 @Interface_decl_define: <Interface_Name>
90 IDENTIFIER | IDENTIFIER ...
91 @Condition: ... (Optional)
93 IDENTIFIER :: <C_CPP_Condition>
95 @ID: ... (Optional, use default ID)
100 @Post_action: (Optional)
101 @Post_check: (Optional)
110 JAVA_UNICODE_ESCAPE = true;
113 PARSER_BEGIN(SpecParser)
114 package edu.uci.eecs.specCompiler.grammerParser;
116 import java.io.FileInputStream;
117 import java.io.FileNotFoundException;
118 import java.io.InputStream;
119 import java.io.ByteArrayInputStream;
121 import java.util.ArrayList;
122 import java.util.HashMap;
123 import java.util.HashSet;
124 import java.util.Arrays;
126 import edu.uci.eecs.specCompiler.specExtraction.Construct;
127 import edu.uci.eecs.specCompiler.specExtraction.GlobalConstruct;
128 import edu.uci.eecs.specCompiler.specExtraction.InterfaceConstruct;
129 import edu.uci.eecs.specCompiler.specExtraction.PotentialCPDefineConstruct;
130 import edu.uci.eecs.specCompiler.specExtraction.CPDefineConstruct;
131 import edu.uci.eecs.specCompiler.specExtraction.CPDefineCheckConstruct;
132 import edu.uci.eecs.specCompiler.specExtraction.CPClearConstruct;
133 import edu.uci.eecs.specCompiler.specExtraction.ConditionalInterface;
134 import edu.uci.eecs.specCompiler.specExtraction.SequentialDefineSubConstruct;
135 import edu.uci.eecs.specCompiler.specExtraction.InterfaceDefineConstruct;
136 import edu.uci.eecs.specCompiler.specExtraction.EntryPointConstruct;
137 import edu.uci.eecs.specCompiler.specExtraction.ClassBeginConstruct;
138 import edu.uci.eecs.specCompiler.specExtraction.ClassEndConstruct;
139 import edu.uci.eecs.specCompiler.specExtraction.FunctionHeader;
140 import edu.uci.eecs.specCompiler.specExtraction.QualifiedName;
141 import edu.uci.eecs.specCompiler.specExtraction.SourceFileInfo;
142 import edu.uci.eecs.specCompiler.specExtraction.VariableDeclaration;
144 public class SpecParser {
145 private static ArrayList<String> _content;
146 private static File _file;
147 private static ArrayList<Construct> _constructs;
150 public static void main(String[] argvs)
151 throws ParseException, TokenMgrError {
153 File f = new File("./grammer/spec1.txt");
154 FileInputStream fis = new FileInputStream(f);
155 SpecParser parser = new SpecParser(fis);
157 ArrayList<String> content = new ArrayList<String>();
158 ArrayList<Construct> constructs = new ArrayList<Construct>();
159 ArrayList<String> headers = new ArrayList<String>();
160 parser.Parse(f, content, constructs, headers);
161 for (int i = 0; i < content.size(); i++) {
162 System.out.println(content.get(i));
165 for (int i = 0; i < constructs.size(); i++) {
166 System.out.println(constructs.get(i));
171 System.out.println("Parsing finished!");
172 } catch (FileNotFoundException e) {
177 public static SourceFileInfo ParseFile(File f)
178 throws ParseException, TokenMgrError {
180 InputStream input = new FileInputStream(f);
181 SpecParser parser = new SpecParser(input);
182 ArrayList<String> content = new ArrayList<String>(),
183 headers = new ArrayList<String>();
184 ArrayList<Construct> constructs = new ArrayList<Construct>();
185 parser.Parse(f, content, constructs, headers);
186 return new SourceFileInfo(f, content, headers, constructs);
187 } catch (FileNotFoundException e) {
194 private static ArrayList<String> breakLines(String all) {
195 String lines[] = all.split("[\\r\\n]+");
196 return new ArrayList<String>(Arrays.asList(lines));
200 public static ArrayList<VariableDeclaration> getTemplateArg(String line)
201 throws ParseException {
202 InputStream input = new ByteArrayInputStream(line.getBytes());
203 SpecParser parser = new SpecParser(input);
204 return parser.TemplateParamList();
207 public static FunctionHeader parseFuncHeader(String line)
208 throws ParseException {
209 InputStream input = new ByteArrayInputStream(line.getBytes());
210 SpecParser parser = new SpecParser(input);
211 return parser.FuncDecl();
215 public static String stringArray2String(ArrayList<String> content) {
216 StringBuilder sb = new StringBuilder();
217 if (content.size() == 1)
218 return content.get(0);
219 for (int i = 0; i < content.size(); i++) {
220 sb.append(content.get(i) + "\n");
222 return sb.toString();
226 boolean spaceSeparator(Token t) {
275 PARSER_END(SpecParser)
279 <IN_POTENTIAL_SPEC, IN_SPEC> SKIP :
293 "/**" : IN_POTENTIAL_SPEC
296 <IN_POTENTIAL_SPEC> TOKEN : {
297 <BEGIN: "@Begin"> : IN_SPEC
313 // "//" comment for the specification
314 <"//" (~["\n", "\r"])* (["\n", "\r"])>
317 <IN_COMMENT, IN_POTENTIAL_SPEC> SKIP : {
321 <IN_COMMENT, IN_POTENTIAL_SPEC> SKIP : { < ~[] > }
325 // "#" comment for the specification
326 <"#" (~["\n", "\r"])* (["\n", "\r"])>
333 <OPTIONS: "@Options:">
335 <GLOBAL_DEFINE: "@Global_define:">
337 <DECLARE_STRUCT: "@DeclareStruct:">
339 <DECLARE_VAR: "@DeclareVar:">
341 <INIT_VAR: "@InitVar:">
343 <DEFINE_FUNC: "@DefineFunc:">
345 <INTERFACE_CLUSTER: "@Interface_cluster:">
347 <HAPPENS_BEFORE: "@Happens_before:">
349 <INTERFACE: "@Interface:">
351 <COMMIT_POINT_SET: "@Commit_point_set:">
353 <ENTRY_POINT: "@Entry_point">
355 <CLASS_BEGIN: "@Class_begin">
357 <CLASS_END: "@Class_end">
359 <INTERFACE_DEFINE: "@Interface_define:">
361 <CONDITION: "@Condition:">
363 <HB_CONDITION: "@HB_condition:">
373 <POST_ACTION: "@Post_action:">
375 <POST_CHECK: "@Post_check:">
377 <POTENTIAL_COMMIT_POINT_DEFINE: "@Potential_commit_point_define:">
381 <COMMIT_POINT_DEFINE_CHECK: "@Commit_point_define_check:">
383 <COMMIT_POINT_DEFINE: "@Commit_point_define:">
385 <COMMIT_POINT_CLEAR: "@Commit_point_clear:">
387 <POTENTIAL_COMMIT_POINT_LABEL: "@Potential_commit_point_label:">
393 /* Specification & C/C++ shared tokens */
401 <UNSIGNED: "unsigned">
403 <TEMPLATE: "template">
413 <#LETTER: ["a"-"z", "A"-"Z"]>
415 <IDENTIFIER: (<LETTER> | "_") (<LETTER> | <DIGIT> | "_")*>
437 /* C/C++ only token*/
470 <GREATER_EQUALS: ">=">
474 <LOGICAL_EQUALS: "==">
490 <DOUBLELESSTHAN: "<<">
492 <DOUBLEGREATERTHAN: ">>">
494 <TRIPLEGREATERTHAN: ">>>">
502 <DIVIDE_EQUALS: "/=">
516 ((~["\"","\\","\n","\r"])
518 ( ["n","t","b","r","f","\\","'","\""]
519 | ["0"-"7"] ( ["0"-"7"] )?
520 | ["0"-"3"] ["0"-"7"]
529 ((~["'","\\","\n","\r"])
531 (["n","t","b","r","f","\\","'","\""]
532 | ["0"-"7"] ( ["0"-"7"] )?
533 | ["0"-"3"] ["0"-"7"]
541 <DECIMAL_LITERAL> (["l","L"])?
542 | <HEX_LITERAL> (["l","L"])?
543 | <OCTAL_LITERAL> (["l","L"])?>
545 < #DECIMAL_LITERAL: ["1"-"9"] (["0"-"9"])* >
547 < #HEX_LITERAL: "0" ["x","X"] (["0"-"9","a"-"f","A"-"F"])+ >
549 < #OCTAL_LITERAL: "0" (["0"-"7"])* >
551 < FLOATING_POINT_LITERAL:
552 <DECIMAL_FLOATING_POINT_LITERAL>
553 | <HEXADECIMAL_FLOATING_POINT_LITERAL> >
555 < #DECIMAL_FLOATING_POINT_LITERAL:
556 (["0"-"9"])+ "." (["0"-"9"])* (<DECIMAL_EXPONENT>)? (["f","F","d","D"])?
557 | "." (["0"-"9"])+ (<DECIMAL_EXPONENT>)? (["f","F","d","D"])?
558 | (["0"-"9"])+ <DECIMAL_EXPONENT> (["f","F","d","D"])?
559 | (["0"-"9"])+ (<DECIMAL_EXPONENT>)? ["f","F","d","D"]>
561 < #DECIMAL_EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ >
563 < #HEXADECIMAL_FLOATING_POINT_LITERAL:
564 "0" ["x", "X"] (["0"-"9","a"-"f","A"-"F"])+ (".")? <HEXADECIMAL_EXPONENT> (["f","F","d","D"])?
565 | "0" ["x", "X"] (["0"-"9","a"-"f","A"-"F"])* "." (["0"-"9","a"-"f","A"-"F"])+ <HEXADECIMAL_EXPONENT> (["f","F","d","D"])?>
567 < #HEXADECIMAL_EXPONENT: ["p","P"] (["+","-"])? (["0"-"9"])+ >
569 < #SPACE: (" " | "\t")+>
571 < #TO_END_OF_LINE: (~["\n"])+>
574 <INCLUDE: "#" (<SPACE>)? "include" <SPACE> (<STRING_LITERAL> | "<" (<LETTER> | <DOT>)+ ">")>
576 <DEFINE: "#" (<SPACE>)? <TO_END_OF_LINE>>
590 (((str = <STRUCT>.image | str = <CLASS>.image | str = <UNSIGNED>.image) { type = type + " " + str; })?
592 name = ParseQualifiedName() {
593 if (!type.equals(""))
594 type = type + " " + name.fullName;
596 type = name.fullName;
599 ((str = <CONST>.image {
600 if (!type.equals(""))
601 type = type + " " + str;
605 (str = <STAR>.image {
606 if (!type.equals(""))
607 type = type + " " + str;
612 if (!type.equals(""))
613 type = type + " " + str;
624 String ParameterizedName() :
630 (str = <IDENTIFIER>.image {res = str;})
631 (<OPEN_BRACKET> str = Type() { res = res + "<" + str; }
632 (<COMMA> str = Type() { res = res + ", " + str; })* <CLOSE_BRACKET>
640 FunctionHeader FuncDecl() :
643 QualifiedName funcName;
644 ArrayList<VariableDeclaration> args;
647 (<STATIC> | <INLINE>)*
649 funcName = ParseQualifiedName()
650 args = FormalParamList()
652 FunctionHeader res = new FunctionHeader(ret, funcName, args);
653 //System.out.println(res);
658 QualifiedName ParseQualifiedName() :
660 String qualifiedName, str;
663 { qualifiedName = ""; }
664 (str = ParameterizedName() { qualifiedName = qualifiedName + str; } )
665 ( <DOUBLECOLON> (str = ParameterizedName() { qualifiedName = qualifiedName +
668 QualifiedName res = new QualifiedName(qualifiedName);
669 //System.out.println(res);
674 ArrayList<VariableDeclaration> TemplateParamList() :
676 ArrayList<VariableDeclaration> params;
682 params = new ArrayList<VariableDeclaration>();
686 (type = <IDENTIFIER>.image
687 name = <IDENTIFIER>.image
689 params.add(new VariableDeclaration(type, name));
693 (<COMMA> type = <IDENTIFIER>.image
694 name = <IDENTIFIER>.image
696 params.add(new VariableDeclaration(type, name));
701 //System.out.println(params);
706 ArrayList<VariableDeclaration > FormalParamList() :
708 ArrayList<VariableDeclaration > typeParams;
709 VariableDeclaration varDecl;
713 typeParams = new ArrayList<VariableDeclaration >();
716 ((varDecl = TypeParam() {typeParams.add(varDecl);})
717 ((<COMMA> varDecl = TypeParam() {typeParams.add(varDecl);}))*)?
724 VariableDeclaration TypeParam() :
729 (type = Type()) (param = <IDENTIFIER>.image)
731 return new VariableDeclaration(type, param);
737 ArrayList<String> C_CPP_CODE(ArrayList<String> headers) :
741 boolean newLine = false;
742 boolean newSpace = true;
743 boolean inTemplate = false;
744 boolean inForLoop = false;
745 ArrayList<String> content;
752 content = new ArrayList<String>();
757 t = <CONST> | t = <STRUCT> | t = <CLASS> | t = <UNSIGNED> |
758 (t = <TEMPLATE> { inTemplate = true; })|
759 t = <STATIC> | t = <INLINE> |
760 (t = <FOR> { inForLoop = true; })|
765 if (headers != null) {
766 headers.add(header.substring(header.lastIndexOf(' ') + 1));
769 | t = <IDENTIFIER> | t = <POUND> |
770 (t = <OPEN_BRACE> { newLine = true; } ) |
771 (t = <CLOSE_BRACE> { newLine = true; inForLoop = false;} ) |
772 t = <EQUALS> | t = <OPEN_PAREN> | t = <CLOSE_PAREN> |
773 t = <OPEN_BRACKET> | t = <CLOSE_BRACKET>
774 | t = <HB_SYMBOL> | t = <COMMA> |
775 t = <DOT> | t = <STAR> | t = <DOLLAR> | t = <NEGATE> | t = <EXCLAMATION> | t = <AND> | t = <OR> | t = <MOD> | t = <PLUS> |
776 t = <PLUSPLUS> | t = <MINUS> | t = <MINUSMINUS> | t = <DIVIDE> | t = <BACKSLASH> |
778 (t = <GREATER_THAN> { if (inTemplate) newLine = true; }) |
779 t = <GREATER_EQUALS> | t = <LESS_EQUALS> |
780 t = <LOGICAL_EQUALS> | t = <NOT_EQUALS> | t = <LOGICAL_AND> | t = <LOGICAL_OR> | t = <XOR> |
781 t = <QUESTION_MARK> | t = <COLON> | t = <DOUBLECOLON> |
782 t = <DOUBLELESSTHAN> |
783 t = <DOUBLEGREATERTHAN> |
784 t = <TRIPLEGREATERTHAN> |
789 t = <DIVIDE_EQUALS> |
795 (t = <SEMI_COLON> { if (!inForLoop) newLine = true; } )
796 | t = <STRING_LITERAL> | t = <CHARACTER_LITERAL> |
797 t = <INTEGER_LITERAL> | t = <FLOATING_POINT_LITERAL> |
798 (t = <DEFINE> { newLine = true; } )
801 if (text.equals("")) {
805 text = text + " " + t.image;
807 if (newSpace && spaceSeparator(t)) {
808 text = text + " " + t.image;
810 text = text + t.image;
811 if (spaceSeparator(t))
825 if (content.size() == 0) {
833 void Parse(File f, ArrayList<String> content, ArrayList<Construct> constructs, ArrayList<String> headers) :
843 _constructs = constructs;
844 sb = new StringBuilder();
849 _constructs.add(inst);
852 //((code = C_CPP_CODE(headers)) { _content.addAll(code); })
854 flushSB = OriginalCode(sb)
857 sb = new StringBuilder();
862 // For the last piece of code
864 _content.add(sb.toString());
869 // If true, there's a new line and sb should be flushed
870 boolean OriginalCode(StringBuilder sb) :
877 if (!str.equals("\n")) {
881 _content.add(sb.toString());
887 Construct ParseSpec() :
893 LOOKAHEAD(2) res = Global_construct() |
894 LOOKAHEAD(2) res = Interface() |
895 LOOKAHEAD(2) res = Potential_commit_point_define() |
896 LOOKAHEAD(2) res = Commit_point_define() |
897 LOOKAHEAD(2) res = Commit_point_define_check() |
898 LOOKAHEAD(2) res = Commit_point_clear() |
899 LOOKAHEAD(2) res = Entry_point() |
900 LOOKAHEAD(2) res = Class_begin() |
901 LOOKAHEAD(2) res = Class_end() |
902 LOOKAHEAD(2) res = Interface_define()
905 //System.out.println(res);
910 GlobalConstruct Global_construct() :
913 SequentialDefineSubConstruct code;
914 HashMap<String, String> options;
920 options = new HashMap<String, String>();
924 ((key = <IDENTIFIER>.image)
926 (value = <IDENTIFIER>.image)
928 if (options.containsKey(key)) {
929 throw new ParseException("Duplicate options!");
931 options.put(key, value);
936 (code = Global_define())
937 { res = new GlobalConstruct(_file, _content.size(), code, options); }
938 (Interface_clusters(res))?
939 (Happens_before(res))?
942 res.unfoldInterfaceCluster();
947 SequentialDefineSubConstruct Global_define() :
949 ArrayList<String> initVar, defineFunc, code, declareStruct;
950 ArrayList<ArrayList<String>> defineFuncs;
951 ArrayList<VariableDeclaration> declareVars;
952 ArrayList<ArrayList<String>> declareStructs;
953 VariableDeclaration declareVar;
958 declareVars = new ArrayList<VariableDeclaration>();
960 defineFuncs = new ArrayList<ArrayList<String>>();
961 declareStructs = new ArrayList<ArrayList<String>>();
964 (<DECLARE_STRUCT> (declareStruct = C_CPP_CODE(null) {
965 declareStructs.add(declareStruct); }))*
966 (<DECLARE_VAR> ((declareVar = TypeParam() <SEMI_COLON> {
967 declareVars.add(declareVar); } )*))?
968 (<INIT_VAR> (code = C_CPP_CODE(null) { initVar = code; } ))?
969 (<DEFINE_FUNC> (defineFunc = C_CPP_CODE(null) { defineFuncs.add(defineFunc); }))*
971 SequentialDefineSubConstruct res = new
972 SequentialDefineSubConstruct(declareStructs, declareVars, initVar, defineFuncs);
973 //System.out.println(res);
978 ConditionalInterface Conditional_interface() :
980 String interfaceName, hbConditionLabel;
984 hbConditionLabel = "";
986 interfaceName = <IDENTIFIER>.image (<OPEN_PAREN> hbConditionLabel =
987 <IDENTIFIER>.image <CLOSE_PAREN>)?
989 return new ConditionalInterface(interfaceName, hbConditionLabel);
993 void Interface_cluster(GlobalConstruct inst) :
996 ConditionalInterface condInterface;
999 (clusterName= <IDENTIFIER>.image)
1000 <EQUALS> <OPEN_BRACE>
1001 (condInterface = Conditional_interface()
1002 { inst.addInterface2Cluster(clusterName, condInterface); }
1004 (<COMMA> condInterface = Conditional_interface()
1005 { inst.addInterface2Cluster(clusterName, condInterface); }
1010 void Interface_clusters(GlobalConstruct inst) :
1013 <INTERFACE_CLUSTER> (Interface_cluster(inst))+
1016 void Happens_before(GlobalConstruct inst) :
1018 ConditionalInterface left, right;
1023 left = Conditional_interface() <HB_SYMBOL> right = Conditional_interface()
1024 { inst.addHBCondition(left, right); }
1028 InterfaceConstruct Interface() :
1030 InterfaceConstruct res;
1031 String interfaceName, condition, idCode, check,
1032 postCheck, commitPoint, hbLabel, hbCondition;
1033 ArrayList<String> commitPointSet;
1034 ArrayList<String> action, postAction;
1035 HashMap<String, String> hbConditions;
1036 ArrayList<String> content;
1041 action = new ArrayList<String>();
1046 commitPointSet = new ArrayList<String>();
1047 hbConditions = new HashMap<String, String>();
1048 postAction = new ArrayList<String>();
1051 <INTERFACE> (interfaceName = <IDENTIFIER>.image)
1053 (commitPoint = <IDENTIFIER>.image
1054 { commitPointSet.add(commitPoint); }
1057 (commitPoint = <IDENTIFIER>.image)
1059 if (commitPointSet.contains(commitPoint)) {
1060 throw new ParseException(interfaceName + " has" +
1061 "duplicate commit point labels");
1063 commitPointSet.add(commitPoint);
1067 (<CONDITION> (content = C_CPP_CODE(null) { condition = stringArray2String(content); }))?
1070 (hbLabel = <IDENTIFIER>.image) <DOUBLECOLON>
1071 (content = C_CPP_CODE(null) { hbCondition = stringArray2String(content); })
1073 if (hbConditions.containsKey(hbLabel)) {
1074 throw new ParseException(interfaceName + " has" +
1075 "duplicate happens-before condtion labels");
1077 hbConditions.put(hbLabel, hbCondition);
1080 (<ID> (content = C_CPP_CODE(null) { idCode = stringArray2String(content); }))?
1081 (<CHECK> (content = C_CPP_CODE(null) { check = stringArray2String(content); }))?
1082 (<ACTION> action = C_CPP_CODE(null))?
1083 (<POST_ACTION> (postAction = C_CPP_CODE(null) ))?
1084 (<POST_CHECK> (content = C_CPP_CODE(null) { postCheck = stringArray2String(content); }))?
1087 res = new InterfaceConstruct(_file, _content.size(), interfaceName, commitPointSet, condition,
1088 hbConditions, idCode, check, action, postAction, postCheck);
1094 PotentialCPDefineConstruct Potential_commit_point_define() :
1096 PotentialCPDefineConstruct res;
1097 String label, condition;
1098 ArrayList<String> content;
1104 <POTENTIAL_COMMIT_POINT_DEFINE> (content = C_CPP_CODE(null) { condition = stringArray2String(content); })
1105 <LABEL> (label = <IDENTIFIER>.image)
1108 res = new PotentialCPDefineConstruct(_file, _content.size(), label, condition);
1114 CPDefineConstruct Commit_point_define() :
1116 CPDefineConstruct res;
1117 String label, potentialCPLabel, condition;
1118 ArrayList<String> content;
1124 <COMMIT_POINT_DEFINE> (content = C_CPP_CODE(null) { condition = stringArray2String(content); })
1125 <POTENTIAL_COMMIT_POINT_LABEL> (potentialCPLabel = <IDENTIFIER>.image)
1126 <LABEL> (label = <IDENTIFIER>.image)
1129 res = new CPDefineConstruct(_file, _content.size(), label, potentialCPLabel, condition);
1134 CPClearConstruct Commit_point_clear() :
1136 CPClearConstruct res;
1137 String label, condition;
1138 ArrayList<String> content;
1144 <COMMIT_POINT_CLEAR> (content = C_CPP_CODE(null) { condition = stringArray2String(content); })
1145 <LABEL> (label = <IDENTIFIER>.image)
1148 res = new CPClearConstruct(_file, _content.size(), label, condition);
1154 CPDefineCheckConstruct Commit_point_define_check() :
1156 CPDefineCheckConstruct res;
1157 String label, condition;
1158 ArrayList<String> content;
1164 <COMMIT_POINT_DEFINE_CHECK> (content = C_CPP_CODE(null) { condition = stringArray2String(content); })
1165 <LABEL> (label = <IDENTIFIER>.image)
1168 res = new CPDefineCheckConstruct(_file, _content.size(), label, condition);
1173 EntryPointConstruct Entry_point() :
1181 return new EntryPointConstruct(_file, _content.size());
1185 ClassBeginConstruct Class_begin() :
1193 return new ClassBeginConstruct(_file, _content.size());
1197 ClassEndConstruct Class_end() :
1205 return new ClassEndConstruct(_file, _content.size());
1209 InterfaceDefineConstruct Interface_define() :
1215 <INTERFACE_DEFINE> (name = <IDENTIFIER>.image)
1218 return new InterfaceDefineConstruct(_file, _content.size(), name);