package uci.graphedit; import java.awt.*; import java.io.*; import java.util.*; import java.lang.Math ; import demeter.*; public class Parser implements ParserConstants { static char unescapifyChar(String s) { char c = s.charAt(0); if (c == '\\') { switch (s.charAt(1)) { case 'n': c = '\n'; break; case 't': c = '\t'; break; case 'b': c = '\b'; break; case 'r': c = '\r'; break; case 'f': c = '\f'; break; case '\\': c = '\\'; break; case '\'': c = '\''; break; case '\"': c = '\"'; break; default: c = (char) Integer.parseInt(s.substring(2, s.length()), 8); break; } } return c; } static String unescapify(String s) { char str[] = new char[s.length()]; int i = 0, o = 0; while (i < s.length()) { char c = s.charAt(i++); if (c == '\\') { int j = i + 1; while (j < s.length() && Character.digit(s.charAt(j), 8) != -1) { j++; } c = unescapifyChar(s.substring(i-1, j)); i = j; } str[o++] = c; } return String.valueOf(str, 0, o); } protected ParserTokenManager token_source; protected Token token = new Token(); protected Token scanpos, lastpos; private int la; protected Parser me; private int[] scan_hist_kind = new int[10000]; private Token[] scan_hist_index = new Token[10000]; int scan_hist_ptr = 0; public Parser(java.io.InputStream stream) { me = this; ASCII_UCodeESC_CharStream input_stream = new ASCII_UCodeESC_CharStream(stream, 1, 1); token_source = new ParserTokenManager(input_stream); } public void ReInit(java.io.InputStream stream) { ASCII_UCodeESC_CharStream input_stream = new ASCII_UCodeESC_CharStream(stream, 1, 1); token_source.ReInit(input_stream); token = new Token(); scan_hist_ptr = 0; } public Parser(ParserTokenManager tm) { me = this; token_source = tm; } public void ReInit(ParserTokenManager tm) { token_source = tm; token = new Token(); scan_hist_ptr = 0; } final private Token consume_token(int kind) throws ParseError { if (token.next != null) token = token.next; else token = token_source.getNextToken(); scan_hist_kind[scan_hist_ptr] = kind; scan_hist_index[scan_hist_ptr++] = token; if (token.kind == kind) { scan_hist_ptr = 0; return token; } token_error_setup(0); throw new ParseError(); } final private boolean scan_token(int kind) throws ParseError { if (scanpos == lastpos) { la--; if (scanpos.next == null) { lastpos = scanpos = scanpos.next = token_source.getNextToken(); } else { lastpos = scanpos = scanpos.next; } } else { scanpos = scanpos.next; } scan_hist_kind[scan_hist_ptr] = kind; scan_hist_index[scan_hist_ptr++] = scanpos; return (scanpos.kind != kind); } final public Token getNextToken() throws ParseError { if (token.next != null) token = token.next; else token = token_source.getNextToken(); return token; } final public Token getToken(int index) throws ParseError { scanpos = token; for (int i = 0; i < index; i++) { if (scanpos.next != null) scanpos = scanpos.next; else scanpos = scanpos.next = token_source.getNextToken(); } return scanpos; } static final String add_escapes(String str) { String retval = ""; char ch; for (int i = 0; i < str.length(); i++) { ch = str.charAt(i); if (ch == '\b') { retval += "\\b"; } else if (ch == '\t') { retval += "\\t"; } else if (ch == '\n') { retval += "\\n"; } else if (ch == '\f') { retval += "\\f"; } else if (ch == '\r') { retval += "\\r"; } else if (ch == '\"') { retval += "\\\""; } else if (ch == '\'') { retval += "\\\'"; } else if (ch == '\\') { retval += "\\\\"; } else { retval += ch; } } return retval; } protected int error_line; protected int error_column; protected String error_string; protected String[] expected_tokens; protected void token_error() { System.out.println(""); System.out.println("Parse error at line " + error_line + ", column " + error_column + ". Encountered:"); System.out.println(" \"" + add_escapes(error_string) + "\""); System.out.println(""); if (expected_tokens.length == 1) { System.out.println("Was expecting:"); } else { System.out.println("Was expecting one of:"); } for (int i = 0; i < expected_tokens.length; i++) { System.out.println(" " + expected_tokens[i]); } System.out.println(""); } final protected void token_error_setup(int stream_ptr) { Token tok; int[] tokenbuf = new int[100]; int tokenbufptr = 0; int maxsize = 0; String[] exp = new String[1000]; int exp_count = 0; for (int i = 0; i < scan_hist_ptr; i++) { if (i == 0 || scan_hist_index[i-1].next == scan_hist_index[i]) { tokenbuf[tokenbufptr++] = scan_hist_kind[i]; if (tokenbufptr > maxsize) maxsize = tokenbufptr; } else { exp[exp_count] = ""; for (int j = 0; j < tokenbufptr; j++) { exp[exp_count] += tokenImage[tokenbuf[j]] + " "; } if (tokenbuf[tokenbufptr-1] != 0) exp[exp_count] += "..."; exp_count++; for (int j = 0; j < exp_count-1; j++) { if (exp[j].equals(exp[exp_count-1])) { exp_count--; break; } } tok = token; if (stream_ptr == 1) tok = tok.next; tokenbufptr = 1; while (tok != scan_hist_index[i]) { tok = tok.next; tokenbufptr++; } tokenbuf[tokenbufptr-1] = scan_hist_kind[i]; } } exp[exp_count] = ""; for (int j = 0; j < tokenbufptr; j++) { exp[exp_count] += tokenImage[tokenbuf[j]] + " "; } if (tokenbuf[tokenbufptr-1] != 0) exp[exp_count] += "..."; exp_count++; for (int j = 0; j < exp_count-1; j++) { if (exp[j].equals(exp[exp_count-1])) { exp_count--; break; } } expected_tokens = new String[exp_count]; for (int i = 0; i < exp_count; i++) { expected_tokens[i] = exp[i]; } error_line = token.beginLine; error_column = token.beginColumn; error_string = ""; tok = token; if (stream_ptr == 1) tok = tok.next; for (int i = 0; i < maxsize; i++) { if (tok.kind == 0) { error_string += " " + tokenImage[0]; break; } error_string += " " + tok.image; tok = tok.next; } error_string = error_string.substring(1); me.token_error(); } final public UGraph _UGraph() throws ParseError { UGraph it; UVertex_List _vertices; UEdge_List _edges; it=new UGraph(); consume_token(1); consume_token(2); consume_token(3); if (_Jack2_1(1)) { _vertices = _UVertex_List(); it.set_vertices(_vertices); } if (_Jack2_2(1)) { _edges = _UEdge_List(); it.set_edges(_edges); } return it; } final public UVertex_List _UVertex_List() throws ParseError { UVertex_List it; Nonempty_UVertex_List _first; it=new UVertex_List(); consume_token(4); consume_token(5); if (_Jack2_3(1)) { _first = _Nonempty_UVertex_List(); it.set_first(_first); } return it; } final public UVertex _UVertex() throws ParseError { UVertex it; UID _id; UVertexName _vertexname; Coordinates _position; IEdge_List _incoming; OEdge_List _outgoing; if (_Jack2_4(1)) { it = _UAltVertex(); } else if (_Jack2_5(1)) { it = _UConstVertex(); } else if (_Jack2_6(1)) { it = _UTerm(); } else { token_error_setup(1); throw new ParseError(); } _id = _UID(); it.set_id(_id); _vertexname = _UVertexName(); it.set_vertexname(_vertexname); _position = _Coordinates(); it.set_position(_position); if (_Jack2_7(1)) { _incoming = _IEdge_List(); it.set_incoming(_incoming); } if (_Jack2_8(1)) { _outgoing = _OEdge_List(); it.set_outgoing(_outgoing); } return it; } final public IEdge_List _IEdge_List() throws ParseError { IEdge_List it; Nonempty_IEdge_List _first; it=new IEdge_List(); consume_token(6); if (_Jack2_9(1)) { _first = _Nonempty_IEdge_List(); it.set_first(_first); } return it; } final public OEdge_List _OEdge_List() throws ParseError { OEdge_List it; Nonempty_OEdge_List _first; it=new OEdge_List(); consume_token(7); if (_Jack2_10(1)) { _first = _Nonempty_OEdge_List(); it.set_first(_first); } return it; } final public UConstVertex _UConstVertex() throws ParseError { UConstVertex it; it=new UConstVertex(); consume_token(8); return it; } final public UAltVertex _UAltVertex() throws ParseError { UAltVertex it; it=new UAltVertex(); consume_token(9); return it; } final public UTerm _UTerm() throws ParseError { UTerm it; it=new UTerm(); consume_token(10); return it; } final public UEdge_List _UEdge_List() throws ParseError { UEdge_List it; Nonempty_UEdge_List _first; it=new UEdge_List(); consume_token(11); consume_token(5); if (_Jack2_11(1)) { _first = _Nonempty_UEdge_List(); it.set_first(_first); } return it; } final public UEdge _UEdge() throws ParseError { UEdge it; UID _id; UVertex _fromVertex; UVertex _toVertex; if (_Jack2_12(1)) { it = _UAltEdge(); } else if (_Jack2_13(1)) { it = _UConstEdge(); } else { token_error_setup(1); throw new ParseError(); } _id = _UID(); it.set_id(_id); _fromVertex = _UVertex(); it.set_fromVertex(_fromVertex); _toVertex = _UVertex(); it.set_toVertex(_toVertex); return it; } final public UAltEdge _UAltEdge() throws ParseError { UAltEdge it; it=new UAltEdge(); consume_token(12); return it; } final public UConstEdge _UConstEdge() throws ParseError { UConstEdge it; UEdgeName _edgename; Cardinality _card; it=new UConstEdge(); consume_token(13); _edgename = _UEdgeName(); it.set_edgename(_edgename); _card = _Cardinality(); it.set_card(_card); return it; } final public Cardinality _Cardinality() throws ParseError { Cardinality it; Lower _lower; Upper _upper; it=new Cardinality(); _lower = _Lower(); it.set_lower(_lower); if (_Jack2_14(1)) { _upper = _Upper(); it.set_upper(_upper); } return it; } final public Lower _Lower() throws ParseError { Lower it; Integer _l; it=new Lower(); _l = _Integer(); it.set_l(_l); return it; } final public Upper _Upper() throws ParseError { Upper it; String _u; it=new Upper(); consume_token(14); consume_token(14); _u = _String(); it.set_u(_u); return it; } final public UID _UID() throws ParseError { UID it; Integer _id; it=new UID(); _id = _Integer(); it.set_id(_id); return it; } final public UEdgeName _UEdgeName() throws ParseError { UEdgeName it; Ident _name; it=new UEdgeName(); _name = _Ident(); it.set_name(_name); return it; } final public UVertexName _UVertexName() throws ParseError { UVertexName it; Ident _name; it=new UVertexName(); _name = _Ident(); it.set_name(_name); return it; } final public Coordinates _Coordinates() throws ParseError { Coordinates it; X _x; Y _y; it=new Coordinates(); consume_token(15); _x = _X(); it.set_x(_x); _y = _Y(); it.set_y(_y); consume_token(16); return it; } final public X _X() throws ParseError { X it; Integer _x; it=new X(); _x = _Integer(); it.set_x(_x); return it; } final public Y _Y() throws ParseError { Y it; Integer _y; it=new Y(); _y = _Integer(); it.set_y(_y); return it; } final public Program _Program() throws ParseError { Program it; JavaCode _preamble; ClassGraph _classgraph; it=new Program(); if (_Jack2_15(1)) { _preamble = _JavaCode(); it.set_preamble(_preamble); } _classgraph = _ClassGraph(); it.set_classgraph(_classgraph); return it; } final public ClassGraph _ClassGraph() throws ParseError { ClassGraph it; ClassDef_DList _classes; it=new ClassGraph(); _classes = _ClassDef_DList(); it.set_classes(_classes); return it; } final public ClassDef _ClassDef() throws ParseError { ClassDef it; ParamClassName _paramclassname; ClassParts _classparts; DFS_mark _dfs_mark; PP_mark _pp_mark; it=new ClassDef(); _paramclassname = _ParamClassName(); it.set_paramclassname(_paramclassname); _classparts = _ClassParts(); it.set_classparts(_classparts); consume_token(14); if (_Jack2_16(1)) { _dfs_mark = _DFS_mark(); it.set_dfs_mark(_dfs_mark); } if (_Jack2_17(1)) { _pp_mark = _PP_mark(); it.set_pp_mark(_pp_mark); } return it; } final public ParamClassName _ParamClassName() throws ParseError { ParamClassName it; ClassName _classname; ClassName_Commalist _parameters; it=new ParamClassName(); _classname = _ClassName(); it.set_classname(_classname); if (_Jack2_18(1)) { consume_token(17); _parameters = _ClassName_Commalist(); it.set_parameters(_parameters); consume_token(18); } return it; } final public ClassParts _ClassParts() throws ParseError { ClassParts it; if (_Jack2_19(1)) { it = _ConstOrAltClass(); } else if (_Jack2_20(1)) { it = _RepetitionClass(); } else { token_error_setup(1); throw new ParseError(); } return it; } final public ConstOrAltClass _ConstOrAltClass() throws ParseError { ConstOrAltClass it; PartOrSyntax_List _parts; ClassParents _parents; if (_Jack2_21(1)) { it = _ConstructionClass(); } else if (_Jack2_22(1)) { it = _AlternationClass(); } else { token_error_setup(1); throw new ParseError(); } _parts = _PartOrSyntax_List(); it.set_parts(_parts); _parents = _ClassParents(); it.set_parents(_parents); return it; } final public PartOrSyntax _PartOrSyntax() throws ParseError { PartOrSyntax it; if (_Jack2_23(1)) { it = _Part(); } else if (_Jack2_24(1)) { it = _OptionalPart(); } else if (_Jack2_25(1)) { it = _Syntax(); } else { token_error_setup(1); throw new ParseError(); } return it; } final public Part _Part() throws ParseError { Part it; PartName _partname; ClassSpec _classspec; it=new Part(); if (_Jack2_26(1)) { consume_token(19); _partname = _PartName(); it.set_partname(_partname); consume_token(20); } _classspec = _ClassSpec(); it.set_classspec(_classspec); return it; } final public OptionalPart _OptionalPart() throws ParseError { OptionalPart it; Part_Sandwich _part; it=new OptionalPart(); consume_token(21); _part = _Part_Sandwich(); it.set_part(_part); consume_token(22); return it; } final public ClassParents _ClassParents() throws ParseError { ClassParents it; ClassSpec _extend; ClassSpec_Commalist _implement; it=new ClassParents(); if (_Jack2_27(1)) { consume_token(23); _extend = _ClassSpec(); it.set_extend(_extend); } if (_Jack2_28(1)) { consume_token(24); _implement = _ClassSpec_Commalist(); it.set_implement(_implement); } return it; } final public ConstructionClass _ConstructionClass() throws ParseError { ConstructionClass it; it=new ConstructionClass(); consume_token(25); return it; } final public AlternationClass _AlternationClass() throws ParseError { AlternationClass it; Subclass_Barlist _subclasses; Common _common; it=new AlternationClass(); consume_token(26); _subclasses = _Subclass_Barlist(); it.set_subclasses(_subclasses); if (_Jack2_29(1)) { _common = _Common(); it.set_common(_common); } return it; } final public Subclass _Subclass() throws ParseError { Subclass it; ClassSpec _classspec; it=new Subclass(); _classspec = _ClassSpec(); it.set_classspec(_classspec); return it; } final public Common _Common() throws ParseError { Common it; it=new Common(); consume_token(27); return it; } final public RepetitionClass _RepetitionClass() throws ParseError { RepetitionClass it; RepeatedPart_Sandwich _sandwiched; it=new RepetitionClass(); consume_token(28); _sandwiched = _RepeatedPart_Sandwich(); it.set_sandwiched(_sandwiched); return it; } final public RepeatedPart _RepeatedPart() throws ParseError { RepeatedPart it; ClassSpec _nonempty; ClassSpec_Sandwich _repeated; it=new RepeatedPart(); if (_Jack2_30(1)) { _nonempty = _ClassSpec(); it.set_nonempty(_nonempty); } consume_token(15); _repeated = _ClassSpec_Sandwich(); it.set_repeated(_repeated); consume_token(16); return it; } final public ClassSpec _ClassSpec() throws ParseError { ClassSpec it; ClassName _classname; ClassSpec_Commalist _actual_parameters; PP_mark _pp_mark; it=new ClassSpec(); _classname = _ClassName(); it.set_classname(_classname); if (_Jack2_31(1)) { consume_token(17); _actual_parameters = _ClassSpec_Commalist(); it.set_actual_parameters(_actual_parameters); consume_token(18); } if (_Jack2_32(1)) { _pp_mark = _PP_mark(); it.set_pp_mark(_pp_mark); } return it; } final public Syntax _Syntax() throws ParseError { Syntax it; if (_Jack2_33(1)) { it = _PlainSyntax(); } else if (_Jack2_34(1)) { it = _PrintCommand(); } else { token_error_setup(1); throw new ParseError(); } return it; } final public PlainSyntax _PlainSyntax() throws ParseError { PlainSyntax it; String _string; it=new PlainSyntax(); _string = _String(); it.set_string(_string); return it; } final public PrintCommand _PrintCommand() throws ParseError { PrintCommand it; if (_Jack2_35(1)) { it = _PrintIndent(); } else if (_Jack2_36(1)) { it = _PrintUnindent(); } else if (_Jack2_37(1)) { it = _PrintSkip(); } else if (_Jack2_38(1)) { it = _PrintSpace(); } else { token_error_setup(1); throw new ParseError(); } return it; } final public PrintIndent _PrintIndent() throws ParseError { PrintIndent it; it=new PrintIndent(); consume_token(29); return it; } final public PrintUnindent _PrintUnindent() throws ParseError { PrintUnindent it; it=new PrintUnindent(); consume_token(30); return it; } final public PrintSkip _PrintSkip() throws ParseError { PrintSkip it; it=new PrintSkip(); consume_token(31); return it; } final public PrintSpace _PrintSpace() throws ParseError { PrintSpace it; it=new PrintSpace(); consume_token(32); return it; } final public DFS_mark _DFS_mark() throws ParseError { DFS_mark it; it=new DFS_mark(); consume_token(33); return it; } final public PP_mark _PP_mark() throws ParseError { PP_mark it; it=new PP_mark(); consume_token(34); return it; } final public Verbatim _Verbatim() throws ParseError { Verbatim it; JavaCode _javacode; it=new Verbatim(); _javacode = _JavaCode(); it.set_javacode(_javacode); return it; } final public ClassName _ClassName() throws ParseError { ClassName it; Ident _name; it=new ClassName(); _name = _Ident(); it.set_name(_name); return it; } final public PartName _PartName() throws ParseError { PartName it; Ident _name; it=new PartName(); _name = _Ident(); it.set_name(_name); return it; } final public TraversalName _TraversalName() throws ParseError { TraversalName it; Ident _name; it=new TraversalName(); _name = _Ident(); it.set_name(_name); return it; } final public VisitorName _VisitorName() throws ParseError { VisitorName it; Ident _name; it=new VisitorName(); _name = _Ident(); it.set_name(_name); return it; } final public MethodName _MethodName() throws ParseError { MethodName it; Ident _name; it=new MethodName(); _name = _Ident(); it.set_name(_name); return it; } final public JavaCode _JavaCode() throws ParseError { JavaCode it; String _code; it=new JavaCode(); _code = _String(); it.set_code(_code); return it; } final public Parameterized _Parameterized() throws ParseError { Parameterized it; Part_Commalist _part_commalist; it=new Parameterized(); _part_commalist = _Part_Commalist(); it.set_part_commalist(_part_commalist); return it; } final public SyntaxTable _SyntaxTable() throws ParseError { SyntaxTable it; PlainSyntax_List _plainsyntax_list; it=new SyntaxTable(); _plainsyntax_list = _PlainSyntax_List(); it.set_plainsyntax_list(_plainsyntax_list); return it; } final public PrintVisitor _PrintVisitor() throws ParseError { PrintVisitor it; UGraph _ugraph; it=new PrintVisitor(); _ugraph = _UGraph(); it.set_ugraph(_ugraph); return it; } final public PlacementVisitor _PlacementVisitor() throws ParseError { PlacementVisitor it; UGraph _ugraph; it=new PlacementVisitor(); _ugraph = _UGraph(); it.set_ugraph(_ugraph); return it; } final public EdgeDistinctionVisitor _EdgeDistinctionVisitor() throws ParseError { EdgeDistinctionVisitor it; String _edgetype; it=new EdgeDistinctionVisitor(); _edgetype = _String(); it.set_edgetype(_edgetype); return it; } final public ClassNameRetVisitor _ClassNameRetVisitor() throws ParseError { ClassNameRetVisitor it; ClassName _cn; it=new ClassNameRetVisitor(); _cn = _ClassName(); it.set_cn(_cn); return it; } final public ClassNameTranspVisitor _ClassNameTranspVisitor() throws ParseError { ClassNameTranspVisitor it; ParamClassName _pcn; it=new ClassNameTranspVisitor(); _pcn = _ParamClassName(); it.set_pcn(_pcn); return it; } final public EdgeVisitor _EdgeVisitor() throws ParseError { EdgeVisitor it; EdgeDistinctionVisitor _edv; ClassNameTranspVisitor _cntv; UGraph _ugraph; it=new EdgeVisitor(); _edv = _EdgeDistinctionVisitor(); it.set_edv(_edv); _cntv = _ClassNameTranspVisitor(); it.set_cntv(_cntv); _ugraph = _UGraph(); it.set_ugraph(_ugraph); return it; } final public ReadVertexVisitor _ReadVertexVisitor() throws ParseError { ReadVertexVisitor it; VertexContainer _elements; it=new ReadVertexVisitor(); _elements = _VertexContainer(); it.set_elements(_elements); return it; } final public VertexContainer _VertexContainer() throws ParseError { VertexContainer it; it=new VertexContainer(); return it; } final public ReadEdgeVisitor _ReadEdgeVisitor() throws ParseError { ReadEdgeVisitor it; EdgeContainer _elements; it=new ReadEdgeVisitor(); _elements = _EdgeContainer(); it.set_elements(_elements); return it; } final public EdgeContainer _EdgeContainer() throws ParseError { EdgeContainer it; it=new EdgeContainer(); return it; } final public SaveGraphVisitor _SaveGraphVisitor() throws ParseError { SaveGraphVisitor it; String _graphString; it=new SaveGraphVisitor(); _graphString = _String(); it.set_graphString(_graphString); return it; } final public Main _Main() throws ParseError { Main it; it=new Main(); return it; } final public CountingVisitor _CountingVisitor() throws ParseError { CountingVisitor it; Integer _total; it=new CountingVisitor(); _total = _Integer(); it.set_total(_total); return it; } final public ClassDef_DList _ClassDef_DList() throws ParseError { ClassDef_DList it; Nonempty_ClassDef_DList _first; it=new ClassDef_DList(); _first = _Nonempty_ClassDef_DList(); it.set_first(_first); return it; } final public ClassName_Commalist _ClassName_Commalist() throws ParseError { ClassName_Commalist it; Nonempty_ClassName_Commalist _first; it=new ClassName_Commalist(); _first = _Nonempty_ClassName_Commalist(); it.set_first(_first); return it; } final public PartOrSyntax_List _PartOrSyntax_List() throws ParseError { PartOrSyntax_List it; Nonempty_PartOrSyntax_List _first; it=new PartOrSyntax_List(); if (_Jack2_39(1)) { _first = _Nonempty_PartOrSyntax_List(); it.set_first(_first); } return it; } final public Part_Sandwich _Part_Sandwich() throws ParseError { Part_Sandwich it; Syntax_List _first; Part _inner; Syntax_List _second; it=new Part_Sandwich(); _first = _Syntax_List(); it.set_first(_first); _inner = _Part(); it.set_inner(_inner); _second = _Syntax_List(); it.set_second(_second); return it; } final public ClassSpec_Commalist _ClassSpec_Commalist() throws ParseError { ClassSpec_Commalist it; Nonempty_ClassSpec_Commalist _first; it=new ClassSpec_Commalist(); _first = _Nonempty_ClassSpec_Commalist(); it.set_first(_first); return it; } final public Subclass_Barlist _Subclass_Barlist() throws ParseError { Subclass_Barlist it; Nonempty_Subclass_Barlist _first; it=new Subclass_Barlist(); _first = _Nonempty_Subclass_Barlist(); it.set_first(_first); return it; } final public RepeatedPart_Sandwich _RepeatedPart_Sandwich() throws ParseError { RepeatedPart_Sandwich it; Syntax_List _first; RepeatedPart _inner; Syntax_List _second; it=new RepeatedPart_Sandwich(); _first = _Syntax_List(); it.set_first(_first); _inner = _RepeatedPart(); it.set_inner(_inner); _second = _Syntax_List(); it.set_second(_second); return it; } final public ClassSpec_Sandwich _ClassSpec_Sandwich() throws ParseError { ClassSpec_Sandwich it; Syntax_List _first; ClassSpec _inner; Syntax_List _second; it=new ClassSpec_Sandwich(); _first = _Syntax_List(); it.set_first(_first); _inner = _ClassSpec(); it.set_inner(_inner); _second = _Syntax_List(); it.set_second(_second); return it; } final public Syntax_List _Syntax_List() throws ParseError { Syntax_List it; Nonempty_Syntax_List _first; it=new Syntax_List(); if (_Jack2_40(1)) { _first = _Nonempty_Syntax_List(); it.set_first(_first); } return it; } final public Part_Commalist _Part_Commalist() throws ParseError { Part_Commalist it; Nonempty_Part_Commalist _first; it=new Part_Commalist(); _first = _Nonempty_Part_Commalist(); it.set_first(_first); return it; } final public PlainSyntax_List _PlainSyntax_List() throws ParseError { PlainSyntax_List it; Nonempty_PlainSyntax_List _first; it=new PlainSyntax_List(); if (_Jack2_41(1)) { _first = _Nonempty_PlainSyntax_List(); it.set_first(_first); } return it; } final public Nonempty_UVertex_List _Nonempty_UVertex_List() throws ParseError { Nonempty_UVertex_List it; UVertex _it; Nonempty_UVertex_List _next; it=new Nonempty_UVertex_List(); _it = _UVertex(); it.set_it(_it); if (_Jack2_42(1)) { _next = _Nonempty_UVertex_List(); it.set_next(_next); } return it; } final public Nonempty_IEdge_List _Nonempty_IEdge_List() throws ParseError { Nonempty_IEdge_List it; UID _it; Nonempty_IEdge_List _next; it=new Nonempty_IEdge_List(); _it = _UID(); it.set_it(_it); if (_Jack2_43(1)) { _next = _Nonempty_IEdge_List(); it.set_next(_next); } return it; } final public Nonempty_OEdge_List _Nonempty_OEdge_List() throws ParseError { Nonempty_OEdge_List it; UID _it; Nonempty_OEdge_List _next; it=new Nonempty_OEdge_List(); _it = _UID(); it.set_it(_it); if (_Jack2_44(1)) { _next = _Nonempty_OEdge_List(); it.set_next(_next); } return it; } final public Nonempty_UEdge_List _Nonempty_UEdge_List() throws ParseError { Nonempty_UEdge_List it; UEdge _it; Nonempty_UEdge_List _next; it=new Nonempty_UEdge_List(); _it = _UEdge(); it.set_it(_it); if (_Jack2_45(1)) { _next = _Nonempty_UEdge_List(); it.set_next(_next); } return it; } final public Nonempty_ClassDef_DList _Nonempty_ClassDef_DList() throws ParseError { Nonempty_ClassDef_DList it; ClassDef _it; Nonempty_ClassDef_DList _next; it=new Nonempty_ClassDef_DList(); _it = _ClassDef(); it.set_it(_it); if (_Jack2_46(1)) { _next = _Nonempty_ClassDef_DList(); it.set_next(_next); } return it; } final public Nonempty_ClassName_Commalist _Nonempty_ClassName_Commalist() throws ParseError { Nonempty_ClassName_Commalist it; ClassName _it; Nonempty_ClassName_Commalist _next; it=new Nonempty_ClassName_Commalist(); _it = _ClassName(); it.set_it(_it); if (_Jack2_47(1)) { consume_token(35); _next = _Nonempty_ClassName_Commalist(); it.set_next(_next); } return it; } final public Nonempty_PartOrSyntax_List _Nonempty_PartOrSyntax_List() throws ParseError { Nonempty_PartOrSyntax_List it; PartOrSyntax _it; Nonempty_PartOrSyntax_List _next; it=new Nonempty_PartOrSyntax_List(); _it = _PartOrSyntax(); it.set_it(_it); if (_Jack2_48(1)) { _next = _Nonempty_PartOrSyntax_List(); it.set_next(_next); } return it; } final public Nonempty_ClassSpec_Commalist _Nonempty_ClassSpec_Commalist() throws ParseError { Nonempty_ClassSpec_Commalist it; ClassSpec _it; Nonempty_ClassSpec_Commalist _next; it=new Nonempty_ClassSpec_Commalist(); _it = _ClassSpec(); it.set_it(_it); if (_Jack2_49(1)) { consume_token(35); _next = _Nonempty_ClassSpec_Commalist(); it.set_next(_next); } return it; } final public Nonempty_Subclass_Barlist _Nonempty_Subclass_Barlist() throws ParseError { Nonempty_Subclass_Barlist it; Subclass _it; Nonempty_Subclass_Barlist _next; it=new Nonempty_Subclass_Barlist(); _it = _Subclass(); it.set_it(_it); if (_Jack2_50(1)) { consume_token(36); _next = _Nonempty_Subclass_Barlist(); it.set_next(_next); } return it; } final public Nonempty_Syntax_List _Nonempty_Syntax_List() throws ParseError { Nonempty_Syntax_List it; Syntax _it; Nonempty_Syntax_List _next; it=new Nonempty_Syntax_List(); _it = _Syntax(); it.set_it(_it); if (_Jack2_51(1)) { _next = _Nonempty_Syntax_List(); it.set_next(_next); } return it; } final public Nonempty_Part_Commalist _Nonempty_Part_Commalist() throws ParseError { Nonempty_Part_Commalist it; Part _it; Nonempty_Part_Commalist _next; it=new Nonempty_Part_Commalist(); _it = _Part(); it.set_it(_it); if (_Jack2_52(1)) { consume_token(35); _next = _Nonempty_Part_Commalist(); it.set_next(_next); } return it; } final public Nonempty_PlainSyntax_List _Nonempty_PlainSyntax_List() throws ParseError { Nonempty_PlainSyntax_List it; PlainSyntax _it; Nonempty_PlainSyntax_List _next; it=new Nonempty_PlainSyntax_List(); _it = _PlainSyntax(); it.set_it(_it); if (_Jack2_53(1)) { _next = _Nonempty_PlainSyntax_List(); it.set_next(_next); } return it; } final public boolean _boolean() throws ParseError { Token t; if (_Jack2_54(1)) { t = consume_token(TRUE); return true; } else if (_Jack2_55(1)) { t = consume_token(FALSE); return false; } else { token_error_setup(1); throw new ParseError(); } } final public char _char() throws ParseError { Token t; t = consume_token(CHARACTER_LITERAL); String s = t.image; return unescapifyChar(s.substring(1, s.length()-1)); } final public byte _byte() throws ParseError { int i; i = _int(); return (byte) i; } final public short _short() throws ParseError { int i; i = _int(); return (short) i; } final public int _int() throws ParseError { Number num; num = _Number(); return num.intValue(); } final public long _long() throws ParseError { Number num; num = _Number(); return num.longValue(); } final public float _float() throws ParseError { Number num; num = _Number(); return num.floatValue(); } final public double _double() throws ParseError { Number num; num = _Number(); return num.doubleValue(); } final public Boolean _Boolean() throws ParseError { Token t; if (_Jack2_56(1)) { t = consume_token(TRUE); return Boolean.TRUE; } else if (_Jack2_57(1)) { t = consume_token(FALSE); return Boolean.FALSE; } else { token_error_setup(1); throw new ParseError(); } } final public Character _Character() throws ParseError { char c; c = _char(); return new Character(c); } final public Integer _Integer() throws ParseError { int i; i = _int(); return new Integer(i); } final public Long _Long() throws ParseError { long l; l = _long(); return new Long(l); } final public Float _Float() throws ParseError { float f; f = _float(); return new Float(f); } final public Double _Double() throws ParseError { double d; d = _double(); return new Double(d); } final public Number _Number() throws ParseError { Token t; String s; int radix; Number num; if (_Jack2_58(1)) { if (_Jack2_59(1)) { t = consume_token(DECIMAL_LITERAL); s = t.image; radix = 10; } else if (_Jack2_60(1)) { t = consume_token(HEX_LITERAL); s = t.image.substring(2, t.image.length()); radix = 16; } else if (_Jack2_61(1)) { t = consume_token(OCTAL_LITERAL); s = t.image; radix = 8; } else { token_error_setup(1); throw new ParseError(); } switch (s.charAt(s.length()-1)) { case 'l': case 'L': num = Long.valueOf(s.substring(0, s.length()-1), radix); break; default: num = Integer.valueOf(s, radix); break; } } else if (_Jack2_62(1)) { t = consume_token(FLOATING_POINT_LITERAL); s = t.image; switch (s.charAt(s.length()-1)) { case 'd': case 'D': num = Double.valueOf(s.substring(0, s.length()-1)); break; case 'f': case 'F': num = Float.valueOf(s.substring(0, s.length()-1)); break; default: num = Float.valueOf(s); break; } } else { token_error_setup(1); throw new ParseError(); } return num; } final public String _String() throws ParseError { Token t; t = consume_token(STRING_LITERAL); String s = t.image; return unescapify(s.substring(1, s.length()-1)); } final public StringBuffer _StringBuffer() throws ParseError { String s; s = _String(); return new StringBuffer(s); } final public Ident _Ident() throws ParseError { Token t; t = consume_token(IDENTIFIER); return new Ident(t.image); } final public Text _Text() throws ParseError { Token t; t = consume_token(TEXT_LITERAL); String s = t.image; return new Text(s.substring(2, s.length()-2)); } final private boolean _Jack2_1(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_1(); } final private boolean _Jack2_2(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_2(); } final private boolean _Jack2_3(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_3(); } final private boolean _Jack2_4(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_4(); } final private boolean _Jack2_5(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_5(); } final private boolean _Jack2_6(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_6(); } final private boolean _Jack2_7(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_7(); } final private boolean _Jack2_8(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_8(); } final private boolean _Jack2_9(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_9(); } final private boolean _Jack2_10(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_10(); } final private boolean _Jack2_11(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_11(); } final private boolean _Jack2_12(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_12(); } final private boolean _Jack2_13(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_13(); } final private boolean _Jack2_14(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_14(); } final private boolean _Jack2_15(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_15(); } final private boolean _Jack2_16(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_16(); } final private boolean _Jack2_17(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_17(); } final private boolean _Jack2_18(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_18(); } final private boolean _Jack2_19(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_19(); } final private boolean _Jack2_20(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_20(); } final private boolean _Jack2_21(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_21(); } final private boolean _Jack2_22(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_22(); } final private boolean _Jack2_23(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_23(); } final private boolean _Jack2_24(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_24(); } final private boolean _Jack2_25(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_25(); } final private boolean _Jack2_26(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_26(); } final private boolean _Jack2_27(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_27(); } final private boolean _Jack2_28(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_28(); } final private boolean _Jack2_29(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_29(); } final private boolean _Jack2_30(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_30(); } final private boolean _Jack2_31(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_31(); } final private boolean _Jack2_32(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_32(); } final private boolean _Jack2_33(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_33(); } final private boolean _Jack2_34(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_34(); } final private boolean _Jack2_35(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_35(); } final private boolean _Jack2_36(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_36(); } final private boolean _Jack2_37(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_37(); } final private boolean _Jack2_38(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_38(); } final private boolean _Jack2_39(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_39(); } final private boolean _Jack2_40(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_40(); } final private boolean _Jack2_41(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_41(); } final private boolean _Jack2_42(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_42(); } final private boolean _Jack2_43(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_43(); } final private boolean _Jack2_44(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_44(); } final private boolean _Jack2_45(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_45(); } final private boolean _Jack2_46(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_46(); } final private boolean _Jack2_47(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_47(); } final private boolean _Jack2_48(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_48(); } final private boolean _Jack2_49(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_49(); } final private boolean _Jack2_50(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_50(); } final private boolean _Jack2_51(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_51(); } final private boolean _Jack2_52(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_52(); } final private boolean _Jack2_53(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_53(); } final private boolean _Jack2_54(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_54(); } final private boolean _Jack2_55(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_55(); } final private boolean _Jack2_56(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_56(); } final private boolean _Jack2_57(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_57(); } final private boolean _Jack2_58(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_58(); } final private boolean _Jack2_59(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_59(); } final private boolean _Jack2_60(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_60(); } final private boolean _Jack2_61(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_61(); } final private boolean _Jack2_62(int xla) throws ParseError { la = xla; lastpos = scanpos = token; return !_Jack3_62(); } final private boolean _Jack3_1() throws ParseError { if (_Jack3_UVertex_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_2() throws ParseError { if (_Jack3_UEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_3() throws ParseError { if (_Jack3_Nonempty_UVertex_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_4() throws ParseError { if (_Jack3_UAltVertex()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_5() throws ParseError { if (_Jack3_UConstVertex()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_6() throws ParseError { if (_Jack3_UTerm()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_7() throws ParseError { if (_Jack3_IEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_8() throws ParseError { if (_Jack3_OEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_9() throws ParseError { if (_Jack3_Nonempty_IEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_10() throws ParseError { if (_Jack3_Nonempty_OEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_11() throws ParseError { if (_Jack3_Nonempty_UEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_12() throws ParseError { if (_Jack3_UAltEdge()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_13() throws ParseError { if (_Jack3_UConstEdge()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_14() throws ParseError { if (_Jack3_Upper()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_15() throws ParseError { if (_Jack3_JavaCode()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_16() throws ParseError { if (_Jack3_DFS_mark()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_17() throws ParseError { if (_Jack3_PP_mark()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_18() throws ParseError { if (scan_token(17)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_ClassName_Commalist()) return true; if (la == 0 && scanpos == lastpos) return false; if (scan_token(18)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_19() throws ParseError { if (_Jack3_ConstOrAltClass()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_20() throws ParseError { if (_Jack3_RepetitionClass()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_21() throws ParseError { if (_Jack3_ConstructionClass()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_22() throws ParseError { if (_Jack3_AlternationClass()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_23() throws ParseError { if (_Jack3_Part()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_24() throws ParseError { if (_Jack3_OptionalPart()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_25() throws ParseError { if (_Jack3_Syntax()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_26() throws ParseError { if (scan_token(19)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_PartName()) return true; if (la == 0 && scanpos == lastpos) return false; if (scan_token(20)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_27() throws ParseError { if (scan_token(23)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_ClassSpec()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_28() throws ParseError { if (scan_token(24)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_ClassSpec_Commalist()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_29() throws ParseError { if (_Jack3_Common()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_30() throws ParseError { if (_Jack3_ClassSpec()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_31() throws ParseError { if (scan_token(17)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_ClassSpec_Commalist()) return true; if (la == 0 && scanpos == lastpos) return false; if (scan_token(18)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_32() throws ParseError { if (_Jack3_PP_mark()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_33() throws ParseError { if (_Jack3_PlainSyntax()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_34() throws ParseError { if (_Jack3_PrintCommand()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_35() throws ParseError { if (_Jack3_PrintIndent()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_36() throws ParseError { if (_Jack3_PrintUnindent()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_37() throws ParseError { if (_Jack3_PrintSkip()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_38() throws ParseError { if (_Jack3_PrintSpace()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_39() throws ParseError { if (_Jack3_Nonempty_PartOrSyntax_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_40() throws ParseError { if (_Jack3_Nonempty_Syntax_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_41() throws ParseError { if (_Jack3_Nonempty_PlainSyntax_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_42() throws ParseError { if (_Jack3_Nonempty_UVertex_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_43() throws ParseError { if (_Jack3_Nonempty_IEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_44() throws ParseError { if (_Jack3_Nonempty_OEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_45() throws ParseError { if (_Jack3_Nonempty_UEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_46() throws ParseError { if (_Jack3_Nonempty_ClassDef_DList()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_47() throws ParseError { if (scan_token(35)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_Nonempty_ClassName_Commalist()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_48() throws ParseError { if (_Jack3_Nonempty_PartOrSyntax_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_49() throws ParseError { if (scan_token(35)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_Nonempty_ClassSpec_Commalist()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_50() throws ParseError { if (scan_token(36)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_Nonempty_Subclass_Barlist()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_51() throws ParseError { if (_Jack3_Nonempty_Syntax_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_52() throws ParseError { if (scan_token(35)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_Nonempty_Part_Commalist()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_53() throws ParseError { if (_Jack3_Nonempty_PlainSyntax_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_54() throws ParseError { if (scan_token(TRUE)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_55() throws ParseError { if (scan_token(FALSE)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_56() throws ParseError { if (scan_token(TRUE)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_57() throws ParseError { if (scan_token(FALSE)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_58() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_59()) { scanpos = xsp; if (_Jack3_60()) { scanpos = xsp; if (_Jack3_61()) return true; if (la == 0 && scanpos == lastpos) return false; } else if (la == 0 && scanpos == lastpos) return false; } else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_59() throws ParseError { if (scan_token(DECIMAL_LITERAL)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_60() throws ParseError { if (scan_token(HEX_LITERAL)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_61() throws ParseError { if (scan_token(OCTAL_LITERAL)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_62() throws ParseError { if (scan_token(FLOATING_POINT_LITERAL)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UVertex_List() throws ParseError { if (scan_token(4)) return true; if (la == 0 && scanpos == lastpos) return false; if (scan_token(5)) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_3()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UEdge_List() throws ParseError { if (scan_token(11)) return true; if (la == 0 && scanpos == lastpos) return false; if (scan_token(5)) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_11()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Nonempty_UVertex_List() throws ParseError { if (_Jack3_UVertex()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_42()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UAltVertex() throws ParseError { if (scan_token(9)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UConstVertex() throws ParseError { if (scan_token(8)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UTerm() throws ParseError { if (scan_token(10)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_IEdge_List() throws ParseError { if (scan_token(6)) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_9()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_OEdge_List() throws ParseError { if (scan_token(7)) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_10()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Nonempty_IEdge_List() throws ParseError { if (_Jack3_UID()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_43()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Nonempty_OEdge_List() throws ParseError { if (_Jack3_UID()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_44()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Nonempty_UEdge_List() throws ParseError { if (_Jack3_UEdge()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_45()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UAltEdge() throws ParseError { if (scan_token(12)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UConstEdge() throws ParseError { if (scan_token(13)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_UEdgeName()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_Cardinality()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Upper() throws ParseError { if (scan_token(14)) return true; if (la == 0 && scanpos == lastpos) return false; if (scan_token(14)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_String()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_JavaCode() throws ParseError { if (_Jack3_String()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_DFS_mark() throws ParseError { if (scan_token(33)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_PP_mark() throws ParseError { if (scan_token(34)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_ClassName_Commalist() throws ParseError { if (_Jack3_Nonempty_ClassName_Commalist()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_ConstOrAltClass() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_21()) { scanpos = xsp; if (_Jack3_22()) return true; if (la == 0 && scanpos == lastpos) return false; } else if (la == 0 && scanpos == lastpos) return false; if (_Jack3_PartOrSyntax_List()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_ClassParents()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_RepetitionClass() throws ParseError { if (scan_token(28)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_RepeatedPart_Sandwich()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_ConstructionClass() throws ParseError { if (scan_token(25)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_AlternationClass() throws ParseError { if (scan_token(26)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_Subclass_Barlist()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_29()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Part() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_26()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; if (_Jack3_ClassSpec()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_OptionalPart() throws ParseError { if (scan_token(21)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_Part_Sandwich()) return true; if (la == 0 && scanpos == lastpos) return false; if (scan_token(22)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Syntax() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_33()) { scanpos = xsp; if (_Jack3_34()) return true; if (la == 0 && scanpos == lastpos) return false; } else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_PartName() throws ParseError { if (_Jack3_Ident()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_ClassSpec() throws ParseError { if (_Jack3_ClassName()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_31()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; xsp = scanpos; if (_Jack3_32()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_ClassSpec_Commalist() throws ParseError { if (_Jack3_Nonempty_ClassSpec_Commalist()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Common() throws ParseError { if (scan_token(27)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_PlainSyntax() throws ParseError { if (_Jack3_String()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_PrintCommand() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_35()) { scanpos = xsp; if (_Jack3_36()) { scanpos = xsp; if (_Jack3_37()) { scanpos = xsp; if (_Jack3_38()) return true; if (la == 0 && scanpos == lastpos) return false; } else if (la == 0 && scanpos == lastpos) return false; } else if (la == 0 && scanpos == lastpos) return false; } else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_PrintIndent() throws ParseError { if (scan_token(29)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_PrintUnindent() throws ParseError { if (scan_token(30)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_PrintSkip() throws ParseError { if (scan_token(31)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_PrintSpace() throws ParseError { if (scan_token(32)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Nonempty_PartOrSyntax_List() throws ParseError { if (_Jack3_PartOrSyntax()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_48()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Nonempty_Syntax_List() throws ParseError { if (_Jack3_Syntax()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_51()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Nonempty_PlainSyntax_List() throws ParseError { if (_Jack3_PlainSyntax()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_53()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Nonempty_ClassDef_DList() throws ParseError { if (_Jack3_ClassDef()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_46()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Nonempty_ClassName_Commalist() throws ParseError { if (_Jack3_ClassName()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_47()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Nonempty_ClassSpec_Commalist() throws ParseError { if (_Jack3_ClassSpec()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_49()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Nonempty_Subclass_Barlist() throws ParseError { if (_Jack3_Subclass()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_50()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Nonempty_Part_Commalist() throws ParseError { if (_Jack3_Part()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_52()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UVertex() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_4()) { scanpos = xsp; if (_Jack3_5()) { scanpos = xsp; if (_Jack3_6()) return true; if (la == 0 && scanpos == lastpos) return false; } else if (la == 0 && scanpos == lastpos) return false; } else if (la == 0 && scanpos == lastpos) return false; if (_Jack3_UID()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_UVertexName()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_Coordinates()) return true; if (la == 0 && scanpos == lastpos) return false; xsp = scanpos; if (_Jack3_7()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; xsp = scanpos; if (_Jack3_8()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UID() throws ParseError { if (_Jack3_Integer()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UEdge() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_12()) { scanpos = xsp; if (_Jack3_13()) return true; if (la == 0 && scanpos == lastpos) return false; } else if (la == 0 && scanpos == lastpos) return false; if (_Jack3_UID()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_UVertex()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_UVertex()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UEdgeName() throws ParseError { if (_Jack3_Ident()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Cardinality() throws ParseError { if (_Jack3_Lower()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_14()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_String() throws ParseError { if (scan_token(STRING_LITERAL)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_PartOrSyntax_List() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_39()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_ClassParents() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_27()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; xsp = scanpos; if (_Jack3_28()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_RepeatedPart_Sandwich() throws ParseError { if (_Jack3_Syntax_List()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_RepeatedPart()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_Syntax_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Subclass_Barlist() throws ParseError { if (_Jack3_Nonempty_Subclass_Barlist()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Part_Sandwich() throws ParseError { if (_Jack3_Syntax_List()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_Part()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_Syntax_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Ident() throws ParseError { if (scan_token(IDENTIFIER)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_ClassName() throws ParseError { if (_Jack3_Ident()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_PartOrSyntax() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_23()) { scanpos = xsp; if (_Jack3_24()) { scanpos = xsp; if (_Jack3_25()) return true; if (la == 0 && scanpos == lastpos) return false; } else if (la == 0 && scanpos == lastpos) return false; } else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_ClassDef() throws ParseError { if (_Jack3_ParamClassName()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_ClassParts()) return true; if (la == 0 && scanpos == lastpos) return false; if (scan_token(14)) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_16()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; xsp = scanpos; if (_Jack3_17()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Subclass() throws ParseError { if (_Jack3_ClassSpec()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UVertexName() throws ParseError { if (_Jack3_Ident()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Coordinates() throws ParseError { if (scan_token(15)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_X()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_Y()) return true; if (la == 0 && scanpos == lastpos) return false; if (scan_token(16)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Integer() throws ParseError { if (_Jack3_int()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Lower() throws ParseError { if (_Jack3_Integer()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Syntax_List() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_40()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_RepeatedPart() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_30()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; if (scan_token(15)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_ClassSpec_Sandwich()) return true; if (la == 0 && scanpos == lastpos) return false; if (scan_token(16)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_ParamClassName() throws ParseError { if (_Jack3_ClassName()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_18()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_ClassParts() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_19()) { scanpos = xsp; if (_Jack3_20()) return true; if (la == 0 && scanpos == lastpos) return false; } else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_X() throws ParseError { if (_Jack3_Integer()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Y() throws ParseError { if (_Jack3_Integer()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_int() throws ParseError { if (_Jack3_Number()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_ClassSpec_Sandwich() throws ParseError { if (_Jack3_Syntax_List()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_ClassSpec()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_Syntax_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Number() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_58()) { scanpos = xsp; if (_Jack3_62()) return true; if (la == 0 && scanpos == lastpos) return false; } else if (la == 0 && scanpos == lastpos) return false; return false; } }