1 /* Generated By:JavaCC: Do not edit this line. PHPParser.java */
4 import org.eclipse.core.resources.IFile;
5 import org.eclipse.core.resources.IMarker;
6 import org.eclipse.core.runtime.CoreException;
7 import org.eclipse.ui.texteditor.MarkerUtilities;
8 import org.eclipse.jface.preference.IPreferenceStore;
10 import java.util.Hashtable;
11 import java.util.Enumeration;
12 import java.util.ArrayList;
13 import java.io.StringReader;
15 import java.text.MessageFormat;
17 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
18 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
19 import net.sourceforge.phpdt.internal.compiler.ast.*;
20 import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
21 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
25 * This php parser is inspired by the Java 1.2 grammar example
26 * given with JavaCC. You can get JavaCC at http://www.webgain.com
27 * You can test the parser with the PHPParserTestCase2.java
28 * @author Matthieu Casanova
30 public final class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
32 /** The file that is parsed. */
33 private static IFile fileToParse;
35 /** The current segment. */
36 private static OutlineableWithChildren currentSegment;
38 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
39 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
40 static PHPOutlineInfo outlineInfo;
42 private static boolean assigning;
44 /** The error level of the current ParseException. */
45 private static int errorLevel = ERROR;
46 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
47 private static String errorMessage;
49 private static int errorStart = -1;
50 private static int errorEnd = -1;
51 private static PHPDocument phpDocument;
53 * The point where html starts.
54 * It will be used by the token manager to create HTMLCode objects
56 public static int htmlStart;
59 private final static int AstStackIncrement = 100;
60 /** The stack of node. */
61 private static AstNode[] nodes;
62 /** The cursor in expression stack. */
63 private static int nodePtr;
65 public final void setFileToParse(final IFile fileToParse) {
66 this.fileToParse = fileToParse;
72 public PHPParser(final IFile fileToParse) {
73 this(new StringReader(""));
74 this.fileToParse = fileToParse;
78 * Reinitialize the parser.
80 private static final void init() {
81 nodes = new AstNode[AstStackIncrement];
87 * Add an php node on the stack.
88 * @param node the node that will be added to the stack
90 private static final void pushOnAstNodes(AstNode node) {
92 nodes[++nodePtr] = node;
93 } catch (IndexOutOfBoundsException e) {
94 int oldStackLength = nodes.length;
95 AstNode[] oldStack = nodes;
96 nodes = new AstNode[oldStackLength + AstStackIncrement];
97 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
98 nodePtr = oldStackLength;
99 nodes[nodePtr] = node;
103 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
104 phpDocument = new PHPDocument(parent,"_root".toCharArray());
105 currentSegment = phpDocument;
106 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
107 final StringReader stream = new StringReader(s);
108 if (jj_input_stream == null) {
109 jj_input_stream = new SimpleCharStream(stream, 1, 1);
115 phpDocument.nodes = new AstNode[nodes.length];
116 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
117 if (PHPeclipsePlugin.DEBUG) {
118 PHPeclipsePlugin.log(1,phpDocument.toString());
120 } catch (ParseException e) {
121 processParseException(e);
127 * This method will process the parse exception.
128 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
129 * @param e the ParseException
131 private static void processParseException(final ParseException e) {
132 if (errorMessage == null) {
133 PHPeclipsePlugin.log(e);
134 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
135 errorStart = SimpleCharStream.getPosition();
136 errorEnd = errorStart + 1;
143 * Create marker for the parse error
144 * @param e the ParseException
146 private static void setMarker(final ParseException e) {
148 if (errorStart == -1) {
149 setMarker(fileToParse,
151 SimpleCharStream.tokenBegin,
152 SimpleCharStream.tokenBegin + e.currentToken.image.length(),
154 "Line " + e.currentToken.beginLine);
156 setMarker(fileToParse,
161 "Line " + e.currentToken.beginLine);
165 } catch (CoreException e2) {
166 PHPeclipsePlugin.log(e2);
171 * Create markers according to the external parser output
173 private static void createMarkers(final String output, final IFile file) throws CoreException {
174 // delete all markers
175 file.deleteMarkers(IMarker.PROBLEM, false, 0);
180 while ((brIndx = output.indexOf("<br />", indx)) != -1) {
181 // newer php error output (tested with 4.2.3)
182 scanLine(output, file, indx, brIndx);
187 while ((brIndx = output.indexOf("<br>", indx)) != -1) {
188 // older php error output (tested with 4.2.3)
189 scanLine(output, file, indx, brIndx);
195 private static void scanLine(final String output,
198 final int brIndx) throws CoreException {
200 StringBuffer lineNumberBuffer = new StringBuffer(10);
202 current = output.substring(indx, brIndx);
204 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
205 int onLine = current.indexOf("on line <b>");
207 lineNumberBuffer.delete(0, lineNumberBuffer.length());
208 for (int i = onLine; i < current.length(); i++) {
209 ch = current.charAt(i);
210 if ('0' <= ch && '9' >= ch) {
211 lineNumberBuffer.append(ch);
215 int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
217 Hashtable attributes = new Hashtable();
219 current = current.replaceAll("\n", "");
220 current = current.replaceAll("<b>", "");
221 current = current.replaceAll("</b>", "");
222 MarkerUtilities.setMessage(attributes, current);
224 if (current.indexOf(PARSE_ERROR_STRING) != -1)
225 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
226 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
227 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
229 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
230 MarkerUtilities.setLineNumber(attributes, lineNumber);
231 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
236 public final void parse(final String s) throws CoreException {
237 final StringReader stream = new StringReader(s);
238 if (jj_input_stream == null) {
239 jj_input_stream = new SimpleCharStream(stream, 1, 1);
245 } catch (ParseException e) {
246 processParseException(e);
251 * Call the php parse command ( php -l -f <filename> )
252 * and create markers according to the external parser output
254 public static void phpExternalParse(final IFile file) {
255 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
256 final String filename = file.getLocation().toString();
258 final String[] arguments = { filename };
259 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
260 final String command = form.format(arguments);
262 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
265 // parse the buffer to find the errors and warnings
266 createMarkers(parserResult, file);
267 } catch (CoreException e) {
268 PHPeclipsePlugin.log(e);
273 * Put a new html block in the stack.
275 public static final void createNewHTMLCode() {
276 final int currentPosition = SimpleCharStream.getPosition();
277 if (currentPosition == htmlStart) {
280 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray();
281 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
284 private static final void parse() throws ParseException {
288 static final public void phpFile() throws ParseException {
292 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
330 case INTEGER_LITERAL:
331 case FLOATING_POINT_LITERAL:
347 } catch (TokenMgrError e) {
348 PHPeclipsePlugin.log(e);
349 errorStart = SimpleCharStream.getPosition();
350 errorEnd = errorStart + 1;
351 errorMessage = e.getMessage();
353 {if (true) throw generateParseException();}
358 * A php block is a <?= expression [;]?>
359 * or <?php somephpcode ?>
360 * or <? somephpcode ?>
362 static final public void PhpBlock() throws ParseException {
363 final int start = SimpleCharStream.getPosition();
364 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
404 case INTEGER_LITERAL:
405 case FLOATING_POINT_LITERAL:
412 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
415 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
417 jj_consume_token(PHPSTARTLONG);
420 jj_consume_token(PHPSTARTSHORT);
422 setMarker(fileToParse,
423 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
425 SimpleCharStream.getPosition(),
427 "Line " + token.beginLine);
428 } catch (CoreException e) {
429 PHPeclipsePlugin.log(e);
434 jj_consume_token(-1);
435 throw new ParseException();
444 jj_consume_token(PHPEND);
445 } catch (ParseException e) {
446 errorMessage = "'?>' expected";
448 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
449 errorEnd = SimpleCharStream.getPosition() + 1;
455 jj_consume_token(-1);
456 throw new ParseException();
460 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
461 final Expression expr;
462 final int pos = SimpleCharStream.getPosition();
463 PHPEchoBlock echoBlock;
464 jj_consume_token(PHPECHOSTART);
466 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
468 jj_consume_token(SEMICOLON);
474 jj_consume_token(PHPEND);
475 echoBlock = new PHPEchoBlock(expr,pos,SimpleCharStream.getPosition());
476 pushOnAstNodes(echoBlock);
477 {if (true) return echoBlock;}
478 throw new Error("Missing return statement in function");
481 static final public void Php() throws ParseException {
484 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
518 case INTEGER_LITERAL:
519 case FLOATING_POINT_LITERAL:
536 static final public ClassDeclaration ClassDeclaration() throws ParseException {
537 final ClassDeclaration classDeclaration;
538 final Token className;
539 Token superclassName = null;
541 jj_consume_token(CLASS);
543 pos = SimpleCharStream.getPosition();
544 className = jj_consume_token(IDENTIFIER);
545 } catch (ParseException e) {
546 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
548 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
549 errorEnd = SimpleCharStream.getPosition() + 1;
552 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
554 jj_consume_token(EXTENDS);
556 superclassName = jj_consume_token(IDENTIFIER);
557 } catch (ParseException e) {
558 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
560 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
561 errorEnd = SimpleCharStream.getPosition() + 1;
569 if (superclassName == null) {
570 classDeclaration = new ClassDeclaration(currentSegment,
571 className.image.toCharArray(),
575 classDeclaration = new ClassDeclaration(currentSegment,
576 className.image.toCharArray(),
577 superclassName.image.toCharArray(),
581 currentSegment.add(classDeclaration);
582 currentSegment = classDeclaration;
583 ClassBody(classDeclaration);
584 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
585 classDeclaration.sourceEnd = SimpleCharStream.getPosition();
586 pushOnAstNodes(classDeclaration);
587 {if (true) return classDeclaration;}
588 throw new Error("Missing return statement in function");
591 static final public void ClassBody(ClassDeclaration classDeclaration) throws ParseException {
593 jj_consume_token(LBRACE);
594 } catch (ParseException e) {
595 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "', '{' expected";
597 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
598 errorEnd = SimpleCharStream.getPosition() + 1;
603 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
612 ClassBodyDeclaration(classDeclaration);
615 jj_consume_token(RBRACE);
616 } catch (ParseException e) {
617 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', 'var', 'function' or '}' expected";
619 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
620 errorEnd = SimpleCharStream.getPosition() + 1;
626 * A class can contain only methods and fields.
628 static final public void ClassBodyDeclaration(ClassDeclaration classDeclaration) throws ParseException {
629 MethodDeclaration method;
630 FieldDeclaration field;
631 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
633 method = MethodDeclaration();
634 method.setParent(classDeclaration);
637 field = FieldDeclaration();
641 jj_consume_token(-1);
642 throw new ParseException();
647 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
649 static final public FieldDeclaration FieldDeclaration() throws ParseException {
650 VariableDeclaration variableDeclaration;
651 VariableDeclaration[] list;
652 final ArrayList arrayList = new ArrayList();
653 final int pos = SimpleCharStream.getPosition();
654 jj_consume_token(VAR);
655 variableDeclaration = VariableDeclarator();
656 arrayList.add(variableDeclaration);
657 outlineInfo.addVariable(new String(variableDeclaration.name));
658 currentSegment.add(variableDeclaration);
661 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
669 jj_consume_token(COMMA);
670 variableDeclaration = VariableDeclarator();
671 arrayList.add(variableDeclaration);
672 outlineInfo.addVariable(new String(variableDeclaration.name));
673 currentSegment.add(variableDeclaration);
676 jj_consume_token(SEMICOLON);
677 } catch (ParseException e) {
678 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
680 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
681 errorEnd = SimpleCharStream.getPosition() + 1;
682 processParseException(e);
684 list = new VariableDeclaration[arrayList.size()];
685 arrayList.toArray(list);
686 {if (true) return new FieldDeclaration(list,
688 SimpleCharStream.getPosition(),
690 throw new Error("Missing return statement in function");
693 static final public VariableDeclaration VariableDeclarator() throws ParseException {
694 final String varName;
695 Expression initializer = null;
696 final int pos = SimpleCharStream.getPosition();
697 varName = VariableDeclaratorId();
698 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
700 jj_consume_token(ASSIGN);
702 initializer = VariableInitializer();
703 } catch (ParseException e) {
704 errorMessage = "Literal expression expected in variable initializer";
706 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
707 errorEnd = SimpleCharStream.getPosition() + 1;
715 if (initializer == null) {
716 {if (true) return new VariableDeclaration(currentSegment,
717 varName.toCharArray(),
719 SimpleCharStream.getPosition());}
721 {if (true) return new VariableDeclaration(currentSegment,
722 varName.toCharArray(),
725 throw new Error("Missing return statement in function");
730 * @return the variable name (with suffix)
732 static final public String VariableDeclaratorId() throws ParseException {
734 Expression expression;
735 final StringBuffer buff = new StringBuffer();
736 final int pos = SimpleCharStream.getPosition();
737 ConstantIdentifier ex;
748 ex = new ConstantIdentifier(expr.toCharArray(),
750 SimpleCharStream.getPosition());
751 expression = VariableSuffix(ex);
752 buff.append(expression.toStringExpression());
754 {if (true) return buff.toString();}
755 } catch (ParseException e) {
756 errorMessage = "'$' expected for variable identifier";
758 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
759 errorEnd = SimpleCharStream.getPosition() + 1;
762 throw new Error("Missing return statement in function");
765 static final public String Variable() throws ParseException {
766 final StringBuffer buff;
767 Expression expression = null;
770 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
772 token = jj_consume_token(DOLLAR_ID);
773 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
775 jj_consume_token(LBRACE);
776 expression = Expression();
777 jj_consume_token(RBRACE);
783 if (expression == null && !assigning) {
784 {if (true) return token.image.substring(1);}
786 buff = new StringBuffer(token.image);
788 buff.append(expression.toStringExpression());
790 {if (true) return buff.toString();}
793 jj_consume_token(DOLLAR);
794 expr = VariableName();
795 {if (true) return "$" + expr;}
799 jj_consume_token(-1);
800 throw new ParseException();
802 throw new Error("Missing return statement in function");
805 static final public String VariableName() throws ParseException {
806 final StringBuffer buff;
808 Expression expression = null;
810 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
812 jj_consume_token(LBRACE);
813 expression = Expression();
814 jj_consume_token(RBRACE);
815 buff = new StringBuffer("{");
816 buff.append(expression.toStringExpression());
818 {if (true) return buff.toString();}
821 token = jj_consume_token(IDENTIFIER);
822 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
824 jj_consume_token(LBRACE);
825 expression = Expression();
826 jj_consume_token(RBRACE);
832 if (expression == null) {
833 {if (true) return token.image;}
835 buff = new StringBuffer(token.image);
837 buff.append(expression.toStringExpression());
839 {if (true) return buff.toString();}
842 jj_consume_token(DOLLAR);
843 expr = VariableName();
844 buff = new StringBuffer("$");
846 {if (true) return buff.toString();}
849 token = jj_consume_token(DOLLAR_ID);
850 {if (true) return token.image;}
854 jj_consume_token(-1);
855 throw new ParseException();
857 throw new Error("Missing return statement in function");
860 static final public Expression VariableInitializer() throws ParseException {
861 final Expression expr;
863 final int pos = SimpleCharStream.getPosition();
864 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
868 case INTEGER_LITERAL:
869 case FLOATING_POINT_LITERAL:
872 {if (true) return expr;}
875 jj_consume_token(MINUS);
876 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
877 case INTEGER_LITERAL:
878 token = jj_consume_token(INTEGER_LITERAL);
880 case FLOATING_POINT_LITERAL:
881 token = jj_consume_token(FLOATING_POINT_LITERAL);
885 jj_consume_token(-1);
886 throw new ParseException();
888 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
890 SimpleCharStream.getPosition()),
895 jj_consume_token(PLUS);
896 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
897 case INTEGER_LITERAL:
898 token = jj_consume_token(INTEGER_LITERAL);
900 case FLOATING_POINT_LITERAL:
901 token = jj_consume_token(FLOATING_POINT_LITERAL);
905 jj_consume_token(-1);
906 throw new ParseException();
908 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
910 SimpleCharStream.getPosition()),
915 expr = ArrayDeclarator();
916 {if (true) return expr;}
919 token = jj_consume_token(IDENTIFIER);
920 {if (true) return new ConstantIdentifier(token.image.toCharArray(),pos,SimpleCharStream.getPosition());}
924 jj_consume_token(-1);
925 throw new ParseException();
927 throw new Error("Missing return statement in function");
930 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
931 Expression expr,expr2;
933 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
935 jj_consume_token(ARRAYASSIGN);
936 expr2 = Expression();
937 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
943 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
944 throw new Error("Missing return statement in function");
947 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
948 ArrayVariableDeclaration expr;
949 final ArrayList list = new ArrayList();
950 jj_consume_token(LPAREN);
951 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
967 case INTEGER_LITERAL:
968 case FLOATING_POINT_LITERAL:
973 expr = ArrayVariable();
982 jj_consume_token(COMMA);
983 expr = ArrayVariable();
991 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
993 jj_consume_token(COMMA);
1000 jj_consume_token(RPAREN);
1001 ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1003 {if (true) return vars;}
1004 throw new Error("Missing return statement in function");
1008 * A Method Declaration.
1009 * <b>function</b> MetodDeclarator() Block()
1011 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1012 final MethodDeclaration functionDeclaration;
1014 jj_consume_token(FUNCTION);
1016 functionDeclaration = MethodDeclarator();
1017 outlineInfo.addVariable(new String(functionDeclaration.name));
1018 } catch (ParseException e) {
1019 if (errorMessage != null) {if (true) throw e;}
1020 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1022 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1023 errorEnd = SimpleCharStream.getPosition() + 1;
1024 {if (true) throw e;}
1026 if (currentSegment != null) {
1027 currentSegment.add(functionDeclaration);
1028 currentSegment = functionDeclaration;
1031 functionDeclaration.statements = block.statements;
1032 if (currentSegment != null) {
1033 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
1035 {if (true) return functionDeclaration;}
1036 throw new Error("Missing return statement in function");
1040 * A MethodDeclarator.
1041 * [&] IDENTIFIER(parameters ...).
1042 * @return a function description for the outline
1044 static final public MethodDeclaration MethodDeclarator() throws ParseException {
1045 final Token identifier;
1046 Token reference = null;
1047 final Hashtable formalParameters;
1048 final int pos = SimpleCharStream.getPosition();
1049 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1051 reference = jj_consume_token(BIT_AND);
1054 jj_la1[21] = jj_gen;
1057 identifier = jj_consume_token(IDENTIFIER);
1058 formalParameters = FormalParameters();
1059 {if (true) return new MethodDeclaration(currentSegment,
1060 identifier.image.toCharArray(),
1064 SimpleCharStream.getPosition());}
1065 throw new Error("Missing return statement in function");
1069 * FormalParameters follows method identifier.
1070 * (FormalParameter())
1072 static final public Hashtable FormalParameters() throws ParseException {
1073 VariableDeclaration var;
1074 final Hashtable parameters = new Hashtable();
1076 jj_consume_token(LPAREN);
1077 } catch (ParseException e) {
1078 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1080 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1081 errorEnd = SimpleCharStream.getPosition() + 1;
1082 {if (true) throw e;}
1084 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1088 var = FormalParameter();
1089 parameters.put(new String(var.name),var);
1092 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1097 jj_la1[22] = jj_gen;
1100 jj_consume_token(COMMA);
1101 var = FormalParameter();
1102 parameters.put(new String(var.name),var);
1106 jj_la1[23] = jj_gen;
1110 jj_consume_token(RPAREN);
1111 } catch (ParseException e) {
1112 errorMessage = "')' expected";
1114 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1115 errorEnd = SimpleCharStream.getPosition() + 1;
1116 {if (true) throw e;}
1118 {if (true) return parameters;}
1119 throw new Error("Missing return statement in function");
1123 * A formal parameter.
1124 * $varname[=value] (,$varname[=value])
1126 static final public VariableDeclaration FormalParameter() throws ParseException {
1127 final VariableDeclaration variableDeclaration;
1129 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1131 token = jj_consume_token(BIT_AND);
1134 jj_la1[24] = jj_gen;
1137 variableDeclaration = VariableDeclarator();
1138 if (token != null) {
1139 variableDeclaration.setReference(true);
1141 {if (true) return variableDeclaration;}
1142 throw new Error("Missing return statement in function");
1145 static final public ConstantIdentifier Type() throws ParseException {
1147 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1149 jj_consume_token(STRING);
1150 pos = SimpleCharStream.getPosition();
1151 {if (true) return new ConstantIdentifier(Types.STRING,pos,pos-6);}
1154 jj_consume_token(BOOL);
1155 pos = SimpleCharStream.getPosition();
1156 {if (true) return new ConstantIdentifier(Types.BOOL,pos,pos-4);}
1159 jj_consume_token(BOOLEAN);
1160 pos = SimpleCharStream.getPosition();
1161 {if (true) return new ConstantIdentifier(Types.BOOLEAN,pos,pos-7);}
1164 jj_consume_token(REAL);
1165 pos = SimpleCharStream.getPosition();
1166 {if (true) return new ConstantIdentifier(Types.REAL,pos,pos-4);}
1169 jj_consume_token(DOUBLE);
1170 pos = SimpleCharStream.getPosition();
1171 {if (true) return new ConstantIdentifier(Types.DOUBLE,pos,pos-5);}
1174 jj_consume_token(FLOAT);
1175 pos = SimpleCharStream.getPosition();
1176 {if (true) return new ConstantIdentifier(Types.FLOAT,pos,pos-5);}
1179 jj_consume_token(INT);
1180 pos = SimpleCharStream.getPosition();
1181 {if (true) return new ConstantIdentifier(Types.INT,pos,pos-3);}
1184 jj_consume_token(INTEGER);
1185 pos = SimpleCharStream.getPosition();
1186 {if (true) return new ConstantIdentifier(Types.INTEGER,pos,pos-7);}
1189 jj_consume_token(OBJECT);
1190 pos = SimpleCharStream.getPosition();
1191 {if (true) return new ConstantIdentifier(Types.OBJECT,pos,pos-6);}
1194 jj_la1[25] = jj_gen;
1195 jj_consume_token(-1);
1196 throw new ParseException();
1198 throw new Error("Missing return statement in function");
1201 static final public Expression Expression() throws ParseException {
1202 final Expression expr;
1203 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1205 expr = PrintExpression();
1206 {if (true) return expr;}
1209 expr = ListExpression();
1210 {if (true) return expr;}
1213 jj_la1[26] = jj_gen;
1214 if (jj_2_3(2147483647)) {
1215 expr = varAssignation();
1216 {if (true) return expr;}
1218 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1232 case INTEGER_LITERAL:
1233 case FLOATING_POINT_LITERAL:
1234 case STRING_LITERAL:
1238 expr = ConditionalExpression();
1239 {if (true) return expr;}
1242 jj_la1[27] = jj_gen;
1243 jj_consume_token(-1);
1244 throw new ParseException();
1248 throw new Error("Missing return statement in function");
1252 * A Variable assignation.
1253 * varName (an assign operator) any expression
1255 static final public VarAssignation varAssignation() throws ParseException {
1257 final Expression expression;
1258 final int assignOperator;
1259 final int pos = SimpleCharStream.getPosition();
1260 varName = VariableDeclaratorId();
1261 assignOperator = AssignmentOperator();
1263 expression = Expression();
1264 } catch (ParseException e) {
1265 if (errorMessage != null) {
1266 {if (true) throw e;}
1268 errorMessage = "expression expected";
1270 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1271 errorEnd = SimpleCharStream.getPosition() + 1;
1272 {if (true) throw e;}
1274 {if (true) return new VarAssignation(varName.toCharArray(),
1278 SimpleCharStream.getPosition());}
1279 throw new Error("Missing return statement in function");
1282 static final public int AssignmentOperator() throws ParseException {
1283 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1285 jj_consume_token(ASSIGN);
1286 {if (true) return VarAssignation.EQUAL;}
1289 jj_consume_token(STARASSIGN);
1290 {if (true) return VarAssignation.STAR_EQUAL;}
1293 jj_consume_token(SLASHASSIGN);
1294 {if (true) return VarAssignation.SLASH_EQUAL;}
1297 jj_consume_token(REMASSIGN);
1298 {if (true) return VarAssignation.REM_EQUAL;}
1301 jj_consume_token(PLUSASSIGN);
1302 {if (true) return VarAssignation.PLUS_EQUAL;}
1305 jj_consume_token(MINUSASSIGN);
1306 {if (true) return VarAssignation.MINUS_EQUAL;}
1309 jj_consume_token(LSHIFTASSIGN);
1310 {if (true) return VarAssignation.LSHIFT_EQUAL;}
1312 case RSIGNEDSHIFTASSIGN:
1313 jj_consume_token(RSIGNEDSHIFTASSIGN);
1314 {if (true) return VarAssignation.RSIGNEDSHIFT_EQUAL;}
1317 jj_consume_token(ANDASSIGN);
1318 {if (true) return VarAssignation.AND_EQUAL;}
1321 jj_consume_token(XORASSIGN);
1322 {if (true) return VarAssignation.XOR_EQUAL;}
1325 jj_consume_token(ORASSIGN);
1326 {if (true) return VarAssignation.OR_EQUAL;}
1329 jj_consume_token(DOTASSIGN);
1330 {if (true) return VarAssignation.DOT_EQUAL;}
1333 jj_consume_token(TILDEEQUAL);
1334 {if (true) return VarAssignation.TILDE_EQUAL;}
1337 jj_la1[28] = jj_gen;
1338 jj_consume_token(-1);
1339 throw new ParseException();
1341 throw new Error("Missing return statement in function");
1344 static final public Expression ConditionalExpression() throws ParseException {
1345 final Expression expr;
1346 Expression expr2 = null;
1347 Expression expr3 = null;
1348 expr = ConditionalOrExpression();
1349 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1351 jj_consume_token(HOOK);
1352 expr2 = Expression();
1353 jj_consume_token(COLON);
1354 expr3 = ConditionalExpression();
1357 jj_la1[29] = jj_gen;
1360 if (expr3 == null) {
1361 {if (true) return expr;}
1363 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1364 throw new Error("Missing return statement in function");
1367 static final public Expression ConditionalOrExpression() throws ParseException {
1368 Expression expr,expr2;
1370 expr = ConditionalAndExpression();
1373 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1379 jj_la1[30] = jj_gen;
1382 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1384 jj_consume_token(OR_OR);
1385 operator = OperatorIds.OR_OR;
1388 jj_consume_token(_ORL);
1389 operator = OperatorIds.ORL;
1392 jj_la1[31] = jj_gen;
1393 jj_consume_token(-1);
1394 throw new ParseException();
1396 expr2 = ConditionalAndExpression();
1397 expr = new BinaryExpression(expr,expr2,operator);
1399 {if (true) return expr;}
1400 throw new Error("Missing return statement in function");
1403 static final public Expression ConditionalAndExpression() throws ParseException {
1404 Expression expr,expr2;
1406 expr = ConcatExpression();
1409 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1415 jj_la1[32] = jj_gen;
1418 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1420 jj_consume_token(AND_AND);
1421 operator = OperatorIds.AND_AND;
1424 jj_consume_token(_ANDL);
1425 operator = OperatorIds.ANDL;
1428 jj_la1[33] = jj_gen;
1429 jj_consume_token(-1);
1430 throw new ParseException();
1432 expr2 = ConcatExpression();
1433 expr = new BinaryExpression(expr,expr2,operator);
1435 {if (true) return expr;}
1436 throw new Error("Missing return statement in function");
1439 static final public Expression ConcatExpression() throws ParseException {
1440 Expression expr,expr2;
1441 expr = InclusiveOrExpression();
1444 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1449 jj_la1[34] = jj_gen;
1452 jj_consume_token(DOT);
1453 expr2 = InclusiveOrExpression();
1454 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1456 {if (true) return expr;}
1457 throw new Error("Missing return statement in function");
1460 static final public Expression InclusiveOrExpression() throws ParseException {
1461 Expression expr,expr2;
1462 expr = ExclusiveOrExpression();
1465 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1470 jj_la1[35] = jj_gen;
1473 jj_consume_token(BIT_OR);
1474 expr2 = ExclusiveOrExpression();
1475 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1477 {if (true) return expr;}
1478 throw new Error("Missing return statement in function");
1481 static final public Expression ExclusiveOrExpression() throws ParseException {
1482 Expression expr,expr2;
1483 expr = AndExpression();
1486 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1491 jj_la1[36] = jj_gen;
1494 jj_consume_token(XOR);
1495 expr2 = AndExpression();
1496 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1498 {if (true) return expr;}
1499 throw new Error("Missing return statement in function");
1502 static final public Expression AndExpression() throws ParseException {
1503 Expression expr,expr2;
1504 expr = EqualityExpression();
1507 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1512 jj_la1[37] = jj_gen;
1515 jj_consume_token(BIT_AND);
1516 expr2 = EqualityExpression();
1517 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1519 {if (true) return expr;}
1520 throw new Error("Missing return statement in function");
1523 static final public Expression EqualityExpression() throws ParseException {
1524 Expression expr,expr2;
1526 expr = RelationalExpression();
1529 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1533 case BANGDOUBLEEQUAL:
1538 jj_la1[38] = jj_gen;
1541 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1543 jj_consume_token(EQUAL_EQUAL);
1544 operator = OperatorIds.EQUAL_EQUAL;
1547 jj_consume_token(DIF);
1548 operator = OperatorIds.DIF;
1551 jj_consume_token(NOT_EQUAL);
1552 operator = OperatorIds.DIF;
1554 case BANGDOUBLEEQUAL:
1555 jj_consume_token(BANGDOUBLEEQUAL);
1556 operator = OperatorIds.BANG_EQUAL_EQUAL;
1559 jj_consume_token(TRIPLEEQUAL);
1560 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1563 jj_la1[39] = jj_gen;
1564 jj_consume_token(-1);
1565 throw new ParseException();
1568 expr2 = RelationalExpression();
1569 } catch (ParseException e) {
1570 if (errorMessage != null) {
1571 {if (true) throw e;}
1573 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1575 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1576 errorEnd = SimpleCharStream.getPosition() + 1;
1577 {if (true) throw e;}
1579 expr = new BinaryExpression(expr,expr2,operator);
1581 {if (true) return expr;}
1582 throw new Error("Missing return statement in function");
1585 static final public Expression RelationalExpression() throws ParseException {
1586 Expression expr,expr2;
1588 expr = ShiftExpression();
1591 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1599 jj_la1[40] = jj_gen;
1602 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1604 jj_consume_token(LT);
1605 operator = OperatorIds.LESS;
1608 jj_consume_token(GT);
1609 operator = OperatorIds.GREATER;
1612 jj_consume_token(LE);
1613 operator = OperatorIds.LESS_EQUAL;
1616 jj_consume_token(GE);
1617 operator = OperatorIds.GREATER_EQUAL;
1620 jj_la1[41] = jj_gen;
1621 jj_consume_token(-1);
1622 throw new ParseException();
1624 expr2 = ShiftExpression();
1625 expr = new BinaryExpression(expr,expr2,operator);
1627 {if (true) return expr;}
1628 throw new Error("Missing return statement in function");
1631 static final public Expression ShiftExpression() throws ParseException {
1632 Expression expr,expr2;
1634 expr = AdditiveExpression();
1637 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1640 case RUNSIGNEDSHIFT:
1644 jj_la1[42] = jj_gen;
1647 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1649 jj_consume_token(LSHIFT);
1650 operator = OperatorIds.LEFT_SHIFT;
1653 jj_consume_token(RSIGNEDSHIFT);
1654 operator = OperatorIds.RIGHT_SHIFT;
1656 case RUNSIGNEDSHIFT:
1657 jj_consume_token(RUNSIGNEDSHIFT);
1658 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1661 jj_la1[43] = jj_gen;
1662 jj_consume_token(-1);
1663 throw new ParseException();
1665 expr2 = AdditiveExpression();
1666 expr = new BinaryExpression(expr,expr2,operator);
1668 {if (true) return expr;}
1669 throw new Error("Missing return statement in function");
1672 static final public Expression AdditiveExpression() throws ParseException {
1673 Expression expr,expr2;
1675 expr = MultiplicativeExpression();
1678 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1684 jj_la1[44] = jj_gen;
1687 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1689 jj_consume_token(PLUS);
1690 operator = OperatorIds.PLUS;
1693 jj_consume_token(MINUS);
1694 operator = OperatorIds.MINUS;
1697 jj_la1[45] = jj_gen;
1698 jj_consume_token(-1);
1699 throw new ParseException();
1701 expr2 = MultiplicativeExpression();
1702 expr = new BinaryExpression(expr,expr2,operator);
1704 {if (true) return expr;}
1705 throw new Error("Missing return statement in function");
1708 static final public Expression MultiplicativeExpression() throws ParseException {
1709 Expression expr,expr2;
1712 expr = UnaryExpression();
1713 } catch (ParseException e) {
1714 if (errorMessage != null) {if (true) throw e;}
1715 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1717 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1718 errorEnd = SimpleCharStream.getPosition() + 1;
1719 {if (true) throw e;}
1723 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1730 jj_la1[46] = jj_gen;
1733 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1735 jj_consume_token(STAR);
1736 operator = OperatorIds.MULTIPLY;
1739 jj_consume_token(SLASH);
1740 operator = OperatorIds.DIVIDE;
1743 jj_consume_token(REMAINDER);
1744 operator = OperatorIds.REMAINDER;
1747 jj_la1[47] = jj_gen;
1748 jj_consume_token(-1);
1749 throw new ParseException();
1751 expr2 = UnaryExpression();
1752 expr = new BinaryExpression(expr,expr2,operator);
1754 {if (true) return expr;}
1755 throw new Error("Missing return statement in function");
1759 * An unary expression starting with @, & or nothing
1761 static final public Expression UnaryExpression() throws ParseException {
1763 final int pos = SimpleCharStream.getPosition();
1764 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1766 jj_consume_token(BIT_AND);
1767 expr = UnaryExpressionNoPrefix();
1768 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1782 case INTEGER_LITERAL:
1783 case FLOATING_POINT_LITERAL:
1784 case STRING_LITERAL:
1788 expr = AtUnaryExpression();
1789 {if (true) return expr;}
1792 jj_la1[48] = jj_gen;
1793 jj_consume_token(-1);
1794 throw new ParseException();
1796 throw new Error("Missing return statement in function");
1799 static final public Expression AtUnaryExpression() throws ParseException {
1801 final int pos = SimpleCharStream.getPosition();
1802 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1804 jj_consume_token(AT);
1805 expr = AtUnaryExpression();
1806 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,pos);}
1819 case INTEGER_LITERAL:
1820 case FLOATING_POINT_LITERAL:
1821 case STRING_LITERAL:
1825 expr = UnaryExpressionNoPrefix();
1826 {if (true) return expr;}
1829 jj_la1[49] = jj_gen;
1830 jj_consume_token(-1);
1831 throw new ParseException();
1833 throw new Error("Missing return statement in function");
1836 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
1839 final int pos = SimpleCharStream.getPosition();
1840 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1843 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1845 jj_consume_token(PLUS);
1846 operator = OperatorIds.PLUS;
1849 jj_consume_token(MINUS);
1850 operator = OperatorIds.MINUS;
1853 jj_la1[50] = jj_gen;
1854 jj_consume_token(-1);
1855 throw new ParseException();
1857 expr = UnaryExpression();
1858 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1862 expr = PreIncDecExpression();
1863 {if (true) return expr;}
1872 case INTEGER_LITERAL:
1873 case FLOATING_POINT_LITERAL:
1874 case STRING_LITERAL:
1878 expr = UnaryExpressionNotPlusMinus();
1879 {if (true) return expr;}
1882 jj_la1[51] = jj_gen;
1883 jj_consume_token(-1);
1884 throw new ParseException();
1886 throw new Error("Missing return statement in function");
1889 static final public Expression PreIncDecExpression() throws ParseException {
1890 final Expression expr;
1892 final int pos = SimpleCharStream.getPosition();
1893 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1895 jj_consume_token(INCR);
1896 operator = OperatorIds.PLUS_PLUS;
1899 jj_consume_token(DECR);
1900 operator = OperatorIds.MINUS_MINUS;
1903 jj_la1[52] = jj_gen;
1904 jj_consume_token(-1);
1905 throw new ParseException();
1907 expr = PrimaryExpression();
1908 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1909 throw new Error("Missing return statement in function");
1912 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
1914 final int pos = SimpleCharStream.getPosition();
1915 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1917 jj_consume_token(BANG);
1918 expr = UnaryExpression();
1919 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1922 jj_la1[53] = jj_gen;
1923 if (jj_2_4(2147483647)) {
1924 expr = CastExpression();
1925 {if (true) return expr;}
1927 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1933 expr = PostfixExpression();
1934 {if (true) return expr;}
1939 case INTEGER_LITERAL:
1940 case FLOATING_POINT_LITERAL:
1941 case STRING_LITERAL:
1943 {if (true) return expr;}
1946 jj_consume_token(LPAREN);
1947 expr = Expression();
1949 jj_consume_token(RPAREN);
1950 } catch (ParseException e) {
1951 errorMessage = "')' expected";
1953 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1954 errorEnd = SimpleCharStream.getPosition() + 1;
1955 {if (true) throw e;}
1957 {if (true) return expr;}
1960 jj_la1[54] = jj_gen;
1961 jj_consume_token(-1);
1962 throw new ParseException();
1966 throw new Error("Missing return statement in function");
1969 static final public CastExpression CastExpression() throws ParseException {
1970 final ConstantIdentifier type;
1971 final Expression expr;
1972 final int pos = SimpleCharStream.getPosition();
1973 jj_consume_token(LPAREN);
1974 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1987 jj_consume_token(ARRAY);
1988 type = new ConstantIdentifier(Types.ARRAY,pos,SimpleCharStream.getPosition());
1991 jj_la1[55] = jj_gen;
1992 jj_consume_token(-1);
1993 throw new ParseException();
1995 jj_consume_token(RPAREN);
1996 expr = UnaryExpression();
1997 {if (true) return new CastExpression(type,expr,pos,SimpleCharStream.getPosition());}
1998 throw new Error("Missing return statement in function");
2001 static final public Expression PostfixExpression() throws ParseException {
2004 final int pos = SimpleCharStream.getPosition();
2005 expr = PrimaryExpression();
2006 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2009 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2011 jj_consume_token(INCR);
2012 operator = OperatorIds.PLUS_PLUS;
2015 jj_consume_token(DECR);
2016 operator = OperatorIds.MINUS_MINUS;
2019 jj_la1[56] = jj_gen;
2020 jj_consume_token(-1);
2021 throw new ParseException();
2025 jj_la1[57] = jj_gen;
2028 if (operator == -1) {
2029 {if (true) return expr;}
2031 {if (true) return new PostfixedUnaryExpression(expr,operator,pos);}
2032 throw new Error("Missing return statement in function");
2035 static final public Expression PrimaryExpression() throws ParseException {
2036 final Token identifier;
2038 final int pos = SimpleCharStream.getPosition();
2040 identifier = jj_consume_token(IDENTIFIER);
2041 jj_consume_token(STATICCLASSACCESS);
2042 expr = ClassIdentifier();
2043 expr = new ClassAccess(new ConstantIdentifier(identifier.image.toCharArray(),
2045 SimpleCharStream.getPosition()),
2047 ClassAccess.STATIC);
2050 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2057 jj_la1[58] = jj_gen;
2060 expr = PrimarySuffix(expr);
2062 {if (true) return expr;}
2064 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2069 expr = PrimaryPrefix();
2072 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2079 jj_la1[59] = jj_gen;
2082 expr = PrimarySuffix(expr);
2084 {if (true) return expr;}
2087 expr = ArrayDeclarator();
2088 {if (true) return expr;}
2091 jj_la1[60] = jj_gen;
2092 jj_consume_token(-1);
2093 throw new ParseException();
2096 throw new Error("Missing return statement in function");
2099 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2100 final ArrayVariableDeclaration[] vars;
2101 final int pos = SimpleCharStream.getPosition();
2102 jj_consume_token(ARRAY);
2103 vars = ArrayInitializer();
2104 {if (true) return new ArrayInitializer(vars,pos,SimpleCharStream.getPosition());}
2105 throw new Error("Missing return statement in function");
2108 static final public Expression PrimaryPrefix() throws ParseException {
2109 final Expression expr;
2112 final int pos = SimpleCharStream.getPosition();
2113 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2115 token = jj_consume_token(IDENTIFIER);
2116 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2118 SimpleCharStream.getPosition());}
2121 jj_consume_token(NEW);
2122 expr = ClassIdentifier();
2123 {if (true) return new PrefixedUnaryExpression(expr,
2129 var = VariableDeclaratorId();
2130 {if (true) return new ConstantIdentifier(var.toCharArray(),
2132 SimpleCharStream.getPosition());}
2135 jj_la1[61] = jj_gen;
2136 jj_consume_token(-1);
2137 throw new ParseException();
2139 throw new Error("Missing return statement in function");
2142 static final public PrefixedUnaryExpression classInstantiation() throws ParseException {
2144 final StringBuffer buff;
2145 final int pos = SimpleCharStream.getPosition();
2146 jj_consume_token(NEW);
2147 expr = ClassIdentifier();
2148 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2154 buff = new StringBuffer(expr.toStringExpression());
2155 expr = PrimaryExpression();
2156 buff.append(expr.toStringExpression());
2157 expr = new ConstantIdentifier(buff.toString().toCharArray(),
2159 SimpleCharStream.getPosition());
2162 jj_la1[62] = jj_gen;
2165 {if (true) return new PrefixedUnaryExpression(expr,
2168 throw new Error("Missing return statement in function");
2171 static final public ConstantIdentifier ClassIdentifier() throws ParseException {
2174 final int pos = SimpleCharStream.getPosition();
2175 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2177 token = jj_consume_token(IDENTIFIER);
2178 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2180 SimpleCharStream.getPosition());}
2184 expr = VariableDeclaratorId();
2185 {if (true) return new ConstantIdentifier(expr.toCharArray(),
2187 SimpleCharStream.getPosition());}
2190 jj_la1[63] = jj_gen;
2191 jj_consume_token(-1);
2192 throw new ParseException();
2194 throw new Error("Missing return statement in function");
2197 static final public AbstractSuffixExpression PrimarySuffix(Expression prefix) throws ParseException {
2198 final AbstractSuffixExpression expr;
2199 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2201 expr = Arguments(prefix);
2202 {if (true) return expr;}
2206 expr = VariableSuffix(prefix);
2207 {if (true) return expr;}
2210 jj_la1[64] = jj_gen;
2211 jj_consume_token(-1);
2212 throw new ParseException();
2214 throw new Error("Missing return statement in function");
2217 static final public AbstractSuffixExpression VariableSuffix(Expression prefix) throws ParseException {
2219 final int pos = SimpleCharStream.getPosition();
2220 Expression expression = null;
2221 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2223 jj_consume_token(CLASSACCESS);
2225 expr = VariableName();
2226 } catch (ParseException e) {
2227 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2229 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2230 errorEnd = SimpleCharStream.getPosition() + 1;
2231 {if (true) throw e;}
2233 {if (true) return new ClassAccess(prefix,
2234 new ConstantIdentifier(expr.toCharArray(),pos,SimpleCharStream.getPosition()),
2235 ClassAccess.NORMAL);}
2238 jj_consume_token(LBRACKET);
2239 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2264 case INTEGER_LITERAL:
2265 case FLOATING_POINT_LITERAL:
2266 case STRING_LITERAL:
2270 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2286 case INTEGER_LITERAL:
2287 case FLOATING_POINT_LITERAL:
2288 case STRING_LITERAL:
2292 expression = Expression();
2303 expression = Type();
2306 jj_la1[65] = jj_gen;
2307 jj_consume_token(-1);
2308 throw new ParseException();
2312 jj_la1[66] = jj_gen;
2316 jj_consume_token(RBRACKET);
2317 } catch (ParseException e) {
2318 errorMessage = "']' expected";
2320 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2321 errorEnd = SimpleCharStream.getPosition() + 1;
2322 {if (true) throw e;}
2324 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2327 jj_la1[67] = jj_gen;
2328 jj_consume_token(-1);
2329 throw new ParseException();
2331 throw new Error("Missing return statement in function");
2334 static final public Literal Literal() throws ParseException {
2337 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2338 case INTEGER_LITERAL:
2339 token = jj_consume_token(INTEGER_LITERAL);
2340 pos = SimpleCharStream.getPosition();
2341 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2343 case FLOATING_POINT_LITERAL:
2344 token = jj_consume_token(FLOATING_POINT_LITERAL);
2345 pos = SimpleCharStream.getPosition();
2346 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2348 case STRING_LITERAL:
2349 token = jj_consume_token(STRING_LITERAL);
2350 pos = SimpleCharStream.getPosition();
2351 {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length());}
2354 jj_consume_token(TRUE);
2355 pos = SimpleCharStream.getPosition();
2356 {if (true) return new TrueLiteral(pos-4,pos);}
2359 jj_consume_token(FALSE);
2360 pos = SimpleCharStream.getPosition();
2361 {if (true) return new FalseLiteral(pos-4,pos);}
2364 jj_consume_token(NULL);
2365 pos = SimpleCharStream.getPosition();
2366 {if (true) return new NullLiteral(pos-4,pos);}
2369 jj_la1[68] = jj_gen;
2370 jj_consume_token(-1);
2371 throw new ParseException();
2373 throw new Error("Missing return statement in function");
2376 static final public FunctionCall Arguments(Expression func) throws ParseException {
2377 Expression[] args = null;
2378 jj_consume_token(LPAREN);
2379 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2395 case INTEGER_LITERAL:
2396 case FLOATING_POINT_LITERAL:
2397 case STRING_LITERAL:
2401 args = ArgumentList();
2404 jj_la1[69] = jj_gen;
2408 jj_consume_token(RPAREN);
2409 } catch (ParseException e) {
2410 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2412 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2413 errorEnd = SimpleCharStream.getPosition() + 1;
2414 {if (true) throw e;}
2416 {if (true) return new FunctionCall(func,args,SimpleCharStream.getPosition());}
2417 throw new Error("Missing return statement in function");
2421 * An argument list is a list of arguments separated by comma :
2422 * argumentDeclaration() (, argumentDeclaration)*
2423 * @return an array of arguments
2425 static final public Expression[] ArgumentList() throws ParseException {
2427 final ArrayList list = new ArrayList();
2432 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2437 jj_la1[70] = jj_gen;
2440 jj_consume_token(COMMA);
2444 } catch (ParseException e) {
2445 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2447 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2448 errorEnd = SimpleCharStream.getPosition() + 1;
2449 {if (true) throw e;}
2452 Expression[] arguments = new Expression[list.size()];
2453 list.toArray(arguments);
2454 {if (true) return arguments;}
2455 throw new Error("Missing return statement in function");
2459 * A Statement without break.
2461 static final public Statement StatementNoBreak() throws ParseException {
2462 final Statement statement;
2465 statement = Expression();
2467 jj_consume_token(SEMICOLON);
2468 } catch (ParseException e) {
2469 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2470 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2472 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2473 errorEnd = SimpleCharStream.getPosition() + 1;
2474 {if (true) throw e;}
2477 {if (true) return statement;}
2478 } else if (jj_2_7(2)) {
2479 statement = LabeledStatement();
2480 {if (true) return statement;}
2482 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2484 statement = Block();
2485 {if (true) return statement;}
2488 statement = EmptyStatement();
2489 {if (true) return statement;}
2498 statement = StatementExpression();
2500 jj_consume_token(SEMICOLON);
2501 } catch (ParseException e) {
2502 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2504 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2505 errorEnd = SimpleCharStream.getPosition() + 1;
2506 {if (true) throw e;}
2508 {if (true) return statement;}
2511 statement = SwitchStatement();
2512 {if (true) return statement;}
2515 statement = IfStatement();
2516 {if (true) return statement;}
2519 statement = WhileStatement();
2520 {if (true) return statement;}
2523 statement = DoStatement();
2524 {if (true) return statement;}
2527 statement = ForStatement();
2528 {if (true) return statement;}
2531 statement = ForeachStatement();
2532 {if (true) return statement;}
2535 statement = ContinueStatement();
2536 {if (true) return statement;}
2539 statement = ReturnStatement();
2540 {if (true) return statement;}
2543 statement = EchoStatement();
2544 {if (true) return statement;}
2551 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2553 token = jj_consume_token(AT);
2556 jj_la1[71] = jj_gen;
2559 statement = IncludeStatement();
2560 if (token != null) {
2561 ((InclusionStatement)statement).silent = true;
2563 {if (true) return statement;}
2566 statement = StaticStatement();
2567 {if (true) return statement;}
2570 statement = GlobalStatement();
2571 {if (true) return statement;}
2574 jj_la1[72] = jj_gen;
2575 jj_consume_token(-1);
2576 throw new ParseException();
2579 throw new Error("Missing return statement in function");
2583 * A Normal statement.
2585 static final public Statement Statement() throws ParseException {
2586 final Statement statement;
2587 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2618 case INTEGER_LITERAL:
2619 case FLOATING_POINT_LITERAL:
2620 case STRING_LITERAL:
2626 statement = StatementNoBreak();
2627 {if (true) return statement;}
2630 statement = BreakStatement();
2631 {if (true) return statement;}
2634 jj_la1[73] = jj_gen;
2635 jj_consume_token(-1);
2636 throw new ParseException();
2638 throw new Error("Missing return statement in function");
2642 * An html block inside a php syntax.
2644 static final public HTMLBlock htmlBlock() throws ParseException {
2645 final int startIndex = nodePtr;
2646 AstNode[] blockNodes;
2648 jj_consume_token(PHPEND);
2651 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2656 jj_la1[74] = jj_gen;
2662 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2664 jj_consume_token(PHPSTARTLONG);
2667 jj_consume_token(PHPSTARTSHORT);
2670 jj_la1[75] = jj_gen;
2671 jj_consume_token(-1);
2672 throw new ParseException();
2674 } catch (ParseException e) {
2675 errorMessage = "End of file unexpected, '<?php' expected";
2677 errorStart = SimpleCharStream.getPosition();
2678 errorEnd = SimpleCharStream.getPosition();
2679 {if (true) throw e;}
2681 nbNodes = nodePtr - startIndex;
2682 blockNodes = new AstNode[nbNodes];
2683 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2684 nodePtr = startIndex;
2685 {if (true) return new HTMLBlock(blockNodes);}
2686 throw new Error("Missing return statement in function");
2690 * An include statement. It's "include" an expression;
2692 static final public InclusionStatement IncludeStatement() throws ParseException {
2693 final Expression expr;
2695 final int pos = SimpleCharStream.getPosition();
2696 final InclusionStatement inclusionStatement;
2697 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2699 jj_consume_token(REQUIRE);
2700 keyword = InclusionStatement.REQUIRE;
2703 jj_consume_token(REQUIRE_ONCE);
2704 keyword = InclusionStatement.REQUIRE_ONCE;
2707 jj_consume_token(INCLUDE);
2708 keyword = InclusionStatement.INCLUDE;
2711 jj_consume_token(INCLUDE_ONCE);
2712 keyword = InclusionStatement.INCLUDE_ONCE;
2715 jj_la1[76] = jj_gen;
2716 jj_consume_token(-1);
2717 throw new ParseException();
2720 expr = Expression();
2721 } catch (ParseException e) {
2722 if (errorMessage != null) {
2723 {if (true) throw e;}
2725 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
2727 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2728 errorEnd = SimpleCharStream.getPosition() + 1;
2729 {if (true) throw e;}
2731 inclusionStatement = new InclusionStatement(currentSegment,
2735 currentSegment.add(inclusionStatement);
2737 jj_consume_token(SEMICOLON);
2738 } catch (ParseException e) {
2739 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2741 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2742 errorEnd = SimpleCharStream.getPosition() + 1;
2743 {if (true) throw e;}
2745 {if (true) return inclusionStatement;}
2746 throw new Error("Missing return statement in function");
2749 static final public PrintExpression PrintExpression() throws ParseException {
2750 final Expression expr;
2751 final int pos = SimpleCharStream.getPosition();
2752 jj_consume_token(PRINT);
2753 expr = Expression();
2754 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
2755 throw new Error("Missing return statement in function");
2758 static final public ListExpression ListExpression() throws ParseException {
2760 Expression expression = null;
2761 ArrayList list = new ArrayList();
2762 final int pos = SimpleCharStream.getPosition();
2763 jj_consume_token(LIST);
2765 jj_consume_token(LPAREN);
2766 } catch (ParseException e) {
2767 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2769 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2770 errorEnd = SimpleCharStream.getPosition() + 1;
2771 {if (true) throw e;}
2773 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2776 expr = VariableDeclaratorId();
2780 jj_la1[77] = jj_gen;
2783 if (expr == null) list.add(null);
2786 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2791 jj_la1[78] = jj_gen;
2795 jj_consume_token(COMMA);
2796 } catch (ParseException e) {
2797 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2799 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2800 errorEnd = SimpleCharStream.getPosition() + 1;
2801 {if (true) throw e;}
2803 expr = VariableDeclaratorId();
2807 jj_consume_token(RPAREN);
2808 } catch (ParseException e) {
2809 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2811 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2812 errorEnd = SimpleCharStream.getPosition() + 1;
2813 {if (true) throw e;}
2815 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2817 jj_consume_token(ASSIGN);
2818 expression = Expression();
2819 String[] strings = new String[list.size()];
2820 list.toArray(strings);
2821 {if (true) return new ListExpression(strings,
2824 SimpleCharStream.getPosition());}
2827 jj_la1[79] = jj_gen;
2830 String[] strings = new String[list.size()];
2831 list.toArray(strings);
2832 {if (true) return new ListExpression(strings,pos,SimpleCharStream.getPosition());}
2833 throw new Error("Missing return statement in function");
2837 * An echo statement.
2838 * echo anyexpression (, otherexpression)*
2840 static final public EchoStatement EchoStatement() throws ParseException {
2841 final ArrayList expressions = new ArrayList();
2843 final int pos = SimpleCharStream.getPosition();
2844 jj_consume_token(ECHO);
2845 expr = Expression();
2846 expressions.add(expr);
2849 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2854 jj_la1[80] = jj_gen;
2857 jj_consume_token(COMMA);
2858 expr = Expression();
2859 expressions.add(expr);
2862 jj_consume_token(SEMICOLON);
2863 } catch (ParseException e) {
2864 if (e.currentToken.next.kind != 4) {
2865 errorMessage = "';' expected after 'echo' statement";
2867 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2868 errorEnd = SimpleCharStream.getPosition() + 1;
2869 {if (true) throw e;}
2872 Expression[] exprs = new Expression[expressions.size()];
2873 expressions.toArray(exprs);
2874 {if (true) return new EchoStatement(exprs,pos);}
2875 throw new Error("Missing return statement in function");
2878 static final public GlobalStatement GlobalStatement() throws ParseException {
2879 final int pos = SimpleCharStream.getPosition();
2881 ArrayList vars = new ArrayList();
2882 GlobalStatement global;
2883 jj_consume_token(GLOBAL);
2884 expr = VariableDeclaratorId();
2888 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2893 jj_la1[81] = jj_gen;
2896 jj_consume_token(COMMA);
2897 expr = VariableDeclaratorId();
2901 jj_consume_token(SEMICOLON);
2902 String[] strings = new String[vars.size()];
2903 vars.toArray(strings);
2904 global = new GlobalStatement(currentSegment,
2907 SimpleCharStream.getPosition());
2908 currentSegment.add(global);
2909 {if (true) return global;}
2910 } catch (ParseException e) {
2911 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
2913 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2914 errorEnd = SimpleCharStream.getPosition() + 1;
2915 {if (true) throw e;}
2917 throw new Error("Missing return statement in function");
2920 static final public StaticStatement StaticStatement() throws ParseException {
2921 final int pos = SimpleCharStream.getPosition();
2922 final ArrayList vars = new ArrayList();
2923 VariableDeclaration expr;
2924 jj_consume_token(STATIC);
2925 expr = VariableDeclarator();
2926 vars.add(new String(expr.name));
2929 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2934 jj_la1[82] = jj_gen;
2937 jj_consume_token(COMMA);
2938 expr = VariableDeclarator();
2939 vars.add(new String(expr.name));
2942 jj_consume_token(SEMICOLON);
2943 String[] strings = new String[vars.size()];
2944 vars.toArray(strings);
2945 {if (true) return new StaticStatement(strings,
2947 SimpleCharStream.getPosition());}
2948 } catch (ParseException e) {
2949 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
2951 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2952 errorEnd = SimpleCharStream.getPosition() + 1;
2953 {if (true) throw e;}
2955 throw new Error("Missing return statement in function");
2958 static final public LabeledStatement LabeledStatement() throws ParseException {
2959 final int pos = SimpleCharStream.getPosition();
2961 final Statement statement;
2962 label = jj_consume_token(IDENTIFIER);
2963 jj_consume_token(COLON);
2964 statement = Statement();
2965 {if (true) return new LabeledStatement(label.image.toCharArray(),statement,pos,SimpleCharStream.getPosition());}
2966 throw new Error("Missing return statement in function");
2976 static final public Block Block() throws ParseException {
2977 final int pos = SimpleCharStream.getPosition();
2978 final ArrayList list = new ArrayList();
2979 Statement statement;
2981 jj_consume_token(LBRACE);
2982 } catch (ParseException e) {
2983 errorMessage = "'{' expected";
2985 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2986 errorEnd = SimpleCharStream.getPosition() + 1;
2987 {if (true) throw e;}
2991 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3026 case INTEGER_LITERAL:
3027 case FLOATING_POINT_LITERAL:
3028 case STRING_LITERAL:
3037 jj_la1[83] = jj_gen;
3040 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3074 case INTEGER_LITERAL:
3075 case FLOATING_POINT_LITERAL:
3076 case STRING_LITERAL:
3082 statement = BlockStatement();
3083 list.add(statement);
3086 statement = htmlBlock();
3087 list.add(statement);
3090 jj_la1[84] = jj_gen;
3091 jj_consume_token(-1);
3092 throw new ParseException();
3096 jj_consume_token(RBRACE);
3097 } catch (ParseException e) {
3098 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3100 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3101 errorEnd = SimpleCharStream.getPosition() + 1;
3102 {if (true) throw e;}
3104 Statement[] statements = new Statement[list.size()];
3105 list.toArray(statements);
3106 {if (true) return new Block(statements,pos,SimpleCharStream.getPosition());}
3107 throw new Error("Missing return statement in function");
3110 static final public Statement BlockStatement() throws ParseException {
3111 final Statement statement;
3112 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3144 case INTEGER_LITERAL:
3145 case FLOATING_POINT_LITERAL:
3146 case STRING_LITERAL:
3153 statement = Statement();
3154 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3155 {if (true) return statement;}
3156 } catch (ParseException e) {
3157 errorMessage = "statement expected";
3159 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3160 errorEnd = SimpleCharStream.getPosition() + 1;
3161 {if (true) throw e;}
3165 statement = ClassDeclaration();
3166 {if (true) return statement;}
3169 statement = MethodDeclaration();
3170 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3171 {if (true) return statement;}
3174 jj_la1[85] = jj_gen;
3175 jj_consume_token(-1);
3176 throw new ParseException();
3178 throw new Error("Missing return statement in function");
3182 * A Block statement that will not contain any 'break'
3184 static final public Statement BlockStatementNoBreak() throws ParseException {
3185 final Statement statement;
3186 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3217 case INTEGER_LITERAL:
3218 case FLOATING_POINT_LITERAL:
3219 case STRING_LITERAL:
3225 statement = StatementNoBreak();
3226 {if (true) return statement;}
3229 statement = ClassDeclaration();
3230 {if (true) return statement;}
3233 statement = MethodDeclaration();
3234 {if (true) return statement;}
3237 jj_la1[86] = jj_gen;
3238 jj_consume_token(-1);
3239 throw new ParseException();
3241 throw new Error("Missing return statement in function");
3244 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3245 final ArrayList list = new ArrayList();
3246 VariableDeclaration var;
3247 var = LocalVariableDeclarator();
3251 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3256 jj_la1[87] = jj_gen;
3259 jj_consume_token(COMMA);
3260 var = LocalVariableDeclarator();
3263 VariableDeclaration[] vars = new VariableDeclaration[list.size()];
3265 {if (true) return vars;}
3266 throw new Error("Missing return statement in function");
3269 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3270 final String varName;
3271 Expression initializer = null;
3272 final int pos = SimpleCharStream.getPosition();
3273 varName = VariableDeclaratorId();
3274 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3276 jj_consume_token(ASSIGN);
3277 initializer = Expression();
3280 jj_la1[88] = jj_gen;
3283 if (initializer == null) {
3284 {if (true) return new VariableDeclaration(currentSegment,
3285 varName.toCharArray(),
3287 SimpleCharStream.getPosition());}
3289 {if (true) return new VariableDeclaration(currentSegment,
3290 varName.toCharArray(),
3293 throw new Error("Missing return statement in function");
3296 static final public EmptyStatement EmptyStatement() throws ParseException {
3298 jj_consume_token(SEMICOLON);
3299 pos = SimpleCharStream.getPosition();
3300 {if (true) return new EmptyStatement(pos-1,pos);}
3301 throw new Error("Missing return statement in function");
3304 static final public Statement StatementExpression() throws ParseException {
3305 Expression expr,expr2;
3307 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3310 expr = PreIncDecExpression();
3311 {if (true) return expr;}
3318 expr = PrimaryExpression();
3319 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3334 case RSIGNEDSHIFTASSIGN:
3335 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3337 jj_consume_token(INCR);
3338 {if (true) return new PostfixedUnaryExpression(expr,
3339 OperatorIds.PLUS_PLUS,
3340 SimpleCharStream.getPosition());}
3343 jj_consume_token(DECR);
3344 {if (true) return new PostfixedUnaryExpression(expr,
3345 OperatorIds.MINUS_MINUS,
3346 SimpleCharStream.getPosition());}
3360 case RSIGNEDSHIFTASSIGN:
3361 operator = AssignmentOperator();
3362 expr2 = Expression();
3363 {if (true) return new BinaryExpression(expr,expr2,operator);}
3366 jj_la1[89] = jj_gen;
3367 jj_consume_token(-1);
3368 throw new ParseException();
3372 jj_la1[90] = jj_gen;
3375 {if (true) return expr;}
3378 jj_la1[91] = jj_gen;
3379 jj_consume_token(-1);
3380 throw new ParseException();
3382 throw new Error("Missing return statement in function");
3385 static final public SwitchStatement SwitchStatement() throws ParseException {
3386 final Expression variable;
3387 final AbstractCase[] cases;
3388 final int pos = SimpleCharStream.getPosition();
3389 jj_consume_token(SWITCH);
3391 jj_consume_token(LPAREN);
3392 } catch (ParseException e) {
3393 errorMessage = "'(' expected after 'switch'";
3395 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3396 errorEnd = SimpleCharStream.getPosition() + 1;
3397 {if (true) throw e;}
3400 variable = Expression();
3401 } catch (ParseException e) {
3402 if (errorMessage != null) {
3403 {if (true) throw e;}
3405 errorMessage = "expression expected";
3407 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3408 errorEnd = SimpleCharStream.getPosition() + 1;
3409 {if (true) throw e;}
3412 jj_consume_token(RPAREN);
3413 } catch (ParseException e) {
3414 errorMessage = "')' expected";
3416 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3417 errorEnd = SimpleCharStream.getPosition() + 1;
3418 {if (true) throw e;}
3420 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3422 cases = switchStatementBrace();
3425 cases = switchStatementColon(pos, pos + 6);
3428 jj_la1[92] = jj_gen;
3429 jj_consume_token(-1);
3430 throw new ParseException();
3432 {if (true) return new SwitchStatement(variable,cases,pos,SimpleCharStream.getPosition());}
3433 throw new Error("Missing return statement in function");
3436 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3438 final ArrayList cases = new ArrayList();
3439 jj_consume_token(LBRACE);
3442 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3448 jj_la1[93] = jj_gen;
3451 cas = switchLabel0();
3455 jj_consume_token(RBRACE);
3456 AbstractCase[] abcase = new AbstractCase[cases.size()];
3457 cases.toArray(abcase);
3458 {if (true) return abcase;}
3459 } catch (ParseException e) {
3460 errorMessage = "'}' expected";
3462 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3463 errorEnd = SimpleCharStream.getPosition() + 1;
3464 {if (true) throw e;}
3466 throw new Error("Missing return statement in function");
3470 * A Switch statement with : ... endswitch;
3471 * @param start the begin offset of the switch
3472 * @param end the end offset of the switch
3474 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3476 final ArrayList cases = new ArrayList();
3477 jj_consume_token(COLON);
3479 setMarker(fileToParse,
3480 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3484 "Line " + token.beginLine);
3485 } catch (CoreException e) {
3486 PHPeclipsePlugin.log(e);
3490 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3496 jj_la1[94] = jj_gen;
3499 cas = switchLabel0();
3503 jj_consume_token(ENDSWITCH);
3504 } catch (ParseException e) {
3505 errorMessage = "'endswitch' expected";
3507 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3508 errorEnd = SimpleCharStream.getPosition() + 1;
3509 {if (true) throw e;}
3512 jj_consume_token(SEMICOLON);
3513 AbstractCase[] abcase = new AbstractCase[cases.size()];
3514 cases.toArray(abcase);
3515 {if (true) return abcase;}
3516 } catch (ParseException e) {
3517 errorMessage = "';' expected after 'endswitch' keyword";
3519 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3520 errorEnd = SimpleCharStream.getPosition() + 1;
3521 {if (true) throw e;}
3523 throw new Error("Missing return statement in function");
3526 static final public AbstractCase switchLabel0() throws ParseException {
3527 final Expression expr;
3528 Statement statement;
3529 final ArrayList stmts = new ArrayList();
3530 final int pos = SimpleCharStream.getPosition();
3531 expr = SwitchLabel();
3534 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3568 case INTEGER_LITERAL:
3569 case FLOATING_POINT_LITERAL:
3570 case STRING_LITERAL:
3579 jj_la1[95] = jj_gen;
3582 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3615 case INTEGER_LITERAL:
3616 case FLOATING_POINT_LITERAL:
3617 case STRING_LITERAL:
3623 statement = BlockStatementNoBreak();
3624 stmts.add(statement);
3627 statement = htmlBlock();
3628 stmts.add(statement);
3631 jj_la1[96] = jj_gen;
3632 jj_consume_token(-1);
3633 throw new ParseException();
3636 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3638 statement = BreakStatement();
3639 stmts.add(statement);
3642 jj_la1[97] = jj_gen;
3645 Statement[] stmtsArray = new Statement[stmts.size()];
3646 stmts.toArray(stmtsArray);
3647 if (expr == null) {//it's a default
3648 {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3650 {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3651 throw new Error("Missing return statement in function");
3656 * case Expression() :
3658 * @return the if it was a case and null if not
3660 static final public Expression SwitchLabel() throws ParseException {
3661 final Expression expr;
3662 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3664 token = jj_consume_token(CASE);
3666 expr = Expression();
3667 } catch (ParseException e) {
3668 if (errorMessage != null) {if (true) throw e;}
3669 errorMessage = "expression expected after 'case' keyword";
3671 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3672 errorEnd = SimpleCharStream.getPosition() + 1;
3673 {if (true) throw e;}
3676 jj_consume_token(COLON);
3677 {if (true) return expr;}
3678 } catch (ParseException e) {
3679 errorMessage = "':' expected after case expression";
3681 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3682 errorEnd = SimpleCharStream.getPosition() + 1;
3683 {if (true) throw e;}
3687 token = jj_consume_token(_DEFAULT);
3689 jj_consume_token(COLON);
3690 {if (true) return null;}
3691 } catch (ParseException e) {
3692 errorMessage = "':' expected after 'default' keyword";
3694 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3695 errorEnd = SimpleCharStream.getPosition() + 1;
3696 {if (true) throw e;}
3700 jj_la1[98] = jj_gen;
3701 jj_consume_token(-1);
3702 throw new ParseException();
3704 throw new Error("Missing return statement in function");
3707 static final public Break BreakStatement() throws ParseException {
3708 Expression expression = null;
3709 final int start = SimpleCharStream.getPosition();
3710 jj_consume_token(BREAK);
3711 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3727 case INTEGER_LITERAL:
3728 case FLOATING_POINT_LITERAL:
3729 case STRING_LITERAL:
3733 expression = Expression();
3736 jj_la1[99] = jj_gen;
3740 jj_consume_token(SEMICOLON);
3741 } catch (ParseException e) {
3742 errorMessage = "';' expected after 'break' keyword";
3744 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3745 errorEnd = SimpleCharStream.getPosition() + 1;
3746 {if (true) throw e;}
3748 {if (true) return new Break(expression, start, SimpleCharStream.getPosition());}
3749 throw new Error("Missing return statement in function");
3752 static final public IfStatement IfStatement() throws ParseException {
3753 final int pos = SimpleCharStream.getPosition();
3754 Expression condition;
3755 IfStatement ifStatement;
3756 jj_consume_token(IF);
3757 condition = Condition("if");
3758 ifStatement = IfStatement0(condition, pos,pos+2);
3759 {if (true) return ifStatement;}
3760 throw new Error("Missing return statement in function");
3763 static final public Expression Condition(final String keyword) throws ParseException {
3764 final Expression condition;
3766 jj_consume_token(LPAREN);
3767 } catch (ParseException e) {
3768 errorMessage = "'(' expected after " + keyword + " keyword";
3770 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length();
3771 errorEnd = errorStart +1;
3772 processParseException(e);
3774 condition = Expression();
3776 jj_consume_token(RPAREN);
3777 {if (true) return condition;}
3778 } catch (ParseException e) {
3779 errorMessage = "')' expected after " + keyword + " keyword";
3781 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3782 errorEnd = SimpleCharStream.getPosition() + 1;
3783 {if (true) throw e;}
3785 throw new Error("Missing return statement in function");
3788 static final public IfStatement IfStatement0(Expression condition, final int start,final int end) throws ParseException {
3789 Statement statement;
3791 final Statement[] statementsArray;
3792 ElseIf elseifStatement;
3793 Else elseStatement = null;
3795 final ArrayList elseIfList = new ArrayList();
3797 int pos = SimpleCharStream.getPosition();
3799 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3801 jj_consume_token(COLON);
3802 stmts = new ArrayList();
3805 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3838 case INTEGER_LITERAL:
3839 case FLOATING_POINT_LITERAL:
3840 case STRING_LITERAL:
3849 jj_la1[100] = jj_gen;
3852 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3884 case INTEGER_LITERAL:
3885 case FLOATING_POINT_LITERAL:
3886 case STRING_LITERAL:
3892 statement = Statement();
3893 stmts.add(statement);
3896 statement = htmlBlock();
3897 stmts.add(statement);
3900 jj_la1[101] = jj_gen;
3901 jj_consume_token(-1);
3902 throw new ParseException();
3905 endStatements = SimpleCharStream.getPosition();
3908 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3913 jj_la1[102] = jj_gen;
3916 elseifStatement = ElseIfStatementColon();
3917 elseIfList.add(elseifStatement);
3919 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3921 elseStatement = ElseStatementColon();
3924 jj_la1[103] = jj_gen;
3928 setMarker(fileToParse,
3929 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
3933 "Line " + token.beginLine);
3934 } catch (CoreException e) {
3935 PHPeclipsePlugin.log(e);
3938 jj_consume_token(ENDIF);
3939 } catch (ParseException e) {
3940 errorMessage = "'endif' expected";
3942 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3943 errorEnd = SimpleCharStream.getPosition() + 1;
3944 {if (true) throw e;}
3947 jj_consume_token(SEMICOLON);
3948 } catch (ParseException e) {
3949 errorMessage = "';' expected after 'endif' keyword";
3951 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3952 errorEnd = SimpleCharStream.getPosition() + 1;
3953 {if (true) throw e;}
3955 elseIfs = new ElseIf[elseIfList.size()];
3956 elseIfList.toArray(elseIfs);
3957 if (stmts.size() == 1) {
3958 {if (true) return new IfStatement(condition,
3959 (Statement) stmts.get(0),
3963 SimpleCharStream.getPosition());}
3965 statementsArray = new Statement[stmts.size()];
3966 stmts.toArray(statementsArray);
3967 {if (true) return new IfStatement(condition,
3968 new Block(statementsArray,pos,endStatements),
3972 SimpleCharStream.getPosition());}
4007 case INTEGER_LITERAL:
4008 case FLOATING_POINT_LITERAL:
4009 case STRING_LITERAL:
4015 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4047 case INTEGER_LITERAL:
4048 case FLOATING_POINT_LITERAL:
4049 case STRING_LITERAL:
4061 jj_la1[104] = jj_gen;
4062 jj_consume_token(-1);
4063 throw new ParseException();
4067 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4072 jj_la1[105] = jj_gen;
4075 elseifStatement = ElseIfStatement();
4076 elseIfList.add(elseifStatement);
4078 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4080 jj_consume_token(ELSE);
4082 pos = SimpleCharStream.getPosition();
4083 statement = Statement();
4084 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4085 } catch (ParseException e) {
4086 if (errorMessage != null) {
4087 {if (true) throw e;}
4089 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4091 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4092 errorEnd = SimpleCharStream.getPosition() + 1;
4093 {if (true) throw e;}
4097 jj_la1[106] = jj_gen;
4100 elseIfs = new ElseIf[elseIfList.size()];
4101 elseIfList.toArray(elseIfs);
4102 {if (true) return new IfStatement(condition,
4107 SimpleCharStream.getPosition());}
4110 jj_la1[107] = jj_gen;
4111 jj_consume_token(-1);
4112 throw new ParseException();
4114 throw new Error("Missing return statement in function");
4117 static final public ElseIf ElseIfStatementColon() throws ParseException {
4118 Expression condition;
4119 Statement statement;
4120 final ArrayList list = new ArrayList();
4121 final int pos = SimpleCharStream.getPosition();
4122 jj_consume_token(ELSEIF);
4123 condition = Condition("elseif");
4124 jj_consume_token(COLON);
4127 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4160 case INTEGER_LITERAL:
4161 case FLOATING_POINT_LITERAL:
4162 case STRING_LITERAL:
4171 jj_la1[108] = jj_gen;
4174 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4206 case INTEGER_LITERAL:
4207 case FLOATING_POINT_LITERAL:
4208 case STRING_LITERAL:
4214 statement = Statement();
4215 list.add(statement);
4218 statement = htmlBlock();
4219 list.add(statement);
4222 jj_la1[109] = jj_gen;
4223 jj_consume_token(-1);
4224 throw new ParseException();
4227 Statement[] stmtsArray = new Statement[list.size()];
4228 list.toArray(stmtsArray);
4229 {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4230 throw new Error("Missing return statement in function");
4233 static final public Else ElseStatementColon() throws ParseException {
4234 Statement statement;
4235 final ArrayList list = new ArrayList();
4236 final int pos = SimpleCharStream.getPosition();
4237 jj_consume_token(ELSE);
4238 jj_consume_token(COLON);
4241 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4274 case INTEGER_LITERAL:
4275 case FLOATING_POINT_LITERAL:
4276 case STRING_LITERAL:
4285 jj_la1[110] = jj_gen;
4288 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4320 case INTEGER_LITERAL:
4321 case FLOATING_POINT_LITERAL:
4322 case STRING_LITERAL:
4328 statement = Statement();
4329 list.add(statement);
4332 statement = htmlBlock();
4333 list.add(statement);
4336 jj_la1[111] = jj_gen;
4337 jj_consume_token(-1);
4338 throw new ParseException();
4341 Statement[] stmtsArray = new Statement[list.size()];
4342 list.toArray(stmtsArray);
4343 {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4344 throw new Error("Missing return statement in function");
4347 static final public ElseIf ElseIfStatement() throws ParseException {
4348 Expression condition;
4349 Statement statement;
4350 final ArrayList list = new ArrayList();
4351 final int pos = SimpleCharStream.getPosition();
4352 jj_consume_token(ELSEIF);
4353 condition = Condition("elseif");
4354 statement = Statement();
4355 list.add(statement);/*todo:do better*/
4356 Statement[] stmtsArray = new Statement[list.size()];
4357 list.toArray(stmtsArray);
4358 {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4359 throw new Error("Missing return statement in function");
4362 static final public WhileStatement WhileStatement() throws ParseException {
4363 final Expression condition;
4364 final Statement action;
4365 final int pos = SimpleCharStream.getPosition();
4366 jj_consume_token(WHILE);
4367 condition = Condition("while");
4368 action = WhileStatement0(pos,pos + 5);
4369 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4370 throw new Error("Missing return statement in function");
4373 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4374 Statement statement;
4375 final ArrayList stmts = new ArrayList();
4376 final int pos = SimpleCharStream.getPosition();
4377 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4379 jj_consume_token(COLON);
4382 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4414 case INTEGER_LITERAL:
4415 case FLOATING_POINT_LITERAL:
4416 case STRING_LITERAL:
4425 jj_la1[112] = jj_gen;
4428 statement = Statement();
4429 stmts.add(statement);
4432 setMarker(fileToParse,
4433 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4437 "Line " + token.beginLine);
4438 } catch (CoreException e) {
4439 PHPeclipsePlugin.log(e);
4442 jj_consume_token(ENDWHILE);
4443 } catch (ParseException e) {
4444 errorMessage = "'endwhile' expected";
4446 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4447 errorEnd = SimpleCharStream.getPosition() + 1;
4448 {if (true) throw e;}
4451 jj_consume_token(SEMICOLON);
4452 Statement[] stmtsArray = new Statement[stmts.size()];
4453 stmts.toArray(stmtsArray);
4454 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4455 } catch (ParseException e) {
4456 errorMessage = "';' expected after 'endwhile' keyword";
4458 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4459 errorEnd = SimpleCharStream.getPosition() + 1;
4460 {if (true) throw e;}
4494 case INTEGER_LITERAL:
4495 case FLOATING_POINT_LITERAL:
4496 case STRING_LITERAL:
4502 statement = Statement();
4503 {if (true) return statement;}
4506 jj_la1[113] = jj_gen;
4507 jj_consume_token(-1);
4508 throw new ParseException();
4510 throw new Error("Missing return statement in function");
4513 static final public DoStatement DoStatement() throws ParseException {
4514 final Statement action;
4515 final Expression condition;
4516 final int pos = SimpleCharStream.getPosition();
4517 jj_consume_token(DO);
4518 action = Statement();
4519 jj_consume_token(WHILE);
4520 condition = Condition("while");
4522 jj_consume_token(SEMICOLON);
4523 {if (true) return new DoStatement(condition,action,pos,SimpleCharStream.getPosition());}
4524 } catch (ParseException e) {
4525 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4527 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4528 errorEnd = SimpleCharStream.getPosition() + 1;
4529 {if (true) throw e;}
4531 throw new Error("Missing return statement in function");
4534 static final public ForeachStatement ForeachStatement() throws ParseException {
4535 Statement statement;
4536 Expression expression;
4537 final int pos = SimpleCharStream.getPosition();
4538 ArrayVariableDeclaration variable;
4539 jj_consume_token(FOREACH);
4541 jj_consume_token(LPAREN);
4542 } catch (ParseException e) {
4543 errorMessage = "'(' expected after 'foreach' keyword";
4545 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4546 errorEnd = SimpleCharStream.getPosition() + 1;
4547 {if (true) throw e;}
4550 expression = Expression();
4551 } catch (ParseException e) {
4552 errorMessage = "variable expected";
4554 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4555 errorEnd = SimpleCharStream.getPosition() + 1;
4556 {if (true) throw e;}
4559 jj_consume_token(AS);
4560 } catch (ParseException e) {
4561 errorMessage = "'as' expected";
4563 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4564 errorEnd = SimpleCharStream.getPosition() + 1;
4565 {if (true) throw e;}
4568 variable = ArrayVariable();
4569 } catch (ParseException e) {
4570 errorMessage = "variable expected";
4572 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4573 errorEnd = SimpleCharStream.getPosition() + 1;
4574 {if (true) throw e;}
4577 jj_consume_token(RPAREN);
4578 } catch (ParseException e) {
4579 errorMessage = "')' expected after 'foreach' keyword";
4581 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4582 errorEnd = SimpleCharStream.getPosition() + 1;
4583 {if (true) throw e;}
4586 statement = Statement();
4587 } catch (ParseException e) {
4588 if (errorMessage != null) {if (true) throw e;}
4589 errorMessage = "statement expected";
4591 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4592 errorEnd = SimpleCharStream.getPosition() + 1;
4593 {if (true) throw e;}
4595 {if (true) return new ForeachStatement(expression,
4599 SimpleCharStream.getPosition());}
4600 throw new Error("Missing return statement in function");
4603 static final public ForStatement ForStatement() throws ParseException {
4605 final int pos = SimpleCharStream.getPosition();
4606 Statement[] initializations = null;
4607 Expression condition = null;
4608 Statement[] increments = null;
4610 final ArrayList list = new ArrayList();
4611 final int startBlock, endBlock;
4612 token = jj_consume_token(FOR);
4614 jj_consume_token(LPAREN);
4615 } catch (ParseException e) {
4616 errorMessage = "'(' expected after 'for' keyword";
4618 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4619 errorEnd = SimpleCharStream.getPosition() + 1;
4620 {if (true) throw e;}
4622 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4630 initializations = ForInit();
4633 jj_la1[114] = jj_gen;
4636 jj_consume_token(SEMICOLON);
4637 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4653 case INTEGER_LITERAL:
4654 case FLOATING_POINT_LITERAL:
4655 case STRING_LITERAL:
4659 condition = Expression();
4662 jj_la1[115] = jj_gen;
4665 jj_consume_token(SEMICOLON);
4666 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4674 increments = StatementExpressionList();
4677 jj_la1[116] = jj_gen;
4680 jj_consume_token(RPAREN);
4681 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4713 case INTEGER_LITERAL:
4714 case FLOATING_POINT_LITERAL:
4715 case STRING_LITERAL:
4721 action = Statement();
4722 {if (true) return new ForStatement(initializations,condition,increments,action,pos,SimpleCharStream.getPosition());}
4725 jj_consume_token(COLON);
4726 startBlock = SimpleCharStream.getPosition();
4729 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4761 case INTEGER_LITERAL:
4762 case FLOATING_POINT_LITERAL:
4763 case STRING_LITERAL:
4772 jj_la1[117] = jj_gen;
4775 action = Statement();
4779 setMarker(fileToParse,
4780 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
4782 pos+token.image.length(),
4784 "Line " + token.beginLine);
4785 } catch (CoreException e) {
4786 PHPeclipsePlugin.log(e);
4788 endBlock = SimpleCharStream.getPosition();
4790 jj_consume_token(ENDFOR);
4791 } catch (ParseException e) {
4792 errorMessage = "'endfor' expected";
4794 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4795 errorEnd = SimpleCharStream.getPosition() + 1;
4796 {if (true) throw e;}
4799 jj_consume_token(SEMICOLON);
4800 Statement[] stmtsArray = new Statement[list.size()];
4801 list.toArray(stmtsArray);
4802 {if (true) return new ForStatement(initializations,condition,increments,new Block(stmtsArray,startBlock,endBlock),pos,SimpleCharStream.getPosition());}
4803 } catch (ParseException e) {
4804 errorMessage = "';' expected after 'endfor' keyword";
4806 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4807 errorEnd = SimpleCharStream.getPosition() + 1;
4808 {if (true) throw e;}
4812 jj_la1[118] = jj_gen;
4813 jj_consume_token(-1);
4814 throw new ParseException();
4816 throw new Error("Missing return statement in function");
4819 static final public Statement[] ForInit() throws ParseException {
4820 Statement[] statements;
4821 if (jj_2_8(2147483647)) {
4822 statements = LocalVariableDeclaration();
4823 {if (true) return statements;}
4825 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4833 statements = StatementExpressionList();
4834 {if (true) return statements;}
4837 jj_la1[119] = jj_gen;
4838 jj_consume_token(-1);
4839 throw new ParseException();
4842 throw new Error("Missing return statement in function");
4845 static final public Statement[] StatementExpressionList() throws ParseException {
4846 final ArrayList list = new ArrayList();
4848 expr = StatementExpression();
4852 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4857 jj_la1[120] = jj_gen;
4860 jj_consume_token(COMMA);
4861 StatementExpression();
4864 Statement[] stmtsArray = new Statement[list.size()];
4865 list.toArray(stmtsArray);
4866 {if (true) return stmtsArray;}
4867 throw new Error("Missing return statement in function");
4870 static final public Continue ContinueStatement() throws ParseException {
4871 Expression expr = null;
4872 final int pos = SimpleCharStream.getPosition();
4873 jj_consume_token(CONTINUE);
4874 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4890 case INTEGER_LITERAL:
4891 case FLOATING_POINT_LITERAL:
4892 case STRING_LITERAL:
4896 expr = Expression();
4899 jj_la1[121] = jj_gen;
4903 jj_consume_token(SEMICOLON);
4904 {if (true) return new Continue(expr,pos,SimpleCharStream.getPosition());}
4905 } catch (ParseException e) {
4906 errorMessage = "';' expected after 'continue' statement";
4908 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4909 errorEnd = SimpleCharStream.getPosition() + 1;
4910 {if (true) throw e;}
4912 throw new Error("Missing return statement in function");
4915 static final public ReturnStatement ReturnStatement() throws ParseException {
4916 Expression expr = null;
4917 final int pos = SimpleCharStream.getPosition();
4918 jj_consume_token(RETURN);
4919 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4935 case INTEGER_LITERAL:
4936 case FLOATING_POINT_LITERAL:
4937 case STRING_LITERAL:
4941 expr = Expression();
4944 jj_la1[122] = jj_gen;
4948 jj_consume_token(SEMICOLON);
4949 {if (true) return new ReturnStatement(expr,pos,SimpleCharStream.getPosition());}
4950 } catch (ParseException e) {
4951 errorMessage = "';' expected after 'return' statement";
4953 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4954 errorEnd = SimpleCharStream.getPosition() + 1;
4955 {if (true) throw e;}
4957 throw new Error("Missing return statement in function");
4960 static final private boolean jj_2_1(int xla) {
4961 jj_la = xla; jj_lastpos = jj_scanpos = token;
4962 boolean retval = !jj_3_1();
4967 static final private boolean jj_2_2(int xla) {
4968 jj_la = xla; jj_lastpos = jj_scanpos = token;
4969 boolean retval = !jj_3_2();
4974 static final private boolean jj_2_3(int xla) {
4975 jj_la = xla; jj_lastpos = jj_scanpos = token;
4976 boolean retval = !jj_3_3();
4981 static final private boolean jj_2_4(int xla) {
4982 jj_la = xla; jj_lastpos = jj_scanpos = token;
4983 boolean retval = !jj_3_4();
4988 static final private boolean jj_2_5(int xla) {
4989 jj_la = xla; jj_lastpos = jj_scanpos = token;
4990 boolean retval = !jj_3_5();
4995 static final private boolean jj_2_6(int xla) {
4996 jj_la = xla; jj_lastpos = jj_scanpos = token;
4997 boolean retval = !jj_3_6();
5002 static final private boolean jj_2_7(int xla) {
5003 jj_la = xla; jj_lastpos = jj_scanpos = token;
5004 boolean retval = !jj_3_7();
5009 static final private boolean jj_2_8(int xla) {
5010 jj_la = xla; jj_lastpos = jj_scanpos = token;
5011 boolean retval = !jj_3_8();
5016 static final private boolean jj_3R_193() {
5017 if (jj_scan_token(INCR)) return true;
5018 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5022 static final private boolean jj_3R_185() {
5027 if (jj_3R_194()) return true;
5028 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5029 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5033 static final private boolean jj_3R_99() {
5034 if (jj_3R_50()) return true;
5035 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5039 static final private boolean jj_3R_168() {
5040 if (jj_3R_166()) return true;
5041 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5044 if (jj_3R_185()) jj_scanpos = xsp;
5045 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5049 static final private boolean jj_3R_83() {
5050 if (jj_scan_token(OBJECT)) return true;
5051 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5055 static final private boolean jj_3R_82() {
5056 if (jj_scan_token(INTEGER)) return true;
5057 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5061 static final private boolean jj_3R_81() {
5062 if (jj_scan_token(INT)) return true;
5063 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5067 static final private boolean jj_3R_44() {
5068 if (jj_scan_token(ARRAY)) return true;
5069 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5073 static final private boolean jj_3R_80() {
5074 if (jj_scan_token(FLOAT)) return true;
5075 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5079 static final private boolean jj_3R_184() {
5080 if (jj_scan_token(ARRAY)) return true;
5081 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5085 static final private boolean jj_3R_79() {
5086 if (jj_scan_token(DOUBLE)) return true;
5087 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5091 static final private boolean jj_3R_183() {
5092 if (jj_3R_52()) return true;
5093 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5097 static final private boolean jj_3R_85() {
5098 if (jj_scan_token(LIST)) return true;
5099 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5100 if (jj_scan_token(LPAREN)) return true;
5101 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5104 if (jj_3R_99()) jj_scanpos = xsp;
5105 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5108 if (jj_3R_100()) { jj_scanpos = xsp; break; }
5109 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5111 if (jj_scan_token(RPAREN)) return true;
5112 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5114 if (jj_3R_101()) jj_scanpos = xsp;
5115 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5119 static final private boolean jj_3R_78() {
5120 if (jj_scan_token(REAL)) return true;
5121 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5125 static final private boolean jj_3R_167() {
5126 if (jj_scan_token(LPAREN)) return true;
5127 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5132 if (jj_3R_184()) return true;
5133 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5134 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5135 if (jj_scan_token(RPAREN)) return true;
5136 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5137 if (jj_3R_139()) return true;
5138 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5142 static final private boolean jj_3R_77() {
5143 if (jj_scan_token(BOOLEAN)) return true;
5144 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5148 static final private boolean jj_3R_76() {
5149 if (jj_scan_token(BOOL)) return true;
5150 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5154 static final private boolean jj_3R_43() {
5155 if (jj_3R_52()) return true;
5156 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5160 static final private boolean jj_3R_75() {
5161 if (jj_scan_token(STRING)) return true;
5162 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5166 static final private boolean jj_3R_52() {
5185 if (jj_3R_83()) return true;
5186 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5187 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5188 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5189 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5190 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5191 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5192 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5193 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5194 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5198 static final private boolean jj_3R_84() {
5199 if (jj_scan_token(PRINT)) return true;
5200 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5201 if (jj_3R_45()) return true;
5202 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5206 static final private boolean jj_3_4() {
5207 if (jj_scan_token(LPAREN)) return true;
5208 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5213 if (jj_3R_44()) return true;
5214 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5215 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5216 if (jj_scan_token(RPAREN)) return true;
5217 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5221 static final private boolean jj_3R_165() {
5222 if (jj_scan_token(LPAREN)) return true;
5223 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5224 if (jj_3R_45()) return true;
5225 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5226 if (jj_scan_token(RPAREN)) return true;
5227 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5231 static final private boolean jj_3R_164() {
5232 if (jj_3R_169()) return true;
5233 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5237 static final private boolean jj_3R_163() {
5238 if (jj_3R_168()) return true;
5239 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5243 static final private boolean jj_3R_162() {
5244 if (jj_3R_167()) return true;
5245 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5249 static final private boolean jj_3R_158() {
5260 if (jj_3R_165()) return true;
5261 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5262 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5263 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5264 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5265 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5269 static final private boolean jj_3R_161() {
5270 if (jj_scan_token(BANG)) return true;
5271 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5272 if (jj_3R_139()) return true;
5273 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5277 static final private boolean jj_3R_160() {
5278 if (jj_scan_token(DECR)) return true;
5279 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5283 static final private boolean jj_3R_159() {
5284 if (jj_scan_token(INCR)) return true;
5285 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5289 static final private boolean jj_3R_157() {
5294 if (jj_3R_160()) return true;
5295 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5296 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5297 if (jj_3R_166()) return true;
5298 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5302 static final private boolean jj_3R_152() {
5303 if (jj_3R_158()) return true;
5304 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5308 static final private boolean jj_3R_151() {
5309 if (jj_3R_157()) return true;
5310 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5314 static final private boolean jj_3R_156() {
5315 if (jj_scan_token(MINUS)) return true;
5316 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5320 static final private boolean jj_3R_155() {
5321 if (jj_scan_token(PLUS)) return true;
5322 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5326 static final private boolean jj_3R_148() {
5333 if (jj_3R_152()) return true;
5334 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5335 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5336 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5340 static final private boolean jj_3R_150() {
5345 if (jj_3R_156()) return true;
5346 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5347 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5348 if (jj_3R_139()) return true;
5349 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5353 static final private boolean jj_3R_154() {
5354 if (jj_3R_148()) return true;
5355 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5359 static final private boolean jj_3R_149() {
5364 if (jj_3R_154()) return true;
5365 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5366 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5370 static final private boolean jj_3R_153() {
5371 if (jj_scan_token(AT)) return true;
5372 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5373 if (jj_3R_149()) return true;
5374 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5378 static final private boolean jj_3R_144() {
5379 if (jj_3R_149()) return true;
5380 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5384 static final private boolean jj_3R_139() {
5389 if (jj_3R_144()) return true;
5390 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5391 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5395 static final private boolean jj_3R_143() {
5396 if (jj_scan_token(BIT_AND)) return true;
5397 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5398 if (jj_3R_148()) return true;
5399 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5403 static final private boolean jj_3R_87() {
5404 if (jj_scan_token(ASSIGN)) return true;
5405 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5406 if (jj_3R_45()) return true;
5407 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5411 static final private boolean jj_3R_147() {
5412 if (jj_scan_token(REMAINDER)) return true;
5413 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5417 static final private boolean jj_3R_146() {
5418 if (jj_scan_token(SLASH)) return true;
5419 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5423 static final private boolean jj_3R_145() {
5424 if (jj_scan_token(STAR)) return true;
5425 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5429 static final private boolean jj_3R_140() {
5436 if (jj_3R_147()) return true;
5437 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5438 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5439 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5440 if (jj_3R_139()) return true;
5441 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5445 static final private boolean jj_3R_134() {
5446 if (jj_3R_139()) return true;
5447 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5451 if (jj_3R_140()) { jj_scanpos = xsp; break; }
5452 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5457 static final private boolean jj_3R_198() {
5458 if (jj_scan_token(COMMA)) return true;
5459 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5463 static final private boolean jj_3R_142() {
5464 if (jj_scan_token(MINUS)) return true;
5465 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5469 static final private boolean jj_3_2() {
5470 if (jj_scan_token(COMMA)) return true;
5471 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5472 if (jj_3R_41()) return true;
5473 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5477 static final private boolean jj_3R_141() {
5478 if (jj_scan_token(PLUS)) return true;
5479 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5483 static final private boolean jj_3R_135() {
5488 if (jj_3R_142()) return true;
5489 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5490 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5491 if (jj_3R_134()) return true;
5492 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5496 static final private boolean jj_3R_197() {
5497 if (jj_3R_41()) return true;
5498 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5502 if (jj_3_2()) { jj_scanpos = xsp; break; }
5503 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5508 static final private boolean jj_3R_57() {
5509 if (jj_3R_50()) return true;
5510 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5513 if (jj_3R_87()) jj_scanpos = xsp;
5514 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5518 static final private boolean jj_3R_128() {
5519 if (jj_3R_134()) return true;
5520 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5524 if (jj_3R_135()) { jj_scanpos = xsp; break; }
5525 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5530 static final private boolean jj_3_7() {
5531 if (jj_3R_46()) return true;
5532 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5536 static final private boolean jj_3R_192() {
5537 if (jj_scan_token(LPAREN)) return true;
5538 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5541 if (jj_3R_197()) jj_scanpos = xsp;
5542 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5544 if (jj_3R_198()) jj_scanpos = xsp;
5545 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5546 if (jj_scan_token(RPAREN)) return true;
5547 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5551 static final private boolean jj_3R_138() {
5552 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
5553 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5557 static final private boolean jj_3R_58() {
5558 if (jj_scan_token(COMMA)) return true;
5559 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5560 if (jj_3R_57()) return true;
5561 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5565 static final private boolean jj_3R_137() {
5566 if (jj_scan_token(RSIGNEDSHIFT)) return true;
5567 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5571 static final private boolean jj_3R_136() {
5572 if (jj_scan_token(LSHIFT)) return true;
5573 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5577 static final private boolean jj_3R_129() {
5584 if (jj_3R_138()) return true;
5585 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5586 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5587 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5588 if (jj_3R_128()) return true;
5589 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5593 static final private boolean jj_3R_47() {
5594 if (jj_3R_57()) return true;
5595 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5599 if (jj_3R_58()) { jj_scanpos = xsp; break; }
5600 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5605 static final private boolean jj_3R_121() {
5606 if (jj_3R_128()) return true;
5607 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5611 if (jj_3R_129()) { jj_scanpos = xsp; break; }
5612 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5617 static final private boolean jj_3_6() {
5618 if (jj_3R_45()) return true;
5619 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5620 if (jj_scan_token(SEMICOLON)) return true;
5621 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5625 static final private boolean jj_3R_201() {
5626 if (jj_scan_token(ARRAYASSIGN)) return true;
5627 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5628 if (jj_3R_45()) return true;
5629 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5633 static final private boolean jj_3R_41() {
5634 if (jj_3R_45()) return true;
5635 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5638 if (jj_3R_201()) jj_scanpos = xsp;
5639 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5643 static final private boolean jj_3R_133() {
5644 if (jj_scan_token(GE)) return true;
5645 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5649 static final private boolean jj_3R_132() {
5650 if (jj_scan_token(LE)) return true;
5651 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5655 static final private boolean jj_3R_131() {
5656 if (jj_scan_token(GT)) return true;
5657 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5661 static final private boolean jj_3R_130() {
5662 if (jj_scan_token(LT)) return true;
5663 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5667 static final private boolean jj_3R_122() {
5676 if (jj_3R_133()) return true;
5677 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5678 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5679 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5680 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5681 if (jj_3R_121()) return true;
5682 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5686 static final private boolean jj_3R_119() {
5687 if (jj_3R_121()) return true;
5688 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5692 if (jj_3R_122()) { jj_scanpos = xsp; break; }
5693 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5698 static final private boolean jj_3R_203() {
5699 if (jj_scan_token(COMMA)) return true;
5700 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5701 if (jj_3R_45()) return true;
5702 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5706 static final private boolean jj_3R_202() {
5707 if (jj_3R_45()) return true;
5708 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5712 if (jj_3R_203()) { jj_scanpos = xsp; break; }
5713 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5718 static final private boolean jj_3R_108() {
5719 if (jj_scan_token(LBRACE)) return true;
5720 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5721 if (jj_3R_45()) return true;
5722 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5723 if (jj_scan_token(RBRACE)) return true;
5724 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5728 static final private boolean jj_3R_127() {
5729 if (jj_scan_token(TRIPLEEQUAL)) return true;
5730 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5734 static final private boolean jj_3R_200() {
5735 if (jj_3R_202()) return true;
5736 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5740 static final private boolean jj_3R_126() {
5741 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5742 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5746 static final private boolean jj_3R_125() {
5747 if (jj_scan_token(NOT_EQUAL)) return true;
5748 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5752 static final private boolean jj_3R_91() {
5753 if (jj_scan_token(DOLLAR_ID)) return true;
5754 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5758 static final private boolean jj_3R_124() {
5759 if (jj_scan_token(DIF)) return true;
5760 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5764 static final private boolean jj_3R_123() {
5765 if (jj_scan_token(EQUAL_EQUAL)) return true;
5766 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5770 static final private boolean jj_3R_120() {
5781 if (jj_3R_127()) return true;
5782 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5783 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5784 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5785 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5786 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5787 if (jj_3R_119()) return true;
5788 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5792 static final private boolean jj_3R_93() {
5793 if (jj_3R_52()) return true;
5794 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5798 static final private boolean jj_3R_90() {
5799 if (jj_scan_token(DOLLAR)) return true;
5800 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5801 if (jj_3R_59()) return true;
5802 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5806 static final private boolean jj_3R_117() {
5807 if (jj_3R_119()) return true;
5808 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5812 if (jj_3R_120()) { jj_scanpos = xsp; break; }
5813 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5818 static final private boolean jj_3R_199() {
5819 if (jj_scan_token(LPAREN)) return true;
5820 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5823 if (jj_3R_200()) jj_scanpos = xsp;
5824 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5825 if (jj_scan_token(RPAREN)) return true;
5826 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5830 static final private boolean jj_3R_118() {
5831 if (jj_scan_token(BIT_AND)) return true;
5832 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5833 if (jj_3R_117()) return true;
5834 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5838 static final private boolean jj_3R_177() {
5839 if (jj_scan_token(NULL)) return true;
5840 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5844 static final private boolean jj_3R_89() {
5845 if (jj_scan_token(IDENTIFIER)) return true;
5846 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5849 if (jj_3R_108()) jj_scanpos = xsp;
5850 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5854 static final private boolean jj_3R_176() {
5855 if (jj_scan_token(FALSE)) return true;
5856 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5860 static final private boolean jj_3R_115() {
5861 if (jj_3R_117()) return true;
5862 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5866 if (jj_3R_118()) { jj_scanpos = xsp; break; }
5867 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5872 static final private boolean jj_3R_175() {
5873 if (jj_scan_token(TRUE)) return true;
5874 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5878 static final private boolean jj_3R_174() {
5879 if (jj_scan_token(STRING_LITERAL)) return true;
5880 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5884 static final private boolean jj_3R_88() {
5885 if (jj_scan_token(LBRACE)) return true;
5886 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5887 if (jj_3R_45()) return true;
5888 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5889 if (jj_scan_token(RBRACE)) return true;
5890 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5894 static final private boolean jj_3R_59() {
5903 if (jj_3R_91()) return true;
5904 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5905 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5906 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5907 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5911 static final private boolean jj_3R_173() {
5912 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
5913 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5917 static final private boolean jj_3R_98() {
5918 if (jj_scan_token(LBRACE)) return true;
5919 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5920 if (jj_3R_45()) return true;
5921 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5922 if (jj_scan_token(RBRACE)) return true;
5923 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5927 static final private boolean jj_3R_169() {
5940 if (jj_3R_177()) return true;
5941 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5942 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5943 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5944 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5945 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5946 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5950 static final private boolean jj_3R_172() {
5951 if (jj_scan_token(INTEGER_LITERAL)) return true;
5952 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5956 static final private boolean jj_3R_116() {
5957 if (jj_scan_token(XOR)) return true;
5958 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5959 if (jj_3R_115()) return true;
5960 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5964 static final private boolean jj_3R_113() {
5965 if (jj_3R_115()) return true;
5966 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5970 if (jj_3R_116()) { jj_scanpos = xsp; break; }
5971 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5976 static final private boolean jj_3R_92() {
5977 if (jj_3R_45()) return true;
5978 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5982 static final private boolean jj_3R_60() {
5987 if (jj_3R_93()) return true;
5988 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5989 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5993 static final private boolean jj_3R_95() {
5994 if (jj_scan_token(DOLLAR)) return true;
5995 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5996 if (jj_3R_59()) return true;
5997 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6001 static final private boolean jj_3R_46() {
6002 if (jj_scan_token(IDENTIFIER)) return true;
6003 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6004 if (jj_scan_token(COLON)) return true;
6005 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6009 static final private boolean jj_3_8() {
6010 if (jj_3R_47()) return true;
6011 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6015 static final private boolean jj_3R_114() {
6016 if (jj_scan_token(BIT_OR)) return true;
6017 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6018 if (jj_3R_113()) return true;
6019 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6023 static final private boolean jj_3R_109() {
6024 if (jj_3R_113()) return true;
6025 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6029 if (jj_3R_114()) { jj_scanpos = xsp; break; }
6030 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6035 static final private boolean jj_3R_49() {
6036 if (jj_scan_token(LBRACKET)) return true;
6037 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6040 if (jj_3R_60()) jj_scanpos = xsp;
6041 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6042 if (jj_scan_token(RBRACKET)) return true;
6043 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6047 static final private boolean jj_3R_94() {
6048 if (jj_scan_token(DOLLAR_ID)) return true;
6049 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6052 if (jj_3R_98()) jj_scanpos = xsp;
6053 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6057 static final private boolean jj_3R_61() {
6062 if (jj_3R_95()) return true;
6063 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6064 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6068 static final private boolean jj_3R_110() {
6069 if (jj_scan_token(DOT)) return true;
6070 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6071 if (jj_3R_109()) return true;
6072 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6076 static final private boolean jj_3R_104() {
6077 if (jj_3R_109()) return true;
6078 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6082 if (jj_3R_110()) { jj_scanpos = xsp; break; }
6083 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6088 static final private boolean jj_3R_48() {
6089 if (jj_scan_token(CLASSACCESS)) return true;
6090 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6091 if (jj_3R_59()) return true;
6092 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6096 static final private boolean jj_3R_40() {
6101 if (jj_3R_49()) return true;
6102 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6103 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6107 static final private boolean jj_3R_112() {
6108 if (jj_scan_token(_ANDL)) return true;
6109 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6113 static final private boolean jj_3R_111() {
6114 if (jj_scan_token(AND_AND)) return true;
6115 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6119 static final private boolean jj_3_1() {
6120 if (jj_3R_40()) return true;
6121 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6125 static final private boolean jj_3R_196() {
6126 if (jj_3R_40()) return true;
6127 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6131 static final private boolean jj_3R_105() {
6136 if (jj_3R_112()) return true;
6137 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6138 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6139 if (jj_3R_104()) return true;
6140 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6144 static final private boolean jj_3R_195() {
6145 if (jj_3R_199()) return true;
6146 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6150 static final private boolean jj_3R_188() {
6155 if (jj_3R_196()) return true;
6156 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6157 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6161 static final private boolean jj_3R_97() {
6162 if (jj_scan_token(HOOK)) return true;
6163 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6164 if (jj_3R_45()) return true;
6165 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6166 if (jj_scan_token(COLON)) return true;
6167 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6168 if (jj_3R_86()) return true;
6169 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6173 static final private boolean jj_3R_102() {
6174 if (jj_3R_104()) return true;
6175 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6179 if (jj_3R_105()) { jj_scanpos = xsp; break; }
6180 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6185 static final private boolean jj_3R_50() {
6186 if (jj_3R_61()) return true;
6187 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6191 if (jj_3_1()) { jj_scanpos = xsp; break; }
6192 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6197 static final private boolean jj_3R_187() {
6198 if (jj_3R_50()) return true;
6199 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6203 static final private boolean jj_3R_107() {
6204 if (jj_scan_token(_ORL)) return true;
6205 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6209 static final private boolean jj_3R_106() {
6210 if (jj_scan_token(OR_OR)) return true;
6211 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6215 static final private boolean jj_3R_186() {
6216 if (jj_scan_token(IDENTIFIER)) return true;
6217 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6221 static final private boolean jj_3R_178() {
6226 if (jj_3R_187()) return true;
6227 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6228 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6232 static final private boolean jj_3R_103() {
6237 if (jj_3R_107()) return true;
6238 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6239 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6240 if (jj_3R_102()) return true;
6241 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6245 static final private boolean jj_3R_96() {
6246 if (jj_3R_102()) return true;
6247 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6251 if (jj_3R_103()) { jj_scanpos = xsp; break; }
6252 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6257 static final private boolean jj_3R_86() {
6258 if (jj_3R_96()) return true;
6259 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6262 if (jj_3R_97()) jj_scanpos = xsp;
6263 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6267 static final private boolean jj_3R_74() {
6268 if (jj_scan_token(TILDEEQUAL)) return true;
6269 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6273 static final private boolean jj_3R_191() {
6274 if (jj_3R_50()) return true;
6275 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6279 static final private boolean jj_3R_73() {
6280 if (jj_scan_token(DOTASSIGN)) return true;
6281 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6285 static final private boolean jj_3R_72() {
6286 if (jj_scan_token(ORASSIGN)) return true;
6287 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6291 static final private boolean jj_3R_71() {
6292 if (jj_scan_token(XORASSIGN)) return true;
6293 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6297 static final private boolean jj_3R_190() {
6298 if (jj_scan_token(NEW)) return true;
6299 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6300 if (jj_3R_178()) return true;
6301 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6305 static final private boolean jj_3R_70() {
6306 if (jj_scan_token(ANDASSIGN)) return true;
6307 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6311 static final private boolean jj_3R_69() {
6312 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6313 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6317 static final private boolean jj_3R_68() {
6318 if (jj_scan_token(LSHIFTASSIGN)) return true;
6319 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6323 static final private boolean jj_3R_189() {
6324 if (jj_scan_token(IDENTIFIER)) return true;
6325 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6329 static final private boolean jj_3R_180() {
6336 if (jj_3R_191()) return true;
6337 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6338 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6339 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6343 static final private boolean jj_3R_67() {
6344 if (jj_scan_token(MINUSASSIGN)) return true;
6345 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6349 static final private boolean jj_3R_66() {
6350 if (jj_scan_token(PLUSASSIGN)) return true;
6351 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6355 static final private boolean jj_3R_65() {
6356 if (jj_scan_token(REMASSIGN)) return true;
6357 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6361 static final private boolean jj_3R_64() {
6362 if (jj_scan_token(SLASHASSIGN)) return true;
6363 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6367 static final private boolean jj_3R_63() {
6368 if (jj_scan_token(STARASSIGN)) return true;
6369 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6373 static final private boolean jj_3R_51() {
6400 if (jj_3R_74()) return true;
6401 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6402 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6403 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6404 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6405 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6406 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6407 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6408 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6409 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6410 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6411 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6412 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6413 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6417 static final private boolean jj_3R_62() {
6418 if (jj_scan_token(ASSIGN)) return true;
6419 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6423 static final private boolean jj_3R_182() {
6424 if (jj_scan_token(ARRAY)) return true;
6425 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6426 if (jj_3R_192()) return true;
6427 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6431 static final private boolean jj_3R_171() {
6432 if (jj_3R_182()) return true;
6433 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6437 static final private boolean jj_3R_181() {
6438 if (jj_3R_188()) return true;
6439 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6443 static final private boolean jj_3R_170() {
6444 if (jj_3R_180()) return true;
6445 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6449 if (jj_3R_181()) { jj_scanpos = xsp; break; }
6450 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6455 static final private boolean jj_3R_101() {
6456 if (jj_scan_token(ASSIGN)) return true;
6457 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6458 if (jj_3R_45()) return true;
6459 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6463 static final private boolean jj_3R_179() {
6464 if (jj_3R_188()) return true;
6465 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6469 static final private boolean jj_3R_42() {
6470 if (jj_3R_50()) return true;
6471 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6472 if (jj_3R_51()) return true;
6473 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6474 if (jj_3R_45()) return true;
6475 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6479 static final private boolean jj_3_3() {
6480 if (jj_3R_42()) return true;
6481 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6485 static final private boolean jj_3_5() {
6486 if (jj_scan_token(IDENTIFIER)) return true;
6487 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6488 if (jj_scan_token(STATICCLASSACCESS)) return true;
6489 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6490 if (jj_3R_178()) return true;
6491 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6495 if (jj_3R_179()) { jj_scanpos = xsp; break; }
6496 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6501 static final private boolean jj_3R_166() {
6508 if (jj_3R_171()) return true;
6509 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6510 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6511 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6515 static final private boolean jj_3R_56() {
6516 if (jj_3R_86()) return true;
6517 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6521 static final private boolean jj_3R_55() {
6522 if (jj_3R_42()) return true;
6523 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6527 static final private boolean jj_3R_54() {
6528 if (jj_3R_85()) return true;
6529 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6533 static final private boolean jj_3R_45() {
6542 if (jj_3R_56()) return true;
6543 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6544 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6545 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6546 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6550 static final private boolean jj_3R_53() {
6551 if (jj_3R_84()) return true;
6552 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6556 static final private boolean jj_3R_100() {
6557 if (jj_scan_token(COMMA)) return true;
6558 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6559 if (jj_3R_50()) return true;
6560 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6564 static final private boolean jj_3R_194() {
6565 if (jj_scan_token(DECR)) return true;
6566 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6570 static private boolean jj_initialized_once = false;
6571 static public PHPParserTokenManager token_source;
6572 static SimpleCharStream jj_input_stream;
6573 static public Token token, jj_nt;
6574 static private int jj_ntk;
6575 static private Token jj_scanpos, jj_lastpos;
6576 static private int jj_la;
6577 static public boolean lookingAhead = false;
6578 static private boolean jj_semLA;
6579 static private int jj_gen;
6580 static final private int[] jj_la1 = new int[123];
6581 static private int[] jj_la1_0;
6582 static private int[] jj_la1_1;
6583 static private int[] jj_la1_2;
6584 static private int[] jj_la1_3;
6585 static private int[] jj_la1_4;
6593 private static void jj_la1_0() {
6594 jj_la1_0 = new int[] {0xfcb0001e,0x6,0x6,0xfcb0001e,0x0,0xfcb00000,0x0,0x600000,0x600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x0,0x34000000,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x4000000,0x0,0x4000000,0x0,0x0,0x4000000,0x4000000,0x0,0x0,0x0,0x0,0x4000000,0x0,0x4000000,0x0,0x0,0x34000000,0x34000000,0x0,0x0,0x34000000,0x0,0x0,0xc4800000,0xfc800000,0x8,0x6,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0xfcb00010,0xfcb00010,0xfcb00000,0xf4b00000,0x0,0x0,0x0,0x0,0x4000000,0x0,0x0,0x0,0xf4b00010,0xf4b00010,0x8000000,0x0,0x34000000,0xfc800010,0xfc800010,0x1000000,0x2000000,0xfc800010,0x1000000,0x2000000,0xfc800010,0xfc800010,0xfc800010,0xfc800010,0xfc800010,0xfc800000,0xfc800000,0x4000000,0x34000000,0x4000000,0xfc800000,0xfc800000,0x4000000,0x0,0x34000000,0x34000000,};
6596 private static void jj_la1_1() {
6597 jj_la1_1 = new int[] {0x21d7541f,0x0,0x0,0x21d7541f,0x0,0x21d7541f,0x2000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc20000,0x80,0xc30000,0x0,0x0,0x0,0x0,0x0,0x80000000,0x0,0xc30000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc30000,0xc30000,0x0,0xc30000,0x0,0x0,0xc30000,0x80000000,0x0,0x0,0x20,0x20,0x10000,0x10000,0x10000,0x0,0x20,0x80c30000,0x80c30000,0x20,0xc20000,0xc30000,0x0,0x0,0x2115541f,0x21d7541f,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x21d7541f,0x21d7541f,0x21d7541f,0x21d7541f,0x0,0x0,0x0,0x0,0x10000,0x0,0x900,0x900,0x21d7541f,0x21d7541f,0x0,0x900,0xc30000,0x21d7541f,0x21d7541f,0x0,0x0,0x21d7541f,0x0,0x0,0x21d7541f,0x21d7541f,0x21d7541f,0x21d7541f,0x21d7541f,0x21d7541f,0x21d7541f,0x10000,0xc30000,0x10000,0x21d7541f,0x21d7541f,0x10000,0x0,0xc30000,0xc30000,};
6599 private static void jj_la1_2() {
6600 jj_la1_2 = new int[] {0x804f0700,0x0,0x0,0x804f0700,0x0,0x804f0700,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x200,0x80000000,0x80000000,0x800c0000,0x0,0x804f0700,0x0,0x400000,0x0,0x400200,0x400000,0xff,0x0,0x804f0700,0x0,0x1000,0x20004000,0x20004000,0x40008000,0x40008000,0x0,0x800000,0x1000000,0x400000,0x0,0x0,0x0,0x0,0x1c000000,0x1c000000,0xc0000,0xc0000,0x2300000,0x2300000,0x804f0700,0x800f0700,0xc0000,0x800f0600,0x30000,0x400,0x80000200,0xff,0x30000,0x30000,0x0,0x0,0x200,0x200,0x200,0x200,0x0,0x804f07ff,0x804f07ff,0x0,0x80000000,0x804f0700,0x0,0x100,0x30300,0x804f0700,0x0,0x0,0x0,0x200,0x0,0x0,0x0,0x0,0x0,0x804f0700,0x804f0700,0x804f0700,0x804f0700,0x0,0x0,0x30000,0x30000,0x30200,0x2000,0x0,0x0,0x804f0700,0x804f0700,0x0,0x0,0x804f0700,0x804f0700,0x804f0700,0x0,0x0,0x804f0700,0x0,0x0,0x804f2700,0x804f0700,0x804f0700,0x804f0700,0x804f0700,0x804f0700,0x804f2700,0x30200,0x804f0700,0x30200,0x804f0700,0x804f2700,0x30200,0x0,0x804f0700,0x804f0700,};
6602 private static void jj_la1_3() {
6603 jj_la1_3 = new int[] {0x8a228,0x0,0x0,0x8a228,0x80000,0x8a228,0x0,0x0,0x0,0x100000,0x80000000,0x8000,0x0,0x8000,0x8200,0x8,0x8,0x228,0x0,0x2228,0x100000,0x0,0x100000,0x0,0x0,0x0,0x0,0x2228,0x80000000,0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x0,0x0,0x79000000,0x79000000,0x6c00000,0x6c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x2228,0x2228,0x0,0x2228,0x0,0x0,0x2228,0x0,0x0,0x0,0x22000,0x22000,0x200,0x200,0x200,0x200,0x22000,0x2228,0x2228,0x20000,0x28,0x2228,0x100000,0x0,0x88200,0x8a228,0x0,0x0,0x0,0x0,0x100000,0x80000000,0x100000,0x100000,0x100000,0x8a228,0x8a228,0x8a228,0x8a228,0x100000,0x80000000,0x80000000,0x80000000,0x200,0x8000,0x0,0x0,0x8a228,0x8a228,0x0,0x0,0x2228,0x8a228,0x8a228,0x0,0x0,0x8a228,0x0,0x0,0x8a228,0x8a228,0x8a228,0x8a228,0x8a228,0x8a228,0x8a228,0x200,0x2228,0x200,0x8a228,0x8a228,0x200,0x100000,0x2228,0x2228,};
6605 private static void jj_la1_4() {
6606 jj_la1_4 = new int[] {0x1000,0x0,0x0,0x1000,0x0,0x1000,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x0,0x1000,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x1000,0xfff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x1000,0x0,0x1000,0x0,0x0,0x1000,0x0,0x0,0x0,0x0,0x0,0x1000,0x1000,0x1000,0x1000,0x0,0x1000,0x1000,0x0,0x0,0x1000,0x0,0x0,0x1000,0x1000,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x0,0x0,0x1000,0x1000,0x1000,0x1000,0x0,0x0,0xfff,0xfff,0x1000,0x0,0x0,0x0,0x1000,0x1000,0x0,0x0,0x1000,0x1000,0x1000,0x0,0x0,0x1000,0x0,0x0,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x0,0x1000,0x1000,};
6608 static final private JJCalls[] jj_2_rtns = new JJCalls[8];
6609 static private boolean jj_rescan = false;
6610 static private int jj_gc = 0;
6612 public PHPParser(java.io.InputStream stream) {
6613 if (jj_initialized_once) {
6614 System.out.println("ERROR: Second call to constructor of static parser. You must");
6615 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6616 System.out.println(" during parser generation.");
6619 jj_initialized_once = true;
6620 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6621 token_source = new PHPParserTokenManager(jj_input_stream);
6622 token = new Token();
6625 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6626 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6629 static public void ReInit(java.io.InputStream stream) {
6630 jj_input_stream.ReInit(stream, 1, 1);
6631 token_source.ReInit(jj_input_stream);
6632 token = new Token();
6635 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6636 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6639 public PHPParser(java.io.Reader stream) {
6640 if (jj_initialized_once) {
6641 System.out.println("ERROR: Second call to constructor of static parser. You must");
6642 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6643 System.out.println(" during parser generation.");
6646 jj_initialized_once = true;
6647 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6648 token_source = new PHPParserTokenManager(jj_input_stream);
6649 token = new Token();
6652 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6653 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6656 static public void ReInit(java.io.Reader stream) {
6657 jj_input_stream.ReInit(stream, 1, 1);
6658 token_source.ReInit(jj_input_stream);
6659 token = new Token();
6662 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6663 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6666 public PHPParser(PHPParserTokenManager tm) {
6667 if (jj_initialized_once) {
6668 System.out.println("ERROR: Second call to constructor of static parser. You must");
6669 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6670 System.out.println(" during parser generation.");
6673 jj_initialized_once = true;
6675 token = new Token();
6678 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6679 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6682 public void ReInit(PHPParserTokenManager tm) {
6684 token = new Token();
6687 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6688 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6691 static final private Token jj_consume_token(int kind) throws ParseException {
6693 if ((oldToken = token).next != null) token = token.next;
6694 else token = token.next = token_source.getNextToken();
6696 if (token.kind == kind) {
6698 if (++jj_gc > 100) {
6700 for (int i = 0; i < jj_2_rtns.length; i++) {
6701 JJCalls c = jj_2_rtns[i];
6703 if (c.gen < jj_gen) c.first = null;
6712 throw generateParseException();
6715 static final private boolean jj_scan_token(int kind) {
6716 if (jj_scanpos == jj_lastpos) {
6718 if (jj_scanpos.next == null) {
6719 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
6721 jj_lastpos = jj_scanpos = jj_scanpos.next;
6724 jj_scanpos = jj_scanpos.next;
6727 int i = 0; Token tok = token;
6728 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
6729 if (tok != null) jj_add_error_token(kind, i);
6731 return (jj_scanpos.kind != kind);
6734 static final public Token getNextToken() {
6735 if (token.next != null) token = token.next;
6736 else token = token.next = token_source.getNextToken();
6742 static final public Token getToken(int index) {
6743 Token t = lookingAhead ? jj_scanpos : token;
6744 for (int i = 0; i < index; i++) {
6745 if (t.next != null) t = t.next;
6746 else t = t.next = token_source.getNextToken();
6751 static final private int jj_ntk() {
6752 if ((jj_nt=token.next) == null)
6753 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
6755 return (jj_ntk = jj_nt.kind);
6758 static private java.util.Vector jj_expentries = new java.util.Vector();
6759 static private int[] jj_expentry;
6760 static private int jj_kind = -1;
6761 static private int[] jj_lasttokens = new int[100];
6762 static private int jj_endpos;
6764 static private void jj_add_error_token(int kind, int pos) {
6765 if (pos >= 100) return;
6766 if (pos == jj_endpos + 1) {
6767 jj_lasttokens[jj_endpos++] = kind;
6768 } else if (jj_endpos != 0) {
6769 jj_expentry = new int[jj_endpos];
6770 for (int i = 0; i < jj_endpos; i++) {
6771 jj_expentry[i] = jj_lasttokens[i];
6773 boolean exists = false;
6774 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
6775 int[] oldentry = (int[])(enum.nextElement());
6776 if (oldentry.length == jj_expentry.length) {
6778 for (int i = 0; i < jj_expentry.length; i++) {
6779 if (oldentry[i] != jj_expentry[i]) {
6787 if (!exists) jj_expentries.addElement(jj_expentry);
6788 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
6792 static public ParseException generateParseException() {
6793 jj_expentries.removeAllElements();
6794 boolean[] la1tokens = new boolean[141];
6795 for (int i = 0; i < 141; i++) {
6796 la1tokens[i] = false;
6799 la1tokens[jj_kind] = true;
6802 for (int i = 0; i < 123; i++) {
6803 if (jj_la1[i] == jj_gen) {
6804 for (int j = 0; j < 32; j++) {
6805 if ((jj_la1_0[i] & (1<<j)) != 0) {
6806 la1tokens[j] = true;
6808 if ((jj_la1_1[i] & (1<<j)) != 0) {
6809 la1tokens[32+j] = true;
6811 if ((jj_la1_2[i] & (1<<j)) != 0) {
6812 la1tokens[64+j] = true;
6814 if ((jj_la1_3[i] & (1<<j)) != 0) {
6815 la1tokens[96+j] = true;
6817 if ((jj_la1_4[i] & (1<<j)) != 0) {
6818 la1tokens[128+j] = true;
6823 for (int i = 0; i < 141; i++) {
6825 jj_expentry = new int[1];
6827 jj_expentries.addElement(jj_expentry);
6832 jj_add_error_token(0, 0);
6833 int[][] exptokseq = new int[jj_expentries.size()][];
6834 for (int i = 0; i < jj_expentries.size(); i++) {
6835 exptokseq[i] = (int[])jj_expentries.elementAt(i);
6837 return new ParseException(token, exptokseq, tokenImage);
6840 static final public void enable_tracing() {
6843 static final public void disable_tracing() {
6846 static final private void jj_rescan_token() {
6848 for (int i = 0; i < 8; i++) {
6849 JJCalls p = jj_2_rtns[i];
6851 if (p.gen > jj_gen) {
6852 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
6854 case 0: jj_3_1(); break;
6855 case 1: jj_3_2(); break;
6856 case 2: jj_3_3(); break;
6857 case 3: jj_3_4(); break;
6858 case 4: jj_3_5(); break;
6859 case 5: jj_3_6(); break;
6860 case 6: jj_3_7(); break;
6861 case 7: jj_3_8(); break;
6865 } while (p != null);
6870 static final private void jj_save(int index, int xla) {
6871 JJCalls p = jj_2_rtns[index];
6872 while (p.gen > jj_gen) {
6873 if (p.next == null) { p = p.next = new JJCalls(); break; }
6876 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
6879 static final class JJCalls {