X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/test/PHPParser.java b/net.sourceforge.phpeclipse/src/test/PHPParser.java index f7bc34d..30114bb 100644 --- a/net.sourceforge.phpeclipse/src/test/PHPParser.java +++ b/net.sourceforge.phpeclipse/src/test/PHPParser.java @@ -62,6 +62,12 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon private static AstNode[] nodes; /** The cursor in expression stack. */ private static int nodePtr; + private static VariableDeclaration[] variableDeclarationStack; + private static int variableDeclarationPtr; + private static Statement[] statementStack; + private static int statementPtr; + private static ElseIf[] elseIfStack; + private static int elseIfPtr; public final void setFileToParse(final IFile fileToParse) { this.fileToParse = fileToParse; @@ -80,7 +86,11 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon */ private static final void init() { nodes = new AstNode[AstStackIncrement]; + statementStack = new Statement[AstStackIncrement]; + elseIfStack = new ElseIf[AstStackIncrement]; nodePtr = -1; + statementPtr = -1; + elseIfPtr = -1; htmlStart = 0; } @@ -101,6 +111,45 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon } } + private static final void pushOnVariableDeclarationStack(VariableDeclaration var) { + try { + variableDeclarationStack[++variableDeclarationPtr] = var; + } catch (IndexOutOfBoundsException e) { + int oldStackLength = variableDeclarationStack.length; + VariableDeclaration[] oldStack = variableDeclarationStack; + variableDeclarationStack = new VariableDeclaration[oldStackLength + AstStackIncrement]; + System.arraycopy(oldStack, 0, variableDeclarationStack, 0, oldStackLength); + variableDeclarationPtr = oldStackLength; + variableDeclarationStack[variableDeclarationPtr] = var; + } + } + + private static final void pushOnStatementStack(Statement statement) { + try { + statementStack[++statementPtr] = statement; + } catch (IndexOutOfBoundsException e) { + int oldStackLength = statementStack.length; + Statement[] oldStack = statementStack; + statementStack = new Statement[oldStackLength + AstStackIncrement]; + System.arraycopy(oldStack, 0, statementStack, 0, oldStackLength); + statementPtr = oldStackLength; + statementStack[statementPtr] = statement; + } + } + + private static final void pushOnElseIfStack(ElseIf elseIf) { + try { + elseIfStack[++elseIfPtr] = elseIf; + } catch (IndexOutOfBoundsException e) { + int oldStackLength = elseIfStack.length; + ElseIf[] oldStack = elseIfStack; + elseIfStack = new ElseIf[oldStackLength + AstStackIncrement]; + System.arraycopy(oldStack, 0, elseIfStack, 0, oldStackLength); + elseIfPtr = oldStackLength; + elseIfStack[elseIfPtr] = elseIf; + } + } + public static final void phpParserTester(final String strEval) throws CoreException, ParseException { PHPParserTokenManager.SwitchTo(PHPParserTokenManager.PHPPARSING); final StringReader stream = new StringReader(strEval); @@ -147,7 +196,9 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon init(); try { parse(); - //PHPeclipsePlugin.log(1,phpDocument.toString()); + phpDocument = new PHPDocument(null); + phpDocument.nodes = nodes; + PHPeclipsePlugin.log(1,phpDocument.toString()); } catch (ParseException e) { processParseException(e); } @@ -606,12 +657,12 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon if (superclassName == null) { classDeclaration = new ClassDeclaration(currentSegment, className.image.toCharArray(), - superclassName.image.toCharArray(), pos, 0); } else { classDeclaration = new ClassDeclaration(currentSegment, className.image.toCharArray(), + superclassName.image.toCharArray(), pos, 0); } @@ -686,12 +737,14 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon */ static final public FieldDeclaration FieldDeclaration() throws ParseException { VariableDeclaration variableDeclaration; + VariableDeclaration[] list; + final ArrayList arrayList = new ArrayList(); + final int pos = SimpleCharStream.getPosition(); jj_consume_token(VAR); variableDeclaration = VariableDeclarator(); - outlineInfo.addVariable(new String(variableDeclaration.name)); - if (currentSegment != null) { - currentSegment.add(variableDeclaration); - } + arrayList.add(variableDeclaration); + outlineInfo.addVariable(new String(variableDeclaration.name)); + currentSegment.add(variableDeclaration); label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -704,9 +757,9 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon } jj_consume_token(COMMA); variableDeclaration = VariableDeclarator(); - if (currentSegment != null) { - currentSegment.add(variableDeclaration); - } + arrayList.add(variableDeclaration); + outlineInfo.addVariable(new String(variableDeclaration.name)); + currentSegment.add(variableDeclaration); } try { jj_consume_token(SEMICOLON); @@ -717,6 +770,11 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } + list = new VariableDeclaration[arrayList.size()]; + arrayList.toArray(list); + {if (true) return new FieldDeclaration(list, + pos, + SimpleCharStream.getPosition());} throw new Error("Missing return statement in function"); } @@ -742,10 +800,16 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon jj_la1[10] = jj_gen; ; } - {if (true) return new VariableDeclaration(currentSegment, + if (initializer == null) { + {if (true) return new VariableDeclaration(currentSegment, varName.toCharArray(), - initializer, - pos);} + pos, + jj_input_stream.getPosition());} + } + {if (true) return new VariableDeclaration(currentSegment, + varName.toCharArray(), + initializer, + pos);} throw new Error("Missing return statement in function"); } @@ -952,19 +1016,19 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon } static final public ArrayVariableDeclaration ArrayVariable() throws ParseException { -Expression expr; -Expression expr2 = null; +Expression expr,expr2; expr = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ARRAYASSIGN: jj_consume_token(ARRAYASSIGN); expr2 = Expression(); + {if (true) return new ArrayVariableDeclaration(expr,expr2);} break; default: jj_la1[18] = jj_gen; ; } - {if (true) return new ArrayVariableDeclaration(expr,expr2);} + {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());} throw new Error("Missing return statement in function"); } @@ -1022,7 +1086,9 @@ Expression expr2 = null; ; } jj_consume_token(RPAREN); - {if (true) return (ArrayVariableDeclaration[]) list.toArray();} + ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()]; + list.toArray(vars); + {if (true) return vars;} throw new Error("Missing return statement in function"); } @@ -1039,9 +1105,7 @@ Expression expr2 = null; functionDeclaration = MethodDeclarator(); outlineInfo.addVariable(new String(functionDeclaration.name)); } catch (ParseException e) { - if (errorMessage != null) { - {if (true) throw e;} - } + if (errorMessage != null) {if (true) throw e;} errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected"; errorLevel = ERROR; errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; @@ -1749,9 +1813,7 @@ Expression expr2 = null; try { expr = UnaryExpression(); } catch (ParseException e) { - if (errorMessage != null) { - {if (true) throw e;} - } + if (errorMessage != null) {if (true) throw e;} errorMessage = "unexpected token '"+e.currentToken.next.image+"'"; errorLevel = ERROR; errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; @@ -1826,7 +1888,7 @@ Expression expr2 = null; case LPAREN: case DOLLAR_ID: expr = AtUnaryExpression(); - {if (true) return expr;} + {if (true) return expr;} break; default: jj_la1[48] = jj_gen; @@ -2389,7 +2451,7 @@ final int pos = SimpleCharStream.getPosition(); case STRING_LITERAL: token = jj_consume_token(STRING_LITERAL); pos = SimpleCharStream.getPosition(); - {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length(),pos);} + {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length());} break; case TRUE: jj_consume_token(TRUE); @@ -2415,7 +2477,7 @@ final int pos = SimpleCharStream.getPosition(); } static final public FunctionCall Arguments(Expression func) throws ParseException { -ArgumentDeclaration[] args = null; +Expression[] args = null; jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ARRAY: @@ -2458,11 +2520,16 @@ ArgumentDeclaration[] args = null; throw new Error("Missing return statement in function"); } - static final public ArgumentDeclaration[] ArgumentList() throws ParseException { -Expression expr; +/** + * An argument list is a list of arguments separated by comma : + * argumentDeclaration() (, argumentDeclaration)* + * @return an array of arguments + */ + static final public Expression[] ArgumentList() throws ParseException { +Expression arg; final ArrayList list = new ArrayList(); - expr = Expression(); - list.add(expr); + arg = Expression(); + list.add(arg); label_21: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -2475,8 +2542,8 @@ final ArrayList list = new ArrayList(); } jj_consume_token(COMMA); try { - expr = Expression(); - list.add(expr); + arg = Expression(); + list.add(arg); } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list"; errorLevel = ERROR; @@ -2485,7 +2552,9 @@ final ArrayList list = new ArrayList(); {if (true) throw e;} } } - {if (true) return (ArgumentDeclaration[]) list.toArray();} + Expression[] arguments = new Expression[list.size()]; + list.toArray(arguments); + {if (true) return arguments;} throw new Error("Missing return statement in function"); } @@ -2712,7 +2781,7 @@ final ArrayList list = new ArrayList(); errorEnd = jj_input_stream.getPosition(); {if (true) throw e;} } - nbNodes = nodePtr-startIndex; + nbNodes = nodePtr-startIndex - 1; blockNodes = new AstNode[nbNodes]; System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes); {if (true) return new HTMLBlock(nodes);} @@ -2850,13 +2919,20 @@ final ArrayList list = new ArrayList(); case ASSIGN: jj_consume_token(ASSIGN); expression = Expression(); - {if (true) return new ListExpression((String[]) list.toArray(),expression,pos,SimpleCharStream.getPosition());} + String[] strings = new String[list.size()]; + list.toArray(strings); + {if (true) return new ListExpression(strings, + expression, + pos, + SimpleCharStream.getPosition());} break; default: jj_la1[79] = jj_gen; ; } - {if (true) return new ListExpression((String[]) list.toArray(),null,pos,SimpleCharStream.getPosition());} + String[] strings = new String[list.size()]; + list.toArray(strings); + {if (true) return new ListExpression(strings,pos,SimpleCharStream.getPosition());} throw new Error("Missing return statement in function"); } @@ -2887,7 +2963,9 @@ final ArrayList list = new ArrayList(); } try { jj_consume_token(SEMICOLON); - {if (true) return new EchoStatement((Expression[]) expressions.toArray(),pos);} + Expression[] exprs = new Expression[expressions.size()]; + expressions.toArray(exprs); + {if (true) return new EchoStatement(exprs,pos);} } catch (ParseException e) { if (e.currentToken.next.kind != 4) { errorMessage = "';' expected after 'echo' statement"; @@ -2924,10 +3002,12 @@ final ArrayList list = new ArrayList(); } try { jj_consume_token(SEMICOLON); - global = new GlobalStatement(currentSegment, - (String[]) vars.toArray(), - pos, - SimpleCharStream.getPosition()); + String[] strings = new String[vars.size()]; + vars.toArray(strings); + global = new GlobalStatement(currentSegment, + strings, + pos, + SimpleCharStream.getPosition()); currentSegment.add(global); {if (true) return global;} } catch (ParseException e) { @@ -2963,7 +3043,9 @@ final ArrayList list = new ArrayList(); } try { jj_consume_token(SEMICOLON); - {if (true) return new StaticStatement((String[])vars.toArray(), + String[] strings = new String[vars.size()]; + vars.toArray(strings); + {if (true) return new StaticStatement(strings, pos, SimpleCharStream.getPosition());} } catch (ParseException e) { @@ -2996,6 +3078,8 @@ final ArrayList list = new ArrayList(); */ static final public Block Block() throws ParseException { final int pos = SimpleCharStream.getPosition(); + final ArrayList list = new ArrayList(); + Statement statement; try { jj_consume_token(LBRACE); } catch (ParseException e) { @@ -3098,10 +3182,12 @@ final ArrayList list = new ArrayList(); case LBRACE: case SEMICOLON: case DOLLAR_ID: - BlockStatement(); + statement = BlockStatement(); + list.add(statement); break; case PHPEND: - htmlBlock(); + statement = htmlBlock(); + list.add(statement); break; default: jj_la1[84] = jj_gen; @@ -3118,6 +3204,9 @@ final ArrayList list = new ArrayList(); errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } + Statement[] statements = new Statement[list.size()]; + list.toArray(statements); + {if (true) return new Block(statements,pos,SimpleCharStream.getPosition());} throw new Error("Missing return statement in function"); } @@ -3264,25 +3353,36 @@ final ArrayList list = new ArrayList(); var = LocalVariableDeclarator(); list.add(var); } - {if (true) return (VariableDeclaration[]) list.toArray();} + VariableDeclaration[] vars = new VariableDeclaration[list.size()]; + list.toArray(vars); + {if (true) return vars;} throw new Error("Missing return statement in function"); } static final public VariableDeclaration LocalVariableDeclarator() throws ParseException { final String varName; - Expression init = null; + Expression initializer = null; final int pos = SimpleCharStream.getPosition(); varName = VariableDeclaratorId(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGN: jj_consume_token(ASSIGN); - init = Expression(); + initializer = Expression(); break; default: jj_la1[88] = jj_gen; ; } - {if (true) return new VariableDeclaration(varName.toCharArray(),init,pos);} + if (initializer == null) { + {if (true) return new VariableDeclaration(currentSegment, + varName.toCharArray(), + pos, + jj_input_stream.getPosition());} + } + {if (true) return new VariableDeclaration(currentSegment, + varName.toCharArray(), + initializer, + pos);} throw new Error("Missing return statement in function"); } @@ -3295,7 +3395,8 @@ final ArrayList list = new ArrayList(); } static final public Statement StatementExpression() throws ParseException { - Expression expr; + Expression expr,expr2; + int operator; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: case DECR: @@ -3327,15 +3428,15 @@ final ArrayList list = new ArrayList(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: jj_consume_token(INCR); - expr = new PostfixedUnaryExpression(expr, + {if (true) return new PostfixedUnaryExpression(expr, OperatorIds.PLUS_PLUS, - SimpleCharStream.getPosition()); + SimpleCharStream.getPosition());} break; case DECR: jj_consume_token(DECR); - expr = new PostfixedUnaryExpression(expr, + {if (true) return new PostfixedUnaryExpression(expr, OperatorIds.MINUS_MINUS, - SimpleCharStream.getPosition()); + SimpleCharStream.getPosition());} break; case ASSIGN: case PLUSASSIGN: @@ -3350,8 +3451,9 @@ final ArrayList list = new ArrayList(); case TILDEEQUAL: case LSHIFTASSIGN: case RSIGNEDSHIFTASSIGN: - AssignmentOperator(); - Expression(); + operator = AssignmentOperator(); + expr2 = Expression(); + {if (true) return new BinaryExpression(expr,expr2,operator);} break; default: jj_la1[89] = jj_gen; @@ -3363,6 +3465,7 @@ final ArrayList list = new ArrayList(); jj_la1[90] = jj_gen; ; } + {if (true) return expr;} break; default: jj_la1[91] = jj_gen; @@ -3443,7 +3546,9 @@ final ArrayList list = new ArrayList(); } try { jj_consume_token(RBRACE); - {if (true) return (AbstractCase[]) cases.toArray();} + AbstractCase[] abcase = new AbstractCase[cases.size()]; + cases.toArray(abcase); + {if (true) return abcase;} } catch (ParseException e) { errorMessage = "'}' expected"; errorLevel = ERROR; @@ -3498,7 +3603,9 @@ final ArrayList list = new ArrayList(); } try { jj_consume_token(SEMICOLON); - {if (true) return (AbstractCase[]) cases.toArray();} + AbstractCase[] abcase = new AbstractCase[cases.size()]; + cases.toArray(abcase); + {if (true) return abcase;} } catch (ParseException e) { errorMessage = "';' expected after 'endswitch' keyword"; errorLevel = ERROR; @@ -3628,10 +3735,12 @@ final ArrayList list = new ArrayList(); jj_la1[97] = jj_gen; ; } - if (expr == null) {//it's a default - {if (true) return new DefaultCase((Statement[]) stmts.toArray(),pos,SimpleCharStream.getPosition());} + Statement[] stmtsArray = new Statement[stmts.size()]; + stmts.toArray(stmtsArray); + if (expr == null) {//it's a default + {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());} } - {if (true) return new Case(expr,(Statement[]) stmts.toArray(),pos,SimpleCharStream.getPosition());} + {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());} throw new Error("Missing return statement in function"); } @@ -3772,14 +3881,19 @@ final ArrayList list = new ArrayList(); static final public IfStatement IfStatement0(Expression condition, final int start,final int end) throws ParseException { Statement statement; + Statement stmt; + final Statement[] statementsArray; ElseIf elseifStatement; Else elseStatement = null; - ArrayList stmts = new ArrayList(); - ArrayList elseifs = new ArrayList(); + ArrayList stmts; + final ArrayList elseIfList = new ArrayList(); + ElseIf[] elseIfs; int pos = SimpleCharStream.getPosition(); + int endStatements; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COLON: jj_consume_token(COLON); + stmts = new ArrayList(); label_32: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -3882,6 +3996,7 @@ final ArrayList list = new ArrayList(); throw new ParseException(); } } + endStatements = SimpleCharStream.getPosition(); label_33: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -3893,7 +4008,7 @@ final ArrayList list = new ArrayList(); break label_33; } elseifStatement = ElseIfStatementColon(); - elseifs.add(elseifStatement); + elseIfList.add(elseifStatement); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ELSE: @@ -3924,11 +4039,6 @@ final ArrayList list = new ArrayList(); } try { jj_consume_token(SEMICOLON); - {if (true) return new IfStatement(condition, - (ElseIf[]) elseifs.toArray(), - elseStatement, - pos, - SimpleCharStream.getPosition());} } catch (ParseException e) { errorMessage = "';' expected after 'endif' keyword"; errorLevel = ERROR; @@ -3936,6 +4046,25 @@ final ArrayList list = new ArrayList(); errorEnd = jj_input_stream.getPosition() + 1; {if (true) throw e;} } + elseIfs = new ElseIf[elseIfList.size()]; + elseIfList.toArray(elseIfs); + if (stmts.size() == 1) { + {if (true) return new IfStatement(condition, + (Statement) stmts.get(0), + elseIfs, + elseStatement, + pos, + SimpleCharStream.getPosition());} + } else { + statementsArray = new Statement[stmts.size()]; + stmts.toArray(statementsArray); + {if (true) return new IfStatement(condition, + new Block(statementsArray,pos,endStatements), + elseIfs, + elseStatement, + pos, + SimpleCharStream.getPosition());} + } break; case PHPEND: case IF: @@ -4017,17 +4146,16 @@ final ArrayList list = new ArrayList(); case LBRACE: case SEMICOLON: case DOLLAR_ID: - statement = Statement(); + stmt = Statement(); break; case PHPEND: - statement = htmlBlock(); + stmt = htmlBlock(); break; default: jj_la1[104] = jj_gen; jj_consume_token(-1); throw new ParseException(); } - stmts.add(statement); label_34: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -4039,7 +4167,7 @@ final ArrayList list = new ArrayList(); break label_34; } elseifStatement = ElseIfStatement(); - elseifs.add(elseifStatement); + elseIfList.add(elseifStatement); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ELSE: @@ -4063,11 +4191,14 @@ final ArrayList list = new ArrayList(); jj_la1[106] = jj_gen; ; } - {if (true) return new IfStatement(condition, - (ElseIf[]) elseifs.toArray(), - elseStatement, - pos, - SimpleCharStream.getPosition());} + elseIfs = new ElseIf[elseIfList.size()]; + elseIfList.toArray(elseIfs); + {if (true) return new IfStatement(condition, + stmt, + elseIfs, + elseStatement, + pos, + SimpleCharStream.getPosition());} break; default: jj_la1[107] = jj_gen; @@ -4187,7 +4318,9 @@ final ArrayList list = new ArrayList(); throw new ParseException(); } } - {if (true) return new ElseIf(condition,(Statement[]) list.toArray(),pos,SimpleCharStream.getPosition());} + Statement[] stmtsArray = new Statement[list.size()]; + list.toArray(stmtsArray); + {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());} throw new Error("Missing return statement in function"); } @@ -4299,7 +4432,9 @@ final ArrayList list = new ArrayList(); throw new ParseException(); } } - {if (true) return new Else((Statement[]) list.toArray(),pos,SimpleCharStream.getPosition());} + Statement[] stmtsArray = new Statement[list.size()]; + list.toArray(stmtsArray); + {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());} throw new Error("Missing return statement in function"); } @@ -4312,7 +4447,9 @@ final ArrayList list = new ArrayList(); condition = Condition("elseif"); statement = Statement(); list.add(statement);/*todo:do better*/ - {if (true) return new ElseIf(condition,(Statement[]) list.toArray(),pos,SimpleCharStream.getPosition());} + Statement[] stmtsArray = new Statement[list.size()]; + list.toArray(stmtsArray); + {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());} throw new Error("Missing return statement in function"); } @@ -4406,7 +4543,9 @@ final ArrayList list = new ArrayList(); } try { jj_consume_token(SEMICOLON); - {if (true) return new Block((Statement[]) stmts.toArray(),pos,SimpleCharStream.getPosition());} + Statement[] stmtsArray = new Statement[stmts.size()]; + stmts.toArray(stmtsArray); + {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());} } catch (ParseException e) { errorMessage = "';' expected after 'endwhile' keyword"; errorLevel = ERROR; @@ -4753,7 +4892,9 @@ final int startBlock, endBlock; } try { jj_consume_token(SEMICOLON); - {if (true) return new ForStatement(initializations,condition,increments,new Block((Statement[])list.toArray(),startBlock,endBlock),pos,SimpleCharStream.getPosition());} + Statement[] stmtsArray = new Statement[list.size()]; + list.toArray(stmtsArray); + {if (true) return new ForStatement(initializations,condition,increments,new Block(stmtsArray,startBlock,endBlock),pos,SimpleCharStream.getPosition());} } catch (ParseException e) { errorMessage = "';' expected after 'endfor' keyword"; errorLevel = ERROR; @@ -4815,7 +4956,9 @@ final int startBlock, endBlock; StatementExpression(); list.add(expr); } - {if (true) return (Statement[]) list.toArray();} + Statement[] stmtsArray = new Statement[list.size()]; + list.toArray(stmtsArray); + {if (true) return stmtsArray;} throw new Error("Missing return statement in function"); } @@ -4965,132 +5108,6 @@ final int startBlock, endBlock; return retval; } - static final private boolean jj_3R_160() { - 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_159() { - 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_157() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_159()) { - jj_scanpos = xsp; - if (jj_3R_160()) 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_166()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_152() { - if (jj_3R_158()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_151() { - if (jj_3R_157()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_156() { - 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_155() { - 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_148() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_150()) { - jj_scanpos = xsp; - if (jj_3R_151()) { - jj_scanpos = xsp; - if (jj_3R_152()) 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_150() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_155()) { - jj_scanpos = xsp; - if (jj_3R_156()) 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_139()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_154() { - if (jj_3R_148()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_149() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_153()) { - jj_scanpos = xsp; - if (jj_3R_154()) 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_153() { - if (jj_scan_token(AT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_149()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_144() { - if (jj_3R_149()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_139() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_143()) { - jj_scanpos = xsp; - if (jj_3R_144()) 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_143() { - if (jj_scan_token(BIT_AND)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_148()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3R_147() { if (jj_scan_token(REMAINDER)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5125,6 +5142,14 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_87() { + if (jj_scan_token(ASSIGN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_45()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + static final private boolean jj_3R_134() { if (jj_3R_139()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5174,10 +5199,8 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_87() { - if (jj_scan_token(ASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_45()) return true; + static final private boolean jj_3_7() { + if (jj_3R_46()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -5188,9 +5211,13 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3_7() { - if (jj_3R_46()) return true; + static final private boolean jj_3R_57() { + if (jj_3R_50()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_87()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -5208,14 +5235,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_201() { - if (jj_scan_token(ARRAYASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_45()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3R_197() { if (jj_3R_41()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5256,6 +5275,14 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3_6() { + if (jj_3R_45()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(SEMICOLON)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + static final private boolean jj_3R_121() { if (jj_3R_128()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5268,10 +5295,10 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3_6() { - if (jj_3R_45()) return true; + static final private boolean jj_3R_58() { + if (jj_scan_token(COMMA)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(SEMICOLON)) return true; + if (jj_3R_57()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -5291,6 +5318,18 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_47() { + if (jj_3R_57()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_58()) { jj_scanpos = xsp; break; } + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } + return false; + } + static final private boolean jj_3R_133() { if (jj_scan_token(GE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5315,16 +5354,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_41() { - if (jj_3R_45()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_201()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3R_122() { Token xsp; xsp = jj_scanpos; @@ -5344,6 +5373,14 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_201() { + if (jj_scan_token(ARRAYASSIGN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_45()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + static final private boolean jj_3R_119() { if (jj_3R_121()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5356,12 +5393,12 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_57() { - if (jj_3R_50()) return true; + static final private boolean jj_3R_41() { + if (jj_3R_45()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; Token xsp; xsp = jj_scanpos; - if (jj_3R_87()) jj_scanpos = xsp; + if (jj_3R_201()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -5386,26 +5423,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_58() { - if (jj_scan_token(COMMA)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_57()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_47() { - if (jj_3R_57()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_58()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - static final private boolean jj_3R_200() { if (jj_3R_202()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5442,24 +5459,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_93() { - if (jj_3R_52()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_199() { - 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_200()) 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_120() { Token xsp; xsp = jj_scanpos; @@ -5482,6 +5481,12 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_93() { + if (jj_3R_52()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + static final private boolean jj_3R_117() { if (jj_3R_119()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5494,6 +5499,18 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_199() { + 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_200()) 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_108() { if (jj_scan_token(LBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5516,12 +5533,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_176() { - 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_118() { if (jj_scan_token(BIT_AND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5530,6 +5541,12 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_176() { + 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_175() { if (jj_scan_token(TRUE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5544,12 +5561,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_174() { - 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_115() { if (jj_3R_117()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5562,6 +5573,12 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_174() { + 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_173() { if (jj_scan_token(FLOATING_POINT_LITERAL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5605,6 +5622,16 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_89() { + if (jj_scan_token(IDENTIFIER)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_108()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + static final private boolean jj_3R_92() { if (jj_3R_45()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5622,16 +5649,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_89() { - if (jj_scan_token(IDENTIFIER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_108()) jj_scanpos = xsp; - else 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_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5644,6 +5661,14 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_46() { + 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_88() { if (jj_scan_token(LBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5681,14 +5706,8 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_49() { - 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_60()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(RBRACKET)) return true; + static final private boolean jj_3_8() { + if (jj_3R_47()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -5713,6 +5732,18 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_49() { + 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_60()) 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_95() { if (jj_scan_token(DOLLAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5729,6 +5760,18 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_104() { + if (jj_3R_109()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_110()) { jj_scanpos = xsp; break; } + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } + return false; + } + static final private boolean jj_3R_48() { if (jj_scan_token(CLASSACCESS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5748,26 +5791,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_104() { - if (jj_3R_109()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_110()) { 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(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_94() { if (jj_scan_token(DOLLAR_ID)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5789,14 +5812,20 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_196() { - if (jj_3R_40()) return true; + static final private boolean jj_3R_112() { + 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_112() { - if (jj_scan_token(_ANDL)) return true; + static final private boolean jj_3R_111() { + if (jj_scan_token(AND_AND)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_196() { + if (jj_3R_40()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -5818,12 +5847,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_111() { - if (jj_scan_token(AND_AND)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3R_105() { Token xsp; xsp = jj_scanpos; @@ -5867,6 +5890,18 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_107() { + 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_106() { + if (jj_scan_token(OR_OR)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + static final private boolean jj_3R_186() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5890,14 +5925,15 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_107() { - if (jj_scan_token(_ORL)) return true; + static final private boolean jj_3R_103() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_106()) { + jj_scanpos = xsp; + if (jj_3R_107()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_106() { - if (jj_scan_token(OR_OR)) return true; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_102()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -5914,19 +5950,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_103() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_106()) { - jj_scanpos = xsp; - if (jj_3R_107()) 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_102()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3R_96() { if (jj_3R_102()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5955,14 +5978,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_190() { - if (jj_scan_token(NEW)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_178()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3R_74() { if (jj_scan_token(TILDEEQUAL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5981,23 +5996,11 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_189() { - if (jj_scan_token(IDENTIFIER)) return true; + static final private boolean jj_3R_190() { + if (jj_scan_token(NEW)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_180() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_189()) { - jj_scanpos = xsp; - if (jj_3R_190()) { - jj_scanpos = xsp; - if (jj_3R_191()) return true; + if (jj_3R_178()) 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; } @@ -6019,6 +6022,26 @@ final int startBlock, endBlock; 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_180() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_189()) { + jj_scanpos = xsp; + if (jj_3R_190()) { + jj_scanpos = xsp; + if (jj_3R_191()) 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_68() { if (jj_scan_token(LSHIFTASSIGN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -6119,12 +6142,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3_8() { - if (jj_3R_47()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3R_181() { if (jj_3R_188()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -6143,6 +6160,14 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_101() { + if (jj_scan_token(ASSIGN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_45()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + static final private boolean jj_3R_179() { if (jj_3R_188()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -6159,14 +6184,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_101() { - if (jj_scan_token(ASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_45()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3_5() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -6215,32 +6232,17 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_194() { - 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_54() { if (jj_3R_85()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_193() { - if (jj_scan_token(INCR)) return true; + static final private boolean jj_3R_100() { + 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_185() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_193()) { - jj_scanpos = xsp; - if (jj_3R_194()) return true; + if (jj_3R_50()) 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; } @@ -6267,21 +6269,26 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_168() { - if (jj_3R_166()) return true; + static final private boolean jj_3R_194() { + if (jj_scan_token(DECR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_185()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_100() { - if (jj_scan_token(COMMA)) return true; + static final private boolean jj_3R_193() { + if (jj_scan_token(INCR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_50()) return true; + return false; + } + + static final private boolean jj_3R_185() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_193()) { + jj_scanpos = xsp; + if (jj_3R_194()) 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; } @@ -6291,12 +6298,28 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_168() { + if (jj_3R_166()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_185()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + static final private boolean jj_3R_83() { if (jj_scan_token(OBJECT)) 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(INTEGER)) 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(ARRAY)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -6309,9 +6332,31 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_82() { - if (jj_scan_token(INTEGER)) return true; + static final private boolean jj_3R_81() { + if (jj_scan_token(INT)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_85() { + 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_99()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + while (true) { + xsp = jj_scanpos; + if (jj_3R_100()) { jj_scanpos = xsp; break; } + 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_101()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -6321,8 +6366,8 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_81() { - if (jj_scan_token(INT)) return true; + static final private boolean jj_3R_80() { + if (jj_scan_token(FLOAT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -6344,8 +6389,8 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_80() { - if (jj_scan_token(FLOAT)) return true; + static final private boolean jj_3R_79() { + if (jj_scan_token(DOUBLE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -6356,42 +6401,28 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_79() { - if (jj_scan_token(DOUBLE)) return true; + static final private boolean jj_3R_78() { + if (jj_scan_token(REAL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_85() { - 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_99()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - while (true) { - xsp = jj_scanpos; - if (jj_3R_100()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - if (jj_scan_token(RPAREN)) return true; + static final private boolean jj_3R_77() { + if (jj_scan_token(BOOLEAN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_101()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_78() { - if (jj_scan_token(REAL)) return true; + static final private boolean jj_3R_84() { + if (jj_scan_token(PRINT)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_45()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_77() { - if (jj_scan_token(BOOLEAN)) return true; + static final private boolean jj_3R_76() { + if (jj_scan_token(BOOL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -6411,20 +6442,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_76() { - if (jj_scan_token(BOOL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_84() { - if (jj_scan_token(PRINT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_45()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3R_75() { if (jj_scan_token(STRING)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -6519,6 +6536,132 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_160() { + 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_159() { + 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_157() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_159()) { + jj_scanpos = xsp; + if (jj_3R_160()) 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_166()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_152() { + if (jj_3R_158()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_151() { + if (jj_3R_157()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_156() { + 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_155() { + 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_148() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_150()) { + jj_scanpos = xsp; + if (jj_3R_151()) { + jj_scanpos = xsp; + if (jj_3R_152()) 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_150() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_155()) { + jj_scanpos = xsp; + if (jj_3R_156()) 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_139()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_154() { + if (jj_3R_148()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_149() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_153()) { + jj_scanpos = xsp; + if (jj_3R_154()) 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_153() { + if (jj_scan_token(AT)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_149()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_144() { + if (jj_3R_149()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_139() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_143()) { + jj_scanpos = xsp; + if (jj_3R_144()) 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_143() { + if (jj_scan_token(BIT_AND)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_148()) return true; + 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;