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 char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,
316 currentPosition).toCharArray();
317 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
320 /** Create a new task. */
321 public static final void createNewTask(final int todoStart) {
322 final String todo = SimpleCharStream.currentBuffer.substring(todoStart,
323 SimpleCharStream.currentBuffer.indexOf("\n",
327 setMarker(fileToParse,
329 SimpleCharStream.getBeginLine(),
331 "Line "+SimpleCharStream.getBeginLine());
332 } catch (CoreException e) {
333 PHPeclipsePlugin.log(e);
338 private static final void parse() throws ParseException {
342 static final public void todo() throws ParseException {
344 todoToken = jj_consume_token(23);
345 createNewTask(todoToken.sourceStart);
348 static final public void phpTest() throws ParseException {
353 static final public void phpFile() throws ParseException {
357 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
396 case INTEGER_LITERAL:
397 case FLOATING_POINT_LITERAL:
413 PHPParser.createNewHTMLCode();
414 } catch (TokenMgrError e) {
415 PHPeclipsePlugin.log(e);
416 errorStart = SimpleCharStream.beginOffset;
417 errorEnd = SimpleCharStream.endOffset;
418 errorMessage = e.getMessage();
420 {if (true) throw generateParseException();}
425 * A php block is a <?= expression [;]?>
426 * or <?php somephpcode ?>
427 * or <? somephpcode ?>
429 static final public void PhpBlock() throws ParseException {
430 final PHPEchoBlock phpEchoBlock;
431 final Token token,phpEnd;
432 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
434 phpEchoBlock = phpEchoBlock();
435 pushOnAstNodes(phpEchoBlock);
474 case INTEGER_LITERAL:
475 case FLOATING_POINT_LITERAL:
483 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
486 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
488 jj_consume_token(PHPSTARTLONG);
491 token = jj_consume_token(PHPSTARTSHORT);
493 setMarker(fileToParse,
494 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
498 "Line " + token.beginLine);
499 } catch (CoreException e) {
500 PHPeclipsePlugin.log(e);
505 jj_consume_token(-1);
506 throw new ParseException();
513 PHPParser.createNewHTMLCode();
516 phpEnd = jj_consume_token(PHPEND);
517 htmlStart = phpEnd.sourceEnd;
518 } catch (ParseException e) {
519 errorMessage = "'?>' expected";
521 errorStart = e.currentToken.sourceStart;
522 errorEnd = e.currentToken.sourceEnd;
523 processParseExceptionDebug(e);
528 jj_consume_token(-1);
529 throw new ParseException();
533 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
534 final Expression expr;
535 final PHPEchoBlock echoBlock;
536 final Token token, token2;
537 token = jj_consume_token(PHPECHOSTART);
538 PHPParser.createNewHTMLCode();
540 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
542 jj_consume_token(SEMICOLON);
548 token2 = jj_consume_token(PHPEND);
549 htmlStart = token2.sourceEnd;
551 echoBlock = new PHPEchoBlock(expr,token.sourceStart,token2.sourceEnd);
552 pushOnAstNodes(echoBlock);
553 {if (true) return echoBlock;}
554 throw new Error("Missing return statement in function");
557 static final public void Php() throws ParseException {
560 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
595 case INTEGER_LITERAL:
596 case FLOATING_POINT_LITERAL:
614 static final public ClassDeclaration ClassDeclaration() throws ParseException {
615 final ClassDeclaration classDeclaration;
616 Token className = null;
617 final Token superclassName, token, extendsToken;
618 String classNameImage = SYNTAX_ERROR_CHAR;
619 String superclassNameImage = null;
621 token = jj_consume_token(CLASS);
623 className = jj_consume_token(IDENTIFIER);
624 classNameImage = className.image;
625 } catch (ParseException e) {
626 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
628 errorStart = token.sourceEnd+1;
629 errorEnd = token.sourceEnd+1;
630 processParseExceptionDebug(e);
632 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
634 extendsToken = jj_consume_token(EXTENDS);
636 superclassName = jj_consume_token(IDENTIFIER);
637 superclassNameImage = superclassName.image;
638 } catch (ParseException e) {
639 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
641 errorStart = extendsToken.sourceEnd+1;
642 errorEnd = extendsToken.sourceEnd+1;
643 processParseExceptionDebug(e);
644 superclassNameImage = SYNTAX_ERROR_CHAR;
652 if (className == null) {
653 start = token.sourceStart;
654 end = token.sourceEnd;
656 start = className.sourceStart;
657 end = className.sourceEnd;
659 if (superclassNameImage == null) {
661 classDeclaration = new ClassDeclaration(currentSegment,
666 classDeclaration = new ClassDeclaration(currentSegment,
672 currentSegment.add(classDeclaration);
673 currentSegment = classDeclaration;
674 classEnd = ClassBody(classDeclaration);
675 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
676 classDeclaration.sourceEnd = classEnd;
677 pushOnAstNodes(classDeclaration);
678 {if (true) return classDeclaration;}
679 throw new Error("Missing return statement in function");
682 static final public int ClassBody(final ClassDeclaration classDeclaration) throws ParseException {
685 jj_consume_token(LBRACE);
686 } catch (ParseException e) {
687 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "'. '{' expected";
689 errorStart = e.currentToken.sourceStart;
690 errorEnd = e.currentToken.sourceEnd;
691 processParseExceptionDebug(e);
695 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
704 ClassBodyDeclaration(classDeclaration);
707 token = jj_consume_token(RBRACE);
708 {if (true) return token.sourceEnd;}
709 } catch (ParseException e) {
710 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. 'var', 'function' or '}' expected";
712 errorStart = e.currentToken.sourceStart;
713 errorEnd = e.currentToken.sourceEnd;
714 processParseExceptionDebug(e);
715 {if (true) return PHPParser.token.sourceEnd;}
717 throw new Error("Missing return statement in function");
721 * A class can contain only methods and fields.
723 static final public void ClassBodyDeclaration(final ClassDeclaration classDeclaration) throws ParseException {
724 final MethodDeclaration method;
725 final FieldDeclaration field;
726 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
728 method = MethodDeclaration();
729 method.analyzeCode();
730 classDeclaration.addMethod(method);
733 field = FieldDeclaration();
734 classDeclaration.addField(field);
738 jj_consume_token(-1);
739 throw new ParseException();
744 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
745 * it is only used by ClassBodyDeclaration()
747 static final public FieldDeclaration FieldDeclaration() throws ParseException {
748 VariableDeclaration variableDeclaration;
749 final VariableDeclaration[] list;
750 final ArrayList arrayList = new ArrayList();
754 token = jj_consume_token(VAR);
755 variableDeclaration = VariableDeclaratorNoSuffix();
756 arrayList.add(variableDeclaration);
757 pos = variableDeclaration.sourceEnd;
760 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
768 jj_consume_token(COMMA);
769 variableDeclaration = VariableDeclaratorNoSuffix();
770 arrayList.add(variableDeclaration);
771 outlineInfo.addVariable(variableDeclaration.name());
772 pos = variableDeclaration.sourceEnd;
775 token2 = jj_consume_token(SEMICOLON);
776 } catch (ParseException e) {
777 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
781 processParseExceptionDebug(e);
783 list = new VariableDeclaration[arrayList.size()];
784 arrayList.toArray(list);
786 if (token2 == null) {
787 end = list[list.length-1].sourceEnd;
789 end = token2.sourceEnd;
791 {if (true) return new FieldDeclaration(list,
795 throw new Error("Missing return statement in function");
799 * a strict variable declarator : there cannot be a suffix here.
800 * It will be used by fields and formal parameters
802 static final public VariableDeclaration VariableDeclaratorNoSuffix() throws ParseException {
803 final Token token, lbrace,rbrace;
804 Expression expr, initializer = null;
807 jj_consume_token(DOLLAR);
808 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
810 token = jj_consume_token(IDENTIFIER);
811 variable = new Variable(token.image,token.sourceStart,token.sourceEnd);
814 lbrace = jj_consume_token(LBRACE);
816 rbrace = jj_consume_token(RBRACE);
817 variable = new Variable(expr,lbrace.sourceStart,rbrace.sourceEnd);
821 jj_consume_token(-1);
822 throw new ParseException();
824 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
826 assignToken = jj_consume_token(ASSIGN);
828 initializer = VariableInitializer();
829 } catch (ParseException e) {
830 errorMessage = "Literal expression expected in variable initializer";
832 errorStart = assignToken.sourceEnd +1;
833 errorEnd = assignToken.sourceEnd +1;
834 processParseExceptionDebug(e);
841 if (initializer == null) {
842 {if (true) return new VariableDeclaration(currentSegment,
844 variable.sourceStart,
845 variable.sourceEnd);}
847 {if (true) return new VariableDeclaration(currentSegment,
850 VariableDeclaration.EQUAL,
851 variable.sourceStart);}
852 throw new Error("Missing return statement in function");
856 * this will be used by static statement
858 static final public VariableDeclaration VariableDeclarator() throws ParseException {
859 final AbstractVariable variable;
860 Expression initializer = null;
862 variable = VariableDeclaratorId();
863 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
865 token = jj_consume_token(ASSIGN);
867 initializer = VariableInitializer();
868 } catch (ParseException e) {
869 errorMessage = "Literal expression expected in variable initializer";
871 errorStart = token.sourceEnd+1;
872 errorEnd = token.sourceEnd+1;
873 processParseExceptionDebug(e);
880 if (initializer == null) {
881 {if (true) return new VariableDeclaration(currentSegment,
883 variable.sourceStart,
884 variable.sourceEnd);}
886 {if (true) return new VariableDeclaration(currentSegment,
889 VariableDeclaration.EQUAL,
890 variable.sourceStart);}
891 throw new Error("Missing return statement in function");
896 * @return the variable name (with suffix)
898 static final public AbstractVariable VariableDeclaratorId() throws ParseException {
900 AbstractVariable expression = null;
910 expression = VariableSuffix(var);
912 if (expression == null) {
913 {if (true) return var;}
915 {if (true) return expression;}
916 } catch (ParseException e) {
917 errorMessage = "'$' expected for variable identifier";
919 errorStart = e.currentToken.sourceStart;
920 errorEnd = e.currentToken.sourceEnd;
923 throw new Error("Missing return statement in function");
926 static final public Variable Variable() throws ParseException {
927 Variable variable = null;
929 token = jj_consume_token(DOLLAR);
931 {if (true) return variable;}
932 throw new Error("Missing return statement in function");
935 static final public Variable Var() throws ParseException {
936 Variable variable = null;
937 final Token token,token2;
938 ConstantIdentifier constant;
939 Expression expression;
940 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
942 token = jj_consume_token(DOLLAR);
944 {if (true) return new Variable(variable,variable.sourceStart,variable.sourceEnd);}
947 token = jj_consume_token(LBRACE);
948 expression = Expression();
949 token2 = jj_consume_token(RBRACE);
950 {if (true) return new Variable(expression,
955 token = jj_consume_token(IDENTIFIER);
956 outlineInfo.addVariable("$" + token.image);
957 {if (true) return new Variable(token.image,token.sourceStart,token.sourceEnd);}
961 jj_consume_token(-1);
962 throw new ParseException();
964 throw new Error("Missing return statement in function");
967 static final public Expression VariableInitializer() throws ParseException {
968 final Expression expr;
969 final Token token, token2;
970 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
974 case INTEGER_LITERAL:
975 case FLOATING_POINT_LITERAL:
979 {if (true) return expr;}
982 token2 = jj_consume_token(MINUS);
983 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
984 case INTEGER_LITERAL:
985 token = jj_consume_token(INTEGER_LITERAL);
987 case FLOATING_POINT_LITERAL:
988 token = jj_consume_token(FLOATING_POINT_LITERAL);
992 jj_consume_token(-1);
993 throw new ParseException();
995 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
997 token2.sourceStart);}
1000 token2 = jj_consume_token(PLUS);
1001 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1002 case INTEGER_LITERAL:
1003 token = jj_consume_token(INTEGER_LITERAL);
1005 case FLOATING_POINT_LITERAL:
1006 token = jj_consume_token(FLOATING_POINT_LITERAL);
1009 jj_la1[15] = jj_gen;
1010 jj_consume_token(-1);
1011 throw new ParseException();
1013 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
1015 token2.sourceStart);}
1018 expr = ArrayDeclarator();
1019 {if (true) return expr;}
1022 token = jj_consume_token(IDENTIFIER);
1023 {if (true) return new ConstantIdentifier(token);}
1026 jj_la1[16] = jj_gen;
1027 jj_consume_token(-1);
1028 throw new ParseException();
1030 throw new Error("Missing return statement in function");
1033 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
1034 final Expression expr,expr2;
1035 expr = Expression();
1036 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1038 jj_consume_token(ARRAYASSIGN);
1039 expr2 = Expression();
1040 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
1043 jj_la1[17] = jj_gen;
1046 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
1047 throw new Error("Missing return statement in function");
1050 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
1051 ArrayVariableDeclaration expr;
1052 final ArrayList list = new ArrayList();
1053 jj_consume_token(LPAREN);
1054 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1070 case INTEGER_LITERAL:
1071 case FLOATING_POINT_LITERAL:
1072 case STRING_LITERAL:
1077 expr = ArrayVariable();
1086 jj_consume_token(COMMA);
1087 expr = ArrayVariable();
1092 jj_la1[18] = jj_gen;
1095 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1097 jj_consume_token(COMMA);
1101 jj_la1[19] = jj_gen;
1104 jj_consume_token(RPAREN);
1105 final ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1107 {if (true) return vars;}
1108 throw new Error("Missing return statement in function");
1112 * A Method Declaration.
1113 * <b>function</b> MetodDeclarator() Block()
1115 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1116 final MethodDeclaration functionDeclaration;
1118 final OutlineableWithChildren seg = currentSegment;
1120 token = jj_consume_token(FUNCTION);
1122 functionDeclaration = MethodDeclarator(token.sourceStart);
1123 outlineInfo.addVariable(functionDeclaration.name);
1124 } catch (ParseException e) {
1125 if (errorMessage != null) {if (true) throw e;}
1126 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1128 errorStart = e.currentToken.sourceStart;
1129 errorEnd = e.currentToken.sourceEnd;
1130 {if (true) throw e;}
1132 currentSegment = functionDeclaration;
1134 functionDeclaration.statements = block.statements;
1135 currentSegment = seg;
1136 {if (true) return functionDeclaration;}
1137 throw new Error("Missing return statement in function");
1141 * A MethodDeclarator.
1142 * [&] IDENTIFIER(parameters ...).
1143 * @return a function description for the outline
1145 static final public MethodDeclaration MethodDeclarator(final int start) throws ParseException {
1146 Token identifier = null;
1147 Token reference = null;
1148 final ArrayList formalParameters = new ArrayList();
1149 String identifierChar = SYNTAX_ERROR_CHAR;
1151 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1153 reference = jj_consume_token(BIT_AND);
1154 end = reference.sourceEnd;
1157 jj_la1[20] = jj_gen;
1161 identifier = jj_consume_token(IDENTIFIER);
1162 identifierChar = identifier.image;
1163 end = identifier.sourceEnd;
1164 } catch (ParseException e) {
1165 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1167 errorStart = e.currentToken.sourceEnd;
1168 errorEnd = e.currentToken.next.sourceStart;
1169 processParseExceptionDebug(e);
1171 end = FormalParameters(formalParameters);
1172 int nameStart, nameEnd;
1173 if (identifier == null) {
1174 if (reference == null) {
1175 nameStart = start + 9;
1176 nameEnd = start + 10;
1178 nameStart = reference.sourceEnd + 1;
1179 nameEnd = reference.sourceEnd + 2;
1182 nameStart = identifier.sourceStart;
1183 nameEnd = identifier.sourceEnd;
1185 {if (true) return new MethodDeclaration(currentSegment,
1193 throw new Error("Missing return statement in function");
1197 * FormalParameters follows method identifier.
1198 * (FormalParameter())
1200 static final public int FormalParameters(final ArrayList parameters) throws ParseException {
1201 VariableDeclaration var;
1203 Token tok = PHPParser.token;
1204 int end = tok.sourceEnd;
1206 tok = jj_consume_token(LPAREN);
1207 end = tok.sourceEnd;
1208 } catch (ParseException e) {
1209 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1211 errorStart = e.currentToken.next.sourceStart;
1212 errorEnd = e.currentToken.next.sourceEnd;
1213 processParseExceptionDebug(e);
1215 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1218 var = FormalParameter();
1219 parameters.add(var);end = var.sourceEnd;
1222 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1227 jj_la1[21] = jj_gen;
1230 jj_consume_token(COMMA);
1231 var = FormalParameter();
1232 parameters.add(var);end = var.sourceEnd;
1236 jj_la1[22] = jj_gen;
1240 token = jj_consume_token(RPAREN);
1241 end = token.sourceEnd;
1242 } catch (ParseException e) {
1243 errorMessage = "')' expected";
1245 errorStart = e.currentToken.next.sourceStart;
1246 errorEnd = e.currentToken.next.sourceEnd;
1247 processParseExceptionDebug(e);
1249 {if (true) return end;}
1250 throw new Error("Missing return statement in function");
1254 * A formal parameter.
1255 * $varname[=value] (,$varname[=value])
1257 static final public VariableDeclaration FormalParameter() throws ParseException {
1258 final VariableDeclaration variableDeclaration;
1260 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1262 token = jj_consume_token(BIT_AND);
1265 jj_la1[23] = jj_gen;
1268 variableDeclaration = VariableDeclaratorNoSuffix();
1269 outlineInfo.addVariable("$"+variableDeclaration.name());
1270 if (token != null) {
1271 variableDeclaration.setReference(true);
1273 {if (true) return variableDeclaration;}
1274 throw new Error("Missing return statement in function");
1277 static final public ConstantIdentifier Type() throws ParseException {
1279 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1281 token = jj_consume_token(STRING);
1282 {if (true) return new ConstantIdentifier(token);}
1285 token = jj_consume_token(BOOL);
1286 {if (true) return new ConstantIdentifier(token);}
1289 token = jj_consume_token(BOOLEAN);
1290 {if (true) return new ConstantIdentifier(token);}
1293 token = jj_consume_token(REAL);
1294 {if (true) return new ConstantIdentifier(token);}
1297 token = jj_consume_token(DOUBLE);
1298 {if (true) return new ConstantIdentifier(token);}
1301 token = jj_consume_token(FLOAT);
1302 {if (true) return new ConstantIdentifier(token);}
1305 token = jj_consume_token(INT);
1306 {if (true) return new ConstantIdentifier(token);}
1309 token = jj_consume_token(INTEGER);
1310 {if (true) return new ConstantIdentifier(token);}
1313 token = jj_consume_token(OBJECT);
1314 {if (true) return new ConstantIdentifier(token);}
1317 jj_la1[24] = jj_gen;
1318 jj_consume_token(-1);
1319 throw new ParseException();
1321 throw new Error("Missing return statement in function");
1324 static final public Expression Expression() throws ParseException {
1325 final Expression expr;
1326 Expression initializer = null;
1327 int assignOperator = -1;
1328 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1342 case INTEGER_LITERAL:
1343 case FLOATING_POINT_LITERAL:
1344 case STRING_LITERAL:
1349 expr = ConditionalExpression();
1350 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1363 case RSIGNEDSHIFTASSIGN:
1364 assignOperator = AssignmentOperator();
1366 initializer = Expression();
1367 } catch (ParseException e) {
1368 if (errorMessage != null) {
1369 {if (true) throw e;}
1371 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1373 errorEnd = SimpleCharStream.getPosition();
1374 {if (true) throw e;}
1378 jj_la1[25] = jj_gen;
1381 if (assignOperator != -1) {// todo : change this, very very bad :(
1382 if (expr instanceof AbstractVariable) {
1383 {if (true) return new VariableDeclaration(currentSegment,
1384 (AbstractVariable) expr,
1387 initializer.sourceEnd);}
1389 String varName = expr.toStringExpression().substring(1);
1390 {if (true) return new VariableDeclaration(currentSegment,
1391 new Variable(varName,
1395 initializer.sourceEnd);}
1397 {if (true) return expr;}
1401 expr = ExpressionWBang();
1402 {if (true) return expr;}
1405 jj_la1[26] = jj_gen;
1406 jj_consume_token(-1);
1407 throw new ParseException();
1409 throw new Error("Missing return statement in function");
1412 static final public Expression ExpressionWBang() throws ParseException {
1413 final Expression expr;
1415 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1417 token = jj_consume_token(BANG);
1418 expr = ExpressionWBang();
1419 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
1423 expr = ExpressionNoBang();
1424 {if (true) return expr;}
1427 jj_la1[27] = jj_gen;
1428 jj_consume_token(-1);
1429 throw new ParseException();
1431 throw new Error("Missing return statement in function");
1434 static final public Expression ExpressionNoBang() throws ParseException {
1436 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1438 expr = ListExpression();
1439 {if (true) return expr;}
1442 expr = PrintExpression();
1443 {if (true) return expr;}
1446 jj_la1[28] = jj_gen;
1447 jj_consume_token(-1);
1448 throw new ParseException();
1450 throw new Error("Missing return statement in function");
1454 * Any assignement operator.
1455 * @return the assignement operator id
1457 static final public int AssignmentOperator() throws ParseException {
1458 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1460 jj_consume_token(ASSIGN);
1461 {if (true) return VariableDeclaration.EQUAL;}
1464 jj_consume_token(STARASSIGN);
1465 {if (true) return VariableDeclaration.STAR_EQUAL;}
1468 jj_consume_token(SLASHASSIGN);
1469 {if (true) return VariableDeclaration.SLASH_EQUAL;}
1472 jj_consume_token(REMASSIGN);
1473 {if (true) return VariableDeclaration.REM_EQUAL;}
1476 jj_consume_token(PLUSASSIGN);
1477 {if (true) return VariableDeclaration.PLUS_EQUAL;}
1480 jj_consume_token(MINUSASSIGN);
1481 {if (true) return VariableDeclaration.MINUS_EQUAL;}
1484 jj_consume_token(LSHIFTASSIGN);
1485 {if (true) return VariableDeclaration.LSHIFT_EQUAL;}
1487 case RSIGNEDSHIFTASSIGN:
1488 jj_consume_token(RSIGNEDSHIFTASSIGN);
1489 {if (true) return VariableDeclaration.RSIGNEDSHIFT_EQUAL;}
1492 jj_consume_token(ANDASSIGN);
1493 {if (true) return VariableDeclaration.AND_EQUAL;}
1496 jj_consume_token(XORASSIGN);
1497 {if (true) return VariableDeclaration.XOR_EQUAL;}
1500 jj_consume_token(ORASSIGN);
1501 {if (true) return VariableDeclaration.OR_EQUAL;}
1504 jj_consume_token(DOTASSIGN);
1505 {if (true) return VariableDeclaration.DOT_EQUAL;}
1508 jj_consume_token(TILDEEQUAL);
1509 {if (true) return VariableDeclaration.TILDE_EQUAL;}
1512 jj_la1[29] = jj_gen;
1513 jj_consume_token(-1);
1514 throw new ParseException();
1516 throw new Error("Missing return statement in function");
1519 static final public Expression ConditionalExpression() throws ParseException {
1520 final Expression expr;
1521 Expression expr2 = null;
1522 Expression expr3 = null;
1523 expr = ConditionalOrExpression();
1524 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1526 jj_consume_token(HOOK);
1527 expr2 = Expression();
1528 jj_consume_token(COLON);
1529 expr3 = ConditionalExpression();
1532 jj_la1[30] = jj_gen;
1535 if (expr3 == null) {
1536 {if (true) return expr;}
1538 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1539 throw new Error("Missing return statement in function");
1542 static final public Expression ConditionalOrExpression() throws ParseException {
1543 Expression expr,expr2;
1545 expr = ConditionalAndExpression();
1548 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1554 jj_la1[31] = jj_gen;
1557 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1559 jj_consume_token(OR_OR);
1560 operator = OperatorIds.OR_OR;
1563 jj_consume_token(_ORL);
1564 operator = OperatorIds.ORL;
1567 jj_la1[32] = jj_gen;
1568 jj_consume_token(-1);
1569 throw new ParseException();
1571 expr2 = ConditionalAndExpression();
1572 expr = new BinaryExpression(expr,expr2,operator);
1574 {if (true) return expr;}
1575 throw new Error("Missing return statement in function");
1578 static final public Expression ConditionalAndExpression() throws ParseException {
1579 Expression expr,expr2;
1581 expr = ConcatExpression();
1584 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1590 jj_la1[33] = jj_gen;
1593 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1595 jj_consume_token(AND_AND);
1596 operator = OperatorIds.AND_AND;
1599 jj_consume_token(_ANDL);
1600 operator = OperatorIds.ANDL;
1603 jj_la1[34] = jj_gen;
1604 jj_consume_token(-1);
1605 throw new ParseException();
1607 expr2 = ConcatExpression();
1608 expr = new BinaryExpression(expr,expr2,operator);
1610 {if (true) return expr;}
1611 throw new Error("Missing return statement in function");
1614 static final public Expression ConcatExpression() throws ParseException {
1615 Expression expr,expr2;
1616 expr = InclusiveOrExpression();
1619 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1624 jj_la1[35] = jj_gen;
1627 jj_consume_token(DOT);
1628 expr2 = InclusiveOrExpression();
1629 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1631 {if (true) return expr;}
1632 throw new Error("Missing return statement in function");
1635 static final public Expression InclusiveOrExpression() throws ParseException {
1636 Expression expr,expr2;
1637 expr = ExclusiveOrExpression();
1640 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1645 jj_la1[36] = jj_gen;
1648 jj_consume_token(BIT_OR);
1649 expr2 = ExclusiveOrExpression();
1650 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1652 {if (true) return expr;}
1653 throw new Error("Missing return statement in function");
1656 static final public Expression ExclusiveOrExpression() throws ParseException {
1657 Expression expr,expr2;
1658 expr = AndExpression();
1661 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1666 jj_la1[37] = jj_gen;
1669 jj_consume_token(XOR);
1670 expr2 = AndExpression();
1671 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1673 {if (true) return expr;}
1674 throw new Error("Missing return statement in function");
1677 static final public Expression AndExpression() throws ParseException {
1678 Expression expr,expr2;
1679 expr = EqualityExpression();
1682 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1687 jj_la1[38] = jj_gen;
1690 jj_consume_token(BIT_AND);
1691 expr2 = EqualityExpression();
1692 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1694 {if (true) return expr;}
1695 throw new Error("Missing return statement in function");
1698 static final public Expression EqualityExpression() throws ParseException {
1699 Expression expr,expr2;
1702 expr = RelationalExpression();
1705 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1709 case BANGDOUBLEEQUAL:
1714 jj_la1[39] = jj_gen;
1717 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1719 token = jj_consume_token(EQUAL_EQUAL);
1720 operator = OperatorIds.EQUAL_EQUAL;
1723 token = jj_consume_token(DIF);
1724 operator = OperatorIds.DIF;
1727 token = jj_consume_token(NOT_EQUAL);
1728 operator = OperatorIds.DIF;
1730 case BANGDOUBLEEQUAL:
1731 token = jj_consume_token(BANGDOUBLEEQUAL);
1732 operator = OperatorIds.BANG_EQUAL_EQUAL;
1735 token = jj_consume_token(TRIPLEEQUAL);
1736 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1739 jj_la1[40] = jj_gen;
1740 jj_consume_token(-1);
1741 throw new ParseException();
1744 expr2 = RelationalExpression();
1745 } catch (ParseException e) {
1746 if (errorMessage != null) {
1747 {if (true) throw e;}
1749 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1751 errorStart = token.sourceEnd +1;
1752 errorEnd = token.sourceEnd +1;
1753 expr2 = new ConstantIdentifier(SYNTAX_ERROR_CHAR,token.sourceEnd +1,token.sourceEnd +1);
1754 processParseExceptionDebug(e);
1756 expr = new BinaryExpression(expr,expr2,operator);
1758 {if (true) return expr;}
1759 throw new Error("Missing return statement in function");
1762 static final public Expression RelationalExpression() throws ParseException {
1763 Expression expr,expr2;
1765 expr = ShiftExpression();
1768 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1776 jj_la1[41] = jj_gen;
1779 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1781 jj_consume_token(LT);
1782 operator = OperatorIds.LESS;
1785 jj_consume_token(GT);
1786 operator = OperatorIds.GREATER;
1789 jj_consume_token(LE);
1790 operator = OperatorIds.LESS_EQUAL;
1793 jj_consume_token(GE);
1794 operator = OperatorIds.GREATER_EQUAL;
1797 jj_la1[42] = jj_gen;
1798 jj_consume_token(-1);
1799 throw new ParseException();
1801 expr2 = ShiftExpression();
1802 expr = new BinaryExpression(expr,expr2,operator);
1804 {if (true) return expr;}
1805 throw new Error("Missing return statement in function");
1808 static final public Expression ShiftExpression() throws ParseException {
1809 Expression expr,expr2;
1811 expr = AdditiveExpression();
1814 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1817 case RUNSIGNEDSHIFT:
1821 jj_la1[43] = jj_gen;
1824 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1826 jj_consume_token(LSHIFT);
1827 operator = OperatorIds.LEFT_SHIFT;
1830 jj_consume_token(RSIGNEDSHIFT);
1831 operator = OperatorIds.RIGHT_SHIFT;
1833 case RUNSIGNEDSHIFT:
1834 jj_consume_token(RUNSIGNEDSHIFT);
1835 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1838 jj_la1[44] = jj_gen;
1839 jj_consume_token(-1);
1840 throw new ParseException();
1842 expr2 = AdditiveExpression();
1843 expr = new BinaryExpression(expr,expr2,operator);
1845 {if (true) return expr;}
1846 throw new Error("Missing return statement in function");
1849 static final public Expression AdditiveExpression() throws ParseException {
1850 Expression expr,expr2;
1852 expr = MultiplicativeExpression();
1855 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1861 jj_la1[45] = jj_gen;
1864 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1866 jj_consume_token(PLUS);
1867 operator = OperatorIds.PLUS;
1870 jj_consume_token(MINUS);
1871 operator = OperatorIds.MINUS;
1874 jj_la1[46] = jj_gen;
1875 jj_consume_token(-1);
1876 throw new ParseException();
1878 expr2 = MultiplicativeExpression();
1879 expr = new BinaryExpression(expr,expr2,operator);
1881 {if (true) return expr;}
1882 throw new Error("Missing return statement in function");
1885 static final public Expression MultiplicativeExpression() throws ParseException {
1886 Expression expr,expr2;
1889 expr = UnaryExpression();
1890 } catch (ParseException e) {
1891 if (errorMessage != null) {if (true) throw e;}
1892 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1894 errorStart = PHPParser.token.sourceStart;
1895 errorEnd = PHPParser.token.sourceEnd;
1896 {if (true) throw e;}
1900 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1907 jj_la1[47] = jj_gen;
1910 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1912 jj_consume_token(STAR);
1913 operator = OperatorIds.MULTIPLY;
1916 jj_consume_token(SLASH);
1917 operator = OperatorIds.DIVIDE;
1920 jj_consume_token(REMAINDER);
1921 operator = OperatorIds.REMAINDER;
1924 jj_la1[48] = jj_gen;
1925 jj_consume_token(-1);
1926 throw new ParseException();
1928 expr2 = UnaryExpression();
1929 expr = new BinaryExpression(expr,expr2,operator);
1931 {if (true) return expr;}
1932 throw new Error("Missing return statement in function");
1936 * An unary expression starting with @, & or nothing
1938 static final public Expression UnaryExpression() throws ParseException {
1939 final Expression expr;
1940 /* <BIT_AND> expr = UnaryExpressionNoPrefix() //why did I had that ?
1941 {return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1943 expr = AtNotTildeUnaryExpression();
1944 {if (true) return expr;}
1945 throw new Error("Missing return statement in function");
1948 static final public Expression AtNotTildeUnaryExpression() throws ParseException {
1949 final Expression expr;
1951 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1953 token = jj_consume_token(AT);
1954 expr = AtNotTildeUnaryExpression();
1955 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,token.sourceStart);}
1958 token = jj_consume_token(TILDE);
1959 expr = AtNotTildeUnaryExpression();
1960 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.TWIDDLE,token.sourceStart);}
1963 token = jj_consume_token(BANG);
1964 expr = AtNotUnaryExpression();
1965 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
1977 case INTEGER_LITERAL:
1978 case FLOATING_POINT_LITERAL:
1979 case STRING_LITERAL:
1984 expr = UnaryExpressionNoPrefix();
1985 {if (true) return expr;}
1988 jj_la1[49] = jj_gen;
1989 jj_consume_token(-1);
1990 throw new ParseException();
1992 throw new Error("Missing return statement in function");
1996 * An expression prefixed (or not) by one or more @ and !.
1997 * @return the expression
1999 static final public Expression AtNotUnaryExpression() throws ParseException {
2000 final Expression expr;
2002 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2004 token = jj_consume_token(AT);
2005 expr = AtNotUnaryExpression();
2006 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,token.sourceStart);}
2009 token = jj_consume_token(BANG);
2010 expr = AtNotUnaryExpression();
2011 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
2023 case INTEGER_LITERAL:
2024 case FLOATING_POINT_LITERAL:
2025 case STRING_LITERAL:
2030 expr = UnaryExpressionNoPrefix();
2031 {if (true) return expr;}
2034 jj_la1[50] = jj_gen;
2035 jj_consume_token(-1);
2036 throw new ParseException();
2038 throw new Error("Missing return statement in function");
2041 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
2042 final Expression expr;
2044 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2046 token = jj_consume_token(PLUS);
2047 expr = AtNotTildeUnaryExpression();
2048 {if (true) return new PrefixedUnaryExpression(expr,
2050 token.sourceStart);}
2053 token = jj_consume_token(MINUS);
2054 expr = AtNotTildeUnaryExpression();
2055 {if (true) return new PrefixedUnaryExpression(expr,
2057 token.sourceStart);}
2061 expr = PreIncDecExpression();
2062 {if (true) return expr;}
2070 case INTEGER_LITERAL:
2071 case FLOATING_POINT_LITERAL:
2072 case STRING_LITERAL:
2077 expr = UnaryExpressionNotPlusMinus();
2078 {if (true) return expr;}
2081 jj_la1[51] = jj_gen;
2082 jj_consume_token(-1);
2083 throw new ParseException();
2085 throw new Error("Missing return statement in function");
2088 static final public Expression PreIncDecExpression() throws ParseException {
2089 final Expression expr;
2092 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2094 token = jj_consume_token(PLUS_PLUS);
2095 operator = OperatorIds.PLUS_PLUS;
2098 token = jj_consume_token(MINUS_MINUS);
2099 operator = OperatorIds.MINUS_MINUS;
2102 jj_la1[52] = jj_gen;
2103 jj_consume_token(-1);
2104 throw new ParseException();
2106 expr = PrimaryExpression();
2107 {if (true) return new PrefixedUnaryExpression(expr,operator,token.sourceStart);}
2108 throw new Error("Missing return statement in function");
2111 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
2112 final Expression expr;
2113 if (jj_2_3(2147483647)) {
2114 expr = CastExpression();
2115 {if (true) return expr;}
2117 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2123 expr = PostfixExpression();
2124 {if (true) return expr;}
2129 case INTEGER_LITERAL:
2130 case FLOATING_POINT_LITERAL:
2131 case STRING_LITERAL:
2134 {if (true) return expr;}
2137 jj_consume_token(LPAREN);
2138 expr = Expression();
2140 jj_consume_token(RPAREN);
2141 } catch (ParseException e) {
2142 errorMessage = "')' expected";
2144 errorStart = expr.sourceEnd +1;
2145 errorEnd = expr.sourceEnd +1;
2146 processParseExceptionDebug(e);
2148 {if (true) return expr;}
2151 jj_la1[53] = jj_gen;
2152 jj_consume_token(-1);
2153 throw new ParseException();
2156 throw new Error("Missing return statement in function");
2159 static final public CastExpression CastExpression() throws ParseException {
2160 final ConstantIdentifier type;
2161 final Expression expr;
2162 final Token token,token1;
2163 token1 = jj_consume_token(LPAREN);
2164 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2177 token = jj_consume_token(ARRAY);
2178 type = new ConstantIdentifier(token);
2181 jj_la1[54] = jj_gen;
2182 jj_consume_token(-1);
2183 throw new ParseException();
2185 jj_consume_token(RPAREN);
2186 expr = UnaryExpression();
2187 {if (true) return new CastExpression(type,expr,token1.sourceStart,expr.sourceEnd);}
2188 throw new Error("Missing return statement in function");
2191 static final public Expression PostfixExpression() throws ParseException {
2192 final Expression expr;
2195 expr = PrimaryExpression();
2196 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2199 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2201 token = jj_consume_token(PLUS_PLUS);
2202 operator = OperatorIds.PLUS_PLUS;
2205 token = jj_consume_token(MINUS_MINUS);
2206 operator = OperatorIds.MINUS_MINUS;
2209 jj_la1[55] = jj_gen;
2210 jj_consume_token(-1);
2211 throw new ParseException();
2215 jj_la1[56] = jj_gen;
2218 if (operator == -1) {
2219 {if (true) return expr;}
2221 {if (true) return new PostfixedUnaryExpression(expr,operator,token.sourceEnd);}
2222 throw new Error("Missing return statement in function");
2225 static final public Expression PrimaryExpression() throws ParseException {
2228 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2233 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2235 token = jj_consume_token(BIT_AND);
2238 jj_la1[57] = jj_gen;
2241 expr = refPrimaryExpression(token);
2242 {if (true) return expr;}
2245 expr = ArrayDeclarator();
2246 {if (true) return expr;}
2249 jj_la1[58] = jj_gen;
2250 jj_consume_token(-1);
2251 throw new ParseException();
2253 throw new Error("Missing return statement in function");
2256 static final public Expression refPrimaryExpression(final Token reference) throws ParseException {
2258 Expression expr2 = null;
2259 final Token identifier;
2260 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2262 identifier = jj_consume_token(IDENTIFIER);
2263 expr = new ConstantIdentifier(identifier);
2266 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2267 case STATICCLASSACCESS:
2271 jj_la1[59] = jj_gen;
2274 jj_consume_token(STATICCLASSACCESS);
2275 expr2 = ClassIdentifier();
2276 expr = new ClassAccess(expr,
2278 ClassAccess.STATIC);
2280 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2282 expr2 = Arguments(expr);
2285 jj_la1[60] = jj_gen;
2288 if (expr2 == null) {
2289 if (reference != null) {
2290 ParseException e = generateParseException();
2291 errorMessage = "you cannot use a constant by reference";
2293 errorStart = reference.sourceStart;
2294 errorEnd = reference.sourceEnd;
2295 processParseExceptionDebug(e);
2297 {if (true) return expr;}
2299 {if (true) return expr2;}
2302 expr = VariableDeclaratorId();
2303 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2305 expr = Arguments(expr);
2308 jj_la1[61] = jj_gen;
2311 {if (true) return expr;}
2314 token = jj_consume_token(NEW);
2315 expr = ClassIdentifier();
2317 if (reference == null) {
2318 start = token.sourceStart;
2320 start = reference.sourceStart;
2322 expr = new ClassInstantiation(expr,
2325 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2327 expr = Arguments(expr);
2330 jj_la1[62] = jj_gen;
2333 {if (true) return expr;}
2336 jj_la1[63] = jj_gen;
2337 jj_consume_token(-1);
2338 throw new ParseException();
2340 throw new Error("Missing return statement in function");
2344 * An array declarator.
2348 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2349 final ArrayVariableDeclaration[] vars;
2351 token = jj_consume_token(ARRAY);
2352 vars = ArrayInitializer();
2353 {if (true) return new ArrayInitializer(vars,
2355 PHPParser.token.sourceEnd);}
2356 throw new Error("Missing return statement in function");
2359 static final public Expression ClassIdentifier() throws ParseException {
2360 final Expression expr;
2362 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2364 token = jj_consume_token(IDENTIFIER);
2365 {if (true) return new ConstantIdentifier(token);}
2377 {if (true) return expr;}
2380 expr = VariableDeclaratorId();
2381 {if (true) return expr;}
2384 jj_la1[64] = jj_gen;
2385 jj_consume_token(-1);
2386 throw new ParseException();
2388 throw new Error("Missing return statement in function");
2392 * Used by Variabledeclaratorid and primarysuffix
2394 static final public AbstractVariable VariableSuffix(final AbstractVariable prefix) throws ParseException {
2395 Expression expression = null;
2396 final Token classAccessToken,lbrace,rbrace;
2399 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2401 classAccessToken = jj_consume_token(CLASSACCESS);
2403 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2405 lbrace = jj_consume_token(LBRACE);
2406 expression = Expression();
2407 rbrace = jj_consume_token(RBRACE);
2408 expression = new Variable(expression,
2413 token = jj_consume_token(IDENTIFIER);
2414 expression = new ConstantIdentifier(token.image,token.sourceStart,token.sourceEnd);
2417 expression = Variable();
2420 jj_la1[65] = jj_gen;
2421 jj_consume_token(-1);
2422 throw new ParseException();
2424 } catch (ParseException e) {
2425 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2427 errorStart = classAccessToken.sourceEnd +1;
2428 errorEnd = classAccessToken.sourceEnd +1;
2429 processParseExceptionDebug(e);
2431 {if (true) return new ClassAccess(prefix,
2433 ClassAccess.NORMAL);}
2436 token = jj_consume_token(LBRACKET);
2437 pos = token.sourceEnd+1;
2438 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2463 case INTEGER_LITERAL:
2464 case FLOATING_POINT_LITERAL:
2465 case STRING_LITERAL:
2470 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2486 case INTEGER_LITERAL:
2487 case FLOATING_POINT_LITERAL:
2488 case STRING_LITERAL:
2493 expression = Expression();
2494 pos = expression.sourceEnd+1;
2505 expression = Type();
2506 pos = expression.sourceEnd+1;
2509 jj_la1[66] = jj_gen;
2510 jj_consume_token(-1);
2511 throw new ParseException();
2515 jj_la1[67] = jj_gen;
2519 token = jj_consume_token(RBRACKET);
2520 pos = token.sourceEnd;
2521 } catch (ParseException e) {
2522 errorMessage = "']' expected";
2526 processParseExceptionDebug(e);
2528 {if (true) return new ArrayDeclarator(prefix,expression,pos);}
2531 token = jj_consume_token(LBRACE);
2532 pos = token.sourceEnd+1;
2533 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2558 case INTEGER_LITERAL:
2559 case FLOATING_POINT_LITERAL:
2560 case STRING_LITERAL:
2565 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2581 case INTEGER_LITERAL:
2582 case FLOATING_POINT_LITERAL:
2583 case STRING_LITERAL:
2588 expression = Expression();
2589 pos = expression.sourceEnd+1;
2600 expression = Type();
2601 pos = expression.sourceEnd+1;
2604 jj_la1[68] = jj_gen;
2605 jj_consume_token(-1);
2606 throw new ParseException();
2610 jj_la1[69] = jj_gen;
2614 token = jj_consume_token(RBRACE);
2615 pos = token.sourceEnd;
2616 } catch (ParseException e) {
2617 errorMessage = "']' expected";
2621 processParseExceptionDebug(e);
2623 {if (true) return new ArrayDeclarator(prefix,expression,pos);}
2626 jj_la1[70] = jj_gen;
2627 jj_consume_token(-1);
2628 throw new ParseException();
2630 throw new Error("Missing return statement in function");
2633 static final public Literal Literal() throws ParseException {
2635 StringLiteral literal;
2636 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2637 case INTEGER_LITERAL:
2638 token = jj_consume_token(INTEGER_LITERAL);
2639 {if (true) return new NumberLiteral(token);}
2641 case FLOATING_POINT_LITERAL:
2642 token = jj_consume_token(FLOATING_POINT_LITERAL);
2643 {if (true) return new NumberLiteral(token);}
2645 case STRING_LITERAL:
2646 token = jj_consume_token(STRING_LITERAL);
2647 {if (true) return new StringLiteral(token);}
2650 token = jj_consume_token(TRUE);
2651 {if (true) return new TrueLiteral(token);}
2654 token = jj_consume_token(FALSE);
2655 {if (true) return new FalseLiteral(token);}
2658 token = jj_consume_token(NULL);
2659 {if (true) return new NullLiteral(token);}
2662 literal = evaluableString();
2663 {if (true) return literal;}
2666 jj_la1[71] = jj_gen;
2667 jj_consume_token(-1);
2668 throw new ParseException();
2670 throw new Error("Missing return statement in function");
2673 static final public StringLiteral evaluableString() throws ParseException {
2674 ArrayList list = new ArrayList();
2676 Token token,lbrace,rbrace;
2677 AbstractVariable var;
2679 start = jj_consume_token(DOUBLEQUOTE);
2682 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2687 jj_la1[72] = jj_gen;
2690 jj_consume_token(DOLLARS);
2691 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2693 token = jj_consume_token(IDENTIFIER);
2694 list.add(new Variable(token.image,
2699 lbrace = jj_consume_token(LBRACE1);
2700 token = jj_consume_token(ID);
2701 list.add(new Variable(token.image,
2704 rbrace = jj_consume_token(RBRACE1);
2707 jj_la1[73] = jj_gen;
2708 jj_consume_token(-1);
2709 throw new ParseException();
2712 end = jj_consume_token(DOUBLEQUOTE2);
2713 AbstractVariable[] vars = new AbstractVariable[list.size()];
2715 {if (true) return new StringLiteral(SimpleCharStream.currentBuffer.substring(start.sourceEnd,end.sourceStart),
2719 throw new Error("Missing return statement in function");
2722 static final public FunctionCall Arguments(final Expression func) throws ParseException {
2723 Expression[] args = null;
2724 final Token token,lparen;
2725 lparen = jj_consume_token(LPAREN);
2726 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2742 case INTEGER_LITERAL:
2743 case FLOATING_POINT_LITERAL:
2744 case STRING_LITERAL:
2749 args = ArgumentList();
2752 jj_la1[74] = jj_gen;
2756 token = jj_consume_token(RPAREN);
2757 {if (true) return new FunctionCall(func,args,token.sourceEnd);}
2758 } catch (ParseException e) {
2759 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2762 errorStart = lparen.sourceEnd+1;
2763 errorEnd = lparen.sourceEnd+2;
2765 errorStart = args[args.length-1].sourceEnd+1;
2766 errorEnd = args[args.length-1].sourceEnd+2;
2768 processParseExceptionDebug(e);
2770 int sourceEnd = (args == null && args.length != 0) ? lparen.sourceEnd+1 : args[args.length-1].sourceEnd;
2771 {if (true) return new FunctionCall(func,args,sourceEnd);}
2772 throw new Error("Missing return statement in function");
2776 * An argument list is a list of arguments separated by comma :
2777 * argumentDeclaration() (, argumentDeclaration)*
2778 * @return an array of arguments
2780 static final public Expression[] ArgumentList() throws ParseException {
2782 final ArrayList list = new ArrayList();
2786 list.add(arg);pos = arg.sourceEnd;
2789 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2794 jj_la1[75] = jj_gen;
2797 token = jj_consume_token(COMMA);
2798 pos = token.sourceEnd;
2802 pos = arg.sourceEnd;
2803 } catch (ParseException e) {
2804 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2808 processParseException(e);
2811 final Expression[] arguments = new Expression[list.size()];
2812 list.toArray(arguments);
2813 {if (true) return arguments;}
2814 throw new Error("Missing return statement in function");
2818 * A Statement without break.
2819 * @return a statement
2821 static final public Statement StatementNoBreak() throws ParseException {
2822 final Statement statement;
2825 statement = expressionStatement();
2826 {if (true) return statement;}
2828 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2830 statement = LabeledStatement();
2831 {if (true) return statement;}
2834 statement = Block();
2835 {if (true) return statement;}
2838 statement = EmptyStatement();
2839 {if (true) return statement;}
2842 statement = SwitchStatement();
2843 {if (true) return statement;}
2846 statement = IfStatement();
2847 {if (true) return statement;}
2850 statement = WhileStatement();
2851 {if (true) return statement;}
2854 statement = DoStatement();
2855 {if (true) return statement;}
2858 statement = ForStatement();
2859 {if (true) return statement;}
2862 statement = ForeachStatement();
2863 {if (true) return statement;}
2866 statement = ContinueStatement();
2867 {if (true) return statement;}
2870 statement = ReturnStatement();
2871 {if (true) return statement;}
2874 statement = EchoStatement();
2875 {if (true) return statement;}
2882 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2884 token = jj_consume_token(AT);
2887 jj_la1[76] = jj_gen;
2890 statement = IncludeStatement();
2891 if (token != null) {
2892 ((InclusionStatement)statement).silent = true;
2893 statement.sourceStart = token.sourceStart;
2895 {if (true) return statement;}
2898 statement = StaticStatement();
2899 {if (true) return statement;}
2902 statement = GlobalStatement();
2903 {if (true) return statement;}
2906 statement = defineStatement();
2907 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2910 jj_la1[77] = jj_gen;
2911 jj_consume_token(-1);
2912 throw new ParseException();
2915 throw new Error("Missing return statement in function");
2919 * A statement expression.
2921 * @return an expression
2923 static final public Statement expressionStatement() throws ParseException {
2924 final Statement statement;
2926 statement = Expression();
2928 token = jj_consume_token(SEMICOLON);
2929 statement.sourceEnd = token.sourceEnd;
2930 } catch (ParseException e) {
2931 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2932 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2934 errorStart = statement.sourceEnd+1;
2935 errorEnd = statement.sourceEnd+1;
2936 processParseExceptionDebug(e);
2939 {if (true) return statement;}
2940 throw new Error("Missing return statement in function");
2943 static final public Define defineStatement() throws ParseException {
2944 Expression defineName,defineValue;
2945 final Token defineToken;
2948 defineToken = jj_consume_token(DEFINE);
2949 pos = defineToken.sourceEnd+1;
2951 token = jj_consume_token(LPAREN);
2952 pos = token.sourceEnd+1;
2953 } catch (ParseException e) {
2954 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2958 processParseExceptionDebug(e);
2961 defineName = Expression();
2962 pos = defineName.sourceEnd+1;
2963 } catch (ParseException e) {
2964 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2968 processParseExceptionDebug(e);
2969 defineName = new StringLiteral(SYNTAX_ERROR_CHAR,pos,pos);
2972 token = jj_consume_token(COMMA);
2973 pos = defineName.sourceEnd+1;
2974 } catch (ParseException e) {
2975 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2979 processParseExceptionDebug(e);
2982 defineValue = Expression();
2983 pos = defineValue.sourceEnd+1;
2984 } catch (ParseException e) {
2985 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2989 processParseExceptionDebug(e);
2990 defineValue = new StringLiteral(SYNTAX_ERROR_CHAR,pos,pos);
2993 token = jj_consume_token(RPAREN);
2994 pos = token.sourceEnd+1;
2995 } catch (ParseException e) {
2996 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
3000 processParseExceptionDebug(e);
3002 {if (true) return new Define(currentSegment,
3005 defineToken.sourceStart,
3007 throw new Error("Missing return statement in function");
3011 * A Normal statement.
3013 static final public Statement Statement() throws ParseException {
3014 final Statement statement;
3015 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3047 case INTEGER_LITERAL:
3048 case FLOATING_POINT_LITERAL:
3049 case STRING_LITERAL:
3056 statement = StatementNoBreak();
3057 {if (true) return statement;}
3060 statement = BreakStatement();
3061 {if (true) return statement;}
3064 jj_la1[78] = jj_gen;
3065 jj_consume_token(-1);
3066 throw new ParseException();
3068 throw new Error("Missing return statement in function");
3072 * An html block inside a php syntax.
3074 static final public HTMLBlock htmlBlock() throws ParseException {
3075 final int startIndex = nodePtr;
3076 final AstNode[] blockNodes;
3079 phpEnd = jj_consume_token(PHPEND);
3080 htmlStart = phpEnd.sourceEnd;
3083 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3088 jj_la1[79] = jj_gen;
3094 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3096 jj_consume_token(PHPSTARTLONG);
3099 jj_consume_token(PHPSTARTSHORT);
3102 jj_la1[80] = jj_gen;
3103 jj_consume_token(-1);
3104 throw new ParseException();
3106 PHPParser.createNewHTMLCode();
3107 } catch (ParseException e) {
3108 errorMessage = "unexpected end of file , '<?php' expected";
3110 errorStart = e.currentToken.sourceStart;
3111 errorEnd = e.currentToken.sourceEnd;
3112 {if (true) throw e;}
3114 nbNodes = nodePtr - startIndex;
3116 {if (true) return null;}
3118 blockNodes = new AstNode[nbNodes];
3119 System.arraycopy(nodes,startIndex+1,blockNodes,0,nbNodes);
3120 nodePtr = startIndex;
3121 {if (true) return new HTMLBlock(blockNodes);}
3122 throw new Error("Missing return statement in function");
3126 * An include statement. It's "include" an expression;
3128 static final public InclusionStatement IncludeStatement() throws ParseException {
3131 final InclusionStatement inclusionStatement;
3132 final Token token, token2;
3134 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3136 token = jj_consume_token(REQUIRE);
3137 keyword = InclusionStatement.REQUIRE;pos=token.sourceEnd;
3140 token = jj_consume_token(REQUIRE_ONCE);
3141 keyword = InclusionStatement.REQUIRE_ONCE;pos=token.sourceEnd;
3144 token = jj_consume_token(INCLUDE);
3145 keyword = InclusionStatement.INCLUDE;pos=token.sourceEnd;
3148 token = jj_consume_token(INCLUDE_ONCE);
3149 keyword = InclusionStatement.INCLUDE_ONCE;pos=token.sourceEnd;
3152 jj_la1[81] = jj_gen;
3153 jj_consume_token(-1);
3154 throw new ParseException();
3157 expr = Expression();
3158 pos = expr.sourceEnd;
3159 } catch (ParseException e) {
3160 if (errorMessage != null) {
3161 {if (true) throw e;}
3163 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
3165 errorStart = e.currentToken.next.sourceStart;
3166 errorEnd = e.currentToken.next.sourceEnd;
3167 expr = new ConstantIdentifier(SYNTAX_ERROR_CHAR,pos,pos);
3168 processParseExceptionDebug(e);
3171 token2 = jj_consume_token(SEMICOLON);
3172 pos=token2.sourceEnd;
3173 } catch (ParseException e) {
3174 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
3176 errorStart = e.currentToken.next.sourceStart;
3177 errorEnd = e.currentToken.next.sourceEnd;
3178 processParseExceptionDebug(e);
3180 inclusionStatement = new InclusionStatement(currentSegment,
3185 currentSegment.add(inclusionStatement);
3186 {if (true) return inclusionStatement;}
3187 throw new Error("Missing return statement in function");
3190 static final public PrintExpression PrintExpression() throws ParseException {
3191 final Expression expr;
3192 final Token printToken;
3193 token = jj_consume_token(PRINT);
3194 expr = Expression();
3195 {if (true) return new PrintExpression(expr,token.sourceStart,expr.sourceEnd);}
3196 throw new Error("Missing return statement in function");
3199 static final public ListExpression ListExpression() throws ParseException {
3200 Expression expr = null;
3201 final Expression expression;
3202 final ArrayList list = new ArrayList();
3204 final Token listToken, rParen;
3206 listToken = jj_consume_token(LIST);
3207 pos = listToken.sourceEnd;
3209 token = jj_consume_token(LPAREN);
3210 pos = token.sourceEnd;
3211 } catch (ParseException e) {
3212 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
3214 errorStart = listToken.sourceEnd+1;
3215 errorEnd = listToken.sourceEnd+1;
3216 processParseExceptionDebug(e);
3218 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3220 expr = VariableDeclaratorId();
3221 list.add(expr);pos = expr.sourceEnd;
3224 jj_la1[82] = jj_gen;
3227 if (expr == null) list.add(null);
3230 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3235 jj_la1[83] = jj_gen;
3239 token = jj_consume_token(COMMA);
3240 pos = token.sourceEnd;
3241 } catch (ParseException e) {
3242 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
3246 processParseExceptionDebug(e);
3248 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3250 expr = VariableDeclaratorId();
3251 list.add(expr);pos = expr.sourceEnd;
3254 jj_la1[84] = jj_gen;
3259 rParen = jj_consume_token(RPAREN);
3260 pos = rParen.sourceEnd;
3261 } catch (ParseException e) {
3262 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
3266 processParseExceptionDebug(e);
3268 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3270 jj_consume_token(ASSIGN);
3271 expression = Expression();
3272 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3274 {if (true) return new ListExpression(vars,
3276 listToken.sourceStart,
3277 expression.sourceEnd);}
3280 jj_la1[85] = jj_gen;
3283 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3285 {if (true) return new ListExpression(vars,listToken.sourceStart,pos);}
3286 throw new Error("Missing return statement in function");
3290 * An echo statement.
3291 * echo anyexpression (, otherexpression)*
3293 static final public EchoStatement EchoStatement() throws ParseException {
3294 final ArrayList expressions = new ArrayList();
3297 Token token2 = null;
3298 token = jj_consume_token(ECHO);
3299 expr = Expression();
3300 expressions.add(expr);
3303 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3308 jj_la1[86] = jj_gen;
3311 jj_consume_token(COMMA);
3312 expr = Expression();
3313 expressions.add(expr);
3316 token2 = jj_consume_token(SEMICOLON);
3317 } catch (ParseException e) {
3318 if (e.currentToken.next.kind != 4) {
3319 errorMessage = "';' expected after 'echo' statement";
3321 errorStart = e.currentToken.sourceEnd;
3322 errorEnd = e.currentToken.sourceEnd;
3323 processParseExceptionDebug(e);
3326 final Expression[] exprs = new Expression[expressions.size()];
3327 expressions.toArray(exprs);
3328 if (token2 == null) {
3329 {if (true) return new EchoStatement(exprs,token.sourceStart, exprs[exprs.length-1].sourceEnd);}
3331 {if (true) return new EchoStatement(exprs,token.sourceStart, token2.sourceEnd);}
3332 throw new Error("Missing return statement in function");
3335 static final public GlobalStatement GlobalStatement() throws ParseException {
3337 final ArrayList vars = new ArrayList();
3338 final GlobalStatement global;
3339 final Token token, token2;
3341 token = jj_consume_token(GLOBAL);
3343 vars.add(expr);pos = expr.sourceEnd+1;
3346 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3351 jj_la1[87] = jj_gen;
3354 jj_consume_token(COMMA);
3356 vars.add(expr);pos = expr.sourceEnd+1;
3359 token2 = jj_consume_token(SEMICOLON);
3360 pos = token2.sourceEnd+1;
3361 } catch (ParseException e) {
3362 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3366 processParseExceptionDebug(e);
3368 final Variable[] variables = new Variable[vars.size()];
3369 vars.toArray(variables);
3370 global = new GlobalStatement(currentSegment,
3374 currentSegment.add(global);
3375 {if (true) return global;}
3376 throw new Error("Missing return statement in function");
3379 static final public StaticStatement StaticStatement() throws ParseException {
3380 final ArrayList vars = new ArrayList();
3381 VariableDeclaration expr;
3382 final Token token, token2;
3384 token = jj_consume_token(STATIC);
3385 expr = VariableDeclarator();
3386 vars.add(expr);pos = expr.sourceEnd+1;
3389 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3394 jj_la1[88] = jj_gen;
3397 jj_consume_token(COMMA);
3398 expr = VariableDeclarator();
3399 vars.add(expr);pos = expr.sourceEnd+1;
3402 token2 = jj_consume_token(SEMICOLON);
3403 pos = token2.sourceEnd+1;
3404 } catch (ParseException e) {
3405 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3409 processParseException(e);
3411 final VariableDeclaration[] variables = new VariableDeclaration[vars.size()];
3412 vars.toArray(variables);
3413 {if (true) return new StaticStatement(variables,
3416 throw new Error("Missing return statement in function");
3419 static final public LabeledStatement LabeledStatement() throws ParseException {
3421 final Statement statement;
3422 label = jj_consume_token(IDENTIFIER);
3423 jj_consume_token(COLON);
3424 statement = Statement();
3425 {if (true) return new LabeledStatement(label.image,statement,label.sourceStart,statement.sourceEnd);}
3426 throw new Error("Missing return statement in function");
3436 static final public Block Block() throws ParseException {
3437 final ArrayList list = new ArrayList();
3438 Statement statement;
3439 final Token token, token2;
3442 token = jj_consume_token(LBRACE);
3443 pos = token.sourceEnd+1;start=token.sourceStart;
3444 } catch (ParseException e) {
3445 errorMessage = "'{' expected";
3447 pos = PHPParser.token.sourceEnd+1;
3451 processParseExceptionDebug(e);
3455 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3491 case INTEGER_LITERAL:
3492 case FLOATING_POINT_LITERAL:
3493 case STRING_LITERAL:
3503 jj_la1[89] = jj_gen;
3506 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3541 case INTEGER_LITERAL:
3542 case FLOATING_POINT_LITERAL:
3543 case STRING_LITERAL:
3550 statement = BlockStatement();
3551 list.add(statement);pos = statement.sourceEnd+1;
3554 statement = htmlBlock();
3555 if (statement != null) {
3556 list.add(statement);
3557 pos = statement.sourceEnd+1;
3559 pos = PHPParser.token.sourceEnd+1;
3562 jj_la1[90] = jj_gen;
3563 jj_consume_token(-1);
3564 throw new ParseException();
3568 token2 = jj_consume_token(RBRACE);
3569 pos = token2.sourceEnd+1;
3570 } catch (ParseException e) {
3571 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3575 processParseExceptionDebug(e);
3577 final Statement[] statements = new Statement[list.size()];
3578 list.toArray(statements);
3579 {if (true) return new Block(statements,start,pos);}
3580 throw new Error("Missing return statement in function");
3583 static final public Statement BlockStatement() throws ParseException {
3584 final Statement statement;
3585 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3618 case INTEGER_LITERAL:
3619 case FLOATING_POINT_LITERAL:
3620 case STRING_LITERAL:
3628 statement = Statement();
3629 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3630 {if (true) return statement;}
3631 } catch (ParseException e) {
3632 errorMessage = "unexpected token : '"+ e.currentToken.image +"', a statement was expected";
3634 errorStart = e.currentToken.sourceStart;
3635 errorEnd = e.currentToken.sourceEnd;
3636 {if (true) throw e;}
3640 statement = ClassDeclaration();
3641 {if (true) return statement;}
3644 statement = MethodDeclaration();
3645 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3646 currentSegment.add((MethodDeclaration) statement);
3647 ((MethodDeclaration) statement).analyzeCode();
3648 {if (true) return statement;}
3651 jj_la1[91] = jj_gen;
3652 jj_consume_token(-1);
3653 throw new ParseException();
3655 throw new Error("Missing return statement in function");
3659 * A Block statement that will not contain any 'break'
3661 static final public Statement BlockStatementNoBreak() throws ParseException {
3662 final Statement statement;
3663 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3695 case INTEGER_LITERAL:
3696 case FLOATING_POINT_LITERAL:
3697 case STRING_LITERAL:
3704 statement = StatementNoBreak();
3705 {if (true) return statement;}
3708 statement = ClassDeclaration();
3709 {if (true) return statement;}
3712 statement = MethodDeclaration();
3713 currentSegment.add((MethodDeclaration) statement);
3714 ((MethodDeclaration) statement).analyzeCode();
3715 {if (true) return statement;}
3718 jj_la1[92] = jj_gen;
3719 jj_consume_token(-1);
3720 throw new ParseException();
3722 throw new Error("Missing return statement in function");
3726 * used only by ForInit()
3728 static final public Expression[] LocalVariableDeclaration() throws ParseException {
3729 final ArrayList list = new ArrayList();
3735 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3740 jj_la1[93] = jj_gen;
3743 jj_consume_token(COMMA);
3747 final Expression[] vars = new Expression[list.size()];
3749 {if (true) return vars;}
3750 throw new Error("Missing return statement in function");
3754 * used only by LocalVariableDeclaration().
3756 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3757 final Variable varName;
3758 Expression initializer = null;
3759 varName = Variable();
3760 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3762 jj_consume_token(ASSIGN);
3763 initializer = Expression();
3766 jj_la1[94] = jj_gen;
3769 if (initializer == null) {
3770 {if (true) return new VariableDeclaration(currentSegment,
3772 varName.sourceStart,
3773 varName.sourceEnd);}
3775 {if (true) return new VariableDeclaration(currentSegment,
3778 VariableDeclaration.EQUAL,
3779 varName.sourceStart);}
3780 throw new Error("Missing return statement in function");
3783 static final public EmptyStatement EmptyStatement() throws ParseException {
3785 token = jj_consume_token(SEMICOLON);
3786 {if (true) return new EmptyStatement(token.sourceStart,token.sourceEnd);}
3787 throw new Error("Missing return statement in function");
3791 * used only by StatementExpressionList() which is used only by ForInit() and ForStatement()
3793 static final public Expression StatementExpression() throws ParseException {
3794 final Expression expr;
3795 final Token operator;
3796 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3799 expr = PreIncDecExpression();
3800 {if (true) return expr;}
3807 expr = PrimaryExpression();
3808 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3811 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3813 operator = jj_consume_token(PLUS_PLUS);
3814 {if (true) return new PostfixedUnaryExpression(expr,
3815 OperatorIds.PLUS_PLUS,
3816 operator.sourceEnd);}
3819 operator = jj_consume_token(MINUS_MINUS);
3820 {if (true) return new PostfixedUnaryExpression(expr,
3821 OperatorIds.MINUS_MINUS,
3822 operator.sourceEnd);}
3825 jj_la1[95] = jj_gen;
3826 jj_consume_token(-1);
3827 throw new ParseException();
3831 jj_la1[96] = jj_gen;
3834 {if (true) return expr;}
3837 jj_la1[97] = jj_gen;
3838 jj_consume_token(-1);
3839 throw new ParseException();
3841 throw new Error("Missing return statement in function");
3844 static final public SwitchStatement SwitchStatement() throws ParseException {
3845 Expression variable;
3846 final AbstractCase[] cases;
3847 final Token switchToken,lparenToken,rparenToken;
3849 switchToken = jj_consume_token(SWITCH);
3850 pos = switchToken.sourceEnd+1;
3852 lparenToken = jj_consume_token(LPAREN);
3853 pos = lparenToken.sourceEnd+1;
3854 } catch (ParseException e) {
3855 errorMessage = "'(' expected after 'switch'";
3859 processParseExceptionDebug(e);
3862 variable = Expression();
3863 pos = variable.sourceEnd+1;
3864 } catch (ParseException e) {
3865 if (errorMessage != null) {
3866 {if (true) throw e;}
3868 errorMessage = "expression expected";
3872 processParseExceptionDebug(e);
3873 variable = new ConstantIdentifier(SYNTAX_ERROR_CHAR,pos,pos);
3876 rparenToken = jj_consume_token(RPAREN);
3877 pos = rparenToken.sourceEnd+1;
3878 } catch (ParseException e) {
3879 errorMessage = "')' expected";
3883 processParseExceptionDebug(e);
3885 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3887 cases = switchStatementBrace();
3890 cases = switchStatementColon(switchToken.sourceStart, switchToken.sourceEnd);
3893 jj_la1[98] = jj_gen;
3894 jj_consume_token(-1);
3895 throw new ParseException();
3897 {if (true) return new SwitchStatement(variable,
3899 switchToken.sourceStart,
3900 PHPParser.token.sourceEnd);}
3901 throw new Error("Missing return statement in function");
3904 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3906 final ArrayList cases = new ArrayList();
3909 token = jj_consume_token(LBRACE);
3910 pos = token.sourceEnd;
3913 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3919 jj_la1[99] = jj_gen;
3922 cas = switchLabel0();
3923 cases.add(cas);pos = cas.sourceEnd;
3926 token = jj_consume_token(RBRACE);
3927 pos = token.sourceEnd;
3928 } catch (ParseException e) {
3929 errorMessage = "'}' expected";
3933 processParseExceptionDebug(e);
3935 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3936 cases.toArray(abcase);
3937 {if (true) return abcase;}
3938 throw new Error("Missing return statement in function");
3942 * A Switch statement with : ... endswitch;
3943 * @param start the begin offset of the switch
3944 * @param end the end offset of the switch
3946 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3948 final ArrayList cases = new ArrayList();
3951 token = jj_consume_token(COLON);
3952 pos = token.sourceEnd;
3954 setMarker(fileToParse,
3955 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3959 "Line " + token.beginLine);
3960 } catch (CoreException e) {
3961 PHPeclipsePlugin.log(e);
3965 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3971 jj_la1[100] = jj_gen;
3974 cas = switchLabel0();
3975 cases.add(cas);pos = cas.sourceEnd;
3978 token = jj_consume_token(ENDSWITCH);
3979 pos = token.sourceEnd;
3980 } catch (ParseException e) {
3981 errorMessage = "'endswitch' expected";
3985 processParseExceptionDebug(e);
3988 token = jj_consume_token(SEMICOLON);
3989 pos = token.sourceEnd;
3990 } catch (ParseException e) {
3991 errorMessage = "';' expected after 'endswitch' keyword";
3995 processParseExceptionDebug(e);
3997 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3998 cases.toArray(abcase);
3999 {if (true) return abcase;}
4000 throw new Error("Missing return statement in function");
4003 static final public AbstractCase switchLabel0() throws ParseException {
4004 final Expression expr;
4005 Statement statement;
4006 final ArrayList stmts = new ArrayList();
4007 final Token token = PHPParser.token;
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 {if (true) return new DefaultCase(stmtsArray,token.sourceStart,stmtsArray[listSize-1].sourceEnd);}
4128 if (listSize != 0) {
4129 {if (true) return new Case(expr,stmtsArray,expr.sourceStart,stmtsArray[listSize-1].sourceEnd);}
4131 {if (true) return new Case(expr,stmtsArray,expr.sourceStart,expr.sourceEnd);}
4133 throw new Error("Missing return statement in function");
4138 * case Expression() :
4140 * @return the if it was a case and null if not
4142 static final public Expression SwitchLabel() throws ParseException {
4143 final Expression expr;
4144 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4146 token = jj_consume_token(CASE);
4148 expr = Expression();
4149 } catch (ParseException e) {
4150 if (errorMessage != null) {if (true) throw e;}
4151 errorMessage = "expression expected after 'case' keyword";
4153 errorStart = token.sourceEnd +1;
4154 errorEnd = token.sourceEnd +1;
4155 {if (true) throw e;}
4158 token = jj_consume_token(COLON);
4159 } catch (ParseException e) {
4160 errorMessage = "':' expected after case expression";
4162 errorStart = expr.sourceEnd+1;
4163 errorEnd = expr.sourceEnd+1;
4164 processParseExceptionDebug(e);
4166 {if (true) return expr;}
4169 token = jj_consume_token(_DEFAULT);
4171 jj_consume_token(COLON);
4172 } catch (ParseException e) {
4173 errorMessage = "':' expected after 'default' keyword";
4175 errorStart = token.sourceEnd+1;
4176 errorEnd = token.sourceEnd+1;
4177 processParseExceptionDebug(e);
4179 {if (true) return null;}
4182 jj_la1[103] = jj_gen;
4183 jj_consume_token(-1);
4184 throw new ParseException();
4186 throw new Error("Missing return statement in function");
4189 static final public Break BreakStatement() throws ParseException {
4190 Expression expression = null;
4191 final Token token, token2;
4193 token = jj_consume_token(BREAK);
4194 pos = token.sourceEnd+1;
4195 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4211 case INTEGER_LITERAL:
4212 case FLOATING_POINT_LITERAL:
4213 case STRING_LITERAL:
4218 expression = Expression();
4219 pos = expression.sourceEnd+1;
4222 jj_la1[104] = jj_gen;
4226 token2 = jj_consume_token(SEMICOLON);
4227 pos = token2.sourceEnd;
4228 } catch (ParseException e) {
4229 errorMessage = "';' expected after 'break' keyword";
4233 processParseExceptionDebug(e);
4235 {if (true) return new Break(expression, token.sourceStart, pos);}
4236 throw new Error("Missing return statement in function");
4239 static final public IfStatement IfStatement() throws ParseException {
4240 final Expression condition;
4241 final IfStatement ifStatement;
4243 token = jj_consume_token(IF);
4244 condition = Condition("if");
4245 ifStatement = IfStatement0(condition,token.sourceStart,token.sourceEnd);
4246 {if (true) return ifStatement;}
4247 throw new Error("Missing return statement in function");
4250 static final public Expression Condition(final String keyword) throws ParseException {
4251 final Expression condition;
4253 jj_consume_token(LPAREN);
4254 } catch (ParseException e) {
4255 errorMessage = "'(' expected after " + keyword + " keyword";
4257 errorStart = PHPParser.token.sourceEnd + 1;
4258 errorEnd = PHPParser.token.sourceEnd + 1;
4259 processParseExceptionDebug(e);
4261 condition = Expression();
4263 jj_consume_token(RPAREN);
4264 } catch (ParseException e) {
4265 errorMessage = "')' expected after " + keyword + " keyword";
4267 errorStart = condition.sourceEnd+1;
4268 errorEnd = condition.sourceEnd+1;
4269 processParseExceptionDebug(e);
4271 {if (true) return condition;}
4272 throw new Error("Missing return statement in function");
4275 static final public IfStatement IfStatement0(final Expression condition, final int start,final int end) throws ParseException {
4276 Statement statement;
4277 final Statement stmt;
4278 final Statement[] statementsArray;
4279 ElseIf elseifStatement;
4280 Else elseStatement = null;
4281 final ArrayList stmts;
4282 final ArrayList elseIfList = new ArrayList();
4283 final ElseIf[] elseIfs;
4284 int pos = SimpleCharStream.getPosition();
4285 final int endStatements;
4286 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4288 jj_consume_token(COLON);
4289 stmts = new ArrayList();
4292 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4326 case INTEGER_LITERAL:
4327 case FLOATING_POINT_LITERAL:
4328 case STRING_LITERAL:
4338 jj_la1[105] = jj_gen;
4341 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4374 case INTEGER_LITERAL:
4375 case FLOATING_POINT_LITERAL:
4376 case STRING_LITERAL:
4383 statement = Statement();
4384 stmts.add(statement);
4387 statement = htmlBlock();
4388 if (statement != null) {stmts.add(statement);}
4391 jj_la1[106] = jj_gen;
4392 jj_consume_token(-1);
4393 throw new ParseException();
4396 endStatements = SimpleCharStream.getPosition();
4399 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4404 jj_la1[107] = jj_gen;
4407 elseifStatement = ElseIfStatementColon();
4408 elseIfList.add(elseifStatement);
4410 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4412 elseStatement = ElseStatementColon();
4415 jj_la1[108] = jj_gen;
4419 setMarker(fileToParse,
4420 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4424 "Line " + token.beginLine);
4425 } catch (CoreException e) {
4426 PHPeclipsePlugin.log(e);
4429 jj_consume_token(ENDIF);
4430 } catch (ParseException e) {
4431 errorMessage = "'endif' expected";
4433 errorStart = e.currentToken.sourceStart;
4434 errorEnd = e.currentToken.sourceEnd;
4435 {if (true) throw e;}
4438 jj_consume_token(SEMICOLON);
4439 } catch (ParseException e) {
4440 errorMessage = "';' expected after 'endif' keyword";
4442 errorStart = e.currentToken.sourceStart;
4443 errorEnd = e.currentToken.sourceEnd;
4444 {if (true) throw e;}
4446 elseIfs = new ElseIf[elseIfList.size()];
4447 elseIfList.toArray(elseIfs);
4448 if (stmts.size() == 1) {
4449 {if (true) return new IfStatement(condition,
4450 (Statement) stmts.get(0),
4454 SimpleCharStream.getPosition());}
4456 statementsArray = new Statement[stmts.size()];
4457 stmts.toArray(statementsArray);
4458 {if (true) return new IfStatement(condition,
4459 new Block(statementsArray,pos,endStatements),
4463 SimpleCharStream.getPosition());}
4499 case INTEGER_LITERAL:
4500 case FLOATING_POINT_LITERAL:
4501 case STRING_LITERAL:
4508 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4541 case INTEGER_LITERAL:
4542 case FLOATING_POINT_LITERAL:
4543 case STRING_LITERAL:
4556 jj_la1[109] = jj_gen;
4557 jj_consume_token(-1);
4558 throw new ParseException();
4562 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4567 jj_la1[110] = jj_gen;
4570 elseifStatement = ElseIfStatement();
4571 elseIfList.add(elseifStatement);
4573 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4575 jj_consume_token(ELSE);
4577 pos = SimpleCharStream.getPosition();
4578 statement = Statement();
4579 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4580 } catch (ParseException e) {
4581 if (errorMessage != null) {
4582 {if (true) throw e;}
4584 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4586 errorStart = e.currentToken.sourceStart;
4587 errorEnd = e.currentToken.sourceEnd;
4588 {if (true) throw e;}
4592 jj_la1[111] = jj_gen;
4595 elseIfs = new ElseIf[elseIfList.size()];
4596 elseIfList.toArray(elseIfs);
4597 {if (true) return new IfStatement(condition,
4602 SimpleCharStream.getPosition());}
4605 jj_la1[112] = jj_gen;
4606 jj_consume_token(-1);
4607 throw new ParseException();
4609 throw new Error("Missing return statement in function");
4612 static final public ElseIf ElseIfStatementColon() throws ParseException {
4613 final Expression condition;
4614 Statement statement;
4615 final ArrayList list = new ArrayList();
4616 final Token elseifToken;
4617 elseifToken = jj_consume_token(ELSEIF);
4618 condition = Condition("elseif");
4619 jj_consume_token(COLON);
4622 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4656 case INTEGER_LITERAL:
4657 case FLOATING_POINT_LITERAL:
4658 case STRING_LITERAL:
4668 jj_la1[113] = jj_gen;
4671 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4704 case INTEGER_LITERAL:
4705 case FLOATING_POINT_LITERAL:
4706 case STRING_LITERAL:
4713 statement = Statement();
4714 list.add(statement);
4717 statement = htmlBlock();
4718 if (statement != null) {list.add(statement);}
4721 jj_la1[114] = jj_gen;
4722 jj_consume_token(-1);
4723 throw new ParseException();
4726 final int sizeList = list.size();
4727 final Statement[] stmtsArray = new Statement[sizeList];
4728 list.toArray(stmtsArray);
4729 {if (true) return new ElseIf(condition,stmtsArray ,
4730 elseifToken.sourceStart,
4731 stmtsArray[sizeList-1].sourceEnd);}
4732 throw new Error("Missing return statement in function");
4735 static final public Else ElseStatementColon() throws ParseException {
4736 Statement statement;
4737 final ArrayList list = new ArrayList();
4738 final Token elseToken;
4739 elseToken = jj_consume_token(ELSE);
4740 jj_consume_token(COLON);
4743 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4777 case INTEGER_LITERAL:
4778 case FLOATING_POINT_LITERAL:
4779 case STRING_LITERAL:
4789 jj_la1[115] = jj_gen;
4792 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4825 case INTEGER_LITERAL:
4826 case FLOATING_POINT_LITERAL:
4827 case STRING_LITERAL:
4834 statement = Statement();
4835 list.add(statement);
4838 statement = htmlBlock();
4839 if (statement != null) {list.add(statement);}
4842 jj_la1[116] = jj_gen;
4843 jj_consume_token(-1);
4844 throw new ParseException();
4847 final int sizeList = list.size();
4848 final Statement[] stmtsArray = new Statement[sizeList];
4849 list.toArray(stmtsArray);
4850 {if (true) return new Else(stmtsArray,elseToken.sourceStart,stmtsArray[sizeList-1].sourceEnd);}
4851 throw new Error("Missing return statement in function");
4854 static final public ElseIf ElseIfStatement() throws ParseException {
4855 final Expression condition;
4856 //final Statement statement;
4857 final Token elseifToken;
4858 final Statement[] statement = new Statement[1];
4859 elseifToken = jj_consume_token(ELSEIF);
4860 condition = Condition("elseif");
4861 statement[0] = Statement();
4862 {if (true) return new ElseIf(condition,statement,elseifToken.sourceStart,statement[0].sourceEnd);}
4863 throw new Error("Missing return statement in function");
4866 static final public WhileStatement WhileStatement() throws ParseException {
4867 final Expression condition;
4868 final Statement action;
4869 final Token whileToken;
4870 whileToken = jj_consume_token(WHILE);
4871 condition = Condition("while");
4872 action = WhileStatement0(whileToken.sourceStart,whileToken.sourceEnd);
4873 {if (true) return new WhileStatement(condition,action,whileToken.sourceStart,action.sourceEnd);}
4874 throw new Error("Missing return statement in function");
4877 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4878 Statement statement;
4879 final ArrayList stmts = new ArrayList();
4880 final int pos = SimpleCharStream.getPosition();
4881 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4883 jj_consume_token(COLON);
4886 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4919 case INTEGER_LITERAL:
4920 case FLOATING_POINT_LITERAL:
4921 case STRING_LITERAL:
4931 jj_la1[117] = jj_gen;
4934 statement = Statement();
4935 stmts.add(statement);
4938 setMarker(fileToParse,
4939 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4943 "Line " + token.beginLine);
4944 } catch (CoreException e) {
4945 PHPeclipsePlugin.log(e);
4948 jj_consume_token(ENDWHILE);
4949 } catch (ParseException e) {
4950 errorMessage = "'endwhile' expected";
4952 errorStart = e.currentToken.sourceStart;
4953 errorEnd = e.currentToken.sourceEnd;
4954 {if (true) throw e;}
4957 jj_consume_token(SEMICOLON);
4958 final Statement[] stmtsArray = new Statement[stmts.size()];
4959 stmts.toArray(stmtsArray);
4960 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4961 } catch (ParseException e) {
4962 errorMessage = "';' expected after 'endwhile' keyword";
4964 errorStart = e.currentToken.sourceStart;
4965 errorEnd = e.currentToken.sourceEnd;
4966 {if (true) throw e;}
5001 case INTEGER_LITERAL:
5002 case FLOATING_POINT_LITERAL:
5003 case STRING_LITERAL:
5010 statement = Statement();
5011 {if (true) return statement;}
5014 jj_la1[118] = jj_gen;
5015 jj_consume_token(-1);
5016 throw new ParseException();
5018 throw new Error("Missing return statement in function");
5021 static final public DoStatement DoStatement() throws ParseException {
5022 final Statement action;
5023 final Expression condition;
5025 Token token2 = null;
5026 token = jj_consume_token(DO);
5027 action = Statement();
5028 jj_consume_token(WHILE);
5029 condition = Condition("while");
5031 token2 = jj_consume_token(SEMICOLON);
5032 } catch (ParseException e) {
5033 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
5035 errorStart = condition.sourceEnd+1;
5036 errorEnd = condition.sourceEnd+1;
5037 processParseExceptionDebug(e);
5039 if (token2 == null) {
5040 {if (true) return new DoStatement(condition,action,token.sourceStart,condition.sourceEnd);}
5042 {if (true) return new DoStatement(condition,action,token.sourceStart,token2.sourceEnd);}
5043 throw new Error("Missing return statement in function");
5046 static final public ForeachStatement ForeachStatement() throws ParseException {
5047 Statement statement = null;
5048 Expression expression = null;
5049 ArrayVariableDeclaration variable = null;
5051 Token lparenToken = null;
5052 Token asToken = null;
5053 Token rparenToken = null;
5055 foreachToken = jj_consume_token(FOREACH);
5057 lparenToken = jj_consume_token(LPAREN);
5058 pos = lparenToken.sourceEnd+1;
5059 } catch (ParseException e) {
5060 errorMessage = "'(' expected after 'foreach' keyword";
5062 errorStart = e.currentToken.sourceStart;
5063 errorEnd = e.currentToken.sourceEnd;
5064 processParseExceptionDebug(e);
5065 {pos = foreachToken.sourceEnd+1;}
5068 expression = Expression();
5069 pos = expression.sourceEnd+1;
5070 } catch (ParseException e) {
5071 errorMessage = "variable expected";
5073 errorStart = e.currentToken.sourceStart;
5074 errorEnd = e.currentToken.sourceEnd;
5075 processParseExceptionDebug(e);
5078 asToken = jj_consume_token(AS);
5079 pos = asToken.sourceEnd+1;
5080 } catch (ParseException e) {
5081 errorMessage = "'as' expected";
5083 errorStart = e.currentToken.sourceStart;
5084 errorEnd = e.currentToken.sourceEnd;
5085 processParseExceptionDebug(e);
5088 variable = ArrayVariable();
5089 pos = variable.sourceEnd+1;
5090 } catch (ParseException e) {
5091 if (errorMessage != null) {if (true) throw e;}
5092 errorMessage = "variable expected";
5094 errorStart = e.currentToken.sourceStart;
5095 errorEnd = e.currentToken.sourceEnd;
5096 processParseExceptionDebug(e);
5099 rparenToken = jj_consume_token(RPAREN);
5100 pos = rparenToken.sourceEnd+1;
5101 } catch (ParseException e) {
5102 errorMessage = "')' expected after 'foreach' keyword";
5104 errorStart = e.currentToken.sourceStart;
5105 errorEnd = e.currentToken.sourceEnd;
5106 processParseExceptionDebug(e);
5109 statement = Statement();
5110 pos = rparenToken.sourceEnd+1;
5111 } catch (ParseException e) {
5112 if (errorMessage != null) {if (true) throw e;}
5113 errorMessage = "statement expected";
5115 errorStart = e.currentToken.sourceStart;
5116 errorEnd = e.currentToken.sourceEnd;
5117 processParseExceptionDebug(e);
5119 {if (true) return new ForeachStatement(expression,
5122 foreachToken.sourceStart,
5123 statement.sourceEnd);}
5124 throw new Error("Missing return statement in function");
5128 * a for declaration.
5129 * @return a node representing the for statement
5131 static final public ForStatement ForStatement() throws ParseException {
5132 final Token token,tokenEndFor,token2,tokenColon;
5134 Expression[] initializations = null;
5135 Expression condition = null;
5136 Expression[] increments = null;
5138 final ArrayList list = new ArrayList();
5139 token = jj_consume_token(FOR);
5141 jj_consume_token(LPAREN);
5142 } catch (ParseException e) {
5143 errorMessage = "'(' expected after 'for' keyword";
5145 errorStart = token.sourceEnd;
5146 errorEnd = token.sourceEnd +1;
5147 processParseExceptionDebug(e);
5149 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5165 case INTEGER_LITERAL:
5166 case FLOATING_POINT_LITERAL:
5167 case STRING_LITERAL:
5172 initializations = ForInit();
5175 jj_la1[119] = jj_gen;
5178 jj_consume_token(SEMICOLON);
5179 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5195 case INTEGER_LITERAL:
5196 case FLOATING_POINT_LITERAL:
5197 case STRING_LITERAL:
5202 condition = Expression();
5205 jj_la1[120] = jj_gen;
5208 jj_consume_token(SEMICOLON);
5209 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5225 case INTEGER_LITERAL:
5226 case FLOATING_POINT_LITERAL:
5227 case STRING_LITERAL:
5232 increments = StatementExpressionList();
5235 jj_la1[121] = jj_gen;
5238 jj_consume_token(RPAREN);
5239 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5272 case INTEGER_LITERAL:
5273 case FLOATING_POINT_LITERAL:
5274 case STRING_LITERAL:
5281 action = Statement();
5282 {if (true) return new ForStatement(initializations,
5290 tokenColon = jj_consume_token(COLON);
5291 pos = tokenColon.sourceEnd+1;
5294 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5327 case INTEGER_LITERAL:
5328 case FLOATING_POINT_LITERAL:
5329 case STRING_LITERAL:
5339 jj_la1[122] = jj_gen;
5342 action = Statement();
5343 list.add(action);pos = action.sourceEnd+1;
5346 setMarker(fileToParse,
5347 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
5351 "Line " + token.beginLine);
5352 } catch (CoreException e) {
5353 PHPeclipsePlugin.log(e);
5356 tokenEndFor = jj_consume_token(ENDFOR);
5357 pos = tokenEndFor.sourceEnd+1;
5358 } catch (ParseException e) {
5359 errorMessage = "'endfor' expected";
5363 processParseExceptionDebug(e);
5366 token2 = jj_consume_token(SEMICOLON);
5367 pos = token2.sourceEnd+1;
5368 } catch (ParseException e) {
5369 errorMessage = "';' expected after 'endfor' keyword";
5373 processParseExceptionDebug(e);
5375 final Statement[] stmtsArray = new Statement[list.size()];
5376 list.toArray(stmtsArray);
5377 {if (true) return new ForStatement(initializations,
5380 new Block(stmtsArray,
5381 stmtsArray[0].sourceStart,
5382 stmtsArray[stmtsArray.length-1].sourceEnd),
5387 jj_la1[123] = jj_gen;
5388 jj_consume_token(-1);
5389 throw new ParseException();
5391 throw new Error("Missing return statement in function");
5394 static final public Expression[] ForInit() throws ParseException {
5395 final Expression[] exprs;
5396 if (jj_2_5(2147483647)) {
5397 exprs = LocalVariableDeclaration();
5398 {if (true) return exprs;}
5400 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5416 case INTEGER_LITERAL:
5417 case FLOATING_POINT_LITERAL:
5418 case STRING_LITERAL:
5423 exprs = StatementExpressionList();
5424 {if (true) return exprs;}
5427 jj_la1[124] = jj_gen;
5428 jj_consume_token(-1);
5429 throw new ParseException();
5432 throw new Error("Missing return statement in function");
5435 static final public Expression[] StatementExpressionList() throws ParseException {
5436 final ArrayList list = new ArrayList();
5437 final Expression expr;
5438 expr = Expression();
5442 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5447 jj_la1[125] = jj_gen;
5450 jj_consume_token(COMMA);
5454 final Expression[] exprsArray = new Expression[list.size()];
5455 list.toArray(exprsArray);
5456 {if (true) return exprsArray;}
5457 throw new Error("Missing return statement in function");
5460 static final public Continue ContinueStatement() throws ParseException {
5461 Expression expr = null;
5463 Token token2 = null;
5464 token = jj_consume_token(CONTINUE);
5465 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5481 case INTEGER_LITERAL:
5482 case FLOATING_POINT_LITERAL:
5483 case STRING_LITERAL:
5488 expr = Expression();
5491 jj_la1[126] = jj_gen;
5495 token2 = jj_consume_token(SEMICOLON);
5496 } catch (ParseException e) {
5497 errorMessage = "';' expected after 'continue' statement";
5500 errorStart = token.sourceEnd+1;
5501 errorEnd = token.sourceEnd+1;
5503 errorStart = expr.sourceEnd+1;
5504 errorEnd = expr.sourceEnd+1;
5506 processParseExceptionDebug(e);
5508 if (token2 == null) {
5510 {if (true) return new Continue(expr,token.sourceStart,token.sourceEnd);}
5512 {if (true) return new Continue(expr,token.sourceStart,expr.sourceEnd);}
5514 {if (true) return new Continue(expr,token.sourceStart,token2.sourceEnd);}
5515 throw new Error("Missing return statement in function");
5518 static final public ReturnStatement ReturnStatement() throws ParseException {
5519 Expression expr = null;
5521 Token token2 = null;
5522 token = jj_consume_token(RETURN);
5523 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5539 case INTEGER_LITERAL:
5540 case FLOATING_POINT_LITERAL:
5541 case STRING_LITERAL:
5546 expr = Expression();
5549 jj_la1[127] = jj_gen;
5553 token2 = jj_consume_token(SEMICOLON);
5554 } catch (ParseException e) {
5555 errorMessage = "';' expected after 'return' statement";
5558 errorStart = token.sourceEnd+1;
5559 errorEnd = token.sourceEnd+1;
5561 errorStart = expr.sourceEnd+1;
5562 errorEnd = expr.sourceEnd+1;
5564 processParseExceptionDebug(e);
5566 if (token2 == null) {
5568 {if (true) return new ReturnStatement(expr,token.sourceStart,token.sourceEnd);}
5570 {if (true) return new ReturnStatement(expr,token.sourceStart,expr.sourceEnd);}
5572 {if (true) return new ReturnStatement(expr,token.sourceStart,token2.sourceEnd);}
5573 throw new Error("Missing return statement in function");
5576 static final private boolean jj_2_1(int xla) {
5577 jj_la = xla; jj_lastpos = jj_scanpos = token;
5578 boolean retval = !jj_3_1();
5583 static final private boolean jj_2_2(int xla) {
5584 jj_la = xla; jj_lastpos = jj_scanpos = token;
5585 boolean retval = !jj_3_2();
5590 static final private boolean jj_2_3(int xla) {
5591 jj_la = xla; jj_lastpos = jj_scanpos = token;
5592 boolean retval = !jj_3_3();
5597 static final private boolean jj_2_4(int xla) {
5598 jj_la = xla; jj_lastpos = jj_scanpos = token;
5599 boolean retval = !jj_3_4();
5604 static final private boolean jj_2_5(int xla) {
5605 jj_la = xla; jj_lastpos = jj_scanpos = token;
5606 boolean retval = !jj_3_5();
5611 static final private boolean jj_3R_210() {
5612 if (jj_3R_116()) return true;
5613 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5617 static final private boolean jj_3R_209() {
5618 if (jj_3R_50()) return true;
5619 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5623 static final private boolean jj_3R_109() {
5624 if (jj_3R_114()) return true;
5625 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5629 if (jj_3R_115()) { jj_scanpos = xsp; break; }
5630 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5635 static final private boolean jj_3R_208() {
5636 if (jj_scan_token(IDENTIFIER)) return true;
5637 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5641 static final private boolean jj_3R_203() {
5648 if (jj_3R_210()) return true;
5649 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5650 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5651 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5655 static final private boolean jj_3R_110() {
5656 if (jj_scan_token(BIT_OR)) return true;
5657 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5658 if (jj_3R_109()) return true;
5659 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5663 static final private boolean jj_3R_103() {
5664 if (jj_3R_109()) return true;
5665 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5669 if (jj_3R_110()) { jj_scanpos = xsp; break; }
5670 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5675 static final private boolean jj_3R_188() {
5676 if (jj_scan_token(ARRAY)) return true;
5677 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5678 if (jj_3R_198()) return true;
5679 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5683 static final private boolean jj_3R_132() {
5684 if (jj_scan_token(IDENTIFIER)) return true;
5685 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5689 static final private boolean jj_3R_106() {
5690 if (jj_scan_token(DOT)) return true;
5691 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5692 if (jj_3R_103()) return true;
5693 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5697 static final private boolean jj_3R_131() {
5698 if (jj_scan_token(LBRACE)) return true;
5699 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5700 if (jj_3R_49()) return true;
5701 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5702 if (jj_scan_token(RBRACE)) return true;
5703 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5707 static final private boolean jj_3R_97() {
5708 if (jj_3R_103()) return true;
5709 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5713 if (jj_3R_106()) { jj_scanpos = xsp; break; }
5714 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5719 static final private boolean jj_3R_204() {
5720 if (jj_3R_207()) return true;
5721 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5725 static final private boolean jj_3R_122() {
5732 if (jj_3R_132()) return true;
5733 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5734 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5735 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5739 static final private boolean jj_3R_130() {
5740 if (jj_scan_token(DOLLAR)) return true;
5741 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5742 if (jj_3R_122()) return true;
5743 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5747 static final private boolean jj_3R_108() {
5748 if (jj_scan_token(_ANDL)) return true;
5749 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5753 static final private boolean jj_3R_107() {
5754 if (jj_scan_token(AND_AND)) return true;
5755 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5759 static final private boolean jj_3R_100() {
5764 if (jj_3R_108()) return true;
5765 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5766 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5767 if (jj_3R_97()) return true;
5768 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5772 static final private boolean jj_3R_81() {
5773 if (jj_3R_97()) return true;
5774 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5778 if (jj_3R_100()) { jj_scanpos = xsp; break; }
5779 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5784 static final private boolean jj_3R_79() {
5785 if (jj_scan_token(HOOK)) return true;
5786 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5787 if (jj_3R_49()) return true;
5788 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5789 if (jj_scan_token(COLON)) return true;
5790 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5791 if (jj_3R_73()) return true;
5792 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5796 static final private boolean jj_3R_195() {
5797 if (jj_scan_token(NEW)) return true;
5798 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5799 if (jj_3R_203()) return true;
5800 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5803 if (jj_3R_204()) jj_scanpos = xsp;
5804 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5808 static final private boolean jj_3R_68() {
5809 if (jj_scan_token(DOLLAR)) return true;
5810 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5811 if (jj_3R_122()) return true;
5812 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5816 static final private boolean jj_3R_202() {
5817 if (jj_3R_207()) return true;
5818 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5822 static final private boolean jj_3R_194() {
5823 if (jj_3R_116()) return true;
5824 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5827 if (jj_3R_202()) jj_scanpos = xsp;
5828 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5832 static final private boolean jj_3R_102() {
5833 if (jj_scan_token(_ORL)) return true;
5834 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5838 static final private boolean jj_3R_101() {
5839 if (jj_scan_token(OR_OR)) return true;
5840 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5844 static final private boolean jj_3R_83() {
5849 if (jj_3R_102()) return true;
5850 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5851 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5852 if (jj_3R_81()) return true;
5853 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5857 static final private boolean jj_3R_201() {
5858 if (jj_3R_207()) return true;
5859 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5863 static final private boolean jj_3R_76() {
5864 if (jj_3R_81()) return true;
5865 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5869 if (jj_3R_83()) { jj_scanpos = xsp; break; }
5870 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5875 static final private boolean jj_3_1() {
5876 if (jj_3R_40()) return true;
5877 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5881 static final private boolean jj_3R_51() {
5882 if (jj_scan_token(COMMA)) return true;
5883 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5884 if (jj_3R_49()) return true;
5885 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5889 static final private boolean jj_3R_200() {
5890 if (jj_scan_token(STATICCLASSACCESS)) return true;
5891 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5892 if (jj_3R_203()) return true;
5893 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5897 static final private boolean jj_3R_45() {
5898 if (jj_3R_49()) return true;
5899 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5903 if (jj_3R_51()) { jj_scanpos = xsp; break; }
5904 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5909 static final private boolean jj_3R_116() {
5910 if (jj_3R_68()) return true;
5911 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5915 if (jj_3_1()) { jj_scanpos = xsp; break; }
5916 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5921 static final private boolean jj_3R_193() {
5922 if (jj_scan_token(IDENTIFIER)) return true;
5923 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5927 if (jj_3R_200()) { jj_scanpos = xsp; break; }
5928 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5931 if (jj_3R_201()) jj_scanpos = xsp;
5932 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5936 static final private boolean jj_3R_187() {
5943 if (jj_3R_195()) return true;
5944 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5945 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5946 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5950 static final private boolean jj_3R_73() {
5951 if (jj_3R_76()) return true;
5952 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5955 if (jj_3R_79()) jj_scanpos = xsp;
5956 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5960 static final private boolean jj_3R_178() {
5961 if (jj_3R_188()) return true;
5962 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5966 static final private boolean jj_3R_186() {
5967 if (jj_scan_token(BIT_AND)) return true;
5968 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5972 static final private boolean jj_3R_96() {
5973 if (jj_scan_token(TILDEEQUAL)) return true;
5974 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5978 static final private boolean jj_3R_95() {
5979 if (jj_scan_token(DOTASSIGN)) return true;
5980 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5984 static final private boolean jj_3R_173() {
5989 if (jj_3R_178()) return true;
5990 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5991 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5995 static final private boolean jj_3R_177() {
5998 if (jj_3R_186()) jj_scanpos = xsp;
5999 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6000 if (jj_3R_187()) return true;
6001 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6005 static final private boolean jj_3_5() {
6006 if (jj_3R_45()) return true;
6007 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6011 static final private boolean jj_3R_94() {
6012 if (jj_scan_token(ORASSIGN)) return true;
6013 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6017 static final private boolean jj_3R_93() {
6018 if (jj_scan_token(XORASSIGN)) return true;
6019 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6023 static final private boolean jj_3R_92() {
6024 if (jj_scan_token(ANDASSIGN)) return true;
6025 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6029 static final private boolean jj_3R_91() {
6030 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6031 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6035 static final private boolean jj_3R_90() {
6036 if (jj_scan_token(LSHIFTASSIGN)) return true;
6037 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6041 static final private boolean jj_3R_89() {
6042 if (jj_scan_token(MINUSASSIGN)) return true;
6043 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6047 static final private boolean jj_3R_88() {
6048 if (jj_scan_token(PLUSASSIGN)) return true;
6049 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6053 static final private boolean jj_3R_87() {
6054 if (jj_scan_token(REMASSIGN)) return true;
6055 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6059 static final private boolean jj_3R_86() {
6060 if (jj_scan_token(SLASHASSIGN)) return true;
6061 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6065 static final private boolean jj_3R_85() {
6066 if (jj_scan_token(STARASSIGN)) return true;
6067 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6071 static final private boolean jj_3R_84() {
6072 if (jj_scan_token(ASSIGN)) return true;
6073 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6077 static final private boolean jj_3R_80() {
6104 if (jj_3R_96()) return true;
6105 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6106 } else 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;
6121 static final private boolean jj_3R_197() {
6122 if (jj_scan_token(MINUS_MINUS)) return true;
6123 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6127 static final private boolean jj_3R_196() {
6128 if (jj_scan_token(PLUS_PLUS)) return true;
6129 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6133 static final private boolean jj_3R_191() {
6138 if (jj_3R_197()) return true;
6139 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6140 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6144 static final private boolean jj_3R_175() {
6145 if (jj_3R_173()) return true;
6146 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6149 if (jj_3R_191()) jj_scanpos = xsp;
6150 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6154 static final private boolean jj_3R_99() {
6155 if (jj_3R_105()) return true;
6156 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6160 static final private boolean jj_3R_98() {
6161 if (jj_3R_104()) return true;
6162 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6166 static final private boolean jj_3R_82() {
6171 if (jj_3R_99()) return true;
6172 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6173 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6177 static final private boolean jj_3R_190() {
6178 if (jj_scan_token(ARRAY)) return true;
6179 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6183 static final private boolean jj_3R_189() {
6184 if (jj_3R_50()) return true;
6185 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6189 static final private boolean jj_3R_78() {
6190 if (jj_3R_82()) return true;
6191 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6195 static final private boolean jj_3R_43() {
6196 if (jj_scan_token(ARRAY)) return true;
6197 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6201 static final private boolean jj_3R_77() {
6202 if (jj_scan_token(BANG)) return true;
6203 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6204 if (jj_3R_74()) return true;
6205 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6209 static final private boolean jj_3R_74() {
6214 if (jj_3R_78()) return true;
6215 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6216 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6220 static final private boolean jj_3R_174() {
6221 if (jj_scan_token(LPAREN)) return true;
6222 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6227 if (jj_3R_190()) return true;
6228 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6229 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6230 if (jj_scan_token(RPAREN)) return true;
6231 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6232 if (jj_3R_144()) return true;
6233 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6237 static final private boolean jj_3R_42() {
6238 if (jj_3R_50()) return true;
6239 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6243 static final private boolean jj_3R_58() {
6244 if (jj_3R_74()) return true;
6245 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6249 static final private boolean jj_3_3() {
6250 if (jj_scan_token(LPAREN)) return true;
6251 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6256 if (jj_3R_43()) return true;
6257 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6258 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6259 if (jj_scan_token(RPAREN)) return true;
6260 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6264 static final private boolean jj_3R_172() {
6265 if (jj_scan_token(LPAREN)) return true;
6266 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6267 if (jj_3R_49()) return true;
6268 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6269 if (jj_scan_token(RPAREN)) return true;
6270 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6274 static final private boolean jj_3R_171() {
6275 if (jj_3R_176()) return true;
6276 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6280 static final private boolean jj_3R_170() {
6281 if (jj_3R_175()) return true;
6282 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6286 static final private boolean jj_3R_166() {
6295 if (jj_3R_172()) return true;
6296 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6297 } else 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;
6303 static final private boolean jj_3R_169() {
6304 if (jj_3R_174()) return true;
6305 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6309 static final private boolean jj_3R_44() {
6310 if (jj_3R_49()) return true;
6311 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6312 if (jj_scan_token(SEMICOLON)) return true;
6313 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6317 static final private boolean jj_3R_168() {
6318 if (jj_scan_token(MINUS_MINUS)) return true;
6319 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6323 static final private boolean jj_3R_167() {
6324 if (jj_scan_token(PLUS_PLUS)) return true;
6325 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6329 static final private boolean jj_3R_75() {
6330 if (jj_3R_80()) return true;
6331 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6332 if (jj_3R_49()) return true;
6333 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6337 static final private boolean jj_3R_165() {
6342 if (jj_3R_168()) return true;
6343 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6344 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6345 if (jj_3R_173()) return true;
6346 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6350 static final private boolean jj_3R_49() {
6355 if (jj_3R_58()) return true;
6356 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6357 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6361 static final private boolean jj_3R_57() {
6362 if (jj_3R_73()) return true;
6363 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6366 if (jj_3R_75()) jj_scanpos = xsp;
6367 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6371 static final private boolean jj_3R_67() {
6372 if (jj_scan_token(OBJECT)) return true;
6373 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6377 static final private boolean jj_3R_161() {
6378 if (jj_3R_166()) return true;
6379 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6383 static final private boolean jj_3R_66() {
6384 if (jj_scan_token(INTEGER)) return true;
6385 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6389 static final private boolean jj_3R_65() {
6390 if (jj_scan_token(INT)) return true;
6391 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6395 static final private boolean jj_3R_64() {
6396 if (jj_scan_token(FLOAT)) return true;
6397 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6401 static final private boolean jj_3R_160() {
6402 if (jj_3R_165()) return true;
6403 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6407 static final private boolean jj_3R_63() {
6408 if (jj_scan_token(DOUBLE)) return true;
6409 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6413 static final private boolean jj_3R_62() {
6414 if (jj_scan_token(REAL)) return true;
6415 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6419 static final private boolean jj_3R_61() {
6420 if (jj_scan_token(BOOLEAN)) return true;
6421 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6425 static final private boolean jj_3R_60() {
6426 if (jj_scan_token(BOOL)) return true;
6427 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6431 static final private boolean jj_3R_159() {
6432 if (jj_scan_token(MINUS)) return true;
6433 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6434 if (jj_3R_148()) return true;
6435 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6439 static final private boolean jj_3R_50() {
6458 if (jj_3R_67()) return true;
6459 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6460 } else 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;
6471 static final private boolean jj_3R_59() {
6472 if (jj_scan_token(STRING)) return true;
6473 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6477 static final private boolean jj_3R_156() {
6486 if (jj_3R_161()) return true;
6487 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6488 } else 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;
6494 static final private boolean jj_3R_158() {
6495 if (jj_scan_token(PLUS)) return true;
6496 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6497 if (jj_3R_148()) return true;
6498 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6502 static final private boolean jj_3_4() {
6503 if (jj_3R_44()) return true;
6504 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6508 static final private boolean jj_3R_164() {
6509 if (jj_3R_156()) return true;
6510 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6514 static final private boolean jj_3R_163() {
6515 if (jj_scan_token(BANG)) return true;
6516 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6517 if (jj_3R_157()) return true;
6518 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6522 static final private boolean jj_3R_157() {
6529 if (jj_3R_164()) return true;
6530 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6531 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6532 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6536 static final private boolean jj_3R_162() {
6537 if (jj_scan_token(AT)) return true;
6538 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6539 if (jj_3R_157()) return true;
6540 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6544 static final private boolean jj_3R_155() {
6545 if (jj_3R_156()) return true;
6546 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6550 static final private boolean jj_3R_216() {
6551 if (jj_scan_token(COMMA)) return true;
6552 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6553 if (jj_3R_49()) return true;
6554 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6558 static final private boolean jj_3R_154() {
6559 if (jj_scan_token(BANG)) return true;
6560 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6561 if (jj_3R_157()) return true;
6562 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6566 static final private boolean jj_3R_215() {
6567 if (jj_3R_49()) return true;
6568 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6572 if (jj_3R_216()) { jj_scanpos = xsp; break; }
6573 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6578 static final private boolean jj_3R_153() {
6579 if (jj_scan_token(TILDE)) return true;
6580 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6581 if (jj_3R_148()) return true;
6582 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6586 static final private boolean jj_3R_148() {
6595 if (jj_3R_155()) return true;
6596 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6597 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6598 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6599 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6603 static final private boolean jj_3R_152() {
6604 if (jj_scan_token(AT)) return true;
6605 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6606 if (jj_3R_148()) return true;
6607 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6611 static final private boolean jj_3R_213() {
6612 if (jj_3R_215()) return true;
6613 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6617 static final private boolean jj_3R_144() {
6618 if (jj_3R_148()) return true;
6619 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6623 static final private boolean jj_3R_151() {
6624 if (jj_scan_token(REMAINDER)) return true;
6625 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6629 static final private boolean jj_3R_150() {
6630 if (jj_scan_token(SLASH)) return true;
6631 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6635 static final private boolean jj_3R_149() {
6636 if (jj_scan_token(STAR)) return true;
6637 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6641 static final private boolean jj_3R_207() {
6642 if (jj_scan_token(LPAREN)) return true;
6643 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6646 if (jj_3R_213()) jj_scanpos = xsp;
6647 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6648 if (jj_scan_token(RPAREN)) return true;
6649 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6653 static final private boolean jj_3R_145() {
6660 if (jj_3R_151()) return true;
6661 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6662 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6663 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6664 if (jj_3R_144()) return true;
6665 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6669 static final private boolean jj_3R_139() {
6670 if (jj_3R_144()) return true;
6671 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6675 if (jj_3R_145()) { jj_scanpos = xsp; break; }
6676 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6681 static final private boolean jj_3R_212() {
6682 if (jj_scan_token(LBRACE1)) return true;
6683 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6684 if (jj_scan_token(ID)) return true;
6685 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6686 if (jj_scan_token(RBRACE1)) return true;
6687 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6691 static final private boolean jj_3R_147() {
6692 if (jj_scan_token(MINUS)) return true;
6693 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6697 static final private boolean jj_3R_211() {
6698 if (jj_scan_token(IDENTIFIER)) return true;
6699 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6703 static final private boolean jj_3R_146() {
6704 if (jj_scan_token(PLUS)) return true;
6705 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6709 static final private boolean jj_3R_140() {
6714 if (jj_3R_147()) return true;
6715 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6716 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6717 if (jj_3R_139()) return true;
6718 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6722 static final private boolean jj_3R_199() {
6723 if (jj_scan_token(DOLLARS)) return true;
6724 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6729 if (jj_3R_212()) return true;
6730 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6731 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6735 static final private boolean jj_3R_133() {
6736 if (jj_3R_139()) return true;
6737 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6741 if (jj_3R_140()) { jj_scanpos = xsp; break; }
6742 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6747 static final private boolean jj_3R_192() {
6748 if (jj_scan_token(DOUBLEQUOTE)) return true;
6749 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6753 if (jj_3R_199()) { jj_scanpos = xsp; break; }
6754 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6756 if (jj_scan_token(DOUBLEQUOTE2)) return true;
6757 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6761 static final private boolean jj_3R_113() {
6762 if (jj_scan_token(ASSIGN)) return true;
6763 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6764 if (jj_3R_49()) return true;
6765 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6769 static final private boolean jj_3R_143() {
6770 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
6771 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6775 static final private boolean jj_3R_142() {
6776 if (jj_scan_token(RSIGNEDSHIFT)) return true;
6777 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6781 static final private boolean jj_3R_141() {
6782 if (jj_scan_token(LSHIFT)) return true;
6783 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6787 static final private boolean jj_3R_185() {
6788 if (jj_3R_192()) return true;
6789 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6793 static final private boolean jj_3R_184() {
6794 if (jj_scan_token(NULL)) return true;
6795 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6799 static final private boolean jj_3R_134() {
6806 if (jj_3R_143()) return true;
6807 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6808 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6809 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6810 if (jj_3R_133()) return true;
6811 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6815 static final private boolean jj_3R_183() {
6816 if (jj_scan_token(FALSE)) return true;
6817 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6821 static final private boolean jj_3R_182() {
6822 if (jj_scan_token(TRUE)) return true;
6823 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6827 static final private boolean jj_3R_123() {
6828 if (jj_3R_133()) return true;
6829 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6833 if (jj_3R_134()) { jj_scanpos = xsp; break; }
6834 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6839 static final private boolean jj_3R_181() {
6840 if (jj_scan_token(STRING_LITERAL)) return true;
6841 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6845 static final private boolean jj_3R_180() {
6846 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
6847 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6851 static final private boolean jj_3R_117() {
6852 if (jj_3R_116()) return true;
6853 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6857 static final private boolean jj_3R_179() {
6858 if (jj_scan_token(INTEGER_LITERAL)) return true;
6859 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6863 static final private boolean jj_3R_176() {
6878 if (jj_3R_185()) return true;
6879 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6880 } else 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;
6889 static final private boolean jj_3R_138() {
6890 if (jj_scan_token(GE)) return true;
6891 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6895 static final private boolean jj_3R_137() {
6896 if (jj_scan_token(LE)) return true;
6897 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6901 static final private boolean jj_3R_136() {
6902 if (jj_scan_token(GT)) return true;
6903 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6907 static final private boolean jj_3R_112() {
6908 if (jj_scan_token(COMMA)) return true;
6909 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6912 if (jj_3R_117()) jj_scanpos = xsp;
6913 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6917 static final private boolean jj_3R_135() {
6918 if (jj_scan_token(LT)) return true;
6919 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6923 static final private boolean jj_3R_124() {
6932 if (jj_3R_138()) return true;
6933 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6934 } else 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 if (jj_3R_123()) return true;
6938 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6942 static final private boolean jj_3R_120() {
6943 if (jj_3R_123()) return true;
6944 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6948 if (jj_3R_124()) { jj_scanpos = xsp; break; }
6949 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6954 static final private boolean jj_3R_111() {
6955 if (jj_3R_116()) return true;
6956 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6960 static final private boolean jj_3R_72() {
6961 if (jj_3R_50()) return true;
6962 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6966 static final private boolean jj_3R_71() {
6967 if (jj_3R_49()) return true;
6968 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6972 static final private boolean jj_3R_56() {
6977 if (jj_3R_72()) return true;
6978 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6979 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6983 static final private boolean jj_3R_48() {
6984 if (jj_scan_token(LBRACE)) return true;
6985 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6988 if (jj_3R_56()) jj_scanpos = xsp;
6989 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6990 if (jj_scan_token(RBRACE)) return true;
6991 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6995 static final private boolean jj_3R_104() {
6996 if (jj_scan_token(LIST)) return true;
6997 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6998 if (jj_scan_token(LPAREN)) return true;
6999 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7002 if (jj_3R_111()) jj_scanpos = xsp;
7003 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7006 if (jj_3R_112()) { jj_scanpos = xsp; break; }
7007 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7009 if (jj_scan_token(RPAREN)) return true;
7010 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7012 if (jj_3R_113()) jj_scanpos = xsp;
7013 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7017 static final private boolean jj_3R_206() {
7018 if (jj_scan_token(COMMA)) return true;
7019 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7023 static final private boolean jj_3R_70() {
7024 if (jj_3R_50()) return true;
7025 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7029 static final private boolean jj_3_2() {
7030 if (jj_scan_token(COMMA)) return true;
7031 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7032 if (jj_3R_41()) return true;
7033 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7037 static final private boolean jj_3R_55() {
7042 if (jj_3R_70()) return true;
7043 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7044 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7048 static final private boolean jj_3R_69() {
7049 if (jj_3R_49()) return true;
7050 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7054 static final private boolean jj_3R_205() {
7055 if (jj_3R_41()) return true;
7056 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7060 if (jj_3_2()) { jj_scanpos = xsp; break; }
7061 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7066 static final private boolean jj_3R_47() {
7067 if (jj_scan_token(LBRACKET)) return true;
7068 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7071 if (jj_3R_55()) jj_scanpos = xsp;
7072 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7073 if (jj_scan_token(RBRACKET)) return true;
7074 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7078 static final private boolean jj_3R_129() {
7079 if (jj_scan_token(TRIPLEEQUAL)) return true;
7080 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7084 static final private boolean jj_3R_128() {
7085 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
7086 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7090 static final private boolean jj_3R_127() {
7091 if (jj_scan_token(NOT_EQUAL)) return true;
7092 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7096 static final private boolean jj_3R_126() {
7097 if (jj_scan_token(DIF)) return true;
7098 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7102 static final private boolean jj_3R_105() {
7103 if (jj_scan_token(PRINT)) return true;
7104 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7105 if (jj_3R_49()) return true;
7106 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7110 static final private boolean jj_3R_198() {
7111 if (jj_scan_token(LPAREN)) return true;
7112 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7115 if (jj_3R_205()) jj_scanpos = xsp;
7116 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7118 if (jj_3R_206()) jj_scanpos = xsp;
7119 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7120 if (jj_scan_token(RPAREN)) return true;
7121 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7125 static final private boolean jj_3R_125() {
7126 if (jj_scan_token(EQUAL_EQUAL)) return true;
7127 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7131 static final private boolean jj_3R_54() {
7132 if (jj_3R_68()) return true;
7133 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7137 static final private boolean jj_3R_121() {
7148 if (jj_3R_129()) return true;
7149 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7150 } else 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 if (jj_3R_120()) return true;
7155 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7159 static final private boolean jj_3R_53() {
7160 if (jj_scan_token(IDENTIFIER)) return true;
7161 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7165 static final private boolean jj_3R_118() {
7166 if (jj_3R_120()) return true;
7167 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7171 if (jj_3R_121()) { jj_scanpos = xsp; break; }
7172 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7177 static final private boolean jj_3R_214() {
7178 if (jj_scan_token(ARRAYASSIGN)) return true;
7179 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7180 if (jj_3R_49()) return true;
7181 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7185 static final private boolean jj_3R_52() {
7186 if (jj_scan_token(LBRACE)) return true;
7187 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7188 if (jj_3R_49()) return true;
7189 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7190 if (jj_scan_token(RBRACE)) return true;
7191 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7195 static final private boolean jj_3R_41() {
7196 if (jj_3R_49()) return true;
7197 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7200 if (jj_3R_214()) jj_scanpos = xsp;
7201 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7205 static final private boolean jj_3R_119() {
7206 if (jj_scan_token(BIT_AND)) return true;
7207 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7208 if (jj_3R_118()) return true;
7209 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7213 static final private boolean jj_3R_46() {
7214 if (jj_scan_token(CLASSACCESS)) return true;
7215 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7222 if (jj_3R_54()) return true;
7223 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7224 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7225 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7229 static final private boolean jj_3R_40() {
7236 if (jj_3R_48()) return true;
7237 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7238 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7239 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7243 static final private boolean jj_3R_114() {
7244 if (jj_3R_118()) return true;
7245 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7249 if (jj_3R_119()) { jj_scanpos = xsp; break; }
7250 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7255 static final private boolean jj_3R_115() {
7256 if (jj_scan_token(XOR)) return true;
7257 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7258 if (jj_3R_114()) return true;
7259 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7263 static private boolean jj_initialized_once = false;
7264 static public PHPParserTokenManager token_source;
7265 static SimpleCharStream jj_input_stream;
7266 static public Token token, jj_nt;
7267 static private int jj_ntk;
7268 static private Token jj_scanpos, jj_lastpos;
7269 static private int jj_la;
7270 static public boolean lookingAhead = false;
7271 static private boolean jj_semLA;
7272 static private int jj_gen;
7273 static final private int[] jj_la1 = new int[128];
7274 static private int[] jj_la1_0;
7275 static private int[] jj_la1_1;
7276 static private int[] jj_la1_2;
7277 static private int[] jj_la1_3;
7278 static private int[] jj_la1_4;
7286 private static void jj_la1_0() {
7287 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,};
7289 private static void jj_la1_1() {
7290 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,};
7292 private static void jj_la1_2() {
7293 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,};
7295 private static void jj_la1_3() {
7296 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,};
7298 private static void jj_la1_4() {
7299 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,};
7301 static final private JJCalls[] jj_2_rtns = new JJCalls[5];
7302 static private boolean jj_rescan = false;
7303 static private int jj_gc = 0;
7305 public PHPParser(java.io.InputStream stream) {
7306 if (jj_initialized_once) {
7307 System.out.println("ERROR: Second call to constructor of static parser. You must");
7308 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7309 System.out.println(" during parser generation.");
7312 jj_initialized_once = true;
7313 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7314 token_source = new PHPParserTokenManager(jj_input_stream);
7315 token = new Token();
7318 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7319 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7322 static public void ReInit(java.io.InputStream stream) {
7323 jj_input_stream.ReInit(stream, 1, 1);
7324 token_source.ReInit(jj_input_stream);
7325 token = new Token();
7328 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7329 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7332 public PHPParser(java.io.Reader stream) {
7333 if (jj_initialized_once) {
7334 System.out.println("ERROR: Second call to constructor of static parser. You must");
7335 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7336 System.out.println(" during parser generation.");
7339 jj_initialized_once = true;
7340 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7341 token_source = new PHPParserTokenManager(jj_input_stream);
7342 token = new Token();
7345 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7346 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7349 static public void ReInit(java.io.Reader stream) {
7350 jj_input_stream.ReInit(stream, 1, 1);
7351 token_source.ReInit(jj_input_stream);
7352 token = new Token();
7355 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7356 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7359 public PHPParser(PHPParserTokenManager tm) {
7360 if (jj_initialized_once) {
7361 System.out.println("ERROR: Second call to constructor of static parser. You must");
7362 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7363 System.out.println(" during parser generation.");
7366 jj_initialized_once = true;
7368 token = new Token();
7371 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7372 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7375 public void ReInit(PHPParserTokenManager tm) {
7377 token = new Token();
7380 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7381 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7384 static final private Token jj_consume_token(int kind) throws ParseException {
7386 if ((oldToken = token).next != null) token = token.next;
7387 else token = token.next = token_source.getNextToken();
7389 if (token.kind == kind) {
7391 if (++jj_gc > 100) {
7393 for (int i = 0; i < jj_2_rtns.length; i++) {
7394 JJCalls c = jj_2_rtns[i];
7396 if (c.gen < jj_gen) c.first = null;
7405 throw generateParseException();
7408 static final private boolean jj_scan_token(int kind) {
7409 if (jj_scanpos == jj_lastpos) {
7411 if (jj_scanpos.next == null) {
7412 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
7414 jj_lastpos = jj_scanpos = jj_scanpos.next;
7417 jj_scanpos = jj_scanpos.next;
7420 int i = 0; Token tok = token;
7421 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
7422 if (tok != null) jj_add_error_token(kind, i);
7424 return (jj_scanpos.kind != kind);
7427 static final public Token getNextToken() {
7428 if (token.next != null) token = token.next;
7429 else token = token.next = token_source.getNextToken();
7435 static final public Token getToken(int index) {
7436 Token t = lookingAhead ? jj_scanpos : token;
7437 for (int i = 0; i < index; i++) {
7438 if (t.next != null) t = t.next;
7439 else t = t.next = token_source.getNextToken();
7444 static final private int jj_ntk() {
7445 if ((jj_nt=token.next) == null)
7446 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
7448 return (jj_ntk = jj_nt.kind);
7451 static private java.util.Vector jj_expentries = new java.util.Vector();
7452 static private int[] jj_expentry;
7453 static private int jj_kind = -1;
7454 static private int[] jj_lasttokens = new int[100];
7455 static private int jj_endpos;
7457 static private void jj_add_error_token(int kind, int pos) {
7458 if (pos >= 100) return;
7459 if (pos == jj_endpos + 1) {
7460 jj_lasttokens[jj_endpos++] = kind;
7461 } else if (jj_endpos != 0) {
7462 jj_expentry = new int[jj_endpos];
7463 for (int i = 0; i < jj_endpos; i++) {
7464 jj_expentry[i] = jj_lasttokens[i];
7466 boolean exists = false;
7467 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
7468 int[] oldentry = (int[])(enum.nextElement());
7469 if (oldentry.length == jj_expentry.length) {
7471 for (int i = 0; i < jj_expentry.length; i++) {
7472 if (oldentry[i] != jj_expentry[i]) {
7480 if (!exists) jj_expentries.addElement(jj_expentry);
7481 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
7485 static public ParseException generateParseException() {
7486 jj_expentries.removeAllElements();
7487 boolean[] la1tokens = new boolean[160];
7488 for (int i = 0; i < 160; i++) {
7489 la1tokens[i] = false;
7492 la1tokens[jj_kind] = true;
7495 for (int i = 0; i < 128; i++) {
7496 if (jj_la1[i] == jj_gen) {
7497 for (int j = 0; j < 32; j++) {
7498 if ((jj_la1_0[i] & (1<<j)) != 0) {
7499 la1tokens[j] = true;
7501 if ((jj_la1_1[i] & (1<<j)) != 0) {
7502 la1tokens[32+j] = true;
7504 if ((jj_la1_2[i] & (1<<j)) != 0) {
7505 la1tokens[64+j] = true;
7507 if ((jj_la1_3[i] & (1<<j)) != 0) {
7508 la1tokens[96+j] = true;
7510 if ((jj_la1_4[i] & (1<<j)) != 0) {
7511 la1tokens[128+j] = true;
7516 for (int i = 0; i < 160; i++) {
7518 jj_expentry = new int[1];
7520 jj_expentries.addElement(jj_expentry);
7525 jj_add_error_token(0, 0);
7526 int[][] exptokseq = new int[jj_expentries.size()][];
7527 for (int i = 0; i < jj_expentries.size(); i++) {
7528 exptokseq[i] = (int[])jj_expentries.elementAt(i);
7530 return new ParseException(token, exptokseq, tokenImage);
7533 static final public void enable_tracing() {
7536 static final public void disable_tracing() {
7539 static final private void jj_rescan_token() {
7541 for (int i = 0; i < 5; i++) {
7542 JJCalls p = jj_2_rtns[i];
7544 if (p.gen > jj_gen) {
7545 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7547 case 0: jj_3_1(); break;
7548 case 1: jj_3_2(); break;
7549 case 2: jj_3_3(); break;
7550 case 3: jj_3_4(); break;
7551 case 4: jj_3_5(); break;
7555 } while (p != null);
7560 static final private void jj_save(int index, int xla) {
7561 JJCalls p = jj_2_rtns[index];
7562 while (p.gen > jj_gen) {
7563 if (p.next == null) { p = p.next = new JJCalls(); break; }
7566 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7569 static final class JJCalls {