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.ArrayList;
12 import java.io.StringReader;
14 import java.text.MessageFormat;
16 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
17 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
18 import net.sourceforge.phpdt.internal.compiler.ast.*;
19 import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
20 import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
21 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
22 import net.sourceforge.phpdt.internal.corext.Assert;
26 * This php parser is inspired by the Java 1.2 grammar example
27 * given with JavaCC. You can get JavaCC at http://www.webgain.com
28 * You can test the parser with the PHPParserTestCase2.java
29 * @author Matthieu Casanova
31 public final class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
33 //todo : fix the variables names bug
34 //todo : handle tilde operator
37 /** The current segment. */
38 private static OutlineableWithChildren currentSegment;
40 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
41 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
42 static PHPOutlineInfo outlineInfo;
44 /** The error level of the current ParseException. */
45 private static int errorLevel = ERROR;
46 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
47 private static String errorMessage;
49 private static int errorStart = -1;
50 private static int errorEnd = -1;
51 private static PHPDocument phpDocument;
53 private static final String SYNTAX_ERROR_CHAR = "syntax error";
55 * The point where html starts.
56 * It will be used by the token manager to create HTMLCode objects
58 public static int htmlStart;
61 private final static int AstStackIncrement = 100;
62 /** The stack of node. */
63 private static AstNode[] nodes;
64 /** The cursor in expression stack. */
65 private static int nodePtr;
67 public static final boolean PARSER_DEBUG = false;
69 public final void setFileToParse(final IFile fileToParse) {
70 PHPParser.fileToParse = fileToParse;
76 public PHPParser(final IFile fileToParse) {
77 this(new StringReader(""));
78 PHPParser.fileToParse = fileToParse;
81 public static final void phpParserTester(final String strEval) throws ParseException {
82 final StringReader stream = new StringReader(strEval);
83 if (jj_input_stream == null) {
84 jj_input_stream = new SimpleCharStream(stream, 1, 1);
86 ReInit(new StringReader(strEval));
88 phpDocument = new PHPDocument(null,"_root".toCharArray());
89 currentSegment = phpDocument;
90 outlineInfo = new PHPOutlineInfo(null, currentSegment);
91 PHPParserTokenManager.SwitchTo(PHPParserTokenManager.PHPPARSING);
95 public static final void htmlParserTester(final File fileName) throws FileNotFoundException, ParseException {
96 final Reader stream = new FileReader(fileName);
97 if (jj_input_stream == null) {
98 jj_input_stream = new SimpleCharStream(stream, 1, 1);
102 phpDocument = new PHPDocument(null,"_root".toCharArray());
103 currentSegment = phpDocument;
104 outlineInfo = new PHPOutlineInfo(null, currentSegment);
108 public static final void htmlParserTester(final String strEval) throws ParseException {
109 final StringReader stream = new StringReader(strEval);
110 if (jj_input_stream == null) {
111 jj_input_stream = new SimpleCharStream(stream, 1, 1);
115 phpDocument = new PHPDocument(null,"_root".toCharArray());
116 currentSegment = phpDocument;
117 outlineInfo = new PHPOutlineInfo(null, currentSegment);
122 * Reinitialize the parser.
124 private static final void init() {
125 nodes = new AstNode[AstStackIncrement];
131 * Add an php node on the stack.
132 * @param node the node that will be added to the stack
134 private static final void pushOnAstNodes(final AstNode node) {
136 nodes[++nodePtr] = node;
137 } catch (IndexOutOfBoundsException e) {
138 final int oldStackLength = nodes.length;
139 final AstNode[] oldStack = nodes;
140 nodes = new AstNode[oldStackLength + AstStackIncrement];
141 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
142 nodePtr = oldStackLength;
143 nodes[nodePtr] = node;
147 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
148 phpDocument = new PHPDocument(parent,"_root".toCharArray());
149 currentSegment = phpDocument;
150 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
151 final StringReader stream = new StringReader(s);
152 if (jj_input_stream == null) {
153 jj_input_stream = new SimpleCharStream(stream, 1, 1);
159 phpDocument.nodes = new AstNode[nodes.length];
160 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
161 if (PHPeclipsePlugin.DEBUG) {
162 PHPeclipsePlugin.log(1,phpDocument.toString());
164 } catch (ParseException e) {
165 processParseException(e);
171 * This function will throw the exception if we are in debug mode
172 * and process it if we are in production mode.
173 * this should be fast since the PARSER_DEBUG is static final so the difference will be at compile time
174 * @param e the exception
175 * @throws ParseException the thrown exception
177 private static void processParseExceptionDebug(final ParseException e) throws ParseException {
181 processParseException(e);
184 * This method will process the parse exception.
185 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
186 * @param e the ParseException
188 private static void processParseException(final ParseException e) {
189 if (errorMessage == null) {
190 PHPeclipsePlugin.log(e);
191 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
192 errorStart = e.currentToken.sourceStart;
193 errorEnd = e.currentToken.sourceEnd;
197 // if (PHPeclipsePlugin.DEBUG) PHPeclipsePlugin.log(e);
201 * Create marker for the parse error.
202 * @param e the ParseException
204 private static void setMarker(final ParseException e) {
206 if (errorStart == -1) {
207 setMarker(fileToParse,
209 e.currentToken.sourceStart,
210 e.currentToken.sourceEnd,
212 "Line " + e.currentToken.beginLine+", "+e.currentToken.sourceStart+':'+e.currentToken.sourceEnd);
214 setMarker(fileToParse,
219 "Line " + e.currentToken.beginLine+", "+errorStart+':'+errorEnd);
223 } catch (CoreException e2) {
224 PHPeclipsePlugin.log(e2);
228 private static void scanLine(final String output,
231 final int brIndx) throws CoreException {
233 final StringBuffer lineNumberBuffer = new StringBuffer(10);
235 current = output.substring(indx, brIndx);
237 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
238 final int onLine = current.indexOf("on line <b>");
240 lineNumberBuffer.delete(0, lineNumberBuffer.length());
241 for (int i = onLine; i < current.length(); i++) {
242 ch = current.charAt(i);
243 if ('0' <= ch && '9' >= ch) {
244 lineNumberBuffer.append(ch);
248 final int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
250 final Hashtable attributes = new Hashtable();
252 current = current.replaceAll("\n", "");
253 current = current.replaceAll("<b>", "");
254 current = current.replaceAll("</b>", "");
255 MarkerUtilities.setMessage(attributes, current);
257 if (current.indexOf(PARSE_ERROR_STRING) != -1)
258 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
259 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
260 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
262 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
263 MarkerUtilities.setLineNumber(attributes, lineNumber);
264 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
269 public final void parse(final String s) {
270 final StringReader stream = new StringReader(s);
271 if (jj_input_stream == null) {
272 jj_input_stream = new SimpleCharStream(stream, 1, 1);
278 } catch (ParseException e) {
279 processParseException(e);
284 * Call the php parse command ( php -l -f <filename> )
285 * and create markers according to the external parser output
287 public static void phpExternalParse(final IFile file) {
288 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
289 final String filename = file.getLocation().toString();
291 final String[] arguments = { filename };
292 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
293 final String command = form.format(arguments);
295 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
298 // parse the buffer to find the errors and warnings
299 createMarkers(parserResult, file);
300 } catch (CoreException e) {
301 PHPeclipsePlugin.log(e);
306 * Put a new html block in the stack.
308 public static final void createNewHTMLCode() {
309 final int currentPosition = token.sourceStart;
310 if (currentPosition == htmlStart ||
311 currentPosition < htmlStart ||
312 currentPosition > SimpleCharStream.currentBuffer.length()) {
315 final String html = SimpleCharStream.currentBuffer.substring(htmlStart, currentPosition);
316 pushOnAstNodes(new HTMLCode(html, htmlStart,currentPosition));
319 /** Create a new task. */
320 public static final void createNewTask(final int todoStart) {
321 final String todo = SimpleCharStream.currentBuffer.substring(todoStart,
322 SimpleCharStream.currentBuffer.indexOf("\n",
326 setMarker(fileToParse,
328 SimpleCharStream.getBeginLine(),
330 "Line "+SimpleCharStream.getBeginLine());
331 } catch (CoreException e) {
332 PHPeclipsePlugin.log(e);
337 private static final void parse() throws ParseException {
341 static final public void todo() throws ParseException {
343 todoToken = jj_consume_token(23);
344 createNewTask(todoToken.sourceStart);
347 static final public void phpTest() throws ParseException {
352 static final public void phpFile() throws ParseException {
356 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
395 case INTEGER_LITERAL:
396 case FLOATING_POINT_LITERAL:
412 PHPParser.createNewHTMLCode();
413 } catch (TokenMgrError e) {
414 PHPeclipsePlugin.log(e);
415 errorStart = SimpleCharStream.beginOffset;
416 errorEnd = SimpleCharStream.endOffset;
417 errorMessage = e.getMessage();
419 {if (true) throw generateParseException();}
424 * A php block is a <?= expression [;]?>
425 * or <?php somephpcode ?>
426 * or <? somephpcode ?>
428 static final public void PhpBlock() throws ParseException {
429 final PHPEchoBlock phpEchoBlock;
430 final Token token,phpEnd;
431 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
433 phpEchoBlock = phpEchoBlock();
434 pushOnAstNodes(phpEchoBlock);
473 case INTEGER_LITERAL:
474 case FLOATING_POINT_LITERAL:
482 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
485 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
487 jj_consume_token(PHPSTARTLONG);
490 token = jj_consume_token(PHPSTARTSHORT);
492 setMarker(fileToParse,
493 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
497 "Line " + token.beginLine);
498 } catch (CoreException e) {
499 PHPeclipsePlugin.log(e);
504 jj_consume_token(-1);
505 throw new ParseException();
512 PHPParser.createNewHTMLCode();
515 phpEnd = jj_consume_token(PHPEND);
516 htmlStart = phpEnd.sourceEnd;
517 } catch (ParseException e) {
518 errorMessage = "'?>' expected";
520 errorStart = e.currentToken.sourceStart;
521 errorEnd = e.currentToken.sourceEnd;
522 processParseExceptionDebug(e);
527 jj_consume_token(-1);
528 throw new ParseException();
532 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
533 final Expression expr;
534 final PHPEchoBlock echoBlock;
535 final Token token, token2;
536 token = jj_consume_token(PHPECHOSTART);
537 PHPParser.createNewHTMLCode();
539 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
541 jj_consume_token(SEMICOLON);
547 token2 = jj_consume_token(PHPEND);
548 htmlStart = token2.sourceEnd;
550 echoBlock = new PHPEchoBlock(expr,token.sourceStart,token2.sourceEnd);
551 pushOnAstNodes(echoBlock);
552 {if (true) return echoBlock;}
553 throw new Error("Missing return statement in function");
556 static final public void Php() throws ParseException {
559 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
594 case INTEGER_LITERAL:
595 case FLOATING_POINT_LITERAL:
613 static final public ClassDeclaration ClassDeclaration() throws ParseException {
614 final ClassDeclaration classDeclaration;
615 Token className = null;
616 final Token superclassName, token, extendsToken;
617 String classNameImage = SYNTAX_ERROR_CHAR;
618 String superclassNameImage = null;
620 token = jj_consume_token(CLASS);
622 className = jj_consume_token(IDENTIFIER);
623 classNameImage = className.image;
624 } catch (ParseException e) {
625 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
627 errorStart = token.sourceEnd+1;
628 errorEnd = token.sourceEnd+1;
629 processParseExceptionDebug(e);
631 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
633 extendsToken = jj_consume_token(EXTENDS);
635 superclassName = jj_consume_token(IDENTIFIER);
636 superclassNameImage = superclassName.image;
637 } catch (ParseException e) {
638 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
640 errorStart = extendsToken.sourceEnd+1;
641 errorEnd = extendsToken.sourceEnd+1;
642 processParseExceptionDebug(e);
643 superclassNameImage = SYNTAX_ERROR_CHAR;
651 if (className == null) {
652 start = token.sourceStart;
653 end = token.sourceEnd;
655 start = className.sourceStart;
656 end = className.sourceEnd;
658 if (superclassNameImage == null) {
660 classDeclaration = new ClassDeclaration(currentSegment,
665 classDeclaration = new ClassDeclaration(currentSegment,
671 currentSegment.add(classDeclaration);
672 currentSegment = classDeclaration;
673 classEnd = ClassBody(classDeclaration);
674 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
675 classDeclaration.sourceEnd = classEnd;
676 pushOnAstNodes(classDeclaration);
677 {if (true) return classDeclaration;}
678 throw new Error("Missing return statement in function");
681 static final public int ClassBody(final ClassDeclaration classDeclaration) throws ParseException {
684 jj_consume_token(LBRACE);
685 } catch (ParseException e) {
686 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "'. '{' expected";
688 errorStart = e.currentToken.sourceStart;
689 errorEnd = e.currentToken.sourceEnd;
690 processParseExceptionDebug(e);
694 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
703 ClassBodyDeclaration(classDeclaration);
706 token = jj_consume_token(RBRACE);
707 {if (true) return token.sourceEnd;}
708 } catch (ParseException e) {
709 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. 'var', 'function' or '}' expected";
711 errorStart = e.currentToken.sourceStart;
712 errorEnd = e.currentToken.sourceEnd;
713 processParseExceptionDebug(e);
714 {if (true) return PHPParser.token.sourceEnd;}
716 throw new Error("Missing return statement in function");
720 * A class can contain only methods and fields.
722 static final public void ClassBodyDeclaration(final ClassDeclaration classDeclaration) throws ParseException {
723 final MethodDeclaration method;
724 final FieldDeclaration field;
725 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
727 method = MethodDeclaration();
728 method.analyzeCode();
729 classDeclaration.addMethod(method);
732 field = FieldDeclaration();
733 classDeclaration.addField(field);
737 jj_consume_token(-1);
738 throw new ParseException();
743 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
744 * it is only used by ClassBodyDeclaration()
746 static final public FieldDeclaration FieldDeclaration() throws ParseException {
747 VariableDeclaration variableDeclaration;
748 final VariableDeclaration[] list;
749 final ArrayList arrayList = new ArrayList();
753 token = jj_consume_token(VAR);
754 variableDeclaration = VariableDeclaratorNoSuffix();
755 arrayList.add(variableDeclaration);
756 pos = variableDeclaration.sourceEnd;
759 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
767 jj_consume_token(COMMA);
768 variableDeclaration = VariableDeclaratorNoSuffix();
769 arrayList.add(variableDeclaration);
770 outlineInfo.addVariable(variableDeclaration.name());
771 pos = variableDeclaration.sourceEnd;
774 token2 = jj_consume_token(SEMICOLON);
775 } catch (ParseException e) {
776 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
780 processParseExceptionDebug(e);
782 list = new VariableDeclaration[arrayList.size()];
783 arrayList.toArray(list);
785 if (token2 == null) {
786 end = list[list.length-1].sourceEnd;
788 end = token2.sourceEnd;
790 {if (true) return new FieldDeclaration(list,
794 throw new Error("Missing return statement in function");
798 * a strict variable declarator : there cannot be a suffix here.
799 * It will be used by fields and formal parameters
801 static final public VariableDeclaration VariableDeclaratorNoSuffix() throws ParseException {
802 final Token token, lbrace,rbrace;
803 Expression expr, initializer = null;
806 jj_consume_token(DOLLAR);
807 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
809 token = jj_consume_token(IDENTIFIER);
810 variable = new Variable(token.image,token.sourceStart,token.sourceEnd);
813 lbrace = jj_consume_token(LBRACE);
815 rbrace = jj_consume_token(RBRACE);
816 variable = new Variable(expr,lbrace.sourceStart,rbrace.sourceEnd);
820 jj_consume_token(-1);
821 throw new ParseException();
823 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
825 assignToken = jj_consume_token(ASSIGN);
827 initializer = VariableInitializer();
828 } catch (ParseException e) {
829 errorMessage = "Literal expression expected in variable initializer";
831 errorStart = assignToken.sourceEnd +1;
832 errorEnd = assignToken.sourceEnd +1;
833 processParseExceptionDebug(e);
840 if (initializer == null) {
841 {if (true) return new VariableDeclaration(currentSegment,
843 variable.sourceStart,
844 variable.sourceEnd);}
846 {if (true) return new VariableDeclaration(currentSegment,
849 VariableDeclaration.EQUAL,
850 variable.sourceStart);}
851 throw new Error("Missing return statement in function");
855 * this will be used by static statement
857 static final public VariableDeclaration VariableDeclarator() throws ParseException {
858 final AbstractVariable variable;
859 Expression initializer = null;
861 variable = VariableDeclaratorId();
862 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
864 token = jj_consume_token(ASSIGN);
866 initializer = VariableInitializer();
867 } catch (ParseException e) {
868 errorMessage = "Literal expression expected in variable initializer";
870 errorStart = token.sourceEnd+1;
871 errorEnd = token.sourceEnd+1;
872 processParseExceptionDebug(e);
879 if (initializer == null) {
880 {if (true) return new VariableDeclaration(currentSegment,
882 variable.sourceStart,
883 variable.sourceEnd);}
885 {if (true) return new VariableDeclaration(currentSegment,
888 VariableDeclaration.EQUAL,
889 variable.sourceStart);}
890 throw new Error("Missing return statement in function");
895 * @return the variable name (with suffix)
897 static final public AbstractVariable VariableDeclaratorId() throws ParseException {
899 AbstractVariable expression = null;
909 expression = VariableSuffix(var);
911 if (expression == null) {
912 {if (true) return var;}
914 {if (true) return expression;}
915 } catch (ParseException e) {
916 errorMessage = "'$' expected for variable identifier";
918 errorStart = e.currentToken.sourceStart;
919 errorEnd = e.currentToken.sourceEnd;
922 throw new Error("Missing return statement in function");
925 static final public Variable Variable() throws ParseException {
926 Variable variable = null;
928 token = jj_consume_token(DOLLAR);
930 {if (true) return variable;}
931 throw new Error("Missing return statement in function");
934 static final public Variable Var() throws ParseException {
935 Variable variable = null;
936 final Token token,token2;
937 ConstantIdentifier constant;
938 Expression expression;
939 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
941 token = jj_consume_token(DOLLAR);
943 {if (true) return new Variable(variable,variable.sourceStart,variable.sourceEnd);}
946 token = jj_consume_token(LBRACE);
947 expression = Expression();
948 token2 = jj_consume_token(RBRACE);
949 {if (true) return new Variable(expression,
954 token = jj_consume_token(IDENTIFIER);
955 outlineInfo.addVariable('$' + token.image);
956 {if (true) return new Variable(token.image,token.sourceStart,token.sourceEnd);}
960 jj_consume_token(-1);
961 throw new ParseException();
963 throw new Error("Missing return statement in function");
966 static final public Expression VariableInitializer() throws ParseException {
967 final Expression expr;
968 final Token token, token2;
969 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
973 case INTEGER_LITERAL:
974 case FLOATING_POINT_LITERAL:
978 {if (true) return expr;}
981 token2 = jj_consume_token(MINUS);
982 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
983 case INTEGER_LITERAL:
984 token = jj_consume_token(INTEGER_LITERAL);
986 case FLOATING_POINT_LITERAL:
987 token = jj_consume_token(FLOATING_POINT_LITERAL);
991 jj_consume_token(-1);
992 throw new ParseException();
994 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
996 token2.sourceStart);}
999 token2 = jj_consume_token(PLUS);
1000 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1001 case INTEGER_LITERAL:
1002 token = jj_consume_token(INTEGER_LITERAL);
1004 case FLOATING_POINT_LITERAL:
1005 token = jj_consume_token(FLOATING_POINT_LITERAL);
1008 jj_la1[15] = jj_gen;
1009 jj_consume_token(-1);
1010 throw new ParseException();
1012 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
1014 token2.sourceStart);}
1017 expr = ArrayDeclarator();
1018 {if (true) return expr;}
1021 token = jj_consume_token(IDENTIFIER);
1022 {if (true) return new ConstantIdentifier(token);}
1025 jj_la1[16] = jj_gen;
1026 jj_consume_token(-1);
1027 throw new ParseException();
1029 throw new Error("Missing return statement in function");
1032 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
1033 final Expression expr,expr2;
1034 expr = Expression();
1035 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1037 jj_consume_token(ARRAYASSIGN);
1038 expr2 = Expression();
1039 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
1042 jj_la1[17] = jj_gen;
1045 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
1046 throw new Error("Missing return statement in function");
1049 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
1050 ArrayVariableDeclaration expr;
1051 final ArrayList list = new ArrayList();
1052 jj_consume_token(LPAREN);
1053 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1069 case INTEGER_LITERAL:
1070 case FLOATING_POINT_LITERAL:
1071 case STRING_LITERAL:
1076 expr = ArrayVariable();
1085 jj_consume_token(COMMA);
1086 expr = ArrayVariable();
1091 jj_la1[18] = jj_gen;
1094 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1096 jj_consume_token(COMMA);
1100 jj_la1[19] = jj_gen;
1103 jj_consume_token(RPAREN);
1104 final ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1106 {if (true) return vars;}
1107 throw new Error("Missing return statement in function");
1111 * A Method Declaration.
1112 * <b>function</b> MetodDeclarator() Block()
1114 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1115 final MethodDeclaration functionDeclaration;
1117 final OutlineableWithChildren seg = currentSegment;
1119 token = jj_consume_token(FUNCTION);
1121 functionDeclaration = MethodDeclarator(token.sourceStart);
1122 outlineInfo.addVariable(functionDeclaration.name);
1123 } catch (ParseException e) {
1124 if (errorMessage != null) {if (true) throw e;}
1125 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1127 errorStart = e.currentToken.sourceStart;
1128 errorEnd = e.currentToken.sourceEnd;
1129 {if (true) throw e;}
1131 currentSegment = functionDeclaration;
1133 functionDeclaration.statements = block.statements;
1134 currentSegment = seg;
1135 {if (true) return functionDeclaration;}
1136 throw new Error("Missing return statement in function");
1140 * A MethodDeclarator.
1141 * [&] IDENTIFIER(parameters ...).
1142 * @return a function description for the outline
1144 static final public MethodDeclaration MethodDeclarator(final int start) throws ParseException {
1145 Token identifier = null;
1146 Token reference = null;
1147 final ArrayList formalParameters = new ArrayList();
1148 String identifierChar = SYNTAX_ERROR_CHAR;
1150 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1152 reference = jj_consume_token(BIT_AND);
1153 end = reference.sourceEnd;
1156 jj_la1[20] = jj_gen;
1160 identifier = jj_consume_token(IDENTIFIER);
1161 identifierChar = identifier.image;
1162 end = identifier.sourceEnd;
1163 } catch (ParseException e) {
1164 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1166 errorStart = e.currentToken.sourceEnd;
1167 errorEnd = e.currentToken.next.sourceStart;
1168 processParseExceptionDebug(e);
1170 end = FormalParameters(formalParameters);
1171 int nameStart, nameEnd;
1172 if (identifier == null) {
1173 if (reference == null) {
1174 nameStart = start + 9;
1175 nameEnd = start + 10;
1177 nameStart = reference.sourceEnd + 1;
1178 nameEnd = reference.sourceEnd + 2;
1181 nameStart = identifier.sourceStart;
1182 nameEnd = identifier.sourceEnd;
1184 {if (true) return new MethodDeclaration(currentSegment,
1192 throw new Error("Missing return statement in function");
1196 * FormalParameters follows method identifier.
1197 * (FormalParameter())
1199 static final public int FormalParameters(final ArrayList parameters) throws ParseException {
1200 VariableDeclaration var;
1202 Token tok = PHPParser.token;
1203 int end = tok.sourceEnd;
1205 tok = jj_consume_token(LPAREN);
1206 end = tok.sourceEnd;
1207 } catch (ParseException e) {
1208 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1210 errorStart = e.currentToken.next.sourceStart;
1211 errorEnd = e.currentToken.next.sourceEnd;
1212 processParseExceptionDebug(e);
1214 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1217 var = FormalParameter();
1218 parameters.add(var);end = var.sourceEnd;
1221 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1226 jj_la1[21] = jj_gen;
1229 jj_consume_token(COMMA);
1230 var = FormalParameter();
1231 parameters.add(var);end = var.sourceEnd;
1235 jj_la1[22] = jj_gen;
1239 token = jj_consume_token(RPAREN);
1240 end = token.sourceEnd;
1241 } catch (ParseException e) {
1242 errorMessage = "')' expected";
1244 errorStart = e.currentToken.next.sourceStart;
1245 errorEnd = e.currentToken.next.sourceEnd;
1246 processParseExceptionDebug(e);
1248 {if (true) return end;}
1249 throw new Error("Missing return statement in function");
1253 * A formal parameter.
1254 * $varname[=value] (,$varname[=value])
1256 static final public VariableDeclaration FormalParameter() throws ParseException {
1257 final VariableDeclaration variableDeclaration;
1259 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1261 token = jj_consume_token(BIT_AND);
1264 jj_la1[23] = jj_gen;
1267 variableDeclaration = VariableDeclaratorNoSuffix();
1268 outlineInfo.addVariable('$'+variableDeclaration.name());
1269 if (token != null) {
1270 variableDeclaration.setReference(true);
1272 {if (true) return variableDeclaration;}
1273 throw new Error("Missing return statement in function");
1276 static final public ConstantIdentifier Type() throws ParseException {
1278 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1280 token = jj_consume_token(STRING);
1281 {if (true) return new ConstantIdentifier(token);}
1284 token = jj_consume_token(BOOL);
1285 {if (true) return new ConstantIdentifier(token);}
1288 token = jj_consume_token(BOOLEAN);
1289 {if (true) return new ConstantIdentifier(token);}
1292 token = jj_consume_token(REAL);
1293 {if (true) return new ConstantIdentifier(token);}
1296 token = jj_consume_token(DOUBLE);
1297 {if (true) return new ConstantIdentifier(token);}
1300 token = jj_consume_token(FLOAT);
1301 {if (true) return new ConstantIdentifier(token);}
1304 token = jj_consume_token(INT);
1305 {if (true) return new ConstantIdentifier(token);}
1308 token = jj_consume_token(INTEGER);
1309 {if (true) return new ConstantIdentifier(token);}
1312 token = jj_consume_token(OBJECT);
1313 {if (true) return new ConstantIdentifier(token);}
1316 jj_la1[24] = jj_gen;
1317 jj_consume_token(-1);
1318 throw new ParseException();
1320 throw new Error("Missing return statement in function");
1323 static final public Expression Expression() throws ParseException {
1324 final Expression expr;
1325 Expression initializer = null;
1326 int assignOperator = -1;
1327 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1341 case INTEGER_LITERAL:
1342 case FLOATING_POINT_LITERAL:
1343 case STRING_LITERAL:
1348 expr = ConditionalExpression();
1349 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1362 case RSIGNEDSHIFTASSIGN:
1363 assignOperator = AssignmentOperator();
1365 initializer = Expression();
1366 } catch (ParseException e) {
1367 if (errorMessage != null) {
1368 {if (true) throw e;}
1370 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1372 errorEnd = SimpleCharStream.getPosition();
1373 {if (true) throw e;}
1377 jj_la1[25] = jj_gen;
1380 if (assignOperator != -1) {// todo : change this, very very bad :(
1381 if (expr instanceof AbstractVariable) {
1382 {if (true) return new VariableDeclaration(currentSegment,
1383 (AbstractVariable) expr,
1386 initializer.sourceEnd);}
1388 String varName = expr.toStringExpression().substring(1);
1389 {if (true) return new VariableDeclaration(currentSegment,
1390 new Variable(varName,
1394 initializer.sourceEnd);}
1396 {if (true) return expr;}
1400 expr = ExpressionWBang();
1401 {if (true) return expr;}
1404 jj_la1[26] = jj_gen;
1405 jj_consume_token(-1);
1406 throw new ParseException();
1408 throw new Error("Missing return statement in function");
1411 static final public Expression ExpressionWBang() throws ParseException {
1412 final Expression expr;
1414 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1416 token = jj_consume_token(BANG);
1417 expr = ExpressionWBang();
1418 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
1422 expr = ExpressionNoBang();
1423 {if (true) return expr;}
1426 jj_la1[27] = jj_gen;
1427 jj_consume_token(-1);
1428 throw new ParseException();
1430 throw new Error("Missing return statement in function");
1433 static final public Expression ExpressionNoBang() throws ParseException {
1435 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1437 expr = ListExpression();
1438 {if (true) return expr;}
1441 expr = PrintExpression();
1442 {if (true) return expr;}
1445 jj_la1[28] = jj_gen;
1446 jj_consume_token(-1);
1447 throw new ParseException();
1449 throw new Error("Missing return statement in function");
1453 * Any assignement operator.
1454 * @return the assignement operator id
1456 static final public int AssignmentOperator() throws ParseException {
1457 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1459 jj_consume_token(ASSIGN);
1460 {if (true) return VariableDeclaration.EQUAL;}
1463 jj_consume_token(STARASSIGN);
1464 {if (true) return VariableDeclaration.STAR_EQUAL;}
1467 jj_consume_token(SLASHASSIGN);
1468 {if (true) return VariableDeclaration.SLASH_EQUAL;}
1471 jj_consume_token(REMASSIGN);
1472 {if (true) return VariableDeclaration.REM_EQUAL;}
1475 jj_consume_token(PLUSASSIGN);
1476 {if (true) return VariableDeclaration.PLUS_EQUAL;}
1479 jj_consume_token(MINUSASSIGN);
1480 {if (true) return VariableDeclaration.MINUS_EQUAL;}
1483 jj_consume_token(LSHIFTASSIGN);
1484 {if (true) return VariableDeclaration.LSHIFT_EQUAL;}
1486 case RSIGNEDSHIFTASSIGN:
1487 jj_consume_token(RSIGNEDSHIFTASSIGN);
1488 {if (true) return VariableDeclaration.RSIGNEDSHIFT_EQUAL;}
1491 jj_consume_token(ANDASSIGN);
1492 {if (true) return VariableDeclaration.AND_EQUAL;}
1495 jj_consume_token(XORASSIGN);
1496 {if (true) return VariableDeclaration.XOR_EQUAL;}
1499 jj_consume_token(ORASSIGN);
1500 {if (true) return VariableDeclaration.OR_EQUAL;}
1503 jj_consume_token(DOTASSIGN);
1504 {if (true) return VariableDeclaration.DOT_EQUAL;}
1507 jj_consume_token(TILDEEQUAL);
1508 {if (true) return VariableDeclaration.TILDE_EQUAL;}
1511 jj_la1[29] = jj_gen;
1512 jj_consume_token(-1);
1513 throw new ParseException();
1515 throw new Error("Missing return statement in function");
1518 static final public Expression ConditionalExpression() throws ParseException {
1519 final Expression expr;
1520 Expression expr2 = null;
1521 Expression expr3 = null;
1522 expr = ConditionalOrExpression();
1523 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1525 jj_consume_token(HOOK);
1526 expr2 = Expression();
1527 jj_consume_token(COLON);
1528 expr3 = ConditionalExpression();
1531 jj_la1[30] = jj_gen;
1534 if (expr3 == null) {
1535 {if (true) return expr;}
1537 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1538 throw new Error("Missing return statement in function");
1541 static final public Expression ConditionalOrExpression() throws ParseException {
1542 Expression expr,expr2;
1544 expr = ConditionalAndExpression();
1547 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1553 jj_la1[31] = jj_gen;
1556 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1558 jj_consume_token(OR_OR);
1559 operator = OperatorIds.OR_OR;
1562 jj_consume_token(_ORL);
1563 operator = OperatorIds.ORL;
1566 jj_la1[32] = jj_gen;
1567 jj_consume_token(-1);
1568 throw new ParseException();
1570 expr2 = ConditionalAndExpression();
1571 expr = new BinaryExpression(expr,expr2,operator);
1573 {if (true) return expr;}
1574 throw new Error("Missing return statement in function");
1577 static final public Expression ConditionalAndExpression() throws ParseException {
1578 Expression expr,expr2;
1580 expr = ConcatExpression();
1583 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1589 jj_la1[33] = jj_gen;
1592 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1594 jj_consume_token(AND_AND);
1595 operator = OperatorIds.AND_AND;
1598 jj_consume_token(_ANDL);
1599 operator = OperatorIds.ANDL;
1602 jj_la1[34] = jj_gen;
1603 jj_consume_token(-1);
1604 throw new ParseException();
1606 expr2 = ConcatExpression();
1607 expr = new BinaryExpression(expr,expr2,operator);
1609 {if (true) return expr;}
1610 throw new Error("Missing return statement in function");
1613 static final public Expression ConcatExpression() throws ParseException {
1614 Expression expr,expr2;
1615 expr = InclusiveOrExpression();
1618 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1623 jj_la1[35] = jj_gen;
1626 jj_consume_token(DOT);
1627 expr2 = InclusiveOrExpression();
1628 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1630 {if (true) return expr;}
1631 throw new Error("Missing return statement in function");
1634 static final public Expression InclusiveOrExpression() throws ParseException {
1635 Expression expr,expr2;
1636 expr = ExclusiveOrExpression();
1639 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1644 jj_la1[36] = jj_gen;
1647 jj_consume_token(BIT_OR);
1648 expr2 = ExclusiveOrExpression();
1649 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1651 {if (true) return expr;}
1652 throw new Error("Missing return statement in function");
1655 static final public Expression ExclusiveOrExpression() throws ParseException {
1656 Expression expr,expr2;
1657 expr = AndExpression();
1660 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1665 jj_la1[37] = jj_gen;
1668 jj_consume_token(XOR);
1669 expr2 = AndExpression();
1670 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1672 {if (true) return expr;}
1673 throw new Error("Missing return statement in function");
1676 static final public Expression AndExpression() throws ParseException {
1677 Expression expr,expr2;
1678 expr = EqualityExpression();
1681 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1686 jj_la1[38] = jj_gen;
1689 jj_consume_token(BIT_AND);
1690 expr2 = EqualityExpression();
1691 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1693 {if (true) return expr;}
1694 throw new Error("Missing return statement in function");
1697 static final public Expression EqualityExpression() throws ParseException {
1698 Expression expr,expr2;
1701 expr = RelationalExpression();
1704 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1708 case BANGDOUBLEEQUAL:
1713 jj_la1[39] = jj_gen;
1716 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1718 token = jj_consume_token(EQUAL_EQUAL);
1719 operator = OperatorIds.EQUAL_EQUAL;
1722 token = jj_consume_token(DIF);
1723 operator = OperatorIds.DIF;
1726 token = jj_consume_token(NOT_EQUAL);
1727 operator = OperatorIds.DIF;
1729 case BANGDOUBLEEQUAL:
1730 token = jj_consume_token(BANGDOUBLEEQUAL);
1731 operator = OperatorIds.BANG_EQUAL_EQUAL;
1734 token = jj_consume_token(TRIPLEEQUAL);
1735 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1738 jj_la1[40] = jj_gen;
1739 jj_consume_token(-1);
1740 throw new ParseException();
1743 expr2 = RelationalExpression();
1744 } catch (ParseException e) {
1745 if (errorMessage != null) {
1746 {if (true) throw e;}
1748 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1750 errorStart = token.sourceEnd +1;
1751 errorEnd = token.sourceEnd +1;
1752 expr2 = new ConstantIdentifier(SYNTAX_ERROR_CHAR,token.sourceEnd +1,token.sourceEnd +1);
1753 processParseExceptionDebug(e);
1755 expr = new BinaryExpression(expr,expr2,operator);
1757 {if (true) return expr;}
1758 throw new Error("Missing return statement in function");
1761 static final public Expression RelationalExpression() throws ParseException {
1762 Expression expr,expr2;
1764 expr = ShiftExpression();
1767 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1775 jj_la1[41] = jj_gen;
1778 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1780 jj_consume_token(LT);
1781 operator = OperatorIds.LESS;
1784 jj_consume_token(GT);
1785 operator = OperatorIds.GREATER;
1788 jj_consume_token(LE);
1789 operator = OperatorIds.LESS_EQUAL;
1792 jj_consume_token(GE);
1793 operator = OperatorIds.GREATER_EQUAL;
1796 jj_la1[42] = jj_gen;
1797 jj_consume_token(-1);
1798 throw new ParseException();
1800 expr2 = ShiftExpression();
1801 expr = new BinaryExpression(expr,expr2,operator);
1803 {if (true) return expr;}
1804 throw new Error("Missing return statement in function");
1807 static final public Expression ShiftExpression() throws ParseException {
1808 Expression expr,expr2;
1810 expr = AdditiveExpression();
1813 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1816 case RUNSIGNEDSHIFT:
1820 jj_la1[43] = jj_gen;
1823 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1825 jj_consume_token(LSHIFT);
1826 operator = OperatorIds.LEFT_SHIFT;
1829 jj_consume_token(RSIGNEDSHIFT);
1830 operator = OperatorIds.RIGHT_SHIFT;
1832 case RUNSIGNEDSHIFT:
1833 jj_consume_token(RUNSIGNEDSHIFT);
1834 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1837 jj_la1[44] = jj_gen;
1838 jj_consume_token(-1);
1839 throw new ParseException();
1841 expr2 = AdditiveExpression();
1842 expr = new BinaryExpression(expr,expr2,operator);
1844 {if (true) return expr;}
1845 throw new Error("Missing return statement in function");
1848 static final public Expression AdditiveExpression() throws ParseException {
1849 Expression expr,expr2;
1851 expr = MultiplicativeExpression();
1854 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1860 jj_la1[45] = jj_gen;
1863 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1865 jj_consume_token(PLUS);
1866 operator = OperatorIds.PLUS;
1869 jj_consume_token(MINUS);
1870 operator = OperatorIds.MINUS;
1873 jj_la1[46] = jj_gen;
1874 jj_consume_token(-1);
1875 throw new ParseException();
1877 expr2 = MultiplicativeExpression();
1878 expr = new BinaryExpression(expr,expr2,operator);
1880 {if (true) return expr;}
1881 throw new Error("Missing return statement in function");
1884 static final public Expression MultiplicativeExpression() throws ParseException {
1885 Expression expr,expr2;
1888 expr = UnaryExpression();
1889 } catch (ParseException e) {
1890 if (errorMessage != null) {if (true) throw e;}
1891 errorMessage = "unexpected token '"+e.currentToken.next.image+'\'';
1893 errorStart = PHPParser.token.sourceStart;
1894 errorEnd = PHPParser.token.sourceEnd;
1895 {if (true) throw e;}
1899 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1906 jj_la1[47] = jj_gen;
1909 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1911 jj_consume_token(STAR);
1912 operator = OperatorIds.MULTIPLY;
1915 jj_consume_token(SLASH);
1916 operator = OperatorIds.DIVIDE;
1919 jj_consume_token(REMAINDER);
1920 operator = OperatorIds.REMAINDER;
1923 jj_la1[48] = jj_gen;
1924 jj_consume_token(-1);
1925 throw new ParseException();
1927 expr2 = UnaryExpression();
1928 expr = new BinaryExpression(expr,expr2,operator);
1930 {if (true) return expr;}
1931 throw new Error("Missing return statement in function");
1935 * An unary expression starting with @, & or nothing
1937 static final public Expression UnaryExpression() throws ParseException {
1938 final Expression expr;
1939 /* <BIT_AND> expr = UnaryExpressionNoPrefix() //why did I had that ?
1940 {return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1942 expr = AtNotTildeUnaryExpression();
1943 {if (true) return expr;}
1944 throw new Error("Missing return statement in function");
1947 static final public Expression AtNotTildeUnaryExpression() throws ParseException {
1948 final Expression expr;
1950 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1952 token = jj_consume_token(AT);
1953 expr = AtNotTildeUnaryExpression();
1954 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,token.sourceStart);}
1957 token = jj_consume_token(TILDE);
1958 expr = AtNotTildeUnaryExpression();
1959 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.TWIDDLE,token.sourceStart);}
1962 token = jj_consume_token(BANG);
1963 expr = AtNotUnaryExpression();
1964 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
1976 case INTEGER_LITERAL:
1977 case FLOATING_POINT_LITERAL:
1978 case STRING_LITERAL:
1983 expr = UnaryExpressionNoPrefix();
1984 {if (true) return expr;}
1987 jj_la1[49] = jj_gen;
1988 jj_consume_token(-1);
1989 throw new ParseException();
1991 throw new Error("Missing return statement in function");
1995 * An expression prefixed (or not) by one or more @ and !.
1996 * @return the expression
1998 static final public Expression AtNotUnaryExpression() throws ParseException {
1999 final Expression expr;
2001 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2003 token = jj_consume_token(AT);
2004 expr = AtNotUnaryExpression();
2005 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,token.sourceStart);}
2008 token = jj_consume_token(BANG);
2009 expr = AtNotUnaryExpression();
2010 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
2022 case INTEGER_LITERAL:
2023 case FLOATING_POINT_LITERAL:
2024 case STRING_LITERAL:
2029 expr = UnaryExpressionNoPrefix();
2030 {if (true) return expr;}
2033 jj_la1[50] = jj_gen;
2034 jj_consume_token(-1);
2035 throw new ParseException();
2037 throw new Error("Missing return statement in function");
2040 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
2041 final Expression expr;
2043 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2045 token = jj_consume_token(PLUS);
2046 expr = AtNotTildeUnaryExpression();
2047 {if (true) return new PrefixedUnaryExpression(expr,
2049 token.sourceStart);}
2052 token = jj_consume_token(MINUS);
2053 expr = AtNotTildeUnaryExpression();
2054 {if (true) return new PrefixedUnaryExpression(expr,
2056 token.sourceStart);}
2060 expr = PreIncDecExpression();
2061 {if (true) return expr;}
2069 case INTEGER_LITERAL:
2070 case FLOATING_POINT_LITERAL:
2071 case STRING_LITERAL:
2076 expr = UnaryExpressionNotPlusMinus();
2077 {if (true) return expr;}
2080 jj_la1[51] = jj_gen;
2081 jj_consume_token(-1);
2082 throw new ParseException();
2084 throw new Error("Missing return statement in function");
2087 static final public Expression PreIncDecExpression() throws ParseException {
2088 final Expression expr;
2091 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2093 token = jj_consume_token(PLUS_PLUS);
2094 operator = OperatorIds.PLUS_PLUS;
2097 token = jj_consume_token(MINUS_MINUS);
2098 operator = OperatorIds.MINUS_MINUS;
2101 jj_la1[52] = jj_gen;
2102 jj_consume_token(-1);
2103 throw new ParseException();
2105 expr = PrimaryExpression();
2106 {if (true) return new PrefixedUnaryExpression(expr,operator,token.sourceStart);}
2107 throw new Error("Missing return statement in function");
2110 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
2111 final Expression expr;
2112 if (jj_2_3(2147483647)) {
2113 expr = CastExpression();
2114 {if (true) return expr;}
2116 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2122 expr = PostfixExpression();
2123 {if (true) return expr;}
2128 case INTEGER_LITERAL:
2129 case FLOATING_POINT_LITERAL:
2130 case STRING_LITERAL:
2133 {if (true) return expr;}
2136 jj_consume_token(LPAREN);
2137 expr = Expression();
2139 jj_consume_token(RPAREN);
2140 } catch (ParseException e) {
2141 errorMessage = "')' expected";
2143 errorStart = expr.sourceEnd +1;
2144 errorEnd = expr.sourceEnd +1;
2145 processParseExceptionDebug(e);
2147 {if (true) return expr;}
2150 jj_la1[53] = jj_gen;
2151 jj_consume_token(-1);
2152 throw new ParseException();
2155 throw new Error("Missing return statement in function");
2158 static final public CastExpression CastExpression() throws ParseException {
2159 final ConstantIdentifier type;
2160 final Expression expr;
2161 final Token token,token1;
2162 token1 = jj_consume_token(LPAREN);
2163 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2176 token = jj_consume_token(ARRAY);
2177 type = new ConstantIdentifier(token);
2180 jj_la1[54] = jj_gen;
2181 jj_consume_token(-1);
2182 throw new ParseException();
2184 jj_consume_token(RPAREN);
2185 expr = UnaryExpression();
2186 {if (true) return new CastExpression(type,expr,token1.sourceStart,expr.sourceEnd);}
2187 throw new Error("Missing return statement in function");
2190 static final public Expression PostfixExpression() throws ParseException {
2191 final Expression expr;
2194 expr = PrimaryExpression();
2195 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2198 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2200 token = jj_consume_token(PLUS_PLUS);
2201 operator = OperatorIds.PLUS_PLUS;
2204 token = jj_consume_token(MINUS_MINUS);
2205 operator = OperatorIds.MINUS_MINUS;
2208 jj_la1[55] = jj_gen;
2209 jj_consume_token(-1);
2210 throw new ParseException();
2214 jj_la1[56] = jj_gen;
2217 if (operator == -1) {
2218 {if (true) return expr;}
2220 {if (true) return new PostfixedUnaryExpression(expr,operator,token.sourceEnd);}
2221 throw new Error("Missing return statement in function");
2224 static final public Expression PrimaryExpression() throws ParseException {
2227 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2232 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2234 token = jj_consume_token(BIT_AND);
2237 jj_la1[57] = jj_gen;
2240 expr = refPrimaryExpression(token);
2241 {if (true) return expr;}
2244 expr = ArrayDeclarator();
2245 {if (true) return expr;}
2248 jj_la1[58] = jj_gen;
2249 jj_consume_token(-1);
2250 throw new ParseException();
2252 throw new Error("Missing return statement in function");
2255 static final public Expression refPrimaryExpression(final Token reference) throws ParseException {
2257 Expression expr2 = null;
2258 final Token identifier;
2259 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2261 identifier = jj_consume_token(IDENTIFIER);
2262 expr = new ConstantIdentifier(identifier);
2265 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2266 case STATICCLASSACCESS:
2270 jj_la1[59] = jj_gen;
2273 jj_consume_token(STATICCLASSACCESS);
2274 expr2 = ClassIdentifier();
2275 expr = new ClassAccess(expr,
2277 ClassAccess.STATIC);
2279 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2281 expr2 = Arguments(expr);
2284 jj_la1[60] = jj_gen;
2287 if (expr2 == null) {
2288 if (reference != null) {
2289 ParseException e = generateParseException();
2290 errorMessage = "you cannot use a constant by reference";
2292 errorStart = reference.sourceStart;
2293 errorEnd = reference.sourceEnd;
2294 processParseExceptionDebug(e);
2296 {if (true) return expr;}
2298 {if (true) return expr2;}
2301 expr = VariableDeclaratorId();
2302 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2304 expr = Arguments(expr);
2307 jj_la1[61] = jj_gen;
2310 {if (true) return expr;}
2313 token = jj_consume_token(NEW);
2314 expr = ClassIdentifier();
2316 if (reference == null) {
2317 start = token.sourceStart;
2319 start = reference.sourceStart;
2321 expr = new ClassInstantiation(expr,
2324 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2326 expr = Arguments(expr);
2329 jj_la1[62] = jj_gen;
2332 {if (true) return expr;}
2335 jj_la1[63] = jj_gen;
2336 jj_consume_token(-1);
2337 throw new ParseException();
2339 throw new Error("Missing return statement in function");
2343 * An array declarator.
2347 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2348 final ArrayVariableDeclaration[] vars;
2350 token = jj_consume_token(ARRAY);
2351 vars = ArrayInitializer();
2352 {if (true) return new ArrayInitializer(vars,
2354 PHPParser.token.sourceEnd);}
2355 throw new Error("Missing return statement in function");
2358 static final public Expression ClassIdentifier() throws ParseException {
2359 final Expression expr;
2361 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2363 token = jj_consume_token(IDENTIFIER);
2364 {if (true) return new ConstantIdentifier(token);}
2376 {if (true) return expr;}
2379 expr = VariableDeclaratorId();
2380 {if (true) return expr;}
2383 jj_la1[64] = jj_gen;
2384 jj_consume_token(-1);
2385 throw new ParseException();
2387 throw new Error("Missing return statement in function");
2391 * Used by Variabledeclaratorid and primarysuffix
2393 static final public AbstractVariable VariableSuffix(final AbstractVariable prefix) throws ParseException {
2394 Expression expression = null;
2395 final Token classAccessToken,lbrace,rbrace;
2398 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2400 classAccessToken = jj_consume_token(CLASSACCESS);
2402 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2404 lbrace = jj_consume_token(LBRACE);
2405 expression = Expression();
2406 rbrace = jj_consume_token(RBRACE);
2407 expression = new Variable(expression,
2412 token = jj_consume_token(IDENTIFIER);
2413 expression = new ConstantIdentifier(token.image,token.sourceStart,token.sourceEnd);
2416 expression = Variable();
2419 jj_la1[65] = jj_gen;
2420 jj_consume_token(-1);
2421 throw new ParseException();
2423 } catch (ParseException e) {
2424 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2426 errorStart = classAccessToken.sourceEnd +1;
2427 errorEnd = classAccessToken.sourceEnd +1;
2428 processParseExceptionDebug(e);
2430 {if (true) return new ClassAccess(prefix,
2432 ClassAccess.NORMAL);}
2435 token = jj_consume_token(LBRACKET);
2436 pos = token.sourceEnd+1;
2437 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2462 case INTEGER_LITERAL:
2463 case FLOATING_POINT_LITERAL:
2464 case STRING_LITERAL:
2469 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2485 case INTEGER_LITERAL:
2486 case FLOATING_POINT_LITERAL:
2487 case STRING_LITERAL:
2492 expression = Expression();
2493 pos = expression.sourceEnd+1;
2504 expression = Type();
2505 pos = expression.sourceEnd+1;
2508 jj_la1[66] = jj_gen;
2509 jj_consume_token(-1);
2510 throw new ParseException();
2514 jj_la1[67] = jj_gen;
2518 token = jj_consume_token(RBRACKET);
2519 pos = token.sourceEnd;
2520 } catch (ParseException e) {
2521 errorMessage = "']' expected";
2525 processParseExceptionDebug(e);
2527 {if (true) return new ArrayDeclarator(prefix,expression,pos);}
2530 token = jj_consume_token(LBRACE);
2531 pos = token.sourceEnd+1;
2532 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2557 case INTEGER_LITERAL:
2558 case FLOATING_POINT_LITERAL:
2559 case STRING_LITERAL:
2564 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2580 case INTEGER_LITERAL:
2581 case FLOATING_POINT_LITERAL:
2582 case STRING_LITERAL:
2587 expression = Expression();
2588 pos = expression.sourceEnd+1;
2599 expression = Type();
2600 pos = expression.sourceEnd+1;
2603 jj_la1[68] = jj_gen;
2604 jj_consume_token(-1);
2605 throw new ParseException();
2609 jj_la1[69] = jj_gen;
2613 token = jj_consume_token(RBRACE);
2614 pos = token.sourceEnd;
2615 } catch (ParseException e) {
2616 errorMessage = "']' expected";
2620 processParseExceptionDebug(e);
2622 {if (true) return new ArrayDeclarator(prefix,expression,pos);}
2625 jj_la1[70] = jj_gen;
2626 jj_consume_token(-1);
2627 throw new ParseException();
2629 throw new Error("Missing return statement in function");
2632 static final public Literal Literal() throws ParseException {
2634 StringLiteral literal;
2635 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2636 case INTEGER_LITERAL:
2637 token = jj_consume_token(INTEGER_LITERAL);
2638 {if (true) return new NumberLiteral(token);}
2640 case FLOATING_POINT_LITERAL:
2641 token = jj_consume_token(FLOATING_POINT_LITERAL);
2642 {if (true) return new NumberLiteral(token);}
2644 case STRING_LITERAL:
2645 token = jj_consume_token(STRING_LITERAL);
2646 {if (true) return new StringLiteral(token);}
2649 token = jj_consume_token(TRUE);
2650 {if (true) return new TrueLiteral(token);}
2653 token = jj_consume_token(FALSE);
2654 {if (true) return new FalseLiteral(token);}
2657 token = jj_consume_token(NULL);
2658 {if (true) return new NullLiteral(token);}
2661 literal = evaluableString();
2662 {if (true) return literal;}
2665 jj_la1[71] = jj_gen;
2666 jj_consume_token(-1);
2667 throw new ParseException();
2669 throw new Error("Missing return statement in function");
2672 static final public StringLiteral evaluableString() throws ParseException {
2673 ArrayList list = new ArrayList();
2675 Token token,lbrace,rbrace;
2676 AbstractVariable var;
2678 start = jj_consume_token(DOUBLEQUOTE);
2681 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2686 jj_la1[72] = jj_gen;
2689 jj_consume_token(DOLLARS);
2690 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2692 token = jj_consume_token(IDENTIFIER);
2693 list.add(new Variable(token.image,
2698 lbrace = jj_consume_token(LBRACE1);
2699 token = jj_consume_token(ID);
2700 list.add(new Variable(token.image,
2703 rbrace = jj_consume_token(RBRACE1);
2706 jj_la1[73] = jj_gen;
2707 jj_consume_token(-1);
2708 throw new ParseException();
2711 end = jj_consume_token(DOUBLEQUOTE2);
2712 AbstractVariable[] vars = new AbstractVariable[list.size()];
2714 {if (true) return new StringLiteral(SimpleCharStream.currentBuffer.substring(start.sourceEnd,end.sourceStart),
2718 throw new Error("Missing return statement in function");
2721 static final public FunctionCall Arguments(final Expression func) throws ParseException {
2722 Expression[] args = null;
2723 final Token token,lparen;
2724 lparen = jj_consume_token(LPAREN);
2725 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2741 case INTEGER_LITERAL:
2742 case FLOATING_POINT_LITERAL:
2743 case STRING_LITERAL:
2748 args = ArgumentList();
2751 jj_la1[74] = jj_gen;
2755 token = jj_consume_token(RPAREN);
2756 {if (true) return new FunctionCall(func,args,token.sourceEnd);}
2757 } catch (ParseException e) {
2758 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2761 errorStart = lparen.sourceEnd+1;
2762 errorEnd = lparen.sourceEnd+2;
2764 errorStart = args[args.length-1].sourceEnd+1;
2765 errorEnd = args[args.length-1].sourceEnd+2;
2767 processParseExceptionDebug(e);
2769 int sourceEnd = (args == null && args.length != 0) ? lparen.sourceEnd+1 : args[args.length-1].sourceEnd;
2770 {if (true) return new FunctionCall(func,args,sourceEnd);}
2771 throw new Error("Missing return statement in function");
2775 * An argument list is a list of arguments separated by comma :
2776 * argumentDeclaration() (, argumentDeclaration)*
2777 * @return an array of arguments
2779 static final public Expression[] ArgumentList() throws ParseException {
2781 final ArrayList list = new ArrayList();
2785 list.add(arg);pos = arg.sourceEnd;
2788 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2793 jj_la1[75] = jj_gen;
2796 token = jj_consume_token(COMMA);
2797 pos = token.sourceEnd;
2801 pos = arg.sourceEnd;
2802 } catch (ParseException e) {
2803 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2807 processParseException(e);
2810 final Expression[] arguments = new Expression[list.size()];
2811 list.toArray(arguments);
2812 {if (true) return arguments;}
2813 throw new Error("Missing return statement in function");
2817 * A Statement without break.
2818 * @return a statement
2820 static final public Statement StatementNoBreak() throws ParseException {
2821 final Statement statement;
2824 statement = expressionStatement();
2825 {if (true) return statement;}
2827 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2829 statement = LabeledStatement();
2830 {if (true) return statement;}
2833 statement = Block();
2834 {if (true) return statement;}
2837 statement = EmptyStatement();
2838 {if (true) return statement;}
2841 statement = SwitchStatement();
2842 {if (true) return statement;}
2845 statement = IfStatement();
2846 {if (true) return statement;}
2849 statement = WhileStatement();
2850 {if (true) return statement;}
2853 statement = DoStatement();
2854 {if (true) return statement;}
2857 statement = ForStatement();
2858 {if (true) return statement;}
2861 statement = ForeachStatement();
2862 {if (true) return statement;}
2865 statement = ContinueStatement();
2866 {if (true) return statement;}
2869 statement = ReturnStatement();
2870 {if (true) return statement;}
2873 statement = EchoStatement();
2874 {if (true) return statement;}
2881 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2883 token = jj_consume_token(AT);
2886 jj_la1[76] = jj_gen;
2889 statement = IncludeStatement();
2890 if (token != null) {
2891 ((InclusionStatement)statement).silent = true;
2892 statement.sourceStart = token.sourceStart;
2894 {if (true) return statement;}
2897 statement = StaticStatement();
2898 {if (true) return statement;}
2901 statement = GlobalStatement();
2902 {if (true) return statement;}
2905 statement = defineStatement();
2906 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2909 jj_la1[77] = jj_gen;
2910 jj_consume_token(-1);
2911 throw new ParseException();
2914 throw new Error("Missing return statement in function");
2918 * A statement expression.
2920 * @return an expression
2922 static final public Statement expressionStatement() throws ParseException {
2923 final Statement statement;
2925 statement = Expression();
2927 token = jj_consume_token(SEMICOLON);
2928 statement.sourceEnd = token.sourceEnd;
2929 } catch (ParseException e) {
2930 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2931 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2933 errorStart = statement.sourceEnd+1;
2934 errorEnd = statement.sourceEnd+1;
2935 processParseExceptionDebug(e);
2938 {if (true) return statement;}
2939 throw new Error("Missing return statement in function");
2942 static final public Define defineStatement() throws ParseException {
2943 Expression defineName,defineValue;
2944 final Token defineToken;
2947 defineToken = jj_consume_token(DEFINE);
2948 pos = defineToken.sourceEnd+1;
2950 token = jj_consume_token(LPAREN);
2951 pos = token.sourceEnd+1;
2952 } catch (ParseException e) {
2953 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2957 processParseExceptionDebug(e);
2960 defineName = Expression();
2961 pos = defineName.sourceEnd+1;
2962 } catch (ParseException e) {
2963 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2967 processParseExceptionDebug(e);
2968 defineName = new StringLiteral(SYNTAX_ERROR_CHAR,pos,pos);
2971 token = jj_consume_token(COMMA);
2972 pos = defineName.sourceEnd+1;
2973 } catch (ParseException e) {
2974 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2978 processParseExceptionDebug(e);
2981 defineValue = Expression();
2982 pos = defineValue.sourceEnd+1;
2983 } catch (ParseException e) {
2984 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2988 processParseExceptionDebug(e);
2989 defineValue = new StringLiteral(SYNTAX_ERROR_CHAR,pos,pos);
2992 token = jj_consume_token(RPAREN);
2993 pos = token.sourceEnd+1;
2994 } catch (ParseException e) {
2995 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2999 processParseExceptionDebug(e);
3001 {if (true) return new Define(currentSegment,
3004 defineToken.sourceStart,
3006 throw new Error("Missing return statement in function");
3010 * A Normal statement.
3012 static final public Statement Statement() throws ParseException {
3013 final Statement statement;
3014 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3046 case INTEGER_LITERAL:
3047 case FLOATING_POINT_LITERAL:
3048 case STRING_LITERAL:
3055 statement = StatementNoBreak();
3056 {if (true) return statement;}
3059 statement = BreakStatement();
3060 {if (true) return statement;}
3063 jj_la1[78] = jj_gen;
3064 jj_consume_token(-1);
3065 throw new ParseException();
3067 throw new Error("Missing return statement in function");
3071 * An html block inside a php syntax.
3073 static final public HTMLBlock htmlBlock() throws ParseException {
3074 final int startIndex = nodePtr;
3075 final AstNode[] blockNodes;
3078 phpEnd = jj_consume_token(PHPEND);
3079 htmlStart = phpEnd.sourceEnd;
3082 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3087 jj_la1[79] = jj_gen;
3093 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3095 jj_consume_token(PHPSTARTLONG);
3098 jj_consume_token(PHPSTARTSHORT);
3101 jj_la1[80] = jj_gen;
3102 jj_consume_token(-1);
3103 throw new ParseException();
3105 PHPParser.createNewHTMLCode();
3106 } catch (ParseException e) {
3107 errorMessage = "unexpected end of file , '<?php' expected";
3109 errorStart = e.currentToken.sourceStart;
3110 errorEnd = e.currentToken.sourceEnd;
3111 {if (true) throw e;}
3113 nbNodes = nodePtr - startIndex;
3115 {if (true) return null;}
3117 blockNodes = new AstNode[nbNodes];
3118 System.arraycopy(nodes,startIndex+1,blockNodes,0,nbNodes);
3119 nodePtr = startIndex;
3120 {if (true) return new HTMLBlock(blockNodes);}
3121 throw new Error("Missing return statement in function");
3125 * An include statement. It's "include" an expression;
3127 static final public InclusionStatement IncludeStatement() throws ParseException {
3130 final InclusionStatement inclusionStatement;
3131 final Token token, token2;
3133 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3135 token = jj_consume_token(REQUIRE);
3136 keyword = InclusionStatement.REQUIRE;pos=token.sourceEnd;
3139 token = jj_consume_token(REQUIRE_ONCE);
3140 keyword = InclusionStatement.REQUIRE_ONCE;pos=token.sourceEnd;
3143 token = jj_consume_token(INCLUDE);
3144 keyword = InclusionStatement.INCLUDE;pos=token.sourceEnd;
3147 token = jj_consume_token(INCLUDE_ONCE);
3148 keyword = InclusionStatement.INCLUDE_ONCE;pos=token.sourceEnd;
3151 jj_la1[81] = jj_gen;
3152 jj_consume_token(-1);
3153 throw new ParseException();
3156 expr = Expression();
3157 pos = expr.sourceEnd;
3158 } catch (ParseException e) {
3159 if (errorMessage != null) {
3160 {if (true) throw e;}
3162 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
3164 errorStart = e.currentToken.next.sourceStart;
3165 errorEnd = e.currentToken.next.sourceEnd;
3166 expr = new ConstantIdentifier(SYNTAX_ERROR_CHAR,pos,pos);
3167 processParseExceptionDebug(e);
3170 token2 = jj_consume_token(SEMICOLON);
3171 pos=token2.sourceEnd;
3172 } catch (ParseException e) {
3173 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
3175 errorStart = e.currentToken.next.sourceStart;
3176 errorEnd = e.currentToken.next.sourceEnd;
3177 processParseExceptionDebug(e);
3179 inclusionStatement = new InclusionStatement(currentSegment,
3184 currentSegment.add(inclusionStatement);
3185 {if (true) return inclusionStatement;}
3186 throw new Error("Missing return statement in function");
3189 static final public PrintExpression PrintExpression() throws ParseException {
3190 final Expression expr;
3191 final Token printToken;
3192 token = jj_consume_token(PRINT);
3193 expr = Expression();
3194 {if (true) return new PrintExpression(expr,token.sourceStart,expr.sourceEnd);}
3195 throw new Error("Missing return statement in function");
3198 static final public ListExpression ListExpression() throws ParseException {
3199 Expression expr = null;
3200 final Expression expression;
3201 final ArrayList list = new ArrayList();
3203 final Token listToken, rParen;
3205 listToken = jj_consume_token(LIST);
3206 pos = listToken.sourceEnd;
3208 token = jj_consume_token(LPAREN);
3209 pos = token.sourceEnd;
3210 } catch (ParseException e) {
3211 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
3213 errorStart = listToken.sourceEnd+1;
3214 errorEnd = listToken.sourceEnd+1;
3215 processParseExceptionDebug(e);
3217 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3219 expr = VariableDeclaratorId();
3220 list.add(expr);pos = expr.sourceEnd;
3223 jj_la1[82] = jj_gen;
3226 if (expr == null) list.add(null);
3229 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3234 jj_la1[83] = jj_gen;
3238 token = jj_consume_token(COMMA);
3239 pos = token.sourceEnd;
3240 } catch (ParseException e) {
3241 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
3245 processParseExceptionDebug(e);
3247 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3249 expr = VariableDeclaratorId();
3250 list.add(expr);pos = expr.sourceEnd;
3253 jj_la1[84] = jj_gen;
3258 rParen = jj_consume_token(RPAREN);
3259 pos = rParen.sourceEnd;
3260 } catch (ParseException e) {
3261 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
3265 processParseExceptionDebug(e);
3267 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3269 jj_consume_token(ASSIGN);
3270 expression = Expression();
3271 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3273 {if (true) return new ListExpression(vars,
3275 listToken.sourceStart,
3276 expression.sourceEnd);}
3279 jj_la1[85] = jj_gen;
3282 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3284 {if (true) return new ListExpression(vars,listToken.sourceStart,pos);}
3285 throw new Error("Missing return statement in function");
3289 * An echo statement.
3290 * echo anyexpression (, otherexpression)*
3292 static final public EchoStatement EchoStatement() throws ParseException {
3293 final ArrayList expressions = new ArrayList();
3296 Token token2 = null;
3297 token = jj_consume_token(ECHO);
3298 expr = Expression();
3299 expressions.add(expr);
3302 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3307 jj_la1[86] = jj_gen;
3310 jj_consume_token(COMMA);
3311 expr = Expression();
3312 expressions.add(expr);
3315 token2 = jj_consume_token(SEMICOLON);
3316 } catch (ParseException e) {
3317 if (e.currentToken.next.kind != 4) {
3318 errorMessage = "';' expected after 'echo' statement";
3320 errorStart = e.currentToken.sourceEnd;
3321 errorEnd = e.currentToken.sourceEnd;
3322 processParseExceptionDebug(e);
3325 final Expression[] exprs = new Expression[expressions.size()];
3326 expressions.toArray(exprs);
3327 if (token2 == null) {
3328 {if (true) return new EchoStatement(exprs,token.sourceStart, exprs[exprs.length-1].sourceEnd);}
3330 {if (true) return new EchoStatement(exprs,token.sourceStart, token2.sourceEnd);}
3331 throw new Error("Missing return statement in function");
3334 static final public GlobalStatement GlobalStatement() throws ParseException {
3336 final ArrayList vars = new ArrayList();
3337 final GlobalStatement global;
3338 final Token token, token2;
3340 token = jj_consume_token(GLOBAL);
3342 vars.add(expr);pos = expr.sourceEnd+1;
3345 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3350 jj_la1[87] = jj_gen;
3353 jj_consume_token(COMMA);
3355 vars.add(expr);pos = expr.sourceEnd+1;
3358 token2 = jj_consume_token(SEMICOLON);
3359 pos = token2.sourceEnd+1;
3360 } catch (ParseException e) {
3361 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3365 processParseExceptionDebug(e);
3367 final Variable[] variables = new Variable[vars.size()];
3368 vars.toArray(variables);
3369 global = new GlobalStatement(currentSegment,
3373 currentSegment.add(global);
3374 {if (true) return global;}
3375 throw new Error("Missing return statement in function");
3378 static final public StaticStatement StaticStatement() throws ParseException {
3379 final ArrayList vars = new ArrayList();
3380 VariableDeclaration expr;
3381 final Token token, token2;
3383 token = jj_consume_token(STATIC);
3384 expr = VariableDeclarator();
3385 vars.add(expr);pos = expr.sourceEnd+1;
3388 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3393 jj_la1[88] = jj_gen;
3396 jj_consume_token(COMMA);
3397 expr = VariableDeclarator();
3398 vars.add(expr);pos = expr.sourceEnd+1;
3401 token2 = jj_consume_token(SEMICOLON);
3402 pos = token2.sourceEnd+1;
3403 } catch (ParseException e) {
3404 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3408 processParseException(e);
3410 final VariableDeclaration[] variables = new VariableDeclaration[vars.size()];
3411 vars.toArray(variables);
3412 {if (true) return new StaticStatement(variables,
3415 throw new Error("Missing return statement in function");
3418 static final public LabeledStatement LabeledStatement() throws ParseException {
3420 final Statement statement;
3421 label = jj_consume_token(IDENTIFIER);
3422 jj_consume_token(COLON);
3423 statement = Statement();
3424 {if (true) return new LabeledStatement(label.image,statement,label.sourceStart,statement.sourceEnd);}
3425 throw new Error("Missing return statement in function");
3435 static final public Block Block() throws ParseException {
3436 final ArrayList list = new ArrayList();
3437 Statement statement;
3438 final Token token, token2;
3441 token = jj_consume_token(LBRACE);
3442 pos = token.sourceEnd+1;start=token.sourceStart;
3443 } catch (ParseException e) {
3444 errorMessage = "'{' expected";
3446 pos = PHPParser.token.sourceEnd+1;
3450 processParseExceptionDebug(e);
3454 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3490 case INTEGER_LITERAL:
3491 case FLOATING_POINT_LITERAL:
3492 case STRING_LITERAL:
3502 jj_la1[89] = jj_gen;
3505 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3540 case INTEGER_LITERAL:
3541 case FLOATING_POINT_LITERAL:
3542 case STRING_LITERAL:
3549 statement = BlockStatement();
3550 list.add(statement);pos = statement.sourceEnd+1;
3553 statement = htmlBlock();
3554 if (statement != null) {
3555 list.add(statement);
3556 pos = statement.sourceEnd+1;
3558 pos = PHPParser.token.sourceEnd+1;
3561 jj_la1[90] = jj_gen;
3562 jj_consume_token(-1);
3563 throw new ParseException();
3567 token2 = jj_consume_token(RBRACE);
3568 pos = token2.sourceEnd+1;
3569 } catch (ParseException e) {
3570 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3574 processParseExceptionDebug(e);
3576 final Statement[] statements = new Statement[list.size()];
3577 list.toArray(statements);
3578 {if (true) return new Block(statements,start,pos);}
3579 throw new Error("Missing return statement in function");
3582 static final public Statement BlockStatement() throws ParseException {
3583 final Statement statement;
3584 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3617 case INTEGER_LITERAL:
3618 case FLOATING_POINT_LITERAL:
3619 case STRING_LITERAL:
3627 statement = Statement();
3628 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3629 {if (true) return statement;}
3630 } catch (ParseException e) {
3631 errorMessage = "unexpected token : '"+ e.currentToken.image +"', a statement was expected";
3633 errorStart = e.currentToken.sourceStart;
3634 errorEnd = e.currentToken.sourceEnd;
3635 {if (true) throw e;}
3639 statement = ClassDeclaration();
3640 {if (true) return statement;}
3643 statement = MethodDeclaration();
3644 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3645 currentSegment.add((MethodDeclaration) statement);
3646 ((MethodDeclaration) statement).analyzeCode();
3647 {if (true) return statement;}
3650 jj_la1[91] = jj_gen;
3651 jj_consume_token(-1);
3652 throw new ParseException();
3654 throw new Error("Missing return statement in function");
3658 * A Block statement that will not contain any 'break'
3660 static final public Statement BlockStatementNoBreak() throws ParseException {
3661 final Statement statement;
3662 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3694 case INTEGER_LITERAL:
3695 case FLOATING_POINT_LITERAL:
3696 case STRING_LITERAL:
3703 statement = StatementNoBreak();
3704 {if (true) return statement;}
3707 statement = ClassDeclaration();
3708 {if (true) return statement;}
3711 statement = MethodDeclaration();
3712 currentSegment.add((MethodDeclaration) statement);
3713 ((MethodDeclaration) statement).analyzeCode();
3714 {if (true) return statement;}
3717 jj_la1[92] = jj_gen;
3718 jj_consume_token(-1);
3719 throw new ParseException();
3721 throw new Error("Missing return statement in function");
3725 * used only by ForInit()
3727 static final public Expression[] LocalVariableDeclaration() throws ParseException {
3728 final ArrayList list = new ArrayList();
3734 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3739 jj_la1[93] = jj_gen;
3742 jj_consume_token(COMMA);
3746 final Expression[] vars = new Expression[list.size()];
3748 {if (true) return vars;}
3749 throw new Error("Missing return statement in function");
3753 * used only by LocalVariableDeclaration().
3755 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3756 final Variable varName;
3757 Expression initializer = null;
3758 varName = Variable();
3759 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3761 jj_consume_token(ASSIGN);
3762 initializer = Expression();
3765 jj_la1[94] = jj_gen;
3768 if (initializer == null) {
3769 {if (true) return new VariableDeclaration(currentSegment,
3771 varName.sourceStart,
3772 varName.sourceEnd);}
3774 {if (true) return new VariableDeclaration(currentSegment,
3777 VariableDeclaration.EQUAL,
3778 varName.sourceStart);}
3779 throw new Error("Missing return statement in function");
3782 static final public EmptyStatement EmptyStatement() throws ParseException {
3784 token = jj_consume_token(SEMICOLON);
3785 {if (true) return new EmptyStatement(token.sourceStart,token.sourceEnd);}
3786 throw new Error("Missing return statement in function");
3790 * used only by StatementExpressionList() which is used only by ForInit() and ForStatement()
3792 static final public Expression StatementExpression() throws ParseException {
3793 final Expression expr;
3794 final Token operator;
3795 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3798 expr = PreIncDecExpression();
3799 {if (true) return expr;}
3806 expr = PrimaryExpression();
3807 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3810 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3812 operator = jj_consume_token(PLUS_PLUS);
3813 {if (true) return new PostfixedUnaryExpression(expr,
3814 OperatorIds.PLUS_PLUS,
3815 operator.sourceEnd);}
3818 operator = jj_consume_token(MINUS_MINUS);
3819 {if (true) return new PostfixedUnaryExpression(expr,
3820 OperatorIds.MINUS_MINUS,
3821 operator.sourceEnd);}
3824 jj_la1[95] = jj_gen;
3825 jj_consume_token(-1);
3826 throw new ParseException();
3830 jj_la1[96] = jj_gen;
3833 {if (true) return expr;}
3836 jj_la1[97] = jj_gen;
3837 jj_consume_token(-1);
3838 throw new ParseException();
3840 throw new Error("Missing return statement in function");
3843 static final public SwitchStatement SwitchStatement() throws ParseException {
3844 Expression variable;
3845 final AbstractCase[] cases;
3846 final Token switchToken,lparenToken,rparenToken;
3848 switchToken = jj_consume_token(SWITCH);
3849 pos = switchToken.sourceEnd+1;
3851 lparenToken = jj_consume_token(LPAREN);
3852 pos = lparenToken.sourceEnd+1;
3853 } catch (ParseException e) {
3854 errorMessage = "'(' expected after 'switch'";
3858 processParseExceptionDebug(e);
3861 variable = Expression();
3862 pos = variable.sourceEnd+1;
3863 } catch (ParseException e) {
3864 if (errorMessage != null) {
3865 {if (true) throw e;}
3867 errorMessage = "expression expected";
3871 processParseExceptionDebug(e);
3872 variable = new ConstantIdentifier(SYNTAX_ERROR_CHAR,pos,pos);
3875 rparenToken = jj_consume_token(RPAREN);
3876 pos = rparenToken.sourceEnd+1;
3877 } catch (ParseException e) {
3878 errorMessage = "')' expected";
3882 processParseExceptionDebug(e);
3884 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3886 cases = switchStatementBrace();
3889 cases = switchStatementColon(switchToken.sourceStart, switchToken.sourceEnd);
3892 jj_la1[98] = jj_gen;
3893 jj_consume_token(-1);
3894 throw new ParseException();
3896 {if (true) return new SwitchStatement(variable,
3898 switchToken.sourceStart,
3899 PHPParser.token.sourceEnd);}
3900 throw new Error("Missing return statement in function");
3903 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3905 final ArrayList cases = new ArrayList();
3908 token = jj_consume_token(LBRACE);
3909 pos = token.sourceEnd;
3912 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3918 jj_la1[99] = jj_gen;
3921 cas = switchLabel0();
3922 cases.add(cas);pos = cas.sourceEnd;
3925 token = jj_consume_token(RBRACE);
3926 pos = token.sourceEnd;
3927 } catch (ParseException e) {
3928 errorMessage = "'}' expected";
3932 processParseExceptionDebug(e);
3934 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3935 cases.toArray(abcase);
3936 {if (true) return abcase;}
3937 throw new Error("Missing return statement in function");
3941 * A Switch statement with : ... endswitch;
3942 * @param start the begin offset of the switch
3943 * @param end the end offset of the switch
3945 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3947 final ArrayList cases = new ArrayList();
3950 token = jj_consume_token(COLON);
3951 pos = token.sourceEnd;
3953 setMarker(fileToParse,
3954 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3958 "Line " + token.beginLine);
3959 } catch (CoreException e) {
3960 PHPeclipsePlugin.log(e);
3964 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3970 jj_la1[100] = jj_gen;
3973 cas = switchLabel0();
3974 cases.add(cas);pos = cas.sourceEnd;
3977 token = jj_consume_token(ENDSWITCH);
3978 pos = token.sourceEnd;
3979 } catch (ParseException e) {
3980 errorMessage = "'endswitch' expected";
3984 processParseExceptionDebug(e);
3987 token = jj_consume_token(SEMICOLON);
3988 pos = token.sourceEnd;
3989 } catch (ParseException e) {
3990 errorMessage = "';' expected after 'endswitch' keyword";
3994 processParseExceptionDebug(e);
3996 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3997 cases.toArray(abcase);
3998 {if (true) return abcase;}
3999 throw new Error("Missing return statement in function");
4002 static final public AbstractCase switchLabel0() throws ParseException {
4003 final Expression expr;
4004 Statement statement;
4005 final ArrayList stmts = new ArrayList();
4006 final Token token = PHPParser.token;
4007 final int start = PHPParser.token.next.sourceStart;
4008 expr = SwitchLabel();
4011 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4047 case INTEGER_LITERAL:
4048 case FLOATING_POINT_LITERAL:
4049 case STRING_LITERAL:
4059 jj_la1[101] = jj_gen;
4062 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4096 case INTEGER_LITERAL:
4097 case FLOATING_POINT_LITERAL:
4098 case STRING_LITERAL:
4105 statement = BlockStatementNoBreak();
4106 stmts.add(statement);
4109 statement = htmlBlock();
4110 if (statement != null) {stmts.add(statement);}
4113 statement = BreakStatement();
4114 stmts.add(statement);
4117 jj_la1[102] = jj_gen;
4118 jj_consume_token(-1);
4119 throw new ParseException();
4122 final int listSize = stmts.size();
4123 final Statement[] stmtsArray = new Statement[listSize];
4124 stmts.toArray(stmtsArray);
4125 if (expr == null) {//it's a default
4126 final int end = PHPParser.token.next.sourceStart;
4127 {if (true) return new DefaultCase(stmtsArray,start,end);}
4129 if (listSize != 0) {
4130 {if (true) return new Case(expr,stmtsArray,expr.sourceStart,stmtsArray[listSize-1].sourceEnd);}
4132 {if (true) return new Case(expr,stmtsArray,expr.sourceStart,expr.sourceEnd);}
4134 throw new Error("Missing return statement in function");
4139 * case Expression() :
4141 * @return the if it was a case and null if not
4143 static final public Expression SwitchLabel() throws ParseException {
4144 final Expression expr;
4145 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4147 token = jj_consume_token(CASE);
4149 expr = Expression();
4150 } catch (ParseException e) {
4151 if (errorMessage != null) {if (true) throw e;}
4152 errorMessage = "expression expected after 'case' keyword";
4154 errorStart = token.sourceEnd +1;
4155 errorEnd = token.sourceEnd +1;
4156 {if (true) throw e;}
4159 token = jj_consume_token(COLON);
4160 } catch (ParseException e) {
4161 errorMessage = "':' expected after case expression";
4163 errorStart = expr.sourceEnd+1;
4164 errorEnd = expr.sourceEnd+1;
4165 processParseExceptionDebug(e);
4167 {if (true) return expr;}
4170 token = jj_consume_token(_DEFAULT);
4172 jj_consume_token(COLON);
4173 } catch (ParseException e) {
4174 errorMessage = "':' expected after 'default' keyword";
4176 errorStart = token.sourceEnd+1;
4177 errorEnd = token.sourceEnd+1;
4178 processParseExceptionDebug(e);
4180 {if (true) return null;}
4183 jj_la1[103] = jj_gen;
4184 jj_consume_token(-1);
4185 throw new ParseException();
4187 throw new Error("Missing return statement in function");
4190 static final public Break BreakStatement() throws ParseException {
4191 Expression expression = null;
4192 final Token token, token2;
4194 token = jj_consume_token(BREAK);
4195 pos = token.sourceEnd+1;
4196 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4212 case INTEGER_LITERAL:
4213 case FLOATING_POINT_LITERAL:
4214 case STRING_LITERAL:
4219 expression = Expression();
4220 pos = expression.sourceEnd+1;
4223 jj_la1[104] = jj_gen;
4227 token2 = jj_consume_token(SEMICOLON);
4228 pos = token2.sourceEnd;
4229 } catch (ParseException e) {
4230 errorMessage = "';' expected after 'break' keyword";
4234 processParseExceptionDebug(e);
4236 {if (true) return new Break(expression, token.sourceStart, pos);}
4237 throw new Error("Missing return statement in function");
4240 static final public IfStatement IfStatement() throws ParseException {
4241 final Expression condition;
4242 final IfStatement ifStatement;
4244 token = jj_consume_token(IF);
4245 condition = Condition("if");
4246 ifStatement = IfStatement0(condition,token.sourceStart,token.sourceEnd);
4247 {if (true) return ifStatement;}
4248 throw new Error("Missing return statement in function");
4251 static final public Expression Condition(final String keyword) throws ParseException {
4252 final Expression condition;
4254 jj_consume_token(LPAREN);
4255 } catch (ParseException e) {
4256 errorMessage = "'(' expected after " + keyword + " keyword";
4258 errorStart = PHPParser.token.sourceEnd + 1;
4259 errorEnd = PHPParser.token.sourceEnd + 1;
4260 processParseExceptionDebug(e);
4262 condition = Expression();
4264 jj_consume_token(RPAREN);
4265 } catch (ParseException e) {
4266 errorMessage = "')' expected after " + keyword + " keyword";
4268 errorStart = condition.sourceEnd+1;
4269 errorEnd = condition.sourceEnd+1;
4270 processParseExceptionDebug(e);
4272 {if (true) return condition;}
4273 throw new Error("Missing return statement in function");
4276 static final public IfStatement IfStatement0(final Expression condition, final int start,final int end) throws ParseException {
4277 Statement statement;
4278 final Statement stmt;
4279 final Statement[] statementsArray;
4280 ElseIf elseifStatement;
4281 Else elseStatement = null;
4282 final ArrayList stmts;
4283 final ArrayList elseIfList = new ArrayList();
4284 final ElseIf[] elseIfs;
4285 int pos = SimpleCharStream.getPosition();
4286 final int endStatements;
4287 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4289 jj_consume_token(COLON);
4290 stmts = new ArrayList();
4293 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4327 case INTEGER_LITERAL:
4328 case FLOATING_POINT_LITERAL:
4329 case STRING_LITERAL:
4339 jj_la1[105] = jj_gen;
4342 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4375 case INTEGER_LITERAL:
4376 case FLOATING_POINT_LITERAL:
4377 case STRING_LITERAL:
4384 statement = Statement();
4385 stmts.add(statement);
4388 statement = htmlBlock();
4389 if (statement != null) {stmts.add(statement);}
4392 jj_la1[106] = jj_gen;
4393 jj_consume_token(-1);
4394 throw new ParseException();
4397 endStatements = SimpleCharStream.getPosition();
4400 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4405 jj_la1[107] = jj_gen;
4408 elseifStatement = ElseIfStatementColon();
4409 elseIfList.add(elseifStatement);
4411 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4413 elseStatement = ElseStatementColon();
4416 jj_la1[108] = jj_gen;
4420 setMarker(fileToParse,
4421 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4425 "Line " + token.beginLine);
4426 } catch (CoreException e) {
4427 PHPeclipsePlugin.log(e);
4430 jj_consume_token(ENDIF);
4431 } catch (ParseException e) {
4432 errorMessage = "'endif' expected";
4434 errorStart = e.currentToken.sourceStart;
4435 errorEnd = e.currentToken.sourceEnd;
4436 {if (true) throw e;}
4439 jj_consume_token(SEMICOLON);
4440 } catch (ParseException e) {
4441 errorMessage = "';' expected after 'endif' keyword";
4443 errorStart = e.currentToken.sourceStart;
4444 errorEnd = e.currentToken.sourceEnd;
4445 {if (true) throw e;}
4447 elseIfs = new ElseIf[elseIfList.size()];
4448 elseIfList.toArray(elseIfs);
4449 if (stmts.size() == 1) {
4450 {if (true) return new IfStatement(condition,
4451 (Statement) stmts.get(0),
4455 SimpleCharStream.getPosition());}
4457 statementsArray = new Statement[stmts.size()];
4458 stmts.toArray(statementsArray);
4459 {if (true) return new IfStatement(condition,
4460 new Block(statementsArray,pos,endStatements),
4464 SimpleCharStream.getPosition());}
4500 case INTEGER_LITERAL:
4501 case FLOATING_POINT_LITERAL:
4502 case STRING_LITERAL:
4509 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4542 case INTEGER_LITERAL:
4543 case FLOATING_POINT_LITERAL:
4544 case STRING_LITERAL:
4557 jj_la1[109] = jj_gen;
4558 jj_consume_token(-1);
4559 throw new ParseException();
4563 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4568 jj_la1[110] = jj_gen;
4571 elseifStatement = ElseIfStatement();
4572 elseIfList.add(elseifStatement);
4574 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4576 jj_consume_token(ELSE);
4578 pos = SimpleCharStream.getPosition();
4579 statement = Statement();
4580 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4581 } catch (ParseException e) {
4582 if (errorMessage != null) {
4583 {if (true) throw e;}
4585 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4587 errorStart = e.currentToken.sourceStart;
4588 errorEnd = e.currentToken.sourceEnd;
4589 {if (true) throw e;}
4593 jj_la1[111] = jj_gen;
4596 elseIfs = new ElseIf[elseIfList.size()];
4597 elseIfList.toArray(elseIfs);
4598 {if (true) return new IfStatement(condition,
4603 SimpleCharStream.getPosition());}
4606 jj_la1[112] = jj_gen;
4607 jj_consume_token(-1);
4608 throw new ParseException();
4610 throw new Error("Missing return statement in function");
4613 static final public ElseIf ElseIfStatementColon() throws ParseException {
4614 final Expression condition;
4615 Statement statement;
4616 final ArrayList list = new ArrayList();
4617 final Token elseifToken;
4618 elseifToken = jj_consume_token(ELSEIF);
4619 condition = Condition("elseif");
4620 jj_consume_token(COLON);
4623 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4657 case INTEGER_LITERAL:
4658 case FLOATING_POINT_LITERAL:
4659 case STRING_LITERAL:
4669 jj_la1[113] = jj_gen;
4672 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4705 case INTEGER_LITERAL:
4706 case FLOATING_POINT_LITERAL:
4707 case STRING_LITERAL:
4714 statement = Statement();
4715 list.add(statement);
4718 statement = htmlBlock();
4719 if (statement != null) {list.add(statement);}
4722 jj_la1[114] = jj_gen;
4723 jj_consume_token(-1);
4724 throw new ParseException();
4727 final int sizeList = list.size();
4728 final Statement[] stmtsArray = new Statement[sizeList];
4729 list.toArray(stmtsArray);
4730 {if (true) return new ElseIf(condition,stmtsArray ,
4731 elseifToken.sourceStart,
4732 stmtsArray[sizeList-1].sourceEnd);}
4733 throw new Error("Missing return statement in function");
4736 static final public Else ElseStatementColon() throws ParseException {
4737 Statement statement;
4738 final ArrayList list = new ArrayList();
4739 final Token elseToken;
4740 elseToken = jj_consume_token(ELSE);
4741 jj_consume_token(COLON);
4744 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4778 case INTEGER_LITERAL:
4779 case FLOATING_POINT_LITERAL:
4780 case STRING_LITERAL:
4790 jj_la1[115] = jj_gen;
4793 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4826 case INTEGER_LITERAL:
4827 case FLOATING_POINT_LITERAL:
4828 case STRING_LITERAL:
4835 statement = Statement();
4836 list.add(statement);
4839 statement = htmlBlock();
4840 if (statement != null) {list.add(statement);}
4843 jj_la1[116] = jj_gen;
4844 jj_consume_token(-1);
4845 throw new ParseException();
4848 final int sizeList = list.size();
4849 final Statement[] stmtsArray = new Statement[sizeList];
4850 list.toArray(stmtsArray);
4851 {if (true) return new Else(stmtsArray,elseToken.sourceStart,stmtsArray[sizeList-1].sourceEnd);}
4852 throw new Error("Missing return statement in function");
4855 static final public ElseIf ElseIfStatement() throws ParseException {
4856 final Expression condition;
4857 //final Statement statement;
4858 final Token elseifToken;
4859 final Statement[] statement = new Statement[1];
4860 elseifToken = jj_consume_token(ELSEIF);
4861 condition = Condition("elseif");
4862 statement[0] = Statement();
4863 {if (true) return new ElseIf(condition,statement,elseifToken.sourceStart,statement[0].sourceEnd);}
4864 throw new Error("Missing return statement in function");
4867 static final public WhileStatement WhileStatement() throws ParseException {
4868 final Expression condition;
4869 final Statement action;
4870 final Token whileToken;
4871 whileToken = jj_consume_token(WHILE);
4872 condition = Condition("while");
4873 action = WhileStatement0(whileToken.sourceStart,whileToken.sourceEnd);
4874 {if (true) return new WhileStatement(condition,action,whileToken.sourceStart,action.sourceEnd);}
4875 throw new Error("Missing return statement in function");
4878 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4879 Statement statement;
4880 final ArrayList stmts = new ArrayList();
4881 final int pos = SimpleCharStream.getPosition();
4882 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4884 jj_consume_token(COLON);
4887 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4920 case INTEGER_LITERAL:
4921 case FLOATING_POINT_LITERAL:
4922 case STRING_LITERAL:
4932 jj_la1[117] = jj_gen;
4935 statement = Statement();
4936 stmts.add(statement);
4939 setMarker(fileToParse,
4940 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4944 "Line " + token.beginLine);
4945 } catch (CoreException e) {
4946 PHPeclipsePlugin.log(e);
4949 jj_consume_token(ENDWHILE);
4950 } catch (ParseException e) {
4951 errorMessage = "'endwhile' expected";
4953 errorStart = e.currentToken.sourceStart;
4954 errorEnd = e.currentToken.sourceEnd;
4955 {if (true) throw e;}
4958 jj_consume_token(SEMICOLON);
4959 final Statement[] stmtsArray = new Statement[stmts.size()];
4960 stmts.toArray(stmtsArray);
4961 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4962 } catch (ParseException e) {
4963 errorMessage = "';' expected after 'endwhile' keyword";
4965 errorStart = e.currentToken.sourceStart;
4966 errorEnd = e.currentToken.sourceEnd;
4967 {if (true) throw e;}
5002 case INTEGER_LITERAL:
5003 case FLOATING_POINT_LITERAL:
5004 case STRING_LITERAL:
5011 statement = Statement();
5012 {if (true) return statement;}
5015 jj_la1[118] = jj_gen;
5016 jj_consume_token(-1);
5017 throw new ParseException();
5019 throw new Error("Missing return statement in function");
5022 static final public DoStatement DoStatement() throws ParseException {
5023 final Statement action;
5024 final Expression condition;
5026 Token token2 = null;
5027 token = jj_consume_token(DO);
5028 action = Statement();
5029 jj_consume_token(WHILE);
5030 condition = Condition("while");
5032 token2 = jj_consume_token(SEMICOLON);
5033 } catch (ParseException e) {
5034 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
5036 errorStart = condition.sourceEnd+1;
5037 errorEnd = condition.sourceEnd+1;
5038 processParseExceptionDebug(e);
5040 if (token2 == null) {
5041 {if (true) return new DoStatement(condition,action,token.sourceStart,condition.sourceEnd);}
5043 {if (true) return new DoStatement(condition,action,token.sourceStart,token2.sourceEnd);}
5044 throw new Error("Missing return statement in function");
5047 static final public ForeachStatement ForeachStatement() throws ParseException {
5048 Statement statement = null;
5049 Expression expression = null;
5050 ArrayVariableDeclaration variable = null;
5052 Token lparenToken = null;
5053 Token asToken = null;
5054 Token rparenToken = null;
5056 foreachToken = jj_consume_token(FOREACH);
5058 lparenToken = jj_consume_token(LPAREN);
5059 pos = lparenToken.sourceEnd+1;
5060 } catch (ParseException e) {
5061 errorMessage = "'(' expected after 'foreach' keyword";
5063 errorStart = e.currentToken.sourceStart;
5064 errorEnd = e.currentToken.sourceEnd;
5065 processParseExceptionDebug(e);
5066 {pos = foreachToken.sourceEnd+1;}
5069 expression = Expression();
5070 pos = expression.sourceEnd+1;
5071 } catch (ParseException e) {
5072 errorMessage = "variable expected";
5074 errorStart = e.currentToken.sourceStart;
5075 errorEnd = e.currentToken.sourceEnd;
5076 processParseExceptionDebug(e);
5079 asToken = jj_consume_token(AS);
5080 pos = asToken.sourceEnd+1;
5081 } catch (ParseException e) {
5082 errorMessage = "'as' expected";
5084 errorStart = e.currentToken.sourceStart;
5085 errorEnd = e.currentToken.sourceEnd;
5086 processParseExceptionDebug(e);
5089 variable = ArrayVariable();
5090 pos = variable.sourceEnd+1;
5091 } catch (ParseException e) {
5092 if (errorMessage != null) {if (true) throw e;}
5093 errorMessage = "variable expected";
5095 errorStart = e.currentToken.sourceStart;
5096 errorEnd = e.currentToken.sourceEnd;
5097 processParseExceptionDebug(e);
5100 rparenToken = jj_consume_token(RPAREN);
5101 pos = rparenToken.sourceEnd+1;
5102 } catch (ParseException e) {
5103 errorMessage = "')' expected after 'foreach' keyword";
5105 errorStart = e.currentToken.sourceStart;
5106 errorEnd = e.currentToken.sourceEnd;
5107 processParseExceptionDebug(e);
5110 statement = Statement();
5111 pos = statement.sourceEnd+1;
5112 } catch (ParseException e) {
5113 if (errorMessage != null) {if (true) throw e;}
5114 errorMessage = "statement expected";
5116 errorStart = e.currentToken.sourceStart;
5117 errorEnd = e.currentToken.sourceEnd;
5118 processParseExceptionDebug(e);
5120 {if (true) return new ForeachStatement(expression,
5123 foreachToken.sourceStart,
5125 throw new Error("Missing return statement in function");
5129 * a for declaration.
5130 * @return a node representing the for statement
5132 static final public ForStatement ForStatement() throws ParseException {
5133 final Token token,tokenEndFor,token2,tokenColon;
5135 Expression[] initializations = null;
5136 Expression condition = null;
5137 Expression[] increments = null;
5139 final ArrayList list = new ArrayList();
5140 token = jj_consume_token(FOR);
5142 jj_consume_token(LPAREN);
5143 } catch (ParseException e) {
5144 errorMessage = "'(' expected after 'for' keyword";
5146 errorStart = token.sourceEnd;
5147 errorEnd = token.sourceEnd +1;
5148 processParseExceptionDebug(e);
5150 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5166 case INTEGER_LITERAL:
5167 case FLOATING_POINT_LITERAL:
5168 case STRING_LITERAL:
5173 initializations = ForInit();
5176 jj_la1[119] = jj_gen;
5179 jj_consume_token(SEMICOLON);
5180 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5196 case INTEGER_LITERAL:
5197 case FLOATING_POINT_LITERAL:
5198 case STRING_LITERAL:
5203 condition = Expression();
5206 jj_la1[120] = jj_gen;
5209 jj_consume_token(SEMICOLON);
5210 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5226 case INTEGER_LITERAL:
5227 case FLOATING_POINT_LITERAL:
5228 case STRING_LITERAL:
5233 increments = StatementExpressionList();
5236 jj_la1[121] = jj_gen;
5239 jj_consume_token(RPAREN);
5240 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5273 case INTEGER_LITERAL:
5274 case FLOATING_POINT_LITERAL:
5275 case STRING_LITERAL:
5282 action = Statement();
5283 {if (true) return new ForStatement(initializations,
5291 tokenColon = jj_consume_token(COLON);
5292 pos = tokenColon.sourceEnd+1;
5295 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5328 case INTEGER_LITERAL:
5329 case FLOATING_POINT_LITERAL:
5330 case STRING_LITERAL:
5340 jj_la1[122] = jj_gen;
5343 action = Statement();
5344 list.add(action);pos = action.sourceEnd+1;
5347 setMarker(fileToParse,
5348 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
5352 "Line " + token.beginLine);
5353 } catch (CoreException e) {
5354 PHPeclipsePlugin.log(e);
5357 tokenEndFor = jj_consume_token(ENDFOR);
5358 pos = tokenEndFor.sourceEnd+1;
5359 } catch (ParseException e) {
5360 errorMessage = "'endfor' expected";
5364 processParseExceptionDebug(e);
5367 token2 = jj_consume_token(SEMICOLON);
5368 pos = token2.sourceEnd+1;
5369 } catch (ParseException e) {
5370 errorMessage = "';' expected after 'endfor' keyword";
5374 processParseExceptionDebug(e);
5376 final Statement[] stmtsArray = new Statement[list.size()];
5377 list.toArray(stmtsArray);
5378 {if (true) return new ForStatement(initializations,
5381 new Block(stmtsArray,
5382 stmtsArray[0].sourceStart,
5383 stmtsArray[stmtsArray.length-1].sourceEnd),
5388 jj_la1[123] = jj_gen;
5389 jj_consume_token(-1);
5390 throw new ParseException();
5392 throw new Error("Missing return statement in function");
5395 static final public Expression[] ForInit() throws ParseException {
5396 final Expression[] exprs;
5397 if (jj_2_5(2147483647)) {
5398 exprs = LocalVariableDeclaration();
5399 {if (true) return exprs;}
5401 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5417 case INTEGER_LITERAL:
5418 case FLOATING_POINT_LITERAL:
5419 case STRING_LITERAL:
5424 exprs = StatementExpressionList();
5425 {if (true) return exprs;}
5428 jj_la1[124] = jj_gen;
5429 jj_consume_token(-1);
5430 throw new ParseException();
5433 throw new Error("Missing return statement in function");
5436 static final public Expression[] StatementExpressionList() throws ParseException {
5437 final ArrayList list = new ArrayList();
5438 final Expression expr;
5439 expr = Expression();
5443 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5448 jj_la1[125] = jj_gen;
5451 jj_consume_token(COMMA);
5455 final Expression[] exprsArray = new Expression[list.size()];
5456 list.toArray(exprsArray);
5457 {if (true) return exprsArray;}
5458 throw new Error("Missing return statement in function");
5461 static final public Continue ContinueStatement() throws ParseException {
5462 Expression expr = null;
5464 Token token2 = null;
5465 token = jj_consume_token(CONTINUE);
5466 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5482 case INTEGER_LITERAL:
5483 case FLOATING_POINT_LITERAL:
5484 case STRING_LITERAL:
5489 expr = Expression();
5492 jj_la1[126] = jj_gen;
5496 token2 = jj_consume_token(SEMICOLON);
5497 } catch (ParseException e) {
5498 errorMessage = "';' expected after 'continue' statement";
5501 errorStart = token.sourceEnd+1;
5502 errorEnd = token.sourceEnd+1;
5504 errorStart = expr.sourceEnd+1;
5505 errorEnd = expr.sourceEnd+1;
5507 processParseExceptionDebug(e);
5509 if (token2 == null) {
5511 {if (true) return new Continue(expr,token.sourceStart,token.sourceEnd);}
5513 {if (true) return new Continue(expr,token.sourceStart,expr.sourceEnd);}
5515 {if (true) return new Continue(expr,token.sourceStart,token2.sourceEnd);}
5516 throw new Error("Missing return statement in function");
5519 static final public ReturnStatement ReturnStatement() throws ParseException {
5520 Expression expr = null;
5522 Token token2 = null;
5523 token = jj_consume_token(RETURN);
5524 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5540 case INTEGER_LITERAL:
5541 case FLOATING_POINT_LITERAL:
5542 case STRING_LITERAL:
5547 expr = Expression();
5550 jj_la1[127] = jj_gen;
5554 token2 = jj_consume_token(SEMICOLON);
5555 } catch (ParseException e) {
5556 errorMessage = "';' expected after 'return' statement";
5559 errorStart = token.sourceEnd+1;
5560 errorEnd = token.sourceEnd+1;
5562 errorStart = expr.sourceEnd+1;
5563 errorEnd = expr.sourceEnd+1;
5565 processParseExceptionDebug(e);
5567 if (token2 == null) {
5569 {if (true) return new ReturnStatement(expr,token.sourceStart,token.sourceEnd);}
5571 {if (true) return new ReturnStatement(expr,token.sourceStart,expr.sourceEnd);}
5573 {if (true) return new ReturnStatement(expr,token.sourceStart,token2.sourceEnd);}
5574 throw new Error("Missing return statement in function");
5577 static final private boolean jj_2_1(int xla) {
5578 jj_la = xla; jj_lastpos = jj_scanpos = token;
5579 boolean retval = !jj_3_1();
5584 static final private boolean jj_2_2(int xla) {
5585 jj_la = xla; jj_lastpos = jj_scanpos = token;
5586 boolean retval = !jj_3_2();
5591 static final private boolean jj_2_3(int xla) {
5592 jj_la = xla; jj_lastpos = jj_scanpos = token;
5593 boolean retval = !jj_3_3();
5598 static final private boolean jj_2_4(int xla) {
5599 jj_la = xla; jj_lastpos = jj_scanpos = token;
5600 boolean retval = !jj_3_4();
5605 static final private boolean jj_2_5(int xla) {
5606 jj_la = xla; jj_lastpos = jj_scanpos = token;
5607 boolean retval = !jj_3_5();
5612 static final private boolean jj_3R_210() {
5613 if (jj_3R_116()) return true;
5614 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5618 static final private boolean jj_3R_209() {
5619 if (jj_3R_50()) return true;
5620 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5624 static final private boolean jj_3R_109() {
5625 if (jj_3R_114()) return true;
5626 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5630 if (jj_3R_115()) { jj_scanpos = xsp; break; }
5631 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5636 static final private boolean jj_3R_208() {
5637 if (jj_scan_token(IDENTIFIER)) return true;
5638 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5642 static final private boolean jj_3R_203() {
5649 if (jj_3R_210()) return true;
5650 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5651 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5652 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5656 static final private boolean jj_3R_110() {
5657 if (jj_scan_token(BIT_OR)) return true;
5658 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5659 if (jj_3R_109()) return true;
5660 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5664 static final private boolean jj_3R_103() {
5665 if (jj_3R_109()) return true;
5666 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5670 if (jj_3R_110()) { jj_scanpos = xsp; break; }
5671 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5676 static final private boolean jj_3R_188() {
5677 if (jj_scan_token(ARRAY)) return true;
5678 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5679 if (jj_3R_198()) return true;
5680 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5684 static final private boolean jj_3R_132() {
5685 if (jj_scan_token(IDENTIFIER)) return true;
5686 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5690 static final private boolean jj_3R_106() {
5691 if (jj_scan_token(DOT)) return true;
5692 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5693 if (jj_3R_103()) return true;
5694 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5698 static final private boolean jj_3R_131() {
5699 if (jj_scan_token(LBRACE)) return true;
5700 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5701 if (jj_3R_49()) return true;
5702 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5703 if (jj_scan_token(RBRACE)) return true;
5704 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5708 static final private boolean jj_3R_97() {
5709 if (jj_3R_103()) return true;
5710 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5714 if (jj_3R_106()) { jj_scanpos = xsp; break; }
5715 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5720 static final private boolean jj_3R_204() {
5721 if (jj_3R_207()) return true;
5722 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5726 static final private boolean jj_3R_122() {
5733 if (jj_3R_132()) return true;
5734 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5735 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5736 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5740 static final private boolean jj_3R_130() {
5741 if (jj_scan_token(DOLLAR)) return true;
5742 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5743 if (jj_3R_122()) return true;
5744 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5748 static final private boolean jj_3R_108() {
5749 if (jj_scan_token(_ANDL)) return true;
5750 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5754 static final private boolean jj_3R_107() {
5755 if (jj_scan_token(AND_AND)) return true;
5756 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5760 static final private boolean jj_3R_100() {
5765 if (jj_3R_108()) return true;
5766 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5767 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5768 if (jj_3R_97()) return true;
5769 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5773 static final private boolean jj_3R_81() {
5774 if (jj_3R_97()) return true;
5775 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5779 if (jj_3R_100()) { jj_scanpos = xsp; break; }
5780 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5785 static final private boolean jj_3R_79() {
5786 if (jj_scan_token(HOOK)) return true;
5787 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5788 if (jj_3R_49()) return true;
5789 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5790 if (jj_scan_token(COLON)) return true;
5791 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5792 if (jj_3R_73()) return true;
5793 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5797 static final private boolean jj_3R_195() {
5798 if (jj_scan_token(NEW)) return true;
5799 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5800 if (jj_3R_203()) return true;
5801 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5804 if (jj_3R_204()) jj_scanpos = xsp;
5805 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5809 static final private boolean jj_3R_68() {
5810 if (jj_scan_token(DOLLAR)) return true;
5811 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5812 if (jj_3R_122()) return true;
5813 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5817 static final private boolean jj_3R_202() {
5818 if (jj_3R_207()) return true;
5819 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5823 static final private boolean jj_3R_194() {
5824 if (jj_3R_116()) return true;
5825 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5828 if (jj_3R_202()) jj_scanpos = xsp;
5829 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5833 static final private boolean jj_3R_102() {
5834 if (jj_scan_token(_ORL)) return true;
5835 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5839 static final private boolean jj_3R_101() {
5840 if (jj_scan_token(OR_OR)) return true;
5841 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5845 static final private boolean jj_3R_83() {
5850 if (jj_3R_102()) return true;
5851 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5852 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5853 if (jj_3R_81()) return true;
5854 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5858 static final private boolean jj_3R_201() {
5859 if (jj_3R_207()) return true;
5860 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5864 static final private boolean jj_3R_76() {
5865 if (jj_3R_81()) return true;
5866 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5870 if (jj_3R_83()) { jj_scanpos = xsp; break; }
5871 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5876 static final private boolean jj_3_1() {
5877 if (jj_3R_40()) return true;
5878 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5882 static final private boolean jj_3R_51() {
5883 if (jj_scan_token(COMMA)) return true;
5884 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5885 if (jj_3R_49()) return true;
5886 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5890 static final private boolean jj_3R_200() {
5891 if (jj_scan_token(STATICCLASSACCESS)) return true;
5892 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5893 if (jj_3R_203()) return true;
5894 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5898 static final private boolean jj_3R_45() {
5899 if (jj_3R_49()) return true;
5900 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5904 if (jj_3R_51()) { jj_scanpos = xsp; break; }
5905 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5910 static final private boolean jj_3R_116() {
5911 if (jj_3R_68()) return true;
5912 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5916 if (jj_3_1()) { jj_scanpos = xsp; break; }
5917 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5922 static final private boolean jj_3R_193() {
5923 if (jj_scan_token(IDENTIFIER)) return true;
5924 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5928 if (jj_3R_200()) { jj_scanpos = xsp; break; }
5929 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5932 if (jj_3R_201()) jj_scanpos = xsp;
5933 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5937 static final private boolean jj_3R_187() {
5944 if (jj_3R_195()) return true;
5945 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5946 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5947 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5951 static final private boolean jj_3R_73() {
5952 if (jj_3R_76()) return true;
5953 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5956 if (jj_3R_79()) jj_scanpos = xsp;
5957 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5961 static final private boolean jj_3R_178() {
5962 if (jj_3R_188()) return true;
5963 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5967 static final private boolean jj_3_5() {
5968 if (jj_3R_45()) return true;
5969 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5973 static final private boolean jj_3R_186() {
5974 if (jj_scan_token(BIT_AND)) return true;
5975 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5979 static final private boolean jj_3R_96() {
5980 if (jj_scan_token(TILDEEQUAL)) return true;
5981 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5985 static final private boolean jj_3R_95() {
5986 if (jj_scan_token(DOTASSIGN)) return true;
5987 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5991 static final private boolean jj_3R_173() {
5996 if (jj_3R_178()) return true;
5997 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5998 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6002 static final private boolean jj_3R_177() {
6005 if (jj_3R_186()) jj_scanpos = xsp;
6006 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6007 if (jj_3R_187()) return true;
6008 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6012 static final private boolean jj_3R_94() {
6013 if (jj_scan_token(ORASSIGN)) return true;
6014 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6018 static final private boolean jj_3R_93() {
6019 if (jj_scan_token(XORASSIGN)) return true;
6020 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6024 static final private boolean jj_3R_92() {
6025 if (jj_scan_token(ANDASSIGN)) return true;
6026 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6030 static final private boolean jj_3R_91() {
6031 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6032 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6036 static final private boolean jj_3R_90() {
6037 if (jj_scan_token(LSHIFTASSIGN)) return true;
6038 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6042 static final private boolean jj_3R_89() {
6043 if (jj_scan_token(MINUSASSIGN)) return true;
6044 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6048 static final private boolean jj_3R_88() {
6049 if (jj_scan_token(PLUSASSIGN)) return true;
6050 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6054 static final private boolean jj_3R_87() {
6055 if (jj_scan_token(REMASSIGN)) return true;
6056 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6060 static final private boolean jj_3R_86() {
6061 if (jj_scan_token(SLASHASSIGN)) return true;
6062 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6066 static final private boolean jj_3R_85() {
6067 if (jj_scan_token(STARASSIGN)) return true;
6068 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6072 static final private boolean jj_3R_84() {
6073 if (jj_scan_token(ASSIGN)) return true;
6074 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6078 static final private boolean jj_3R_80() {
6105 if (jj_3R_96()) return true;
6106 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6107 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6108 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6109 } else 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;
6122 static final private boolean jj_3R_197() {
6123 if (jj_scan_token(MINUS_MINUS)) return true;
6124 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6128 static final private boolean jj_3R_196() {
6129 if (jj_scan_token(PLUS_PLUS)) return true;
6130 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6134 static final private boolean jj_3R_191() {
6139 if (jj_3R_197()) return true;
6140 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6141 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6145 static final private boolean jj_3R_175() {
6146 if (jj_3R_173()) return true;
6147 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6150 if (jj_3R_191()) jj_scanpos = xsp;
6151 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6155 static final private boolean jj_3R_99() {
6156 if (jj_3R_105()) return true;
6157 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6161 static final private boolean jj_3R_98() {
6162 if (jj_3R_104()) return true;
6163 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6167 static final private boolean jj_3R_82() {
6172 if (jj_3R_99()) return true;
6173 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6174 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6178 static final private boolean jj_3R_190() {
6179 if (jj_scan_token(ARRAY)) return true;
6180 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6184 static final private boolean jj_3R_189() {
6185 if (jj_3R_50()) return true;
6186 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6190 static final private boolean jj_3R_78() {
6191 if (jj_3R_82()) return true;
6192 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6196 static final private boolean jj_3R_43() {
6197 if (jj_scan_token(ARRAY)) return true;
6198 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6202 static final private boolean jj_3R_77() {
6203 if (jj_scan_token(BANG)) return true;
6204 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6205 if (jj_3R_74()) return true;
6206 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6210 static final private boolean jj_3R_74() {
6215 if (jj_3R_78()) return true;
6216 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6217 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6221 static final private boolean jj_3R_174() {
6222 if (jj_scan_token(LPAREN)) return true;
6223 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6228 if (jj_3R_190()) return true;
6229 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6230 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6231 if (jj_scan_token(RPAREN)) return true;
6232 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6233 if (jj_3R_144()) return true;
6234 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6238 static final private boolean jj_3R_42() {
6239 if (jj_3R_50()) return true;
6240 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6244 static final private boolean jj_3R_58() {
6245 if (jj_3R_74()) return true;
6246 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6250 static final private boolean jj_3_3() {
6251 if (jj_scan_token(LPAREN)) return true;
6252 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6257 if (jj_3R_43()) return true;
6258 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6259 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6260 if (jj_scan_token(RPAREN)) return true;
6261 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6265 static final private boolean jj_3R_172() {
6266 if (jj_scan_token(LPAREN)) return true;
6267 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6268 if (jj_3R_49()) return true;
6269 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6270 if (jj_scan_token(RPAREN)) return true;
6271 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6275 static final private boolean jj_3R_171() {
6276 if (jj_3R_176()) return true;
6277 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6281 static final private boolean jj_3R_170() {
6282 if (jj_3R_175()) return true;
6283 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6287 static final private boolean jj_3R_166() {
6296 if (jj_3R_172()) return true;
6297 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6298 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6299 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6300 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6304 static final private boolean jj_3R_169() {
6305 if (jj_3R_174()) return true;
6306 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6310 static final private boolean jj_3R_44() {
6311 if (jj_3R_49()) return true;
6312 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6313 if (jj_scan_token(SEMICOLON)) return true;
6314 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6318 static final private boolean jj_3R_168() {
6319 if (jj_scan_token(MINUS_MINUS)) return true;
6320 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6324 static final private boolean jj_3R_167() {
6325 if (jj_scan_token(PLUS_PLUS)) return true;
6326 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6330 static final private boolean jj_3R_75() {
6331 if (jj_3R_80()) return true;
6332 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6333 if (jj_3R_49()) return true;
6334 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6338 static final private boolean jj_3R_165() {
6343 if (jj_3R_168()) return true;
6344 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6345 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6346 if (jj_3R_173()) return true;
6347 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6351 static final private boolean jj_3R_49() {
6356 if (jj_3R_58()) return true;
6357 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6358 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6362 static final private boolean jj_3R_57() {
6363 if (jj_3R_73()) return true;
6364 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6367 if (jj_3R_75()) jj_scanpos = xsp;
6368 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6372 static final private boolean jj_3R_67() {
6373 if (jj_scan_token(OBJECT)) return true;
6374 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6378 static final private boolean jj_3R_161() {
6379 if (jj_3R_166()) return true;
6380 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6384 static final private boolean jj_3R_66() {
6385 if (jj_scan_token(INTEGER)) return true;
6386 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6390 static final private boolean jj_3R_65() {
6391 if (jj_scan_token(INT)) return true;
6392 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6396 static final private boolean jj_3R_64() {
6397 if (jj_scan_token(FLOAT)) return true;
6398 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6402 static final private boolean jj_3R_160() {
6403 if (jj_3R_165()) return true;
6404 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6408 static final private boolean jj_3R_63() {
6409 if (jj_scan_token(DOUBLE)) return true;
6410 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6414 static final private boolean jj_3R_62() {
6415 if (jj_scan_token(REAL)) return true;
6416 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6420 static final private boolean jj_3R_61() {
6421 if (jj_scan_token(BOOLEAN)) return true;
6422 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6426 static final private boolean jj_3R_60() {
6427 if (jj_scan_token(BOOL)) return true;
6428 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6432 static final private boolean jj_3R_159() {
6433 if (jj_scan_token(MINUS)) return true;
6434 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6435 if (jj_3R_148()) return true;
6436 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6440 static final private boolean jj_3R_50() {
6459 if (jj_3R_67()) return true;
6460 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6461 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6462 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6463 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6464 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6465 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6466 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6467 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6468 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6472 static final private boolean jj_3R_59() {
6473 if (jj_scan_token(STRING)) return true;
6474 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6478 static final private boolean jj_3R_156() {
6487 if (jj_3R_161()) return true;
6488 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6489 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6490 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6491 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6495 static final private boolean jj_3R_158() {
6496 if (jj_scan_token(PLUS)) return true;
6497 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6498 if (jj_3R_148()) return true;
6499 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6503 static final private boolean jj_3_4() {
6504 if (jj_3R_44()) return true;
6505 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6509 static final private boolean jj_3R_164() {
6510 if (jj_3R_156()) return true;
6511 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6515 static final private boolean jj_3R_163() {
6516 if (jj_scan_token(BANG)) return true;
6517 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6518 if (jj_3R_157()) return true;
6519 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6523 static final private boolean jj_3R_157() {
6530 if (jj_3R_164()) return true;
6531 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6532 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6533 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6537 static final private boolean jj_3R_162() {
6538 if (jj_scan_token(AT)) return true;
6539 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6540 if (jj_3R_157()) return true;
6541 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6545 static final private boolean jj_3R_155() {
6546 if (jj_3R_156()) return true;
6547 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6551 static final private boolean jj_3R_216() {
6552 if (jj_scan_token(COMMA)) return true;
6553 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6554 if (jj_3R_49()) return true;
6555 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6559 static final private boolean jj_3R_154() {
6560 if (jj_scan_token(BANG)) return true;
6561 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6562 if (jj_3R_157()) return true;
6563 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6567 static final private boolean jj_3R_215() {
6568 if (jj_3R_49()) return true;
6569 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6573 if (jj_3R_216()) { jj_scanpos = xsp; break; }
6574 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6579 static final private boolean jj_3R_153() {
6580 if (jj_scan_token(TILDE)) return true;
6581 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6582 if (jj_3R_148()) return true;
6583 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6587 static final private boolean jj_3R_148() {
6596 if (jj_3R_155()) return true;
6597 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6598 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6599 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6600 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6604 static final private boolean jj_3R_152() {
6605 if (jj_scan_token(AT)) return true;
6606 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6607 if (jj_3R_148()) return true;
6608 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6612 static final private boolean jj_3R_213() {
6613 if (jj_3R_215()) return true;
6614 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6618 static final private boolean jj_3R_144() {
6619 if (jj_3R_148()) return true;
6620 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6624 static final private boolean jj_3R_151() {
6625 if (jj_scan_token(REMAINDER)) return true;
6626 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6630 static final private boolean jj_3R_150() {
6631 if (jj_scan_token(SLASH)) return true;
6632 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6636 static final private boolean jj_3R_149() {
6637 if (jj_scan_token(STAR)) return true;
6638 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6642 static final private boolean jj_3R_207() {
6643 if (jj_scan_token(LPAREN)) return true;
6644 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6647 if (jj_3R_213()) jj_scanpos = xsp;
6648 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6649 if (jj_scan_token(RPAREN)) return true;
6650 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6654 static final private boolean jj_3R_145() {
6661 if (jj_3R_151()) return true;
6662 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6663 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6664 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6665 if (jj_3R_144()) return true;
6666 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6670 static final private boolean jj_3R_139() {
6671 if (jj_3R_144()) return true;
6672 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6676 if (jj_3R_145()) { jj_scanpos = xsp; break; }
6677 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6682 static final private boolean jj_3R_212() {
6683 if (jj_scan_token(LBRACE1)) return true;
6684 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6685 if (jj_scan_token(ID)) return true;
6686 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6687 if (jj_scan_token(RBRACE1)) return true;
6688 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6692 static final private boolean jj_3R_147() {
6693 if (jj_scan_token(MINUS)) return true;
6694 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6698 static final private boolean jj_3R_211() {
6699 if (jj_scan_token(IDENTIFIER)) return true;
6700 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6704 static final private boolean jj_3R_146() {
6705 if (jj_scan_token(PLUS)) return true;
6706 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6710 static final private boolean jj_3R_140() {
6715 if (jj_3R_147()) return true;
6716 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6717 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6718 if (jj_3R_139()) return true;
6719 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6723 static final private boolean jj_3R_199() {
6724 if (jj_scan_token(DOLLARS)) return true;
6725 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6730 if (jj_3R_212()) return true;
6731 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6732 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6736 static final private boolean jj_3R_133() {
6737 if (jj_3R_139()) return true;
6738 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6742 if (jj_3R_140()) { jj_scanpos = xsp; break; }
6743 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6748 static final private boolean jj_3R_192() {
6749 if (jj_scan_token(DOUBLEQUOTE)) return true;
6750 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6754 if (jj_3R_199()) { jj_scanpos = xsp; break; }
6755 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6757 if (jj_scan_token(DOUBLEQUOTE2)) return true;
6758 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6762 static final private boolean jj_3R_113() {
6763 if (jj_scan_token(ASSIGN)) return true;
6764 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6765 if (jj_3R_49()) return true;
6766 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6770 static final private boolean jj_3R_143() {
6771 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
6772 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6776 static final private boolean jj_3R_142() {
6777 if (jj_scan_token(RSIGNEDSHIFT)) return true;
6778 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6782 static final private boolean jj_3R_141() {
6783 if (jj_scan_token(LSHIFT)) return true;
6784 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6788 static final private boolean jj_3R_185() {
6789 if (jj_3R_192()) return true;
6790 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6794 static final private boolean jj_3R_184() {
6795 if (jj_scan_token(NULL)) return true;
6796 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6800 static final private boolean jj_3R_134() {
6807 if (jj_3R_143()) return true;
6808 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6809 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6810 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6811 if (jj_3R_133()) return true;
6812 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6816 static final private boolean jj_3R_183() {
6817 if (jj_scan_token(FALSE)) return true;
6818 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6822 static final private boolean jj_3R_182() {
6823 if (jj_scan_token(TRUE)) return true;
6824 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6828 static final private boolean jj_3R_123() {
6829 if (jj_3R_133()) return true;
6830 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6834 if (jj_3R_134()) { jj_scanpos = xsp; break; }
6835 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6840 static final private boolean jj_3R_181() {
6841 if (jj_scan_token(STRING_LITERAL)) return true;
6842 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6846 static final private boolean jj_3R_180() {
6847 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
6848 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6852 static final private boolean jj_3R_117() {
6853 if (jj_3R_116()) return true;
6854 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6858 static final private boolean jj_3R_179() {
6859 if (jj_scan_token(INTEGER_LITERAL)) return true;
6860 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6864 static final private boolean jj_3R_176() {
6879 if (jj_3R_185()) return true;
6880 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6881 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6882 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6883 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6884 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6885 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6886 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6890 static final private boolean jj_3R_138() {
6891 if (jj_scan_token(GE)) return true;
6892 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6896 static final private boolean jj_3R_137() {
6897 if (jj_scan_token(LE)) return true;
6898 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6902 static final private boolean jj_3R_136() {
6903 if (jj_scan_token(GT)) return true;
6904 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6908 static final private boolean jj_3R_112() {
6909 if (jj_scan_token(COMMA)) return true;
6910 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6913 if (jj_3R_117()) jj_scanpos = xsp;
6914 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6918 static final private boolean jj_3R_135() {
6919 if (jj_scan_token(LT)) return true;
6920 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6924 static final private boolean jj_3R_124() {
6933 if (jj_3R_138()) return true;
6934 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6935 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6936 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6937 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6938 if (jj_3R_123()) return true;
6939 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6943 static final private boolean jj_3R_120() {
6944 if (jj_3R_123()) return true;
6945 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6949 if (jj_3R_124()) { jj_scanpos = xsp; break; }
6950 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6955 static final private boolean jj_3R_111() {
6956 if (jj_3R_116()) return true;
6957 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6961 static final private boolean jj_3R_72() {
6962 if (jj_3R_50()) return true;
6963 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6967 static final private boolean jj_3R_71() {
6968 if (jj_3R_49()) return true;
6969 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6973 static final private boolean jj_3R_56() {
6978 if (jj_3R_72()) return true;
6979 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6980 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6984 static final private boolean jj_3R_48() {
6985 if (jj_scan_token(LBRACE)) return true;
6986 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6989 if (jj_3R_56()) jj_scanpos = xsp;
6990 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6991 if (jj_scan_token(RBRACE)) return true;
6992 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6996 static final private boolean jj_3R_104() {
6997 if (jj_scan_token(LIST)) return true;
6998 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6999 if (jj_scan_token(LPAREN)) return true;
7000 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7003 if (jj_3R_111()) jj_scanpos = xsp;
7004 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7007 if (jj_3R_112()) { jj_scanpos = xsp; break; }
7008 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7010 if (jj_scan_token(RPAREN)) return true;
7011 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7013 if (jj_3R_113()) jj_scanpos = xsp;
7014 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7018 static final private boolean jj_3R_206() {
7019 if (jj_scan_token(COMMA)) return true;
7020 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7024 static final private boolean jj_3R_70() {
7025 if (jj_3R_50()) return true;
7026 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7030 static final private boolean jj_3_2() {
7031 if (jj_scan_token(COMMA)) return true;
7032 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7033 if (jj_3R_41()) return true;
7034 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7038 static final private boolean jj_3R_55() {
7043 if (jj_3R_70()) return true;
7044 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7045 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7049 static final private boolean jj_3R_69() {
7050 if (jj_3R_49()) return true;
7051 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7055 static final private boolean jj_3R_205() {
7056 if (jj_3R_41()) return true;
7057 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7061 if (jj_3_2()) { jj_scanpos = xsp; break; }
7062 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7067 static final private boolean jj_3R_47() {
7068 if (jj_scan_token(LBRACKET)) return true;
7069 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7072 if (jj_3R_55()) jj_scanpos = xsp;
7073 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7074 if (jj_scan_token(RBRACKET)) return true;
7075 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7079 static final private boolean jj_3R_129() {
7080 if (jj_scan_token(TRIPLEEQUAL)) return true;
7081 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7085 static final private boolean jj_3R_128() {
7086 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
7087 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7091 static final private boolean jj_3R_127() {
7092 if (jj_scan_token(NOT_EQUAL)) return true;
7093 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7097 static final private boolean jj_3R_126() {
7098 if (jj_scan_token(DIF)) return true;
7099 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7103 static final private boolean jj_3R_105() {
7104 if (jj_scan_token(PRINT)) return true;
7105 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7106 if (jj_3R_49()) return true;
7107 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7111 static final private boolean jj_3R_198() {
7112 if (jj_scan_token(LPAREN)) return true;
7113 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7116 if (jj_3R_205()) jj_scanpos = xsp;
7117 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7119 if (jj_3R_206()) jj_scanpos = xsp;
7120 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7121 if (jj_scan_token(RPAREN)) return true;
7122 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7126 static final private boolean jj_3R_125() {
7127 if (jj_scan_token(EQUAL_EQUAL)) return true;
7128 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7132 static final private boolean jj_3R_54() {
7133 if (jj_3R_68()) return true;
7134 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7138 static final private boolean jj_3R_121() {
7149 if (jj_3R_129()) return true;
7150 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7151 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7152 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7153 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7154 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7155 if (jj_3R_120()) return true;
7156 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7160 static final private boolean jj_3R_53() {
7161 if (jj_scan_token(IDENTIFIER)) return true;
7162 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7166 static final private boolean jj_3R_118() {
7167 if (jj_3R_120()) return true;
7168 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7172 if (jj_3R_121()) { jj_scanpos = xsp; break; }
7173 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7178 static final private boolean jj_3R_214() {
7179 if (jj_scan_token(ARRAYASSIGN)) return true;
7180 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7181 if (jj_3R_49()) return true;
7182 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7186 static final private boolean jj_3R_52() {
7187 if (jj_scan_token(LBRACE)) return true;
7188 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7189 if (jj_3R_49()) return true;
7190 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7191 if (jj_scan_token(RBRACE)) return true;
7192 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7196 static final private boolean jj_3R_41() {
7197 if (jj_3R_49()) return true;
7198 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7201 if (jj_3R_214()) jj_scanpos = xsp;
7202 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7206 static final private boolean jj_3R_119() {
7207 if (jj_scan_token(BIT_AND)) return true;
7208 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7209 if (jj_3R_118()) return true;
7210 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7214 static final private boolean jj_3R_46() {
7215 if (jj_scan_token(CLASSACCESS)) return true;
7216 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7223 if (jj_3R_54()) return true;
7224 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7225 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7226 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7230 static final private boolean jj_3R_40() {
7237 if (jj_3R_48()) return true;
7238 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7239 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7240 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7244 static final private boolean jj_3R_114() {
7245 if (jj_3R_118()) return true;
7246 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7250 if (jj_3R_119()) { jj_scanpos = xsp; break; }
7251 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7256 static final private boolean jj_3R_115() {
7257 if (jj_scan_token(XOR)) return true;
7258 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7259 if (jj_3R_114()) return true;
7260 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7264 static private boolean jj_initialized_once = false;
7265 static public PHPParserTokenManager token_source;
7266 static SimpleCharStream jj_input_stream;
7267 static public Token token, jj_nt;
7268 static private int jj_ntk;
7269 static private Token jj_scanpos, jj_lastpos;
7270 static private int jj_la;
7271 static public boolean lookingAhead = false;
7272 static private boolean jj_semLA;
7273 static private int jj_gen;
7274 static final private int[] jj_la1 = new int[128];
7275 static private int[] jj_la1_0;
7276 static private int[] jj_la1_1;
7277 static private int[] jj_la1_2;
7278 static private int[] jj_la1_3;
7279 static private int[] jj_la1_4;
7287 private static void jj_la1_0() {
7288 jj_la1_0 = new int[] {0x5800001e,0x6,0x6,0x5800001e,0x0,0x58000000,0x0,0x30000000,0x30000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000000,0x40000000,0x8,0x6,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x58000010,0x58000010,0x58000000,0x58000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x58000010,0x58000010,0x0,0x0,0x40000010,0x40000010,0x80000000,0x0,0x40000010,0x80000000,0x0,0x40000010,0x40000010,0x40000010,0x40000010,0x40000010,0x40000000,0x40000000,0x0,0x0,0x0,0x40000000,0x40000000,0x0,0x0,0x0,0x0,};
7290 private static void jj_la1_1() {
7291 jj_la1_1 = new int[] {0xd7541ffe,0x0,0x0,0xd7541ffe,0x0,0xd7541ffe,0x200000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc2000002,0x8000,0xc300001a,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc300001a,0x18,0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc3000002,0xc3000002,0xc3000002,0x0,0xc3000002,0x2,0x0,0x0,0x0,0x1000002,0x4000,0x0,0x0,0x0,0x1000000,0x0,0x0,0xc300001a,0xc300001a,0xc300001a,0xc300001a,0x2000,0xc2000000,0x0,0x0,0xc300001a,0x0,0x0,0x14541fe0,0xd7541ffe,0x0,0x0,0x3c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xd7541ffa,0x0,0x0,0x0,0x0,0x1000002,0x0,0x90000,0x90000,0xd7541ffe,0xd7541ffe,0x90000,0xc300001a,0xd7541ffe,0xd7541ffe,0x0,0x1,0xd7541ffe,0x0,0x1,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xc300001a,0xc300001a,0xc300001a,0xd7541ffe,0xd7541ffe,0xc300001a,0x0,0xc300001a,0xc300001a,};
7293 private static void jj_la1_2() {
7294 jj_la1_2 = new int[] {0x27870021,0x0,0x0,0x27870021,0x0,0x27870021,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000000,0x0,0x27870000,0x0,0x20000000,0x0,0x20000000,0x20000000,0xff80,0x0,0x27870000,0x20000,0x0,0x0,0x80000,0x200000,0x200000,0x400000,0x400000,0x0,0x40000000,0x80000000,0x20000000,0x0,0x0,0x0,0x0,0x0,0x0,0x6000000,0x6000000,0x18000000,0x18000000,0x27870000,0x27830000,0x27800000,0x1800000,0x20000000,0xff80,0x1800000,0x1800000,0x20000000,0x20000000,0x0,0x0,0x0,0x0,0x0,0xff80,0x0,0x2787ff80,0x2787ff80,0x2787ff80,0x2787ff80,0x0,0x0,0x0,0x0,0x27870000,0x0,0x10000,0x10021,0x27870021,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x27870021,0x27870021,0x27870021,0x27870021,0x0,0x0,0x1800000,0x1800000,0x21800000,0x100000,0x0,0x0,0x27870021,0x27870021,0x0,0x27870000,0x27870021,0x27870021,0x0,0x0,0x27870021,0x0,0x0,0x27970021,0x27870021,0x27870021,0x27870021,0x27870021,0x27870021,0x27970021,0x27870000,0x27870000,0x27870000,0x27870021,0x27970021,0x27870000,0x0,0x27870000,0x27870000,};
7296 private static void jj_la1_3() {
7297 jj_la1_3 = new int[] {0x18011440,0x0,0x0,0x18011440,0x0,0x18011440,0x0,0x0,0x0,0x0,0x10000000,0x0,0x0,0x18000000,0x440,0x440,0x10011440,0x0,0x18011440,0x0,0x0,0x0,0x8000000,0x0,0x0,0x0,0x18011440,0x0,0x0,0x0,0x0,0x10,0x10,0x20,0x20,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe,0xe,0x0,0x0,0x1,0x1,0x18011440,0x18011440,0x18011440,0x0,0x18011440,0x0,0x0,0x0,0x0,0x18000000,0x0,0x0,0x0,0x0,0x18000000,0x18000000,0x18000000,0x18011440,0x18011440,0x18011440,0x18011440,0x0,0x11440,0x20000,0x10080000,0x18011440,0x0,0x0,0x10000000,0x18011440,0x0,0x0,0x0,0x8000000,0x0,0x8000000,0x0,0x0,0x0,0x0,0x18011440,0x18011440,0x18011440,0x18011440,0x0,0x0,0x0,0x0,0x18000000,0x0,0x0,0x0,0x18011440,0x18011440,0x0,0x18011440,0x18011440,0x18011440,0x0,0x0,0x18011440,0x0,0x0,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x0,0x18011440,0x18011440,};
7299 private static void jj_la1_4() {
7300 jj_la1_4 = new int[] {0x8a,0x0,0x0,0x8a,0x80,0x8a,0x0,0x0,0x0,0x100,0x8,0x80000,0x80000,0x8,0x0,0x0,0x0,0x0,0x2,0x100,0x0,0x100,0x0,0x0,0x0,0xfff80000,0x2,0x0,0x0,0xfff80000,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x0,0x0,0x79000,0x79000,0x6c00,0x6c00,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x2,0x2,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x2,0x2,0x0,0x0,0x8,0x2,0x2,0x2,0x2,0x28,0x0,0x0,0x0,0x2,0x100,0x0,0x88,0x8a,0x0,0x0,0x0,0x0,0x100,0x0,0x80000,0x100,0x100,0x100,0x8a,0x8a,0x8a,0x8a,0x100,0x80000,0x0,0x0,0x0,0x8,0x0,0x0,0x8a,0x8a,0x0,0x2,0x8a,0x8a,0x0,0x0,0x8a,0x0,0x0,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x2,0x2,0x2,0x8a,0x8a,0x2,0x100,0x2,0x2,};
7302 static final private JJCalls[] jj_2_rtns = new JJCalls[5];
7303 static private boolean jj_rescan = false;
7304 static private int jj_gc = 0;
7306 public PHPParser(java.io.InputStream stream) {
7307 if (jj_initialized_once) {
7308 System.out.println("ERROR: Second call to constructor of static parser. You must");
7309 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7310 System.out.println(" during parser generation.");
7313 jj_initialized_once = true;
7314 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7315 token_source = new PHPParserTokenManager(jj_input_stream);
7316 token = new Token();
7319 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7320 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7323 static public void ReInit(java.io.InputStream stream) {
7324 jj_input_stream.ReInit(stream, 1, 1);
7325 token_source.ReInit(jj_input_stream);
7326 token = new Token();
7329 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7330 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7333 public PHPParser(java.io.Reader stream) {
7334 if (jj_initialized_once) {
7335 System.out.println("ERROR: Second call to constructor of static parser. You must");
7336 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7337 System.out.println(" during parser generation.");
7340 jj_initialized_once = true;
7341 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7342 token_source = new PHPParserTokenManager(jj_input_stream);
7343 token = new Token();
7346 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7347 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7350 static public void ReInit(java.io.Reader stream) {
7351 jj_input_stream.ReInit(stream, 1, 1);
7352 token_source.ReInit(jj_input_stream);
7353 token = new Token();
7356 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7357 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7360 public PHPParser(PHPParserTokenManager tm) {
7361 if (jj_initialized_once) {
7362 System.out.println("ERROR: Second call to constructor of static parser. You must");
7363 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7364 System.out.println(" during parser generation.");
7367 jj_initialized_once = true;
7369 token = new Token();
7372 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7373 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7376 public void ReInit(PHPParserTokenManager tm) {
7378 token = new Token();
7381 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7382 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7385 static final private Token jj_consume_token(int kind) throws ParseException {
7387 if ((oldToken = token).next != null) token = token.next;
7388 else token = token.next = token_source.getNextToken();
7390 if (token.kind == kind) {
7392 if (++jj_gc > 100) {
7394 for (int i = 0; i < jj_2_rtns.length; i++) {
7395 JJCalls c = jj_2_rtns[i];
7397 if (c.gen < jj_gen) c.first = null;
7406 throw generateParseException();
7409 static final private boolean jj_scan_token(int kind) {
7410 if (jj_scanpos == jj_lastpos) {
7412 if (jj_scanpos.next == null) {
7413 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
7415 jj_lastpos = jj_scanpos = jj_scanpos.next;
7418 jj_scanpos = jj_scanpos.next;
7421 int i = 0; Token tok = token;
7422 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
7423 if (tok != null) jj_add_error_token(kind, i);
7425 return (jj_scanpos.kind != kind);
7428 static final public Token getNextToken() {
7429 if (token.next != null) token = token.next;
7430 else token = token.next = token_source.getNextToken();
7436 static final public Token getToken(int index) {
7437 Token t = lookingAhead ? jj_scanpos : token;
7438 for (int i = 0; i < index; i++) {
7439 if (t.next != null) t = t.next;
7440 else t = t.next = token_source.getNextToken();
7445 static final private int jj_ntk() {
7446 if ((jj_nt=token.next) == null)
7447 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
7449 return (jj_ntk = jj_nt.kind);
7452 static private java.util.Vector jj_expentries = new java.util.Vector();
7453 static private int[] jj_expentry;
7454 static private int jj_kind = -1;
7455 static private int[] jj_lasttokens = new int[100];
7456 static private int jj_endpos;
7458 static private void jj_add_error_token(int kind, int pos) {
7459 if (pos >= 100) return;
7460 if (pos == jj_endpos + 1) {
7461 jj_lasttokens[jj_endpos++] = kind;
7462 } else if (jj_endpos != 0) {
7463 jj_expentry = new int[jj_endpos];
7464 for (int i = 0; i < jj_endpos; i++) {
7465 jj_expentry[i] = jj_lasttokens[i];
7467 boolean exists = false;
7468 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
7469 int[] oldentry = (int[])(enum.nextElement());
7470 if (oldentry.length == jj_expentry.length) {
7472 for (int i = 0; i < jj_expentry.length; i++) {
7473 if (oldentry[i] != jj_expentry[i]) {
7481 if (!exists) jj_expentries.addElement(jj_expentry);
7482 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
7486 static public ParseException generateParseException() {
7487 jj_expentries.removeAllElements();
7488 boolean[] la1tokens = new boolean[160];
7489 for (int i = 0; i < 160; i++) {
7490 la1tokens[i] = false;
7493 la1tokens[jj_kind] = true;
7496 for (int i = 0; i < 128; i++) {
7497 if (jj_la1[i] == jj_gen) {
7498 for (int j = 0; j < 32; j++) {
7499 if ((jj_la1_0[i] & (1<<j)) != 0) {
7500 la1tokens[j] = true;
7502 if ((jj_la1_1[i] & (1<<j)) != 0) {
7503 la1tokens[32+j] = true;
7505 if ((jj_la1_2[i] & (1<<j)) != 0) {
7506 la1tokens[64+j] = true;
7508 if ((jj_la1_3[i] & (1<<j)) != 0) {
7509 la1tokens[96+j] = true;
7511 if ((jj_la1_4[i] & (1<<j)) != 0) {
7512 la1tokens[128+j] = true;
7517 for (int i = 0; i < 160; i++) {
7519 jj_expentry = new int[1];
7521 jj_expentries.addElement(jj_expentry);
7526 jj_add_error_token(0, 0);
7527 int[][] exptokseq = new int[jj_expentries.size()][];
7528 for (int i = 0; i < jj_expentries.size(); i++) {
7529 exptokseq[i] = (int[])jj_expentries.elementAt(i);
7531 return new ParseException(token, exptokseq, tokenImage);
7534 static final public void enable_tracing() {
7537 static final public void disable_tracing() {
7540 static final private void jj_rescan_token() {
7542 for (int i = 0; i < 5; i++) {
7543 JJCalls p = jj_2_rtns[i];
7545 if (p.gen > jj_gen) {
7546 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7548 case 0: jj_3_1(); break;
7549 case 1: jj_3_2(); break;
7550 case 2: jj_3_3(); break;
7551 case 3: jj_3_4(); break;
7552 case 4: jj_3_5(); break;
7556 } while (p != null);
7561 static final private void jj_save(int index, int xla) {
7562 JJCalls p = jj_2_rtns[index];
7563 while (p.gen > jj_gen) {
7564 if (p.next == null) { p = p.next = new JJCalls(); break; }
7567 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7570 static final class JJCalls {