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;
65 private static VariableDeclaration[] variableDeclarationStack;
66 private static int variableDeclarationPtr;
67 private static Statement[] statementStack;
68 private static int statementPtr;
69 private static ElseIf[] elseIfStack;
70 private static int elseIfPtr;
72 public final void setFileToParse(final IFile fileToParse) {
73 this.fileToParse = fileToParse;
79 public PHPParser(final IFile fileToParse) {
80 this(new StringReader(""));
81 this.fileToParse = fileToParse;
85 * Reinitialize the parser.
87 private static final void init() {
88 nodes = new AstNode[AstStackIncrement];
89 statementStack = new Statement[AstStackIncrement];
90 elseIfStack = new ElseIf[AstStackIncrement];
98 * Add an php node on the stack.
99 * @param node the node that will be added to the stack
101 private static final void pushOnAstNodes(AstNode node) {
103 nodes[++nodePtr] = node;
104 } catch (IndexOutOfBoundsException e) {
105 int oldStackLength = nodes.length;
106 AstNode[] oldStack = nodes;
107 nodes = new AstNode[oldStackLength + AstStackIncrement];
108 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
109 nodePtr = oldStackLength;
110 nodes[nodePtr] = node;
114 private static final void pushOnVariableDeclarationStack(VariableDeclaration var) {
116 variableDeclarationStack[++variableDeclarationPtr] = var;
117 } catch (IndexOutOfBoundsException e) {
118 int oldStackLength = variableDeclarationStack.length;
119 VariableDeclaration[] oldStack = variableDeclarationStack;
120 variableDeclarationStack = new VariableDeclaration[oldStackLength + AstStackIncrement];
121 System.arraycopy(oldStack, 0, variableDeclarationStack, 0, oldStackLength);
122 variableDeclarationPtr = oldStackLength;
123 variableDeclarationStack[variableDeclarationPtr] = var;
127 private static final void pushOnStatementStack(Statement statement) {
129 statementStack[++statementPtr] = statement;
130 } catch (IndexOutOfBoundsException e) {
131 int oldStackLength = statementStack.length;
132 Statement[] oldStack = statementStack;
133 statementStack = new Statement[oldStackLength + AstStackIncrement];
134 System.arraycopy(oldStack, 0, statementStack, 0, oldStackLength);
135 statementPtr = oldStackLength;
136 statementStack[statementPtr] = statement;
140 private static final void pushOnElseIfStack(ElseIf elseIf) {
142 elseIfStack[++elseIfPtr] = elseIf;
143 } catch (IndexOutOfBoundsException e) {
144 int oldStackLength = elseIfStack.length;
145 ElseIf[] oldStack = elseIfStack;
146 elseIfStack = new ElseIf[oldStackLength + AstStackIncrement];
147 System.arraycopy(oldStack, 0, elseIfStack, 0, oldStackLength);
148 elseIfPtr = oldStackLength;
149 elseIfStack[elseIfPtr] = elseIf;
153 public static final void phpParserTester(final String strEval) throws CoreException, ParseException {
154 PHPParserTokenManager.SwitchTo(PHPParserTokenManager.PHPPARSING);
155 final StringReader stream = new StringReader(strEval);
156 if (jj_input_stream == null) {
157 jj_input_stream = new SimpleCharStream(stream, 1, 1);
159 ReInit(new StringReader(strEval));
164 public static final void htmlParserTester(final File fileName) throws CoreException, ParseException {
166 final Reader stream = new FileReader(fileName);
167 if (jj_input_stream == null) {
168 jj_input_stream = new SimpleCharStream(stream, 1, 1);
173 } catch (FileNotFoundException e) {
174 e.printStackTrace(); //To change body of catch statement use Options | File Templates.
178 public static final void htmlParserTester(final String strEval) throws CoreException, ParseException {
179 final StringReader stream = new StringReader(strEval);
180 if (jj_input_stream == null) {
181 jj_input_stream = new SimpleCharStream(stream, 1, 1);
188 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
189 currentSegment = new PHPDocument(parent);
190 outlineInfo = new PHPOutlineInfo(parent);
191 final StringReader stream = new StringReader(s);
192 if (jj_input_stream == null) {
193 jj_input_stream = new SimpleCharStream(stream, 1, 1);
199 phpDocument = new PHPDocument(null);
200 phpDocument.nodes = nodes;
201 PHPeclipsePlugin.log(1,phpDocument.toString());
202 } catch (ParseException e) {
203 processParseException(e);
209 * This method will process the parse exception.
210 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
211 * @param e the ParseException
213 private static void processParseException(final ParseException e) {
214 if (errorMessage == null) {
215 PHPeclipsePlugin.log(e);
216 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
217 errorStart = jj_input_stream.getPosition();
218 errorEnd = errorStart + 1;
225 * Create marker for the parse error
226 * @param e the ParseException
228 private static void setMarker(final ParseException e) {
230 if (errorStart == -1) {
231 setMarker(fileToParse,
233 jj_input_stream.tokenBegin,
234 jj_input_stream.tokenBegin + e.currentToken.image.length(),
236 "Line " + e.currentToken.beginLine);
238 setMarker(fileToParse,
243 "Line " + e.currentToken.beginLine);
247 } catch (CoreException e2) {
248 PHPeclipsePlugin.log(e2);
253 * Create markers according to the external parser output
255 private static void createMarkers(final String output, final IFile file) throws CoreException {
256 // delete all markers
257 file.deleteMarkers(IMarker.PROBLEM, false, 0);
262 while ((brIndx = output.indexOf("<br />", indx)) != -1) {
263 // newer php error output (tested with 4.2.3)
264 scanLine(output, file, indx, brIndx);
269 while ((brIndx = output.indexOf("<br>", indx)) != -1) {
270 // older php error output (tested with 4.2.3)
271 scanLine(output, file, indx, brIndx);
277 private static void scanLine(final String output,
280 final int brIndx) throws CoreException {
282 StringBuffer lineNumberBuffer = new StringBuffer(10);
284 current = output.substring(indx, brIndx);
286 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
287 int onLine = current.indexOf("on line <b>");
289 lineNumberBuffer.delete(0, lineNumberBuffer.length());
290 for (int i = onLine; i < current.length(); i++) {
291 ch = current.charAt(i);
292 if ('0' <= ch && '9' >= ch) {
293 lineNumberBuffer.append(ch);
297 int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
299 Hashtable attributes = new Hashtable();
301 current = current.replaceAll("\n", "");
302 current = current.replaceAll("<b>", "");
303 current = current.replaceAll("</b>", "");
304 MarkerUtilities.setMessage(attributes, current);
306 if (current.indexOf(PARSE_ERROR_STRING) != -1)
307 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
308 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
309 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
311 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
312 MarkerUtilities.setLineNumber(attributes, lineNumber);
313 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
318 public final void parse(final String s) throws CoreException {
319 final StringReader stream = new StringReader(s);
320 if (jj_input_stream == null) {
321 jj_input_stream = new SimpleCharStream(stream, 1, 1);
327 } catch (ParseException e) {
328 processParseException(e);
333 * Call the php parse command ( php -l -f <filename> )
334 * and create markers according to the external parser output
336 public static void phpExternalParse(final IFile file) {
337 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
338 final String filename = file.getLocation().toString();
340 final String[] arguments = { filename };
341 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
342 final String command = form.format(arguments);
344 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
347 // parse the buffer to find the errors and warnings
348 createMarkers(parserResult, file);
349 } catch (CoreException e) {
350 PHPeclipsePlugin.log(e);
355 * Put a new html block in the stack.
357 public static final void createNewHTMLCode() {
358 final int currentPosition = SimpleCharStream.getPosition();
359 if (currentPosition == htmlStart) {
362 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition).toCharArray();
363 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
366 private static final void parse() throws ParseException {
370 static final public void phpTest() throws ParseException {
373 PHPParser.createNewHTMLCode();
376 static final public void phpFile() throws ParseException {
380 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
418 case INTEGER_LITERAL:
419 case FLOATING_POINT_LITERAL:
435 } catch (TokenMgrError e) {
436 PHPeclipsePlugin.log(e);
437 errorStart = SimpleCharStream.getPosition();
438 errorEnd = errorStart + 1;
439 errorMessage = e.getMessage();
441 {if (true) throw generateParseException();}
446 * A php block is a <?= expression [;]?>
447 * or <?php somephpcode ?>
448 * or <? somephpcode ?>
450 static final public void PhpBlock() throws ParseException {
451 final int start = jj_input_stream.getPosition();
452 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
492 case INTEGER_LITERAL:
493 case FLOATING_POINT_LITERAL:
500 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
503 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
505 jj_consume_token(PHPSTARTLONG);
508 jj_consume_token(PHPSTARTSHORT);
510 setMarker(fileToParse,
511 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
513 jj_input_stream.getPosition(),
515 "Line " + token.beginLine);
516 } catch (CoreException e) {
517 PHPeclipsePlugin.log(e);
522 jj_consume_token(-1);
523 throw new ParseException();
532 jj_consume_token(PHPEND);
533 } catch (ParseException e) {
534 errorMessage = "'?>' expected";
536 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
537 errorEnd = jj_input_stream.getPosition() + 1;
543 jj_consume_token(-1);
544 throw new ParseException();
548 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
549 final Expression expr;
550 final int pos = SimpleCharStream.getPosition();
551 PHPEchoBlock echoBlock;
552 jj_consume_token(PHPECHOSTART);
554 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
556 jj_consume_token(SEMICOLON);
562 jj_consume_token(PHPEND);
563 echoBlock = new PHPEchoBlock(expr,pos,SimpleCharStream.getPosition());
564 pushOnAstNodes(echoBlock);
565 {if (true) return echoBlock;}
566 throw new Error("Missing return statement in function");
569 static final public void Php() throws ParseException {
572 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
606 case INTEGER_LITERAL:
607 case FLOATING_POINT_LITERAL:
624 static final public ClassDeclaration ClassDeclaration() throws ParseException {
625 final ClassDeclaration classDeclaration;
626 final Token className;
627 Token superclassName = null;
629 jj_consume_token(CLASS);
631 pos = jj_input_stream.getPosition();
632 className = jj_consume_token(IDENTIFIER);
633 } catch (ParseException e) {
634 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
636 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
637 errorEnd = jj_input_stream.getPosition() + 1;
640 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
642 jj_consume_token(EXTENDS);
644 superclassName = jj_consume_token(IDENTIFIER);
645 } catch (ParseException e) {
646 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
648 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
649 errorEnd = jj_input_stream.getPosition() + 1;
657 if (superclassName == null) {
658 classDeclaration = new ClassDeclaration(currentSegment,
659 className.image.toCharArray(),
663 classDeclaration = new ClassDeclaration(currentSegment,
664 className.image.toCharArray(),
665 superclassName.image.toCharArray(),
669 currentSegment.add(classDeclaration);
670 currentSegment = classDeclaration;
671 ClassBody(classDeclaration);
672 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
673 classDeclaration.sourceEnd = SimpleCharStream.getPosition();
674 pushOnAstNodes(classDeclaration);
675 {if (true) return classDeclaration;}
676 throw new Error("Missing return statement in function");
679 static final public void ClassBody(ClassDeclaration classDeclaration) throws ParseException {
681 jj_consume_token(LBRACE);
682 } catch (ParseException e) {
683 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "', '{' expected";
685 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
686 errorEnd = jj_input_stream.getPosition() + 1;
691 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
700 ClassBodyDeclaration(classDeclaration);
703 jj_consume_token(RBRACE);
704 } catch (ParseException e) {
705 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', 'var', 'function' or '}' expected";
707 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
708 errorEnd = jj_input_stream.getPosition() + 1;
714 * A class can contain only methods and fields.
716 static final public void ClassBodyDeclaration(ClassDeclaration classDeclaration) throws ParseException {
717 MethodDeclaration method;
718 FieldDeclaration field;
719 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
721 method = MethodDeclaration();
722 classDeclaration.addMethod(method);
725 field = FieldDeclaration();
726 classDeclaration.addVariable(field);
730 jj_consume_token(-1);
731 throw new ParseException();
736 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
738 static final public FieldDeclaration FieldDeclaration() throws ParseException {
739 VariableDeclaration variableDeclaration;
740 VariableDeclaration[] list;
741 final ArrayList arrayList = new ArrayList();
742 final int pos = SimpleCharStream.getPosition();
743 jj_consume_token(VAR);
744 variableDeclaration = VariableDeclarator();
745 arrayList.add(variableDeclaration);
746 outlineInfo.addVariable(new String(variableDeclaration.name));
747 currentSegment.add(variableDeclaration);
750 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
758 jj_consume_token(COMMA);
759 variableDeclaration = VariableDeclarator();
760 arrayList.add(variableDeclaration);
761 outlineInfo.addVariable(new String(variableDeclaration.name));
762 currentSegment.add(variableDeclaration);
765 jj_consume_token(SEMICOLON);
766 } catch (ParseException e) {
767 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
769 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
770 errorEnd = jj_input_stream.getPosition() + 1;
773 list = new VariableDeclaration[arrayList.size()];
774 arrayList.toArray(list);
775 {if (true) return new FieldDeclaration(list,
777 SimpleCharStream.getPosition());}
778 throw new Error("Missing return statement in function");
781 static final public VariableDeclaration VariableDeclarator() throws ParseException {
782 final String varName, varValue;
783 Expression initializer = null;
784 final int pos = jj_input_stream.getPosition();
785 varName = VariableDeclaratorId();
786 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
788 jj_consume_token(ASSIGN);
790 initializer = VariableInitializer();
791 } catch (ParseException e) {
792 errorMessage = "Literal expression expected in variable initializer";
794 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
795 errorEnd = jj_input_stream.getPosition() + 1;
803 if (initializer == null) {
804 {if (true) return new VariableDeclaration(currentSegment,
805 varName.toCharArray(),
807 jj_input_stream.getPosition());}
809 {if (true) return new VariableDeclaration(currentSegment,
810 varName.toCharArray(),
813 throw new Error("Missing return statement in function");
818 * @return the variable name (with suffix)
820 static final public String VariableDeclaratorId() throws ParseException {
822 Expression expression;
823 final StringBuffer buff = new StringBuffer();
824 final int pos = SimpleCharStream.getPosition();
825 ConstantIdentifier ex;
836 ex = new ConstantIdentifier(expr.toCharArray(),
838 SimpleCharStream.getPosition());
839 expression = VariableSuffix(ex);
840 buff.append(expression.toStringExpression());
842 {if (true) return buff.toString();}
843 } catch (ParseException e) {
844 errorMessage = "'$' expected for variable identifier";
846 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
847 errorEnd = jj_input_stream.getPosition() + 1;
850 throw new Error("Missing return statement in function");
853 static final public String Variable() throws ParseException {
854 final StringBuffer buff;
855 Expression expression = null;
858 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
860 token = jj_consume_token(DOLLAR_ID);
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 && !assigning) {
872 {if (true) return token.image.substring(1);}
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 {if (true) return expr;}
887 jj_consume_token(-1);
888 throw new ParseException();
890 throw new Error("Missing return statement in function");
893 static final public String VariableName() throws ParseException {
894 final StringBuffer buff;
896 Expression expression = null;
898 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
900 jj_consume_token(LBRACE);
901 expression = Expression();
902 jj_consume_token(RBRACE);
903 buff = new StringBuffer('{');
904 buff.append(expression.toStringExpression());
906 {if (true) return buff.toString();}
909 token = jj_consume_token(IDENTIFIER);
910 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
912 jj_consume_token(LBRACE);
913 expression = Expression();
914 jj_consume_token(RBRACE);
920 if (expression == null) {
921 {if (true) return token.image;}
923 buff = new StringBuffer(token.image);
925 buff.append(expression.toStringExpression());
927 {if (true) return buff.toString();}
930 jj_consume_token(DOLLAR);
931 expr = VariableName();
932 buff = new StringBuffer('$');
934 {if (true) return buff.toString();}
937 token = jj_consume_token(DOLLAR_ID);
938 {if (true) return token.image;}
942 jj_consume_token(-1);
943 throw new ParseException();
945 throw new Error("Missing return statement in function");
948 static final public Expression VariableInitializer() throws ParseException {
949 final Expression expr;
951 final int pos = SimpleCharStream.getPosition();
952 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
956 case INTEGER_LITERAL:
957 case FLOATING_POINT_LITERAL:
960 {if (true) return expr;}
963 jj_consume_token(MINUS);
964 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
965 case INTEGER_LITERAL:
966 token = jj_consume_token(INTEGER_LITERAL);
968 case FLOATING_POINT_LITERAL:
969 token = jj_consume_token(FLOATING_POINT_LITERAL);
973 jj_consume_token(-1);
974 throw new ParseException();
976 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
978 SimpleCharStream.getPosition()),
983 jj_consume_token(PLUS);
984 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
985 case INTEGER_LITERAL:
986 token = jj_consume_token(INTEGER_LITERAL);
988 case FLOATING_POINT_LITERAL:
989 token = jj_consume_token(FLOATING_POINT_LITERAL);
993 jj_consume_token(-1);
994 throw new ParseException();
996 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
998 SimpleCharStream.getPosition()),
1003 expr = ArrayDeclarator();
1004 {if (true) return expr;}
1007 token = jj_consume_token(IDENTIFIER);
1008 {if (true) return new ConstantIdentifier(token.image.toCharArray(),pos,SimpleCharStream.getPosition());}
1011 jj_la1[17] = jj_gen;
1012 jj_consume_token(-1);
1013 throw new ParseException();
1015 throw new Error("Missing return statement in function");
1018 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
1019 Expression expr,expr2;
1020 expr = Expression();
1021 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1023 jj_consume_token(ARRAYASSIGN);
1024 expr2 = Expression();
1025 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
1028 jj_la1[18] = jj_gen;
1031 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
1032 throw new Error("Missing return statement in function");
1035 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
1036 ArrayVariableDeclaration expr;
1037 final ArrayList list = new ArrayList();
1038 jj_consume_token(LPAREN);
1039 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1055 case INTEGER_LITERAL:
1056 case FLOATING_POINT_LITERAL:
1057 case STRING_LITERAL:
1061 expr = ArrayVariable();
1070 jj_consume_token(COMMA);
1071 expr = ArrayVariable();
1076 jj_la1[19] = jj_gen;
1079 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1081 jj_consume_token(COMMA);
1085 jj_la1[20] = jj_gen;
1088 jj_consume_token(RPAREN);
1089 ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1091 {if (true) return vars;}
1092 throw new Error("Missing return statement in function");
1096 * A Method Declaration.
1097 * <b>function</b> MetodDeclarator() Block()
1099 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1100 final MethodDeclaration functionDeclaration;
1101 Token functionToken;
1103 functionToken = jj_consume_token(FUNCTION);
1105 functionDeclaration = MethodDeclarator();
1106 outlineInfo.addVariable(new String(functionDeclaration.name));
1107 } catch (ParseException e) {
1108 if (errorMessage != null) {if (true) throw e;}
1109 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1111 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1112 errorEnd = jj_input_stream.getPosition() + 1;
1113 {if (true) throw e;}
1115 if (currentSegment != null) {
1116 currentSegment.add(functionDeclaration);
1117 currentSegment = functionDeclaration;
1119 currentFunction = functionDeclaration;
1121 functionDeclaration.statements = block.statements;
1122 currentFunction = null;
1123 if (currentSegment != null) {
1124 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
1126 {if (true) return functionDeclaration;}
1127 throw new Error("Missing return statement in function");
1131 * A MethodDeclarator.
1132 * [&] IDENTIFIER(parameters ...).
1133 * @return a function description for the outline
1135 static final public MethodDeclaration MethodDeclarator() throws ParseException {
1136 final Token identifier;
1137 Token reference = null;
1138 final Hashtable formalParameters;
1139 final int pos = SimpleCharStream.getPosition();
1140 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1142 reference = jj_consume_token(BIT_AND);
1145 jj_la1[21] = jj_gen;
1148 identifier = jj_consume_token(IDENTIFIER);
1149 formalParameters = FormalParameters();
1150 {if (true) return new MethodDeclaration(currentSegment,
1151 identifier.image.toCharArray(),
1155 SimpleCharStream.getPosition());}
1156 throw new Error("Missing return statement in function");
1160 * FormalParameters follows method identifier.
1161 * (FormalParameter())
1163 static final public Hashtable FormalParameters() throws ParseException {
1165 final StringBuffer buff = new StringBuffer("(");
1166 VariableDeclaration var;
1167 final Hashtable parameters = new Hashtable();
1169 jj_consume_token(LPAREN);
1170 } catch (ParseException e) {
1171 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1173 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1174 errorEnd = jj_input_stream.getPosition() + 1;
1175 {if (true) throw e;}
1177 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1181 var = FormalParameter();
1182 parameters.put(new String(var.name),var);
1185 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1190 jj_la1[22] = jj_gen;
1193 jj_consume_token(COMMA);
1194 var = FormalParameter();
1195 parameters.put(new String(var.name),var);
1199 jj_la1[23] = jj_gen;
1203 jj_consume_token(RPAREN);
1204 } catch (ParseException e) {
1205 errorMessage = "')' expected";
1207 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1208 errorEnd = jj_input_stream.getPosition() + 1;
1209 {if (true) throw e;}
1211 {if (true) return parameters;}
1212 throw new Error("Missing return statement in function");
1216 * A formal parameter.
1217 * $varname[=value] (,$varname[=value])
1219 static final public VariableDeclaration FormalParameter() throws ParseException {
1220 final VariableDeclaration variableDeclaration;
1222 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1224 token = jj_consume_token(BIT_AND);
1227 jj_la1[24] = jj_gen;
1230 variableDeclaration = VariableDeclarator();
1231 if (token != null) {
1232 variableDeclaration.setReference(true);
1234 {if (true) return variableDeclaration;}
1235 throw new Error("Missing return statement in function");
1238 static final public ConstantIdentifier Type() throws ParseException {
1240 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1242 jj_consume_token(STRING);
1243 pos = SimpleCharStream.getPosition();
1244 {if (true) return new ConstantIdentifier(Types.STRING,
1248 jj_consume_token(BOOL);
1249 pos = SimpleCharStream.getPosition();
1250 {if (true) return new ConstantIdentifier(Types.BOOL,
1254 jj_consume_token(BOOLEAN);
1255 pos = SimpleCharStream.getPosition();
1256 {if (true) return new ConstantIdentifier(Types.BOOLEAN,
1260 jj_consume_token(REAL);
1261 pos = SimpleCharStream.getPosition();
1262 {if (true) return new ConstantIdentifier(Types.REAL,
1266 jj_consume_token(DOUBLE);
1267 pos = SimpleCharStream.getPosition();
1268 {if (true) return new ConstantIdentifier(Types.DOUBLE,
1272 jj_consume_token(FLOAT);
1273 pos = SimpleCharStream.getPosition();
1274 {if (true) return new ConstantIdentifier(Types.FLOAT,
1278 jj_consume_token(INT);
1279 pos = SimpleCharStream.getPosition();
1280 {if (true) return new ConstantIdentifier(Types.INT,
1284 jj_consume_token(INTEGER);
1285 pos = SimpleCharStream.getPosition();
1286 {if (true) return new ConstantIdentifier(Types.INTEGER,
1290 jj_consume_token(OBJECT);
1291 pos = SimpleCharStream.getPosition();
1292 {if (true) return new ConstantIdentifier(Types.OBJECT,
1296 jj_la1[25] = jj_gen;
1297 jj_consume_token(-1);
1298 throw new ParseException();
1300 throw new Error("Missing return statement in function");
1303 static final public Expression Expression() throws ParseException {
1304 final Expression expr;
1305 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1307 expr = PrintExpression();
1308 {if (true) return expr;}
1311 expr = ListExpression();
1312 {if (true) return expr;}
1315 jj_la1[26] = jj_gen;
1316 if (jj_2_3(2147483647)) {
1317 expr = varAssignation();
1318 {if (true) return expr;}
1320 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1334 case INTEGER_LITERAL:
1335 case FLOATING_POINT_LITERAL:
1336 case STRING_LITERAL:
1340 expr = ConditionalExpression();
1341 {if (true) return expr;}
1344 jj_la1[27] = jj_gen;
1345 jj_consume_token(-1);
1346 throw new ParseException();
1350 throw new Error("Missing return statement in function");
1354 * A Variable assignation.
1355 * varName (an assign operator) any expression
1357 static final public VarAssignation varAssignation() throws ParseException {
1359 final Expression expression;
1360 final int assignOperator;
1361 final int pos = SimpleCharStream.getPosition();
1362 varName = VariableDeclaratorId();
1363 assignOperator = AssignmentOperator();
1365 expression = Expression();
1366 } catch (ParseException e) {
1367 if (errorMessage != null) {
1368 {if (true) throw e;}
1370 errorMessage = "expression expected";
1372 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1373 errorEnd = jj_input_stream.getPosition() + 1;
1374 {if (true) throw e;}
1376 {if (true) return new VarAssignation(varName.toCharArray(),
1380 SimpleCharStream.getPosition());}
1381 throw new Error("Missing return statement in function");
1384 static final public int AssignmentOperator() throws ParseException {
1385 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1387 jj_consume_token(ASSIGN);
1388 {if (true) return VarAssignation.EQUAL;}
1391 jj_consume_token(STARASSIGN);
1392 {if (true) return VarAssignation.STAR_EQUAL;}
1395 jj_consume_token(SLASHASSIGN);
1396 {if (true) return VarAssignation.SLASH_EQUAL;}
1399 jj_consume_token(REMASSIGN);
1400 {if (true) return VarAssignation.REM_EQUAL;}
1403 jj_consume_token(PLUSASSIGN);
1404 {if (true) return VarAssignation.PLUS_EQUAL;}
1407 jj_consume_token(MINUSASSIGN);
1408 {if (true) return VarAssignation.MINUS_EQUAL;}
1411 jj_consume_token(LSHIFTASSIGN);
1412 {if (true) return VarAssignation.LSHIFT_EQUAL;}
1414 case RSIGNEDSHIFTASSIGN:
1415 jj_consume_token(RSIGNEDSHIFTASSIGN);
1416 {if (true) return VarAssignation.RSIGNEDSHIFT_EQUAL;}
1419 jj_consume_token(ANDASSIGN);
1420 {if (true) return VarAssignation.AND_EQUAL;}
1423 jj_consume_token(XORASSIGN);
1424 {if (true) return VarAssignation.XOR_EQUAL;}
1427 jj_consume_token(ORASSIGN);
1428 {if (true) return VarAssignation.OR_EQUAL;}
1431 jj_consume_token(DOTASSIGN);
1432 {if (true) return VarAssignation.DOT_EQUAL;}
1435 jj_consume_token(TILDEEQUAL);
1436 {if (true) return VarAssignation.TILDE_EQUAL;}
1439 jj_la1[28] = jj_gen;
1440 jj_consume_token(-1);
1441 throw new ParseException();
1443 throw new Error("Missing return statement in function");
1446 static final public Expression ConditionalExpression() throws ParseException {
1447 final Expression expr;
1448 Expression expr2 = null;
1449 Expression expr3 = null;
1450 expr = ConditionalOrExpression();
1451 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1453 jj_consume_token(HOOK);
1454 expr2 = Expression();
1455 jj_consume_token(COLON);
1456 expr3 = ConditionalExpression();
1459 jj_la1[29] = jj_gen;
1462 if (expr3 == null) {
1463 {if (true) return expr;}
1465 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1466 throw new Error("Missing return statement in function");
1469 static final public Expression ConditionalOrExpression() throws ParseException {
1470 Expression expr,expr2;
1472 expr = ConditionalAndExpression();
1475 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1481 jj_la1[30] = jj_gen;
1484 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1486 jj_consume_token(OR_OR);
1487 operator = OperatorIds.OR_OR;
1490 jj_consume_token(_ORL);
1491 operator = OperatorIds.ORL;
1494 jj_la1[31] = jj_gen;
1495 jj_consume_token(-1);
1496 throw new ParseException();
1498 expr2 = ConditionalAndExpression();
1499 expr = new BinaryExpression(expr,expr2,operator);
1501 {if (true) return expr;}
1502 throw new Error("Missing return statement in function");
1505 static final public Expression ConditionalAndExpression() throws ParseException {
1506 Expression expr,expr2;
1508 expr = ConcatExpression();
1511 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1517 jj_la1[32] = jj_gen;
1520 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1522 jj_consume_token(AND_AND);
1523 operator = OperatorIds.AND_AND;
1526 jj_consume_token(_ANDL);
1527 operator = OperatorIds.ANDL;
1530 jj_la1[33] = jj_gen;
1531 jj_consume_token(-1);
1532 throw new ParseException();
1534 expr2 = ConcatExpression();
1535 expr = new BinaryExpression(expr,expr2,operator);
1537 {if (true) return expr;}
1538 throw new Error("Missing return statement in function");
1541 static final public Expression ConcatExpression() throws ParseException {
1542 Expression expr,expr2;
1543 expr = InclusiveOrExpression();
1546 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1551 jj_la1[34] = jj_gen;
1554 jj_consume_token(DOT);
1555 expr2 = InclusiveOrExpression();
1556 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1558 {if (true) return expr;}
1559 throw new Error("Missing return statement in function");
1562 static final public Expression InclusiveOrExpression() throws ParseException {
1563 Expression expr,expr2;
1564 expr = ExclusiveOrExpression();
1567 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1572 jj_la1[35] = jj_gen;
1575 jj_consume_token(BIT_OR);
1576 expr2 = ExclusiveOrExpression();
1577 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1579 {if (true) return expr;}
1580 throw new Error("Missing return statement in function");
1583 static final public Expression ExclusiveOrExpression() throws ParseException {
1584 Expression expr,expr2;
1585 expr = AndExpression();
1588 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1593 jj_la1[36] = jj_gen;
1596 jj_consume_token(XOR);
1597 expr2 = AndExpression();
1598 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1600 {if (true) return expr;}
1601 throw new Error("Missing return statement in function");
1604 static final public Expression AndExpression() throws ParseException {
1605 Expression expr,expr2;
1606 expr = EqualityExpression();
1609 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1614 jj_la1[37] = jj_gen;
1617 jj_consume_token(BIT_AND);
1618 expr2 = EqualityExpression();
1619 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1621 {if (true) return expr;}
1622 throw new Error("Missing return statement in function");
1625 static final public Expression EqualityExpression() throws ParseException {
1626 Expression expr,expr2;
1628 expr = RelationalExpression();
1631 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1635 case BANGDOUBLEEQUAL:
1640 jj_la1[38] = jj_gen;
1643 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1645 jj_consume_token(EQUAL_EQUAL);
1646 operator = OperatorIds.EQUAL_EQUAL;
1649 jj_consume_token(DIF);
1650 operator = OperatorIds.DIF;
1653 jj_consume_token(NOT_EQUAL);
1654 operator = OperatorIds.DIF;
1656 case BANGDOUBLEEQUAL:
1657 jj_consume_token(BANGDOUBLEEQUAL);
1658 operator = OperatorIds.BANG_EQUAL_EQUAL;
1661 jj_consume_token(TRIPLEEQUAL);
1662 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1665 jj_la1[39] = jj_gen;
1666 jj_consume_token(-1);
1667 throw new ParseException();
1670 expr2 = RelationalExpression();
1671 } catch (ParseException e) {
1672 if (errorMessage != null) {
1673 {if (true) throw e;}
1675 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1677 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1678 errorEnd = jj_input_stream.getPosition() + 1;
1679 {if (true) throw e;}
1681 expr = new BinaryExpression(expr,expr2,operator);
1683 {if (true) return expr;}
1684 throw new Error("Missing return statement in function");
1687 static final public Expression RelationalExpression() throws ParseException {
1688 Expression expr,expr2;
1690 expr = ShiftExpression();
1693 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1701 jj_la1[40] = jj_gen;
1704 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1706 jj_consume_token(LT);
1707 operator = OperatorIds.LESS;
1710 jj_consume_token(GT);
1711 operator = OperatorIds.GREATER;
1714 jj_consume_token(LE);
1715 operator = OperatorIds.LESS_EQUAL;
1718 jj_consume_token(GE);
1719 operator = OperatorIds.GREATER_EQUAL;
1722 jj_la1[41] = jj_gen;
1723 jj_consume_token(-1);
1724 throw new ParseException();
1726 expr2 = ShiftExpression();
1727 expr = new BinaryExpression(expr,expr2,operator);
1729 {if (true) return expr;}
1730 throw new Error("Missing return statement in function");
1733 static final public Expression ShiftExpression() throws ParseException {
1734 Expression expr,expr2;
1736 expr = AdditiveExpression();
1739 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1742 case RUNSIGNEDSHIFT:
1746 jj_la1[42] = jj_gen;
1749 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1751 jj_consume_token(LSHIFT);
1752 operator = OperatorIds.LEFT_SHIFT;
1755 jj_consume_token(RSIGNEDSHIFT);
1756 operator = OperatorIds.RIGHT_SHIFT;
1758 case RUNSIGNEDSHIFT:
1759 jj_consume_token(RUNSIGNEDSHIFT);
1760 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1763 jj_la1[43] = jj_gen;
1764 jj_consume_token(-1);
1765 throw new ParseException();
1767 expr2 = AdditiveExpression();
1768 expr = new BinaryExpression(expr,expr2,operator);
1770 {if (true) return expr;}
1771 throw new Error("Missing return statement in function");
1774 static final public Expression AdditiveExpression() throws ParseException {
1775 Expression expr,expr2;
1777 expr = MultiplicativeExpression();
1780 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1786 jj_la1[44] = jj_gen;
1789 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1791 jj_consume_token(PLUS);
1792 operator = OperatorIds.PLUS;
1795 jj_consume_token(MINUS);
1796 operator = OperatorIds.MINUS;
1799 jj_la1[45] = jj_gen;
1800 jj_consume_token(-1);
1801 throw new ParseException();
1803 expr2 = MultiplicativeExpression();
1804 expr = new BinaryExpression(expr,expr2,operator);
1806 {if (true) return expr;}
1807 throw new Error("Missing return statement in function");
1810 static final public Expression MultiplicativeExpression() throws ParseException {
1811 Expression expr,expr2;
1814 expr = UnaryExpression();
1815 } catch (ParseException e) {
1816 if (errorMessage != null) {if (true) throw e;}
1817 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1819 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1820 errorEnd = jj_input_stream.getPosition() + 1;
1821 {if (true) throw e;}
1825 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1832 jj_la1[46] = jj_gen;
1835 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1837 jj_consume_token(STAR);
1838 operator = OperatorIds.MULTIPLY;
1841 jj_consume_token(SLASH);
1842 operator = OperatorIds.DIVIDE;
1845 jj_consume_token(REMAINDER);
1846 operator = OperatorIds.REMAINDER;
1849 jj_la1[47] = jj_gen;
1850 jj_consume_token(-1);
1851 throw new ParseException();
1853 expr2 = UnaryExpression();
1854 expr = new BinaryExpression(expr,expr2,operator);
1856 {if (true) return expr;}
1857 throw new Error("Missing return statement in function");
1861 * An unary expression starting with @, & or nothing
1863 static final public Expression UnaryExpression() throws ParseException {
1865 final int pos = SimpleCharStream.getPosition();
1866 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1868 jj_consume_token(BIT_AND);
1869 expr = UnaryExpressionNoPrefix();
1870 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1884 case INTEGER_LITERAL:
1885 case FLOATING_POINT_LITERAL:
1886 case STRING_LITERAL:
1890 expr = AtUnaryExpression();
1891 {if (true) return expr;}
1894 jj_la1[48] = jj_gen;
1895 jj_consume_token(-1);
1896 throw new ParseException();
1898 throw new Error("Missing return statement in function");
1901 static final public Expression AtUnaryExpression() throws ParseException {
1903 final int pos = SimpleCharStream.getPosition();
1904 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1906 jj_consume_token(AT);
1907 expr = AtUnaryExpression();
1908 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,pos);}
1921 case INTEGER_LITERAL:
1922 case FLOATING_POINT_LITERAL:
1923 case STRING_LITERAL:
1927 expr = UnaryExpressionNoPrefix();
1928 {if (true) return expr;}
1931 jj_la1[49] = jj_gen;
1932 jj_consume_token(-1);
1933 throw new ParseException();
1935 throw new Error("Missing return statement in function");
1938 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
1941 final int pos = SimpleCharStream.getPosition();
1942 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1945 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1947 jj_consume_token(PLUS);
1948 operator = OperatorIds.PLUS;
1951 jj_consume_token(MINUS);
1952 operator = OperatorIds.MINUS;
1955 jj_la1[50] = jj_gen;
1956 jj_consume_token(-1);
1957 throw new ParseException();
1959 expr = UnaryExpression();
1960 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1964 expr = PreIncDecExpression();
1965 {if (true) return expr;}
1974 case INTEGER_LITERAL:
1975 case FLOATING_POINT_LITERAL:
1976 case STRING_LITERAL:
1980 expr = UnaryExpressionNotPlusMinus();
1981 {if (true) return expr;}
1984 jj_la1[51] = jj_gen;
1985 jj_consume_token(-1);
1986 throw new ParseException();
1988 throw new Error("Missing return statement in function");
1991 static final public Expression PreIncDecExpression() throws ParseException {
1992 final Expression expr;
1994 final int pos = SimpleCharStream.getPosition();
1995 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1997 jj_consume_token(INCR);
1998 operator = OperatorIds.PLUS_PLUS;
2001 jj_consume_token(DECR);
2002 operator = OperatorIds.MINUS_MINUS;
2005 jj_la1[52] = jj_gen;
2006 jj_consume_token(-1);
2007 throw new ParseException();
2009 expr = PrimaryExpression();
2010 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
2011 throw new Error("Missing return statement in function");
2014 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
2016 final int pos = SimpleCharStream.getPosition();
2017 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2019 jj_consume_token(BANG);
2020 expr = UnaryExpression();
2021 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
2024 jj_la1[53] = jj_gen;
2025 if (jj_2_4(2147483647)) {
2026 expr = CastExpression();
2027 {if (true) return expr;}
2029 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2035 expr = PostfixExpression();
2036 {if (true) return expr;}
2041 case INTEGER_LITERAL:
2042 case FLOATING_POINT_LITERAL:
2043 case STRING_LITERAL:
2045 {if (true) return expr;}
2048 jj_consume_token(LPAREN);
2049 expr = Expression();
2051 jj_consume_token(RPAREN);
2052 } catch (ParseException e) {
2053 errorMessage = "')' expected";
2055 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2056 errorEnd = jj_input_stream.getPosition() + 1;
2057 {if (true) throw e;}
2059 {if (true) return expr;}
2062 jj_la1[54] = jj_gen;
2063 jj_consume_token(-1);
2064 throw new ParseException();
2068 throw new Error("Missing return statement in function");
2071 static final public CastExpression CastExpression() throws ParseException {
2072 final ConstantIdentifier type;
2073 final Expression expr;
2074 final int pos = SimpleCharStream.getPosition();
2075 jj_consume_token(LPAREN);
2076 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2089 jj_consume_token(ARRAY);
2090 type = new ConstantIdentifier(Types.ARRAY,pos,SimpleCharStream.getPosition());
2093 jj_la1[55] = jj_gen;
2094 jj_consume_token(-1);
2095 throw new ParseException();
2097 jj_consume_token(RPAREN);
2098 expr = UnaryExpression();
2099 {if (true) return new CastExpression(type,expr,pos,SimpleCharStream.getPosition());}
2100 throw new Error("Missing return statement in function");
2103 static final public Expression PostfixExpression() throws ParseException {
2106 final int pos = SimpleCharStream.getPosition();
2107 expr = PrimaryExpression();
2108 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2111 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2113 jj_consume_token(INCR);
2114 operator = OperatorIds.PLUS_PLUS;
2117 jj_consume_token(DECR);
2118 operator = OperatorIds.MINUS_MINUS;
2121 jj_la1[56] = jj_gen;
2122 jj_consume_token(-1);
2123 throw new ParseException();
2127 jj_la1[57] = jj_gen;
2130 if (operator == -1) {
2131 {if (true) return expr;}
2133 {if (true) return new PostfixedUnaryExpression(expr,operator,pos);}
2134 throw new Error("Missing return statement in function");
2137 static final public Expression PrimaryExpression() throws ParseException {
2138 final Token identifier;
2140 final StringBuffer buff = new StringBuffer();
2141 final int pos = SimpleCharStream.getPosition();
2143 identifier = jj_consume_token(IDENTIFIER);
2144 jj_consume_token(STATICCLASSACCESS);
2145 expr = ClassIdentifier();
2146 expr = new ClassAccess(new ConstantIdentifier(identifier.image.toCharArray(),
2148 SimpleCharStream.getPosition()),
2150 ClassAccess.STATIC);
2153 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2160 jj_la1[58] = jj_gen;
2163 expr = PrimarySuffix(expr);
2165 {if (true) return expr;}
2167 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2172 expr = PrimaryPrefix();
2175 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2182 jj_la1[59] = jj_gen;
2185 expr = PrimarySuffix(expr);
2187 {if (true) return expr;}
2190 expr = ArrayDeclarator();
2191 {if (true) return expr;}
2194 jj_la1[60] = jj_gen;
2195 jj_consume_token(-1);
2196 throw new ParseException();
2199 throw new Error("Missing return statement in function");
2202 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2203 final ArrayVariableDeclaration[] vars;
2204 final int pos = SimpleCharStream.getPosition();
2205 jj_consume_token(ARRAY);
2206 vars = ArrayInitializer();
2207 {if (true) return new ArrayInitializer(vars,pos,SimpleCharStream.getPosition());}
2208 throw new Error("Missing return statement in function");
2211 static final public Expression PrimaryPrefix() throws ParseException {
2212 final Expression expr;
2215 final int pos = SimpleCharStream.getPosition();
2216 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2218 token = jj_consume_token(IDENTIFIER);
2219 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2221 SimpleCharStream.getPosition());}
2224 jj_consume_token(NEW);
2225 expr = ClassIdentifier();
2226 {if (true) return new PrefixedUnaryExpression(expr,
2232 var = VariableDeclaratorId();
2233 {if (true) return new ConstantIdentifier(var.toCharArray(),
2235 SimpleCharStream.getPosition());}
2238 jj_la1[61] = jj_gen;
2239 jj_consume_token(-1);
2240 throw new ParseException();
2242 throw new Error("Missing return statement in function");
2245 static final public PrefixedUnaryExpression classInstantiation() throws ParseException {
2247 final StringBuffer buff;
2248 final int pos = SimpleCharStream.getPosition();
2249 jj_consume_token(NEW);
2250 expr = ClassIdentifier();
2251 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2257 buff = new StringBuffer(expr.toStringExpression());
2258 expr = PrimaryExpression();
2259 buff.append(expr.toStringExpression());
2260 expr = new ConstantIdentifier(buff.toString().toCharArray(),
2262 SimpleCharStream.getPosition());
2265 jj_la1[62] = jj_gen;
2268 {if (true) return new PrefixedUnaryExpression(expr,
2271 throw new Error("Missing return statement in function");
2274 static final public ConstantIdentifier ClassIdentifier() throws ParseException {
2277 final int pos = SimpleCharStream.getPosition();
2278 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2280 token = jj_consume_token(IDENTIFIER);
2281 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2283 SimpleCharStream.getPosition());}
2287 expr = VariableDeclaratorId();
2288 {if (true) return new ConstantIdentifier(expr.toCharArray(),
2290 SimpleCharStream.getPosition());}
2293 jj_la1[63] = jj_gen;
2294 jj_consume_token(-1);
2295 throw new ParseException();
2297 throw new Error("Missing return statement in function");
2300 static final public AbstractSuffixExpression PrimarySuffix(Expression prefix) throws ParseException {
2301 final AbstractSuffixExpression expr;
2302 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2304 expr = Arguments(prefix);
2305 {if (true) return expr;}
2309 expr = VariableSuffix(prefix);
2310 {if (true) return expr;}
2313 jj_la1[64] = jj_gen;
2314 jj_consume_token(-1);
2315 throw new ParseException();
2317 throw new Error("Missing return statement in function");
2320 static final public AbstractSuffixExpression VariableSuffix(Expression prefix) throws ParseException {
2322 final int pos = SimpleCharStream.getPosition();
2323 Expression expression = null;
2324 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2326 jj_consume_token(CLASSACCESS);
2328 expr = VariableName();
2329 } catch (ParseException e) {
2330 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2332 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2333 errorEnd = jj_input_stream.getPosition() + 1;
2334 {if (true) throw e;}
2336 {if (true) return new ClassAccess(prefix,
2337 new ConstantIdentifier(expr.toCharArray(),pos,SimpleCharStream.getPosition()),
2338 ClassAccess.NORMAL);}
2341 jj_consume_token(LBRACKET);
2342 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2367 case INTEGER_LITERAL:
2368 case FLOATING_POINT_LITERAL:
2369 case STRING_LITERAL:
2373 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2389 case INTEGER_LITERAL:
2390 case FLOATING_POINT_LITERAL:
2391 case STRING_LITERAL:
2395 expression = Expression();
2406 expression = Type();
2409 jj_la1[65] = jj_gen;
2410 jj_consume_token(-1);
2411 throw new ParseException();
2415 jj_la1[66] = jj_gen;
2419 jj_consume_token(RBRACKET);
2420 } catch (ParseException e) {
2421 errorMessage = "']' expected";
2423 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2424 errorEnd = jj_input_stream.getPosition() + 1;
2425 {if (true) throw e;}
2427 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2430 jj_la1[67] = jj_gen;
2431 jj_consume_token(-1);
2432 throw new ParseException();
2434 throw new Error("Missing return statement in function");
2437 static final public Literal Literal() throws ParseException {
2440 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2441 case INTEGER_LITERAL:
2442 token = jj_consume_token(INTEGER_LITERAL);
2443 pos = SimpleCharStream.getPosition();
2444 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2446 case FLOATING_POINT_LITERAL:
2447 token = jj_consume_token(FLOATING_POINT_LITERAL);
2448 pos = SimpleCharStream.getPosition();
2449 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2451 case STRING_LITERAL:
2452 token = jj_consume_token(STRING_LITERAL);
2453 pos = SimpleCharStream.getPosition();
2454 {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length());}
2457 jj_consume_token(TRUE);
2458 pos = SimpleCharStream.getPosition();
2459 {if (true) return new TrueLiteral(pos-4,pos);}
2462 jj_consume_token(FALSE);
2463 pos = SimpleCharStream.getPosition();
2464 {if (true) return new FalseLiteral(pos-4,pos);}
2467 jj_consume_token(NULL);
2468 pos = SimpleCharStream.getPosition();
2469 {if (true) return new NullLiteral(pos-4,pos);}
2472 jj_la1[68] = jj_gen;
2473 jj_consume_token(-1);
2474 throw new ParseException();
2476 throw new Error("Missing return statement in function");
2479 static final public FunctionCall Arguments(Expression func) throws ParseException {
2480 Expression[] args = null;
2481 jj_consume_token(LPAREN);
2482 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2498 case INTEGER_LITERAL:
2499 case FLOATING_POINT_LITERAL:
2500 case STRING_LITERAL:
2504 args = ArgumentList();
2507 jj_la1[69] = jj_gen;
2511 jj_consume_token(RPAREN);
2512 } catch (ParseException e) {
2513 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2515 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2516 errorEnd = jj_input_stream.getPosition() + 1;
2517 {if (true) throw e;}
2519 {if (true) return new FunctionCall(func,args,SimpleCharStream.getPosition());}
2520 throw new Error("Missing return statement in function");
2524 * An argument list is a list of arguments separated by comma :
2525 * argumentDeclaration() (, argumentDeclaration)*
2526 * @return an array of arguments
2528 static final public Expression[] ArgumentList() throws ParseException {
2530 final ArrayList list = new ArrayList();
2535 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2540 jj_la1[70] = jj_gen;
2543 jj_consume_token(COMMA);
2547 } catch (ParseException e) {
2548 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2550 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2551 errorEnd = jj_input_stream.getPosition() + 1;
2552 {if (true) throw e;}
2555 Expression[] arguments = new Expression[list.size()];
2556 list.toArray(arguments);
2557 {if (true) return arguments;}
2558 throw new Error("Missing return statement in function");
2562 * A Statement without break.
2564 static final public Statement StatementNoBreak() throws ParseException {
2565 final Statement statement;
2568 statement = Expression();
2570 jj_consume_token(SEMICOLON);
2571 } catch (ParseException e) {
2572 if (e.currentToken.next.kind != 4) {
2573 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2575 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2576 errorEnd = jj_input_stream.getPosition() + 1;
2577 {if (true) throw e;}
2580 {if (true) return statement;}
2581 } else if (jj_2_7(2)) {
2582 statement = LabeledStatement();
2583 {if (true) return statement;}
2585 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2587 statement = Block();
2588 {if (true) return statement;}
2591 statement = EmptyStatement();
2592 {if (true) return statement;}
2601 statement = StatementExpression();
2603 jj_consume_token(SEMICOLON);
2604 } catch (ParseException e) {
2605 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2607 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2608 errorEnd = jj_input_stream.getPosition() + 1;
2609 {if (true) throw e;}
2611 {if (true) return statement;}
2614 statement = SwitchStatement();
2615 {if (true) return statement;}
2618 statement = IfStatement();
2619 {if (true) return statement;}
2622 statement = WhileStatement();
2623 {if (true) return statement;}
2626 statement = DoStatement();
2627 {if (true) return statement;}
2630 statement = ForStatement();
2631 {if (true) return statement;}
2634 statement = ForeachStatement();
2635 {if (true) return statement;}
2638 statement = ContinueStatement();
2639 {if (true) return statement;}
2642 statement = ReturnStatement();
2643 {if (true) return statement;}
2646 statement = EchoStatement();
2647 {if (true) return statement;}
2654 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2656 token = jj_consume_token(AT);
2659 jj_la1[71] = jj_gen;
2662 statement = IncludeStatement();
2663 if (token != null) {
2664 ((InclusionStatement)statement).silent = true;
2666 {if (true) return statement;}
2669 statement = StaticStatement();
2670 {if (true) return statement;}
2673 statement = GlobalStatement();
2674 {if (true) return statement;}
2677 jj_la1[72] = jj_gen;
2678 jj_consume_token(-1);
2679 throw new ParseException();
2682 throw new Error("Missing return statement in function");
2686 * A Normal statement.
2688 static final public Statement Statement() throws ParseException {
2689 final Statement statement;
2690 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2721 case INTEGER_LITERAL:
2722 case FLOATING_POINT_LITERAL:
2723 case STRING_LITERAL:
2729 statement = StatementNoBreak();
2730 {if (true) return statement;}
2733 statement = BreakStatement();
2734 {if (true) return statement;}
2737 jj_la1[73] = jj_gen;
2738 jj_consume_token(-1);
2739 throw new ParseException();
2741 throw new Error("Missing return statement in function");
2745 * An html block inside a php syntax.
2747 static final public HTMLBlock htmlBlock() throws ParseException {
2748 final int startIndex = nodePtr;
2749 AstNode[] blockNodes;
2751 jj_consume_token(PHPEND);
2754 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2759 jj_la1[74] = jj_gen;
2765 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2767 jj_consume_token(PHPSTARTLONG);
2770 jj_consume_token(PHPSTARTSHORT);
2773 jj_la1[75] = jj_gen;
2774 jj_consume_token(-1);
2775 throw new ParseException();
2777 } catch (ParseException e) {
2778 errorMessage = "End of file unexpected, '<?php' expected";
2780 errorStart = jj_input_stream.getPosition();
2781 errorEnd = jj_input_stream.getPosition();
2782 {if (true) throw e;}
2784 nbNodes = nodePtr-startIndex - 1;
2785 blockNodes = new AstNode[nbNodes];
2786 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2787 {if (true) return new HTMLBlock(nodes);}
2788 throw new Error("Missing return statement in function");
2792 * An include statement. It's "include" an expression;
2794 static final public InclusionStatement IncludeStatement() throws ParseException {
2795 final Expression expr;
2798 final int pos = jj_input_stream.getPosition();
2799 final InclusionStatement inclusionStatement;
2800 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2802 jj_consume_token(REQUIRE);
2803 keyword = InclusionStatement.REQUIRE;
2806 jj_consume_token(REQUIRE_ONCE);
2807 keyword = InclusionStatement.REQUIRE_ONCE;
2810 jj_consume_token(INCLUDE);
2811 keyword = InclusionStatement.INCLUDE;
2814 jj_consume_token(INCLUDE_ONCE);
2815 keyword = InclusionStatement.INCLUDE_ONCE;
2818 jj_la1[76] = jj_gen;
2819 jj_consume_token(-1);
2820 throw new ParseException();
2823 expr = Expression();
2824 } catch (ParseException e) {
2825 if (errorMessage != null) {
2826 {if (true) throw e;}
2828 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
2830 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2831 errorEnd = jj_input_stream.getPosition() + 1;
2832 {if (true) throw e;}
2834 inclusionStatement = new InclusionStatement(currentSegment,
2838 currentSegment.add(inclusionStatement);
2840 jj_consume_token(SEMICOLON);
2841 } catch (ParseException e) {
2842 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2844 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2845 errorEnd = jj_input_stream.getPosition() + 1;
2846 {if (true) throw e;}
2848 {if (true) return inclusionStatement;}
2849 throw new Error("Missing return statement in function");
2852 static final public PrintExpression PrintExpression() throws ParseException {
2853 final Expression expr;
2854 final int pos = SimpleCharStream.getPosition();
2855 jj_consume_token(PRINT);
2856 expr = Expression();
2857 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
2858 throw new Error("Missing return statement in function");
2861 static final public ListExpression ListExpression() throws ParseException {
2863 Expression expression = null;
2864 ArrayList list = new ArrayList();
2865 final int pos = SimpleCharStream.getPosition();
2866 jj_consume_token(LIST);
2868 jj_consume_token(LPAREN);
2869 } catch (ParseException e) {
2870 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2872 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2873 errorEnd = jj_input_stream.getPosition() + 1;
2874 {if (true) throw e;}
2876 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2879 expr = VariableDeclaratorId();
2883 jj_la1[77] = jj_gen;
2886 if (expr == null) list.add(null);
2889 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2894 jj_la1[78] = jj_gen;
2898 jj_consume_token(COMMA);
2899 } catch (ParseException e) {
2900 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2902 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2903 errorEnd = jj_input_stream.getPosition() + 1;
2904 {if (true) throw e;}
2906 expr = VariableDeclaratorId();
2910 jj_consume_token(RPAREN);
2911 } catch (ParseException e) {
2912 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2914 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2915 errorEnd = jj_input_stream.getPosition() + 1;
2916 {if (true) throw e;}
2918 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2920 jj_consume_token(ASSIGN);
2921 expression = Expression();
2922 String[] strings = new String[list.size()];
2923 list.toArray(strings);
2924 {if (true) return new ListExpression(strings,
2927 SimpleCharStream.getPosition());}
2930 jj_la1[79] = jj_gen;
2933 String[] strings = new String[list.size()];
2934 list.toArray(strings);
2935 {if (true) return new ListExpression(strings,pos,SimpleCharStream.getPosition());}
2936 throw new Error("Missing return statement in function");
2940 * An echo statement.
2941 * echo anyexpression (, otherexpression)*
2943 static final public EchoStatement EchoStatement() throws ParseException {
2944 final ArrayList expressions = new ArrayList();
2946 final int pos = SimpleCharStream.getPosition();
2947 jj_consume_token(ECHO);
2948 expr = Expression();
2949 expressions.add(expr);
2952 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2957 jj_la1[80] = jj_gen;
2960 jj_consume_token(COMMA);
2961 expr = Expression();
2962 expressions.add(expr);
2965 jj_consume_token(SEMICOLON);
2966 Expression[] exprs = new Expression[expressions.size()];
2967 expressions.toArray(exprs);
2968 {if (true) return new EchoStatement(exprs,pos);}
2969 } catch (ParseException e) {
2970 if (e.currentToken.next.kind != 4) {
2971 errorMessage = "';' expected after 'echo' statement";
2973 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2974 errorEnd = jj_input_stream.getPosition() + 1;
2975 {if (true) throw e;}
2978 throw new Error("Missing return statement in function");
2981 static final public GlobalStatement GlobalStatement() throws ParseException {
2982 final int pos = jj_input_stream.getPosition();
2984 ArrayList vars = new ArrayList();
2985 GlobalStatement global;
2986 jj_consume_token(GLOBAL);
2987 expr = VariableDeclaratorId();
2991 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2996 jj_la1[81] = jj_gen;
2999 jj_consume_token(COMMA);
3000 expr = VariableDeclaratorId();
3004 jj_consume_token(SEMICOLON);
3005 String[] strings = new String[vars.size()];
3006 vars.toArray(strings);
3007 global = new GlobalStatement(currentSegment,
3010 SimpleCharStream.getPosition());
3011 currentSegment.add(global);
3012 {if (true) return global;}
3013 } catch (ParseException e) {
3014 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3016 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3017 errorEnd = jj_input_stream.getPosition() + 1;
3018 {if (true) throw e;}
3020 throw new Error("Missing return statement in function");
3023 static final public StaticStatement StaticStatement() throws ParseException {
3024 final int pos = SimpleCharStream.getPosition();
3025 final ArrayList vars = new ArrayList();
3026 VariableDeclaration expr;
3027 jj_consume_token(STATIC);
3028 expr = VariableDeclarator();
3029 vars.add(new String(expr.name));
3032 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3037 jj_la1[82] = jj_gen;
3040 jj_consume_token(COMMA);
3041 expr = VariableDeclarator();
3042 vars.add(new String(expr.name));
3045 jj_consume_token(SEMICOLON);
3046 String[] strings = new String[vars.size()];
3047 vars.toArray(strings);
3048 {if (true) return new StaticStatement(strings,
3050 SimpleCharStream.getPosition());}
3051 } catch (ParseException e) {
3052 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3054 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3055 errorEnd = jj_input_stream.getPosition() + 1;
3056 {if (true) throw e;}
3058 throw new Error("Missing return statement in function");
3061 static final public LabeledStatement LabeledStatement() throws ParseException {
3062 final int pos = SimpleCharStream.getPosition();
3064 final Statement statement;
3065 label = jj_consume_token(IDENTIFIER);
3066 jj_consume_token(COLON);
3067 statement = Statement();
3068 {if (true) return new LabeledStatement(label.image.toCharArray(),statement,pos,SimpleCharStream.getPosition());}
3069 throw new Error("Missing return statement in function");
3079 static final public Block Block() throws ParseException {
3080 final int pos = SimpleCharStream.getPosition();
3081 final ArrayList list = new ArrayList();
3082 Statement statement;
3084 jj_consume_token(LBRACE);
3085 } catch (ParseException e) {
3086 errorMessage = "'{' expected";
3088 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3089 errorEnd = jj_input_stream.getPosition() + 1;
3090 {if (true) throw e;}
3094 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3129 case INTEGER_LITERAL:
3130 case FLOATING_POINT_LITERAL:
3131 case STRING_LITERAL:
3140 jj_la1[83] = jj_gen;
3143 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3177 case INTEGER_LITERAL:
3178 case FLOATING_POINT_LITERAL:
3179 case STRING_LITERAL:
3185 statement = BlockStatement();
3186 list.add(statement);
3189 statement = htmlBlock();
3190 list.add(statement);
3193 jj_la1[84] = jj_gen;
3194 jj_consume_token(-1);
3195 throw new ParseException();
3199 jj_consume_token(RBRACE);
3200 } catch (ParseException e) {
3201 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3203 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3204 errorEnd = jj_input_stream.getPosition() + 1;
3205 {if (true) throw e;}
3207 Statement[] statements = new Statement[list.size()];
3208 list.toArray(statements);
3209 {if (true) return new Block(statements,pos,SimpleCharStream.getPosition());}
3210 throw new Error("Missing return statement in function");
3213 static final public Statement BlockStatement() throws ParseException {
3214 final Statement statement;
3215 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3247 case INTEGER_LITERAL:
3248 case FLOATING_POINT_LITERAL:
3249 case STRING_LITERAL:
3255 statement = Statement();
3256 {if (true) return statement;}
3259 statement = ClassDeclaration();
3260 {if (true) return statement;}
3263 statement = MethodDeclaration();
3264 {if (true) return statement;}
3267 jj_la1[85] = jj_gen;
3268 jj_consume_token(-1);
3269 throw new ParseException();
3271 throw new Error("Missing return statement in function");
3275 * A Block statement that will not contain any 'break'
3277 static final public Statement BlockStatementNoBreak() throws ParseException {
3278 final Statement statement;
3279 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3310 case INTEGER_LITERAL:
3311 case FLOATING_POINT_LITERAL:
3312 case STRING_LITERAL:
3318 statement = StatementNoBreak();
3319 {if (true) return statement;}
3322 statement = ClassDeclaration();
3323 {if (true) return statement;}
3326 statement = MethodDeclaration();
3327 {if (true) return statement;}
3330 jj_la1[86] = jj_gen;
3331 jj_consume_token(-1);
3332 throw new ParseException();
3334 throw new Error("Missing return statement in function");
3337 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3338 final ArrayList list = new ArrayList();
3339 VariableDeclaration var;
3340 var = LocalVariableDeclarator();
3344 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3349 jj_la1[87] = jj_gen;
3352 jj_consume_token(COMMA);
3353 var = LocalVariableDeclarator();
3356 VariableDeclaration[] vars = new VariableDeclaration[list.size()];
3358 {if (true) return vars;}
3359 throw new Error("Missing return statement in function");
3362 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3363 final String varName;
3364 Expression initializer = null;
3365 final int pos = SimpleCharStream.getPosition();
3366 varName = VariableDeclaratorId();
3367 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3369 jj_consume_token(ASSIGN);
3370 initializer = Expression();
3373 jj_la1[88] = jj_gen;
3376 if (initializer == null) {
3377 {if (true) return new VariableDeclaration(currentSegment,
3378 varName.toCharArray(),
3380 jj_input_stream.getPosition());}
3382 {if (true) return new VariableDeclaration(currentSegment,
3383 varName.toCharArray(),
3386 throw new Error("Missing return statement in function");
3389 static final public EmptyStatement EmptyStatement() throws ParseException {
3391 jj_consume_token(SEMICOLON);
3392 pos = SimpleCharStream.getPosition();
3393 {if (true) return new EmptyStatement(pos-1,pos);}
3394 throw new Error("Missing return statement in function");
3397 static final public Statement StatementExpression() throws ParseException {
3398 Expression expr,expr2;
3400 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3403 expr = PreIncDecExpression();
3404 {if (true) return expr;}
3411 expr = PrimaryExpression();
3412 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3427 case RSIGNEDSHIFTASSIGN:
3428 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3430 jj_consume_token(INCR);
3431 {if (true) return new PostfixedUnaryExpression(expr,
3432 OperatorIds.PLUS_PLUS,
3433 SimpleCharStream.getPosition());}
3436 jj_consume_token(DECR);
3437 {if (true) return new PostfixedUnaryExpression(expr,
3438 OperatorIds.MINUS_MINUS,
3439 SimpleCharStream.getPosition());}
3453 case RSIGNEDSHIFTASSIGN:
3454 operator = AssignmentOperator();
3455 expr2 = Expression();
3456 {if (true) return new BinaryExpression(expr,expr2,operator);}
3459 jj_la1[89] = jj_gen;
3460 jj_consume_token(-1);
3461 throw new ParseException();
3465 jj_la1[90] = jj_gen;
3468 {if (true) return expr;}
3471 jj_la1[91] = jj_gen;
3472 jj_consume_token(-1);
3473 throw new ParseException();
3475 throw new Error("Missing return statement in function");
3478 static final public SwitchStatement SwitchStatement() throws ParseException {
3479 final Expression variable;
3480 final AbstractCase[] cases;
3481 final int pos = SimpleCharStream.getPosition();
3482 jj_consume_token(SWITCH);
3484 jj_consume_token(LPAREN);
3485 } catch (ParseException e) {
3486 errorMessage = "'(' expected after 'switch'";
3488 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3489 errorEnd = jj_input_stream.getPosition() + 1;
3490 {if (true) throw e;}
3493 variable = Expression();
3494 } catch (ParseException e) {
3495 if (errorMessage != null) {
3496 {if (true) throw e;}
3498 errorMessage = "expression expected";
3500 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3501 errorEnd = jj_input_stream.getPosition() + 1;
3502 {if (true) throw e;}
3505 jj_consume_token(RPAREN);
3506 } catch (ParseException e) {
3507 errorMessage = "')' expected";
3509 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3510 errorEnd = jj_input_stream.getPosition() + 1;
3511 {if (true) throw e;}
3513 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3515 cases = switchStatementBrace();
3518 cases = switchStatementColon(pos, pos + 6);
3521 jj_la1[92] = jj_gen;
3522 jj_consume_token(-1);
3523 throw new ParseException();
3525 {if (true) return new SwitchStatement(variable,cases,pos,SimpleCharStream.getPosition());}
3526 throw new Error("Missing return statement in function");
3529 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3531 final ArrayList cases = new ArrayList();
3532 jj_consume_token(LBRACE);
3535 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3541 jj_la1[93] = jj_gen;
3544 cas = switchLabel0();
3548 jj_consume_token(RBRACE);
3549 AbstractCase[] abcase = new AbstractCase[cases.size()];
3550 cases.toArray(abcase);
3551 {if (true) return abcase;}
3552 } catch (ParseException e) {
3553 errorMessage = "'}' expected";
3555 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3556 errorEnd = jj_input_stream.getPosition() + 1;
3557 {if (true) throw e;}
3559 throw new Error("Missing return statement in function");
3563 * A Switch statement with : ... endswitch;
3564 * @param start the begin offset of the switch
3565 * @param end the end offset of the switch
3567 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3569 final ArrayList cases = new ArrayList();
3570 jj_consume_token(COLON);
3572 setMarker(fileToParse,
3573 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3577 "Line " + token.beginLine);
3578 } catch (CoreException e) {
3579 PHPeclipsePlugin.log(e);
3583 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3589 jj_la1[94] = jj_gen;
3592 cas = switchLabel0();
3596 jj_consume_token(ENDSWITCH);
3597 } catch (ParseException e) {
3598 errorMessage = "'endswitch' expected";
3600 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3601 errorEnd = jj_input_stream.getPosition() + 1;
3602 {if (true) throw e;}
3605 jj_consume_token(SEMICOLON);
3606 AbstractCase[] abcase = new AbstractCase[cases.size()];
3607 cases.toArray(abcase);
3608 {if (true) return abcase;}
3609 } catch (ParseException e) {
3610 errorMessage = "';' expected after 'endswitch' keyword";
3612 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3613 errorEnd = jj_input_stream.getPosition() + 1;
3614 {if (true) throw e;}
3616 throw new Error("Missing return statement in function");
3619 static final public AbstractCase switchLabel0() throws ParseException {
3620 final Expression expr;
3621 Statement statement;
3622 final ArrayList stmts = new ArrayList();
3623 final int pos = SimpleCharStream.getPosition();
3624 expr = SwitchLabel();
3627 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3661 case INTEGER_LITERAL:
3662 case FLOATING_POINT_LITERAL:
3663 case STRING_LITERAL:
3672 jj_la1[95] = jj_gen;
3675 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3708 case INTEGER_LITERAL:
3709 case FLOATING_POINT_LITERAL:
3710 case STRING_LITERAL:
3716 statement = BlockStatementNoBreak();
3717 stmts.add(statement);
3720 statement = htmlBlock();
3721 stmts.add(statement);
3724 jj_la1[96] = jj_gen;
3725 jj_consume_token(-1);
3726 throw new ParseException();
3729 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3731 statement = BreakStatement();
3732 stmts.add(statement);
3735 jj_la1[97] = jj_gen;
3738 Statement[] stmtsArray = new Statement[stmts.size()];
3739 stmts.toArray(stmtsArray);
3740 if (expr == null) {//it's a default
3741 {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3743 {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3744 throw new Error("Missing return statement in function");
3749 * case Expression() :
3751 * @return the if it was a case and null if not
3753 static final public Expression SwitchLabel() throws ParseException {
3755 final Expression expr;
3756 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3758 token = jj_consume_token(CASE);
3760 expr = Expression();
3761 } catch (ParseException e) {
3762 if (errorMessage != null) {if (true) throw e;}
3763 errorMessage = "expression expected after 'case' keyword";
3765 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3766 errorEnd = jj_input_stream.getPosition() + 1;
3767 {if (true) throw e;}
3770 jj_consume_token(COLON);
3771 {if (true) return expr;}
3772 } catch (ParseException e) {
3773 errorMessage = "':' expected after case expression";
3775 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3776 errorEnd = jj_input_stream.getPosition() + 1;
3777 {if (true) throw e;}
3781 token = jj_consume_token(_DEFAULT);
3783 jj_consume_token(COLON);
3784 {if (true) return null;}
3785 } catch (ParseException e) {
3786 errorMessage = "':' expected after 'default' keyword";
3788 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3789 errorEnd = jj_input_stream.getPosition() + 1;
3790 {if (true) throw e;}
3794 jj_la1[98] = jj_gen;
3795 jj_consume_token(-1);
3796 throw new ParseException();
3798 throw new Error("Missing return statement in function");
3801 static final public Break BreakStatement() throws ParseException {
3802 Expression expression = null;
3803 final int start = SimpleCharStream.getPosition();
3804 jj_consume_token(BREAK);
3805 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3821 case INTEGER_LITERAL:
3822 case FLOATING_POINT_LITERAL:
3823 case STRING_LITERAL:
3827 expression = Expression();
3830 jj_la1[99] = jj_gen;
3834 jj_consume_token(SEMICOLON);
3835 } catch (ParseException e) {
3836 errorMessage = "';' expected after 'break' keyword";
3838 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3839 errorEnd = jj_input_stream.getPosition() + 1;
3840 {if (true) throw e;}
3842 {if (true) return new Break(expression, start, SimpleCharStream.getPosition());}
3843 throw new Error("Missing return statement in function");
3846 static final public IfStatement IfStatement() throws ParseException {
3847 final int pos = jj_input_stream.getPosition();
3848 Expression condition;
3849 IfStatement ifStatement;
3850 jj_consume_token(IF);
3851 condition = Condition("if");
3852 ifStatement = IfStatement0(condition, pos,pos+2);
3853 {if (true) return ifStatement;}
3854 throw new Error("Missing return statement in function");
3857 static final public Expression Condition(final String keyword) throws ParseException {
3858 final Expression condition;
3860 jj_consume_token(LPAREN);
3861 } catch (ParseException e) {
3862 errorMessage = "'(' expected after " + keyword + " keyword";
3864 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length();
3865 errorEnd = errorStart +1;
3866 processParseException(e);
3868 condition = Expression();
3870 jj_consume_token(RPAREN);
3871 {if (true) return condition;}
3872 } catch (ParseException e) {
3873 errorMessage = "')' expected after " + keyword + " keyword";
3875 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3876 errorEnd = jj_input_stream.getPosition() + 1;
3877 {if (true) throw e;}
3879 throw new Error("Missing return statement in function");
3882 static final public IfStatement IfStatement0(Expression condition, final int start,final int end) throws ParseException {
3883 Statement statement;
3885 final Statement[] statementsArray;
3886 ElseIf elseifStatement;
3887 Else elseStatement = null;
3889 final ArrayList elseIfList = new ArrayList();
3891 int pos = SimpleCharStream.getPosition();
3893 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3895 jj_consume_token(COLON);
3896 stmts = new ArrayList();
3899 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3932 case INTEGER_LITERAL:
3933 case FLOATING_POINT_LITERAL:
3934 case STRING_LITERAL:
3943 jj_la1[100] = jj_gen;
3946 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3978 case INTEGER_LITERAL:
3979 case FLOATING_POINT_LITERAL:
3980 case STRING_LITERAL:
3986 statement = Statement();
3987 stmts.add(statement);
3990 statement = htmlBlock();
3991 stmts.add(statement);
3994 jj_la1[101] = jj_gen;
3995 jj_consume_token(-1);
3996 throw new ParseException();
3999 endStatements = SimpleCharStream.getPosition();
4002 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4007 jj_la1[102] = jj_gen;
4010 elseifStatement = ElseIfStatementColon();
4011 elseIfList.add(elseifStatement);
4013 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4015 elseStatement = ElseStatementColon();
4018 jj_la1[103] = jj_gen;
4022 setMarker(fileToParse,
4023 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4027 "Line " + token.beginLine);
4028 } catch (CoreException e) {
4029 PHPeclipsePlugin.log(e);
4032 jj_consume_token(ENDIF);
4033 } catch (ParseException e) {
4034 errorMessage = "'endif' expected";
4036 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4037 errorEnd = jj_input_stream.getPosition() + 1;
4038 {if (true) throw e;}
4041 jj_consume_token(SEMICOLON);
4042 } catch (ParseException e) {
4043 errorMessage = "';' expected after 'endif' keyword";
4045 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4046 errorEnd = jj_input_stream.getPosition() + 1;
4047 {if (true) throw e;}
4049 elseIfs = new ElseIf[elseIfList.size()];
4050 elseIfList.toArray(elseIfs);
4051 if (stmts.size() == 1) {
4052 {if (true) return new IfStatement(condition,
4053 (Statement) stmts.get(0),
4057 SimpleCharStream.getPosition());}
4059 statementsArray = new Statement[stmts.size()];
4060 stmts.toArray(statementsArray);
4061 {if (true) return new IfStatement(condition,
4062 new Block(statementsArray,pos,endStatements),
4066 SimpleCharStream.getPosition());}
4101 case INTEGER_LITERAL:
4102 case FLOATING_POINT_LITERAL:
4103 case STRING_LITERAL:
4109 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4141 case INTEGER_LITERAL:
4142 case FLOATING_POINT_LITERAL:
4143 case STRING_LITERAL:
4155 jj_la1[104] = jj_gen;
4156 jj_consume_token(-1);
4157 throw new ParseException();
4161 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4166 jj_la1[105] = jj_gen;
4169 elseifStatement = ElseIfStatement();
4170 elseIfList.add(elseifStatement);
4172 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4174 jj_consume_token(ELSE);
4176 pos = SimpleCharStream.getPosition();
4177 statement = Statement();
4178 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4179 } catch (ParseException e) {
4180 if (errorMessage != null) {
4181 {if (true) throw e;}
4183 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4185 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4186 errorEnd = jj_input_stream.getPosition() + 1;
4187 {if (true) throw e;}
4191 jj_la1[106] = jj_gen;
4194 elseIfs = new ElseIf[elseIfList.size()];
4195 elseIfList.toArray(elseIfs);
4196 {if (true) return new IfStatement(condition,
4201 SimpleCharStream.getPosition());}
4204 jj_la1[107] = jj_gen;
4205 jj_consume_token(-1);
4206 throw new ParseException();
4208 throw new Error("Missing return statement in function");
4211 static final public ElseIf ElseIfStatementColon() throws ParseException {
4212 Expression condition;
4213 Statement statement;
4214 final ArrayList list = new ArrayList();
4215 final int pos = SimpleCharStream.getPosition();
4216 jj_consume_token(ELSEIF);
4217 condition = Condition("elseif");
4218 jj_consume_token(COLON);
4221 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4254 case INTEGER_LITERAL:
4255 case FLOATING_POINT_LITERAL:
4256 case STRING_LITERAL:
4265 jj_la1[108] = jj_gen;
4268 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4300 case INTEGER_LITERAL:
4301 case FLOATING_POINT_LITERAL:
4302 case STRING_LITERAL:
4308 statement = Statement();
4309 list.add(statement);
4312 statement = htmlBlock();
4313 list.add(statement);
4316 jj_la1[109] = jj_gen;
4317 jj_consume_token(-1);
4318 throw new ParseException();
4321 Statement[] stmtsArray = new Statement[list.size()];
4322 list.toArray(stmtsArray);
4323 {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4324 throw new Error("Missing return statement in function");
4327 static final public Else ElseStatementColon() throws ParseException {
4328 Statement statement;
4329 final ArrayList list = new ArrayList();
4330 final int pos = SimpleCharStream.getPosition();
4331 jj_consume_token(ELSE);
4332 jj_consume_token(COLON);
4335 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4368 case INTEGER_LITERAL:
4369 case FLOATING_POINT_LITERAL:
4370 case STRING_LITERAL:
4379 jj_la1[110] = jj_gen;
4382 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4414 case INTEGER_LITERAL:
4415 case FLOATING_POINT_LITERAL:
4416 case STRING_LITERAL:
4422 statement = Statement();
4423 list.add(statement);
4426 statement = htmlBlock();
4427 list.add(statement);
4430 jj_la1[111] = jj_gen;
4431 jj_consume_token(-1);
4432 throw new ParseException();
4435 Statement[] stmtsArray = new Statement[list.size()];
4436 list.toArray(stmtsArray);
4437 {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4438 throw new Error("Missing return statement in function");
4441 static final public ElseIf ElseIfStatement() throws ParseException {
4442 Expression condition;
4443 Statement statement;
4444 final ArrayList list = new ArrayList();
4445 final int pos = SimpleCharStream.getPosition();
4446 jj_consume_token(ELSEIF);
4447 condition = Condition("elseif");
4448 statement = Statement();
4449 list.add(statement);/*todo:do better*/
4450 Statement[] stmtsArray = new Statement[list.size()];
4451 list.toArray(stmtsArray);
4452 {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4453 throw new Error("Missing return statement in function");
4456 static final public WhileStatement WhileStatement() throws ParseException {
4457 final Expression condition;
4458 final Statement action;
4459 final int pos = SimpleCharStream.getPosition();
4460 jj_consume_token(WHILE);
4461 condition = Condition("while");
4462 action = WhileStatement0(pos,pos + 5);
4463 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4464 throw new Error("Missing return statement in function");
4467 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4468 Statement statement;
4469 final ArrayList stmts = new ArrayList();
4470 final int pos = SimpleCharStream.getPosition();
4471 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4473 jj_consume_token(COLON);
4476 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4508 case INTEGER_LITERAL:
4509 case FLOATING_POINT_LITERAL:
4510 case STRING_LITERAL:
4519 jj_la1[112] = jj_gen;
4522 statement = Statement();
4523 stmts.add(statement);
4526 setMarker(fileToParse,
4527 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4531 "Line " + token.beginLine);
4532 } catch (CoreException e) {
4533 PHPeclipsePlugin.log(e);
4536 jj_consume_token(ENDWHILE);
4537 } catch (ParseException e) {
4538 errorMessage = "'endwhile' expected";
4540 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4541 errorEnd = jj_input_stream.getPosition() + 1;
4542 {if (true) throw e;}
4545 jj_consume_token(SEMICOLON);
4546 Statement[] stmtsArray = new Statement[stmts.size()];
4547 stmts.toArray(stmtsArray);
4548 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4549 } catch (ParseException e) {
4550 errorMessage = "';' expected after 'endwhile' keyword";
4552 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4553 errorEnd = jj_input_stream.getPosition() + 1;
4554 {if (true) throw e;}
4588 case INTEGER_LITERAL:
4589 case FLOATING_POINT_LITERAL:
4590 case STRING_LITERAL:
4596 statement = Statement();
4597 {if (true) return statement;}
4600 jj_la1[113] = jj_gen;
4601 jj_consume_token(-1);
4602 throw new ParseException();
4604 throw new Error("Missing return statement in function");
4607 static final public DoStatement DoStatement() throws ParseException {
4608 final Statement action;
4609 final Expression condition;
4610 final int pos = SimpleCharStream.getPosition();
4611 jj_consume_token(DO);
4612 action = Statement();
4613 jj_consume_token(WHILE);
4614 condition = Condition("while");
4616 jj_consume_token(SEMICOLON);
4617 {if (true) return new DoStatement(condition,action,pos,SimpleCharStream.getPosition());}
4618 } catch (ParseException e) {
4619 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4621 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4622 errorEnd = jj_input_stream.getPosition() + 1;
4623 {if (true) throw e;}
4625 throw new Error("Missing return statement in function");
4628 static final public ForeachStatement ForeachStatement() throws ParseException {
4629 Statement statement;
4630 Expression expression;
4631 final StringBuffer buff = new StringBuffer();
4632 final int pos = SimpleCharStream.getPosition();
4633 ArrayVariableDeclaration variable;
4634 jj_consume_token(FOREACH);
4636 jj_consume_token(LPAREN);
4637 } catch (ParseException e) {
4638 errorMessage = "'(' expected after 'foreach' keyword";
4640 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4641 errorEnd = jj_input_stream.getPosition() + 1;
4642 {if (true) throw e;}
4645 expression = Expression();
4646 } catch (ParseException e) {
4647 errorMessage = "variable expected";
4649 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4650 errorEnd = jj_input_stream.getPosition() + 1;
4651 {if (true) throw e;}
4654 jj_consume_token(AS);
4655 } catch (ParseException e) {
4656 errorMessage = "'as' expected";
4658 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4659 errorEnd = jj_input_stream.getPosition() + 1;
4660 {if (true) throw e;}
4663 variable = ArrayVariable();
4664 } catch (ParseException e) {
4665 errorMessage = "variable expected";
4667 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4668 errorEnd = jj_input_stream.getPosition() + 1;
4669 {if (true) throw e;}
4672 jj_consume_token(RPAREN);
4673 } catch (ParseException e) {
4674 errorMessage = "')' expected after 'foreach' keyword";
4676 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4677 errorEnd = jj_input_stream.getPosition() + 1;
4678 {if (true) throw e;}
4681 statement = Statement();
4682 } catch (ParseException e) {
4683 if (errorMessage != null) {if (true) throw e;}
4684 errorMessage = "statement expected";
4686 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4687 errorEnd = jj_input_stream.getPosition() + 1;
4688 {if (true) throw e;}
4690 {if (true) return new ForeachStatement(expression,
4694 SimpleCharStream.getPosition());}
4695 throw new Error("Missing return statement in function");
4698 static final public ForStatement ForStatement() throws ParseException {
4700 final int pos = SimpleCharStream.getPosition();
4701 Statement[] initializations = null;
4702 Expression condition = null;
4703 Statement[] increments = null;
4705 final ArrayList list = new ArrayList();
4706 final int startBlock, endBlock;
4707 token = jj_consume_token(FOR);
4709 jj_consume_token(LPAREN);
4710 } catch (ParseException e) {
4711 errorMessage = "'(' expected after 'for' keyword";
4713 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4714 errorEnd = jj_input_stream.getPosition() + 1;
4715 {if (true) throw e;}
4717 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4725 initializations = ForInit();
4728 jj_la1[114] = jj_gen;
4731 jj_consume_token(SEMICOLON);
4732 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4748 case INTEGER_LITERAL:
4749 case FLOATING_POINT_LITERAL:
4750 case STRING_LITERAL:
4754 condition = Expression();
4757 jj_la1[115] = jj_gen;
4760 jj_consume_token(SEMICOLON);
4761 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4769 increments = StatementExpressionList();
4772 jj_la1[116] = jj_gen;
4775 jj_consume_token(RPAREN);
4776 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4808 case INTEGER_LITERAL:
4809 case FLOATING_POINT_LITERAL:
4810 case STRING_LITERAL:
4816 action = Statement();
4817 {if (true) return new ForStatement(initializations,condition,increments,action,pos,SimpleCharStream.getPosition());}
4820 jj_consume_token(COLON);
4821 startBlock = SimpleCharStream.getPosition();
4824 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4856 case INTEGER_LITERAL:
4857 case FLOATING_POINT_LITERAL:
4858 case STRING_LITERAL:
4867 jj_la1[117] = jj_gen;
4870 action = Statement();
4874 setMarker(fileToParse,
4875 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
4877 pos+token.image.length(),
4879 "Line " + token.beginLine);
4880 } catch (CoreException e) {
4881 PHPeclipsePlugin.log(e);
4883 endBlock = SimpleCharStream.getPosition();
4885 jj_consume_token(ENDFOR);
4886 } catch (ParseException e) {
4887 errorMessage = "'endfor' expected";
4889 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4890 errorEnd = jj_input_stream.getPosition() + 1;
4891 {if (true) throw e;}
4894 jj_consume_token(SEMICOLON);
4895 Statement[] stmtsArray = new Statement[list.size()];
4896 list.toArray(stmtsArray);
4897 {if (true) return new ForStatement(initializations,condition,increments,new Block(stmtsArray,startBlock,endBlock),pos,SimpleCharStream.getPosition());}
4898 } catch (ParseException e) {
4899 errorMessage = "';' expected after 'endfor' keyword";
4901 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4902 errorEnd = jj_input_stream.getPosition() + 1;
4903 {if (true) throw e;}
4907 jj_la1[118] = jj_gen;
4908 jj_consume_token(-1);
4909 throw new ParseException();
4911 throw new Error("Missing return statement in function");
4914 static final public Statement[] ForInit() throws ParseException {
4915 Statement[] statements;
4916 if (jj_2_8(2147483647)) {
4917 statements = LocalVariableDeclaration();
4918 {if (true) return statements;}
4920 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4928 statements = StatementExpressionList();
4929 {if (true) return statements;}
4932 jj_la1[119] = jj_gen;
4933 jj_consume_token(-1);
4934 throw new ParseException();
4937 throw new Error("Missing return statement in function");
4940 static final public Statement[] StatementExpressionList() throws ParseException {
4941 final ArrayList list = new ArrayList();
4943 expr = StatementExpression();
4947 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4952 jj_la1[120] = jj_gen;
4955 jj_consume_token(COMMA);
4956 StatementExpression();
4959 Statement[] stmtsArray = new Statement[list.size()];
4960 list.toArray(stmtsArray);
4961 {if (true) return stmtsArray;}
4962 throw new Error("Missing return statement in function");
4965 static final public Continue ContinueStatement() throws ParseException {
4966 Expression expr = null;
4967 final int pos = SimpleCharStream.getPosition();
4968 jj_consume_token(CONTINUE);
4969 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4985 case INTEGER_LITERAL:
4986 case FLOATING_POINT_LITERAL:
4987 case STRING_LITERAL:
4991 expr = Expression();
4994 jj_la1[121] = jj_gen;
4998 jj_consume_token(SEMICOLON);
4999 {if (true) return new Continue(expr,pos,SimpleCharStream.getPosition());}
5000 } catch (ParseException e) {
5001 errorMessage = "';' expected after 'continue' statement";
5003 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
5004 errorEnd = jj_input_stream.getPosition() + 1;
5005 {if (true) throw e;}
5007 throw new Error("Missing return statement in function");
5010 static final public ReturnStatement ReturnStatement() throws ParseException {
5011 Expression expr = null;
5012 final int pos = SimpleCharStream.getPosition();
5013 jj_consume_token(RETURN);
5014 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5030 case INTEGER_LITERAL:
5031 case FLOATING_POINT_LITERAL:
5032 case STRING_LITERAL:
5036 expr = Expression();
5039 jj_la1[122] = jj_gen;
5043 jj_consume_token(SEMICOLON);
5044 {if (true) return new ReturnStatement(expr,pos,SimpleCharStream.getPosition());}
5045 } catch (ParseException e) {
5046 errorMessage = "';' expected after 'return' statement";
5048 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
5049 errorEnd = jj_input_stream.getPosition() + 1;
5050 {if (true) throw e;}
5052 throw new Error("Missing return statement in function");
5055 static final private boolean jj_2_1(int xla) {
5056 jj_la = xla; jj_lastpos = jj_scanpos = token;
5057 boolean retval = !jj_3_1();
5062 static final private boolean jj_2_2(int xla) {
5063 jj_la = xla; jj_lastpos = jj_scanpos = token;
5064 boolean retval = !jj_3_2();
5069 static final private boolean jj_2_3(int xla) {
5070 jj_la = xla; jj_lastpos = jj_scanpos = token;
5071 boolean retval = !jj_3_3();
5076 static final private boolean jj_2_4(int xla) {
5077 jj_la = xla; jj_lastpos = jj_scanpos = token;
5078 boolean retval = !jj_3_4();
5083 static final private boolean jj_2_5(int xla) {
5084 jj_la = xla; jj_lastpos = jj_scanpos = token;
5085 boolean retval = !jj_3_5();
5090 static final private boolean jj_2_6(int xla) {
5091 jj_la = xla; jj_lastpos = jj_scanpos = token;
5092 boolean retval = !jj_3_6();
5097 static final private boolean jj_2_7(int xla) {
5098 jj_la = xla; jj_lastpos = jj_scanpos = token;
5099 boolean retval = !jj_3_7();
5104 static final private boolean jj_2_8(int xla) {
5105 jj_la = xla; jj_lastpos = jj_scanpos = token;
5106 boolean retval = !jj_3_8();
5111 static final private boolean jj_3R_147() {
5112 if (jj_scan_token(REMAINDER)) return true;
5113 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5117 static final private boolean jj_3R_146() {
5118 if (jj_scan_token(SLASH)) return true;
5119 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5123 static final private boolean jj_3R_145() {
5124 if (jj_scan_token(STAR)) return true;
5125 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5129 static final private boolean jj_3R_140() {
5136 if (jj_3R_147()) return true;
5137 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5138 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5139 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5140 if (jj_3R_139()) return true;
5141 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5145 static final private boolean jj_3R_87() {
5146 if (jj_scan_token(ASSIGN)) return true;
5147 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5148 if (jj_3R_45()) return true;
5149 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5153 static final private boolean jj_3R_134() {
5154 if (jj_3R_139()) return true;
5155 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5159 if (jj_3R_140()) { jj_scanpos = xsp; break; }
5160 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5165 static final private boolean jj_3R_142() {
5166 if (jj_scan_token(MINUS)) return true;
5167 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5171 static final private boolean jj_3R_141() {
5172 if (jj_scan_token(PLUS)) return true;
5173 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5177 static final private boolean jj_3R_135() {
5182 if (jj_3R_142()) return true;
5183 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5184 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5185 if (jj_3R_134()) return true;
5186 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5190 static final private boolean jj_3R_128() {
5191 if (jj_3R_134()) return true;
5192 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5196 if (jj_3R_135()) { jj_scanpos = xsp; break; }
5197 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5202 static final private boolean jj_3_7() {
5203 if (jj_3R_46()) return true;
5204 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5208 static final private boolean jj_3R_198() {
5209 if (jj_scan_token(COMMA)) return true;
5210 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5214 static final private boolean jj_3R_57() {
5215 if (jj_3R_50()) return true;
5216 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5219 if (jj_3R_87()) jj_scanpos = xsp;
5220 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5224 static final private boolean jj_3_2() {
5225 if (jj_scan_token(COMMA)) return true;
5226 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5227 if (jj_3R_41()) return true;
5228 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5232 static final private boolean jj_3R_138() {
5233 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
5234 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5238 static final private boolean jj_3R_197() {
5239 if (jj_3R_41()) return true;
5240 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5244 if (jj_3_2()) { jj_scanpos = xsp; break; }
5245 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5250 static final private boolean jj_3R_137() {
5251 if (jj_scan_token(RSIGNEDSHIFT)) return true;
5252 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5256 static final private boolean jj_3R_136() {
5257 if (jj_scan_token(LSHIFT)) return true;
5258 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5262 static final private boolean jj_3R_129() {
5269 if (jj_3R_138()) return true;
5270 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5271 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5272 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5273 if (jj_3R_128()) return true;
5274 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5278 static final private boolean jj_3_6() {
5279 if (jj_3R_45()) return true;
5280 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5281 if (jj_scan_token(SEMICOLON)) return true;
5282 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5286 static final private boolean jj_3R_121() {
5287 if (jj_3R_128()) return true;
5288 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5292 if (jj_3R_129()) { jj_scanpos = xsp; break; }
5293 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5298 static final private boolean jj_3R_58() {
5299 if (jj_scan_token(COMMA)) return true;
5300 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5301 if (jj_3R_57()) return true;
5302 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5306 static final private boolean jj_3R_192() {
5307 if (jj_scan_token(LPAREN)) return true;
5308 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5311 if (jj_3R_197()) jj_scanpos = xsp;
5312 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5314 if (jj_3R_198()) jj_scanpos = xsp;
5315 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5316 if (jj_scan_token(RPAREN)) return true;
5317 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5321 static final private boolean jj_3R_47() {
5322 if (jj_3R_57()) return true;
5323 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5327 if (jj_3R_58()) { jj_scanpos = xsp; break; }
5328 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5333 static final private boolean jj_3R_133() {
5334 if (jj_scan_token(GE)) return true;
5335 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5339 static final private boolean jj_3R_132() {
5340 if (jj_scan_token(LE)) return true;
5341 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5345 static final private boolean jj_3R_131() {
5346 if (jj_scan_token(GT)) return true;
5347 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5351 static final private boolean jj_3R_130() {
5352 if (jj_scan_token(LT)) return true;
5353 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5357 static final private boolean jj_3R_122() {
5366 if (jj_3R_133()) return true;
5367 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5368 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5369 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5370 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5371 if (jj_3R_121()) return true;
5372 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5376 static final private boolean jj_3R_201() {
5377 if (jj_scan_token(ARRAYASSIGN)) return true;
5378 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5379 if (jj_3R_45()) return true;
5380 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5384 static final private boolean jj_3R_119() {
5385 if (jj_3R_121()) return true;
5386 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5390 if (jj_3R_122()) { jj_scanpos = xsp; break; }
5391 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5396 static final private boolean jj_3R_41() {
5397 if (jj_3R_45()) return true;
5398 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5401 if (jj_3R_201()) jj_scanpos = xsp;
5402 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5406 static final private boolean jj_3R_203() {
5407 if (jj_scan_token(COMMA)) return true;
5408 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5409 if (jj_3R_45()) return true;
5410 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5414 static final private boolean jj_3R_202() {
5415 if (jj_3R_45()) return true;
5416 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5420 if (jj_3R_203()) { jj_scanpos = xsp; break; }
5421 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5426 static final private boolean jj_3R_200() {
5427 if (jj_3R_202()) return true;
5428 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5432 static final private boolean jj_3R_127() {
5433 if (jj_scan_token(TRIPLEEQUAL)) return true;
5434 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5438 static final private boolean jj_3R_126() {
5439 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5440 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5444 static final private boolean jj_3R_125() {
5445 if (jj_scan_token(NOT_EQUAL)) return true;
5446 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5450 static final private boolean jj_3R_124() {
5451 if (jj_scan_token(DIF)) return true;
5452 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5456 static final private boolean jj_3R_123() {
5457 if (jj_scan_token(EQUAL_EQUAL)) return true;
5458 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5462 static final private boolean jj_3R_120() {
5473 if (jj_3R_127()) return true;
5474 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5475 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5476 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5477 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5478 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5479 if (jj_3R_119()) return true;
5480 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5484 static final private boolean jj_3R_93() {
5485 if (jj_3R_52()) return true;
5486 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5490 static final private boolean jj_3R_117() {
5491 if (jj_3R_119()) return true;
5492 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5496 if (jj_3R_120()) { jj_scanpos = xsp; break; }
5497 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5502 static final private boolean jj_3R_199() {
5503 if (jj_scan_token(LPAREN)) return true;
5504 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5507 if (jj_3R_200()) jj_scanpos = xsp;
5508 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5509 if (jj_scan_token(RPAREN)) return true;
5510 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5514 static final private boolean jj_3R_108() {
5515 if (jj_scan_token(LBRACE)) return true;
5516 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5517 if (jj_3R_45()) return true;
5518 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5519 if (jj_scan_token(RBRACE)) return true;
5520 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5524 static final private boolean jj_3R_91() {
5525 if (jj_scan_token(DOLLAR_ID)) return true;
5526 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5530 static final private boolean jj_3R_177() {
5531 if (jj_scan_token(NULL)) return true;
5532 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5536 static final private boolean jj_3R_118() {
5537 if (jj_scan_token(BIT_AND)) return true;
5538 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5539 if (jj_3R_117()) return true;
5540 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5544 static final private boolean jj_3R_176() {
5545 if (jj_scan_token(FALSE)) return true;
5546 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5550 static final private boolean jj_3R_175() {
5551 if (jj_scan_token(TRUE)) return true;
5552 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5556 static final private boolean jj_3R_90() {
5557 if (jj_scan_token(DOLLAR)) return true;
5558 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5559 if (jj_3R_59()) return true;
5560 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5564 static final private boolean jj_3R_115() {
5565 if (jj_3R_117()) return true;
5566 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5570 if (jj_3R_118()) { jj_scanpos = xsp; break; }
5571 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5576 static final private boolean jj_3R_174() {
5577 if (jj_scan_token(STRING_LITERAL)) return true;
5578 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5582 static final private boolean jj_3R_173() {
5583 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
5584 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5588 static final private boolean jj_3R_169() {
5601 if (jj_3R_177()) return true;
5602 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5603 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5604 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5605 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5606 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5607 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5611 static final private boolean jj_3R_172() {
5612 if (jj_scan_token(INTEGER_LITERAL)) return true;
5613 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5617 static final private boolean jj_3R_116() {
5618 if (jj_scan_token(XOR)) return true;
5619 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5620 if (jj_3R_115()) return true;
5621 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5625 static final private boolean jj_3R_89() {
5626 if (jj_scan_token(IDENTIFIER)) return true;
5627 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5630 if (jj_3R_108()) jj_scanpos = xsp;
5631 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5635 static final private boolean jj_3R_92() {
5636 if (jj_3R_45()) return true;
5637 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5641 static final private boolean jj_3R_60() {
5646 if (jj_3R_93()) return true;
5647 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5648 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5652 static final private boolean jj_3R_113() {
5653 if (jj_3R_115()) return true;
5654 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5658 if (jj_3R_116()) { jj_scanpos = xsp; break; }
5659 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5664 static final private boolean jj_3R_46() {
5665 if (jj_scan_token(IDENTIFIER)) return true;
5666 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5667 if (jj_scan_token(COLON)) return true;
5668 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5672 static final private boolean jj_3R_88() {
5673 if (jj_scan_token(LBRACE)) return true;
5674 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5675 if (jj_3R_45()) return true;
5676 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5677 if (jj_scan_token(RBRACE)) return true;
5678 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5682 static final private boolean jj_3R_59() {
5691 if (jj_3R_91()) return true;
5692 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5693 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5694 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5695 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5699 static final private boolean jj_3R_98() {
5700 if (jj_scan_token(LBRACE)) return true;
5701 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5702 if (jj_3R_45()) return true;
5703 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5704 if (jj_scan_token(RBRACE)) return true;
5705 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5709 static final private boolean jj_3_8() {
5710 if (jj_3R_47()) return true;
5711 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5715 static final private boolean jj_3R_114() {
5716 if (jj_scan_token(BIT_OR)) return true;
5717 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5718 if (jj_3R_113()) return true;
5719 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5723 static final private boolean jj_3R_109() {
5724 if (jj_3R_113()) return true;
5725 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5729 if (jj_3R_114()) { jj_scanpos = xsp; break; }
5730 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5735 static final private boolean jj_3R_49() {
5736 if (jj_scan_token(LBRACKET)) return true;
5737 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5740 if (jj_3R_60()) jj_scanpos = xsp;
5741 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5742 if (jj_scan_token(RBRACKET)) return true;
5743 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5747 static final private boolean jj_3R_95() {
5748 if (jj_scan_token(DOLLAR)) return true;
5749 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5750 if (jj_3R_59()) return true;
5751 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5755 static final private boolean jj_3R_110() {
5756 if (jj_scan_token(DOT)) return true;
5757 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5758 if (jj_3R_109()) return true;
5759 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5763 static final private boolean jj_3R_104() {
5764 if (jj_3R_109()) return true;
5765 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5769 if (jj_3R_110()) { jj_scanpos = xsp; break; }
5770 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5775 static final private boolean jj_3R_48() {
5776 if (jj_scan_token(CLASSACCESS)) return true;
5777 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5778 if (jj_3R_59()) return true;
5779 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5783 static final private boolean jj_3R_40() {
5788 if (jj_3R_49()) return true;
5789 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5790 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5794 static final private boolean jj_3R_94() {
5795 if (jj_scan_token(DOLLAR_ID)) return true;
5796 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5799 if (jj_3R_98()) jj_scanpos = xsp;
5800 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5804 static final private boolean jj_3R_61() {
5809 if (jj_3R_95()) return true;
5810 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5811 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5815 static final private boolean jj_3R_112() {
5816 if (jj_scan_token(_ANDL)) return true;
5817 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5821 static final private boolean jj_3R_111() {
5822 if (jj_scan_token(AND_AND)) return true;
5823 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5827 static final private boolean jj_3R_196() {
5828 if (jj_3R_40()) return true;
5829 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5833 static final private boolean jj_3R_195() {
5834 if (jj_3R_199()) return true;
5835 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5839 static final private boolean jj_3R_188() {
5844 if (jj_3R_196()) return true;
5845 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5846 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5850 static final private boolean jj_3R_105() {
5855 if (jj_3R_112()) return true;
5856 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5857 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5858 if (jj_3R_104()) return true;
5859 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5863 static final private boolean jj_3R_97() {
5864 if (jj_scan_token(HOOK)) return true;
5865 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5866 if (jj_3R_45()) return true;
5867 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5868 if (jj_scan_token(COLON)) return true;
5869 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5870 if (jj_3R_86()) return true;
5871 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5875 static final private boolean jj_3R_102() {
5876 if (jj_3R_104()) return true;
5877 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5881 if (jj_3R_105()) { jj_scanpos = xsp; break; }
5882 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5887 static final private boolean jj_3R_187() {
5888 if (jj_3R_50()) return true;
5889 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5893 static final private boolean jj_3R_107() {
5894 if (jj_scan_token(_ORL)) return true;
5895 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5899 static final private boolean jj_3R_106() {
5900 if (jj_scan_token(OR_OR)) return true;
5901 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5905 static final private boolean jj_3R_186() {
5906 if (jj_scan_token(IDENTIFIER)) return true;
5907 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5911 static final private boolean jj_3R_178() {
5916 if (jj_3R_187()) 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_3_1() {
5923 if (jj_3R_40()) return true;
5924 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5928 static final private boolean jj_3R_103() {
5933 if (jj_3R_107()) return true;
5934 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5935 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5936 if (jj_3R_102()) return true;
5937 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5941 static final private boolean jj_3R_50() {
5942 if (jj_3R_61()) return true;
5943 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5947 if (jj_3_1()) { jj_scanpos = xsp; break; }
5948 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5953 static final private boolean jj_3R_96() {
5954 if (jj_3R_102()) return true;
5955 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5959 if (jj_3R_103()) { jj_scanpos = xsp; break; }
5960 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5965 static final private boolean jj_3R_86() {
5966 if (jj_3R_96()) return true;
5967 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5970 if (jj_3R_97()) jj_scanpos = xsp;
5971 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5975 static final private boolean jj_3R_191() {
5976 if (jj_3R_50()) return true;
5977 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5981 static final private boolean jj_3R_74() {
5982 if (jj_scan_token(TILDEEQUAL)) return true;
5983 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5987 static final private boolean jj_3R_73() {
5988 if (jj_scan_token(DOTASSIGN)) return true;
5989 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5993 static final private boolean jj_3R_72() {
5994 if (jj_scan_token(ORASSIGN)) return true;
5995 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5999 static final private boolean jj_3R_190() {
6000 if (jj_scan_token(NEW)) return true;
6001 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6002 if (jj_3R_178()) return true;
6003 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6007 static final private boolean jj_3R_71() {
6008 if (jj_scan_token(XORASSIGN)) return true;
6009 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6013 static final private boolean jj_3R_70() {
6014 if (jj_scan_token(ANDASSIGN)) return true;
6015 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6019 static final private boolean jj_3R_69() {
6020 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6021 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6025 static final private boolean jj_3R_189() {
6026 if (jj_scan_token(IDENTIFIER)) return true;
6027 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6031 static final private boolean jj_3R_180() {
6038 if (jj_3R_191()) return true;
6039 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6040 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6041 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6045 static final private boolean jj_3R_68() {
6046 if (jj_scan_token(LSHIFTASSIGN)) return true;
6047 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6051 static final private boolean jj_3R_67() {
6052 if (jj_scan_token(MINUSASSIGN)) return true;
6053 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6057 static final private boolean jj_3R_66() {
6058 if (jj_scan_token(PLUSASSIGN)) return true;
6059 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6063 static final private boolean jj_3R_65() {
6064 if (jj_scan_token(REMASSIGN)) return true;
6065 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6069 static final private boolean jj_3R_64() {
6070 if (jj_scan_token(SLASHASSIGN)) return true;
6071 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6075 static final private boolean jj_3R_63() {
6076 if (jj_scan_token(STARASSIGN)) return true;
6077 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6081 static final private boolean jj_3R_51() {
6108 if (jj_3R_74()) return true;
6109 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6110 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6111 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6112 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6113 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6114 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6115 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6116 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6117 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6118 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6119 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6120 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6121 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6125 static final private boolean jj_3R_62() {
6126 if (jj_scan_token(ASSIGN)) return true;
6127 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6131 static final private boolean jj_3R_182() {
6132 if (jj_scan_token(ARRAY)) return true;
6133 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6134 if (jj_3R_192()) return true;
6135 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6139 static final private boolean jj_3R_171() {
6140 if (jj_3R_182()) return true;
6141 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6145 static final private boolean jj_3R_181() {
6146 if (jj_3R_188()) return true;
6147 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6151 static final private boolean jj_3R_170() {
6152 if (jj_3R_180()) return true;
6153 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6157 if (jj_3R_181()) { jj_scanpos = xsp; break; }
6158 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6163 static final private boolean jj_3R_101() {
6164 if (jj_scan_token(ASSIGN)) return true;
6165 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6166 if (jj_3R_45()) return true;
6167 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6171 static final private boolean jj_3R_179() {
6172 if (jj_3R_188()) return true;
6173 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6177 static final private boolean jj_3R_42() {
6178 if (jj_3R_50()) return true;
6179 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6180 if (jj_3R_51()) return true;
6181 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6182 if (jj_3R_45()) return true;
6183 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6187 static final private boolean jj_3_5() {
6188 if (jj_scan_token(IDENTIFIER)) return true;
6189 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6190 if (jj_scan_token(STATICCLASSACCESS)) return true;
6191 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6192 if (jj_3R_178()) return true;
6193 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6197 if (jj_3R_179()) { jj_scanpos = xsp; break; }
6198 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6203 static final private boolean jj_3R_166() {
6210 if (jj_3R_171()) return true;
6211 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6212 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6213 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6217 static final private boolean jj_3_3() {
6218 if (jj_3R_42()) return true;
6219 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6223 static final private boolean jj_3R_56() {
6224 if (jj_3R_86()) return true;
6225 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6229 static final private boolean jj_3R_55() {
6230 if (jj_3R_42()) return true;
6231 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6235 static final private boolean jj_3R_54() {
6236 if (jj_3R_85()) return true;
6237 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6241 static final private boolean jj_3R_100() {
6242 if (jj_scan_token(COMMA)) return true;
6243 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6244 if (jj_3R_50()) return true;
6245 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6249 static final private boolean jj_3R_45() {
6258 if (jj_3R_56()) return true;
6259 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6260 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6261 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6262 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6266 static final private boolean jj_3R_53() {
6267 if (jj_3R_84()) return true;
6268 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6272 static final private boolean jj_3R_194() {
6273 if (jj_scan_token(DECR)) return true;
6274 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6278 static final private boolean jj_3R_193() {
6279 if (jj_scan_token(INCR)) return true;
6280 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6284 static final private boolean jj_3R_185() {
6289 if (jj_3R_194()) return true;
6290 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6291 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6295 static final private boolean jj_3R_99() {
6296 if (jj_3R_50()) return true;
6297 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6301 static final private boolean jj_3R_168() {
6302 if (jj_3R_166()) return true;
6303 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6306 if (jj_3R_185()) jj_scanpos = xsp;
6307 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6311 static final private boolean jj_3R_83() {
6312 if (jj_scan_token(OBJECT)) return true;
6313 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6317 static final private boolean jj_3R_82() {
6318 if (jj_scan_token(INTEGER)) return true;
6319 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6323 static final private boolean jj_3R_44() {
6324 if (jj_scan_token(ARRAY)) return true;
6325 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6329 static final private boolean jj_3R_184() {
6330 if (jj_scan_token(ARRAY)) return true;
6331 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6335 static final private boolean jj_3R_81() {
6336 if (jj_scan_token(INT)) return true;
6337 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6341 static final private boolean jj_3R_85() {
6342 if (jj_scan_token(LIST)) return true;
6343 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6344 if (jj_scan_token(LPAREN)) return true;
6345 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6348 if (jj_3R_99()) jj_scanpos = xsp;
6349 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6352 if (jj_3R_100()) { jj_scanpos = xsp; break; }
6353 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6355 if (jj_scan_token(RPAREN)) return true;
6356 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6358 if (jj_3R_101()) jj_scanpos = xsp;
6359 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6363 static final private boolean jj_3R_183() {
6364 if (jj_3R_52()) return true;
6365 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6369 static final private boolean jj_3R_80() {
6370 if (jj_scan_token(FLOAT)) return true;
6371 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6375 static final private boolean jj_3R_167() {
6376 if (jj_scan_token(LPAREN)) return true;
6377 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6382 if (jj_3R_184()) return true;
6383 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6384 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6385 if (jj_scan_token(RPAREN)) return true;
6386 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6387 if (jj_3R_139()) return true;
6388 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6392 static final private boolean jj_3R_79() {
6393 if (jj_scan_token(DOUBLE)) return true;
6394 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6398 static final private boolean jj_3R_43() {
6399 if (jj_3R_52()) return true;
6400 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6404 static final private boolean jj_3R_78() {
6405 if (jj_scan_token(REAL)) return true;
6406 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6410 static final private boolean jj_3R_77() {
6411 if (jj_scan_token(BOOLEAN)) return true;
6412 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6416 static final private boolean jj_3R_84() {
6417 if (jj_scan_token(PRINT)) return true;
6418 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6419 if (jj_3R_45()) return true;
6420 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6424 static final private boolean jj_3R_76() {
6425 if (jj_scan_token(BOOL)) return true;
6426 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6430 static final private boolean jj_3_4() {
6431 if (jj_scan_token(LPAREN)) return true;
6432 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6437 if (jj_3R_44()) return true;
6438 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6439 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6440 if (jj_scan_token(RPAREN)) return true;
6441 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6445 static final private boolean jj_3R_75() {
6446 if (jj_scan_token(STRING)) return true;
6447 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6451 static final private boolean jj_3R_52() {
6470 if (jj_3R_83()) return true;
6471 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6472 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6473 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6474 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6475 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6476 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6477 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6478 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6479 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6483 static final private boolean jj_3R_165() {
6484 if (jj_scan_token(LPAREN)) return true;
6485 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6486 if (jj_3R_45()) return true;
6487 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6488 if (jj_scan_token(RPAREN)) return true;
6489 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6493 static final private boolean jj_3R_164() {
6494 if (jj_3R_169()) return true;
6495 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6499 static final private boolean jj_3R_163() {
6500 if (jj_3R_168()) return true;
6501 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6505 static final private boolean jj_3R_162() {
6506 if (jj_3R_167()) return true;
6507 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6511 static final private boolean jj_3R_158() {
6522 if (jj_3R_165()) return true;
6523 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6524 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6525 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6526 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6527 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6531 static final private boolean jj_3R_161() {
6532 if (jj_scan_token(BANG)) return true;
6533 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6534 if (jj_3R_139()) return true;
6535 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6539 static final private boolean jj_3R_160() {
6540 if (jj_scan_token(DECR)) return true;
6541 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6545 static final private boolean jj_3R_159() {
6546 if (jj_scan_token(INCR)) return true;
6547 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6551 static final private boolean jj_3R_157() {
6556 if (jj_3R_160()) return true;
6557 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6558 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6559 if (jj_3R_166()) return true;
6560 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6564 static final private boolean jj_3R_152() {
6565 if (jj_3R_158()) return true;
6566 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6570 static final private boolean jj_3R_151() {
6571 if (jj_3R_157()) return true;
6572 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6576 static final private boolean jj_3R_156() {
6577 if (jj_scan_token(MINUS)) return true;
6578 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6582 static final private boolean jj_3R_155() {
6583 if (jj_scan_token(PLUS)) return true;
6584 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6588 static final private boolean jj_3R_148() {
6595 if (jj_3R_152()) return true;
6596 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6597 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6598 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6602 static final private boolean jj_3R_150() {
6607 if (jj_3R_156()) return true;
6608 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6609 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6610 if (jj_3R_139()) return true;
6611 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6615 static final private boolean jj_3R_154() {
6616 if (jj_3R_148()) return true;
6617 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6621 static final private boolean jj_3R_149() {
6626 if (jj_3R_154()) return true;
6627 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6628 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6632 static final private boolean jj_3R_153() {
6633 if (jj_scan_token(AT)) return true;
6634 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6635 if (jj_3R_149()) return true;
6636 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6640 static final private boolean jj_3R_144() {
6641 if (jj_3R_149()) return true;
6642 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6646 static final private boolean jj_3R_139() {
6651 if (jj_3R_144()) return true;
6652 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6653 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6657 static final private boolean jj_3R_143() {
6658 if (jj_scan_token(BIT_AND)) return true;
6659 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6660 if (jj_3R_148()) return true;
6661 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6665 static private boolean jj_initialized_once = false;
6666 static public PHPParserTokenManager token_source;
6667 static SimpleCharStream jj_input_stream;
6668 static public Token token, jj_nt;
6669 static private int jj_ntk;
6670 static private Token jj_scanpos, jj_lastpos;
6671 static private int jj_la;
6672 static public boolean lookingAhead = false;
6673 static private boolean jj_semLA;
6674 static private int jj_gen;
6675 static final private int[] jj_la1 = new int[123];
6676 static private int[] jj_la1_0;
6677 static private int[] jj_la1_1;
6678 static private int[] jj_la1_2;
6679 static private int[] jj_la1_3;
6680 static private int[] jj_la1_4;
6688 private static void jj_la1_0() {
6689 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,};
6691 private static void jj_la1_1() {
6692 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,};
6694 private static void jj_la1_2() {
6695 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,};
6697 private static void jj_la1_3() {
6698 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,};
6700 private static void jj_la1_4() {
6701 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,};
6703 static final private JJCalls[] jj_2_rtns = new JJCalls[8];
6704 static private boolean jj_rescan = false;
6705 static private int jj_gc = 0;
6707 public PHPParser(java.io.InputStream stream) {
6708 if (jj_initialized_once) {
6709 System.out.println("ERROR: Second call to constructor of static parser. You must");
6710 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6711 System.out.println(" during parser generation.");
6714 jj_initialized_once = true;
6715 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6716 token_source = new PHPParserTokenManager(jj_input_stream);
6717 token = new Token();
6720 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6721 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6724 static public void ReInit(java.io.InputStream stream) {
6725 jj_input_stream.ReInit(stream, 1, 1);
6726 token_source.ReInit(jj_input_stream);
6727 token = new Token();
6730 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6731 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6734 public PHPParser(java.io.Reader stream) {
6735 if (jj_initialized_once) {
6736 System.out.println("ERROR: Second call to constructor of static parser. You must");
6737 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6738 System.out.println(" during parser generation.");
6741 jj_initialized_once = true;
6742 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6743 token_source = new PHPParserTokenManager(jj_input_stream);
6744 token = new Token();
6747 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6748 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6751 static public void ReInit(java.io.Reader stream) {
6752 jj_input_stream.ReInit(stream, 1, 1);
6753 token_source.ReInit(jj_input_stream);
6754 token = new Token();
6757 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6758 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6761 public PHPParser(PHPParserTokenManager tm) {
6762 if (jj_initialized_once) {
6763 System.out.println("ERROR: Second call to constructor of static parser. You must");
6764 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6765 System.out.println(" during parser generation.");
6768 jj_initialized_once = true;
6770 token = new Token();
6773 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6774 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6777 public void ReInit(PHPParserTokenManager tm) {
6779 token = new Token();
6782 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6783 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6786 static final private Token jj_consume_token(int kind) throws ParseException {
6788 if ((oldToken = token).next != null) token = token.next;
6789 else token = token.next = token_source.getNextToken();
6791 if (token.kind == kind) {
6793 if (++jj_gc > 100) {
6795 for (int i = 0; i < jj_2_rtns.length; i++) {
6796 JJCalls c = jj_2_rtns[i];
6798 if (c.gen < jj_gen) c.first = null;
6807 throw generateParseException();
6810 static final private boolean jj_scan_token(int kind) {
6811 if (jj_scanpos == jj_lastpos) {
6813 if (jj_scanpos.next == null) {
6814 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
6816 jj_lastpos = jj_scanpos = jj_scanpos.next;
6819 jj_scanpos = jj_scanpos.next;
6822 int i = 0; Token tok = token;
6823 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
6824 if (tok != null) jj_add_error_token(kind, i);
6826 return (jj_scanpos.kind != kind);
6829 static final public Token getNextToken() {
6830 if (token.next != null) token = token.next;
6831 else token = token.next = token_source.getNextToken();
6837 static final public Token getToken(int index) {
6838 Token t = lookingAhead ? jj_scanpos : token;
6839 for (int i = 0; i < index; i++) {
6840 if (t.next != null) t = t.next;
6841 else t = t.next = token_source.getNextToken();
6846 static final private int jj_ntk() {
6847 if ((jj_nt=token.next) == null)
6848 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
6850 return (jj_ntk = jj_nt.kind);
6853 static private java.util.Vector jj_expentries = new java.util.Vector();
6854 static private int[] jj_expentry;
6855 static private int jj_kind = -1;
6856 static private int[] jj_lasttokens = new int[100];
6857 static private int jj_endpos;
6859 static private void jj_add_error_token(int kind, int pos) {
6860 if (pos >= 100) return;
6861 if (pos == jj_endpos + 1) {
6862 jj_lasttokens[jj_endpos++] = kind;
6863 } else if (jj_endpos != 0) {
6864 jj_expentry = new int[jj_endpos];
6865 for (int i = 0; i < jj_endpos; i++) {
6866 jj_expentry[i] = jj_lasttokens[i];
6868 boolean exists = false;
6869 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
6870 int[] oldentry = (int[])(enum.nextElement());
6871 if (oldentry.length == jj_expentry.length) {
6873 for (int i = 0; i < jj_expentry.length; i++) {
6874 if (oldentry[i] != jj_expentry[i]) {
6882 if (!exists) jj_expentries.addElement(jj_expentry);
6883 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
6887 static public ParseException generateParseException() {
6888 jj_expentries.removeAllElements();
6889 boolean[] la1tokens = new boolean[141];
6890 for (int i = 0; i < 141; i++) {
6891 la1tokens[i] = false;
6894 la1tokens[jj_kind] = true;
6897 for (int i = 0; i < 123; i++) {
6898 if (jj_la1[i] == jj_gen) {
6899 for (int j = 0; j < 32; j++) {
6900 if ((jj_la1_0[i] & (1<<j)) != 0) {
6901 la1tokens[j] = true;
6903 if ((jj_la1_1[i] & (1<<j)) != 0) {
6904 la1tokens[32+j] = true;
6906 if ((jj_la1_2[i] & (1<<j)) != 0) {
6907 la1tokens[64+j] = true;
6909 if ((jj_la1_3[i] & (1<<j)) != 0) {
6910 la1tokens[96+j] = true;
6912 if ((jj_la1_4[i] & (1<<j)) != 0) {
6913 la1tokens[128+j] = true;
6918 for (int i = 0; i < 141; i++) {
6920 jj_expentry = new int[1];
6922 jj_expentries.addElement(jj_expentry);
6927 jj_add_error_token(0, 0);
6928 int[][] exptokseq = new int[jj_expentries.size()][];
6929 for (int i = 0; i < jj_expentries.size(); i++) {
6930 exptokseq[i] = (int[])jj_expentries.elementAt(i);
6932 return new ParseException(token, exptokseq, tokenImage);
6935 static final public void enable_tracing() {
6938 static final public void disable_tracing() {
6941 static final private void jj_rescan_token() {
6943 for (int i = 0; i < 8; i++) {
6944 JJCalls p = jj_2_rtns[i];
6946 if (p.gen > jj_gen) {
6947 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
6949 case 0: jj_3_1(); break;
6950 case 1: jj_3_2(); break;
6951 case 2: jj_3_3(); break;
6952 case 3: jj_3_4(); break;
6953 case 4: jj_3_5(); break;
6954 case 5: jj_3_6(); break;
6955 case 6: jj_3_7(); break;
6956 case 7: jj_3_8(); break;
6960 } while (p != null);
6965 static final private void jj_save(int index, int xla) {
6966 JJCalls p = jj_2_rtns[index];
6967 while (p.gen > jj_gen) {
6968 if (p.next == null) { p = p.next = new JJCalls(); break; }
6971 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
6974 static final class JJCalls {