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 public static MethodDeclaration currentFunction;
43 private static boolean assigning;
45 /** The error level of the current ParseException. */
46 private static int errorLevel = ERROR;
47 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
48 private static String errorMessage;
50 private static int errorStart = -1;
51 private static int errorEnd = -1;
52 private static PHPDocument phpDocument;
54 * The point where html starts.
55 * It will be used by the token manager to create HTMLCode objects
57 public static int htmlStart;
60 private final static int AstStackIncrement = 100;
61 /** The stack of node. */
62 private static AstNode[] nodes;
63 /** The cursor in expression stack. */
64 private static int nodePtr;
66 public final void setFileToParse(final IFile fileToParse) {
67 this.fileToParse = fileToParse;
73 public PHPParser(final IFile fileToParse) {
74 this(new StringReader(""));
75 this.fileToParse = fileToParse;
79 * Reinitialize the parser.
81 private static final void init() {
82 nodes = new AstNode[AstStackIncrement];
88 * Add an php node on the stack.
89 * @param node the node that will be added to the stack
91 private static final void pushOnAstNodes(AstNode node) {
93 nodes[++nodePtr] = node;
94 } catch (IndexOutOfBoundsException e) {
95 int oldStackLength = nodes.length;
96 AstNode[] oldStack = nodes;
97 nodes = new AstNode[oldStackLength + AstStackIncrement];
98 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
99 nodePtr = oldStackLength;
100 nodes[nodePtr] = node;
104 public static final void phpParserTester(final String strEval) throws CoreException, ParseException {
105 PHPParserTokenManager.SwitchTo(PHPParserTokenManager.PHPPARSING);
106 final StringReader stream = new StringReader(strEval);
107 if (jj_input_stream == null) {
108 jj_input_stream = new SimpleCharStream(stream, 1, 1);
110 ReInit(new StringReader(strEval));
115 public static final void htmlParserTester(final File fileName) throws CoreException, ParseException {
117 final Reader stream = new FileReader(fileName);
118 if (jj_input_stream == null) {
119 jj_input_stream = new SimpleCharStream(stream, 1, 1);
124 } catch (FileNotFoundException e) {
125 e.printStackTrace(); //To change body of catch statement use Options | File Templates.
129 public static final void htmlParserTester(final String strEval) throws CoreException, ParseException {
130 final StringReader stream = new StringReader(strEval);
131 if (jj_input_stream == null) {
132 jj_input_stream = new SimpleCharStream(stream, 1, 1);
139 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
140 currentSegment = new PHPDocument(parent);
141 outlineInfo = new PHPOutlineInfo(parent);
142 final StringReader stream = new StringReader(s);
143 if (jj_input_stream == null) {
144 jj_input_stream = new SimpleCharStream(stream, 1, 1);
150 phpDocument = new PHPDocument(null);
151 phpDocument.nodes = nodes;
152 PHPeclipsePlugin.log(1,phpDocument.toString());
153 } catch (ParseException e) {
154 processParseException(e);
160 * This method will process the parse exception.
161 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
162 * @param e the ParseException
164 private static void processParseException(final ParseException e) {
165 if (errorMessage == null) {
166 PHPeclipsePlugin.log(e);
167 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
168 errorStart = jj_input_stream.getPosition();
169 errorEnd = errorStart + 1;
176 * Create marker for the parse error
177 * @param e the ParseException
179 private static void setMarker(final ParseException e) {
181 if (errorStart == -1) {
182 setMarker(fileToParse,
184 jj_input_stream.tokenBegin,
185 jj_input_stream.tokenBegin + e.currentToken.image.length(),
187 "Line " + e.currentToken.beginLine);
189 setMarker(fileToParse,
194 "Line " + e.currentToken.beginLine);
198 } catch (CoreException e2) {
199 PHPeclipsePlugin.log(e2);
204 * Create markers according to the external parser output
206 private static void createMarkers(final String output, final IFile file) throws CoreException {
207 // delete all markers
208 file.deleteMarkers(IMarker.PROBLEM, false, 0);
213 while ((brIndx = output.indexOf("<br />", indx)) != -1) {
214 // newer php error output (tested with 4.2.3)
215 scanLine(output, file, indx, brIndx);
220 while ((brIndx = output.indexOf("<br>", indx)) != -1) {
221 // older php error output (tested with 4.2.3)
222 scanLine(output, file, indx, brIndx);
228 private static void scanLine(final String output,
231 final int brIndx) throws CoreException {
233 StringBuffer lineNumberBuffer = new StringBuffer(10);
235 current = output.substring(indx, brIndx);
237 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
238 int onLine = current.indexOf("on line <b>");
240 lineNumberBuffer.delete(0, lineNumberBuffer.length());
241 for (int i = onLine; i < current.length(); i++) {
242 ch = current.charAt(i);
243 if ('0' <= ch && '9' >= ch) {
244 lineNumberBuffer.append(ch);
248 int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
250 Hashtable attributes = new Hashtable();
252 current = current.replaceAll("\n", "");
253 current = current.replaceAll("<b>", "");
254 current = current.replaceAll("</b>", "");
255 MarkerUtilities.setMessage(attributes, current);
257 if (current.indexOf(PARSE_ERROR_STRING) != -1)
258 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
259 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
260 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
262 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
263 MarkerUtilities.setLineNumber(attributes, lineNumber);
264 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
269 public final void parse(final String s) throws CoreException {
270 final StringReader stream = new StringReader(s);
271 if (jj_input_stream == null) {
272 jj_input_stream = new SimpleCharStream(stream, 1, 1);
278 } catch (ParseException e) {
279 processParseException(e);
284 * Call the php parse command ( php -l -f <filename> )
285 * and create markers according to the external parser output
287 public static void phpExternalParse(final IFile file) {
288 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
289 final String filename = file.getLocation().toString();
291 final String[] arguments = { filename };
292 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
293 final String command = form.format(arguments);
295 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
298 // parse the buffer to find the errors and warnings
299 createMarkers(parserResult, file);
300 } catch (CoreException e) {
301 PHPeclipsePlugin.log(e);
306 * Put a new html block in the stack.
308 public static final void createNewHTMLCode() {
309 final int currentPosition = SimpleCharStream.getPosition();
310 if (currentPosition == htmlStart) {
313 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition).toCharArray();
314 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
317 private static final void parse() throws ParseException {
321 static final public void phpTest() throws ParseException {
324 PHPParser.createNewHTMLCode();
327 static final public void phpFile() throws ParseException {
331 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
369 case INTEGER_LITERAL:
370 case FLOATING_POINT_LITERAL:
386 } catch (TokenMgrError e) {
387 PHPeclipsePlugin.log(e);
388 errorStart = SimpleCharStream.getPosition();
389 errorEnd = errorStart + 1;
390 errorMessage = e.getMessage();
392 {if (true) throw generateParseException();}
397 * A php block is a <?= expression [;]?>
398 * or <?php somephpcode ?>
399 * or <? somephpcode ?>
401 static final public void PhpBlock() throws ParseException {
402 final int start = jj_input_stream.getPosition();
403 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
443 case INTEGER_LITERAL:
444 case FLOATING_POINT_LITERAL:
451 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
454 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
456 jj_consume_token(PHPSTARTLONG);
459 jj_consume_token(PHPSTARTSHORT);
461 setMarker(fileToParse,
462 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
464 jj_input_stream.getPosition(),
466 "Line " + token.beginLine);
467 } catch (CoreException e) {
468 PHPeclipsePlugin.log(e);
473 jj_consume_token(-1);
474 throw new ParseException();
483 jj_consume_token(PHPEND);
484 } catch (ParseException e) {
485 errorMessage = "'?>' expected";
487 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
488 errorEnd = jj_input_stream.getPosition() + 1;
494 jj_consume_token(-1);
495 throw new ParseException();
499 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
500 final Expression expr;
501 final int pos = SimpleCharStream.getPosition();
502 PHPEchoBlock echoBlock;
503 jj_consume_token(PHPECHOSTART);
505 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
507 jj_consume_token(SEMICOLON);
513 jj_consume_token(PHPEND);
514 echoBlock = new PHPEchoBlock(expr,pos,SimpleCharStream.getPosition());
515 pushOnAstNodes(echoBlock);
516 {if (true) return echoBlock;}
517 throw new Error("Missing return statement in function");
520 static final public void Php() throws ParseException {
523 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
557 case INTEGER_LITERAL:
558 case FLOATING_POINT_LITERAL:
575 static final public ClassDeclaration ClassDeclaration() throws ParseException {
576 final ClassDeclaration classDeclaration;
577 final Token className;
578 Token superclassName = null;
580 jj_consume_token(CLASS);
582 pos = jj_input_stream.getPosition();
583 className = jj_consume_token(IDENTIFIER);
584 } catch (ParseException e) {
585 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
587 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
588 errorEnd = jj_input_stream.getPosition() + 1;
591 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
593 jj_consume_token(EXTENDS);
595 superclassName = jj_consume_token(IDENTIFIER);
596 } catch (ParseException e) {
597 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
599 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
600 errorEnd = jj_input_stream.getPosition() + 1;
608 if (superclassName == null) {
609 classDeclaration = new ClassDeclaration(currentSegment,
610 className.image.toCharArray(),
614 classDeclaration = new ClassDeclaration(currentSegment,
615 className.image.toCharArray(),
616 superclassName.image.toCharArray(),
620 currentSegment.add(classDeclaration);
621 currentSegment = classDeclaration;
622 ClassBody(classDeclaration);
623 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
624 classDeclaration.sourceEnd = SimpleCharStream.getPosition();
625 pushOnAstNodes(classDeclaration);
626 {if (true) return classDeclaration;}
627 throw new Error("Missing return statement in function");
630 static final public void ClassBody(ClassDeclaration classDeclaration) throws ParseException {
632 jj_consume_token(LBRACE);
633 } catch (ParseException e) {
634 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "', '{' expected";
636 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
637 errorEnd = jj_input_stream.getPosition() + 1;
642 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
651 ClassBodyDeclaration(classDeclaration);
654 jj_consume_token(RBRACE);
655 } catch (ParseException e) {
656 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', 'var', 'function' or '}' expected";
658 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
659 errorEnd = jj_input_stream.getPosition() + 1;
665 * A class can contain only methods and fields.
667 static final public void ClassBodyDeclaration(ClassDeclaration classDeclaration) throws ParseException {
668 MethodDeclaration method;
669 FieldDeclaration field;
670 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
672 method = MethodDeclaration();
673 classDeclaration.addMethod(method);
676 field = FieldDeclaration();
677 classDeclaration.addVariable(field);
681 jj_consume_token(-1);
682 throw new ParseException();
687 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
689 static final public FieldDeclaration FieldDeclaration() throws ParseException {
690 VariableDeclaration variableDeclaration;
691 VariableDeclaration[] list;
692 final ArrayList arrayList = new ArrayList();
693 final int pos = SimpleCharStream.getPosition();
694 jj_consume_token(VAR);
695 variableDeclaration = VariableDeclarator();
696 arrayList.add(variableDeclaration);
697 outlineInfo.addVariable(new String(variableDeclaration.name));
698 currentSegment.add(variableDeclaration);
701 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
709 jj_consume_token(COMMA);
710 variableDeclaration = VariableDeclarator();
711 arrayList.add(variableDeclaration);
712 outlineInfo.addVariable(new String(variableDeclaration.name));
713 currentSegment.add(variableDeclaration);
716 jj_consume_token(SEMICOLON);
717 } catch (ParseException e) {
718 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
720 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
721 errorEnd = jj_input_stream.getPosition() + 1;
724 list = new VariableDeclaration[arrayList.size()];
725 arrayList.toArray(list);
726 {if (true) return new FieldDeclaration(list,
728 SimpleCharStream.getPosition());}
729 throw new Error("Missing return statement in function");
732 static final public VariableDeclaration VariableDeclarator() throws ParseException {
733 final String varName;
734 Expression initializer = null;
735 final int pos = jj_input_stream.getPosition();
736 varName = VariableDeclaratorId();
737 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
739 jj_consume_token(ASSIGN);
741 initializer = VariableInitializer();
742 } catch (ParseException e) {
743 errorMessage = "Literal expression expected in variable initializer";
745 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
746 errorEnd = jj_input_stream.getPosition() + 1;
754 if (initializer == null) {
755 {if (true) return new VariableDeclaration(currentSegment,
756 varName.toCharArray(),
758 jj_input_stream.getPosition());}
760 {if (true) return new VariableDeclaration(currentSegment,
761 varName.toCharArray(),
764 throw new Error("Missing return statement in function");
769 * @return the variable name (with suffix)
771 static final public String VariableDeclaratorId() throws ParseException {
773 Expression expression;
774 final StringBuffer buff = new StringBuffer();
775 final int pos = SimpleCharStream.getPosition();
776 ConstantIdentifier ex;
787 ex = new ConstantIdentifier(expr.toCharArray(),
789 SimpleCharStream.getPosition());
790 expression = VariableSuffix(ex);
791 buff.append(expression.toStringExpression());
793 {if (true) return buff.toString();}
794 } catch (ParseException e) {
795 errorMessage = "'$' expected for variable identifier";
797 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
798 errorEnd = jj_input_stream.getPosition() + 1;
801 throw new Error("Missing return statement in function");
804 static final public String Variable() throws ParseException {
805 final StringBuffer buff;
806 Expression expression = null;
809 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
811 token = jj_consume_token(DOLLAR_ID);
812 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
814 jj_consume_token(LBRACE);
815 expression = Expression();
816 jj_consume_token(RBRACE);
822 if (expression == null && !assigning) {
823 {if (true) return token.image.substring(1);}
825 buff = new StringBuffer(token.image);
827 buff.append(expression.toStringExpression());
829 {if (true) return buff.toString();}
832 jj_consume_token(DOLLAR);
833 expr = VariableName();
834 {if (true) return expr;}
838 jj_consume_token(-1);
839 throw new ParseException();
841 throw new Error("Missing return statement in function");
844 static final public String VariableName() throws ParseException {
845 final StringBuffer buff;
847 Expression expression = null;
849 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
851 jj_consume_token(LBRACE);
852 expression = Expression();
853 jj_consume_token(RBRACE);
854 buff = new StringBuffer('{');
855 buff.append(expression.toStringExpression());
857 {if (true) return buff.toString();}
860 token = jj_consume_token(IDENTIFIER);
861 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
863 jj_consume_token(LBRACE);
864 expression = Expression();
865 jj_consume_token(RBRACE);
871 if (expression == null) {
872 {if (true) return token.image;}
874 buff = new StringBuffer(token.image);
876 buff.append(expression.toStringExpression());
878 {if (true) return buff.toString();}
881 jj_consume_token(DOLLAR);
882 expr = VariableName();
883 buff = new StringBuffer('$');
885 {if (true) return buff.toString();}
888 token = jj_consume_token(DOLLAR_ID);
889 {if (true) return token.image;}
893 jj_consume_token(-1);
894 throw new ParseException();
896 throw new Error("Missing return statement in function");
899 static final public Expression VariableInitializer() throws ParseException {
900 final Expression expr;
902 final int pos = SimpleCharStream.getPosition();
903 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
907 case INTEGER_LITERAL:
908 case FLOATING_POINT_LITERAL:
911 {if (true) return expr;}
914 jj_consume_token(MINUS);
915 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
916 case INTEGER_LITERAL:
917 token = jj_consume_token(INTEGER_LITERAL);
919 case FLOATING_POINT_LITERAL:
920 token = jj_consume_token(FLOATING_POINT_LITERAL);
924 jj_consume_token(-1);
925 throw new ParseException();
927 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
929 SimpleCharStream.getPosition()),
934 jj_consume_token(PLUS);
935 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
936 case INTEGER_LITERAL:
937 token = jj_consume_token(INTEGER_LITERAL);
939 case FLOATING_POINT_LITERAL:
940 token = jj_consume_token(FLOATING_POINT_LITERAL);
944 jj_consume_token(-1);
945 throw new ParseException();
947 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
949 SimpleCharStream.getPosition()),
954 expr = ArrayDeclarator();
955 {if (true) return expr;}
958 token = jj_consume_token(IDENTIFIER);
959 {if (true) return new ConstantIdentifier(token.image.toCharArray(),pos,SimpleCharStream.getPosition());}
963 jj_consume_token(-1);
964 throw new ParseException();
966 throw new Error("Missing return statement in function");
969 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
970 Expression expr,expr2;
972 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
974 jj_consume_token(ARRAYASSIGN);
975 expr2 = Expression();
976 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
982 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
983 throw new Error("Missing return statement in function");
986 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
987 ArrayVariableDeclaration expr;
988 final ArrayList list = new ArrayList();
989 jj_consume_token(LPAREN);
990 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1006 case INTEGER_LITERAL:
1007 case FLOATING_POINT_LITERAL:
1008 case STRING_LITERAL:
1012 expr = ArrayVariable();
1021 jj_consume_token(COMMA);
1022 expr = ArrayVariable();
1027 jj_la1[19] = jj_gen;
1030 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1032 jj_consume_token(COMMA);
1036 jj_la1[20] = jj_gen;
1039 jj_consume_token(RPAREN);
1040 ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1042 {if (true) return vars;}
1043 throw new Error("Missing return statement in function");
1047 * A Method Declaration.
1048 * <b>function</b> MetodDeclarator() Block()
1050 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1051 final MethodDeclaration functionDeclaration;
1052 Token functionToken;
1054 functionToken = jj_consume_token(FUNCTION);
1056 functionDeclaration = MethodDeclarator();
1057 outlineInfo.addVariable(new String(functionDeclaration.name));
1058 } catch (ParseException e) {
1059 if (errorMessage != null) {if (true) throw e;}
1060 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1062 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1063 errorEnd = jj_input_stream.getPosition() + 1;
1064 {if (true) throw e;}
1066 if (currentSegment != null) {
1067 currentSegment.add(functionDeclaration);
1068 currentSegment = functionDeclaration;
1070 currentFunction = functionDeclaration;
1072 functionDeclaration.statements = block.statements;
1073 currentFunction = null;
1074 if (currentSegment != null) {
1075 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
1077 {if (true) return functionDeclaration;}
1078 throw new Error("Missing return statement in function");
1082 * A MethodDeclarator.
1083 * [&] IDENTIFIER(parameters ...).
1084 * @return a function description for the outline
1086 static final public MethodDeclaration MethodDeclarator() throws ParseException {
1087 final Token identifier;
1088 Token reference = null;
1089 final Hashtable formalParameters;
1090 final int pos = SimpleCharStream.getPosition();
1091 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1093 reference = jj_consume_token(BIT_AND);
1096 jj_la1[21] = jj_gen;
1099 identifier = jj_consume_token(IDENTIFIER);
1100 formalParameters = FormalParameters();
1101 {if (true) return new MethodDeclaration(currentSegment,
1102 identifier.image.toCharArray(),
1106 SimpleCharStream.getPosition());}
1107 throw new Error("Missing return statement in function");
1111 * FormalParameters follows method identifier.
1112 * (FormalParameter())
1114 static final public Hashtable FormalParameters() throws ParseException {
1115 VariableDeclaration var;
1116 final Hashtable parameters = new Hashtable();
1118 jj_consume_token(LPAREN);
1119 } catch (ParseException e) {
1120 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1122 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1123 errorEnd = jj_input_stream.getPosition() + 1;
1124 {if (true) throw e;}
1126 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1130 var = FormalParameter();
1131 parameters.put(new String(var.name),var);
1134 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1139 jj_la1[22] = jj_gen;
1142 jj_consume_token(COMMA);
1143 var = FormalParameter();
1144 parameters.put(new String(var.name),var);
1148 jj_la1[23] = jj_gen;
1152 jj_consume_token(RPAREN);
1153 } catch (ParseException e) {
1154 errorMessage = "')' expected";
1156 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1157 errorEnd = jj_input_stream.getPosition() + 1;
1158 {if (true) throw e;}
1160 {if (true) return parameters;}
1161 throw new Error("Missing return statement in function");
1165 * A formal parameter.
1166 * $varname[=value] (,$varname[=value])
1168 static final public VariableDeclaration FormalParameter() throws ParseException {
1169 final VariableDeclaration variableDeclaration;
1171 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1173 token = jj_consume_token(BIT_AND);
1176 jj_la1[24] = jj_gen;
1179 variableDeclaration = VariableDeclarator();
1180 if (token != null) {
1181 variableDeclaration.setReference(true);
1183 {if (true) return variableDeclaration;}
1184 throw new Error("Missing return statement in function");
1187 static final public ConstantIdentifier Type() throws ParseException {
1189 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1191 jj_consume_token(STRING);
1192 pos = SimpleCharStream.getPosition();
1193 {if (true) return new ConstantIdentifier(Types.STRING,
1197 jj_consume_token(BOOL);
1198 pos = SimpleCharStream.getPosition();
1199 {if (true) return new ConstantIdentifier(Types.BOOL,
1203 jj_consume_token(BOOLEAN);
1204 pos = SimpleCharStream.getPosition();
1205 {if (true) return new ConstantIdentifier(Types.BOOLEAN,
1209 jj_consume_token(REAL);
1210 pos = SimpleCharStream.getPosition();
1211 {if (true) return new ConstantIdentifier(Types.REAL,
1215 jj_consume_token(DOUBLE);
1216 pos = SimpleCharStream.getPosition();
1217 {if (true) return new ConstantIdentifier(Types.DOUBLE,
1221 jj_consume_token(FLOAT);
1222 pos = SimpleCharStream.getPosition();
1223 {if (true) return new ConstantIdentifier(Types.FLOAT,
1227 jj_consume_token(INT);
1228 pos = SimpleCharStream.getPosition();
1229 {if (true) return new ConstantIdentifier(Types.INT,
1233 jj_consume_token(INTEGER);
1234 pos = SimpleCharStream.getPosition();
1235 {if (true) return new ConstantIdentifier(Types.INTEGER,
1239 jj_consume_token(OBJECT);
1240 pos = SimpleCharStream.getPosition();
1241 {if (true) return new ConstantIdentifier(Types.OBJECT,
1245 jj_la1[25] = jj_gen;
1246 jj_consume_token(-1);
1247 throw new ParseException();
1249 throw new Error("Missing return statement in function");
1252 static final public Expression Expression() throws ParseException {
1253 final Expression expr;
1254 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1256 expr = PrintExpression();
1257 {if (true) return expr;}
1260 expr = ListExpression();
1261 {if (true) return expr;}
1264 jj_la1[26] = jj_gen;
1265 if (jj_2_3(2147483647)) {
1266 expr = varAssignation();
1267 {if (true) return expr;}
1269 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1283 case INTEGER_LITERAL:
1284 case FLOATING_POINT_LITERAL:
1285 case STRING_LITERAL:
1289 expr = ConditionalExpression();
1290 {if (true) return expr;}
1293 jj_la1[27] = jj_gen;
1294 jj_consume_token(-1);
1295 throw new ParseException();
1299 throw new Error("Missing return statement in function");
1303 * A Variable assignation.
1304 * varName (an assign operator) any expression
1306 static final public VarAssignation varAssignation() throws ParseException {
1308 final Expression expression;
1309 final int assignOperator;
1310 final int pos = SimpleCharStream.getPosition();
1311 varName = VariableDeclaratorId();
1312 assignOperator = AssignmentOperator();
1314 expression = Expression();
1315 } catch (ParseException e) {
1316 if (errorMessage != null) {
1317 {if (true) throw e;}
1319 errorMessage = "expression expected";
1321 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1322 errorEnd = jj_input_stream.getPosition() + 1;
1323 {if (true) throw e;}
1325 {if (true) return new VarAssignation(varName.toCharArray(),
1329 SimpleCharStream.getPosition());}
1330 throw new Error("Missing return statement in function");
1333 static final public int AssignmentOperator() throws ParseException {
1334 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1336 jj_consume_token(ASSIGN);
1337 {if (true) return VarAssignation.EQUAL;}
1340 jj_consume_token(STARASSIGN);
1341 {if (true) return VarAssignation.STAR_EQUAL;}
1344 jj_consume_token(SLASHASSIGN);
1345 {if (true) return VarAssignation.SLASH_EQUAL;}
1348 jj_consume_token(REMASSIGN);
1349 {if (true) return VarAssignation.REM_EQUAL;}
1352 jj_consume_token(PLUSASSIGN);
1353 {if (true) return VarAssignation.PLUS_EQUAL;}
1356 jj_consume_token(MINUSASSIGN);
1357 {if (true) return VarAssignation.MINUS_EQUAL;}
1360 jj_consume_token(LSHIFTASSIGN);
1361 {if (true) return VarAssignation.LSHIFT_EQUAL;}
1363 case RSIGNEDSHIFTASSIGN:
1364 jj_consume_token(RSIGNEDSHIFTASSIGN);
1365 {if (true) return VarAssignation.RSIGNEDSHIFT_EQUAL;}
1368 jj_consume_token(ANDASSIGN);
1369 {if (true) return VarAssignation.AND_EQUAL;}
1372 jj_consume_token(XORASSIGN);
1373 {if (true) return VarAssignation.XOR_EQUAL;}
1376 jj_consume_token(ORASSIGN);
1377 {if (true) return VarAssignation.OR_EQUAL;}
1380 jj_consume_token(DOTASSIGN);
1381 {if (true) return VarAssignation.DOT_EQUAL;}
1384 jj_consume_token(TILDEEQUAL);
1385 {if (true) return VarAssignation.TILDE_EQUAL;}
1388 jj_la1[28] = jj_gen;
1389 jj_consume_token(-1);
1390 throw new ParseException();
1392 throw new Error("Missing return statement in function");
1395 static final public Expression ConditionalExpression() throws ParseException {
1396 final Expression expr;
1397 Expression expr2 = null;
1398 Expression expr3 = null;
1399 expr = ConditionalOrExpression();
1400 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1402 jj_consume_token(HOOK);
1403 expr2 = Expression();
1404 jj_consume_token(COLON);
1405 expr3 = ConditionalExpression();
1408 jj_la1[29] = jj_gen;
1411 if (expr3 == null) {
1412 {if (true) return expr;}
1414 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1415 throw new Error("Missing return statement in function");
1418 static final public Expression ConditionalOrExpression() throws ParseException {
1419 Expression expr,expr2;
1421 expr = ConditionalAndExpression();
1424 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1430 jj_la1[30] = jj_gen;
1433 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1435 jj_consume_token(OR_OR);
1436 operator = OperatorIds.OR_OR;
1439 jj_consume_token(_ORL);
1440 operator = OperatorIds.ORL;
1443 jj_la1[31] = jj_gen;
1444 jj_consume_token(-1);
1445 throw new ParseException();
1447 expr2 = ConditionalAndExpression();
1448 expr = new BinaryExpression(expr,expr2,operator);
1450 {if (true) return expr;}
1451 throw new Error("Missing return statement in function");
1454 static final public Expression ConditionalAndExpression() throws ParseException {
1455 Expression expr,expr2;
1457 expr = ConcatExpression();
1460 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1466 jj_la1[32] = jj_gen;
1469 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1471 jj_consume_token(AND_AND);
1472 operator = OperatorIds.AND_AND;
1475 jj_consume_token(_ANDL);
1476 operator = OperatorIds.ANDL;
1479 jj_la1[33] = jj_gen;
1480 jj_consume_token(-1);
1481 throw new ParseException();
1483 expr2 = ConcatExpression();
1484 expr = new BinaryExpression(expr,expr2,operator);
1486 {if (true) return expr;}
1487 throw new Error("Missing return statement in function");
1490 static final public Expression ConcatExpression() throws ParseException {
1491 Expression expr,expr2;
1492 expr = InclusiveOrExpression();
1495 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1500 jj_la1[34] = jj_gen;
1503 jj_consume_token(DOT);
1504 expr2 = InclusiveOrExpression();
1505 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1507 {if (true) return expr;}
1508 throw new Error("Missing return statement in function");
1511 static final public Expression InclusiveOrExpression() throws ParseException {
1512 Expression expr,expr2;
1513 expr = ExclusiveOrExpression();
1516 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1521 jj_la1[35] = jj_gen;
1524 jj_consume_token(BIT_OR);
1525 expr2 = ExclusiveOrExpression();
1526 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1528 {if (true) return expr;}
1529 throw new Error("Missing return statement in function");
1532 static final public Expression ExclusiveOrExpression() throws ParseException {
1533 Expression expr,expr2;
1534 expr = AndExpression();
1537 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1542 jj_la1[36] = jj_gen;
1545 jj_consume_token(XOR);
1546 expr2 = AndExpression();
1547 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1549 {if (true) return expr;}
1550 throw new Error("Missing return statement in function");
1553 static final public Expression AndExpression() throws ParseException {
1554 Expression expr,expr2;
1555 expr = EqualityExpression();
1558 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1563 jj_la1[37] = jj_gen;
1566 jj_consume_token(BIT_AND);
1567 expr2 = EqualityExpression();
1568 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1570 {if (true) return expr;}
1571 throw new Error("Missing return statement in function");
1574 static final public Expression EqualityExpression() throws ParseException {
1575 Expression expr,expr2;
1577 expr = RelationalExpression();
1580 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1584 case BANGDOUBLEEQUAL:
1589 jj_la1[38] = jj_gen;
1592 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1594 jj_consume_token(EQUAL_EQUAL);
1595 operator = OperatorIds.EQUAL_EQUAL;
1598 jj_consume_token(DIF);
1599 operator = OperatorIds.DIF;
1602 jj_consume_token(NOT_EQUAL);
1603 operator = OperatorIds.DIF;
1605 case BANGDOUBLEEQUAL:
1606 jj_consume_token(BANGDOUBLEEQUAL);
1607 operator = OperatorIds.BANG_EQUAL_EQUAL;
1610 jj_consume_token(TRIPLEEQUAL);
1611 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1614 jj_la1[39] = jj_gen;
1615 jj_consume_token(-1);
1616 throw new ParseException();
1619 expr2 = RelationalExpression();
1620 } catch (ParseException e) {
1621 if (errorMessage != null) {
1622 {if (true) throw e;}
1624 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1626 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1627 errorEnd = jj_input_stream.getPosition() + 1;
1628 {if (true) throw e;}
1630 expr = new BinaryExpression(expr,expr2,operator);
1632 {if (true) return expr;}
1633 throw new Error("Missing return statement in function");
1636 static final public Expression RelationalExpression() throws ParseException {
1637 Expression expr,expr2;
1639 expr = ShiftExpression();
1642 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1650 jj_la1[40] = jj_gen;
1653 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1655 jj_consume_token(LT);
1656 operator = OperatorIds.LESS;
1659 jj_consume_token(GT);
1660 operator = OperatorIds.GREATER;
1663 jj_consume_token(LE);
1664 operator = OperatorIds.LESS_EQUAL;
1667 jj_consume_token(GE);
1668 operator = OperatorIds.GREATER_EQUAL;
1671 jj_la1[41] = jj_gen;
1672 jj_consume_token(-1);
1673 throw new ParseException();
1675 expr2 = ShiftExpression();
1676 expr = new BinaryExpression(expr,expr2,operator);
1678 {if (true) return expr;}
1679 throw new Error("Missing return statement in function");
1682 static final public Expression ShiftExpression() throws ParseException {
1683 Expression expr,expr2;
1685 expr = AdditiveExpression();
1688 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1691 case RUNSIGNEDSHIFT:
1695 jj_la1[42] = jj_gen;
1698 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1700 jj_consume_token(LSHIFT);
1701 operator = OperatorIds.LEFT_SHIFT;
1704 jj_consume_token(RSIGNEDSHIFT);
1705 operator = OperatorIds.RIGHT_SHIFT;
1707 case RUNSIGNEDSHIFT:
1708 jj_consume_token(RUNSIGNEDSHIFT);
1709 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1712 jj_la1[43] = jj_gen;
1713 jj_consume_token(-1);
1714 throw new ParseException();
1716 expr2 = AdditiveExpression();
1717 expr = new BinaryExpression(expr,expr2,operator);
1719 {if (true) return expr;}
1720 throw new Error("Missing return statement in function");
1723 static final public Expression AdditiveExpression() throws ParseException {
1724 Expression expr,expr2;
1726 expr = MultiplicativeExpression();
1729 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1735 jj_la1[44] = jj_gen;
1738 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1740 jj_consume_token(PLUS);
1741 operator = OperatorIds.PLUS;
1744 jj_consume_token(MINUS);
1745 operator = OperatorIds.MINUS;
1748 jj_la1[45] = jj_gen;
1749 jj_consume_token(-1);
1750 throw new ParseException();
1752 expr2 = MultiplicativeExpression();
1753 expr = new BinaryExpression(expr,expr2,operator);
1755 {if (true) return expr;}
1756 throw new Error("Missing return statement in function");
1759 static final public Expression MultiplicativeExpression() throws ParseException {
1760 Expression expr,expr2;
1763 expr = UnaryExpression();
1764 } catch (ParseException e) {
1765 if (errorMessage != null) {if (true) throw e;}
1766 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1768 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1769 errorEnd = jj_input_stream.getPosition() + 1;
1770 {if (true) throw e;}
1774 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1781 jj_la1[46] = jj_gen;
1784 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1786 jj_consume_token(STAR);
1787 operator = OperatorIds.MULTIPLY;
1790 jj_consume_token(SLASH);
1791 operator = OperatorIds.DIVIDE;
1794 jj_consume_token(REMAINDER);
1795 operator = OperatorIds.REMAINDER;
1798 jj_la1[47] = jj_gen;
1799 jj_consume_token(-1);
1800 throw new ParseException();
1802 expr2 = UnaryExpression();
1803 expr = new BinaryExpression(expr,expr2,operator);
1805 {if (true) return expr;}
1806 throw new Error("Missing return statement in function");
1810 * An unary expression starting with @, & or nothing
1812 static final public Expression UnaryExpression() throws ParseException {
1814 final int pos = SimpleCharStream.getPosition();
1815 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1817 jj_consume_token(BIT_AND);
1818 expr = UnaryExpressionNoPrefix();
1819 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1833 case INTEGER_LITERAL:
1834 case FLOATING_POINT_LITERAL:
1835 case STRING_LITERAL:
1839 expr = AtUnaryExpression();
1840 {if (true) return expr;}
1843 jj_la1[48] = jj_gen;
1844 jj_consume_token(-1);
1845 throw new ParseException();
1847 throw new Error("Missing return statement in function");
1850 static final public Expression AtUnaryExpression() throws ParseException {
1852 final int pos = SimpleCharStream.getPosition();
1853 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1855 jj_consume_token(AT);
1856 expr = AtUnaryExpression();
1857 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,pos);}
1870 case INTEGER_LITERAL:
1871 case FLOATING_POINT_LITERAL:
1872 case STRING_LITERAL:
1876 expr = UnaryExpressionNoPrefix();
1877 {if (true) return expr;}
1880 jj_la1[49] = jj_gen;
1881 jj_consume_token(-1);
1882 throw new ParseException();
1884 throw new Error("Missing return statement in function");
1887 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
1890 final int pos = SimpleCharStream.getPosition();
1891 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1894 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1896 jj_consume_token(PLUS);
1897 operator = OperatorIds.PLUS;
1900 jj_consume_token(MINUS);
1901 operator = OperatorIds.MINUS;
1904 jj_la1[50] = jj_gen;
1905 jj_consume_token(-1);
1906 throw new ParseException();
1908 expr = UnaryExpression();
1909 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1913 expr = PreIncDecExpression();
1914 {if (true) return expr;}
1923 case INTEGER_LITERAL:
1924 case FLOATING_POINT_LITERAL:
1925 case STRING_LITERAL:
1929 expr = UnaryExpressionNotPlusMinus();
1930 {if (true) return expr;}
1933 jj_la1[51] = jj_gen;
1934 jj_consume_token(-1);
1935 throw new ParseException();
1937 throw new Error("Missing return statement in function");
1940 static final public Expression PreIncDecExpression() throws ParseException {
1941 final Expression expr;
1943 final int pos = SimpleCharStream.getPosition();
1944 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1946 jj_consume_token(INCR);
1947 operator = OperatorIds.PLUS_PLUS;
1950 jj_consume_token(DECR);
1951 operator = OperatorIds.MINUS_MINUS;
1954 jj_la1[52] = jj_gen;
1955 jj_consume_token(-1);
1956 throw new ParseException();
1958 expr = PrimaryExpression();
1959 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1960 throw new Error("Missing return statement in function");
1963 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
1965 final int pos = SimpleCharStream.getPosition();
1966 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1968 jj_consume_token(BANG);
1969 expr = UnaryExpression();
1970 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1973 jj_la1[53] = jj_gen;
1974 if (jj_2_4(2147483647)) {
1975 expr = CastExpression();
1976 {if (true) return expr;}
1978 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1984 expr = PostfixExpression();
1985 {if (true) return expr;}
1990 case INTEGER_LITERAL:
1991 case FLOATING_POINT_LITERAL:
1992 case STRING_LITERAL:
1994 {if (true) return expr;}
1997 jj_consume_token(LPAREN);
1998 expr = Expression();
2000 jj_consume_token(RPAREN);
2001 } catch (ParseException e) {
2002 errorMessage = "')' expected";
2004 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2005 errorEnd = jj_input_stream.getPosition() + 1;
2006 {if (true) throw e;}
2008 {if (true) return expr;}
2011 jj_la1[54] = jj_gen;
2012 jj_consume_token(-1);
2013 throw new ParseException();
2017 throw new Error("Missing return statement in function");
2020 static final public CastExpression CastExpression() throws ParseException {
2021 final ConstantIdentifier type;
2022 final Expression expr;
2023 final int pos = SimpleCharStream.getPosition();
2024 jj_consume_token(LPAREN);
2025 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2038 jj_consume_token(ARRAY);
2039 type = new ConstantIdentifier(Types.ARRAY,pos,SimpleCharStream.getPosition());
2042 jj_la1[55] = jj_gen;
2043 jj_consume_token(-1);
2044 throw new ParseException();
2046 jj_consume_token(RPAREN);
2047 expr = UnaryExpression();
2048 {if (true) return new CastExpression(type,expr,pos,SimpleCharStream.getPosition());}
2049 throw new Error("Missing return statement in function");
2052 static final public Expression PostfixExpression() throws ParseException {
2055 final int pos = SimpleCharStream.getPosition();
2056 expr = PrimaryExpression();
2057 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2060 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2062 jj_consume_token(INCR);
2063 operator = OperatorIds.PLUS_PLUS;
2066 jj_consume_token(DECR);
2067 operator = OperatorIds.MINUS_MINUS;
2070 jj_la1[56] = jj_gen;
2071 jj_consume_token(-1);
2072 throw new ParseException();
2076 jj_la1[57] = jj_gen;
2079 if (operator == -1) {
2080 {if (true) return expr;}
2082 {if (true) return new PostfixedUnaryExpression(expr,operator,pos);}
2083 throw new Error("Missing return statement in function");
2086 static final public Expression PrimaryExpression() throws ParseException {
2087 final Token identifier;
2089 final int pos = SimpleCharStream.getPosition();
2091 identifier = jj_consume_token(IDENTIFIER);
2092 jj_consume_token(STATICCLASSACCESS);
2093 expr = ClassIdentifier();
2094 expr = new ClassAccess(new ConstantIdentifier(identifier.image.toCharArray(),
2096 SimpleCharStream.getPosition()),
2098 ClassAccess.STATIC);
2101 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2108 jj_la1[58] = jj_gen;
2111 expr = PrimarySuffix(expr);
2113 {if (true) return expr;}
2115 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2120 expr = PrimaryPrefix();
2123 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2130 jj_la1[59] = jj_gen;
2133 expr = PrimarySuffix(expr);
2135 {if (true) return expr;}
2138 expr = ArrayDeclarator();
2139 {if (true) return expr;}
2142 jj_la1[60] = jj_gen;
2143 jj_consume_token(-1);
2144 throw new ParseException();
2147 throw new Error("Missing return statement in function");
2150 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2151 final ArrayVariableDeclaration[] vars;
2152 final int pos = SimpleCharStream.getPosition();
2153 jj_consume_token(ARRAY);
2154 vars = ArrayInitializer();
2155 {if (true) return new ArrayInitializer(vars,pos,SimpleCharStream.getPosition());}
2156 throw new Error("Missing return statement in function");
2159 static final public Expression PrimaryPrefix() throws ParseException {
2160 final Expression expr;
2163 final int pos = SimpleCharStream.getPosition();
2164 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2166 token = jj_consume_token(IDENTIFIER);
2167 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2169 SimpleCharStream.getPosition());}
2172 jj_consume_token(NEW);
2173 expr = ClassIdentifier();
2174 {if (true) return new PrefixedUnaryExpression(expr,
2180 var = VariableDeclaratorId();
2181 {if (true) return new ConstantIdentifier(var.toCharArray(),
2183 SimpleCharStream.getPosition());}
2186 jj_la1[61] = jj_gen;
2187 jj_consume_token(-1);
2188 throw new ParseException();
2190 throw new Error("Missing return statement in function");
2193 static final public PrefixedUnaryExpression classInstantiation() throws ParseException {
2195 final StringBuffer buff;
2196 final int pos = SimpleCharStream.getPosition();
2197 jj_consume_token(NEW);
2198 expr = ClassIdentifier();
2199 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2205 buff = new StringBuffer(expr.toStringExpression());
2206 expr = PrimaryExpression();
2207 buff.append(expr.toStringExpression());
2208 expr = new ConstantIdentifier(buff.toString().toCharArray(),
2210 SimpleCharStream.getPosition());
2213 jj_la1[62] = jj_gen;
2216 {if (true) return new PrefixedUnaryExpression(expr,
2219 throw new Error("Missing return statement in function");
2222 static final public ConstantIdentifier ClassIdentifier() throws ParseException {
2225 final int pos = SimpleCharStream.getPosition();
2226 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2228 token = jj_consume_token(IDENTIFIER);
2229 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2231 SimpleCharStream.getPosition());}
2235 expr = VariableDeclaratorId();
2236 {if (true) return new ConstantIdentifier(expr.toCharArray(),
2238 SimpleCharStream.getPosition());}
2241 jj_la1[63] = jj_gen;
2242 jj_consume_token(-1);
2243 throw new ParseException();
2245 throw new Error("Missing return statement in function");
2248 static final public AbstractSuffixExpression PrimarySuffix(Expression prefix) throws ParseException {
2249 final AbstractSuffixExpression expr;
2250 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2252 expr = Arguments(prefix);
2253 {if (true) return expr;}
2257 expr = VariableSuffix(prefix);
2258 {if (true) return expr;}
2261 jj_la1[64] = jj_gen;
2262 jj_consume_token(-1);
2263 throw new ParseException();
2265 throw new Error("Missing return statement in function");
2268 static final public AbstractSuffixExpression VariableSuffix(Expression prefix) throws ParseException {
2270 final int pos = SimpleCharStream.getPosition();
2271 Expression expression = null;
2272 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2274 jj_consume_token(CLASSACCESS);
2276 expr = VariableName();
2277 } catch (ParseException e) {
2278 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2280 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2281 errorEnd = jj_input_stream.getPosition() + 1;
2282 {if (true) throw e;}
2284 {if (true) return new ClassAccess(prefix,
2285 new ConstantIdentifier(expr.toCharArray(),pos,SimpleCharStream.getPosition()),
2286 ClassAccess.NORMAL);}
2289 jj_consume_token(LBRACKET);
2290 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2315 case INTEGER_LITERAL:
2316 case FLOATING_POINT_LITERAL:
2317 case STRING_LITERAL:
2321 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2337 case INTEGER_LITERAL:
2338 case FLOATING_POINT_LITERAL:
2339 case STRING_LITERAL:
2343 expression = Expression();
2354 expression = Type();
2357 jj_la1[65] = jj_gen;
2358 jj_consume_token(-1);
2359 throw new ParseException();
2363 jj_la1[66] = jj_gen;
2367 jj_consume_token(RBRACKET);
2368 } catch (ParseException e) {
2369 errorMessage = "']' expected";
2371 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2372 errorEnd = jj_input_stream.getPosition() + 1;
2373 {if (true) throw e;}
2375 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2378 jj_la1[67] = jj_gen;
2379 jj_consume_token(-1);
2380 throw new ParseException();
2382 throw new Error("Missing return statement in function");
2385 static final public Literal Literal() throws ParseException {
2388 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2389 case INTEGER_LITERAL:
2390 token = jj_consume_token(INTEGER_LITERAL);
2391 pos = SimpleCharStream.getPosition();
2392 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2394 case FLOATING_POINT_LITERAL:
2395 token = jj_consume_token(FLOATING_POINT_LITERAL);
2396 pos = SimpleCharStream.getPosition();
2397 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2399 case STRING_LITERAL:
2400 token = jj_consume_token(STRING_LITERAL);
2401 pos = SimpleCharStream.getPosition();
2402 {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length());}
2405 jj_consume_token(TRUE);
2406 pos = SimpleCharStream.getPosition();
2407 {if (true) return new TrueLiteral(pos-4,pos);}
2410 jj_consume_token(FALSE);
2411 pos = SimpleCharStream.getPosition();
2412 {if (true) return new FalseLiteral(pos-4,pos);}
2415 jj_consume_token(NULL);
2416 pos = SimpleCharStream.getPosition();
2417 {if (true) return new NullLiteral(pos-4,pos);}
2420 jj_la1[68] = jj_gen;
2421 jj_consume_token(-1);
2422 throw new ParseException();
2424 throw new Error("Missing return statement in function");
2427 static final public FunctionCall Arguments(Expression func) throws ParseException {
2428 Expression[] args = null;
2429 jj_consume_token(LPAREN);
2430 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2446 case INTEGER_LITERAL:
2447 case FLOATING_POINT_LITERAL:
2448 case STRING_LITERAL:
2452 args = ArgumentList();
2455 jj_la1[69] = jj_gen;
2459 jj_consume_token(RPAREN);
2460 } catch (ParseException e) {
2461 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2463 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2464 errorEnd = jj_input_stream.getPosition() + 1;
2465 {if (true) throw e;}
2467 {if (true) return new FunctionCall(func,args,SimpleCharStream.getPosition());}
2468 throw new Error("Missing return statement in function");
2472 * An argument list is a list of arguments separated by comma :
2473 * argumentDeclaration() (, argumentDeclaration)*
2474 * @return an array of arguments
2476 static final public Expression[] ArgumentList() throws ParseException {
2478 final ArrayList list = new ArrayList();
2483 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2488 jj_la1[70] = jj_gen;
2491 jj_consume_token(COMMA);
2495 } catch (ParseException e) {
2496 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2498 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2499 errorEnd = jj_input_stream.getPosition() + 1;
2500 {if (true) throw e;}
2503 Expression[] arguments = new Expression[list.size()];
2504 list.toArray(arguments);
2505 {if (true) return arguments;}
2506 throw new Error("Missing return statement in function");
2510 * A Statement without break.
2512 static final public Statement StatementNoBreak() throws ParseException {
2513 final Statement statement;
2516 statement = Expression();
2518 jj_consume_token(SEMICOLON);
2519 } catch (ParseException e) {
2520 if (e.currentToken.next.kind != 4) {
2521 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2523 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2524 errorEnd = jj_input_stream.getPosition() + 1;
2525 {if (true) throw e;}
2528 {if (true) return statement;}
2529 } else if (jj_2_7(2)) {
2530 statement = LabeledStatement();
2531 {if (true) return statement;}
2533 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2535 statement = Block();
2536 {if (true) return statement;}
2539 statement = EmptyStatement();
2540 {if (true) return statement;}
2549 statement = StatementExpression();
2551 jj_consume_token(SEMICOLON);
2552 } catch (ParseException e) {
2553 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2555 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2556 errorEnd = jj_input_stream.getPosition() + 1;
2557 {if (true) throw e;}
2559 {if (true) return statement;}
2562 statement = SwitchStatement();
2563 {if (true) return statement;}
2566 statement = IfStatement();
2567 {if (true) return statement;}
2570 statement = WhileStatement();
2571 {if (true) return statement;}
2574 statement = DoStatement();
2575 {if (true) return statement;}
2578 statement = ForStatement();
2579 {if (true) return statement;}
2582 statement = ForeachStatement();
2583 {if (true) return statement;}
2586 statement = ContinueStatement();
2587 {if (true) return statement;}
2590 statement = ReturnStatement();
2591 {if (true) return statement;}
2594 statement = EchoStatement();
2595 {if (true) return statement;}
2602 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2604 token = jj_consume_token(AT);
2607 jj_la1[71] = jj_gen;
2610 statement = IncludeStatement();
2611 if (token != null) {
2612 ((InclusionStatement)statement).silent = true;
2614 {if (true) return statement;}
2617 statement = StaticStatement();
2618 {if (true) return statement;}
2621 statement = GlobalStatement();
2622 {if (true) return statement;}
2625 jj_la1[72] = jj_gen;
2626 jj_consume_token(-1);
2627 throw new ParseException();
2630 throw new Error("Missing return statement in function");
2634 * A Normal statement.
2636 static final public Statement Statement() throws ParseException {
2637 final Statement statement;
2638 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2669 case INTEGER_LITERAL:
2670 case FLOATING_POINT_LITERAL:
2671 case STRING_LITERAL:
2677 statement = StatementNoBreak();
2678 {if (true) return statement;}
2681 statement = BreakStatement();
2682 {if (true) return statement;}
2685 jj_la1[73] = jj_gen;
2686 jj_consume_token(-1);
2687 throw new ParseException();
2689 throw new Error("Missing return statement in function");
2693 * An html block inside a php syntax.
2695 static final public HTMLBlock htmlBlock() throws ParseException {
2696 final int startIndex = nodePtr;
2697 AstNode[] blockNodes;
2699 jj_consume_token(PHPEND);
2702 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2707 jj_la1[74] = jj_gen;
2713 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2715 jj_consume_token(PHPSTARTLONG);
2718 jj_consume_token(PHPSTARTSHORT);
2721 jj_la1[75] = jj_gen;
2722 jj_consume_token(-1);
2723 throw new ParseException();
2725 } catch (ParseException e) {
2726 errorMessage = "End of file unexpected, '<?php' expected";
2728 errorStart = jj_input_stream.getPosition();
2729 errorEnd = jj_input_stream.getPosition();
2730 {if (true) throw e;}
2732 nbNodes = nodePtr-startIndex - 1;
2733 blockNodes = new AstNode[nbNodes];
2734 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2735 {if (true) return new HTMLBlock(nodes);}
2736 throw new Error("Missing return statement in function");
2740 * An include statement. It's "include" an expression;
2742 static final public InclusionStatement IncludeStatement() throws ParseException {
2743 final Expression expr;
2745 final int pos = jj_input_stream.getPosition();
2746 final InclusionStatement inclusionStatement;
2747 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2749 jj_consume_token(REQUIRE);
2750 keyword = InclusionStatement.REQUIRE;
2753 jj_consume_token(REQUIRE_ONCE);
2754 keyword = InclusionStatement.REQUIRE_ONCE;
2757 jj_consume_token(INCLUDE);
2758 keyword = InclusionStatement.INCLUDE;
2761 jj_consume_token(INCLUDE_ONCE);
2762 keyword = InclusionStatement.INCLUDE_ONCE;
2765 jj_la1[76] = jj_gen;
2766 jj_consume_token(-1);
2767 throw new ParseException();
2770 expr = Expression();
2771 } catch (ParseException e) {
2772 if (errorMessage != null) {
2773 {if (true) throw e;}
2775 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
2777 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2778 errorEnd = jj_input_stream.getPosition() + 1;
2779 {if (true) throw e;}
2781 inclusionStatement = new InclusionStatement(currentSegment,
2785 currentSegment.add(inclusionStatement);
2787 jj_consume_token(SEMICOLON);
2788 } catch (ParseException e) {
2789 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2791 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2792 errorEnd = jj_input_stream.getPosition() + 1;
2793 {if (true) throw e;}
2795 {if (true) return inclusionStatement;}
2796 throw new Error("Missing return statement in function");
2799 static final public PrintExpression PrintExpression() throws ParseException {
2800 final Expression expr;
2801 final int pos = SimpleCharStream.getPosition();
2802 jj_consume_token(PRINT);
2803 expr = Expression();
2804 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
2805 throw new Error("Missing return statement in function");
2808 static final public ListExpression ListExpression() throws ParseException {
2810 Expression expression = null;
2811 ArrayList list = new ArrayList();
2812 final int pos = SimpleCharStream.getPosition();
2813 jj_consume_token(LIST);
2815 jj_consume_token(LPAREN);
2816 } catch (ParseException e) {
2817 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2819 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2820 errorEnd = jj_input_stream.getPosition() + 1;
2821 {if (true) throw e;}
2823 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2826 expr = VariableDeclaratorId();
2830 jj_la1[77] = jj_gen;
2833 if (expr == null) list.add(null);
2836 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2841 jj_la1[78] = jj_gen;
2845 jj_consume_token(COMMA);
2846 } catch (ParseException e) {
2847 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2849 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2850 errorEnd = jj_input_stream.getPosition() + 1;
2851 {if (true) throw e;}
2853 expr = VariableDeclaratorId();
2857 jj_consume_token(RPAREN);
2858 } catch (ParseException e) {
2859 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2861 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2862 errorEnd = jj_input_stream.getPosition() + 1;
2863 {if (true) throw e;}
2865 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2867 jj_consume_token(ASSIGN);
2868 expression = Expression();
2869 String[] strings = new String[list.size()];
2870 list.toArray(strings);
2871 {if (true) return new ListExpression(strings,
2874 SimpleCharStream.getPosition());}
2877 jj_la1[79] = jj_gen;
2880 String[] strings = new String[list.size()];
2881 list.toArray(strings);
2882 {if (true) return new ListExpression(strings,pos,SimpleCharStream.getPosition());}
2883 throw new Error("Missing return statement in function");
2887 * An echo statement.
2888 * echo anyexpression (, otherexpression)*
2890 static final public EchoStatement EchoStatement() throws ParseException {
2891 final ArrayList expressions = new ArrayList();
2893 final int pos = SimpleCharStream.getPosition();
2894 jj_consume_token(ECHO);
2895 expr = Expression();
2896 expressions.add(expr);
2899 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2904 jj_la1[80] = jj_gen;
2907 jj_consume_token(COMMA);
2908 expr = Expression();
2909 expressions.add(expr);
2912 jj_consume_token(SEMICOLON);
2913 Expression[] exprs = new Expression[expressions.size()];
2914 expressions.toArray(exprs);
2915 {if (true) return new EchoStatement(exprs,pos);}
2916 } catch (ParseException e) {
2917 if (e.currentToken.next.kind != 4) {
2918 errorMessage = "';' expected after 'echo' statement";
2920 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2921 errorEnd = jj_input_stream.getPosition() + 1;
2922 {if (true) throw e;}
2925 throw new Error("Missing return statement in function");
2928 static final public GlobalStatement GlobalStatement() throws ParseException {
2929 final int pos = jj_input_stream.getPosition();
2931 ArrayList vars = new ArrayList();
2932 GlobalStatement global;
2933 jj_consume_token(GLOBAL);
2934 expr = VariableDeclaratorId();
2938 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2943 jj_la1[81] = jj_gen;
2946 jj_consume_token(COMMA);
2947 expr = VariableDeclaratorId();
2951 jj_consume_token(SEMICOLON);
2952 String[] strings = new String[vars.size()];
2953 vars.toArray(strings);
2954 global = new GlobalStatement(currentSegment,
2957 SimpleCharStream.getPosition());
2958 currentSegment.add(global);
2959 {if (true) return global;}
2960 } catch (ParseException e) {
2961 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
2963 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2964 errorEnd = jj_input_stream.getPosition() + 1;
2965 {if (true) throw e;}
2967 throw new Error("Missing return statement in function");
2970 static final public StaticStatement StaticStatement() throws ParseException {
2971 final int pos = SimpleCharStream.getPosition();
2972 final ArrayList vars = new ArrayList();
2973 VariableDeclaration expr;
2974 jj_consume_token(STATIC);
2975 expr = VariableDeclarator();
2976 vars.add(new String(expr.name));
2979 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2984 jj_la1[82] = jj_gen;
2987 jj_consume_token(COMMA);
2988 expr = VariableDeclarator();
2989 vars.add(new String(expr.name));
2992 jj_consume_token(SEMICOLON);
2993 String[] strings = new String[vars.size()];
2994 vars.toArray(strings);
2995 {if (true) return new StaticStatement(strings,
2997 SimpleCharStream.getPosition());}
2998 } catch (ParseException e) {
2999 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3001 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3002 errorEnd = jj_input_stream.getPosition() + 1;
3003 {if (true) throw e;}
3005 throw new Error("Missing return statement in function");
3008 static final public LabeledStatement LabeledStatement() throws ParseException {
3009 final int pos = SimpleCharStream.getPosition();
3011 final Statement statement;
3012 label = jj_consume_token(IDENTIFIER);
3013 jj_consume_token(COLON);
3014 statement = Statement();
3015 {if (true) return new LabeledStatement(label.image.toCharArray(),statement,pos,SimpleCharStream.getPosition());}
3016 throw new Error("Missing return statement in function");
3026 static final public Block Block() throws ParseException {
3027 final int pos = SimpleCharStream.getPosition();
3028 final ArrayList list = new ArrayList();
3029 Statement statement;
3031 jj_consume_token(LBRACE);
3032 } catch (ParseException e) {
3033 errorMessage = "'{' expected";
3035 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3036 errorEnd = jj_input_stream.getPosition() + 1;
3037 {if (true) throw e;}
3041 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3076 case INTEGER_LITERAL:
3077 case FLOATING_POINT_LITERAL:
3078 case STRING_LITERAL:
3087 jj_la1[83] = jj_gen;
3090 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3124 case INTEGER_LITERAL:
3125 case FLOATING_POINT_LITERAL:
3126 case STRING_LITERAL:
3132 statement = BlockStatement();
3133 list.add(statement);
3136 statement = htmlBlock();
3137 list.add(statement);
3140 jj_la1[84] = jj_gen;
3141 jj_consume_token(-1);
3142 throw new ParseException();
3146 jj_consume_token(RBRACE);
3147 } catch (ParseException e) {
3148 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3150 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3151 errorEnd = jj_input_stream.getPosition() + 1;
3152 {if (true) throw e;}
3154 Statement[] statements = new Statement[list.size()];
3155 list.toArray(statements);
3156 {if (true) return new Block(statements,pos,SimpleCharStream.getPosition());}
3157 throw new Error("Missing return statement in function");
3160 static final public Statement BlockStatement() throws ParseException {
3161 final Statement statement;
3162 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3194 case INTEGER_LITERAL:
3195 case FLOATING_POINT_LITERAL:
3196 case STRING_LITERAL:
3202 statement = Statement();
3203 {if (true) return statement;}
3206 statement = ClassDeclaration();
3207 {if (true) return statement;}
3210 statement = MethodDeclaration();
3211 {if (true) return statement;}
3214 jj_la1[85] = jj_gen;
3215 jj_consume_token(-1);
3216 throw new ParseException();
3218 throw new Error("Missing return statement in function");
3222 * A Block statement that will not contain any 'break'
3224 static final public Statement BlockStatementNoBreak() throws ParseException {
3225 final Statement statement;
3226 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3257 case INTEGER_LITERAL:
3258 case FLOATING_POINT_LITERAL:
3259 case STRING_LITERAL:
3265 statement = StatementNoBreak();
3266 {if (true) return statement;}
3269 statement = ClassDeclaration();
3270 {if (true) return statement;}
3273 statement = MethodDeclaration();
3274 {if (true) return statement;}
3277 jj_la1[86] = jj_gen;
3278 jj_consume_token(-1);
3279 throw new ParseException();
3281 throw new Error("Missing return statement in function");
3284 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3285 final ArrayList list = new ArrayList();
3286 VariableDeclaration var;
3287 var = LocalVariableDeclarator();
3291 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3296 jj_la1[87] = jj_gen;
3299 jj_consume_token(COMMA);
3300 var = LocalVariableDeclarator();
3303 VariableDeclaration[] vars = new VariableDeclaration[list.size()];
3305 {if (true) return vars;}
3306 throw new Error("Missing return statement in function");
3309 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3310 final String varName;
3311 Expression initializer = null;
3312 final int pos = SimpleCharStream.getPosition();
3313 varName = VariableDeclaratorId();
3314 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3316 jj_consume_token(ASSIGN);
3317 initializer = Expression();
3320 jj_la1[88] = jj_gen;
3323 if (initializer == null) {
3324 {if (true) return new VariableDeclaration(currentSegment,
3325 varName.toCharArray(),
3327 jj_input_stream.getPosition());}
3329 {if (true) return new VariableDeclaration(currentSegment,
3330 varName.toCharArray(),
3333 throw new Error("Missing return statement in function");
3336 static final public EmptyStatement EmptyStatement() throws ParseException {
3338 jj_consume_token(SEMICOLON);
3339 pos = SimpleCharStream.getPosition();
3340 {if (true) return new EmptyStatement(pos-1,pos);}
3341 throw new Error("Missing return statement in function");
3344 static final public Statement StatementExpression() throws ParseException {
3345 Expression expr,expr2;
3347 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3350 expr = PreIncDecExpression();
3351 {if (true) return expr;}
3358 expr = PrimaryExpression();
3359 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3374 case RSIGNEDSHIFTASSIGN:
3375 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3377 jj_consume_token(INCR);
3378 {if (true) return new PostfixedUnaryExpression(expr,
3379 OperatorIds.PLUS_PLUS,
3380 SimpleCharStream.getPosition());}
3383 jj_consume_token(DECR);
3384 {if (true) return new PostfixedUnaryExpression(expr,
3385 OperatorIds.MINUS_MINUS,
3386 SimpleCharStream.getPosition());}
3400 case RSIGNEDSHIFTASSIGN:
3401 operator = AssignmentOperator();
3402 expr2 = Expression();
3403 {if (true) return new BinaryExpression(expr,expr2,operator);}
3406 jj_la1[89] = jj_gen;
3407 jj_consume_token(-1);
3408 throw new ParseException();
3412 jj_la1[90] = jj_gen;
3415 {if (true) return expr;}
3418 jj_la1[91] = jj_gen;
3419 jj_consume_token(-1);
3420 throw new ParseException();
3422 throw new Error("Missing return statement in function");
3425 static final public SwitchStatement SwitchStatement() throws ParseException {
3426 final Expression variable;
3427 final AbstractCase[] cases;
3428 final int pos = SimpleCharStream.getPosition();
3429 jj_consume_token(SWITCH);
3431 jj_consume_token(LPAREN);
3432 } catch (ParseException e) {
3433 errorMessage = "'(' expected after 'switch'";
3435 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3436 errorEnd = jj_input_stream.getPosition() + 1;
3437 {if (true) throw e;}
3440 variable = Expression();
3441 } catch (ParseException e) {
3442 if (errorMessage != null) {
3443 {if (true) throw e;}
3445 errorMessage = "expression expected";
3447 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3448 errorEnd = jj_input_stream.getPosition() + 1;
3449 {if (true) throw e;}
3452 jj_consume_token(RPAREN);
3453 } catch (ParseException e) {
3454 errorMessage = "')' expected";
3456 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3457 errorEnd = jj_input_stream.getPosition() + 1;
3458 {if (true) throw e;}
3460 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3462 cases = switchStatementBrace();
3465 cases = switchStatementColon(pos, pos + 6);
3468 jj_la1[92] = jj_gen;
3469 jj_consume_token(-1);
3470 throw new ParseException();
3472 {if (true) return new SwitchStatement(variable,cases,pos,SimpleCharStream.getPosition());}
3473 throw new Error("Missing return statement in function");
3476 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3478 final ArrayList cases = new ArrayList();
3479 jj_consume_token(LBRACE);
3482 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3488 jj_la1[93] = jj_gen;
3491 cas = switchLabel0();
3495 jj_consume_token(RBRACE);
3496 AbstractCase[] abcase = new AbstractCase[cases.size()];
3497 cases.toArray(abcase);
3498 {if (true) return abcase;}
3499 } catch (ParseException e) {
3500 errorMessage = "'}' expected";
3502 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3503 errorEnd = jj_input_stream.getPosition() + 1;
3504 {if (true) throw e;}
3506 throw new Error("Missing return statement in function");
3510 * A Switch statement with : ... endswitch;
3511 * @param start the begin offset of the switch
3512 * @param end the end offset of the switch
3514 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3516 final ArrayList cases = new ArrayList();
3517 jj_consume_token(COLON);
3519 setMarker(fileToParse,
3520 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3524 "Line " + token.beginLine);
3525 } catch (CoreException e) {
3526 PHPeclipsePlugin.log(e);
3530 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3536 jj_la1[94] = jj_gen;
3539 cas = switchLabel0();
3543 jj_consume_token(ENDSWITCH);
3544 } catch (ParseException e) {
3545 errorMessage = "'endswitch' expected";
3547 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3548 errorEnd = jj_input_stream.getPosition() + 1;
3549 {if (true) throw e;}
3552 jj_consume_token(SEMICOLON);
3553 AbstractCase[] abcase = new AbstractCase[cases.size()];
3554 cases.toArray(abcase);
3555 {if (true) return abcase;}
3556 } catch (ParseException e) {
3557 errorMessage = "';' expected after 'endswitch' keyword";
3559 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3560 errorEnd = jj_input_stream.getPosition() + 1;
3561 {if (true) throw e;}
3563 throw new Error("Missing return statement in function");
3566 static final public AbstractCase switchLabel0() throws ParseException {
3567 final Expression expr;
3568 Statement statement;
3569 final ArrayList stmts = new ArrayList();
3570 final int pos = SimpleCharStream.getPosition();
3571 expr = SwitchLabel();
3574 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3608 case INTEGER_LITERAL:
3609 case FLOATING_POINT_LITERAL:
3610 case STRING_LITERAL:
3619 jj_la1[95] = jj_gen;
3622 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3655 case INTEGER_LITERAL:
3656 case FLOATING_POINT_LITERAL:
3657 case STRING_LITERAL:
3663 statement = BlockStatementNoBreak();
3664 stmts.add(statement);
3667 statement = htmlBlock();
3668 stmts.add(statement);
3671 jj_la1[96] = jj_gen;
3672 jj_consume_token(-1);
3673 throw new ParseException();
3676 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3678 statement = BreakStatement();
3679 stmts.add(statement);
3682 jj_la1[97] = jj_gen;
3685 Statement[] stmtsArray = new Statement[stmts.size()];
3686 stmts.toArray(stmtsArray);
3687 if (expr == null) {//it's a default
3688 {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3690 {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3691 throw new Error("Missing return statement in function");
3696 * case Expression() :
3698 * @return the if it was a case and null if not
3700 static final public Expression SwitchLabel() throws ParseException {
3701 final Expression expr;
3702 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3704 token = jj_consume_token(CASE);
3706 expr = Expression();
3707 } catch (ParseException e) {
3708 if (errorMessage != null) {if (true) throw e;}
3709 errorMessage = "expression expected after 'case' keyword";
3711 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3712 errorEnd = jj_input_stream.getPosition() + 1;
3713 {if (true) throw e;}
3716 jj_consume_token(COLON);
3717 {if (true) return expr;}
3718 } catch (ParseException e) {
3719 errorMessage = "':' expected after case expression";
3721 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3722 errorEnd = jj_input_stream.getPosition() + 1;
3723 {if (true) throw e;}
3727 token = jj_consume_token(_DEFAULT);
3729 jj_consume_token(COLON);
3730 {if (true) return null;}
3731 } catch (ParseException e) {
3732 errorMessage = "':' expected after 'default' keyword";
3734 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3735 errorEnd = jj_input_stream.getPosition() + 1;
3736 {if (true) throw e;}
3740 jj_la1[98] = jj_gen;
3741 jj_consume_token(-1);
3742 throw new ParseException();
3744 throw new Error("Missing return statement in function");
3747 static final public Break BreakStatement() throws ParseException {
3748 Expression expression = null;
3749 final int start = SimpleCharStream.getPosition();
3750 jj_consume_token(BREAK);
3751 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3767 case INTEGER_LITERAL:
3768 case FLOATING_POINT_LITERAL:
3769 case STRING_LITERAL:
3773 expression = Expression();
3776 jj_la1[99] = jj_gen;
3780 jj_consume_token(SEMICOLON);
3781 } catch (ParseException e) {
3782 errorMessage = "';' expected after 'break' keyword";
3784 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3785 errorEnd = jj_input_stream.getPosition() + 1;
3786 {if (true) throw e;}
3788 {if (true) return new Break(expression, start, SimpleCharStream.getPosition());}
3789 throw new Error("Missing return statement in function");
3792 static final public IfStatement IfStatement() throws ParseException {
3793 final int pos = jj_input_stream.getPosition();
3794 Expression condition;
3795 IfStatement ifStatement;
3796 jj_consume_token(IF);
3797 condition = Condition("if");
3798 ifStatement = IfStatement0(condition, pos,pos+2);
3799 {if (true) return ifStatement;}
3800 throw new Error("Missing return statement in function");
3803 static final public Expression Condition(final String keyword) throws ParseException {
3804 final Expression condition;
3806 jj_consume_token(LPAREN);
3807 } catch (ParseException e) {
3808 errorMessage = "'(' expected after " + keyword + " keyword";
3810 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length();
3811 errorEnd = errorStart +1;
3812 processParseException(e);
3814 condition = Expression();
3816 jj_consume_token(RPAREN);
3817 {if (true) return condition;}
3818 } catch (ParseException e) {
3819 errorMessage = "')' expected after " + keyword + " keyword";
3821 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3822 errorEnd = jj_input_stream.getPosition() + 1;
3823 {if (true) throw e;}
3825 throw new Error("Missing return statement in function");
3828 static final public IfStatement IfStatement0(Expression condition, final int start,final int end) throws ParseException {
3829 Statement statement;
3831 final Statement[] statementsArray;
3832 ElseIf elseifStatement;
3833 Else elseStatement = null;
3835 final ArrayList elseIfList = new ArrayList();
3837 int pos = SimpleCharStream.getPosition();
3839 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3841 jj_consume_token(COLON);
3842 stmts = new ArrayList();
3845 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3878 case INTEGER_LITERAL:
3879 case FLOATING_POINT_LITERAL:
3880 case STRING_LITERAL:
3889 jj_la1[100] = jj_gen;
3892 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3924 case INTEGER_LITERAL:
3925 case FLOATING_POINT_LITERAL:
3926 case STRING_LITERAL:
3932 statement = Statement();
3933 stmts.add(statement);
3936 statement = htmlBlock();
3937 stmts.add(statement);
3940 jj_la1[101] = jj_gen;
3941 jj_consume_token(-1);
3942 throw new ParseException();
3945 endStatements = SimpleCharStream.getPosition();
3948 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3953 jj_la1[102] = jj_gen;
3956 elseifStatement = ElseIfStatementColon();
3957 elseIfList.add(elseifStatement);
3959 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3961 elseStatement = ElseStatementColon();
3964 jj_la1[103] = jj_gen;
3968 setMarker(fileToParse,
3969 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
3973 "Line " + token.beginLine);
3974 } catch (CoreException e) {
3975 PHPeclipsePlugin.log(e);
3978 jj_consume_token(ENDIF);
3979 } catch (ParseException e) {
3980 errorMessage = "'endif' expected";
3982 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3983 errorEnd = jj_input_stream.getPosition() + 1;
3984 {if (true) throw e;}
3987 jj_consume_token(SEMICOLON);
3988 } catch (ParseException e) {
3989 errorMessage = "';' expected after 'endif' keyword";
3991 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3992 errorEnd = jj_input_stream.getPosition() + 1;
3993 {if (true) throw e;}
3995 elseIfs = new ElseIf[elseIfList.size()];
3996 elseIfList.toArray(elseIfs);
3997 if (stmts.size() == 1) {
3998 {if (true) return new IfStatement(condition,
3999 (Statement) stmts.get(0),
4003 SimpleCharStream.getPosition());}
4005 statementsArray = new Statement[stmts.size()];
4006 stmts.toArray(statementsArray);
4007 {if (true) return new IfStatement(condition,
4008 new Block(statementsArray,pos,endStatements),
4012 SimpleCharStream.getPosition());}
4047 case INTEGER_LITERAL:
4048 case FLOATING_POINT_LITERAL:
4049 case STRING_LITERAL:
4055 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4087 case INTEGER_LITERAL:
4088 case FLOATING_POINT_LITERAL:
4089 case STRING_LITERAL:
4101 jj_la1[104] = jj_gen;
4102 jj_consume_token(-1);
4103 throw new ParseException();
4107 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4112 jj_la1[105] = jj_gen;
4115 elseifStatement = ElseIfStatement();
4116 elseIfList.add(elseifStatement);
4118 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4120 jj_consume_token(ELSE);
4122 pos = SimpleCharStream.getPosition();
4123 statement = Statement();
4124 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4125 } catch (ParseException e) {
4126 if (errorMessage != null) {
4127 {if (true) throw e;}
4129 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4131 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4132 errorEnd = jj_input_stream.getPosition() + 1;
4133 {if (true) throw e;}
4137 jj_la1[106] = jj_gen;
4140 elseIfs = new ElseIf[elseIfList.size()];
4141 elseIfList.toArray(elseIfs);
4142 {if (true) return new IfStatement(condition,
4147 SimpleCharStream.getPosition());}
4150 jj_la1[107] = jj_gen;
4151 jj_consume_token(-1);
4152 throw new ParseException();
4154 throw new Error("Missing return statement in function");
4157 static final public ElseIf ElseIfStatementColon() throws ParseException {
4158 Expression condition;
4159 Statement statement;
4160 final ArrayList list = new ArrayList();
4161 final int pos = SimpleCharStream.getPosition();
4162 jj_consume_token(ELSEIF);
4163 condition = Condition("elseif");
4164 jj_consume_token(COLON);
4167 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4200 case INTEGER_LITERAL:
4201 case FLOATING_POINT_LITERAL:
4202 case STRING_LITERAL:
4211 jj_la1[108] = jj_gen;
4214 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4246 case INTEGER_LITERAL:
4247 case FLOATING_POINT_LITERAL:
4248 case STRING_LITERAL:
4254 statement = Statement();
4255 list.add(statement);
4258 statement = htmlBlock();
4259 list.add(statement);
4262 jj_la1[109] = jj_gen;
4263 jj_consume_token(-1);
4264 throw new ParseException();
4267 Statement[] stmtsArray = new Statement[list.size()];
4268 list.toArray(stmtsArray);
4269 {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4270 throw new Error("Missing return statement in function");
4273 static final public Else ElseStatementColon() throws ParseException {
4274 Statement statement;
4275 final ArrayList list = new ArrayList();
4276 final int pos = SimpleCharStream.getPosition();
4277 jj_consume_token(ELSE);
4278 jj_consume_token(COLON);
4281 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4314 case INTEGER_LITERAL:
4315 case FLOATING_POINT_LITERAL:
4316 case STRING_LITERAL:
4325 jj_la1[110] = jj_gen;
4328 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4360 case INTEGER_LITERAL:
4361 case FLOATING_POINT_LITERAL:
4362 case STRING_LITERAL:
4368 statement = Statement();
4369 list.add(statement);
4372 statement = htmlBlock();
4373 list.add(statement);
4376 jj_la1[111] = jj_gen;
4377 jj_consume_token(-1);
4378 throw new ParseException();
4381 Statement[] stmtsArray = new Statement[list.size()];
4382 list.toArray(stmtsArray);
4383 {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4384 throw new Error("Missing return statement in function");
4387 static final public ElseIf ElseIfStatement() throws ParseException {
4388 Expression condition;
4389 Statement statement;
4390 final ArrayList list = new ArrayList();
4391 final int pos = SimpleCharStream.getPosition();
4392 jj_consume_token(ELSEIF);
4393 condition = Condition("elseif");
4394 statement = Statement();
4395 list.add(statement);/*todo:do better*/
4396 Statement[] stmtsArray = new Statement[list.size()];
4397 list.toArray(stmtsArray);
4398 {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4399 throw new Error("Missing return statement in function");
4402 static final public WhileStatement WhileStatement() throws ParseException {
4403 final Expression condition;
4404 final Statement action;
4405 final int pos = SimpleCharStream.getPosition();
4406 jj_consume_token(WHILE);
4407 condition = Condition("while");
4408 action = WhileStatement0(pos,pos + 5);
4409 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4410 throw new Error("Missing return statement in function");
4413 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4414 Statement statement;
4415 final ArrayList stmts = new ArrayList();
4416 final int pos = SimpleCharStream.getPosition();
4417 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4419 jj_consume_token(COLON);
4422 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4454 case INTEGER_LITERAL:
4455 case FLOATING_POINT_LITERAL:
4456 case STRING_LITERAL:
4465 jj_la1[112] = jj_gen;
4468 statement = Statement();
4469 stmts.add(statement);
4472 setMarker(fileToParse,
4473 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4477 "Line " + token.beginLine);
4478 } catch (CoreException e) {
4479 PHPeclipsePlugin.log(e);
4482 jj_consume_token(ENDWHILE);
4483 } catch (ParseException e) {
4484 errorMessage = "'endwhile' expected";
4486 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4487 errorEnd = jj_input_stream.getPosition() + 1;
4488 {if (true) throw e;}
4491 jj_consume_token(SEMICOLON);
4492 Statement[] stmtsArray = new Statement[stmts.size()];
4493 stmts.toArray(stmtsArray);
4494 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4495 } catch (ParseException e) {
4496 errorMessage = "';' expected after 'endwhile' keyword";
4498 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4499 errorEnd = jj_input_stream.getPosition() + 1;
4500 {if (true) throw e;}
4534 case INTEGER_LITERAL:
4535 case FLOATING_POINT_LITERAL:
4536 case STRING_LITERAL:
4542 statement = Statement();
4543 {if (true) return statement;}
4546 jj_la1[113] = jj_gen;
4547 jj_consume_token(-1);
4548 throw new ParseException();
4550 throw new Error("Missing return statement in function");
4553 static final public DoStatement DoStatement() throws ParseException {
4554 final Statement action;
4555 final Expression condition;
4556 final int pos = SimpleCharStream.getPosition();
4557 jj_consume_token(DO);
4558 action = Statement();
4559 jj_consume_token(WHILE);
4560 condition = Condition("while");
4562 jj_consume_token(SEMICOLON);
4563 {if (true) return new DoStatement(condition,action,pos,SimpleCharStream.getPosition());}
4564 } catch (ParseException e) {
4565 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4567 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4568 errorEnd = jj_input_stream.getPosition() + 1;
4569 {if (true) throw e;}
4571 throw new Error("Missing return statement in function");
4574 static final public ForeachStatement ForeachStatement() throws ParseException {
4575 Statement statement;
4576 Expression expression;
4577 final int pos = SimpleCharStream.getPosition();
4578 ArrayVariableDeclaration variable;
4579 jj_consume_token(FOREACH);
4581 jj_consume_token(LPAREN);
4582 } catch (ParseException e) {
4583 errorMessage = "'(' expected after 'foreach' keyword";
4585 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4586 errorEnd = jj_input_stream.getPosition() + 1;
4587 {if (true) throw e;}
4590 expression = Expression();
4591 } catch (ParseException e) {
4592 errorMessage = "variable expected";
4594 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4595 errorEnd = jj_input_stream.getPosition() + 1;
4596 {if (true) throw e;}
4599 jj_consume_token(AS);
4600 } catch (ParseException e) {
4601 errorMessage = "'as' expected";
4603 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4604 errorEnd = jj_input_stream.getPosition() + 1;
4605 {if (true) throw e;}
4608 variable = ArrayVariable();
4609 } catch (ParseException e) {
4610 errorMessage = "variable expected";
4612 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4613 errorEnd = jj_input_stream.getPosition() + 1;
4614 {if (true) throw e;}
4617 jj_consume_token(RPAREN);
4618 } catch (ParseException e) {
4619 errorMessage = "')' expected after 'foreach' keyword";
4621 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4622 errorEnd = jj_input_stream.getPosition() + 1;
4623 {if (true) throw e;}
4626 statement = Statement();
4627 } catch (ParseException e) {
4628 if (errorMessage != null) {if (true) throw e;}
4629 errorMessage = "statement expected";
4631 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4632 errorEnd = jj_input_stream.getPosition() + 1;
4633 {if (true) throw e;}
4635 {if (true) return new ForeachStatement(expression,
4639 SimpleCharStream.getPosition());}
4640 throw new Error("Missing return statement in function");
4643 static final public ForStatement ForStatement() throws ParseException {
4645 final int pos = SimpleCharStream.getPosition();
4646 Statement[] initializations = null;
4647 Expression condition = null;
4648 Statement[] increments = null;
4650 final ArrayList list = new ArrayList();
4651 final int startBlock, endBlock;
4652 token = jj_consume_token(FOR);
4654 jj_consume_token(LPAREN);
4655 } catch (ParseException e) {
4656 errorMessage = "'(' expected after 'for' keyword";
4658 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4659 errorEnd = jj_input_stream.getPosition() + 1;
4660 {if (true) throw e;}
4662 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4670 initializations = ForInit();
4673 jj_la1[114] = jj_gen;
4676 jj_consume_token(SEMICOLON);
4677 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4693 case INTEGER_LITERAL:
4694 case FLOATING_POINT_LITERAL:
4695 case STRING_LITERAL:
4699 condition = Expression();
4702 jj_la1[115] = jj_gen;
4705 jj_consume_token(SEMICOLON);
4706 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4714 increments = StatementExpressionList();
4717 jj_la1[116] = jj_gen;
4720 jj_consume_token(RPAREN);
4721 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4753 case INTEGER_LITERAL:
4754 case FLOATING_POINT_LITERAL:
4755 case STRING_LITERAL:
4761 action = Statement();
4762 {if (true) return new ForStatement(initializations,condition,increments,action,pos,SimpleCharStream.getPosition());}
4765 jj_consume_token(COLON);
4766 startBlock = SimpleCharStream.getPosition();
4769 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4801 case INTEGER_LITERAL:
4802 case FLOATING_POINT_LITERAL:
4803 case STRING_LITERAL:
4812 jj_la1[117] = jj_gen;
4815 action = Statement();
4819 setMarker(fileToParse,
4820 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
4822 pos+token.image.length(),
4824 "Line " + token.beginLine);
4825 } catch (CoreException e) {
4826 PHPeclipsePlugin.log(e);
4828 endBlock = SimpleCharStream.getPosition();
4830 jj_consume_token(ENDFOR);
4831 } catch (ParseException e) {
4832 errorMessage = "'endfor' expected";
4834 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4835 errorEnd = jj_input_stream.getPosition() + 1;
4836 {if (true) throw e;}
4839 jj_consume_token(SEMICOLON);
4840 Statement[] stmtsArray = new Statement[list.size()];
4841 list.toArray(stmtsArray);
4842 {if (true) return new ForStatement(initializations,condition,increments,new Block(stmtsArray,startBlock,endBlock),pos,SimpleCharStream.getPosition());}
4843 } catch (ParseException e) {
4844 errorMessage = "';' expected after 'endfor' keyword";
4846 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4847 errorEnd = jj_input_stream.getPosition() + 1;
4848 {if (true) throw e;}
4852 jj_la1[118] = jj_gen;
4853 jj_consume_token(-1);
4854 throw new ParseException();
4856 throw new Error("Missing return statement in function");
4859 static final public Statement[] ForInit() throws ParseException {
4860 Statement[] statements;
4861 if (jj_2_8(2147483647)) {
4862 statements = LocalVariableDeclaration();
4863 {if (true) return statements;}
4865 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4873 statements = StatementExpressionList();
4874 {if (true) return statements;}
4877 jj_la1[119] = jj_gen;
4878 jj_consume_token(-1);
4879 throw new ParseException();
4882 throw new Error("Missing return statement in function");
4885 static final public Statement[] StatementExpressionList() throws ParseException {
4886 final ArrayList list = new ArrayList();
4888 expr = StatementExpression();
4892 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4897 jj_la1[120] = jj_gen;
4900 jj_consume_token(COMMA);
4901 StatementExpression();
4904 Statement[] stmtsArray = new Statement[list.size()];
4905 list.toArray(stmtsArray);
4906 {if (true) return stmtsArray;}
4907 throw new Error("Missing return statement in function");
4910 static final public Continue ContinueStatement() throws ParseException {
4911 Expression expr = null;
4912 final int pos = SimpleCharStream.getPosition();
4913 jj_consume_token(CONTINUE);
4914 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4930 case INTEGER_LITERAL:
4931 case FLOATING_POINT_LITERAL:
4932 case STRING_LITERAL:
4936 expr = Expression();
4939 jj_la1[121] = jj_gen;
4943 jj_consume_token(SEMICOLON);
4944 {if (true) return new Continue(expr,pos,SimpleCharStream.getPosition());}
4945 } catch (ParseException e) {
4946 errorMessage = "';' expected after 'continue' statement";
4948 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4949 errorEnd = jj_input_stream.getPosition() + 1;
4950 {if (true) throw e;}
4952 throw new Error("Missing return statement in function");
4955 static final public ReturnStatement ReturnStatement() throws ParseException {
4956 Expression expr = null;
4957 final int pos = SimpleCharStream.getPosition();
4958 jj_consume_token(RETURN);
4959 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4975 case INTEGER_LITERAL:
4976 case FLOATING_POINT_LITERAL:
4977 case STRING_LITERAL:
4981 expr = Expression();
4984 jj_la1[122] = jj_gen;
4988 jj_consume_token(SEMICOLON);
4989 {if (true) return new ReturnStatement(expr,pos,SimpleCharStream.getPosition());}
4990 } catch (ParseException e) {
4991 errorMessage = "';' expected after 'return' statement";
4993 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4994 errorEnd = jj_input_stream.getPosition() + 1;
4995 {if (true) throw e;}
4997 throw new Error("Missing return statement in function");
5000 static final private boolean jj_2_1(int xla) {
5001 jj_la = xla; jj_lastpos = jj_scanpos = token;
5002 boolean retval = !jj_3_1();
5007 static final private boolean jj_2_2(int xla) {
5008 jj_la = xla; jj_lastpos = jj_scanpos = token;
5009 boolean retval = !jj_3_2();
5014 static final private boolean jj_2_3(int xla) {
5015 jj_la = xla; jj_lastpos = jj_scanpos = token;
5016 boolean retval = !jj_3_3();
5021 static final private boolean jj_2_4(int xla) {
5022 jj_la = xla; jj_lastpos = jj_scanpos = token;
5023 boolean retval = !jj_3_4();
5028 static final private boolean jj_2_5(int xla) {
5029 jj_la = xla; jj_lastpos = jj_scanpos = token;
5030 boolean retval = !jj_3_5();
5035 static final private boolean jj_2_6(int xla) {
5036 jj_la = xla; jj_lastpos = jj_scanpos = token;
5037 boolean retval = !jj_3_6();
5042 static final private boolean jj_2_7(int xla) {
5043 jj_la = xla; jj_lastpos = jj_scanpos = token;
5044 boolean retval = !jj_3_7();
5049 static final private boolean jj_2_8(int xla) {
5050 jj_la = xla; jj_lastpos = jj_scanpos = token;
5051 boolean retval = !jj_3_8();
5056 static final private boolean jj_3R_157() {
5061 if (jj_3R_160()) return true;
5062 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5063 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5064 if (jj_3R_166()) return true;
5065 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5069 static final private boolean jj_3R_152() {
5070 if (jj_3R_158()) return true;
5071 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5075 static final private boolean jj_3R_151() {
5076 if (jj_3R_157()) return true;
5077 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5081 static final private boolean jj_3R_156() {
5082 if (jj_scan_token(MINUS)) return true;
5083 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5087 static final private boolean jj_3R_155() {
5088 if (jj_scan_token(PLUS)) return true;
5089 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5093 static final private boolean jj_3R_148() {
5100 if (jj_3R_152()) return true;
5101 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5102 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5103 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5107 static final private boolean jj_3R_150() {
5112 if (jj_3R_156()) return true;
5113 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5114 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5115 if (jj_3R_139()) return true;
5116 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5120 static final private boolean jj_3R_154() {
5121 if (jj_3R_148()) return true;
5122 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5126 static final private boolean jj_3R_149() {
5131 if (jj_3R_154()) return true;
5132 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5133 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5137 static final private boolean jj_3R_153() {
5138 if (jj_scan_token(AT)) return true;
5139 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5140 if (jj_3R_149()) return true;
5141 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5145 static final private boolean jj_3R_144() {
5146 if (jj_3R_149()) return true;
5147 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5151 static final private boolean jj_3R_139() {
5156 if (jj_3R_144()) return true;
5157 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5158 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5162 static final private boolean jj_3R_143() {
5163 if (jj_scan_token(BIT_AND)) return true;
5164 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5165 if (jj_3R_148()) return true;
5166 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5170 static final private boolean jj_3R_147() {
5171 if (jj_scan_token(REMAINDER)) return true;
5172 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5176 static final private boolean jj_3R_146() {
5177 if (jj_scan_token(SLASH)) return true;
5178 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5182 static final private boolean jj_3R_145() {
5183 if (jj_scan_token(STAR)) return true;
5184 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5188 static final private boolean jj_3R_140() {
5195 if (jj_3R_147()) return true;
5196 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5197 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5198 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5199 if (jj_3R_139()) return true;
5200 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5204 static final private boolean jj_3R_87() {
5205 if (jj_scan_token(ASSIGN)) return true;
5206 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5207 if (jj_3R_45()) return true;
5208 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5212 static final private boolean jj_3R_134() {
5213 if (jj_3R_139()) return true;
5214 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5218 if (jj_3R_140()) { jj_scanpos = xsp; break; }
5219 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5224 static final private boolean jj_3R_142() {
5225 if (jj_scan_token(MINUS)) return true;
5226 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5230 static final private boolean jj_3R_141() {
5231 if (jj_scan_token(PLUS)) return true;
5232 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5236 static final private boolean jj_3R_135() {
5241 if (jj_3R_142()) return true;
5242 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5243 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5244 if (jj_3R_134()) return true;
5245 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5249 static final private boolean jj_3R_128() {
5250 if (jj_3R_134()) return true;
5251 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5255 if (jj_3R_135()) { jj_scanpos = xsp; break; }
5256 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5261 static final private boolean jj_3_7() {
5262 if (jj_3R_46()) return true;
5263 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5267 static final private boolean jj_3R_198() {
5268 if (jj_scan_token(COMMA)) return true;
5269 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5273 static final private boolean jj_3_2() {
5274 if (jj_scan_token(COMMA)) return true;
5275 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5276 if (jj_3R_41()) return true;
5277 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5281 static final private boolean jj_3R_57() {
5282 if (jj_3R_50()) return true;
5283 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5286 if (jj_3R_87()) jj_scanpos = xsp;
5287 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5291 static final private boolean jj_3R_197() {
5292 if (jj_3R_41()) return true;
5293 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5297 if (jj_3_2()) { jj_scanpos = xsp; break; }
5298 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5303 static final private boolean jj_3R_138() {
5304 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
5305 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5309 static final private boolean jj_3R_137() {
5310 if (jj_scan_token(RSIGNEDSHIFT)) return true;
5311 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5315 static final private boolean jj_3R_136() {
5316 if (jj_scan_token(LSHIFT)) return true;
5317 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5321 static final private boolean jj_3R_129() {
5328 if (jj_3R_138()) return true;
5329 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5330 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5331 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5332 if (jj_3R_128()) return true;
5333 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5337 static final private boolean jj_3R_121() {
5338 if (jj_3R_128()) return true;
5339 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5343 if (jj_3R_129()) { jj_scanpos = xsp; break; }
5344 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5349 static final private boolean jj_3_6() {
5350 if (jj_3R_45()) return true;
5351 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5352 if (jj_scan_token(SEMICOLON)) return true;
5353 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5357 static final private boolean jj_3R_192() {
5358 if (jj_scan_token(LPAREN)) return true;
5359 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5362 if (jj_3R_197()) jj_scanpos = xsp;
5363 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5365 if (jj_3R_198()) jj_scanpos = xsp;
5366 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5367 if (jj_scan_token(RPAREN)) return true;
5368 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5372 static final private boolean jj_3R_58() {
5373 if (jj_scan_token(COMMA)) return true;
5374 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5375 if (jj_3R_57()) return true;
5376 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5380 static final private boolean jj_3R_47() {
5381 if (jj_3R_57()) return true;
5382 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5386 if (jj_3R_58()) { jj_scanpos = xsp; break; }
5387 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5392 static final private boolean jj_3R_133() {
5393 if (jj_scan_token(GE)) return true;
5394 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5398 static final private boolean jj_3R_132() {
5399 if (jj_scan_token(LE)) return true;
5400 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5404 static final private boolean jj_3R_131() {
5405 if (jj_scan_token(GT)) return true;
5406 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5410 static final private boolean jj_3R_130() {
5411 if (jj_scan_token(LT)) return true;
5412 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5416 static final private boolean jj_3R_201() {
5417 if (jj_scan_token(ARRAYASSIGN)) return true;
5418 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5419 if (jj_3R_45()) return true;
5420 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5424 static final private boolean jj_3R_122() {
5433 if (jj_3R_133()) return true;
5434 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5435 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5436 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5437 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5438 if (jj_3R_121()) return true;
5439 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5443 static final private boolean jj_3R_41() {
5444 if (jj_3R_45()) return true;
5445 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5448 if (jj_3R_201()) jj_scanpos = xsp;
5449 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5453 static final private boolean jj_3R_119() {
5454 if (jj_3R_121()) return true;
5455 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5459 if (jj_3R_122()) { jj_scanpos = xsp; break; }
5460 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5465 static final private boolean jj_3R_203() {
5466 if (jj_scan_token(COMMA)) return true;
5467 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5468 if (jj_3R_45()) return true;
5469 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5473 static final private boolean jj_3R_202() {
5474 if (jj_3R_45()) return true;
5475 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5479 if (jj_3R_203()) { jj_scanpos = xsp; break; }
5480 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5485 static final private boolean jj_3R_127() {
5486 if (jj_scan_token(TRIPLEEQUAL)) return true;
5487 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5491 static final private boolean jj_3R_200() {
5492 if (jj_3R_202()) return true;
5493 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5497 static final private boolean jj_3R_126() {
5498 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5499 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5503 static final private boolean jj_3R_125() {
5504 if (jj_scan_token(NOT_EQUAL)) return true;
5505 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5509 static final private boolean jj_3R_124() {
5510 if (jj_scan_token(DIF)) return true;
5511 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5515 static final private boolean jj_3R_123() {
5516 if (jj_scan_token(EQUAL_EQUAL)) return true;
5517 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5521 static final private boolean jj_3R_120() {
5532 if (jj_3R_127()) return true;
5533 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5534 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5535 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5536 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5537 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5538 if (jj_3R_119()) return true;
5539 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5543 static final private boolean jj_3R_93() {
5544 if (jj_3R_52()) return true;
5545 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5549 static final private boolean jj_3R_117() {
5550 if (jj_3R_119()) return true;
5551 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5555 if (jj_3R_120()) { jj_scanpos = xsp; break; }
5556 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5561 static final private boolean jj_3R_199() {
5562 if (jj_scan_token(LPAREN)) return true;
5563 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5566 if (jj_3R_200()) jj_scanpos = xsp;
5567 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5568 if (jj_scan_token(RPAREN)) return true;
5569 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5573 static final private boolean jj_3R_108() {
5574 if (jj_scan_token(LBRACE)) return true;
5575 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5576 if (jj_3R_45()) return true;
5577 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5578 if (jj_scan_token(RBRACE)) return true;
5579 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5583 static final private boolean jj_3R_91() {
5584 if (jj_scan_token(DOLLAR_ID)) return true;
5585 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5589 static final private boolean jj_3R_118() {
5590 if (jj_scan_token(BIT_AND)) return true;
5591 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5592 if (jj_3R_117()) return true;
5593 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5597 static final private boolean jj_3R_177() {
5598 if (jj_scan_token(NULL)) return true;
5599 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5603 static final private boolean jj_3R_90() {
5604 if (jj_scan_token(DOLLAR)) return true;
5605 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5606 if (jj_3R_59()) return true;
5607 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5611 static final private boolean jj_3R_176() {
5612 if (jj_scan_token(FALSE)) return true;
5613 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5617 static final private boolean jj_3R_115() {
5618 if (jj_3R_117()) return true;
5619 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5623 if (jj_3R_118()) { jj_scanpos = xsp; break; }
5624 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5629 static final private boolean jj_3R_175() {
5630 if (jj_scan_token(TRUE)) return true;
5631 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5635 static final private boolean jj_3R_174() {
5636 if (jj_scan_token(STRING_LITERAL)) return true;
5637 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5641 static final private boolean jj_3R_173() {
5642 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
5643 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5647 static final private boolean jj_3R_169() {
5660 if (jj_3R_177()) return true;
5661 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5662 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5663 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5664 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5665 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5666 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5670 static final private boolean jj_3R_172() {
5671 if (jj_scan_token(INTEGER_LITERAL)) return true;
5672 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5676 static final private boolean jj_3R_116() {
5677 if (jj_scan_token(XOR)) return true;
5678 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5679 if (jj_3R_115()) return true;
5680 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5684 static final private boolean jj_3R_89() {
5685 if (jj_scan_token(IDENTIFIER)) return true;
5686 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5689 if (jj_3R_108()) jj_scanpos = xsp;
5690 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5694 static final private boolean jj_3R_113() {
5695 if (jj_3R_115()) return true;
5696 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5700 if (jj_3R_116()) { jj_scanpos = xsp; break; }
5701 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5706 static final private boolean jj_3R_92() {
5707 if (jj_3R_45()) return true;
5708 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5712 static final private boolean jj_3R_60() {
5717 if (jj_3R_93()) return true;
5718 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5719 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5723 static final private boolean jj_3R_88() {
5724 if (jj_scan_token(LBRACE)) return true;
5725 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5726 if (jj_3R_45()) return true;
5727 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5728 if (jj_scan_token(RBRACE)) return true;
5729 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5733 static final private boolean jj_3R_59() {
5742 if (jj_3R_91()) return true;
5743 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5744 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5745 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5746 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5750 static final private boolean jj_3R_46() {
5751 if (jj_scan_token(IDENTIFIER)) return true;
5752 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5753 if (jj_scan_token(COLON)) return true;
5754 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5758 static final private boolean jj_3R_98() {
5759 if (jj_scan_token(LBRACE)) return true;
5760 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5761 if (jj_3R_45()) return true;
5762 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5763 if (jj_scan_token(RBRACE)) return true;
5764 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5768 static final private boolean jj_3R_114() {
5769 if (jj_scan_token(BIT_OR)) return true;
5770 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5771 if (jj_3R_113()) return true;
5772 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5776 static final private boolean jj_3R_109() {
5777 if (jj_3R_113()) return true;
5778 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5782 if (jj_3R_114()) { jj_scanpos = xsp; break; }
5783 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5788 static final private boolean jj_3R_49() {
5789 if (jj_scan_token(LBRACKET)) return true;
5790 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5793 if (jj_3R_60()) jj_scanpos = xsp;
5794 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5795 if (jj_scan_token(RBRACKET)) return true;
5796 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5800 static final private boolean jj_3_8() {
5801 if (jj_3R_47()) return true;
5802 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5806 static final private boolean jj_3R_95() {
5807 if (jj_scan_token(DOLLAR)) return true;
5808 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5809 if (jj_3R_59()) return true;
5810 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5814 static final private boolean jj_3R_110() {
5815 if (jj_scan_token(DOT)) return true;
5816 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5817 if (jj_3R_109()) return true;
5818 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5822 static final private boolean jj_3R_104() {
5823 if (jj_3R_109()) return true;
5824 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5828 if (jj_3R_110()) { jj_scanpos = xsp; break; }
5829 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5834 static final private boolean jj_3R_94() {
5835 if (jj_scan_token(DOLLAR_ID)) return true;
5836 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5839 if (jj_3R_98()) jj_scanpos = xsp;
5840 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5844 static final private boolean jj_3R_61() {
5849 if (jj_3R_95()) return true;
5850 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5851 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5855 static final private boolean jj_3R_48() {
5856 if (jj_scan_token(CLASSACCESS)) return true;
5857 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5858 if (jj_3R_59()) return true;
5859 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5863 static final private boolean jj_3R_40() {
5868 if (jj_3R_49()) return true;
5869 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5870 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5874 static final private boolean jj_3R_112() {
5875 if (jj_scan_token(_ANDL)) return true;
5876 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5880 static final private boolean jj_3R_111() {
5881 if (jj_scan_token(AND_AND)) return true;
5882 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5886 static final private boolean jj_3R_196() {
5887 if (jj_3R_40()) return true;
5888 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5892 static final private boolean jj_3R_105() {
5897 if (jj_3R_112()) return true;
5898 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5899 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5900 if (jj_3R_104()) return true;
5901 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5905 static final private boolean jj_3R_195() {
5906 if (jj_3R_199()) return true;
5907 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5911 static final private boolean jj_3R_188() {
5916 if (jj_3R_196()) return true;
5917 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5918 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5922 static final private boolean jj_3R_97() {
5923 if (jj_scan_token(HOOK)) return true;
5924 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5925 if (jj_3R_45()) return true;
5926 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5927 if (jj_scan_token(COLON)) return true;
5928 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5929 if (jj_3R_86()) return true;
5930 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5934 static final private boolean jj_3R_102() {
5935 if (jj_3R_104()) return true;
5936 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5940 if (jj_3R_105()) { jj_scanpos = xsp; break; }
5941 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5946 static final private boolean jj_3R_187() {
5947 if (jj_3R_50()) return true;
5948 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5952 static final private boolean jj_3_1() {
5953 if (jj_3R_40()) return true;
5954 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5958 static final private boolean jj_3R_107() {
5959 if (jj_scan_token(_ORL)) return true;
5960 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5964 static final private boolean jj_3R_106() {
5965 if (jj_scan_token(OR_OR)) return true;
5966 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5970 static final private boolean jj_3R_186() {
5971 if (jj_scan_token(IDENTIFIER)) return true;
5972 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5976 static final private boolean jj_3R_178() {
5981 if (jj_3R_187()) return true;
5982 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5983 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5987 static final private boolean jj_3R_50() {
5988 if (jj_3R_61()) return true;
5989 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5993 if (jj_3_1()) { jj_scanpos = xsp; break; }
5994 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5999 static final private boolean jj_3R_103() {
6004 if (jj_3R_107()) return true;
6005 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6006 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6007 if (jj_3R_102()) return true;
6008 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6012 static final private boolean jj_3R_96() {
6013 if (jj_3R_102()) return true;
6014 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6018 if (jj_3R_103()) { jj_scanpos = xsp; break; }
6019 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6024 static final private boolean jj_3R_86() {
6025 if (jj_3R_96()) return true;
6026 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6029 if (jj_3R_97()) jj_scanpos = xsp;
6030 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6034 static final private boolean jj_3R_74() {
6035 if (jj_scan_token(TILDEEQUAL)) return true;
6036 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6040 static final private boolean jj_3R_191() {
6041 if (jj_3R_50()) return true;
6042 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6046 static final private boolean jj_3R_73() {
6047 if (jj_scan_token(DOTASSIGN)) return true;
6048 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6052 static final private boolean jj_3R_72() {
6053 if (jj_scan_token(ORASSIGN)) return true;
6054 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6058 static final private boolean jj_3R_71() {
6059 if (jj_scan_token(XORASSIGN)) return true;
6060 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6064 static final private boolean jj_3R_190() {
6065 if (jj_scan_token(NEW)) return true;
6066 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6067 if (jj_3R_178()) return true;
6068 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6072 static final private boolean jj_3R_70() {
6073 if (jj_scan_token(ANDASSIGN)) return true;
6074 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6078 static final private boolean jj_3R_69() {
6079 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6080 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6084 static final private boolean jj_3R_68() {
6085 if (jj_scan_token(LSHIFTASSIGN)) return true;
6086 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6090 static final private boolean jj_3R_189() {
6091 if (jj_scan_token(IDENTIFIER)) return true;
6092 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6096 static final private boolean jj_3R_180() {
6103 if (jj_3R_191()) return true;
6104 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6105 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6106 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6110 static final private boolean jj_3R_67() {
6111 if (jj_scan_token(MINUSASSIGN)) return true;
6112 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6116 static final private boolean jj_3R_66() {
6117 if (jj_scan_token(PLUSASSIGN)) return true;
6118 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6122 static final private boolean jj_3R_65() {
6123 if (jj_scan_token(REMASSIGN)) return true;
6124 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6128 static final private boolean jj_3R_64() {
6129 if (jj_scan_token(SLASHASSIGN)) return true;
6130 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6134 static final private boolean jj_3R_63() {
6135 if (jj_scan_token(STARASSIGN)) return true;
6136 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6140 static final private boolean jj_3R_51() {
6167 if (jj_3R_74()) return true;
6168 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6169 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6170 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6171 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6172 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6173 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6174 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6175 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6176 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6177 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6178 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6179 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6180 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6184 static final private boolean jj_3R_62() {
6185 if (jj_scan_token(ASSIGN)) return true;
6186 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6190 static final private boolean jj_3R_182() {
6191 if (jj_scan_token(ARRAY)) return true;
6192 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6193 if (jj_3R_192()) return true;
6194 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6198 static final private boolean jj_3R_171() {
6199 if (jj_3R_182()) return true;
6200 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6204 static final private boolean jj_3R_181() {
6205 if (jj_3R_188()) return true;
6206 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6210 static final private boolean jj_3R_170() {
6211 if (jj_3R_180()) return true;
6212 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6216 if (jj_3R_181()) { jj_scanpos = xsp; break; }
6217 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6222 static final private boolean jj_3R_179() {
6223 if (jj_3R_188()) return true;
6224 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6228 static final private boolean jj_3R_101() {
6229 if (jj_scan_token(ASSIGN)) return true;
6230 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6231 if (jj_3R_45()) return true;
6232 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6236 static final private boolean jj_3R_42() {
6237 if (jj_3R_50()) return true;
6238 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6239 if (jj_3R_51()) return true;
6240 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6241 if (jj_3R_45()) return true;
6242 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6246 static final private boolean jj_3_3() {
6247 if (jj_3R_42()) return true;
6248 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6252 static final private boolean jj_3_5() {
6253 if (jj_scan_token(IDENTIFIER)) return true;
6254 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6255 if (jj_scan_token(STATICCLASSACCESS)) return true;
6256 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6257 if (jj_3R_178()) return true;
6258 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6262 if (jj_3R_179()) { jj_scanpos = xsp; break; }
6263 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6268 static final private boolean jj_3R_166() {
6275 if (jj_3R_171()) return true;
6276 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6277 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6278 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6282 static final private boolean jj_3R_56() {
6283 if (jj_3R_86()) return true;
6284 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6288 static final private boolean jj_3R_55() {
6289 if (jj_3R_42()) return true;
6290 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6294 static final private boolean jj_3R_54() {
6295 if (jj_3R_85()) return true;
6296 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6300 static final private boolean jj_3R_45() {
6309 if (jj_3R_56()) return true;
6310 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6311 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6312 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6313 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6317 static final private boolean jj_3R_53() {
6318 if (jj_3R_84()) return true;
6319 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6323 static final private boolean jj_3R_100() {
6324 if (jj_scan_token(COMMA)) return true;
6325 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6326 if (jj_3R_50()) return true;
6327 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6331 static final private boolean jj_3R_194() {
6332 if (jj_scan_token(DECR)) return true;
6333 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6337 static final private boolean jj_3R_193() {
6338 if (jj_scan_token(INCR)) return true;
6339 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6343 static final private boolean jj_3R_185() {
6348 if (jj_3R_194()) return true;
6349 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6350 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6354 static final private boolean jj_3R_168() {
6355 if (jj_3R_166()) return true;
6356 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6359 if (jj_3R_185()) jj_scanpos = xsp;
6360 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6364 static final private boolean jj_3R_99() {
6365 if (jj_3R_50()) return true;
6366 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6370 static final private boolean jj_3R_83() {
6371 if (jj_scan_token(OBJECT)) return true;
6372 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6376 static final private boolean jj_3R_82() {
6377 if (jj_scan_token(INTEGER)) return true;
6378 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6382 static final private boolean jj_3R_44() {
6383 if (jj_scan_token(ARRAY)) return true;
6384 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6388 static final private boolean jj_3R_184() {
6389 if (jj_scan_token(ARRAY)) return true;
6390 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6394 static final private boolean jj_3R_81() {
6395 if (jj_scan_token(INT)) return true;
6396 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6400 static final private boolean jj_3R_183() {
6401 if (jj_3R_52()) return true;
6402 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6406 static final private boolean jj_3R_80() {
6407 if (jj_scan_token(FLOAT)) return true;
6408 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6412 static final private boolean jj_3R_85() {
6413 if (jj_scan_token(LIST)) return true;
6414 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6415 if (jj_scan_token(LPAREN)) return true;
6416 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6419 if (jj_3R_99()) jj_scanpos = xsp;
6420 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6423 if (jj_3R_100()) { jj_scanpos = xsp; break; }
6424 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6426 if (jj_scan_token(RPAREN)) return true;
6427 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6429 if (jj_3R_101()) jj_scanpos = xsp;
6430 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6434 static final private boolean jj_3R_167() {
6435 if (jj_scan_token(LPAREN)) return true;
6436 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6441 if (jj_3R_184()) return true;
6442 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6443 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6444 if (jj_scan_token(RPAREN)) return true;
6445 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6446 if (jj_3R_139()) return true;
6447 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6451 static final private boolean jj_3R_79() {
6452 if (jj_scan_token(DOUBLE)) return true;
6453 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6457 static final private boolean jj_3R_43() {
6458 if (jj_3R_52()) return true;
6459 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6463 static final private boolean jj_3R_78() {
6464 if (jj_scan_token(REAL)) return true;
6465 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6469 static final private boolean jj_3R_77() {
6470 if (jj_scan_token(BOOLEAN)) return true;
6471 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6475 static final private boolean jj_3R_84() {
6476 if (jj_scan_token(PRINT)) return true;
6477 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6478 if (jj_3R_45()) return true;
6479 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6483 static final private boolean jj_3R_76() {
6484 if (jj_scan_token(BOOL)) return true;
6485 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6489 static final private boolean jj_3_4() {
6490 if (jj_scan_token(LPAREN)) return true;
6491 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6496 if (jj_3R_44()) return true;
6497 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6498 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6499 if (jj_scan_token(RPAREN)) return true;
6500 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6504 static final private boolean jj_3R_75() {
6505 if (jj_scan_token(STRING)) return true;
6506 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6510 static final private boolean jj_3R_52() {
6529 if (jj_3R_83()) return true;
6530 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6531 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6532 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6533 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6534 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6535 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6536 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6537 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6538 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6542 static final private boolean jj_3R_165() {
6543 if (jj_scan_token(LPAREN)) return true;
6544 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6545 if (jj_3R_45()) return true;
6546 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6547 if (jj_scan_token(RPAREN)) return true;
6548 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6552 static final private boolean jj_3R_164() {
6553 if (jj_3R_169()) return true;
6554 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6558 static final private boolean jj_3R_163() {
6559 if (jj_3R_168()) return true;
6560 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6564 static final private boolean jj_3R_162() {
6565 if (jj_3R_167()) return true;
6566 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6570 static final private boolean jj_3R_158() {
6581 if (jj_3R_165()) return true;
6582 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6583 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6584 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6585 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6586 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6590 static final private boolean jj_3R_161() {
6591 if (jj_scan_token(BANG)) return true;
6592 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6593 if (jj_3R_139()) return true;
6594 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6598 static final private boolean jj_3R_160() {
6599 if (jj_scan_token(DECR)) return true;
6600 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6604 static final private boolean jj_3R_159() {
6605 if (jj_scan_token(INCR)) return true;
6606 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6610 static private boolean jj_initialized_once = false;
6611 static public PHPParserTokenManager token_source;
6612 static SimpleCharStream jj_input_stream;
6613 static public Token token, jj_nt;
6614 static private int jj_ntk;
6615 static private Token jj_scanpos, jj_lastpos;
6616 static private int jj_la;
6617 static public boolean lookingAhead = false;
6618 static private boolean jj_semLA;
6619 static private int jj_gen;
6620 static final private int[] jj_la1 = new int[123];
6621 static private int[] jj_la1_0;
6622 static private int[] jj_la1_1;
6623 static private int[] jj_la1_2;
6624 static private int[] jj_la1_3;
6625 static private int[] jj_la1_4;
6633 private static void jj_la1_0() {
6634 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,};
6636 private static void jj_la1_1() {
6637 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,};
6639 private static void jj_la1_2() {
6640 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,};
6642 private static void jj_la1_3() {
6643 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,};
6645 private static void jj_la1_4() {
6646 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,};
6648 static final private JJCalls[] jj_2_rtns = new JJCalls[8];
6649 static private boolean jj_rescan = false;
6650 static private int jj_gc = 0;
6652 public PHPParser(java.io.InputStream stream) {
6653 if (jj_initialized_once) {
6654 System.out.println("ERROR: Second call to constructor of static parser. You must");
6655 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6656 System.out.println(" during parser generation.");
6659 jj_initialized_once = true;
6660 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6661 token_source = new PHPParserTokenManager(jj_input_stream);
6662 token = new Token();
6665 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6666 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6669 static public void ReInit(java.io.InputStream stream) {
6670 jj_input_stream.ReInit(stream, 1, 1);
6671 token_source.ReInit(jj_input_stream);
6672 token = new Token();
6675 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6676 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6679 public PHPParser(java.io.Reader stream) {
6680 if (jj_initialized_once) {
6681 System.out.println("ERROR: Second call to constructor of static parser. You must");
6682 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6683 System.out.println(" during parser generation.");
6686 jj_initialized_once = true;
6687 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6688 token_source = new PHPParserTokenManager(jj_input_stream);
6689 token = new Token();
6692 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6693 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6696 static public void ReInit(java.io.Reader stream) {
6697 jj_input_stream.ReInit(stream, 1, 1);
6698 token_source.ReInit(jj_input_stream);
6699 token = new Token();
6702 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6703 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6706 public PHPParser(PHPParserTokenManager tm) {
6707 if (jj_initialized_once) {
6708 System.out.println("ERROR: Second call to constructor of static parser. You must");
6709 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6710 System.out.println(" during parser generation.");
6713 jj_initialized_once = true;
6715 token = new Token();
6718 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6719 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6722 public void ReInit(PHPParserTokenManager tm) {
6724 token = new Token();
6727 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6728 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6731 static final private Token jj_consume_token(int kind) throws ParseException {
6733 if ((oldToken = token).next != null) token = token.next;
6734 else token = token.next = token_source.getNextToken();
6736 if (token.kind == kind) {
6738 if (++jj_gc > 100) {
6740 for (int i = 0; i < jj_2_rtns.length; i++) {
6741 JJCalls c = jj_2_rtns[i];
6743 if (c.gen < jj_gen) c.first = null;
6752 throw generateParseException();
6755 static final private boolean jj_scan_token(int kind) {
6756 if (jj_scanpos == jj_lastpos) {
6758 if (jj_scanpos.next == null) {
6759 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
6761 jj_lastpos = jj_scanpos = jj_scanpos.next;
6764 jj_scanpos = jj_scanpos.next;
6767 int i = 0; Token tok = token;
6768 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
6769 if (tok != null) jj_add_error_token(kind, i);
6771 return (jj_scanpos.kind != kind);
6774 static final public Token getNextToken() {
6775 if (token.next != null) token = token.next;
6776 else token = token.next = token_source.getNextToken();
6782 static final public Token getToken(int index) {
6783 Token t = lookingAhead ? jj_scanpos : token;
6784 for (int i = 0; i < index; i++) {
6785 if (t.next != null) t = t.next;
6786 else t = t.next = token_source.getNextToken();
6791 static final private int jj_ntk() {
6792 if ((jj_nt=token.next) == null)
6793 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
6795 return (jj_ntk = jj_nt.kind);
6798 static private java.util.Vector jj_expentries = new java.util.Vector();
6799 static private int[] jj_expentry;
6800 static private int jj_kind = -1;
6801 static private int[] jj_lasttokens = new int[100];
6802 static private int jj_endpos;
6804 static private void jj_add_error_token(int kind, int pos) {
6805 if (pos >= 100) return;
6806 if (pos == jj_endpos + 1) {
6807 jj_lasttokens[jj_endpos++] = kind;
6808 } else if (jj_endpos != 0) {
6809 jj_expentry = new int[jj_endpos];
6810 for (int i = 0; i < jj_endpos; i++) {
6811 jj_expentry[i] = jj_lasttokens[i];
6813 boolean exists = false;
6814 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
6815 int[] oldentry = (int[])(enum.nextElement());
6816 if (oldentry.length == jj_expentry.length) {
6818 for (int i = 0; i < jj_expentry.length; i++) {
6819 if (oldentry[i] != jj_expentry[i]) {
6827 if (!exists) jj_expentries.addElement(jj_expentry);
6828 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
6832 static public ParseException generateParseException() {
6833 jj_expentries.removeAllElements();
6834 boolean[] la1tokens = new boolean[141];
6835 for (int i = 0; i < 141; i++) {
6836 la1tokens[i] = false;
6839 la1tokens[jj_kind] = true;
6842 for (int i = 0; i < 123; i++) {
6843 if (jj_la1[i] == jj_gen) {
6844 for (int j = 0; j < 32; j++) {
6845 if ((jj_la1_0[i] & (1<<j)) != 0) {
6846 la1tokens[j] = true;
6848 if ((jj_la1_1[i] & (1<<j)) != 0) {
6849 la1tokens[32+j] = true;
6851 if ((jj_la1_2[i] & (1<<j)) != 0) {
6852 la1tokens[64+j] = true;
6854 if ((jj_la1_3[i] & (1<<j)) != 0) {
6855 la1tokens[96+j] = true;
6857 if ((jj_la1_4[i] & (1<<j)) != 0) {
6858 la1tokens[128+j] = true;
6863 for (int i = 0; i < 141; i++) {
6865 jj_expentry = new int[1];
6867 jj_expentries.addElement(jj_expentry);
6872 jj_add_error_token(0, 0);
6873 int[][] exptokseq = new int[jj_expentries.size()][];
6874 for (int i = 0; i < jj_expentries.size(); i++) {
6875 exptokseq[i] = (int[])jj_expentries.elementAt(i);
6877 return new ParseException(token, exptokseq, tokenImage);
6880 static final public void enable_tracing() {
6883 static final public void disable_tracing() {
6886 static final private void jj_rescan_token() {
6888 for (int i = 0; i < 8; i++) {
6889 JJCalls p = jj_2_rtns[i];
6891 if (p.gen > jj_gen) {
6892 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
6894 case 0: jj_3_1(); break;
6895 case 1: jj_3_2(); break;
6896 case 2: jj_3_3(); break;
6897 case 3: jj_3_4(); break;
6898 case 4: jj_3_5(); break;
6899 case 5: jj_3_6(); break;
6900 case 6: jj_3_7(); break;
6901 case 7: jj_3_8(); break;
6905 } while (p != null);
6910 static final private void jj_save(int index, int xla) {
6911 JJCalls p = jj_2_rtns[index];
6912 while (p.gen > jj_gen) {
6913 if (p.next == null) { p = p.next = new JJCalls(); break; }
6916 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
6919 static final class JJCalls {