/** Generate ParseException. */ public ParseException generateParseException() { Token errortok = token.next; int line = errortok.beginLine, column = errortok.beginColumn; String mess = (errortok.kind == 0) ? tokenImage[0] : errortok.image; return new ParseException("Parse error at line " + line + ", column " + column + ". Encountered: " + mess); }
/** Generate a ParseException with the specified message, pointing to the current token. The auto-generated Parser.generateParseException() method does not provide line number info, therefore we do this. */ ParseException createParseException( String message, Exception e ) { Token errortok = token; int line = errortok.beginLine, column = errortok.beginColumn; String mess = (errortok.kind == 0) ? tokenImage[0] : errortok.image; return new ParseException( "Parse error at line " + line + ", column " + column + " : " + message + "\u005cn" + e ); }
/** Generate a ParseException with the specified message, pointing to the current token. The auto-generated Parser.generateParseException() method does not provide line number info, therefore we do this. */ ParseException createParseException( String message, Exception e ) { Token errortok = token; int line = errortok.beginLine, column = errortok.beginColumn; String mess = (errortok.kind == 0) ? tokenImage[0] : errortok.image; return new ParseException( "Parse error at line " + line + ", column " + column + " : " + message, e ); }
final public boolean BooleanLiteral() throws ParseException { switch (jj_ntk == -1 ? jj_ntk_f() : jj_ntk) { case TRUE:{ jj_consume_token(TRUE); {if ("" != null) return true;} break; } case FALSE:{ jj_consume_token(FALSE); {if ("" != null) return false;} break; } default: jj_la1[65] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new IllegalStateException ("Missing return statement in function"); }
final public boolean BooleanLiteral() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TRUE: jj_consume_token(TRUE); {if (true) return true;} break; case FALSE: jj_consume_token(FALSE); {if (true) return false;} break; default: jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
final public boolean Line() throws ParseException { switch (jj_ntk == -1 ? jj_ntk_f() : jj_ntk) { case 0:{ jj_consume_token(0); Interpreter.debug("End of File!"); {if ("" != null) return true;} break; } default: jj_la1[0] = jj_gen; if (jj_2_1(1)) { BlockStatement(); {if ("" != null) return false;} } else { jj_consume_token(-1); throw new ParseException(); } } throw new IllegalStateException ("Missing return statement in function"); }
default: jj_consume_token(-1); throw new ParseException();
final public boolean Line() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 0: jj_consume_token(0); Interpreter.debug("End of File!"); {if (true) return true;} break; default: if (jj_2_1(1)) { BlockStatement(); {if (true) return false;} } else { jj_consume_token(-1); throw new ParseException(); } } throw new Error("Missing return statement in function"); }
default: jj_consume_token(-1); throw new ParseException();
default: jj_consume_token(-1); throw new ParseException();
default: jj_consume_token(-1); throw new ParseException();
default: jj_consume_token(-1); throw new ParseException();
default: jj_consume_token(-1); throw new ParseException();
default: jj_consume_token(-1); throw new ParseException();
default: jj_consume_token(-1); throw new ParseException();
default: jj_consume_token(-1); throw new ParseException();
default: jj_consume_token(-1); throw new ParseException();
final public void BlockStatement() throws ParseException { if (jj_2_24(2147483647)) { ClassDeclaration(); } else if (jj_2_25(2147483647)) { MethodDeclaration(); } else if (jj_2_26(2147483647)) { MethodDeclaration(); } else if (jj_2_27(2147483647)) { TypedVariableDeclaration(); jj_consume_token(SEMICOLON); } else if (jj_2_28(1)) { Statement(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPORT: case STATIC: ImportDeclaration(); break; case PACKAGE: PackageDeclaration(); break; case FORMAL_COMMENT: FormalComment(); break; default: jj_consume_token(-1); throw new ParseException(); } } }
jj_la1[76] = jj_gen; jj_consume_token(-1); throw new ParseException();
default: jj_consume_token(-1); throw new ParseException();