From: kpouer Date: Fri, 4 Apr 2003 14:59:53 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.phpeclipse.com *** empty log message *** --- diff --git a/net.sourceforge.phpeclipse/src/test/PHPParser.java b/net.sourceforge.phpeclipse/src/test/PHPParser.java index ce9e3fa..931b4b3 100644 --- a/net.sourceforge.phpeclipse/src/test/PHPParser.java +++ b/net.sourceforge.phpeclipse/src/test/PHPParser.java @@ -9,6 +9,7 @@ import org.eclipse.jface.preference.IPreferenceStore; import java.util.Hashtable; import java.io.StringReader; +import java.io.*; import java.text.MessageFormat; import net.sourceforge.phpeclipse.actions.PHPStartApacheAction; @@ -69,6 +70,21 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon phpTest(); } + public static final void htmlParserTester(final File fileName) throws CoreException, ParseException { + try { + final Reader stream = new FileReader(fileName); + if (jj_input_stream == null) { + jj_input_stream = new SimpleCharStream(stream, 1, 1); + } + ReInit(stream); + phpFile(); + } catch (FileNotFoundException e) { + e.printStackTrace(); //To change body of catch statement use Options | File Templates. + } catch (ParseException e) { + e.printStackTrace(); //To change body of catch statement use Options | File Templates. + } + } + public static final void htmlParserTester(final String strEval) throws CoreException, ParseException { final StringReader stream = new StringReader(strEval); if (jj_input_stream == null) { @@ -103,6 +119,8 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon if (errorMessage == null) { PHPeclipsePlugin.log(e); errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it"; + errorStart = jj_input_stream.getPosition(); + errorEnd = errorStart + 1; } setMarker(e); errorMessage = null; @@ -313,7 +331,7 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon } static final public void PhpBlock() throws ParseException { - final int start = jj_input_stream.bufpos; + final int start = jj_input_stream.getPosition(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PHPECHOSTART: jj_consume_token(PHPECHOSTART); @@ -385,7 +403,7 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon setMarker(fileToParse, "You should use '' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } break; @@ -479,11 +499,13 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon final int pos; jj_consume_token(CLASS); try { - pos = jj_input_stream.bufpos; + pos = jj_input_stream.getPosition(); className = jj_consume_token(IDENTIFIER); } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -494,6 +516,8 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } break; @@ -516,8 +540,10 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon try { jj_consume_token(LBRACE); } catch (ParseException e) { - errorMessage = "'{' expected"; + errorMessage = "unexpected token : '"+ e.currentToken.next.image + "', '{' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } label_3: @@ -536,8 +562,10 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon try { jj_consume_token(RBRACE); } catch (ParseException e) { - errorMessage = "'var', 'function' or '}' expected"; + errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', 'var', 'function' or '}' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } } @@ -585,14 +613,16 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon } catch (ParseException e) { errorMessage = "';' expected after variable declaration"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } } static final public PHPVarDeclaration VariableDeclarator() throws ParseException { final String varName; - String varValue; - final int pos = jj_input_stream.bufpos; + final String varValue; + final int pos = jj_input_stream.getPosition(); varName = VariableDeclaratorId(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGN: @@ -603,6 +633,8 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon } catch (ParseException e) { errorMessage = "Literal expression expected in variable initializer"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } break; @@ -634,6 +666,8 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon } catch (ParseException e) { errorMessage = "'$' expected for variable identifier"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } throw new Error("Missing return statement in function"); @@ -707,24 +741,10 @@ final Token token; break; case DOLLAR_ID: token = jj_consume_token(DOLLAR_ID); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENTIFIER: - case LBRACE: - case DOLLAR: - case DOLLAR_ID: - expr = VariableName(); - break; - default: - jj_la1[14] = jj_gen; - ; - } - if (expr == null) { - {if (true) return token.image;} - } - {if (true) return token.image + expr;} + {if (true) return token.image + expr;} break; default: - jj_la1[15] = jj_gen; + jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -754,7 +774,7 @@ final Token token; token = jj_consume_token(FLOATING_POINT_LITERAL); break; default: - jj_la1[16] = jj_gen; + jj_la1[15] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -770,7 +790,7 @@ final Token token; token = jj_consume_token(FLOATING_POINT_LITERAL); break; default: - jj_la1[17] = jj_gen; + jj_la1[16] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -785,7 +805,7 @@ final Token token; {if (true) return token.image;} break; default: - jj_la1[18] = jj_gen; + jj_la1[17] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -804,7 +824,7 @@ final StringBuffer buff = new StringBuffer(); buff.append("=>").append(expr); break; default: - jj_la1[19] = jj_gen; + jj_la1[18] = jj_gen; ; } {if (true) return buff.toString();} @@ -852,7 +872,7 @@ final StringBuffer buff = new StringBuffer("("); } break; default: - jj_la1[20] = jj_gen; + jj_la1[19] = jj_gen; ; } jj_consume_token(RPAREN); @@ -872,6 +892,8 @@ final StringBuffer buff = new StringBuffer("("); } errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } if (currentSegment != null) { @@ -884,18 +906,22 @@ final StringBuffer buff = new StringBuffer("("); } } +/** + * A MethodDeclarator contains [&] IDENTIFIER(parameters ...). + * @return a function description for the outline + */ static final public PHPFunctionDeclaration MethodDeclarator() throws ParseException { final Token identifier; final StringBuffer methodDeclaration = new StringBuffer(); final String formalParameters; - final int pos = jj_input_stream.bufpos; + final int pos = jj_input_stream.getPosition(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_AND: jj_consume_token(BIT_AND); methodDeclaration.append("&"); break; default: - jj_la1[21] = jj_gen; + jj_la1[20] = jj_gen; ; } identifier = jj_consume_token(IDENTIFIER); @@ -914,7 +940,9 @@ final StringBuffer buff = new StringBuffer("("); } catch (ParseException e) { errorMessage = "Formal parameter expected after function identifier"; errorLevel = ERROR; - jj_consume_token(token.kind); + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; + {if (true) throw e;} } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: @@ -929,7 +957,7 @@ final StringBuffer buff = new StringBuffer("("); ; break; default: - jj_la1[22] = jj_gen; + jj_la1[21] = jj_gen; break label_7; } jj_consume_token(COMMA); @@ -938,7 +966,7 @@ final StringBuffer buff = new StringBuffer("("); } break; default: - jj_la1[23] = jj_gen; + jj_la1[22] = jj_gen; ; } try { @@ -946,6 +974,8 @@ final StringBuffer buff = new StringBuffer("("); } catch (ParseException e) { errorMessage = "')' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } buff.append(")"); @@ -962,7 +992,7 @@ final StringBuffer buff = new StringBuffer("("); buff.append("&"); break; default: - jj_la1[24] = jj_gen; + jj_la1[23] = jj_gen; ; } variableDeclaration = VariableDeclarator(); @@ -1010,7 +1040,7 @@ final StringBuffer buff = new StringBuffer("("); {if (true) return "object";} break; default: - jj_la1[25] = jj_gen; + jj_la1[24] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1071,17 +1101,19 @@ final StringBuffer buff = new StringBuffer("("); } catch (ParseException e) { errorMessage = "expression expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } break; default: - jj_la1[26] = jj_gen; + jj_la1[25] = jj_gen; ; } {if (true) return expr;} break; default: - jj_la1[27] = jj_gen; + jj_la1[26] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1143,7 +1175,7 @@ final StringBuffer buff = new StringBuffer("("); {if (true) return "~=";} break; default: - jj_la1[28] = jj_gen; + jj_la1[27] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1163,7 +1195,7 @@ final StringBuffer buff = new StringBuffer("("); expr3 = ConditionalExpression(); break; default: - jj_la1[29] = jj_gen; + jj_la1[28] = jj_gen; ; } if (expr3 == null) { @@ -1188,7 +1220,7 @@ final StringBuffer buff = new StringBuffer("("); ; break; default: - jj_la1[30] = jj_gen; + jj_la1[29] = jj_gen; break label_8; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -1199,7 +1231,7 @@ final StringBuffer buff = new StringBuffer("("); operator = jj_consume_token(_ORL); break; default: - jj_la1[31] = jj_gen; + jj_la1[30] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1225,7 +1257,7 @@ final StringBuffer buff = new StringBuffer("("); ; break; default: - jj_la1[32] = jj_gen; + jj_la1[31] = jj_gen; break label_9; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -1236,7 +1268,7 @@ final StringBuffer buff = new StringBuffer("("); operator = jj_consume_token(_ANDL); break; default: - jj_la1[33] = jj_gen; + jj_la1[32] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1260,7 +1292,7 @@ final StringBuffer buff = new StringBuffer("("); ; break; default: - jj_la1[34] = jj_gen; + jj_la1[33] = jj_gen; break label_10; } jj_consume_token(DOT); @@ -1283,7 +1315,7 @@ final StringBuffer buff = new StringBuffer("("); ; break; default: - jj_la1[35] = jj_gen; + jj_la1[34] = jj_gen; break label_11; } jj_consume_token(BIT_OR); @@ -1306,7 +1338,7 @@ final StringBuffer buff = new StringBuffer("("); ; break; default: - jj_la1[36] = jj_gen; + jj_la1[35] = jj_gen; break label_12; } jj_consume_token(XOR); @@ -1330,7 +1362,7 @@ final StringBuffer buff = new StringBuffer("("); ; break; default: - jj_la1[37] = jj_gen; + jj_la1[36] = jj_gen; break label_13; } jj_consume_token(BIT_AND); @@ -1358,7 +1390,7 @@ final StringBuffer buff = new StringBuffer("("); ; break; default: - jj_la1[38] = jj_gen; + jj_la1[37] = jj_gen; break label_14; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -1378,7 +1410,7 @@ final StringBuffer buff = new StringBuffer("("); operator = jj_consume_token(TRIPLEEQUAL); break; default: - jj_la1[39] = jj_gen; + jj_la1[38] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1387,6 +1419,8 @@ final StringBuffer buff = new StringBuffer("("); } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected after '"+operator.image+"'"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } buff.append(operator.image); @@ -1412,7 +1446,7 @@ final StringBuffer buff = new StringBuffer("("); ; break; default: - jj_la1[40] = jj_gen; + jj_la1[39] = jj_gen; break label_15; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -1429,7 +1463,7 @@ final StringBuffer buff = new StringBuffer("("); operator = jj_consume_token(GE); break; default: - jj_la1[41] = jj_gen; + jj_la1[40] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1455,7 +1489,7 @@ final StringBuffer buff = new StringBuffer("("); ; break; default: - jj_la1[42] = jj_gen; + jj_la1[41] = jj_gen; break label_16; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -1469,7 +1503,7 @@ final StringBuffer buff = new StringBuffer("("); operator = jj_consume_token(RUNSIGNEDSHIFT); break; default: - jj_la1[43] = jj_gen; + jj_la1[42] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1495,7 +1529,7 @@ final StringBuffer buff = new StringBuffer("("); ; break; default: - jj_la1[44] = jj_gen; + jj_la1[43] = jj_gen; break label_17; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -1506,7 +1540,7 @@ final StringBuffer buff = new StringBuffer("("); operator = jj_consume_token(MINUS); break; default: - jj_la1[45] = jj_gen; + jj_la1[44] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1522,7 +1556,15 @@ final StringBuffer buff = new StringBuffer("("); String expr; Token operator; final StringBuffer buff = new StringBuffer(); - expr = UnaryExpression(); + try { + expr = UnaryExpression(); + } catch (ParseException e) { + errorMessage = "unexpected token '"+e.currentToken.next.image+"'"; + errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; + {if (true) throw e;} + } buff.append(expr); label_18: while (true) { @@ -1533,7 +1575,7 @@ final StringBuffer buff = new StringBuffer("("); ; break; default: - jj_la1[46] = jj_gen; + jj_la1[45] = jj_gen; break label_18; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -1547,7 +1589,7 @@ final StringBuffer buff = new StringBuffer("("); operator = jj_consume_token(REM); break; default: - jj_la1[47] = jj_gen; + jj_la1[46] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1600,7 +1642,7 @@ final StringBuffer buff = new StringBuffer("("); ; break; default: - jj_la1[48] = jj_gen; + jj_la1[47] = jj_gen; break label_19; } jj_consume_token(AT); @@ -1610,7 +1652,7 @@ final StringBuffer buff = new StringBuffer("("); {if (true) return buff.append(expr).toString();} break; default: - jj_la1[49] = jj_gen; + jj_la1[48] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1631,7 +1673,7 @@ final StringBuffer buff = new StringBuffer("("); token = jj_consume_token(MINUS); break; default: - jj_la1[50] = jj_gen; + jj_la1[49] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1663,7 +1705,7 @@ final StringBuffer buff = new StringBuffer("("); {if (true) return expr;} break; default: - jj_la1[51] = jj_gen; + jj_la1[50] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1695,7 +1737,7 @@ final String expr; {if (true) return "!" + expr;} break; default: - jj_la1[52] = jj_gen; + jj_la1[51] = jj_gen; if (jj_2_3(2147483647)) { expr = CastExpression(); {if (true) return expr;} @@ -1726,12 +1768,14 @@ final String expr; } catch (ParseException e) { errorMessage = "')' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } {if (true) return "("+expr+")";} break; default: - jj_la1[53] = jj_gen; + jj_la1[52] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1765,13 +1809,13 @@ final String type, expr; operator = jj_consume_token(DECR); break; default: - jj_la1[54] = jj_gen; + jj_la1[53] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: - jj_la1[55] = jj_gen; + jj_la1[54] = jj_gen; ; } if (operator == null) { @@ -1799,7 +1843,7 @@ final String type, expr; ; break; default: - jj_la1[56] = jj_gen; + jj_la1[55] = jj_gen; break label_20; } expr = PrimarySuffix(); @@ -1823,7 +1867,7 @@ final String type, expr; ; break; default: - jj_la1[57] = jj_gen; + jj_la1[56] = jj_gen; break label_21; } expr = PrimarySuffix(); @@ -1836,7 +1880,7 @@ final String type, expr; {if (true) return "array" + expr;} break; default: - jj_la1[58] = jj_gen; + jj_la1[57] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1871,13 +1915,36 @@ final String type, expr; {if (true) return expr;} break; default: - jj_la1[59] = jj_gen; + jj_la1[58] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); } + static final public String classInstantiation() throws ParseException { + String expr; + final StringBuffer buff = new StringBuffer("new "); + jj_consume_token(NEW); + expr = ClassIdentifier(); + buff.append(expr); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ARRAY: + case NEW: + case IDENTIFIER: + case DOLLAR: + case DOLLAR_ID: + expr = PrimaryExpression(); + buff.append(expr); + break; + default: + jj_la1[59] = jj_gen; + ; + } + {if (true) return buff.toString();} + throw new Error("Missing return statement in function"); + } + static final public String ClassIdentifier() throws ParseException { final String expr; final Token token; @@ -1929,6 +1996,8 @@ final String type, expr; } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } {if (true) return "->" + expr;} @@ -1968,6 +2037,8 @@ final String type, expr; } catch (ParseException e) { errorMessage = "']' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } if(expr == null) { @@ -2076,6 +2147,8 @@ String expr = null; } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } if (expr == null) { @@ -2106,6 +2179,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "expression expected after a comma in argument list"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } buff.append(",").append(expr); @@ -2137,6 +2212,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "';' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } } else if (jj_2_6(2)) { @@ -2162,6 +2239,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "';' expected after expression"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } break; @@ -2278,7 +2357,7 @@ final StringBuffer buff = new StringBuffer(); static final public void IncludeStatement() throws ParseException { final String expr; - final int pos = jj_input_stream.bufpos; + final int pos = jj_input_stream.getPosition(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case REQUIRE: jj_consume_token(REQUIRE); @@ -2303,6 +2382,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "';' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } break; @@ -2329,6 +2410,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "';' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } break; @@ -2355,6 +2438,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "';' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } break; @@ -2381,6 +2466,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "';' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } break; @@ -2410,6 +2497,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -2429,6 +2518,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } expr = VariableDeclaratorId(); @@ -2444,6 +2535,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -2493,6 +2586,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "';' expected after 'echo' statement"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } } @@ -2530,6 +2625,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "';' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } } @@ -2567,6 +2664,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "';' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } } @@ -2583,6 +2682,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "'{' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } label_26: @@ -2642,6 +2743,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } } @@ -2874,6 +2977,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "'(' expected after 'switch'"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } Expression(); @@ -2882,6 +2987,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "')' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } try { @@ -2889,6 +2996,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "'{' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } label_28: @@ -2979,6 +3088,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "'}' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } } @@ -3019,6 +3130,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "';' expected after 'break' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } {if (true) return token;} @@ -3036,6 +3149,8 @@ final StringBuffer buff = new StringBuffer(); if (errorMessage != null) {if (true) throw e;} errorMessage = "expression expected after 'case' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } try { @@ -3043,6 +3158,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "':' expected after case expression"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } {if (true) return token.beginLine;} @@ -3054,6 +3171,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "':' expected after 'default' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } {if (true) return token.beginLine;} @@ -3068,7 +3187,7 @@ final StringBuffer buff = new StringBuffer(); static final public void IfStatement() throws ParseException { final Token token; - final int pos = jj_input_stream.bufpos; + final int pos = jj_input_stream.getPosition(); token = jj_consume_token(IF); Condition("if"); IfStatement0(pos,pos+token.image.length()); @@ -3080,7 +3199,9 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "'(' expected after " + keyword + " keyword"; errorLevel = ERROR; - {if (true) throw e;} + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length(); + errorEnd = errorStart +1; + processParseException(e); } Expression(); try { @@ -3088,6 +3209,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "')' expected after " + keyword + " keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } } @@ -3181,6 +3304,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "'endif' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } try { @@ -3188,6 +3313,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "';' expected after 'endif' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } break; @@ -3379,7 +3506,7 @@ final StringBuffer buff = new StringBuffer(); static final public void WhileStatement() throws ParseException { final Token token; - final int pos = jj_input_stream.bufpos; + final int pos = jj_input_stream.getPosition(); token = jj_consume_token(WHILE); Condition("while"); WhileStatement0(pos,pos + token.image.length()); @@ -3454,6 +3581,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "'endwhile' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } try { @@ -3473,6 +3602,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "';' expected after 'endwhile' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } break; @@ -3546,6 +3677,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "';' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } } @@ -3557,6 +3690,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "'(' expected after 'foreach' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } try { @@ -3564,6 +3699,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "variable expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -3580,6 +3717,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "'as' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } try { @@ -3587,6 +3726,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "variable expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -3603,6 +3744,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "')' expected after 'foreach' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } try { @@ -3611,19 +3754,23 @@ final StringBuffer buff = new StringBuffer(); if (errorMessage != null) {if (true) throw e;} errorMessage = "statement expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } } static final public void ForStatement() throws ParseException { final Token token; -final int pos = jj_input_stream.bufpos; +final int pos = jj_input_stream.getPosition(); token = jj_consume_token(FOR); try { jj_consume_token(LPAREN); } catch (ParseException e) { errorMessage = "'(' expected after 'for' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -3794,6 +3941,8 @@ final int pos = jj_input_stream.bufpos; } catch (ParseException e) { errorMessage = "'endfor' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } try { @@ -3801,6 +3950,8 @@ final int pos = jj_input_stream.bufpos; } catch (ParseException e) { errorMessage = "';' expected after 'endfor' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } break; @@ -3865,6 +4016,8 @@ final int pos = jj_input_stream.bufpos; } catch (ParseException e) { errorMessage = "';' expected after 'continue' statement"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } } @@ -3904,6 +4057,8 @@ final int pos = jj_input_stream.bufpos; } catch (ParseException e) { errorMessage = "';' expected after 'return' statement"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } } @@ -3957,250 +4112,6 @@ final int pos = jj_input_stream.bufpos; return retval; } - static final private boolean jj_3R_107() { - if (jj_3R_111()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_112()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - static final private boolean jj_3_1() { - if (jj_3R_38()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_170() { - if (jj_3R_175()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_68() { - if (jj_3R_77()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3_1()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - static final private boolean jj_3R_169() { - if (jj_3R_174()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_168() { - if (jj_scan_token(STRING_LITERAL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_108() { - if (jj_scan_token(BIT_OR)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_107()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_69() { - if (jj_scan_token(ASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_41()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_167() { - if (jj_scan_token(FLOATING_POINT_LITERAL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_100() { - if (jj_3R_107()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_108()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - static final private boolean jj_3R_61() { - if (jj_scan_token(COMMA)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_60()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_163() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_166()) { - jj_scanpos = xsp; - if (jj_3R_167()) { - jj_scanpos = xsp; - if (jj_3R_168()) { - jj_scanpos = xsp; - if (jj_3R_169()) { - jj_scanpos = xsp; - if (jj_3R_170()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_166() { - if (jj_scan_token(INTEGER_LITERAL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_103() { - if (jj_scan_token(_ANDL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_63() { - if (jj_3R_41()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_101() { - if (jj_scan_token(DOT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_100()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_95() { - if (jj_3R_100()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_101()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - static final private boolean jj_3R_60() { - if (jj_3R_68()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_69()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_47() { - if (jj_scan_token(LBRACKET)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_63()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(RBRACKET)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_98() { - if (jj_scan_token(_ORL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3_7() { - if (jj_3R_45()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_45() { - if (jj_3R_60()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_61()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - static final private boolean jj_3R_102() { - if (jj_scan_token(SC_AND)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_96() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_102()) { - jj_scanpos = xsp; - if (jj_3R_103()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_95()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_78() { - if (jj_3R_95()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_96()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - static final private boolean jj_3R_46() { - if (jj_scan_token(CLASSACCESS)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_62()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_38() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_46()) { - jj_scanpos = xsp; - if (jj_3R_47()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3R_75() { if (jj_scan_token(HOOK)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -4213,29 +4124,6 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_189() { - if (jj_3R_38()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_188() { - if (jj_3R_192()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_184() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_188()) { - jj_scanpos = xsp; - if (jj_3R_189()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3R_97() { if (jj_scan_token(SC_OR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -4267,31 +4155,50 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_191() { + static final private boolean jj_3R_177() { if (jj_3R_68()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_190() { + static final private boolean jj_3R_176() { + if (jj_scan_token(NEW)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_185()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_179() { + if (jj_scan_token(DECR)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_175() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_186() { + static final private boolean jj_3R_170() { Token xsp; xsp = jj_scanpos; - if (jj_3R_190()) { + if (jj_3R_175()) { jj_scanpos = xsp; - if (jj_3R_191()) return true; + if (jj_3R_176()) { + jj_scanpos = xsp; + if (jj_3R_177()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_178() { - if (jj_3R_68()) return true; + static final private boolean jj_3R_106() { + if (jj_scan_token(ASSIGN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_41()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -4306,50 +4213,45 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_177() { - if (jj_scan_token(NEW)) return true; + static final private boolean jj_3R_171() { + if (jj_scan_token(ARRAY)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_186()) return true; + if (jj_3R_184()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_180() { - if (jj_scan_token(DECR)) return true; + static final private boolean jj_3R_92() { + if (jj_scan_token(TILDEEQUAL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_176() { - if (jj_scan_token(IDENTIFIER)) return true; + static final private boolean jj_3R_178() { + if (jj_scan_token(INCR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_171() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_176()) { - jj_scanpos = xsp; - if (jj_3R_177()) { - jj_scanpos = xsp; - if (jj_3R_178()) return true; + static final private boolean jj_3R_164() { + if (jj_3R_171()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_44() { - if (jj_scan_token(IDENTIFIER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(COLON)) return true; + static final private boolean jj_3R_172() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_178()) { + jj_scanpos = xsp; + if (jj_3R_179()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_92() { - if (jj_scan_token(TILDEEQUAL)) return true; + static final private boolean jj_3R_182() { + if (jj_3R_183()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -4366,11 +4268,15 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_172() { - if (jj_scan_token(ARRAY)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_185()) return true; + static final private boolean jj_3R_163() { + if (jj_3R_170()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_182()) { jj_scanpos = xsp; break; } + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } return false; } @@ -4386,43 +4292,34 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_87() { - if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true; + static final private boolean jj_3R_105() { + if (jj_scan_token(COMMA)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_86() { - if (jj_scan_token(LSHIFTASSIGN)) return true; + if (jj_3R_68()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_179() { - if (jj_scan_token(INCR)) return true; + static final private boolean jj_3R_186() { + if (jj_3R_183()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_165() { - if (jj_3R_172()) return true; + static final private boolean jj_3R_87() { + if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_173() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_179()) { - jj_scanpos = xsp; - if (jj_3R_180()) return true; + static final private boolean jj_3R_86() { + if (jj_scan_token(LSHIFTASSIGN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_183() { - if (jj_3R_184()) return true; + static final private boolean jj_3R_104() { + if (jj_3R_68()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -4433,38 +4330,50 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_84() { - if (jj_scan_token(PLUSASSIGN)) return true; + static final private boolean jj_3_4() { + if (jj_scan_token(IDENTIFIER)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_164() { - if (jj_3R_171()) return true; + if (jj_scan_token(STATICCLASSACCESS)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_185()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_183()) { jj_scanpos = xsp; break; } + if (jj_3R_186()) { jj_scanpos = xsp; break; } if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } return false; } - static final private boolean jj_3R_83() { - if (jj_scan_token(REMASSIGN)) return true; + static final private boolean jj_3R_159() { + Token xsp; + xsp = jj_scanpos; + if (jj_3_4()) { + jj_scanpos = xsp; + if (jj_3R_163()) { + jj_scanpos = xsp; + if (jj_3R_164()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_82() { - if (jj_scan_token(SLASHASSIGN)) return true; + static final private boolean jj_3R_84() { + if (jj_scan_token(PLUSASSIGN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_187() { - if (jj_3R_184()) return true; + static final private boolean jj_3R_83() { + if (jj_scan_token(REMASSIGN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_82() { + if (jj_scan_token(SLASHASSIGN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -4525,33 +4434,41 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3_4() { - if (jj_scan_token(IDENTIFIER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(STATICCLASSACCESS)) return true; + static final private boolean jj_3R_65() { + if (jj_scan_token(LIST)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_186()) return true; + if (jj_scan_token(LPAREN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_187()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } + xsp = jj_scanpos; + if (jj_3R_104()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + xsp = jj_scanpos; + if (jj_3R_105()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(RPAREN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + xsp = jj_scanpos; + if (jj_3R_106()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_160() { + static final private boolean jj_3R_161() { + if (jj_3R_159()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; Token xsp; xsp = jj_scanpos; - if (jj_3_4()) { - jj_scanpos = xsp; - if (jj_3R_164()) { - jj_scanpos = xsp; - if (jj_3R_165()) return true; + if (jj_3R_172()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_64() { + if (jj_scan_token(PRINT)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_41()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -4563,10 +4480,14 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_106() { - if (jj_scan_token(ASSIGN)) return true; + static final private boolean jj_3R_160() { + if (jj_scan_token(LPAREN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_41()) return true; + if (jj_3R_40()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(RPAREN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_134()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -4581,16 +4502,6 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_162() { - if (jj_3R_160()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_173()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3R_58() { if (jj_3R_65()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -4617,22 +4528,22 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_161() { + static final private boolean jj_3_3() { if (jj_scan_token(LPAREN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_40()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(RPAREN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_135()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_105() { - if (jj_scan_token(COMMA)) return true; + static final private boolean jj_3R_158() { + if (jj_scan_token(LPAREN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_68()) return true; + if (jj_3R_41()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(RPAREN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -4643,8 +4554,8 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_104() { - if (jj_3R_68()) return true; + static final private boolean jj_3R_157() { + if (jj_3R_162()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -4655,18 +4566,20 @@ final int pos = jj_input_stream.bufpos; return false; } + static final private boolean jj_3R_156() { + if (jj_3R_161()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + static final private boolean jj_3R_54() { if (jj_scan_token(INT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3_3() { - if (jj_scan_token(LPAREN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_40()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(RPAREN)) return true; + static final private boolean jj_3R_155() { + if (jj_3R_160()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -4677,45 +4590,37 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_159() { - if (jj_scan_token(LPAREN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_41()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(RPAREN)) return true; + static final private boolean jj_3R_153() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_154()) { + jj_scanpos = xsp; + if (jj_3R_155()) { + jj_scanpos = xsp; + if (jj_3R_156()) { + jj_scanpos = xsp; + if (jj_3R_157()) { + jj_scanpos = xsp; + if (jj_3R_158()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_52() { - if (jj_scan_token(DOUBLE)) return true; + static final private boolean jj_3R_154() { + if (jj_scan_token(BANG)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_158() { - if (jj_3R_163()) return true; + if (jj_3R_134()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_65() { - if (jj_scan_token(LIST)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(LPAREN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_104()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_105()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(RPAREN)) return true; + static final private boolean jj_3R_52() { + if (jj_scan_token(DOUBLE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_106()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -4725,54 +4630,22 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_157() { - if (jj_3R_162()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3R_50() { if (jj_scan_token(BOOLEAN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_156() { - if (jj_3R_161()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_49() { - if (jj_scan_token(BOOL)) return true; + static final private boolean jj_3R_152() { + if (jj_scan_token(DECR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_154() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_155()) { - jj_scanpos = xsp; - if (jj_3R_156()) { - jj_scanpos = xsp; - if (jj_3R_157()) { - jj_scanpos = xsp; - if (jj_3R_158()) { - jj_scanpos = xsp; if (jj_3R_159()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_155() { - if (jj_scan_token(BANG)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_135()) return true; + static final private boolean jj_3R_49() { + if (jj_scan_token(BOOL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -4815,76 +4688,60 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_64() { - if (jj_scan_token(PRINT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_41()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_153() { - if (jj_scan_token(DECR)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_160()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_152() { + static final private boolean jj_3R_151() { if (jj_scan_token(INCR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_160()) return true; + if (jj_3R_159()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_151() { + static final private boolean jj_3R_150() { if (jj_scan_token(MINUS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_149() { - if (jj_3R_154()) return true; + static final private boolean jj_3R_148() { + if (jj_3R_153()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_148() { - if (jj_3R_153()) return true; + static final private boolean jj_3R_147() { + if (jj_3R_152()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_143() { + static final private boolean jj_3R_142() { if (jj_scan_token(REM)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_147() { - if (jj_3R_152()) return true; + static final private boolean jj_3R_146() { + if (jj_3R_151()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_150() { + static final private boolean jj_3R_149() { if (jj_scan_token(PLUS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_144() { + static final private boolean jj_3R_143() { Token xsp; xsp = jj_scanpos; + if (jj_3R_145()) { + jj_scanpos = xsp; if (jj_3R_146()) { jj_scanpos = xsp; if (jj_3R_147()) { jj_scanpos = xsp; - if (jj_3R_148()) { - jj_scanpos = xsp; - if (jj_3R_149()) return true; + if (jj_3R_148()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -4892,430 +4749,549 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_146() { + static final private boolean jj_3R_145() { Token xsp; xsp = jj_scanpos; - if (jj_3R_150()) { + if (jj_3R_149()) { jj_scanpos = xsp; - if (jj_3R_151()) return true; + if (jj_3R_150()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_135()) return true; + if (jj_3R_134()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_145() { + static final private boolean jj_3R_144() { if (jj_scan_token(AT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_140() { + static final private boolean jj_3R_139() { Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_145()) { jj_scanpos = xsp; break; } + if (jj_3R_144()) { jj_scanpos = xsp; break; } if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } - if (jj_3R_144()) return true; + if (jj_3R_143()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_142() { + static final private boolean jj_3R_141() { if (jj_scan_token(SLASH)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_135() { + static final private boolean jj_3R_134() { Token xsp; xsp = jj_scanpos; - if (jj_3R_139()) { + if (jj_3R_138()) { jj_scanpos = xsp; - if (jj_3R_140()) return true; + if (jj_3R_139()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_139() { + static final private boolean jj_3R_138() { if (jj_scan_token(BIT_AND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_144()) return true; + if (jj_3R_143()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_134() { + static final private boolean jj_3R_133() { if (jj_scan_token(RUNSIGNEDSHIFT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_138() { - if (jj_scan_token(MINUS)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_129() { - if (jj_scan_token(GE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_141() { + static final private boolean jj_3R_140() { if (jj_scan_token(STAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_136() { + static final private boolean jj_3R_135() { Token xsp; xsp = jj_scanpos; - if (jj_3R_141()) { + if (jj_3R_140()) { jj_scanpos = xsp; - if (jj_3R_142()) { + if (jj_3R_141()) { jj_scanpos = xsp; - if (jj_3R_143()) return true; + if (jj_3R_142()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_135()) return true; + if (jj_3R_134()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_130() { - if (jj_3R_135()) return true; + static final private boolean jj_3R_137() { + if (jj_scan_token(MINUS)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_128() { + if (jj_scan_token(GE)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_129() { + if (jj_3R_134()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_136()) { jj_scanpos = xsp; break; } + if (jj_3R_135()) { jj_scanpos = xsp; break; } if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } return false; } - static final private boolean jj_3R_133() { + static final private boolean jj_3R_43() { + if (jj_scan_token(PHPEND)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_132() { if (jj_scan_token(RSIGNEDSHIFT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_128() { + static final private boolean jj_3R_127() { if (jj_scan_token(LE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_137() { + static final private boolean jj_3R_136() { if (jj_scan_token(PLUS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_131() { + static final private boolean jj_3R_130() { Token xsp; xsp = jj_scanpos; - if (jj_3R_137()) { + if (jj_3R_136()) { jj_scanpos = xsp; - if (jj_3R_138()) return true; + if (jj_3R_137()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_130()) return true; + if (jj_3R_129()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3_2() { - if (jj_scan_token(COMMA)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_39()) return true; + static final private boolean jj_3_6() { + if (jj_3R_44()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_124() { - if (jj_3R_130()) return true; + static final private boolean jj_3R_123() { + if (jj_3R_129()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_131()) { jj_scanpos = xsp; break; } + if (jj_3R_130()) { jj_scanpos = xsp; break; } if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } return false; } - static final private boolean jj_3R_193() { - if (jj_3R_39()) return true; + static final private boolean jj_3R_42() { + if (jj_scan_token(SEMICOLON)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3_5() { + if (jj_3R_41()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3_2()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } + xsp = jj_scanpos; + if (jj_3R_42()) { + jj_scanpos = xsp; + if (jj_3R_43()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_127() { + static final private boolean jj_3R_126() { if (jj_scan_token(GT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_185() { - if (jj_scan_token(LPAREN)) return true; + static final private boolean jj_3_2() { + if (jj_scan_token(COMMA)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_193()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(RPAREN)) return true; + if (jj_3R_39()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_132() { + static final private boolean jj_3R_131() { if (jj_scan_token(LSHIFT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_125() { + static final private boolean jj_3R_124() { Token xsp; xsp = jj_scanpos; - if (jj_3R_132()) { + if (jj_3R_131()) { jj_scanpos = xsp; - if (jj_3R_133()) { + if (jj_3R_132()) { jj_scanpos = xsp; - if (jj_3R_134()) return true; + if (jj_3R_133()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_124()) return true; + if (jj_3R_123()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_117() { - if (jj_3R_124()) return true; + static final private boolean jj_3R_192() { + if (jj_3R_39()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_125()) { jj_scanpos = xsp; break; } + if (jj_3_2()) { jj_scanpos = xsp; break; } if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } return false; } - static final private boolean jj_3R_43() { - if (jj_scan_token(PHPEND)) return true; + static final private boolean jj_3R_116() { + if (jj_3R_123()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_124()) { jj_scanpos = xsp; break; } + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } return false; } - static final private boolean jj_3R_195() { - if (jj_scan_token(ARRAYASSIGN)) return true; + static final private boolean jj_3R_184() { + if (jj_scan_token(LPAREN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_41()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_192()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(RPAREN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_39() { + static final private boolean jj_3R_196() { + if (jj_scan_token(COMMA)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_41()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_195()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_126() { + static final private boolean jj_3R_125() { if (jj_scan_token(LT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_118() { + static final private boolean jj_3R_117() { Token xsp; xsp = jj_scanpos; + if (jj_3R_125()) { + jj_scanpos = xsp; if (jj_3R_126()) { jj_scanpos = xsp; if (jj_3R_127()) { jj_scanpos = xsp; - if (jj_3R_128()) { - jj_scanpos = xsp; - if (jj_3R_129()) return true; + if (jj_3R_128()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_117()) return true; + if (jj_3R_116()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3_6() { - if (jj_3R_44()) return true; + static final private boolean jj_3R_195() { + if (jj_3R_41()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_196()) { jj_scanpos = xsp; break; } + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } return false; } - static final private boolean jj_3R_115() { - if (jj_3R_117()) return true; + static final private boolean jj_3R_114() { + if (jj_3R_116()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_118()) { jj_scanpos = xsp; break; } + if (jj_3R_117()) { jj_scanpos = xsp; break; } if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } return false; } - static final private boolean jj_3R_42() { - if (jj_scan_token(SEMICOLON)) return true; + static final private boolean jj_3R_194() { + if (jj_scan_token(ARRAYASSIGN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_41()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3_5() { + static final private boolean jj_3R_39() { if (jj_3R_41()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; Token xsp; xsp = jj_scanpos; - if (jj_3R_42()) { - jj_scanpos = xsp; - if (jj_3R_43()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_194()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_110() { - if (jj_3R_62()) return true; + static final private boolean jj_3_7() { + if (jj_3R_45()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_109() { - if (jj_scan_token(LBRACE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_41()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(RBRACE)) return true; + static final private boolean jj_3R_193() { + if (jj_3R_195()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_123() { + static final private boolean jj_3R_122() { if (jj_scan_token(TRIPLEEQUAL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_122() { - if (jj_scan_token(BANGDOUBLEEQUAL)) return true; + static final private boolean jj_3R_191() { + if (jj_scan_token(LPAREN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_193()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(RPAREN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } static final private boolean jj_3R_121() { - if (jj_scan_token(NE)) return true; + if (jj_scan_token(BANGDOUBLEEQUAL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } static final private boolean jj_3R_120() { - if (jj_scan_token(DIF)) return true; + if (jj_scan_token(NE)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_69() { + if (jj_scan_token(ASSIGN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_41()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } static final private boolean jj_3R_119() { + if (jj_scan_token(DIF)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_118() { if (jj_scan_token(EQ)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_197() { + static final private boolean jj_3R_61() { if (jj_scan_token(COMMA)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_41()) return true; + if (jj_3R_60()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_116() { + static final private boolean jj_3R_115() { Token xsp; xsp = jj_scanpos; + if (jj_3R_118()) { + jj_scanpos = xsp; if (jj_3R_119()) { jj_scanpos = xsp; if (jj_3R_120()) { jj_scanpos = xsp; if (jj_3R_121()) { jj_scanpos = xsp; - if (jj_3R_122()) { - jj_scanpos = xsp; - if (jj_3R_123()) return true; + if (jj_3R_122()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_115()) return true; + if (jj_3R_114()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_73() { - if (jj_scan_token(DOLLAR_ID)) return true; + static final private boolean jj_3R_174() { + if (jj_scan_token(NULL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_110()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_196() { - if (jj_3R_41()) return true; + static final private boolean jj_3R_112() { + if (jj_3R_114()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_197()) { jj_scanpos = xsp; break; } + if (jj_3R_115()) { jj_scanpos = xsp; break; } if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } return false; } + static final private boolean jj_3R_109() { + if (jj_scan_token(LBRACE)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_41()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(RBRACE)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_181() { + if (jj_scan_token(FALSE)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_180() { + if (jj_scan_token(TRUE)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_173() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_180()) { + jj_scanpos = xsp; + if (jj_3R_181()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_73() { + if (jj_scan_token(DOLLAR_ID)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + static final private boolean jj_3R_113() { - if (jj_3R_115()) return true; + if (jj_scan_token(BIT_AND)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_112()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_72() { + if (jj_scan_token(DOLLAR)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_62()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_169() { + if (jj_3R_174()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_60() { + if (jj_3R_68()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_69()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_168() { + if (jj_3R_173()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_110() { + if (jj_3R_112()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_116()) { jj_scanpos = xsp; break; } + if (jj_3R_113()) { jj_scanpos = xsp; break; } if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } return false; } - static final private boolean jj_3R_72() { - if (jj_scan_token(DOLLAR)) return true; + static final private boolean jj_3R_167() { + if (jj_scan_token(STRING_LITERAL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_62()) return true; + return false; + } + + static final private boolean jj_3R_45() { + if (jj_3R_60()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_61()) { jj_scanpos = xsp; break; } + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } return false; } @@ -5339,8 +5315,8 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_194() { - if (jj_3R_196()) return true; + static final private boolean jj_3R_166() { + if (jj_scan_token(FLOATING_POINT_LITERAL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -5372,34 +5348,36 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_114() { - if (jj_scan_token(BIT_AND)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_113()) return true; + static final private boolean jj_3R_162() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_165()) { + jj_scanpos = xsp; + if (jj_3R_166()) { + jj_scanpos = xsp; + if (jj_3R_167()) { + jj_scanpos = xsp; + if (jj_3R_168()) { + jj_scanpos = xsp; + if (jj_3R_169()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_111() { - if (jj_3R_113()) return true; + static final private boolean jj_3R_165() { + if (jj_scan_token(INTEGER_LITERAL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_114()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } return false; } - static final private boolean jj_3R_192() { - if (jj_scan_token(LPAREN)) return true; + static final private boolean jj_3R_111() { + if (jj_scan_token(XOR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_194()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(RPAREN)) return true; + if (jj_3R_110()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -5412,12 +5390,24 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_175() { - if (jj_scan_token(NULL)) return true; + static final private boolean jj_3R_63() { + if (jj_3R_41()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } + static final private boolean jj_3R_107() { + if (jj_3R_110()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_111()) { jj_scanpos = xsp; break; } + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } + return false; + } + static final private boolean jj_3R_93() { if (jj_scan_token(DOLLAR_ID)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5439,37 +5429,192 @@ final int pos = jj_input_stream.bufpos; return false; } - static final private boolean jj_3R_112() { - if (jj_scan_token(XOR)) return true; + static final private boolean jj_3R_47() { + if (jj_scan_token(LBRACKET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_111()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_63()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(RBRACKET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_182() { - if (jj_scan_token(FALSE)) return true; + static final private boolean jj_3R_108() { + if (jj_scan_token(BIT_OR)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_107()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_181() { - if (jj_scan_token(TRUE)) return true; + static final private boolean jj_3R_100() { + if (jj_3R_107()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_108()) { jj_scanpos = xsp; break; } + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } return false; } - static final private boolean jj_3R_174() { + static final private boolean jj_3_1() { + if (jj_3R_38()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_103() { + if (jj_scan_token(_ANDL)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_46() { + if (jj_scan_token(CLASSACCESS)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_62()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_38() { Token xsp; xsp = jj_scanpos; - if (jj_3R_181()) { + if (jj_3R_46()) { jj_scanpos = xsp; - if (jj_3R_182()) return true; + if (jj_3R_47()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } + static final private boolean jj_3R_68() { + if (jj_3R_77()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3_1()) { jj_scanpos = xsp; break; } + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } + return false; + } + + static final private boolean jj_3R_101() { + if (jj_scan_token(DOT)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_100()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_95() { + if (jj_3R_100()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_101()) { jj_scanpos = xsp; break; } + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } + return false; + } + + static final private boolean jj_3R_188() { + if (jj_3R_38()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_44() { + if (jj_scan_token(IDENTIFIER)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(COLON)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_187() { + if (jj_3R_191()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_183() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_187()) { + jj_scanpos = xsp; + if (jj_3R_188()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_98() { + if (jj_scan_token(_ORL)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_190() { + if (jj_3R_68()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_102() { + if (jj_scan_token(SC_AND)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_96() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_102()) { + jj_scanpos = xsp; + if (jj_3R_103()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_95()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_189() { + if (jj_scan_token(IDENTIFIER)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_185() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_189()) { + jj_scanpos = xsp; + if (jj_3R_190()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_78() { + if (jj_3R_95()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_96()) { jj_scanpos = xsp; break; } + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } + return false; + } + static private boolean jj_initialized_once = false; static public PHPParserTokenManager token_source; static SimpleCharStream jj_input_stream; @@ -5494,19 +5639,19 @@ final int pos = jj_input_stream.bufpos; jj_la1_4(); } private static void jj_la1_0() { - jj_la1_0 = new int[] {0xfcb0001e,0x0,0x6,0x6,0xfcb0001e,0xfcb00000,0x0,0x600000,0x600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x0,0x14000000,0x0,0x0,0x0,0x0,0x0,0x0,0x14000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x0,0x4000000,0x0,0x4000000,0x0,0x0,0x0,0x0,0x4000000,0x0,0x0,0x0,0x14000000,0x0,0x0,0x0,0x14000000,0x0,0x10,0x0,0xe4800000,0xfc800000,0x10,0x10,0x10,0x10,0xc0000000,0x0,0x0,0x0,0x0,0x10,0x0,0x10,0x0,0x10,0xfcb00000,0xfcb00000,0xf4b00000,0x0,0x0,0x0,0x0,0x4000000,0x0,0xf4b00000,0x8000000,0x14000000,0x0,0xfc800000,0x1000000,0x2000000,0x1000000,0x2000000,0xfc800000,0xfc800000,0xfc800000,0xfc800000,0x10,0xfc800000,0x10,0x0,0x0,0x4000000,0x14000000,0x4000000,0xfc800000,0xfc800000,0x4000000,0x0,0x0,0x14000000,}; + jj_la1_0 = new int[] {0xfcb0001e,0x0,0x6,0x6,0xfcb0001e,0xfcb00000,0x0,0x600000,0x600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x0,0x14000000,0x0,0x0,0x0,0x0,0x0,0x0,0x14000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x0,0x4000000,0x0,0x4000000,0x0,0x0,0x0,0x0,0x4000000,0x0,0x4000000,0x0,0x0,0x14000000,0x0,0x0,0x0,0x14000000,0x0,0x10,0x0,0xe4800000,0xfc800000,0x10,0x10,0x10,0x10,0xc0000000,0x0,0x0,0x0,0x0,0x10,0x0,0x10,0x0,0x10,0xfcb00000,0xfcb00000,0xf4b00000,0x0,0x0,0x0,0x0,0x4000000,0x0,0xf4b00000,0x8000000,0x14000000,0x0,0xfc800000,0x1000000,0x2000000,0x1000000,0x2000000,0xfc800000,0xfc800000,0xfc800000,0xfc800000,0x10,0xfc800000,0x10,0x0,0x0,0x4000000,0x14000000,0x4000000,0xfc800000,0xfc800000,0x4000000,0x0,0x0,0x14000000,}; } private static void jj_la1_1() { - jj_la1_1 = new int[] {0x11d7548f,0x0,0x0,0x0,0x11d7548f,0x11d7548f,0x2000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc20000,0x40,0xc30080,0x0,0x0,0x0,0x0,0xc0000000,0x0,0xc30080,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc30000,0x0,0xc30000,0x0,0xc30000,0x0,0x0,0x10,0x10,0x10000,0x10000,0x0,0x10,0xc30080,0x10,0xc20000,0xc00000,0xc30080,0x0,0x0,0x0,0x1115540f,0x11d7548f,0x0,0x0,0x0,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x11d7548f,0x11d7548f,0x11d7548f,0x0,0x0,0x0,0x0,0x10000,0x900,0x11d7548f,0x0,0xc30080,0x900,0x11d7548f,0x0,0x0,0x0,0x0,0x11d7548f,0x11d7548f,0x11d7548f,0x11d7548f,0x0,0x11d7548f,0x0,0x10,0x40,0x10000,0xc30080,0x10000,0x11d7548f,0x11d7548f,0x10000,0x0,0x0,0xc30080,}; + jj_la1_1 = new int[] {0x11d7548f,0x0,0x0,0x0,0x11d7548f,0x11d7548f,0x2000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc20000,0x40,0xc30080,0x0,0x0,0x0,0x0,0xc0000000,0x0,0xc30080,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc30000,0x0,0xc30000,0x0,0xc30000,0x0,0x0,0x10,0x10,0x10000,0x10000,0x10000,0x0,0x10,0xc30080,0x10,0xc20000,0xc00000,0xc30080,0x0,0x0,0x0,0x1115540f,0x11d7548f,0x0,0x0,0x0,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x11d7548f,0x11d7548f,0x11d7548f,0x0,0x0,0x0,0x0,0x10000,0x900,0x11d7548f,0x0,0xc30080,0x900,0x11d7548f,0x0,0x0,0x0,0x0,0x11d7548f,0x11d7548f,0x11d7548f,0x11d7548f,0x0,0x11d7548f,0x0,0x10,0x40,0x10000,0xc30080,0x10000,0x11d7548f,0x11d7548f,0x10000,0x0,0x0,0xc30080,}; } private static void jj_la1_2() { - jj_la1_2 = new int[] {0x2288a200,0x20000000,0x0,0x0,0x2288a200,0x2288a200,0x0,0x0,0x0,0x40000000,0x0,0x2000000,0x0,0x2000000,0x2080000,0x2080000,0x2200,0x2200,0x8a200,0x0,0x88a200,0x0,0x40000000,0x0,0x0,0x7f,0x0,0x88a200,0x0,0x0,0x80,0x80,0x100,0x100,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x88a200,0x0,0x88a200,0x0,0x88a200,0x0,0x0,0x8800000,0x8800000,0x80000,0x80000,0x80000,0x8800000,0x88a200,0x8000000,0xa200,0x0,0x88a200,0x40000000,0x20000000,0x0,0x22080000,0x2288a200,0x20000000,0x20000000,0x20000000,0x20000000,0x0,0x0,0x40000000,0x0,0x40000000,0x20000000,0x40000000,0x20000000,0x40000000,0x20000000,0x2288a200,0x2288a200,0x2288a200,0x40000000,0x0,0x0,0x0,0x80000,0x0,0x2288a200,0x0,0x88a200,0x0,0x2288a200,0x0,0x0,0x0,0x0,0x2288a200,0x2288a200,0x2288a200,0x2288a200,0x20000000,0x2288a200,0x20000000,0x8000000,0x0,0x80000,0x88a200,0x80000,0x2288a200,0x2288a200,0x80000,0x40000000,0x80000,0x88a200,}; + jj_la1_2 = new int[] {0x2288a200,0x20000000,0x0,0x0,0x2288a200,0x2288a200,0x0,0x0,0x0,0x40000000,0x0,0x2000000,0x0,0x2000000,0x2080000,0x2200,0x2200,0x8a200,0x0,0x88a200,0x0,0x40000000,0x0,0x0,0x7f,0x0,0x88a200,0x0,0x0,0x80,0x80,0x100,0x100,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x88a200,0x0,0x88a200,0x0,0x88a200,0x0,0x0,0x8800000,0x8800000,0x80000,0x80000,0x80000,0x80000,0x8800000,0x88a200,0x8000000,0xa200,0x0,0x88a200,0x40000000,0x20000000,0x0,0x22080000,0x2288a200,0x20000000,0x20000000,0x20000000,0x20000000,0x0,0x0,0x40000000,0x0,0x40000000,0x20000000,0x40000000,0x20000000,0x40000000,0x20000000,0x2288a200,0x2288a200,0x2288a200,0x40000000,0x0,0x0,0x0,0x80000,0x0,0x2288a200,0x0,0x88a200,0x0,0x2288a200,0x0,0x0,0x0,0x0,0x2288a200,0x2288a200,0x2288a200,0x2288a200,0x20000000,0x2288a200,0x20000000,0x8000000,0x0,0x80000,0x88a200,0x80000,0x2288a200,0x2288a200,0x80000,0x40000000,0x80000,0x88a200,}; } private static void jj_la1_3() { - jj_la1_3 = new int[] {0x78700000,0x0,0x0,0x0,0x78700000,0x78700000,0x0,0x0,0x0,0x0,0x200,0x0,0x200000,0x0,0x200000,0x200000,0x0,0x0,0x60000000,0x0,0x78700000,0x0,0x0,0x200000,0x0,0x0,0xffe00,0x78700000,0xffe00,0x800000,0x2000000,0x2000000,0x4000000,0x4000000,0x0,0x0,0x0,0x0,0x1e4,0x1e4,0x1b,0x1b,0x0,0x0,0x60000000,0x60000000,0x80000000,0x80000000,0x100000,0x78700000,0x60000000,0x78600000,0x400000,0x200000,0x18000000,0x18000000,0x0,0x0,0x200000,0x200000,0x200000,0x0,0x78700000,0x0,0x0,0x0,0x78700000,0x0,0x0,0x100000,0x18300000,0x78700000,0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x200,0x0,0x0,0x0,0x0,0x0,0x0,0x78700000,0x78700000,0x78700000,0x0,0x200,0x180ffe00,0x180ffe00,0x18200000,0x0,0x78700000,0x0,0x78700000,0x0,0x78700000,0x0,0x0,0x0,0x0,0x79700000,0x78700000,0x78700000,0x78700000,0x0,0x79700000,0x0,0x0,0x0,0x18200000,0x78700000,0x18200000,0x78700000,0x79700000,0x18200000,0x0,0x0,0x78700000,}; + jj_la1_3 = new int[] {0x78700000,0x0,0x0,0x0,0x78700000,0x78700000,0x0,0x0,0x0,0x0,0x200,0x0,0x200000,0x0,0x200000,0x0,0x0,0x60000000,0x0,0x78700000,0x0,0x0,0x200000,0x0,0x0,0xffe00,0x78700000,0xffe00,0x800000,0x2000000,0x2000000,0x4000000,0x4000000,0x0,0x0,0x0,0x0,0x1e4,0x1e4,0x1b,0x1b,0x0,0x0,0x60000000,0x60000000,0x80000000,0x80000000,0x100000,0x78700000,0x60000000,0x78600000,0x400000,0x200000,0x18000000,0x18000000,0x0,0x0,0x200000,0x200000,0x200000,0x200000,0x0,0x78700000,0x0,0x0,0x0,0x78700000,0x0,0x0,0x100000,0x18300000,0x78700000,0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x200,0x0,0x0,0x0,0x0,0x0,0x0,0x78700000,0x78700000,0x78700000,0x0,0x200,0x180ffe00,0x180ffe00,0x18200000,0x0,0x78700000,0x0,0x78700000,0x0,0x78700000,0x0,0x0,0x0,0x0,0x79700000,0x78700000,0x78700000,0x78700000,0x0,0x79700000,0x0,0x0,0x0,0x18200000,0x78700000,0x18200000,0x78700000,0x79700000,0x18200000,0x0,0x0,0x78700000,}; } private static void jj_la1_4() { - jj_la1_4 = new int[] {0x402,0x0,0x0,0x0,0x402,0x402,0x0,0x0,0x0,0x0,0x0,0x0,0x400,0x0,0x400,0x400,0x0,0x0,0x0,0x0,0x402,0x2,0x0,0x402,0x2,0x0,0x300,0x402,0x300,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x8,0x2,0x0,0x0,0x0,0x0,0xe0,0xe0,0x0,0x0,0x11,0x11,0x0,0x402,0x0,0x400,0x0,0x400,0x0,0x0,0x0,0x0,0x400,0x400,0x400,0x0,0x402,0x0,0x0,0x0,0x402,0x0,0x0,0x0,0x400,0x402,0x0,0x0,0x0,0x0,0x0,0x400,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x402,0x402,0x402,0x0,0x0,0x300,0x300,0x400,0x0,0x402,0x0,0x402,0x0,0x402,0x0,0x0,0x0,0x0,0x402,0x402,0x402,0x402,0x0,0x402,0x0,0x0,0x0,0x400,0x402,0x400,0x402,0x402,0x400,0x0,0x0,0x402,}; + jj_la1_4 = new int[] {0x402,0x0,0x0,0x0,0x402,0x402,0x0,0x0,0x0,0x0,0x0,0x0,0x400,0x0,0x400,0x0,0x0,0x0,0x0,0x402,0x2,0x0,0x402,0x2,0x0,0x300,0x402,0x300,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x8,0x2,0x0,0x0,0x0,0x0,0xe0,0xe0,0x0,0x0,0x11,0x11,0x0,0x402,0x0,0x400,0x0,0x400,0x0,0x0,0x0,0x0,0x400,0x400,0x400,0x400,0x0,0x402,0x0,0x0,0x0,0x402,0x0,0x0,0x0,0x400,0x402,0x0,0x0,0x0,0x0,0x0,0x400,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x402,0x402,0x402,0x0,0x0,0x300,0x300,0x400,0x0,0x402,0x0,0x402,0x0,0x402,0x0,0x0,0x0,0x0,0x402,0x402,0x402,0x402,0x0,0x402,0x0,0x0,0x0,0x400,0x402,0x400,0x402,0x402,0x400,0x0,0x0,0x402,}; } static final private JJCalls[] jj_2_rtns = new JJCalls[7]; static private boolean jj_rescan = false; diff --git a/net.sourceforge.phpeclipse/src/test/PHPParser.jj b/net.sourceforge.phpeclipse/src/test/PHPParser.jj index b49b15a..bb3d533 100644 --- a/net.sourceforge.phpeclipse/src/test/PHPParser.jj +++ b/net.sourceforge.phpeclipse/src/test/PHPParser.jj @@ -30,6 +30,7 @@ import org.eclipse.jface.preference.IPreferenceStore; import java.util.Hashtable; import java.io.StringReader; +import java.io.*; import java.text.MessageFormat; import net.sourceforge.phpeclipse.actions.PHPStartApacheAction; @@ -90,6 +91,21 @@ public final class PHPParser extends PHPParserSuperclass { phpTest(); } + public static final void htmlParserTester(final File fileName) throws CoreException, ParseException { + try { + final Reader stream = new FileReader(fileName); + if (jj_input_stream == null) { + jj_input_stream = new SimpleCharStream(stream, 1, 1); + } + ReInit(stream); + phpFile(); + } catch (FileNotFoundException e) { + e.printStackTrace(); //To change body of catch statement use Options | File Templates. + } catch (ParseException e) { + e.printStackTrace(); //To change body of catch statement use Options | File Templates. + } + } + public static final void htmlParserTester(final String strEval) throws CoreException, ParseException { final StringReader stream = new StringReader(strEval); if (jj_input_stream == null) { @@ -124,6 +140,8 @@ public final class PHPParser extends PHPParserSuperclass { if (errorMessage == null) { PHPeclipsePlugin.log(e); errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it"; + errorStart = jj_input_stream.getPosition(); + errorEnd = errorStart + 1; } setMarker(e); errorMessage = null; @@ -592,7 +610,7 @@ void phpFile() : void PhpBlock() : { - final int start = jj_input_stream.bufpos; + final int start = jj_input_stream.getPosition(); } { Expression() [ ] @@ -603,7 +621,7 @@ void PhpBlock() : setMarker(fileToParse, "You should use '' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } } @@ -635,11 +655,13 @@ void ClassDeclaration() : { try { - {pos = jj_input_stream.bufpos;} + {pos = jj_input_stream.getPosition();} className = } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } [ @@ -649,6 +671,8 @@ void ClassDeclaration() : } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } ] @@ -673,16 +697,20 @@ void ClassBody() : try { } catch (ParseException e) { - errorMessage = "'{' expected"; + errorMessage = "unexpected token : '"+ e.currentToken.next.image + "', '{' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } ( ClassBodyDeclaration() )* try { } catch (ParseException e) { - errorMessage = "'var', 'function' or '}' expected"; + errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', 'var', 'function' or '}' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } } @@ -719,6 +747,8 @@ void FieldDeclaration() : } catch (ParseException e) { errorMessage = "';' expected after variable declaration"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } } @@ -726,8 +756,8 @@ void FieldDeclaration() : PHPVarDeclaration VariableDeclarator() : { final String varName; - String varValue; - final int pos = jj_input_stream.bufpos; + final String varValue; + final int pos = jj_input_stream.getPosition(); } { varName = VariableDeclaratorId() @@ -739,6 +769,8 @@ PHPVarDeclaration VariableDeclarator() : } catch (ParseException e) { errorMessage = "Literal expression expected in variable initializer"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } ] @@ -761,6 +793,8 @@ String VariableDeclaratorId() : } catch (ParseException e) { errorMessage = "'$' expected for variable identifier"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } } @@ -803,13 +837,16 @@ final Token token; expr = VariableName() {return "$" + expr;} | + token = + {return token.image + expr;} +/*| pas besoin ? token = [expr = VariableName()] { if (expr == null) { return token.image; } return token.image + expr; - } + }*/ } String VariableInitializer() : @@ -879,6 +916,8 @@ void MethodDeclaration() : } errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } { @@ -895,12 +934,16 @@ void MethodDeclaration() : } } +/** + * A MethodDeclarator contains [&] IDENTIFIER(parameters ...). + * @return a function description for the outline + */ PHPFunctionDeclaration MethodDeclarator() : { final Token identifier; final StringBuffer methodDeclaration = new StringBuffer(); final String formalParameters; - final int pos = jj_input_stream.bufpos; + final int pos = jj_input_stream.getPosition(); } { [ {methodDeclaration.append("&");} ] @@ -924,7 +967,9 @@ String FormalParameters() : } catch (ParseException e) { errorMessage = "Formal parameter expected after function identifier"; errorLevel = ERROR; - jj_consume_token(token.kind); + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; + throw e; } [ expr = FormalParameter() {buff.append(expr);} @@ -938,6 +983,8 @@ String FormalParameters() : } catch (ParseException e) { errorMessage = "')' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } { @@ -1012,6 +1059,8 @@ String Expression() : } catch (ParseException e) { errorMessage = "expression expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } ] @@ -1198,6 +1247,8 @@ String EqualityExpression() : } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected after '"+operator.image+"'"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } { @@ -1268,7 +1319,15 @@ String MultiplicativeExpression() : Token operator; final StringBuffer buff = new StringBuffer();} { - expr = UnaryExpression() + try { + expr = UnaryExpression() + } catch (ParseException e) { + errorMessage = "unexpected token '"+e.currentToken.next.image+"'"; + errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; + throw e; + } {buff.append(expr);} ( ( operator = | operator = | operator = ) expr = UnaryExpression() @@ -1366,6 +1425,8 @@ String UnaryExpressionNotPlusMinus() : } catch (ParseException e) { errorMessage = "')' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } {return "("+expr+")";} @@ -1441,11 +1502,26 @@ String PrimaryPrefix() : { return "new " + expr; } -| +| expr = VariableDeclaratorId() {return expr;} } +String classInstantiation() : +{ + String expr; + final StringBuffer buff = new StringBuffer("new "); +} +{ + expr = ClassIdentifier() + {buff.append(expr);} + [ + expr = PrimaryExpression() + {buff.append(expr);} + ] + {return buff.toString();} +} + String ClassIdentifier(): { final String expr; @@ -1482,6 +1558,8 @@ String VariableSuffix() : } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } {return "->" + expr;} @@ -1492,6 +1570,8 @@ String VariableSuffix() : } catch (ParseException e) { errorMessage = "']' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } { @@ -1552,6 +1632,8 @@ String expr = null; } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } { @@ -1576,6 +1658,8 @@ final StringBuffer buff = new StringBuffer(); } catch (ParseException e) { errorMessage = "expression expected after a comma in argument list"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } { @@ -1598,6 +1682,8 @@ void StatementNoBreak() : } catch (ParseException e) { errorMessage = "';' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } | @@ -1614,6 +1700,8 @@ void StatementNoBreak() : } catch (ParseException e) { errorMessage = "';' expected after expression"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } | @@ -1656,7 +1744,7 @@ void Statement() : void IncludeStatement() : { final String expr; - final int pos = jj_input_stream.bufpos; + final int pos = jj_input_stream.getPosition(); } { @@ -1671,6 +1759,8 @@ void IncludeStatement() : } catch (ParseException e) { errorMessage = "';' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } | @@ -1686,6 +1776,8 @@ void IncludeStatement() : } catch (ParseException e) { errorMessage = "';' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } | @@ -1701,6 +1793,8 @@ void IncludeStatement() : } catch (ParseException e) { errorMessage = "';' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } | @@ -1716,6 +1810,8 @@ void IncludeStatement() : } catch (ParseException e) { errorMessage = "';' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } } @@ -1745,6 +1841,8 @@ String ListExpression() : } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } [ @@ -1757,6 +1855,8 @@ String ListExpression() : } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } expr = VariableDeclaratorId() @@ -1768,6 +1868,8 @@ String ListExpression() : } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } [ expr = Expression() {buff.append("(").append(expr);}] @@ -1783,6 +1885,8 @@ void EchoStatement() : } catch (ParseException e) { errorMessage = "';' expected after 'echo' statement"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } } @@ -1796,6 +1900,8 @@ void GlobalStatement() : } catch (ParseException e) { errorMessage = "';' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } } @@ -1809,6 +1915,8 @@ void StaticStatement() : } catch (ParseException e) { errorMessage = "';' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } } @@ -1827,6 +1935,8 @@ void Block() : } catch (ParseException e) { errorMessage = "'{' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } ( BlockStatement() )* @@ -1835,6 +1945,8 @@ void Block() : } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } } @@ -1909,6 +2021,8 @@ void SwitchStatement() : } catch (ParseException e) { errorMessage = "'(' expected after 'switch'"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } Expression() @@ -1917,6 +2031,8 @@ void SwitchStatement() : } catch (ParseException e) { errorMessage = "')' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } try { @@ -1924,6 +2040,8 @@ void SwitchStatement() : } catch (ParseException e) { errorMessage = "'{' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } ( @@ -1949,6 +2067,8 @@ void SwitchStatement() : } catch (ParseException e) { errorMessage = "'}' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } } @@ -1964,6 +2084,8 @@ Token BreakStatement() : } catch (ParseException e) { errorMessage = "';' expected after 'break' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } {return token;} @@ -1981,6 +2103,8 @@ int SwitchLabel() : if (errorMessage != null) throw e; errorMessage = "expression expected after 'case' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } try { @@ -1988,6 +2112,8 @@ int SwitchLabel() : } catch (ParseException e) { errorMessage = "':' expected after case expression"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } {return token.beginLine;} @@ -1998,6 +2124,8 @@ int SwitchLabel() : } catch (ParseException e) { errorMessage = "':' expected after 'default' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } {return token.beginLine;} @@ -2006,7 +2134,7 @@ int SwitchLabel() : void IfStatement() : { final Token token; - final int pos = jj_input_stream.bufpos; + final int pos = jj_input_stream.getPosition(); } { token = Condition("if") IfStatement0(pos,pos+token.image.length()) @@ -2020,7 +2148,9 @@ void Condition(final String keyword) : } catch (ParseException e) { errorMessage = "'(' expected after " + keyword + " keyword"; errorLevel = ERROR; - throw e; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length(); + errorEnd = errorStart +1; + processParseException(e); } Expression() try { @@ -2028,6 +2158,8 @@ void Condition(final String keyword) : } catch (ParseException e) { errorMessage = "')' expected after " + keyword + " keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } } @@ -2052,6 +2184,8 @@ void IfStatement0(final int start,final int end) : } catch (ParseException e) { errorMessage = "'endif' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } try { @@ -2059,6 +2193,8 @@ void IfStatement0(final int start,final int end) : } catch (ParseException e) { errorMessage = "';' expected after 'endif' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } | @@ -2086,7 +2222,7 @@ void ElseIfStatement() : void WhileStatement() : { final Token token; - final int pos = jj_input_stream.bufpos; + final int pos = jj_input_stream.getPosition(); } { token = Condition("while") WhileStatement0(pos,pos + token.image.length()) @@ -2111,6 +2247,8 @@ void WhileStatement0(final int start, final int end) : } catch (ParseException e) { errorMessage = "'endwhile' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } try { @@ -2118,6 +2256,8 @@ void WhileStatement0(final int start, final int end) : } catch (ParseException e) { errorMessage = "';' expected after 'endwhile' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } | @@ -2133,6 +2273,8 @@ void DoStatement() : } catch (ParseException e) { errorMessage = "';' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } } @@ -2146,6 +2288,8 @@ void ForeachStatement() : } catch (ParseException e) { errorMessage = "'(' expected after 'foreach' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } try { @@ -2153,6 +2297,8 @@ void ForeachStatement() : } catch (ParseException e) { errorMessage = "variable expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } [ VariableSuffix() ] @@ -2161,6 +2307,8 @@ void ForeachStatement() : } catch (ParseException e) { errorMessage = "'as' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } try { @@ -2168,6 +2316,8 @@ void ForeachStatement() : } catch (ParseException e) { errorMessage = "variable expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } [ Expression() ] @@ -2176,6 +2326,8 @@ void ForeachStatement() : } catch (ParseException e) { errorMessage = "')' expected after 'foreach' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } try { @@ -2184,6 +2336,8 @@ void ForeachStatement() : if (errorMessage != null) throw e; errorMessage = "statement expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } } @@ -2191,7 +2345,7 @@ void ForeachStatement() : void ForStatement() : { final Token token; -final int pos = jj_input_stream.bufpos; +final int pos = jj_input_stream.getPosition(); } { token = @@ -2200,6 +2354,8 @@ final int pos = jj_input_stream.bufpos; } catch (ParseException e) { errorMessage = "'(' expected after 'for' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } [ ForInit() ] [ Expression() ] [ StatementExpressionList() ] @@ -2224,6 +2380,8 @@ final int pos = jj_input_stream.bufpos; } catch (ParseException e) { errorMessage = "'endfor' expected"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } try { @@ -2231,6 +2389,8 @@ final int pos = jj_input_stream.bufpos; } catch (ParseException e) { errorMessage = "';' expected after 'endfor' keyword"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } ) @@ -2260,6 +2420,8 @@ void ContinueStatement() : } catch (ParseException e) { errorMessage = "';' expected after 'continue' statement"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } } @@ -2273,6 +2435,8 @@ void ReturnStatement() : } catch (ParseException e) { errorMessage = "';' expected after 'return' statement"; errorLevel = ERROR; + errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = jj_input_stream.getPosition() + 1; throw e; } } \ No newline at end of file diff --git a/net.sourceforge.phpeclipse/src/test/PHPParserTestCase2.java b/net.sourceforge.phpeclipse/src/test/PHPParserTestCase2.java index d921054..b566bf6 100644 --- a/net.sourceforge.phpeclipse/src/test/PHPParserTestCase2.java +++ b/net.sourceforge.phpeclipse/src/test/PHPParserTestCase2.java @@ -12,6 +12,7 @@ import org.eclipse.core.runtime.CoreException; import junit.framework.TestCase; import java.io.CharArrayReader; +import java.io.File; /** @@ -29,7 +30,7 @@ public class PHPParserTestCase2 extends TestCase { * Test the PHP Parser with different PHP snippets */ public void testPHPParser() { - checkHTML(""); + //checkHTML(new File("class.adm_gestuser.php")); checkHTML("" + "\n dfgdfgfdfg" + "\n" + @@ -46,40 +47,6 @@ public class PHPParserTestCase2 extends TestCase { ""); - checkHTML("tabAffich['oModeCentral']=$oModeCentral;" + - "\nob_start('ob_gzhandler');" + - "\necho $Atreides->vueMetier('visu',$AtreidesTheme);" + - "\n?>"); checkHTML("sdfsdf "); checkHTML("\n\n\n\n "); checkHTML(""); @@ -182,6 +149,17 @@ public class PHPParserTestCase2 extends TestCase { } + private void checkHTML(File strEval) { + try { + System.out.println("strEval = " + strEval.toString()); + parser.htmlParserTester(strEval); + } catch (CoreException e) { + e.printStackTrace(); + } catch (ParseException e) { + e.printStackTrace(); + } + + } /** * The JUnit setup method */ diff --git a/net.sourceforge.phpeclipse/src/test/PHPParserTokenManager.java b/net.sourceforge.phpeclipse/src/test/PHPParserTokenManager.java index 063404c..e6ffa41 100644 --- a/net.sourceforge.phpeclipse/src/test/PHPParserTokenManager.java +++ b/net.sourceforge.phpeclipse/src/test/PHPParserTokenManager.java @@ -7,6 +7,7 @@ import org.eclipse.ui.texteditor.MarkerUtilities; import org.eclipse.jface.preference.IPreferenceStore; import java.util.Hashtable; import java.io.StringReader; +import java.io.*; import java.text.MessageFormat; import net.sourceforge.phpeclipse.actions.PHPStartApacheAction; import net.sourceforge.phpeclipse.PHPeclipsePlugin; diff --git a/net.sourceforge.phpeclipse/src/test/SimpleCharStream.java b/net.sourceforge.phpeclipse/src/test/SimpleCharStream.java index 4a1c194..1187798 100644 --- a/net.sourceforge.phpeclipse/src/test/SimpleCharStream.java +++ b/net.sourceforge.phpeclipse/src/test/SimpleCharStream.java @@ -13,6 +13,10 @@ public class SimpleCharStream static int available; static int tokenBegin; static public int bufpos = -1; + + //Added by Matthieu Casanova + public static int position = 0; + static protected int bufline[]; static protected int bufcolumn[]; @@ -86,12 +90,14 @@ public class SimpleCharStream { if (tokenBegin > 2048) { + position += bufpos; bufpos = maxNextCharInd = 0; available = tokenBegin; } - else if (tokenBegin < 0) + else if (tokenBegin < 0) { + position += bufpos; bufpos = maxNextCharInd = 0; - else + } else ExpandBuff(false); } else if (available > tokenBegin) @@ -110,8 +116,9 @@ public class SimpleCharStream inputStream.close(); throw new java.io.IOException(); } - else + else { maxNextCharInd += i; + } return; } catch(java.io.IOException e) { @@ -178,14 +185,17 @@ public class SimpleCharStream { --inBuf; - if (++bufpos == bufsize) + if (++bufpos == bufsize) { + position += bufpos; bufpos = 0; + } return buffer[bufpos]; } - if (++bufpos >= maxNextCharInd) - FillBuff(); + if (++bufpos >= maxNextCharInd) { + FillBuff(); + } char c = buffer[bufpos]; @@ -278,6 +288,7 @@ public class SimpleCharStream prevCharIsLF = prevCharIsCR = false; tokenBegin = inBuf = maxNextCharInd = 0; bufpos = -1; + position = 0; } public void ReInit(java.io.Reader dstream, int startline, @@ -402,4 +413,8 @@ public class SimpleCharStream column = bufcolumn[j]; } + //hack + public static int getPosition() { + return position + bufpos; + } }