package uml2text; 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 UMLGraph _UMLGraph() throws ParseError { UMLGraph it; UMLVertex_List _vertices; UEdge_List _edges; it=new UMLGraph(); consume_token(1); consume_token(2); consume_token(3); _vertices = _UMLVertex_List(); it.set_vertices(_vertices); _edges = _UEdge_List(); it.set_edges(_edges); return it; } final public UMLVertex_List _UMLVertex_List() throws ParseError { UMLVertex_List it; Nonempty_UMLVertex_List _first; it=new UMLVertex_List(); consume_token(4); consume_token(5); if (_Jack2_1(1)) { _first = _Nonempty_UMLVertex_List(); it.set_first(_first); } return it; } final public UMLVertex _UMLVertex() throws ParseError { UMLVertex it; UUID _vid; UMLVertexName _vertexname; UMLCoordinates _position; IEdge_List _incoming; OEdge_List _outgoing; Decorator _vdeco; if (_Jack2_2(1)) { it = _UMLAltVertex(); } else if (_Jack2_3(1)) { it = _UMLConstVertex(); } else if (_Jack2_4(1)) { it = _UMLTerm(); } else { token_error_setup(1); throw new ParseError(); } _vid = _UUID(); it.set_vid(_vid); _vertexname = _UMLVertexName(); it.set_vertexname(_vertexname); _position = _UMLCoordinates(); it.set_position(_position); if (_Jack2_5(1)) { _incoming = _IEdge_List(); it.set_incoming(_incoming); } if (_Jack2_6(1)) { _outgoing = _OEdge_List(); it.set_outgoing(_outgoing); } if (_Jack2_7(1)) { _vdeco = _Decorator(); it.set_vdeco(_vdeco); } 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_8(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_9(1)) { _first = _Nonempty_OEdge_List(); it.set_first(_first); } return it; } final public UMLConstVertex _UMLConstVertex() throws ParseError { UMLConstVertex it; it=new UMLConstVertex(); consume_token(8); return it; } final public UMLAltVertex _UMLAltVertex() throws ParseError { UMLAltVertex it; it=new UMLAltVertex(); consume_token(9); return it; } final public UMLTerm _UMLTerm() throws ParseError { UMLTerm it; it=new UMLTerm(); 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_10(1)) { _first = _Nonempty_UEdge_List(); it.set_first(_first); } return it; } final public UMLEdge _UMLEdge() throws ParseError { UMLEdge it; UUID _eid; Decorator _edeco; UUID _fromVertex; UUID _toVertex; if (_Jack2_11(1)) { it = _UMLAltEdge(); } else if (_Jack2_12(1)) { it = _UMLConstEdge(); } else { token_error_setup(1); throw new ParseError(); } _eid = _UUID(); it.set_eid(_eid); if (_Jack2_13(1)) { _edeco = _Decorator(); it.set_edeco(_edeco); } _fromVertex = _UUID(); it.set_fromVertex(_fromVertex); _toVertex = _UUID(); it.set_toVertex(_toVertex); return it; } final public UMLAltEdge _UMLAltEdge() throws ParseError { UMLAltEdge it; it=new UMLAltEdge(); consume_token(12); return it; } final public UMLConstEdge _UMLConstEdge() throws ParseError { UMLConstEdge it; UMLEdgeName _edgename; UMLCardinality _card; it=new UMLConstEdge(); consume_token(13); _edgename = _UMLEdgeName(); it.set_edgename(_edgename); _card = _UMLCardinality(); it.set_card(_card); return it; } final public UMLCardinality _UMLCardinality() throws ParseError { UMLCardinality it; UMLLower _lower; UMLUpper _upper; it=new UMLCardinality(); _lower = _UMLLower(); it.set_lower(_lower); if (_Jack2_14(1)) { _upper = _UMLUpper(); it.set_upper(_upper); } return it; } final public UMLLower _UMLLower() throws ParseError { UMLLower it; Integer _l; it=new UMLLower(); _l = _Integer(); it.set_l(_l); return it; } final public UMLUpper _UMLUpper() throws ParseError { UMLUpper it; String _u; it=new UMLUpper(); consume_token(14); consume_token(14); _u = _String(); it.set_u(_u); return it; } final public UUID _UUID() throws ParseError { UUID it; Integer _id; it=new UUID(); _id = _Integer(); it.set_id(_id); return it; } final public UMLEdgeName _UMLEdgeName() throws ParseError { UMLEdgeName it; Ident _name; it=new UMLEdgeName(); _name = _Ident(); it.set_name(_name); return it; } final public UMLVertexName _UMLVertexName() throws ParseError { UMLVertexName it; Ident _name; it=new UMLVertexName(); _name = _Ident(); it.set_name(_name); return it; } final public UMLCoordinates _UMLCoordinates() throws ParseError { UMLCoordinates it; XX _x; YY _y; it=new UMLCoordinates(); consume_token(15); _x = _XX(); it.set_x(_x); _y = _YY(); it.set_y(_y); consume_token(16); return it; } final public XX _XX() throws ParseError { XX it; Integer _x; it=new XX(); _x = _Integer(); it.set_x(_x); return it; } final public YY _YY() throws ParseError { YY it; Integer _y; it=new YY(); _y = _Integer(); it.set_y(_y); return it; } final public Decorator _Decorator() throws ParseError { Decorator it; TravTag _tag; Attributes_PList _attributes_plist; it=new Decorator(); _tag = _TravTag(); it.set_tag(_tag); _attributes_plist = _Attributes_PList(); it.set_attributes_plist(_attributes_plist); return it; } final public Attributes _Attributes() throws ParseError { Attributes it; Integer _integer; it=new Attributes(); _integer = _Integer(); it.set_integer(_integer); return it; } final public TravTag _TravTag() throws ParseError { TravTag it; Integer _integer; it=new TravTag(); consume_token(17); _integer = _Integer(); it.set_integer(_integer); return it; } final public IndependantTraversal _IndependantTraversal() throws ParseError { IndependantTraversal it; UUID _sourceid; UUID _destid; UUID_List _bypassings; it=new IndependantTraversal(); _sourceid = _UUID(); it.set_sourceid(_sourceid); _destid = _UUID(); it.set_destid(_destid); _bypassings = _UUID_List(); it.set_bypassings(_bypassings); return it; } final public UniqueIDGenerator _UniqueIDGenerator() throws ParseError { UniqueIDGenerator it; it=new UniqueIDGenerator(); return it; } final public ReadVertexVisitor _ReadVertexVisitor() throws ParseError { ReadVertexVisitor it; UMLGraph _thegraph; String _graphstring; Integer _lookupvid; it=new ReadVertexVisitor(); _thegraph = _UMLGraph(); it.set_thegraph(_thegraph); _graphstring = _String(); it.set_graphstring(_graphstring); _lookupvid = _Integer(); it.set_lookupvid(_lookupvid); return it; } final public ReadEdgeVisitor _ReadEdgeVisitor() throws ParseError { ReadEdgeVisitor it; UMLGraph _thegraph; String _graphstring; String _commonstring; Integer _lookupvid; String _fromtype; Integer _pipeswitch; it=new ReadEdgeVisitor(); _thegraph = _UMLGraph(); it.set_thegraph(_thegraph); _graphstring = _String(); it.set_graphstring(_graphstring); _commonstring = _String(); it.set_commonstring(_commonstring); _lookupvid = _Integer(); it.set_lookupvid(_lookupvid); _fromtype = _String(); it.set_fromtype(_fromtype); _pipeswitch = _Integer(); it.set_pipeswitch(_pipeswitch); return it; } final public Main _Main() throws ParseError { Main it; it=new Main(); return it; } final public Attributes_PList _Attributes_PList() throws ParseError { Attributes_PList it; Nonempty_Attributes_PList _first; it=new Attributes_PList(); consume_token(18); if (_Jack2_15(1)) { _first = _Nonempty_Attributes_PList(); it.set_first(_first); } consume_token(19); return it; } final public UUID_List _UUID_List() throws ParseError { UUID_List it; Nonempty_UUID_List _first; it=new UUID_List(); if (_Jack2_16(1)) { _first = _Nonempty_UUID_List(); it.set_first(_first); } return it; } final public Nonempty_UMLVertex_List _Nonempty_UMLVertex_List() throws ParseError { Nonempty_UMLVertex_List it; UMLVertex _it; Nonempty_UMLVertex_List _next; it=new Nonempty_UMLVertex_List(); _it = _UMLVertex(); it.set_it(_it); if (_Jack2_17(1)) { _next = _Nonempty_UMLVertex_List(); it.set_next(_next); } return it; } final public Nonempty_IEdge_List _Nonempty_IEdge_List() throws ParseError { Nonempty_IEdge_List it; UUID _it; Nonempty_IEdge_List _next; it=new Nonempty_IEdge_List(); _it = _UUID(); it.set_it(_it); if (_Jack2_18(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; UUID _it; Nonempty_OEdge_List _next; it=new Nonempty_OEdge_List(); _it = _UUID(); it.set_it(_it); if (_Jack2_19(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; UMLEdge _it; Nonempty_UEdge_List _next; it=new Nonempty_UEdge_List(); _it = _UMLEdge(); it.set_it(_it); if (_Jack2_20(1)) { _next = _Nonempty_UEdge_List(); it.set_next(_next); } return it; } final public Nonempty_Attributes_PList _Nonempty_Attributes_PList() throws ParseError { Nonempty_Attributes_PList it; Attributes _it; Nonempty_Attributes_PList _next; it=new Nonempty_Attributes_PList(); _it = _Attributes(); it.set_it(_it); if (_Jack2_21(1)) { _next = _Nonempty_Attributes_PList(); it.set_next(_next); } return it; } final public Nonempty_UUID_List _Nonempty_UUID_List() throws ParseError { Nonempty_UUID_List it; UUID _it; Nonempty_UUID_List _next; it=new Nonempty_UUID_List(); _it = _UUID(); it.set_it(_it); if (_Jack2_22(1)) { _next = _Nonempty_UUID_List(); it.set_next(_next); } return it; } final public boolean _boolean() throws ParseError { Token t; if (_Jack2_23(1)) { t = consume_token(TRUE); return true; } else if (_Jack2_24(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_25(1)) { t = consume_token(TRUE); return Boolean.TRUE; } else if (_Jack2_26(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_27(1)) { if (_Jack2_28(1)) { t = consume_token(DECIMAL_LITERAL); s = t.image; radix = 10; } else if (_Jack2_29(1)) { t = consume_token(HEX_LITERAL); s = t.image.substring(2, t.image.length()); radix = 16; } else if (_Jack2_30(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_31(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 _Jack3_1() throws ParseError { if (_Jack3_Nonempty_UMLVertex_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_2() throws ParseError { if (_Jack3_UMLAltVertex()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_3() throws ParseError { if (_Jack3_UMLConstVertex()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_4() throws ParseError { if (_Jack3_UMLTerm()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_5() throws ParseError { if (_Jack3_IEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_6() throws ParseError { if (_Jack3_OEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_7() throws ParseError { if (_Jack3_Decorator()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_8() throws ParseError { if (_Jack3_Nonempty_IEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_9() throws ParseError { if (_Jack3_Nonempty_OEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_10() throws ParseError { if (_Jack3_Nonempty_UEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_11() throws ParseError { if (_Jack3_UMLAltEdge()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_12() throws ParseError { if (_Jack3_UMLConstEdge()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_13() throws ParseError { if (_Jack3_Decorator()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_14() throws ParseError { if (_Jack3_UMLUpper()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_15() throws ParseError { if (_Jack3_Nonempty_Attributes_PList()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_16() throws ParseError { if (_Jack3_Nonempty_UUID_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_17() throws ParseError { if (_Jack3_Nonempty_UMLVertex_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_18() throws ParseError { if (_Jack3_Nonempty_IEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_19() throws ParseError { if (_Jack3_Nonempty_OEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_20() throws ParseError { if (_Jack3_Nonempty_UEdge_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_21() throws ParseError { if (_Jack3_Nonempty_Attributes_PList()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_22() throws ParseError { if (_Jack3_Nonempty_UUID_List()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_23() throws ParseError { if (scan_token(TRUE)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_24() throws ParseError { if (scan_token(FALSE)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_25() throws ParseError { if (scan_token(TRUE)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_26() throws ParseError { if (scan_token(FALSE)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_27() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_28()) { scanpos = xsp; if (_Jack3_29()) { scanpos = xsp; if (_Jack3_30()) 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_28() throws ParseError { if (scan_token(DECIMAL_LITERAL)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_29() throws ParseError { if (scan_token(HEX_LITERAL)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_30() throws ParseError { if (scan_token(OCTAL_LITERAL)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_31() throws ParseError { if (scan_token(FLOATING_POINT_LITERAL)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Nonempty_UMLVertex_List() throws ParseError { if (_Jack3_UMLVertex()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_17()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UMLAltVertex() throws ParseError { if (scan_token(9)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UMLConstVertex() throws ParseError { if (scan_token(8)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UMLTerm() 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_8()) 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_9()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Decorator() throws ParseError { if (_Jack3_TravTag()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_Attributes_PList()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Nonempty_IEdge_List() throws ParseError { if (_Jack3_UUID()) 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_Nonempty_OEdge_List() throws ParseError { if (_Jack3_UUID()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_19()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Nonempty_UEdge_List() throws ParseError { if (_Jack3_UMLEdge()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_20()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UMLAltEdge() throws ParseError { if (scan_token(12)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UMLConstEdge() throws ParseError { if (scan_token(13)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_UMLEdgeName()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_UMLCardinality()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UMLUpper() 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_Nonempty_Attributes_PList() throws ParseError { if (_Jack3_Attributes()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_21()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Nonempty_UUID_List() throws ParseError { if (_Jack3_UUID()) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_22()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UMLVertex() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_2()) { scanpos = xsp; if (_Jack3_3()) { scanpos = xsp; if (_Jack3_4()) 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_UUID()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_UMLVertexName()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_UMLCoordinates()) return true; if (la == 0 && scanpos == lastpos) return false; xsp = scanpos; if (_Jack3_5()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; xsp = scanpos; if (_Jack3_6()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; xsp = scanpos; if (_Jack3_7()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_TravTag() throws ParseError { if (scan_token(17)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_Integer()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_Attributes_PList() throws ParseError { if (scan_token(18)) return true; if (la == 0 && scanpos == lastpos) return false; Token xsp; xsp = scanpos; if (_Jack3_15()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; if (scan_token(19)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UUID() throws ParseError { if (_Jack3_Integer()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UMLEdge() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_11()) { scanpos = xsp; if (_Jack3_12()) return true; if (la == 0 && scanpos == lastpos) return false; } else if (la == 0 && scanpos == lastpos) return false; if (_Jack3_UUID()) return true; if (la == 0 && scanpos == lastpos) return false; xsp = scanpos; if (_Jack3_13()) scanpos = xsp; else if (la == 0 && scanpos == lastpos) return false; if (_Jack3_UUID()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_UUID()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UMLEdgeName() throws ParseError { if (_Jack3_Ident()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UMLCardinality() throws ParseError { if (_Jack3_UMLLower()) 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_Attributes() throws ParseError { if (_Jack3_Integer()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UMLVertexName() throws ParseError { if (_Jack3_Ident()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UMLCoordinates() throws ParseError { if (scan_token(15)) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_XX()) return true; if (la == 0 && scanpos == lastpos) return false; if (_Jack3_YY()) 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_Ident() throws ParseError { if (scan_token(IDENTIFIER)) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_UMLLower() throws ParseError { if (_Jack3_Integer()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_XX() throws ParseError { if (_Jack3_Integer()) return true; if (la == 0 && scanpos == lastpos) return false; return false; } final private boolean _Jack3_YY() 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_Number() throws ParseError { Token xsp; xsp = scanpos; if (_Jack3_27()) { scanpos = xsp; if (_Jack3_31()) return true; if (la == 0 && scanpos == lastpos) return false; } else if (la == 0 && scanpos == lastpos) return false; return false; } }