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 = true;
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:
412 PHPParser.createNewHTMLCode();
413 } catch (TokenMgrError e) {
414 PHPeclipsePlugin.log(e);
415 errorStart = SimpleCharStream.beginOffset;
416 errorEnd = SimpleCharStream.endOffset;
417 errorMessage = e.getMessage();
419 {if (true) throw generateParseException();}
424 * A php block is a <?= expression [;]?>
425 * or <?php somephpcode ?>
426 * or <? somephpcode ?>
428 static final public void PhpBlock() throws ParseException {
429 final PHPEchoBlock phpEchoBlock;
430 final Token token,phpEnd;
431 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
433 phpEchoBlock = phpEchoBlock();
434 pushOnAstNodes(phpEchoBlock);
473 case INTEGER_LITERAL:
474 case FLOATING_POINT_LITERAL:
481 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
484 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
486 jj_consume_token(PHPSTARTLONG);
489 token = jj_consume_token(PHPSTARTSHORT);
491 setMarker(fileToParse,
492 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
496 "Line " + token.beginLine);
497 } catch (CoreException e) {
498 PHPeclipsePlugin.log(e);
503 jj_consume_token(-1);
504 throw new ParseException();
511 PHPParser.createNewHTMLCode();
514 phpEnd = jj_consume_token(PHPEND);
515 htmlStart = phpEnd.sourceEnd;
516 } catch (ParseException e) {
517 errorMessage = "'?>' expected";
519 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
520 errorEnd = SimpleCharStream.getPosition() + 1;
521 processParseExceptionDebug(e);
526 jj_consume_token(-1);
527 throw new ParseException();
531 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
532 final Expression expr;
533 final PHPEchoBlock echoBlock;
534 final Token token, token2;
535 token = jj_consume_token(PHPECHOSTART);
536 PHPParser.createNewHTMLCode();
538 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
540 jj_consume_token(SEMICOLON);
546 token2 = jj_consume_token(PHPEND);
547 htmlStart = token2.sourceEnd;
549 echoBlock = new PHPEchoBlock(expr,token.sourceStart,token2.sourceEnd);
550 pushOnAstNodes(echoBlock);
551 {if (true) return echoBlock;}
552 throw new Error("Missing return statement in function");
555 static final public void Php() throws ParseException {
558 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
593 case INTEGER_LITERAL:
594 case FLOATING_POINT_LITERAL:
611 static final public ClassDeclaration ClassDeclaration() throws ParseException {
612 final ClassDeclaration classDeclaration;
613 Token className = null;
614 final Token superclassName, token, extendsToken;
615 String classNameImage = SYNTAX_ERROR_CHAR;
616 String superclassNameImage = null;
618 token = jj_consume_token(CLASS);
620 className = jj_consume_token(IDENTIFIER);
621 classNameImage = className.image;
622 } catch (ParseException e) {
623 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
625 errorStart = token.sourceEnd+1;
626 errorEnd = token.sourceEnd+1;
627 processParseExceptionDebug(e);
629 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
631 extendsToken = jj_consume_token(EXTENDS);
633 superclassName = jj_consume_token(IDENTIFIER);
634 superclassNameImage = superclassName.image;
635 } catch (ParseException e) {
636 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
638 errorStart = extendsToken.sourceEnd+1;
639 errorEnd = extendsToken.sourceEnd+1;
640 processParseExceptionDebug(e);
641 superclassNameImage = SYNTAX_ERROR_CHAR;
649 if (className == null) {
650 start = token.sourceStart;
651 end = token.sourceEnd;
653 start = className.sourceStart;
654 end = className.sourceEnd;
656 if (superclassNameImage == null) {
658 classDeclaration = new ClassDeclaration(currentSegment,
663 classDeclaration = new ClassDeclaration(currentSegment,
669 currentSegment.add(classDeclaration);
670 currentSegment = classDeclaration;
671 classEnd = ClassBody(classDeclaration);
672 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
673 classDeclaration.sourceEnd = classEnd;
674 pushOnAstNodes(classDeclaration);
675 {if (true) return classDeclaration;}
676 throw new Error("Missing return statement in function");
679 static final public int ClassBody(final ClassDeclaration classDeclaration) throws ParseException {
682 jj_consume_token(LBRACE);
683 } catch (ParseException e) {
684 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "'. '{' expected";
686 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
687 errorEnd = SimpleCharStream.getPosition() + 1;
688 processParseExceptionDebug(e);
692 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
701 ClassBodyDeclaration(classDeclaration);
704 token = jj_consume_token(RBRACE);
705 {if (true) return token.sourceEnd;}
706 } catch (ParseException e) {
707 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. 'var', 'function' or '}' expected";
709 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
710 errorEnd = SimpleCharStream.getPosition() + 1;
711 processParseExceptionDebug(e);
712 {if (true) return PHPParser.token.sourceEnd;}
714 throw new Error("Missing return statement in function");
718 * A class can contain only methods and fields.
720 static final public void ClassBodyDeclaration(final ClassDeclaration classDeclaration) throws ParseException {
721 final MethodDeclaration method;
722 final FieldDeclaration field;
723 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
725 method = MethodDeclaration();
726 method.analyzeCode();
727 classDeclaration.addMethod(method);
730 field = FieldDeclaration();
731 classDeclaration.addField(field);
735 jj_consume_token(-1);
736 throw new ParseException();
741 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
742 * it is only used by ClassBodyDeclaration()
744 static final public FieldDeclaration FieldDeclaration() throws ParseException {
745 VariableDeclaration variableDeclaration;
746 final VariableDeclaration[] list;
747 final ArrayList arrayList = new ArrayList();
751 token = jj_consume_token(VAR);
752 variableDeclaration = VariableDeclaratorNoSuffix();
753 arrayList.add(variableDeclaration);
754 outlineInfo.addVariable(variableDeclaration.name());
755 pos = variableDeclaration.sourceEnd;
758 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
766 jj_consume_token(COMMA);
767 variableDeclaration = VariableDeclaratorNoSuffix();
768 arrayList.add(variableDeclaration);
769 outlineInfo.addVariable(variableDeclaration.name());
770 pos = variableDeclaration.sourceEnd;
773 token2 = jj_consume_token(SEMICOLON);
774 } catch (ParseException e) {
775 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
779 processParseExceptionDebug(e);
781 list = new VariableDeclaration[arrayList.size()];
782 arrayList.toArray(list);
784 if (token2 == null) {
785 end = list[list.length-1].sourceEnd;
787 end = token2.sourceEnd;
789 {if (true) return new FieldDeclaration(list,
793 throw new Error("Missing return statement in function");
797 * a strict variable declarator : there cannot be a suffix here.
798 * It will be used by fields and formal parameters
800 static final public VariableDeclaration VariableDeclaratorNoSuffix() throws ParseException {
801 final Token dollar, token, lbrace,rbrace;
802 Expression expr, initializer = null;
805 dollar = jj_consume_token(DOLLAR);
806 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
808 token = jj_consume_token(IDENTIFIER);
809 variable = new Variable(token.image,dollar.sourceStart,token.sourceEnd);
812 lbrace = jj_consume_token(LBRACE);
814 rbrace = jj_consume_token(RBRACE);
815 variable = new Variable(expr,dollar.sourceStart,rbrace.sourceEnd);
819 jj_consume_token(-1);
820 throw new ParseException();
822 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
824 assignToken = jj_consume_token(ASSIGN);
826 initializer = VariableInitializer();
827 } catch (ParseException e) {
828 errorMessage = "Literal expression expected in variable initializer";
830 errorStart = assignToken.sourceEnd +1;
831 errorEnd = assignToken.sourceEnd +1;
832 processParseExceptionDebug(e);
839 if (initializer == null) {
840 {if (true) return new VariableDeclaration(currentSegment,
842 variable.sourceStart,
843 variable.sourceEnd);}
845 {if (true) return new VariableDeclaration(currentSegment,
848 VariableDeclaration.EQUAL,
849 variable.sourceStart);}
850 throw new Error("Missing return statement in function");
854 * this will be used by static statement
856 static final public VariableDeclaration VariableDeclarator() throws ParseException {
857 final AbstractVariable variable;
858 Expression initializer = null;
860 variable = VariableDeclaratorId();
861 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
863 token = jj_consume_token(ASSIGN);
865 initializer = VariableInitializer();
866 } catch (ParseException e) {
867 errorMessage = "Literal expression expected in variable initializer";
869 errorStart = token.sourceEnd+1;
870 errorEnd = token.sourceEnd+1;
871 processParseExceptionDebug(e);
878 if (initializer == null) {
879 {if (true) return new VariableDeclaration(currentSegment,
881 variable.sourceStart,
882 variable.sourceEnd);}
884 {if (true) return new VariableDeclaration(currentSegment,
887 VariableDeclaration.EQUAL,
888 variable.sourceStart);}
889 throw new Error("Missing return statement in function");
894 * @return the variable name (with suffix)
896 static final public AbstractVariable VariableDeclaratorId() throws ParseException {
898 AbstractVariable expression = null;
908 expression = VariableSuffix(var);
910 if (expression == null) {
911 {if (true) return var;}
913 {if (true) return expression;}
914 } catch (ParseException e) {
915 errorMessage = "'$' expected for variable identifier";
917 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
918 errorEnd = SimpleCharStream.getPosition() + 1;
921 throw new Error("Missing return statement in function");
924 static final public Variable Variable() throws ParseException {
925 Variable variable = null;
927 token = jj_consume_token(DOLLAR);
928 variable = Var(token);
929 {if (true) return new Variable(variable,token.sourceStart,variable.sourceEnd);}
930 throw new Error("Missing return statement in function");
933 static final public Variable Var(final Token dollar) throws ParseException {
934 Variable variable = null;
935 final Token token,token2;
936 ConstantIdentifier constant;
937 Expression expression;
938 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
940 token = jj_consume_token(DOLLAR);
941 variable = Var(token);
942 {if (true) return new Variable(variable,dollar.sourceStart,variable.sourceEnd);}
945 token = jj_consume_token(LBRACE);
946 expression = Expression();
947 token2 = jj_consume_token(RBRACE);
948 {if (true) return new Variable(expression,
953 token = jj_consume_token(IDENTIFIER);
954 {if (true) return new Variable(token.image,dollar.sourceStart,token.sourceEnd);}
958 jj_consume_token(-1);
959 throw new ParseException();
961 throw new Error("Missing return statement in function");
964 static final public Expression VariableInitializer() throws ParseException {
965 final Expression expr;
966 final Token token, token2;
967 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
971 case INTEGER_LITERAL:
972 case FLOATING_POINT_LITERAL:
975 {if (true) return expr;}
978 token2 = jj_consume_token(MINUS);
979 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
980 case INTEGER_LITERAL:
981 token = jj_consume_token(INTEGER_LITERAL);
983 case FLOATING_POINT_LITERAL:
984 token = jj_consume_token(FLOATING_POINT_LITERAL);
988 jj_consume_token(-1);
989 throw new ParseException();
991 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
993 token2.sourceStart);}
996 token2 = jj_consume_token(PLUS);
997 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
998 case INTEGER_LITERAL:
999 token = jj_consume_token(INTEGER_LITERAL);
1001 case FLOATING_POINT_LITERAL:
1002 token = jj_consume_token(FLOATING_POINT_LITERAL);
1005 jj_la1[15] = jj_gen;
1006 jj_consume_token(-1);
1007 throw new ParseException();
1009 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
1011 token2.sourceStart);}
1014 expr = ArrayDeclarator();
1015 {if (true) return expr;}
1018 token = jj_consume_token(IDENTIFIER);
1019 {if (true) return new ConstantIdentifier(token);}
1022 jj_la1[16] = jj_gen;
1023 jj_consume_token(-1);
1024 throw new ParseException();
1026 throw new Error("Missing return statement in function");
1029 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
1030 final Expression expr,expr2;
1031 expr = Expression();
1032 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1034 jj_consume_token(ARRAYASSIGN);
1035 expr2 = Expression();
1036 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
1039 jj_la1[17] = jj_gen;
1042 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
1043 throw new Error("Missing return statement in function");
1046 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
1047 ArrayVariableDeclaration expr;
1048 final ArrayList list = new ArrayList();
1049 jj_consume_token(LPAREN);
1050 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1066 case INTEGER_LITERAL:
1067 case FLOATING_POINT_LITERAL:
1068 case STRING_LITERAL:
1072 expr = ArrayVariable();
1081 jj_consume_token(COMMA);
1082 expr = ArrayVariable();
1087 jj_la1[18] = jj_gen;
1090 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1092 jj_consume_token(COMMA);
1096 jj_la1[19] = jj_gen;
1099 jj_consume_token(RPAREN);
1100 final ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1102 {if (true) return vars;}
1103 throw new Error("Missing return statement in function");
1107 * A Method Declaration.
1108 * <b>function</b> MetodDeclarator() Block()
1110 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1111 final MethodDeclaration functionDeclaration;
1113 final OutlineableWithChildren seg = currentSegment;
1115 token = jj_consume_token(FUNCTION);
1117 functionDeclaration = MethodDeclarator(token.sourceStart);
1118 outlineInfo.addVariable(functionDeclaration.name);
1119 } catch (ParseException e) {
1120 if (errorMessage != null) {if (true) throw e;}
1121 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1123 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1124 errorEnd = SimpleCharStream.getPosition() + 1;
1125 {if (true) throw e;}
1127 currentSegment = functionDeclaration;
1129 functionDeclaration.statements = block.statements;
1130 currentSegment = seg;
1131 {if (true) return functionDeclaration;}
1132 throw new Error("Missing return statement in function");
1136 * A MethodDeclarator.
1137 * [&] IDENTIFIER(parameters ...).
1138 * @return a function description for the outline
1140 static final public MethodDeclaration MethodDeclarator(final int start) throws ParseException {
1141 Token identifier = null;
1142 Token reference = null;
1143 final Hashtable formalParameters = new Hashtable();
1144 String identifierChar = SYNTAX_ERROR_CHAR;
1146 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1148 reference = jj_consume_token(BIT_AND);
1149 end = reference.sourceEnd;
1152 jj_la1[20] = jj_gen;
1156 identifier = jj_consume_token(IDENTIFIER);
1157 identifierChar = identifier.image;
1158 end = identifier.sourceEnd;
1159 } catch (ParseException e) {
1160 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1162 errorStart = e.currentToken.sourceEnd;
1163 errorEnd = e.currentToken.next.sourceStart;
1164 processParseExceptionDebug(e);
1166 end = FormalParameters(formalParameters);
1167 int nameStart, nameEnd;
1168 if (identifier == null) {
1169 if (reference == null) {
1170 nameStart = start + 9;
1171 nameEnd = start + 10;
1173 nameStart = reference.sourceEnd + 1;
1174 nameEnd = reference.sourceEnd + 2;
1177 nameStart = identifier.sourceStart;
1178 nameEnd = identifier.sourceEnd;
1180 {if (true) return new MethodDeclaration(currentSegment,
1188 throw new Error("Missing return statement in function");
1192 * FormalParameters follows method identifier.
1193 * (FormalParameter())
1195 static final public int FormalParameters(final Hashtable parameters) throws ParseException {
1196 VariableDeclaration var;
1198 Token tok = PHPParser.token;
1199 int end = tok.sourceEnd;
1201 tok = jj_consume_token(LPAREN);
1202 end = tok.sourceEnd;
1203 } catch (ParseException e) {
1204 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1206 errorStart = e.currentToken.next.sourceStart;
1207 errorEnd = e.currentToken.next.sourceEnd;
1208 processParseExceptionDebug(e);
1210 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1213 var = FormalParameter();
1214 parameters.put(var.name(),var);end = var.sourceEnd;
1217 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1222 jj_la1[21] = jj_gen;
1225 jj_consume_token(COMMA);
1226 var = FormalParameter();
1227 parameters.put(var.name(),var);end = var.sourceEnd;
1231 jj_la1[22] = jj_gen;
1235 token = jj_consume_token(RPAREN);
1236 end = token.sourceEnd;
1237 } catch (ParseException e) {
1238 errorMessage = "')' expected";
1240 errorStart = e.currentToken.next.sourceStart;
1241 errorEnd = e.currentToken.next.sourceEnd;
1242 processParseExceptionDebug(e);
1244 {if (true) return end;}
1245 throw new Error("Missing return statement in function");
1249 * A formal parameter.
1250 * $varname[=value] (,$varname[=value])
1252 static final public VariableDeclaration FormalParameter() throws ParseException {
1253 final VariableDeclaration variableDeclaration;
1255 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1257 token = jj_consume_token(BIT_AND);
1260 jj_la1[23] = jj_gen;
1263 variableDeclaration = VariableDeclaratorNoSuffix();
1264 if (token != null) {
1265 variableDeclaration.setReference(true);
1267 {if (true) return variableDeclaration;}
1268 throw new Error("Missing return statement in function");
1271 static final public ConstantIdentifier Type() throws ParseException {
1273 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1275 token = jj_consume_token(STRING);
1276 {if (true) return new ConstantIdentifier(token);}
1279 token = jj_consume_token(BOOL);
1280 {if (true) return new ConstantIdentifier(token);}
1283 token = jj_consume_token(BOOLEAN);
1284 {if (true) return new ConstantIdentifier(token);}
1287 token = jj_consume_token(REAL);
1288 {if (true) return new ConstantIdentifier(token);}
1291 token = jj_consume_token(DOUBLE);
1292 {if (true) return new ConstantIdentifier(token);}
1295 token = jj_consume_token(FLOAT);
1296 {if (true) return new ConstantIdentifier(token);}
1299 token = jj_consume_token(INT);
1300 {if (true) return new ConstantIdentifier(token);}
1303 token = jj_consume_token(INTEGER);
1304 {if (true) return new ConstantIdentifier(token);}
1307 token = jj_consume_token(OBJECT);
1308 {if (true) return new ConstantIdentifier(token);}
1311 jj_la1[24] = jj_gen;
1312 jj_consume_token(-1);
1313 throw new ParseException();
1315 throw new Error("Missing return statement in function");
1318 static final public Expression Expression() throws ParseException {
1319 final Expression expr;
1320 Expression initializer = null;
1321 int assignOperator = -1;
1322 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1336 case INTEGER_LITERAL:
1337 case FLOATING_POINT_LITERAL:
1338 case STRING_LITERAL:
1342 expr = ConditionalExpression();
1343 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1356 case RSIGNEDSHIFTASSIGN:
1357 assignOperator = AssignmentOperator();
1359 initializer = Expression();
1360 } catch (ParseException e) {
1361 if (errorMessage != null) {
1362 {if (true) throw e;}
1364 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1366 errorEnd = SimpleCharStream.getPosition();
1367 {if (true) throw e;}
1371 jj_la1[25] = jj_gen;
1374 if (assignOperator != -1) {// todo : change this, very very bad :(
1375 if (expr instanceof AbstractVariable) {
1376 {if (true) return new VariableDeclaration(currentSegment,
1377 (AbstractVariable) expr,
1380 initializer.sourceEnd);}
1382 String varName = expr.toStringExpression().substring(1);
1383 {if (true) return new VariableDeclaration(currentSegment,
1384 new Variable(varName,
1388 initializer.sourceEnd);}
1390 {if (true) return expr;}
1394 expr = ExpressionWBang();
1395 {if (true) return expr;}
1398 jj_la1[26] = jj_gen;
1399 jj_consume_token(-1);
1400 throw new ParseException();
1402 throw new Error("Missing return statement in function");
1405 static final public Expression ExpressionWBang() throws ParseException {
1406 final Expression expr;
1408 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1410 token = jj_consume_token(BANG);
1411 expr = ExpressionWBang();
1412 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
1416 expr = ExpressionNoBang();
1417 {if (true) return expr;}
1420 jj_la1[27] = jj_gen;
1421 jj_consume_token(-1);
1422 throw new ParseException();
1424 throw new Error("Missing return statement in function");
1427 static final public Expression ExpressionNoBang() throws ParseException {
1429 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1431 expr = ListExpression();
1432 {if (true) return expr;}
1435 expr = PrintExpression();
1436 {if (true) return expr;}
1439 jj_la1[28] = jj_gen;
1440 jj_consume_token(-1);
1441 throw new ParseException();
1443 throw new Error("Missing return statement in function");
1447 * Any assignement operator.
1448 * @return the assignement operator id
1450 static final public int AssignmentOperator() throws ParseException {
1451 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1453 jj_consume_token(ASSIGN);
1454 {if (true) return VariableDeclaration.EQUAL;}
1457 jj_consume_token(STARASSIGN);
1458 {if (true) return VariableDeclaration.STAR_EQUAL;}
1461 jj_consume_token(SLASHASSIGN);
1462 {if (true) return VariableDeclaration.SLASH_EQUAL;}
1465 jj_consume_token(REMASSIGN);
1466 {if (true) return VariableDeclaration.REM_EQUAL;}
1469 jj_consume_token(PLUSASSIGN);
1470 {if (true) return VariableDeclaration.PLUS_EQUAL;}
1473 jj_consume_token(MINUSASSIGN);
1474 {if (true) return VariableDeclaration.MINUS_EQUAL;}
1477 jj_consume_token(LSHIFTASSIGN);
1478 {if (true) return VariableDeclaration.LSHIFT_EQUAL;}
1480 case RSIGNEDSHIFTASSIGN:
1481 jj_consume_token(RSIGNEDSHIFTASSIGN);
1482 {if (true) return VariableDeclaration.RSIGNEDSHIFT_EQUAL;}
1485 jj_consume_token(ANDASSIGN);
1486 {if (true) return VariableDeclaration.AND_EQUAL;}
1489 jj_consume_token(XORASSIGN);
1490 {if (true) return VariableDeclaration.XOR_EQUAL;}
1493 jj_consume_token(ORASSIGN);
1494 {if (true) return VariableDeclaration.OR_EQUAL;}
1497 jj_consume_token(DOTASSIGN);
1498 {if (true) return VariableDeclaration.DOT_EQUAL;}
1501 jj_consume_token(TILDEEQUAL);
1502 {if (true) return VariableDeclaration.TILDE_EQUAL;}
1505 jj_la1[29] = jj_gen;
1506 jj_consume_token(-1);
1507 throw new ParseException();
1509 throw new Error("Missing return statement in function");
1512 static final public Expression ConditionalExpression() throws ParseException {
1513 final Expression expr;
1514 Expression expr2 = null;
1515 Expression expr3 = null;
1516 expr = ConditionalOrExpression();
1517 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1519 jj_consume_token(HOOK);
1520 expr2 = Expression();
1521 jj_consume_token(COLON);
1522 expr3 = ConditionalExpression();
1525 jj_la1[30] = jj_gen;
1528 if (expr3 == null) {
1529 {if (true) return expr;}
1531 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1532 throw new Error("Missing return statement in function");
1535 static final public Expression ConditionalOrExpression() throws ParseException {
1536 Expression expr,expr2;
1538 expr = ConditionalAndExpression();
1541 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1547 jj_la1[31] = jj_gen;
1550 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1552 jj_consume_token(OR_OR);
1553 operator = OperatorIds.OR_OR;
1556 jj_consume_token(_ORL);
1557 operator = OperatorIds.ORL;
1560 jj_la1[32] = jj_gen;
1561 jj_consume_token(-1);
1562 throw new ParseException();
1564 expr2 = ConditionalAndExpression();
1565 expr = new BinaryExpression(expr,expr2,operator);
1567 {if (true) return expr;}
1568 throw new Error("Missing return statement in function");
1571 static final public Expression ConditionalAndExpression() throws ParseException {
1572 Expression expr,expr2;
1574 expr = ConcatExpression();
1577 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1583 jj_la1[33] = jj_gen;
1586 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1588 jj_consume_token(AND_AND);
1589 operator = OperatorIds.AND_AND;
1592 jj_consume_token(_ANDL);
1593 operator = OperatorIds.ANDL;
1596 jj_la1[34] = jj_gen;
1597 jj_consume_token(-1);
1598 throw new ParseException();
1600 expr2 = ConcatExpression();
1601 expr = new BinaryExpression(expr,expr2,operator);
1603 {if (true) return expr;}
1604 throw new Error("Missing return statement in function");
1607 static final public Expression ConcatExpression() throws ParseException {
1608 Expression expr,expr2;
1609 expr = InclusiveOrExpression();
1612 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1617 jj_la1[35] = jj_gen;
1620 jj_consume_token(DOT);
1621 expr2 = InclusiveOrExpression();
1622 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1624 {if (true) return expr;}
1625 throw new Error("Missing return statement in function");
1628 static final public Expression InclusiveOrExpression() throws ParseException {
1629 Expression expr,expr2;
1630 expr = ExclusiveOrExpression();
1633 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1638 jj_la1[36] = jj_gen;
1641 jj_consume_token(BIT_OR);
1642 expr2 = ExclusiveOrExpression();
1643 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1645 {if (true) return expr;}
1646 throw new Error("Missing return statement in function");
1649 static final public Expression ExclusiveOrExpression() throws ParseException {
1650 Expression expr,expr2;
1651 expr = AndExpression();
1654 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1659 jj_la1[37] = jj_gen;
1662 jj_consume_token(XOR);
1663 expr2 = AndExpression();
1664 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1666 {if (true) return expr;}
1667 throw new Error("Missing return statement in function");
1670 static final public Expression AndExpression() throws ParseException {
1671 Expression expr,expr2;
1672 expr = EqualityExpression();
1675 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1680 jj_la1[38] = jj_gen;
1683 jj_consume_token(BIT_AND);
1684 expr2 = EqualityExpression();
1685 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1687 {if (true) return expr;}
1688 throw new Error("Missing return statement in function");
1691 static final public Expression EqualityExpression() throws ParseException {
1692 Expression expr,expr2;
1695 expr = RelationalExpression();
1698 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1702 case BANGDOUBLEEQUAL:
1707 jj_la1[39] = jj_gen;
1710 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1712 token = jj_consume_token(EQUAL_EQUAL);
1713 operator = OperatorIds.EQUAL_EQUAL;
1716 token = jj_consume_token(DIF);
1717 operator = OperatorIds.DIF;
1720 token = jj_consume_token(NOT_EQUAL);
1721 operator = OperatorIds.DIF;
1723 case BANGDOUBLEEQUAL:
1724 token = jj_consume_token(BANGDOUBLEEQUAL);
1725 operator = OperatorIds.BANG_EQUAL_EQUAL;
1728 token = jj_consume_token(TRIPLEEQUAL);
1729 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1732 jj_la1[40] = jj_gen;
1733 jj_consume_token(-1);
1734 throw new ParseException();
1737 expr2 = RelationalExpression();
1738 } catch (ParseException e) {
1739 if (errorMessage != null) {
1740 {if (true) throw e;}
1742 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1744 errorStart = token.sourceEnd +1;
1745 errorEnd = token.sourceEnd +1;
1746 expr2 = new ConstantIdentifier(SYNTAX_ERROR_CHAR,token.sourceEnd +1,token.sourceEnd +1);
1747 processParseExceptionDebug(e);
1749 expr = new BinaryExpression(expr,expr2,operator);
1751 {if (true) return expr;}
1752 throw new Error("Missing return statement in function");
1755 static final public Expression RelationalExpression() throws ParseException {
1756 Expression expr,expr2;
1758 expr = ShiftExpression();
1761 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1769 jj_la1[41] = jj_gen;
1772 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1774 jj_consume_token(LT);
1775 operator = OperatorIds.LESS;
1778 jj_consume_token(GT);
1779 operator = OperatorIds.GREATER;
1782 jj_consume_token(LE);
1783 operator = OperatorIds.LESS_EQUAL;
1786 jj_consume_token(GE);
1787 operator = OperatorIds.GREATER_EQUAL;
1790 jj_la1[42] = jj_gen;
1791 jj_consume_token(-1);
1792 throw new ParseException();
1794 expr2 = ShiftExpression();
1795 expr = new BinaryExpression(expr,expr2,operator);
1797 {if (true) return expr;}
1798 throw new Error("Missing return statement in function");
1801 static final public Expression ShiftExpression() throws ParseException {
1802 Expression expr,expr2;
1804 expr = AdditiveExpression();
1807 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1810 case RUNSIGNEDSHIFT:
1814 jj_la1[43] = jj_gen;
1817 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1819 jj_consume_token(LSHIFT);
1820 operator = OperatorIds.LEFT_SHIFT;
1823 jj_consume_token(RSIGNEDSHIFT);
1824 operator = OperatorIds.RIGHT_SHIFT;
1826 case RUNSIGNEDSHIFT:
1827 jj_consume_token(RUNSIGNEDSHIFT);
1828 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1831 jj_la1[44] = jj_gen;
1832 jj_consume_token(-1);
1833 throw new ParseException();
1835 expr2 = AdditiveExpression();
1836 expr = new BinaryExpression(expr,expr2,operator);
1838 {if (true) return expr;}
1839 throw new Error("Missing return statement in function");
1842 static final public Expression AdditiveExpression() throws ParseException {
1843 Expression expr,expr2;
1845 expr = MultiplicativeExpression();
1848 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1854 jj_la1[45] = jj_gen;
1857 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1859 jj_consume_token(PLUS);
1860 operator = OperatorIds.PLUS;
1863 jj_consume_token(MINUS);
1864 operator = OperatorIds.MINUS;
1867 jj_la1[46] = jj_gen;
1868 jj_consume_token(-1);
1869 throw new ParseException();
1871 expr2 = MultiplicativeExpression();
1872 expr = new BinaryExpression(expr,expr2,operator);
1874 {if (true) return expr;}
1875 throw new Error("Missing return statement in function");
1878 static final public Expression MultiplicativeExpression() throws ParseException {
1879 Expression expr,expr2;
1882 expr = UnaryExpression();
1883 } catch (ParseException e) {
1884 if (errorMessage != null) {if (true) throw e;}
1885 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1887 errorStart = PHPParser.token.sourceStart;
1888 errorEnd = PHPParser.token.sourceEnd;
1889 {if (true) throw e;}
1893 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1900 jj_la1[47] = jj_gen;
1903 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1905 jj_consume_token(STAR);
1906 operator = OperatorIds.MULTIPLY;
1909 jj_consume_token(SLASH);
1910 operator = OperatorIds.DIVIDE;
1913 jj_consume_token(REMAINDER);
1914 operator = OperatorIds.REMAINDER;
1917 jj_la1[48] = jj_gen;
1918 jj_consume_token(-1);
1919 throw new ParseException();
1921 expr2 = UnaryExpression();
1922 expr = new BinaryExpression(expr,expr2,operator);
1924 {if (true) return expr;}
1925 throw new Error("Missing return statement in function");
1929 * An unary expression starting with @, & or nothing
1931 static final public Expression UnaryExpression() throws ParseException {
1932 final Expression expr;
1933 /* <BIT_AND> expr = UnaryExpressionNoPrefix() //why did I had that ?
1934 {return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1936 expr = AtNotTildeUnaryExpression();
1937 {if (true) return expr;}
1938 throw new Error("Missing return statement in function");
1941 static final public Expression AtNotTildeUnaryExpression() throws ParseException {
1942 final Expression expr;
1944 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1946 token = jj_consume_token(AT);
1947 expr = AtNotTildeUnaryExpression();
1948 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,token.sourceStart);}
1951 token = jj_consume_token(TILDE);
1952 expr = AtNotTildeUnaryExpression();
1953 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.TWIDDLE,token.sourceStart);}
1956 token = jj_consume_token(BANG);
1957 expr = AtNotUnaryExpression();
1958 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
1970 case INTEGER_LITERAL:
1971 case FLOATING_POINT_LITERAL:
1972 case STRING_LITERAL:
1976 expr = UnaryExpressionNoPrefix();
1977 {if (true) return expr;}
1980 jj_la1[49] = jj_gen;
1981 jj_consume_token(-1);
1982 throw new ParseException();
1984 throw new Error("Missing return statement in function");
1988 * An expression prefixed (or not) by one or more @ and !.
1989 * @return the expression
1991 static final public Expression AtNotUnaryExpression() throws ParseException {
1992 final Expression expr;
1994 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1996 token = jj_consume_token(AT);
1997 expr = AtNotUnaryExpression();
1998 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,token.sourceStart);}
2001 token = jj_consume_token(BANG);
2002 expr = AtNotUnaryExpression();
2003 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
2015 case INTEGER_LITERAL:
2016 case FLOATING_POINT_LITERAL:
2017 case STRING_LITERAL:
2021 expr = UnaryExpressionNoPrefix();
2022 {if (true) return expr;}
2025 jj_la1[50] = jj_gen;
2026 jj_consume_token(-1);
2027 throw new ParseException();
2029 throw new Error("Missing return statement in function");
2032 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
2033 final Expression expr;
2035 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2037 token = jj_consume_token(PLUS);
2038 expr = AtNotTildeUnaryExpression();
2039 {if (true) return new PrefixedUnaryExpression(expr,
2041 token.sourceStart);}
2044 token = jj_consume_token(MINUS);
2045 expr = AtNotTildeUnaryExpression();
2046 {if (true) return new PrefixedUnaryExpression(expr,
2048 token.sourceStart);}
2052 expr = PreIncDecExpression();
2053 {if (true) return expr;}
2061 case INTEGER_LITERAL:
2062 case FLOATING_POINT_LITERAL:
2063 case STRING_LITERAL:
2067 expr = UnaryExpressionNotPlusMinus();
2068 {if (true) return expr;}
2071 jj_la1[51] = jj_gen;
2072 jj_consume_token(-1);
2073 throw new ParseException();
2075 throw new Error("Missing return statement in function");
2078 static final public Expression PreIncDecExpression() throws ParseException {
2079 final Expression expr;
2082 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2084 token = jj_consume_token(PLUS_PLUS);
2085 operator = OperatorIds.PLUS_PLUS;
2088 token = jj_consume_token(MINUS_MINUS);
2089 operator = OperatorIds.MINUS_MINUS;
2092 jj_la1[52] = jj_gen;
2093 jj_consume_token(-1);
2094 throw new ParseException();
2096 expr = PrimaryExpression();
2097 {if (true) return new PrefixedUnaryExpression(expr,operator,token.sourceStart);}
2098 throw new Error("Missing return statement in function");
2101 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
2102 final Expression expr;
2103 if (jj_2_3(2147483647)) {
2104 expr = CastExpression();
2105 {if (true) return expr;}
2107 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2113 expr = PostfixExpression();
2114 {if (true) return expr;}
2119 case INTEGER_LITERAL:
2120 case FLOATING_POINT_LITERAL:
2121 case STRING_LITERAL:
2123 {if (true) return expr;}
2126 jj_consume_token(LPAREN);
2127 expr = Expression();
2129 jj_consume_token(RPAREN);
2130 } catch (ParseException e) {
2131 errorMessage = "')' expected";
2133 errorStart = expr.sourceEnd +1;
2134 errorEnd = expr.sourceEnd +1;
2135 processParseExceptionDebug(e);
2137 {if (true) return expr;}
2140 jj_la1[53] = jj_gen;
2141 jj_consume_token(-1);
2142 throw new ParseException();
2145 throw new Error("Missing return statement in function");
2148 static final public CastExpression CastExpression() throws ParseException {
2149 final ConstantIdentifier type;
2150 final Expression expr;
2151 final Token token,token1;
2152 token1 = jj_consume_token(LPAREN);
2153 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2166 token = jj_consume_token(ARRAY);
2167 type = new ConstantIdentifier(token);
2170 jj_la1[54] = jj_gen;
2171 jj_consume_token(-1);
2172 throw new ParseException();
2174 jj_consume_token(RPAREN);
2175 expr = UnaryExpression();
2176 {if (true) return new CastExpression(type,expr,token1.sourceStart,expr.sourceEnd);}
2177 throw new Error("Missing return statement in function");
2180 static final public Expression PostfixExpression() throws ParseException {
2181 final Expression expr;
2184 expr = PrimaryExpression();
2185 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2188 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2190 token = jj_consume_token(PLUS_PLUS);
2191 operator = OperatorIds.PLUS_PLUS;
2194 token = jj_consume_token(MINUS_MINUS);
2195 operator = OperatorIds.MINUS_MINUS;
2198 jj_la1[55] = jj_gen;
2199 jj_consume_token(-1);
2200 throw new ParseException();
2204 jj_la1[56] = jj_gen;
2207 if (operator == -1) {
2208 {if (true) return expr;}
2210 {if (true) return new PostfixedUnaryExpression(expr,operator,token.sourceEnd);}
2211 throw new Error("Missing return statement in function");
2214 static final public Expression PrimaryExpression() throws ParseException {
2217 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2222 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2224 token = jj_consume_token(BIT_AND);
2227 jj_la1[57] = jj_gen;
2230 expr = refPrimaryExpression(token);
2231 {if (true) return expr;}
2234 expr = ArrayDeclarator();
2235 {if (true) return expr;}
2238 jj_la1[58] = jj_gen;
2239 jj_consume_token(-1);
2240 throw new ParseException();
2242 throw new Error("Missing return statement in function");
2245 static final public Expression refPrimaryExpression(final Token reference) throws ParseException {
2247 Expression expr2 = null;
2248 final Token identifier;
2249 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2251 identifier = jj_consume_token(IDENTIFIER);
2252 expr = new ConstantIdentifier(identifier);
2255 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2256 case STATICCLASSACCESS:
2260 jj_la1[59] = jj_gen;
2263 jj_consume_token(STATICCLASSACCESS);
2264 expr2 = ClassIdentifier();
2265 expr = new ClassAccess(expr,
2267 ClassAccess.STATIC);
2269 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2271 expr2 = Arguments(expr);
2274 jj_la1[60] = jj_gen;
2277 if (expr2 == null) {
2278 if (reference != null) {
2279 ParseException e = generateParseException();
2280 errorMessage = "you cannot use a constant by reference";
2282 errorStart = reference.sourceStart;
2283 errorEnd = reference.sourceEnd;
2284 processParseExceptionDebug(e);
2286 {if (true) return expr;}
2288 {if (true) return expr2;}
2291 expr = VariableDeclaratorId();
2292 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2294 expr = Arguments(expr);
2297 jj_la1[61] = jj_gen;
2300 {if (true) return expr;}
2303 token = jj_consume_token(NEW);
2304 expr = ClassIdentifier();
2306 if (reference == null) {
2307 start = token.sourceStart;
2309 start = reference.sourceStart;
2311 expr = new ClassInstantiation(expr,
2314 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2316 expr = Arguments(expr);
2319 jj_la1[62] = jj_gen;
2322 {if (true) return expr;}
2325 jj_la1[63] = jj_gen;
2326 jj_consume_token(-1);
2327 throw new ParseException();
2329 throw new Error("Missing return statement in function");
2333 * An array declarator.
2337 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2338 final ArrayVariableDeclaration[] vars;
2340 token = jj_consume_token(ARRAY);
2341 vars = ArrayInitializer();
2342 {if (true) return new ArrayInitializer(vars,
2344 PHPParser.token.sourceEnd);}
2345 throw new Error("Missing return statement in function");
2348 static final public Expression ClassIdentifier() throws ParseException {
2349 final Expression expr;
2351 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2353 token = jj_consume_token(IDENTIFIER);
2354 {if (true) return new ConstantIdentifier(token);}
2366 {if (true) return expr;}
2369 expr = VariableDeclaratorId();
2370 {if (true) return expr;}
2373 jj_la1[64] = jj_gen;
2374 jj_consume_token(-1);
2375 throw new ParseException();
2377 throw new Error("Missing return statement in function");
2381 * Used by Variabledeclaratorid and primarysuffix
2383 static final public AbstractVariable VariableSuffix(final AbstractVariable prefix) throws ParseException {
2384 Expression expression = null;
2385 final Token classAccessToken,lbrace,rbrace;
2388 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2390 classAccessToken = jj_consume_token(CLASSACCESS);
2392 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2394 lbrace = jj_consume_token(LBRACE);
2395 expression = Expression();
2396 rbrace = jj_consume_token(RBRACE);
2397 expression = new Variable(expression,
2402 token = jj_consume_token(IDENTIFIER);
2403 expression = new Variable(token.image,token.sourceStart,token.sourceEnd);
2406 expression = Variable();
2409 jj_la1[65] = jj_gen;
2410 jj_consume_token(-1);
2411 throw new ParseException();
2413 } catch (ParseException e) {
2414 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2416 errorStart = classAccessToken.sourceEnd +1;
2417 errorEnd = classAccessToken.sourceEnd +1;
2418 processParseExceptionDebug(e);
2420 {if (true) return new ClassAccess(prefix,
2422 ClassAccess.NORMAL);}
2425 token = jj_consume_token(LBRACKET);
2426 pos = token.sourceEnd+1;
2427 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2452 case INTEGER_LITERAL:
2453 case FLOATING_POINT_LITERAL:
2454 case STRING_LITERAL:
2458 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2474 case INTEGER_LITERAL:
2475 case FLOATING_POINT_LITERAL:
2476 case STRING_LITERAL:
2480 expression = Expression();
2481 pos = expression.sourceEnd+1;
2492 expression = Type();
2493 pos = expression.sourceEnd+1;
2496 jj_la1[66] = jj_gen;
2497 jj_consume_token(-1);
2498 throw new ParseException();
2502 jj_la1[67] = jj_gen;
2506 token = jj_consume_token(RBRACKET);
2507 pos = token.sourceEnd;
2508 } catch (ParseException e) {
2509 errorMessage = "']' expected";
2513 processParseExceptionDebug(e);
2515 {if (true) return new ArrayDeclarator(prefix,expression,pos);}
2518 token = jj_consume_token(LBRACE);
2519 pos = token.sourceEnd+1;
2520 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2545 case INTEGER_LITERAL:
2546 case FLOATING_POINT_LITERAL:
2547 case STRING_LITERAL:
2551 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2567 case INTEGER_LITERAL:
2568 case FLOATING_POINT_LITERAL:
2569 case STRING_LITERAL:
2573 expression = Expression();
2574 pos = expression.sourceEnd+1;
2585 expression = Type();
2586 pos = expression.sourceEnd+1;
2589 jj_la1[68] = jj_gen;
2590 jj_consume_token(-1);
2591 throw new ParseException();
2595 jj_la1[69] = jj_gen;
2599 token = jj_consume_token(RBRACE);
2600 pos = token.sourceEnd;
2601 } catch (ParseException e) {
2602 errorMessage = "']' expected";
2606 processParseExceptionDebug(e);
2608 {if (true) return new ArrayDeclarator(prefix,expression,pos);}
2611 jj_la1[70] = jj_gen;
2612 jj_consume_token(-1);
2613 throw new ParseException();
2615 throw new Error("Missing return statement in function");
2618 static final public Literal Literal() throws ParseException {
2620 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2621 case INTEGER_LITERAL:
2622 token = jj_consume_token(INTEGER_LITERAL);
2623 {if (true) return new NumberLiteral(token);}
2625 case FLOATING_POINT_LITERAL:
2626 token = jj_consume_token(FLOATING_POINT_LITERAL);
2627 {if (true) return new NumberLiteral(token);}
2629 case STRING_LITERAL:
2630 token = jj_consume_token(STRING_LITERAL);
2631 {if (true) return new StringLiteral(token);}
2634 token = jj_consume_token(TRUE);
2635 {if (true) return new TrueLiteral(token);}
2638 token = jj_consume_token(FALSE);
2639 {if (true) return new FalseLiteral(token);}
2642 token = jj_consume_token(NULL);
2643 {if (true) return new NullLiteral(token);}
2646 jj_la1[71] = jj_gen;
2647 jj_consume_token(-1);
2648 throw new ParseException();
2650 throw new Error("Missing return statement in function");
2653 static final public FunctionCall Arguments(final Expression func) throws ParseException {
2654 Expression[] args = null;
2656 jj_consume_token(LPAREN);
2657 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2673 case INTEGER_LITERAL:
2674 case FLOATING_POINT_LITERAL:
2675 case STRING_LITERAL:
2679 args = ArgumentList();
2682 jj_la1[72] = jj_gen;
2686 token = jj_consume_token(RPAREN);
2687 {if (true) return new FunctionCall(func,args,token.sourceEnd);}
2688 } catch (ParseException e) {
2689 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2691 errorStart = args[args.length-1].sourceEnd+1;
2692 errorEnd = args[args.length-1].sourceEnd+1;
2693 processParseExceptionDebug(e);
2695 {if (true) return new FunctionCall(func,args,args[args.length-1].sourceEnd);}
2696 throw new Error("Missing return statement in function");
2700 * An argument list is a list of arguments separated by comma :
2701 * argumentDeclaration() (, argumentDeclaration)*
2702 * @return an array of arguments
2704 static final public Expression[] ArgumentList() throws ParseException {
2706 final ArrayList list = new ArrayList();
2710 list.add(arg);pos = arg.sourceEnd;
2713 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2718 jj_la1[73] = jj_gen;
2721 token = jj_consume_token(COMMA);
2722 pos = token.sourceEnd;
2726 pos = arg.sourceEnd;
2727 } catch (ParseException e) {
2728 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2732 processParseException(e);
2735 final Expression[] arguments = new Expression[list.size()];
2736 list.toArray(arguments);
2737 {if (true) return arguments;}
2738 throw new Error("Missing return statement in function");
2742 * A Statement without break.
2743 * @return a statement
2745 static final public Statement StatementNoBreak() throws ParseException {
2746 final Statement statement;
2749 statement = expressionStatement();
2750 {if (true) return statement;}
2752 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2754 statement = LabeledStatement();
2755 {if (true) return statement;}
2758 statement = Block();
2759 {if (true) return statement;}
2762 statement = EmptyStatement();
2763 {if (true) return statement;}
2766 statement = SwitchStatement();
2767 {if (true) return statement;}
2770 statement = IfStatement();
2771 {if (true) return statement;}
2774 statement = WhileStatement();
2775 {if (true) return statement;}
2778 statement = DoStatement();
2779 {if (true) return statement;}
2782 statement = ForStatement();
2783 {if (true) return statement;}
2786 statement = ForeachStatement();
2787 {if (true) return statement;}
2790 statement = ContinueStatement();
2791 {if (true) return statement;}
2794 statement = ReturnStatement();
2795 {if (true) return statement;}
2798 statement = EchoStatement();
2799 {if (true) return statement;}
2806 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2808 token = jj_consume_token(AT);
2811 jj_la1[74] = jj_gen;
2814 statement = IncludeStatement();
2815 if (token != null) {
2816 ((InclusionStatement)statement).silent = true;
2817 statement.sourceStart = token.sourceStart;
2819 {if (true) return statement;}
2822 statement = StaticStatement();
2823 {if (true) return statement;}
2826 statement = GlobalStatement();
2827 {if (true) return statement;}
2830 statement = defineStatement();
2831 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2834 jj_la1[75] = jj_gen;
2835 jj_consume_token(-1);
2836 throw new ParseException();
2839 throw new Error("Missing return statement in function");
2843 * A statement expression.
2845 * @return an expression
2847 static final public Statement expressionStatement() throws ParseException {
2848 final Statement statement;
2850 statement = Expression();
2852 token = jj_consume_token(SEMICOLON);
2853 statement.sourceEnd = token.sourceEnd;
2854 } catch (ParseException e) {
2855 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2856 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2858 errorStart = statement.sourceEnd+1;
2859 errorEnd = statement.sourceEnd+1;
2860 processParseExceptionDebug(e);
2863 {if (true) return statement;}
2864 throw new Error("Missing return statement in function");
2867 static final public Define defineStatement() throws ParseException {
2868 Expression defineName,defineValue;
2869 final Token defineToken;
2872 defineToken = jj_consume_token(DEFINE);
2873 pos = defineToken.sourceEnd+1;
2875 token = jj_consume_token(LPAREN);
2876 pos = token.sourceEnd+1;
2877 } catch (ParseException e) {
2878 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2882 processParseExceptionDebug(e);
2885 defineName = Expression();
2886 pos = defineName.sourceEnd+1;
2887 } catch (ParseException e) {
2888 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2892 processParseExceptionDebug(e);
2893 defineName = new StringLiteral(SYNTAX_ERROR_CHAR,pos,pos);
2896 token = jj_consume_token(COMMA);
2897 pos = defineName.sourceEnd+1;
2898 } catch (ParseException e) {
2899 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2903 processParseExceptionDebug(e);
2906 defineValue = Expression();
2907 pos = defineValue.sourceEnd+1;
2908 } catch (ParseException e) {
2909 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2913 processParseExceptionDebug(e);
2914 defineValue = new StringLiteral(SYNTAX_ERROR_CHAR,pos,pos);
2917 token = jj_consume_token(RPAREN);
2918 pos = token.sourceEnd+1;
2919 } catch (ParseException e) {
2920 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2924 processParseExceptionDebug(e);
2926 {if (true) return new Define(currentSegment,
2929 defineToken.sourceStart,
2931 throw new Error("Missing return statement in function");
2935 * A Normal statement.
2937 static final public Statement Statement() throws ParseException {
2938 final Statement statement;
2939 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2971 case INTEGER_LITERAL:
2972 case FLOATING_POINT_LITERAL:
2973 case STRING_LITERAL:
2979 statement = StatementNoBreak();
2980 {if (true) return statement;}
2983 statement = BreakStatement();
2984 {if (true) return statement;}
2987 jj_la1[76] = jj_gen;
2988 jj_consume_token(-1);
2989 throw new ParseException();
2991 throw new Error("Missing return statement in function");
2995 * An html block inside a php syntax.
2997 static final public HTMLBlock htmlBlock() throws ParseException {
2998 final int startIndex = nodePtr;
2999 final AstNode[] blockNodes;
3002 phpEnd = jj_consume_token(PHPEND);
3003 htmlStart = phpEnd.sourceEnd;
3006 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3011 jj_la1[77] = jj_gen;
3017 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3019 jj_consume_token(PHPSTARTLONG);
3022 jj_consume_token(PHPSTARTSHORT);
3025 jj_la1[78] = jj_gen;
3026 jj_consume_token(-1);
3027 throw new ParseException();
3029 PHPParser.createNewHTMLCode();
3030 } catch (ParseException e) {
3031 errorMessage = "unexpected end of file , '<?php' expected";
3033 errorStart = SimpleCharStream.getPosition();
3034 errorEnd = SimpleCharStream.getPosition();
3035 {if (true) throw e;}
3037 nbNodes = nodePtr - startIndex;
3039 {if (true) return null;}
3041 blockNodes = new AstNode[nbNodes];
3042 System.arraycopy(nodes,startIndex+1,blockNodes,0,nbNodes);
3043 nodePtr = startIndex;
3044 {if (true) return new HTMLBlock(blockNodes);}
3045 throw new Error("Missing return statement in function");
3049 * An include statement. It's "include" an expression;
3051 static final public InclusionStatement IncludeStatement() throws ParseException {
3054 final InclusionStatement inclusionStatement;
3055 final Token token, token2;
3057 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3059 token = jj_consume_token(REQUIRE);
3060 keyword = InclusionStatement.REQUIRE;pos=token.sourceEnd;
3063 token = jj_consume_token(REQUIRE_ONCE);
3064 keyword = InclusionStatement.REQUIRE_ONCE;pos=token.sourceEnd;
3067 token = jj_consume_token(INCLUDE);
3068 keyword = InclusionStatement.INCLUDE;pos=token.sourceEnd;
3071 token = jj_consume_token(INCLUDE_ONCE);
3072 keyword = InclusionStatement.INCLUDE_ONCE;pos=token.sourceEnd;
3075 jj_la1[79] = jj_gen;
3076 jj_consume_token(-1);
3077 throw new ParseException();
3080 expr = Expression();
3081 pos = expr.sourceEnd;
3082 } catch (ParseException e) {
3083 if (errorMessage != null) {
3084 {if (true) throw e;}
3086 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
3088 errorStart = e.currentToken.next.sourceStart;
3089 errorEnd = e.currentToken.next.sourceEnd;
3090 expr = new ConstantIdentifier(SYNTAX_ERROR_CHAR,pos,pos);
3091 processParseExceptionDebug(e);
3094 token2 = jj_consume_token(SEMICOLON);
3095 pos=token2.sourceEnd;
3096 } catch (ParseException e) {
3097 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
3099 errorStart = e.currentToken.next.sourceStart;
3100 errorEnd = e.currentToken.next.sourceEnd;
3101 processParseExceptionDebug(e);
3103 inclusionStatement = new InclusionStatement(currentSegment,
3108 currentSegment.add(inclusionStatement);
3109 {if (true) return inclusionStatement;}
3110 throw new Error("Missing return statement in function");
3113 static final public PrintExpression PrintExpression() throws ParseException {
3114 final Expression expr;
3115 final Token printToken;
3116 token = jj_consume_token(PRINT);
3117 expr = Expression();
3118 {if (true) return new PrintExpression(expr,token.sourceStart,expr.sourceEnd);}
3119 throw new Error("Missing return statement in function");
3122 static final public ListExpression ListExpression() throws ParseException {
3123 Expression expr = null;
3124 final Expression expression;
3125 final ArrayList list = new ArrayList();
3127 final Token listToken, rParen;
3129 listToken = jj_consume_token(LIST);
3130 pos = listToken.sourceEnd;
3132 token = jj_consume_token(LPAREN);
3133 pos = token.sourceEnd;
3134 } catch (ParseException e) {
3135 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
3137 errorStart = listToken.sourceEnd+1;
3138 errorEnd = listToken.sourceEnd+1;
3139 processParseExceptionDebug(e);
3141 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3143 expr = VariableDeclaratorId();
3144 list.add(expr);pos = expr.sourceEnd;
3147 jj_la1[80] = jj_gen;
3150 if (expr == null) list.add(null);
3153 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3158 jj_la1[81] = jj_gen;
3162 token = jj_consume_token(COMMA);
3163 pos = token.sourceEnd;
3164 } catch (ParseException e) {
3165 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
3169 processParseExceptionDebug(e);
3171 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3173 expr = VariableDeclaratorId();
3174 list.add(expr);pos = expr.sourceEnd;
3177 jj_la1[82] = jj_gen;
3182 rParen = jj_consume_token(RPAREN);
3183 pos = rParen.sourceEnd;
3184 } catch (ParseException e) {
3185 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
3189 processParseExceptionDebug(e);
3191 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3193 jj_consume_token(ASSIGN);
3194 expression = Expression();
3195 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3197 {if (true) return new ListExpression(vars,
3199 listToken.sourceStart,
3200 expression.sourceEnd);}
3203 jj_la1[83] = jj_gen;
3206 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3208 {if (true) return new ListExpression(vars,listToken.sourceStart,pos);}
3209 throw new Error("Missing return statement in function");
3213 * An echo statement.
3214 * echo anyexpression (, otherexpression)*
3216 static final public EchoStatement EchoStatement() throws ParseException {
3217 final ArrayList expressions = new ArrayList();
3220 Token token2 = null;
3221 token = jj_consume_token(ECHO);
3222 expr = Expression();
3223 expressions.add(expr);
3226 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3231 jj_la1[84] = jj_gen;
3234 jj_consume_token(COMMA);
3235 expr = Expression();
3236 expressions.add(expr);
3239 token2 = jj_consume_token(SEMICOLON);
3240 } catch (ParseException e) {
3241 if (e.currentToken.next.kind != 4) {
3242 errorMessage = "';' expected after 'echo' statement";
3244 errorStart = e.currentToken.sourceEnd;
3245 errorEnd = e.currentToken.sourceEnd;
3246 processParseExceptionDebug(e);
3249 final Expression[] exprs = new Expression[expressions.size()];
3250 expressions.toArray(exprs);
3251 if (token2 == null) {
3252 {if (true) return new EchoStatement(exprs,token.sourceStart, exprs[exprs.length-1].sourceEnd);}
3254 {if (true) return new EchoStatement(exprs,token.sourceStart, token2.sourceEnd);}
3255 throw new Error("Missing return statement in function");
3258 static final public GlobalStatement GlobalStatement() throws ParseException {
3260 final ArrayList vars = new ArrayList();
3261 final GlobalStatement global;
3262 final Token token, token2;
3264 token = jj_consume_token(GLOBAL);
3266 vars.add(expr);pos = expr.sourceEnd+1;
3269 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3274 jj_la1[85] = jj_gen;
3277 jj_consume_token(COMMA);
3279 vars.add(expr);pos = expr.sourceEnd+1;
3282 token2 = jj_consume_token(SEMICOLON);
3283 pos = token2.sourceEnd+1;
3284 } catch (ParseException e) {
3285 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3289 processParseExceptionDebug(e);
3291 final Variable[] variables = new Variable[vars.size()];
3292 vars.toArray(variables);
3293 global = new GlobalStatement(currentSegment,
3297 currentSegment.add(global);
3298 {if (true) return global;}
3299 throw new Error("Missing return statement in function");
3302 static final public StaticStatement StaticStatement() throws ParseException {
3303 final ArrayList vars = new ArrayList();
3304 VariableDeclaration expr;
3305 final Token token, token2;
3307 token = jj_consume_token(STATIC);
3308 expr = VariableDeclarator();
3309 vars.add(expr);pos = expr.sourceEnd+1;
3312 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3317 jj_la1[86] = jj_gen;
3320 jj_consume_token(COMMA);
3321 expr = VariableDeclarator();
3322 vars.add(expr);pos = expr.sourceEnd+1;
3325 token2 = jj_consume_token(SEMICOLON);
3326 pos = token2.sourceEnd+1;
3327 } catch (ParseException e) {
3328 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3332 processParseException(e);
3334 final VariableDeclaration[] variables = new VariableDeclaration[vars.size()];
3335 vars.toArray(variables);
3336 {if (true) return new StaticStatement(variables,
3339 throw new Error("Missing return statement in function");
3342 static final public LabeledStatement LabeledStatement() throws ParseException {
3344 final Statement statement;
3345 label = jj_consume_token(IDENTIFIER);
3346 jj_consume_token(COLON);
3347 statement = Statement();
3348 {if (true) return new LabeledStatement(label.image,statement,label.sourceStart,statement.sourceEnd);}
3349 throw new Error("Missing return statement in function");
3359 static final public Block Block() throws ParseException {
3360 final ArrayList list = new ArrayList();
3361 Statement statement;
3362 final Token token, token2;
3365 token = jj_consume_token(LBRACE);
3366 pos = token.sourceEnd+1;start=token.sourceStart;
3367 } catch (ParseException e) {
3368 errorMessage = "'{' expected";
3370 pos = PHPParser.token.sourceEnd+1;
3374 processParseExceptionDebug(e);
3378 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3414 case INTEGER_LITERAL:
3415 case FLOATING_POINT_LITERAL:
3416 case STRING_LITERAL:
3425 jj_la1[87] = jj_gen;
3428 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3463 case INTEGER_LITERAL:
3464 case FLOATING_POINT_LITERAL:
3465 case STRING_LITERAL:
3471 statement = BlockStatement();
3472 list.add(statement);pos = statement.sourceEnd+1;
3475 statement = htmlBlock();
3476 if (statement != null) {
3477 list.add(statement);
3478 pos = statement.sourceEnd+1;
3480 pos = PHPParser.token.sourceEnd+1;
3483 jj_la1[88] = jj_gen;
3484 jj_consume_token(-1);
3485 throw new ParseException();
3489 token2 = jj_consume_token(RBRACE);
3490 pos = token2.sourceEnd+1;
3491 } catch (ParseException e) {
3492 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3496 processParseExceptionDebug(e);
3498 final Statement[] statements = new Statement[list.size()];
3499 list.toArray(statements);
3500 {if (true) return new Block(statements,start,pos);}
3501 throw new Error("Missing return statement in function");
3504 static final public Statement BlockStatement() throws ParseException {
3505 final Statement statement;
3506 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3539 case INTEGER_LITERAL:
3540 case FLOATING_POINT_LITERAL:
3541 case STRING_LITERAL:
3548 statement = Statement();
3549 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3550 {if (true) return statement;}
3551 } catch (ParseException e) {
3552 errorMessage = "unexpected token : '"+ e.currentToken.image +"', a statement was expected";
3554 errorStart = e.currentToken.sourceStart;
3555 errorEnd = e.currentToken.sourceEnd;
3556 {if (true) throw e;}
3560 statement = ClassDeclaration();
3561 {if (true) return statement;}
3564 statement = MethodDeclaration();
3565 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3566 currentSegment.add((MethodDeclaration) statement);
3567 ((MethodDeclaration) statement).analyzeCode();
3568 {if (true) return statement;}
3571 jj_la1[89] = jj_gen;
3572 jj_consume_token(-1);
3573 throw new ParseException();
3575 throw new Error("Missing return statement in function");
3579 * A Block statement that will not contain any 'break'
3581 static final public Statement BlockStatementNoBreak() throws ParseException {
3582 final Statement statement;
3583 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3615 case INTEGER_LITERAL:
3616 case FLOATING_POINT_LITERAL:
3617 case STRING_LITERAL:
3623 statement = StatementNoBreak();
3624 {if (true) return statement;}
3627 statement = ClassDeclaration();
3628 {if (true) return statement;}
3631 statement = MethodDeclaration();
3632 currentSegment.add((MethodDeclaration) statement);
3633 ((MethodDeclaration) statement).analyzeCode();
3634 {if (true) return statement;}
3637 jj_la1[90] = jj_gen;
3638 jj_consume_token(-1);
3639 throw new ParseException();
3641 throw new Error("Missing return statement in function");
3645 * used only by ForInit()
3647 static final public Expression[] LocalVariableDeclaration() throws ParseException {
3648 final ArrayList list = new ArrayList();
3654 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3659 jj_la1[91] = jj_gen;
3662 jj_consume_token(COMMA);
3666 final Expression[] vars = new Expression[list.size()];
3668 {if (true) return vars;}
3669 throw new Error("Missing return statement in function");
3673 * used only by LocalVariableDeclaration().
3675 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3676 final Variable varName;
3677 Expression initializer = null;
3678 varName = Variable();
3679 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3681 jj_consume_token(ASSIGN);
3682 initializer = Expression();
3685 jj_la1[92] = jj_gen;
3688 if (initializer == null) {
3689 {if (true) return new VariableDeclaration(currentSegment,
3691 varName.sourceStart,
3692 varName.sourceEnd);}
3694 {if (true) return new VariableDeclaration(currentSegment,
3697 VariableDeclaration.EQUAL,
3698 varName.sourceStart);}
3699 throw new Error("Missing return statement in function");
3702 static final public EmptyStatement EmptyStatement() throws ParseException {
3704 token = jj_consume_token(SEMICOLON);
3705 {if (true) return new EmptyStatement(token.sourceStart,token.sourceEnd);}
3706 throw new Error("Missing return statement in function");
3710 * used only by StatementExpressionList() which is used only by ForInit() and ForStatement()
3712 static final public Expression StatementExpression() throws ParseException {
3713 final Expression expr;
3714 final Token operator;
3715 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3718 expr = PreIncDecExpression();
3719 {if (true) return expr;}
3726 expr = PrimaryExpression();
3727 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3730 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3732 operator = jj_consume_token(PLUS_PLUS);
3733 {if (true) return new PostfixedUnaryExpression(expr,
3734 OperatorIds.PLUS_PLUS,
3735 operator.sourceEnd);}
3738 operator = jj_consume_token(MINUS_MINUS);
3739 {if (true) return new PostfixedUnaryExpression(expr,
3740 OperatorIds.MINUS_MINUS,
3741 operator.sourceEnd);}
3744 jj_la1[93] = jj_gen;
3745 jj_consume_token(-1);
3746 throw new ParseException();
3750 jj_la1[94] = jj_gen;
3753 {if (true) return expr;}
3756 jj_la1[95] = jj_gen;
3757 jj_consume_token(-1);
3758 throw new ParseException();
3760 throw new Error("Missing return statement in function");
3763 static final public SwitchStatement SwitchStatement() throws ParseException {
3764 Expression variable;
3765 final AbstractCase[] cases;
3766 final Token switchToken,lparenToken,rparenToken;
3768 switchToken = jj_consume_token(SWITCH);
3769 pos = switchToken.sourceEnd+1;
3771 lparenToken = jj_consume_token(LPAREN);
3772 pos = lparenToken.sourceEnd+1;
3773 } catch (ParseException e) {
3774 errorMessage = "'(' expected after 'switch'";
3778 processParseExceptionDebug(e);
3781 variable = Expression();
3782 pos = variable.sourceEnd+1;
3783 } catch (ParseException e) {
3784 if (errorMessage != null) {
3785 {if (true) throw e;}
3787 errorMessage = "expression expected";
3791 processParseExceptionDebug(e);
3792 variable = new ConstantIdentifier(SYNTAX_ERROR_CHAR,pos,pos);
3795 rparenToken = jj_consume_token(RPAREN);
3796 pos = rparenToken.sourceEnd+1;
3797 } catch (ParseException e) {
3798 errorMessage = "')' expected";
3802 processParseExceptionDebug(e);
3804 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3806 cases = switchStatementBrace();
3809 cases = switchStatementColon(switchToken.sourceStart, switchToken.sourceEnd);
3812 jj_la1[96] = jj_gen;
3813 jj_consume_token(-1);
3814 throw new ParseException();
3816 {if (true) return new SwitchStatement(variable,
3818 switchToken.sourceStart,
3819 PHPParser.token.sourceEnd);}
3820 throw new Error("Missing return statement in function");
3823 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3825 final ArrayList cases = new ArrayList();
3828 token = jj_consume_token(LBRACE);
3829 pos = token.sourceEnd;
3832 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3838 jj_la1[97] = jj_gen;
3841 cas = switchLabel0();
3842 cases.add(cas);pos = cas.sourceEnd;
3845 token = jj_consume_token(RBRACE);
3846 pos = token.sourceEnd;
3847 } catch (ParseException e) {
3848 errorMessage = "'}' expected";
3852 processParseExceptionDebug(e);
3854 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3855 cases.toArray(abcase);
3856 {if (true) return abcase;}
3857 throw new Error("Missing return statement in function");
3861 * A Switch statement with : ... endswitch;
3862 * @param start the begin offset of the switch
3863 * @param end the end offset of the switch
3865 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3867 final ArrayList cases = new ArrayList();
3870 token = jj_consume_token(COLON);
3871 pos = token.sourceEnd;
3873 setMarker(fileToParse,
3874 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3878 "Line " + token.beginLine);
3879 } catch (CoreException e) {
3880 PHPeclipsePlugin.log(e);
3884 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3890 jj_la1[98] = jj_gen;
3893 cas = switchLabel0();
3894 cases.add(cas);pos = cas.sourceEnd;
3897 token = jj_consume_token(ENDSWITCH);
3898 pos = token.sourceEnd;
3899 } catch (ParseException e) {
3900 errorMessage = "'endswitch' expected";
3904 processParseExceptionDebug(e);
3907 token = jj_consume_token(SEMICOLON);
3908 pos = token.sourceEnd;
3909 } catch (ParseException e) {
3910 errorMessage = "';' expected after 'endswitch' keyword";
3914 processParseExceptionDebug(e);
3916 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3917 cases.toArray(abcase);
3918 {if (true) return abcase;}
3919 throw new Error("Missing return statement in function");
3922 static final public AbstractCase switchLabel0() throws ParseException {
3923 final Expression expr;
3924 Statement statement;
3925 final ArrayList stmts = new ArrayList();
3926 final Token token = PHPParser.token;
3927 expr = SwitchLabel();
3930 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3966 case INTEGER_LITERAL:
3967 case FLOATING_POINT_LITERAL:
3968 case STRING_LITERAL:
3977 jj_la1[99] = jj_gen;
3980 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4014 case INTEGER_LITERAL:
4015 case FLOATING_POINT_LITERAL:
4016 case STRING_LITERAL:
4022 statement = BlockStatementNoBreak();
4023 stmts.add(statement);
4026 statement = htmlBlock();
4027 if (statement != null) {stmts.add(statement);}
4030 statement = BreakStatement();
4031 stmts.add(statement);
4034 jj_la1[100] = jj_gen;
4035 jj_consume_token(-1);
4036 throw new ParseException();
4039 final int listSize = stmts.size();
4040 final Statement[] stmtsArray = new Statement[listSize];
4041 stmts.toArray(stmtsArray);
4042 if (expr == null) {//it's a default
4043 {if (true) return new DefaultCase(stmtsArray,token.sourceStart,stmtsArray[listSize-1].sourceEnd);}
4045 if (listSize != 0) {
4046 {if (true) return new Case(expr,stmtsArray,expr.sourceStart,stmtsArray[listSize-1].sourceEnd);}
4048 {if (true) return new Case(expr,stmtsArray,expr.sourceStart,expr.sourceEnd);}
4050 throw new Error("Missing return statement in function");
4055 * case Expression() :
4057 * @return the if it was a case and null if not
4059 static final public Expression SwitchLabel() throws ParseException {
4060 final Expression expr;
4061 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4063 token = jj_consume_token(CASE);
4065 expr = Expression();
4066 } catch (ParseException e) {
4067 if (errorMessage != null) {if (true) throw e;}
4068 errorMessage = "expression expected after 'case' keyword";
4070 errorStart = token.sourceEnd +1;
4071 errorEnd = token.sourceEnd +1;
4072 {if (true) throw e;}
4075 token = jj_consume_token(COLON);
4076 {if (true) return expr;}
4077 } catch (ParseException e) {
4078 errorMessage = "':' expected after case expression";
4080 errorStart = expr.sourceEnd+1;
4081 errorEnd = expr.sourceEnd+1;
4082 processParseExceptionDebug(e);
4086 token = jj_consume_token(_DEFAULT);
4088 jj_consume_token(COLON);
4089 {if (true) return null;}
4090 } catch (ParseException e) {
4091 errorMessage = "':' expected after 'default' keyword";
4093 errorStart = token.sourceEnd+1;
4094 errorEnd = token.sourceEnd+1;
4095 processParseExceptionDebug(e);
4099 jj_la1[101] = jj_gen;
4100 jj_consume_token(-1);
4101 throw new ParseException();
4103 throw new Error("Missing return statement in function");
4106 static final public Break BreakStatement() throws ParseException {
4107 Expression expression = null;
4108 final Token token, token2;
4110 token = jj_consume_token(BREAK);
4111 pos = token.sourceEnd+1;
4112 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4128 case INTEGER_LITERAL:
4129 case FLOATING_POINT_LITERAL:
4130 case STRING_LITERAL:
4134 expression = Expression();
4135 pos = expression.sourceEnd+1;
4138 jj_la1[102] = jj_gen;
4142 token2 = jj_consume_token(SEMICOLON);
4143 pos = token2.sourceEnd;
4144 } catch (ParseException e) {
4145 errorMessage = "';' expected after 'break' keyword";
4149 processParseExceptionDebug(e);
4151 {if (true) return new Break(expression, token.sourceStart, pos);}
4152 throw new Error("Missing return statement in function");
4155 static final public IfStatement IfStatement() throws ParseException {
4156 final Expression condition;
4157 final IfStatement ifStatement;
4159 token = jj_consume_token(IF);
4160 condition = Condition("if");
4161 ifStatement = IfStatement0(condition,token.sourceStart,token.sourceEnd);
4162 {if (true) return ifStatement;}
4163 throw new Error("Missing return statement in function");
4166 static final public Expression Condition(final String keyword) throws ParseException {
4167 final Expression condition;
4169 jj_consume_token(LPAREN);
4170 } catch (ParseException e) {
4171 errorMessage = "'(' expected after " + keyword + " keyword";
4173 errorStart = PHPParser.token.sourceEnd + 1;
4174 errorEnd = PHPParser.token.sourceEnd + 1;
4175 processParseExceptionDebug(e);
4177 condition = Expression();
4179 jj_consume_token(RPAREN);
4180 } catch (ParseException e) {
4181 errorMessage = "')' expected after " + keyword + " keyword";
4183 errorStart = condition.sourceEnd+1;
4184 errorEnd = condition.sourceEnd+1;
4185 processParseExceptionDebug(e);
4187 {if (true) return condition;}
4188 throw new Error("Missing return statement in function");
4191 static final public IfStatement IfStatement0(final Expression condition, final int start,final int end) throws ParseException {
4192 Statement statement;
4193 final Statement stmt;
4194 final Statement[] statementsArray;
4195 ElseIf elseifStatement;
4196 Else elseStatement = null;
4197 final ArrayList stmts;
4198 final ArrayList elseIfList = new ArrayList();
4199 final ElseIf[] elseIfs;
4200 int pos = SimpleCharStream.getPosition();
4201 final int endStatements;
4202 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4204 jj_consume_token(COLON);
4205 stmts = new ArrayList();
4208 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4242 case INTEGER_LITERAL:
4243 case FLOATING_POINT_LITERAL:
4244 case STRING_LITERAL:
4253 jj_la1[103] = jj_gen;
4256 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4289 case INTEGER_LITERAL:
4290 case FLOATING_POINT_LITERAL:
4291 case STRING_LITERAL:
4297 statement = Statement();
4298 stmts.add(statement);
4301 statement = htmlBlock();
4302 if (statement != null) {stmts.add(statement);}
4305 jj_la1[104] = jj_gen;
4306 jj_consume_token(-1);
4307 throw new ParseException();
4310 endStatements = SimpleCharStream.getPosition();
4313 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4318 jj_la1[105] = jj_gen;
4321 elseifStatement = ElseIfStatementColon();
4322 elseIfList.add(elseifStatement);
4324 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4326 elseStatement = ElseStatementColon();
4329 jj_la1[106] = jj_gen;
4333 setMarker(fileToParse,
4334 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4338 "Line " + token.beginLine);
4339 } catch (CoreException e) {
4340 PHPeclipsePlugin.log(e);
4343 jj_consume_token(ENDIF);
4344 } catch (ParseException e) {
4345 errorMessage = "'endif' expected";
4347 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4348 errorEnd = SimpleCharStream.getPosition() + 1;
4349 {if (true) throw e;}
4352 jj_consume_token(SEMICOLON);
4353 } catch (ParseException e) {
4354 errorMessage = "';' expected after 'endif' keyword";
4356 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4357 errorEnd = SimpleCharStream.getPosition() + 1;
4358 {if (true) throw e;}
4360 elseIfs = new ElseIf[elseIfList.size()];
4361 elseIfList.toArray(elseIfs);
4362 if (stmts.size() == 1) {
4363 {if (true) return new IfStatement(condition,
4364 (Statement) stmts.get(0),
4368 SimpleCharStream.getPosition());}
4370 statementsArray = new Statement[stmts.size()];
4371 stmts.toArray(statementsArray);
4372 {if (true) return new IfStatement(condition,
4373 new Block(statementsArray,pos,endStatements),
4377 SimpleCharStream.getPosition());}
4413 case INTEGER_LITERAL:
4414 case FLOATING_POINT_LITERAL:
4415 case STRING_LITERAL:
4421 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4454 case INTEGER_LITERAL:
4455 case FLOATING_POINT_LITERAL:
4456 case STRING_LITERAL:
4468 jj_la1[107] = jj_gen;
4469 jj_consume_token(-1);
4470 throw new ParseException();
4474 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4479 jj_la1[108] = jj_gen;
4482 elseifStatement = ElseIfStatement();
4483 elseIfList.add(elseifStatement);
4485 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4487 jj_consume_token(ELSE);
4489 pos = SimpleCharStream.getPosition();
4490 statement = Statement();
4491 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4492 } catch (ParseException e) {
4493 if (errorMessage != null) {
4494 {if (true) throw e;}
4496 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4498 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4499 errorEnd = SimpleCharStream.getPosition() + 1;
4500 {if (true) throw e;}
4504 jj_la1[109] = jj_gen;
4507 elseIfs = new ElseIf[elseIfList.size()];
4508 elseIfList.toArray(elseIfs);
4509 {if (true) return new IfStatement(condition,
4514 SimpleCharStream.getPosition());}
4517 jj_la1[110] = jj_gen;
4518 jj_consume_token(-1);
4519 throw new ParseException();
4521 throw new Error("Missing return statement in function");
4524 static final public ElseIf ElseIfStatementColon() throws ParseException {
4525 final Expression condition;
4526 Statement statement;
4527 final ArrayList list = new ArrayList();
4528 final Token elseifToken;
4529 elseifToken = jj_consume_token(ELSEIF);
4530 condition = Condition("elseif");
4531 jj_consume_token(COLON);
4534 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4568 case INTEGER_LITERAL:
4569 case FLOATING_POINT_LITERAL:
4570 case STRING_LITERAL:
4579 jj_la1[111] = jj_gen;
4582 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4615 case INTEGER_LITERAL:
4616 case FLOATING_POINT_LITERAL:
4617 case STRING_LITERAL:
4623 statement = Statement();
4624 list.add(statement);
4627 statement = htmlBlock();
4628 if (statement != null) {list.add(statement);}
4631 jj_la1[112] = jj_gen;
4632 jj_consume_token(-1);
4633 throw new ParseException();
4636 final int sizeList = list.size();
4637 final Statement[] stmtsArray = new Statement[sizeList];
4638 list.toArray(stmtsArray);
4639 {if (true) return new ElseIf(condition,stmtsArray ,
4640 elseifToken.sourceStart,
4641 stmtsArray[sizeList-1].sourceEnd);}
4642 throw new Error("Missing return statement in function");
4645 static final public Else ElseStatementColon() throws ParseException {
4646 Statement statement;
4647 final ArrayList list = new ArrayList();
4648 final Token elseToken;
4649 elseToken = jj_consume_token(ELSE);
4650 jj_consume_token(COLON);
4653 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4687 case INTEGER_LITERAL:
4688 case FLOATING_POINT_LITERAL:
4689 case STRING_LITERAL:
4698 jj_la1[113] = jj_gen;
4701 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4734 case INTEGER_LITERAL:
4735 case FLOATING_POINT_LITERAL:
4736 case STRING_LITERAL:
4742 statement = Statement();
4743 list.add(statement);
4746 statement = htmlBlock();
4747 if (statement != null) {list.add(statement);}
4750 jj_la1[114] = jj_gen;
4751 jj_consume_token(-1);
4752 throw new ParseException();
4755 final int sizeList = list.size();
4756 final Statement[] stmtsArray = new Statement[sizeList];
4757 list.toArray(stmtsArray);
4758 {if (true) return new Else(stmtsArray,elseToken.sourceStart,stmtsArray[sizeList-1].sourceEnd);}
4759 throw new Error("Missing return statement in function");
4762 static final public ElseIf ElseIfStatement() throws ParseException {
4763 final Expression condition;
4764 //final Statement statement;
4765 final Token elseifToken;
4766 final Statement[] statement = new Statement[1];
4767 elseifToken = jj_consume_token(ELSEIF);
4768 condition = Condition("elseif");
4769 statement[0] = Statement();
4770 {if (true) return new ElseIf(condition,statement,elseifToken.sourceStart,statement[0].sourceEnd);}
4771 throw new Error("Missing return statement in function");
4774 static final public WhileStatement WhileStatement() throws ParseException {
4775 final Expression condition;
4776 final Statement action;
4777 final Token whileToken;
4778 whileToken = jj_consume_token(WHILE);
4779 condition = Condition("while");
4780 action = WhileStatement0(whileToken.sourceStart,whileToken.sourceEnd);
4781 {if (true) return new WhileStatement(condition,action,whileToken.sourceStart,action.sourceEnd);}
4782 throw new Error("Missing return statement in function");
4785 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4786 Statement statement;
4787 final ArrayList stmts = new ArrayList();
4788 final int pos = SimpleCharStream.getPosition();
4789 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4791 jj_consume_token(COLON);
4794 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4827 case INTEGER_LITERAL:
4828 case FLOATING_POINT_LITERAL:
4829 case STRING_LITERAL:
4838 jj_la1[115] = jj_gen;
4841 statement = Statement();
4842 stmts.add(statement);
4845 setMarker(fileToParse,
4846 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4850 "Line " + token.beginLine);
4851 } catch (CoreException e) {
4852 PHPeclipsePlugin.log(e);
4855 jj_consume_token(ENDWHILE);
4856 } catch (ParseException e) {
4857 errorMessage = "'endwhile' expected";
4859 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4860 errorEnd = SimpleCharStream.getPosition() + 1;
4861 {if (true) throw e;}
4864 jj_consume_token(SEMICOLON);
4865 final Statement[] stmtsArray = new Statement[stmts.size()];
4866 stmts.toArray(stmtsArray);
4867 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4868 } catch (ParseException e) {
4869 errorMessage = "';' expected after 'endwhile' keyword";
4871 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4872 errorEnd = SimpleCharStream.getPosition() + 1;
4873 {if (true) throw e;}
4908 case INTEGER_LITERAL:
4909 case FLOATING_POINT_LITERAL:
4910 case STRING_LITERAL:
4916 statement = Statement();
4917 {if (true) return statement;}
4920 jj_la1[116] = jj_gen;
4921 jj_consume_token(-1);
4922 throw new ParseException();
4924 throw new Error("Missing return statement in function");
4927 static final public DoStatement DoStatement() throws ParseException {
4928 final Statement action;
4929 final Expression condition;
4931 Token token2 = null;
4932 token = jj_consume_token(DO);
4933 action = Statement();
4934 jj_consume_token(WHILE);
4935 condition = Condition("while");
4937 token2 = jj_consume_token(SEMICOLON);
4938 } catch (ParseException e) {
4939 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4941 errorStart = condition.sourceEnd+1;
4942 errorEnd = condition.sourceEnd+1;
4943 processParseExceptionDebug(e);
4945 if (token2 == null) {
4946 {if (true) return new DoStatement(condition,action,token.sourceStart,condition.sourceEnd);}
4948 {if (true) return new DoStatement(condition,action,token.sourceStart,token2.sourceEnd);}
4949 throw new Error("Missing return statement in function");
4952 static final public ForeachStatement ForeachStatement() throws ParseException {
4953 Statement statement = null;
4954 Expression expression = null;
4955 ArrayVariableDeclaration variable = null;
4957 Token lparenToken = null;
4958 Token asToken = null;
4959 Token rparenToken = null;
4961 foreachToken = jj_consume_token(FOREACH);
4963 lparenToken = jj_consume_token(LPAREN);
4964 pos = lparenToken.sourceEnd+1;
4965 } catch (ParseException e) {
4966 errorMessage = "'(' expected after 'foreach' keyword";
4968 errorStart = foreachToken.sourceEnd+1;
4969 errorEnd = foreachToken.sourceEnd+1;
4970 processParseExceptionDebug(e);
4971 {pos = foreachToken.sourceEnd+1;}
4974 expression = Expression();
4975 pos = expression.sourceEnd+1;
4976 } catch (ParseException e) {
4977 errorMessage = "variable expected";
4981 processParseExceptionDebug(e);
4984 asToken = jj_consume_token(AS);
4985 pos = asToken.sourceEnd+1;
4986 } catch (ParseException e) {
4987 errorMessage = "'as' expected";
4991 processParseExceptionDebug(e);
4994 variable = ArrayVariable();
4995 pos = variable.sourceEnd+1;
4996 } catch (ParseException e) {
4997 if (errorMessage != null) {if (true) throw e;}
4998 errorMessage = "variable expected";
5002 processParseExceptionDebug(e);
5005 rparenToken = jj_consume_token(RPAREN);
5006 pos = rparenToken.sourceEnd+1;
5007 } catch (ParseException e) {
5008 errorMessage = "')' expected after 'foreach' keyword";
5012 processParseExceptionDebug(e);
5015 statement = Statement();
5016 pos = rparenToken.sourceEnd+1;
5017 } catch (ParseException e) {
5018 if (errorMessage != null) {if (true) throw e;}
5019 errorMessage = "statement expected";
5023 processParseExceptionDebug(e);
5025 {if (true) return new ForeachStatement(expression,
5028 foreachToken.sourceStart,
5029 statement.sourceEnd);}
5030 throw new Error("Missing return statement in function");
5034 * a for declaration.
5035 * @return a node representing the for statement
5037 static final public ForStatement ForStatement() throws ParseException {
5038 final Token token,tokenEndFor,token2,tokenColon;
5040 Expression[] initializations = null;
5041 Expression condition = null;
5042 Expression[] increments = null;
5044 final ArrayList list = new ArrayList();
5045 token = jj_consume_token(FOR);
5047 jj_consume_token(LPAREN);
5048 } catch (ParseException e) {
5049 errorMessage = "'(' expected after 'for' keyword";
5051 errorStart = token.sourceEnd;
5052 errorEnd = token.sourceEnd +1;
5053 processParseExceptionDebug(e);
5055 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5071 case INTEGER_LITERAL:
5072 case FLOATING_POINT_LITERAL:
5073 case STRING_LITERAL:
5077 initializations = ForInit();
5080 jj_la1[117] = jj_gen;
5083 jj_consume_token(SEMICOLON);
5084 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5100 case INTEGER_LITERAL:
5101 case FLOATING_POINT_LITERAL:
5102 case STRING_LITERAL:
5106 condition = Expression();
5109 jj_la1[118] = jj_gen;
5112 jj_consume_token(SEMICOLON);
5113 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5129 case INTEGER_LITERAL:
5130 case FLOATING_POINT_LITERAL:
5131 case STRING_LITERAL:
5135 increments = StatementExpressionList();
5138 jj_la1[119] = jj_gen;
5141 jj_consume_token(RPAREN);
5142 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5175 case INTEGER_LITERAL:
5176 case FLOATING_POINT_LITERAL:
5177 case STRING_LITERAL:
5183 action = Statement();
5184 {if (true) return new ForStatement(initializations,
5192 tokenColon = jj_consume_token(COLON);
5193 pos = tokenColon.sourceEnd+1;
5196 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5229 case INTEGER_LITERAL:
5230 case FLOATING_POINT_LITERAL:
5231 case STRING_LITERAL:
5240 jj_la1[120] = jj_gen;
5243 action = Statement();
5244 list.add(action);pos = action.sourceEnd+1;
5247 setMarker(fileToParse,
5248 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
5252 "Line " + token.beginLine);
5253 } catch (CoreException e) {
5254 PHPeclipsePlugin.log(e);
5257 tokenEndFor = jj_consume_token(ENDFOR);
5258 pos = tokenEndFor.sourceEnd+1;
5259 } catch (ParseException e) {
5260 errorMessage = "'endfor' expected";
5264 processParseExceptionDebug(e);
5267 token2 = jj_consume_token(SEMICOLON);
5268 pos = token2.sourceEnd+1;
5269 } catch (ParseException e) {
5270 errorMessage = "';' expected after 'endfor' keyword";
5274 processParseExceptionDebug(e);
5276 final Statement[] stmtsArray = new Statement[list.size()];
5277 list.toArray(stmtsArray);
5278 {if (true) return new ForStatement(initializations,
5281 new Block(stmtsArray,
5282 stmtsArray[0].sourceStart,
5283 stmtsArray[stmtsArray.length-1].sourceEnd),
5288 jj_la1[121] = jj_gen;
5289 jj_consume_token(-1);
5290 throw new ParseException();
5292 throw new Error("Missing return statement in function");
5295 static final public Expression[] ForInit() throws ParseException {
5296 final Expression[] exprs;
5297 if (jj_2_5(2147483647)) {
5298 exprs = LocalVariableDeclaration();
5299 {if (true) return exprs;}
5301 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5317 case INTEGER_LITERAL:
5318 case FLOATING_POINT_LITERAL:
5319 case STRING_LITERAL:
5323 exprs = StatementExpressionList();
5324 {if (true) return exprs;}
5327 jj_la1[122] = jj_gen;
5328 jj_consume_token(-1);
5329 throw new ParseException();
5332 throw new Error("Missing return statement in function");
5335 static final public Expression[] StatementExpressionList() throws ParseException {
5336 final ArrayList list = new ArrayList();
5337 final Expression expr;
5338 expr = Expression();
5342 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5347 jj_la1[123] = jj_gen;
5350 jj_consume_token(COMMA);
5354 final Expression[] exprsArray = new Expression[list.size()];
5355 list.toArray(exprsArray);
5356 {if (true) return exprsArray;}
5357 throw new Error("Missing return statement in function");
5360 static final public Continue ContinueStatement() throws ParseException {
5361 Expression expr = null;
5363 Token token2 = null;
5364 token = jj_consume_token(CONTINUE);
5365 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5381 case INTEGER_LITERAL:
5382 case FLOATING_POINT_LITERAL:
5383 case STRING_LITERAL:
5387 expr = Expression();
5390 jj_la1[124] = jj_gen;
5394 token2 = jj_consume_token(SEMICOLON);
5395 } catch (ParseException e) {
5396 errorMessage = "';' expected after 'continue' statement";
5399 errorStart = token.sourceEnd+1;
5400 errorEnd = token.sourceEnd+1;
5402 errorStart = expr.sourceEnd+1;
5403 errorEnd = expr.sourceEnd+1;
5405 processParseExceptionDebug(e);
5407 if (token2 == null) {
5409 {if (true) return new Continue(expr,token.sourceStart,token.sourceEnd);}
5411 {if (true) return new Continue(expr,token.sourceStart,expr.sourceEnd);}
5413 {if (true) return new Continue(expr,token.sourceStart,token2.sourceEnd);}
5414 throw new Error("Missing return statement in function");
5417 static final public ReturnStatement ReturnStatement() throws ParseException {
5418 Expression expr = null;
5420 Token token2 = null;
5421 token = jj_consume_token(RETURN);
5422 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5438 case INTEGER_LITERAL:
5439 case FLOATING_POINT_LITERAL:
5440 case STRING_LITERAL:
5444 expr = Expression();
5447 jj_la1[125] = jj_gen;
5451 token2 = jj_consume_token(SEMICOLON);
5452 } catch (ParseException e) {
5453 errorMessage = "';' expected after 'return' statement";
5456 errorStart = token.sourceEnd+1;
5457 errorEnd = token.sourceEnd+1;
5459 errorStart = expr.sourceEnd+1;
5460 errorEnd = expr.sourceEnd+1;
5462 processParseExceptionDebug(e);
5464 if (token2 == null) {
5466 {if (true) return new ReturnStatement(expr,token.sourceStart,token.sourceEnd);}
5468 {if (true) return new ReturnStatement(expr,token.sourceStart,expr.sourceEnd);}
5470 {if (true) return new ReturnStatement(expr,token.sourceStart,token2.sourceEnd);}
5471 throw new Error("Missing return statement in function");
5474 static final private boolean jj_2_1(int xla) {
5475 jj_la = xla; jj_lastpos = jj_scanpos = token;
5476 boolean retval = !jj_3_1();
5481 static final private boolean jj_2_2(int xla) {
5482 jj_la = xla; jj_lastpos = jj_scanpos = token;
5483 boolean retval = !jj_3_2();
5488 static final private boolean jj_2_3(int xla) {
5489 jj_la = xla; jj_lastpos = jj_scanpos = token;
5490 boolean retval = !jj_3_3();
5495 static final private boolean jj_2_4(int xla) {
5496 jj_la = xla; jj_lastpos = jj_scanpos = token;
5497 boolean retval = !jj_3_4();
5502 static final private boolean jj_2_5(int xla) {
5503 jj_la = xla; jj_lastpos = jj_scanpos = token;
5504 boolean retval = !jj_3_5();
5509 static final private boolean jj_3R_136() {
5510 if (jj_scan_token(LE)) return true;
5511 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5515 static final private boolean jj_3R_135() {
5516 if (jj_scan_token(GT)) return true;
5517 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5521 static final private boolean jj_3R_134() {
5522 if (jj_scan_token(LT)) return true;
5523 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5527 static final private boolean jj_3R_123() {
5536 if (jj_3R_137()) return true;
5537 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5538 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5539 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5540 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5541 if (jj_3R_122()) return true;
5542 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5546 static final private boolean jj_3R_119() {
5547 if (jj_3R_122()) return true;
5548 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5552 if (jj_3R_123()) { jj_scanpos = xsp; break; }
5553 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5558 static final private boolean jj_3R_71() {
5559 if (jj_3R_49()) return true;
5560 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5564 static final private boolean jj_3R_70() {
5565 if (jj_3R_48()) return true;
5566 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5570 static final private boolean jj_3R_55() {
5575 if (jj_3R_71()) return true;
5576 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5577 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5581 static final private boolean jj_3R_47() {
5582 if (jj_scan_token(LBRACE)) return true;
5583 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5586 if (jj_3R_55()) jj_scanpos = xsp;
5587 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5588 if (jj_scan_token(RBRACE)) return true;
5589 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5593 static final private boolean jj_3R_202() {
5594 if (jj_scan_token(COMMA)) return true;
5595 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5599 static final private boolean jj_3_2() {
5600 if (jj_scan_token(COMMA)) return true;
5601 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5602 if (jj_3R_40()) return true;
5603 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5607 static final private boolean jj_3R_69() {
5608 if (jj_3R_49()) return true;
5609 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5613 static final private boolean jj_3R_54() {
5618 if (jj_3R_69()) return true;
5619 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5620 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5624 static final private boolean jj_3R_68() {
5625 if (jj_3R_48()) return true;
5626 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5630 static final private boolean jj_3R_112() {
5631 if (jj_scan_token(ASSIGN)) return true;
5632 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5633 if (jj_3R_48()) return true;
5634 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5638 static final private boolean jj_3R_201() {
5639 if (jj_3R_40()) return true;
5640 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5644 if (jj_3_2()) { jj_scanpos = xsp; break; }
5645 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5650 static final private boolean jj_3R_46() {
5651 if (jj_scan_token(LBRACKET)) return true;
5652 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5655 if (jj_3R_54()) jj_scanpos = xsp;
5656 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5657 if (jj_scan_token(RBRACKET)) return true;
5658 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5662 static final private boolean jj_3R_128() {
5663 if (jj_scan_token(TRIPLEEQUAL)) return true;
5664 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5668 static final private boolean jj_3R_127() {
5669 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5670 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5674 static final private boolean jj_3R_126() {
5675 if (jj_scan_token(NOT_EQUAL)) return true;
5676 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5680 static final private boolean jj_3R_195() {
5681 if (jj_scan_token(LPAREN)) return true;
5682 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5685 if (jj_3R_201()) jj_scanpos = xsp;
5686 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5688 if (jj_3R_202()) jj_scanpos = xsp;
5689 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5690 if (jj_scan_token(RPAREN)) return true;
5691 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5695 static final private boolean jj_3R_125() {
5696 if (jj_scan_token(DIF)) return true;
5697 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5701 static final private boolean jj_3R_124() {
5702 if (jj_scan_token(EQUAL_EQUAL)) return true;
5703 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5707 static final private boolean jj_3R_53() {
5708 if (jj_3R_67()) return true;
5709 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5713 static final private boolean jj_3R_116() {
5714 if (jj_3R_115()) return true;
5715 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5719 static final private boolean jj_3R_120() {
5730 if (jj_3R_128()) return true;
5731 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5732 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5733 } else 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;
5736 if (jj_3R_119()) return true;
5737 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5741 static final private boolean jj_3R_52() {
5742 if (jj_scan_token(IDENTIFIER)) return true;
5743 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5747 static final private boolean jj_3R_117() {
5748 if (jj_3R_119()) return true;
5749 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5753 if (jj_3R_120()) { jj_scanpos = xsp; break; }
5754 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5759 static final private boolean jj_3R_208() {
5760 if (jj_scan_token(ARRAYASSIGN)) return true;
5761 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5762 if (jj_3R_48()) return true;
5763 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5767 static final private boolean jj_3R_111() {
5768 if (jj_scan_token(COMMA)) return true;
5769 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5772 if (jj_3R_116()) jj_scanpos = xsp;
5773 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5777 static final private boolean jj_3R_40() {
5778 if (jj_3R_48()) return true;
5779 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5782 if (jj_3R_208()) jj_scanpos = xsp;
5783 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5787 static final private boolean jj_3R_51() {
5788 if (jj_scan_token(LBRACE)) return true;
5789 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5790 if (jj_3R_48()) return true;
5791 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5792 if (jj_scan_token(RBRACE)) return true;
5793 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5797 static final private boolean jj_3R_110() {
5798 if (jj_3R_115()) return true;
5799 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5803 static final private boolean jj_3R_118() {
5804 if (jj_scan_token(BIT_AND)) return true;
5805 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5806 if (jj_3R_117()) return true;
5807 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5811 static final private boolean jj_3R_45() {
5812 if (jj_scan_token(CLASSACCESS)) return true;
5813 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5820 if (jj_3R_53()) return true;
5821 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5822 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5823 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5827 static final private boolean jj_3R_39() {
5834 if (jj_3R_47()) return true;
5835 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5836 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5837 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5841 static final private boolean jj_3R_113() {
5842 if (jj_3R_117()) return true;
5843 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5847 if (jj_3R_118()) { jj_scanpos = xsp; break; }
5848 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5853 static final private boolean jj_3R_103() {
5854 if (jj_scan_token(LIST)) return true;
5855 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5856 if (jj_scan_token(LPAREN)) return true;
5857 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5860 if (jj_3R_110()) jj_scanpos = xsp;
5861 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5864 if (jj_3R_111()) { jj_scanpos = xsp; break; }
5865 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5867 if (jj_scan_token(RPAREN)) return true;
5868 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5870 if (jj_3R_112()) jj_scanpos = xsp;
5871 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5875 static final private boolean jj_3R_114() {
5876 if (jj_scan_token(XOR)) return true;
5877 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5878 if (jj_3R_113()) return true;
5879 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5883 static final private boolean jj_3R_206() {
5884 if (jj_3R_115()) return true;
5885 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5889 static final private boolean jj_3R_205() {
5890 if (jj_3R_49()) return true;
5891 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5895 static final private boolean jj_3R_108() {
5896 if (jj_3R_113()) return true;
5897 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5901 if (jj_3R_114()) { jj_scanpos = xsp; break; }
5902 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5907 static final private boolean jj_3R_204() {
5908 if (jj_scan_token(IDENTIFIER)) return true;
5909 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5913 static final private boolean jj_3R_199() {
5920 if (jj_3R_206()) return true;
5921 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5922 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5923 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5927 static final private boolean jj_3R_104() {
5928 if (jj_scan_token(PRINT)) return true;
5929 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5930 if (jj_3R_48()) return true;
5931 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5935 static final private boolean jj_3R_109() {
5936 if (jj_scan_token(BIT_OR)) return true;
5937 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5938 if (jj_3R_108()) return true;
5939 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5943 static final private boolean jj_3R_102() {
5944 if (jj_3R_108()) return true;
5945 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5949 if (jj_3R_109()) { jj_scanpos = xsp; break; }
5950 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5955 static final private boolean jj_3R_186() {
5956 if (jj_scan_token(ARRAY)) return true;
5957 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5958 if (jj_3R_195()) return true;
5959 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5963 static final private boolean jj_3R_131() {
5964 if (jj_scan_token(IDENTIFIER)) return true;
5965 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5969 static final private boolean jj_3R_130() {
5970 if (jj_scan_token(LBRACE)) return true;
5971 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5972 if (jj_3R_48()) return true;
5973 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5974 if (jj_scan_token(RBRACE)) return true;
5975 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5979 static final private boolean jj_3R_105() {
5980 if (jj_scan_token(DOT)) return true;
5981 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5982 if (jj_3R_102()) return true;
5983 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5987 static final private boolean jj_3R_121() {
5994 if (jj_3R_131()) return true;
5995 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5996 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5997 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6001 static final private boolean jj_3R_129() {
6002 if (jj_scan_token(DOLLAR)) return true;
6003 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6004 if (jj_3R_121()) return true;
6005 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6009 static final private boolean jj_3R_96() {
6010 if (jj_3R_102()) return true;
6011 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6015 if (jj_3R_105()) { jj_scanpos = xsp; break; }
6016 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6021 static final private boolean jj_3R_200() {
6022 if (jj_3R_203()) return true;
6023 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6027 static final private boolean jj_3R_107() {
6028 if (jj_scan_token(_ANDL)) return true;
6029 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6033 static final private boolean jj_3R_106() {
6034 if (jj_scan_token(AND_AND)) return true;
6035 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6039 static final private boolean jj_3R_67() {
6040 if (jj_scan_token(DOLLAR)) return true;
6041 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6042 if (jj_3R_121()) return true;
6043 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6047 static final private boolean jj_3R_99() {
6052 if (jj_3R_107()) return true;
6053 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6054 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6055 if (jj_3R_96()) return true;
6056 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6060 static final private boolean jj_3R_80() {
6061 if (jj_3R_96()) return true;
6062 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6066 if (jj_3R_99()) { jj_scanpos = xsp; break; }
6067 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6072 static final private boolean jj_3R_78() {
6073 if (jj_scan_token(HOOK)) return true;
6074 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6075 if (jj_3R_48()) return true;
6076 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6077 if (jj_scan_token(COLON)) return true;
6078 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6079 if (jj_3R_72()) return true;
6080 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6084 static final private boolean jj_3R_192() {
6085 if (jj_scan_token(NEW)) return true;
6086 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6087 if (jj_3R_199()) return true;
6088 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6091 if (jj_3R_200()) jj_scanpos = xsp;
6092 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6096 static final private boolean jj_3R_198() {
6097 if (jj_3R_203()) return true;
6098 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6102 static final private boolean jj_3R_191() {
6103 if (jj_3R_115()) return true;
6104 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6107 if (jj_3R_198()) jj_scanpos = xsp;
6108 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6112 static final private boolean jj_3R_101() {
6113 if (jj_scan_token(_ORL)) return true;
6114 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6118 static final private boolean jj_3R_100() {
6119 if (jj_scan_token(OR_OR)) return true;
6120 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6124 static final private boolean jj_3R_82() {
6129 if (jj_3R_101()) return true;
6130 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6131 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6132 if (jj_3R_80()) return true;
6133 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6137 static final private boolean jj_3_1() {
6138 if (jj_3R_39()) return true;
6139 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6143 static final private boolean jj_3R_197() {
6144 if (jj_3R_203()) return true;
6145 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6149 static final private boolean jj_3R_75() {
6150 if (jj_3R_80()) return true;
6151 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6155 if (jj_3R_82()) { jj_scanpos = xsp; break; }
6156 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6161 static final private boolean jj_3R_196() {
6162 if (jj_scan_token(STATICCLASSACCESS)) return true;
6163 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6164 if (jj_3R_199()) return true;
6165 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6169 static final private boolean jj_3R_115() {
6170 if (jj_3R_67()) return true;
6171 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6175 if (jj_3_1()) { jj_scanpos = xsp; break; }
6176 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6181 static final private boolean jj_3R_190() {
6182 if (jj_scan_token(IDENTIFIER)) return true;
6183 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6187 if (jj_3R_196()) { jj_scanpos = xsp; break; }
6188 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6191 if (jj_3R_197()) jj_scanpos = xsp;
6192 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6196 static final private boolean jj_3R_185() {
6203 if (jj_3R_192()) return true;
6204 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6205 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6206 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6210 static final private boolean jj_3R_72() {
6211 if (jj_3R_75()) return true;
6212 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6215 if (jj_3R_78()) jj_scanpos = xsp;
6216 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6220 static final private boolean jj_3R_177() {
6221 if (jj_3R_186()) return true;
6222 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6226 static final private boolean jj_3R_184() {
6227 if (jj_scan_token(BIT_AND)) return true;
6228 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6232 static final private boolean jj_3R_95() {
6233 if (jj_scan_token(TILDEEQUAL)) return true;
6234 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6238 static final private boolean jj_3R_94() {
6239 if (jj_scan_token(DOTASSIGN)) return true;
6240 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6244 static final private boolean jj_3R_172() {
6249 if (jj_3R_177()) return true;
6250 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6251 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6255 static final private boolean jj_3R_176() {
6258 if (jj_3R_184()) jj_scanpos = xsp;
6259 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6260 if (jj_3R_185()) return true;
6261 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6265 static final private boolean jj_3R_93() {
6266 if (jj_scan_token(ORASSIGN)) return true;
6267 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6271 static final private boolean jj_3R_92() {
6272 if (jj_scan_token(XORASSIGN)) return true;
6273 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6277 static final private boolean jj_3R_91() {
6278 if (jj_scan_token(ANDASSIGN)) return true;
6279 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6283 static final private boolean jj_3R_90() {
6284 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6285 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6289 static final private boolean jj_3R_89() {
6290 if (jj_scan_token(LSHIFTASSIGN)) return true;
6291 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6295 static final private boolean jj_3R_88() {
6296 if (jj_scan_token(MINUSASSIGN)) return true;
6297 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6301 static final private boolean jj_3R_87() {
6302 if (jj_scan_token(PLUSASSIGN)) return true;
6303 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6307 static final private boolean jj_3R_86() {
6308 if (jj_scan_token(REMASSIGN)) return true;
6309 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6313 static final private boolean jj_3R_85() {
6314 if (jj_scan_token(SLASHASSIGN)) return true;
6315 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6319 static final private boolean jj_3R_84() {
6320 if (jj_scan_token(STARASSIGN)) return true;
6321 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6325 static final private boolean jj_3R_83() {
6326 if (jj_scan_token(ASSIGN)) return true;
6327 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6331 static final private boolean jj_3R_79() {
6358 if (jj_3R_95()) return true;
6359 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6360 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6361 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6362 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6363 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6364 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6365 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6366 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6367 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6368 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6369 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6370 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6371 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6375 static final private boolean jj_3R_194() {
6376 if (jj_scan_token(MINUS_MINUS)) return true;
6377 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6381 static final private boolean jj_3R_193() {
6382 if (jj_scan_token(PLUS_PLUS)) return true;
6383 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6387 static final private boolean jj_3R_189() {
6392 if (jj_3R_194()) return true;
6393 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6394 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6398 static final private boolean jj_3R_174() {
6399 if (jj_3R_172()) return true;
6400 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6403 if (jj_3R_189()) jj_scanpos = xsp;
6404 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6408 static final private boolean jj_3R_98() {
6409 if (jj_3R_104()) return true;
6410 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6414 static final private boolean jj_3R_97() {
6415 if (jj_3R_103()) return true;
6416 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6420 static final private boolean jj_3R_81() {
6425 if (jj_3R_98()) return true;
6426 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6427 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6431 static final private boolean jj_3R_50() {
6432 if (jj_scan_token(COMMA)) return true;
6433 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6434 if (jj_3R_48()) return true;
6435 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6439 static final private boolean jj_3R_44() {
6440 if (jj_3R_48()) return true;
6441 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6445 if (jj_3R_50()) { jj_scanpos = xsp; break; }
6446 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6451 static final private boolean jj_3R_188() {
6452 if (jj_scan_token(ARRAY)) return true;
6453 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6457 static final private boolean jj_3R_187() {
6458 if (jj_3R_49()) return true;
6459 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6463 static final private boolean jj_3R_77() {
6464 if (jj_3R_81()) return true;
6465 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6469 static final private boolean jj_3R_42() {
6470 if (jj_scan_token(ARRAY)) return true;
6471 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6475 static final private boolean jj_3R_76() {
6476 if (jj_scan_token(BANG)) return true;
6477 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6478 if (jj_3R_73()) return true;
6479 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6483 static final private boolean jj_3R_73() {
6488 if (jj_3R_77()) return true;
6489 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_173() {
6495 if (jj_scan_token(LPAREN)) return true;
6496 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6501 if (jj_3R_188()) return true;
6502 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6503 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6504 if (jj_scan_token(RPAREN)) return true;
6505 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6506 if (jj_3R_143()) return true;
6507 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6511 static final private boolean jj_3R_41() {
6512 if (jj_3R_49()) return true;
6513 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6517 static final private boolean jj_3R_57() {
6518 if (jj_3R_73()) return true;
6519 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6523 static final private boolean jj_3_5() {
6524 if (jj_3R_44()) return true;
6525 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6529 static final private boolean jj_3_3() {
6530 if (jj_scan_token(LPAREN)) return true;
6531 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6536 if (jj_3R_42()) return true;
6537 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6538 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6539 if (jj_scan_token(RPAREN)) return true;
6540 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6544 static final private boolean jj_3R_171() {
6545 if (jj_scan_token(LPAREN)) return true;
6546 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6547 if (jj_3R_48()) return true;
6548 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6549 if (jj_scan_token(RPAREN)) return true;
6550 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6554 static final private boolean jj_3R_170() {
6555 if (jj_3R_175()) return true;
6556 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6560 static final private boolean jj_3R_169() {
6561 if (jj_3R_174()) return true;
6562 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6566 static final private boolean jj_3R_165() {
6575 if (jj_3R_171()) return true;
6576 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6577 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6578 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6579 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6583 static final private boolean jj_3R_168() {
6584 if (jj_3R_173()) return true;
6585 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6589 static final private boolean jj_3R_167() {
6590 if (jj_scan_token(MINUS_MINUS)) return true;
6591 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6595 static final private boolean jj_3R_166() {
6596 if (jj_scan_token(PLUS_PLUS)) return true;
6597 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6601 static final private boolean jj_3R_74() {
6602 if (jj_3R_79()) return true;
6603 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6604 if (jj_3R_48()) return true;
6605 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6609 static final private boolean jj_3R_164() {
6614 if (jj_3R_167()) return true;
6615 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6616 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6617 if (jj_3R_172()) return true;
6618 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6622 static final private boolean jj_3R_48() {
6627 if (jj_3R_57()) return true;
6628 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6629 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6633 static final private boolean jj_3R_56() {
6634 if (jj_3R_72()) return true;
6635 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6638 if (jj_3R_74()) jj_scanpos = xsp;
6639 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6643 static final private boolean jj_3R_66() {
6644 if (jj_scan_token(OBJECT)) return true;
6645 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6649 static final private boolean jj_3R_160() {
6650 if (jj_3R_165()) return true;
6651 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6655 static final private boolean jj_3R_65() {
6656 if (jj_scan_token(INTEGER)) return true;
6657 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6661 static final private boolean jj_3R_64() {
6662 if (jj_scan_token(INT)) return true;
6663 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6667 static final private boolean jj_3R_63() {
6668 if (jj_scan_token(FLOAT)) return true;
6669 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6673 static final private boolean jj_3R_159() {
6674 if (jj_3R_164()) return true;
6675 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6679 static final private boolean jj_3R_62() {
6680 if (jj_scan_token(DOUBLE)) return true;
6681 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6685 static final private boolean jj_3R_61() {
6686 if (jj_scan_token(REAL)) return true;
6687 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6691 static final private boolean jj_3R_60() {
6692 if (jj_scan_token(BOOLEAN)) return true;
6693 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6697 static final private boolean jj_3R_59() {
6698 if (jj_scan_token(BOOL)) return true;
6699 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6703 static final private boolean jj_3R_158() {
6704 if (jj_scan_token(MINUS)) return true;
6705 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6706 if (jj_3R_147()) return true;
6707 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6711 static final private boolean jj_3R_49() {
6730 if (jj_3R_66()) return true;
6731 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6732 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6733 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6734 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6735 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6736 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6737 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6738 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6739 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6743 static final private boolean jj_3R_58() {
6744 if (jj_scan_token(STRING)) return true;
6745 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6749 static final private boolean jj_3R_155() {
6758 if (jj_3R_160()) return true;
6759 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6760 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6761 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6762 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6766 static final private boolean jj_3R_157() {
6767 if (jj_scan_token(PLUS)) return true;
6768 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6769 if (jj_3R_147()) return true;
6770 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6774 static final private boolean jj_3R_163() {
6775 if (jj_3R_155()) return true;
6776 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6780 static final private boolean jj_3R_162() {
6781 if (jj_scan_token(BANG)) return true;
6782 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6783 if (jj_3R_156()) return true;
6784 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6788 static final private boolean jj_3R_43() {
6789 if (jj_3R_48()) return true;
6790 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6791 if (jj_scan_token(SEMICOLON)) return true;
6792 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6796 static final private boolean jj_3R_156() {
6803 if (jj_3R_163()) return true;
6804 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6805 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6806 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6810 static final private boolean jj_3R_161() {
6811 if (jj_scan_token(AT)) return true;
6812 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6813 if (jj_3R_156()) return true;
6814 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6818 static final private boolean jj_3R_154() {
6819 if (jj_3R_155()) return true;
6820 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6824 static final private boolean jj_3R_153() {
6825 if (jj_scan_token(BANG)) return true;
6826 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6827 if (jj_3R_156()) return true;
6828 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6832 static final private boolean jj_3R_152() {
6833 if (jj_scan_token(TILDE)) return true;
6834 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6835 if (jj_3R_147()) return true;
6836 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6840 static final private boolean jj_3R_147() {
6849 if (jj_3R_154()) return true;
6850 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6851 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6852 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6853 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6857 static final private boolean jj_3R_151() {
6858 if (jj_scan_token(AT)) return true;
6859 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6860 if (jj_3R_147()) return true;
6861 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6865 static final private boolean jj_3_4() {
6866 if (jj_3R_43()) return true;
6867 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6871 static final private boolean jj_3R_143() {
6872 if (jj_3R_147()) return true;
6873 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6877 static final private boolean jj_3R_150() {
6878 if (jj_scan_token(REMAINDER)) return true;
6879 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6883 static final private boolean jj_3R_149() {
6884 if (jj_scan_token(SLASH)) return true;
6885 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6889 static final private boolean jj_3R_148() {
6890 if (jj_scan_token(STAR)) return true;
6891 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6895 static final private boolean jj_3R_144() {
6902 if (jj_3R_150()) return true;
6903 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6904 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6905 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6906 if (jj_3R_143()) return true;
6907 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6911 static final private boolean jj_3R_210() {
6912 if (jj_scan_token(COMMA)) return true;
6913 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6914 if (jj_3R_48()) return true;
6915 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6919 static final private boolean jj_3R_209() {
6920 if (jj_3R_48()) return true;
6921 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6925 if (jj_3R_210()) { jj_scanpos = xsp; break; }
6926 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6931 static final private boolean jj_3R_138() {
6932 if (jj_3R_143()) return true;
6933 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6937 if (jj_3R_144()) { jj_scanpos = xsp; break; }
6938 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6943 static final private boolean jj_3R_146() {
6944 if (jj_scan_token(MINUS)) return true;
6945 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6949 static final private boolean jj_3R_145() {
6950 if (jj_scan_token(PLUS)) return true;
6951 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6955 static final private boolean jj_3R_207() {
6956 if (jj_3R_209()) return true;
6957 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6961 static final private boolean jj_3R_139() {
6966 if (jj_3R_146()) return true;
6967 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6968 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6969 if (jj_3R_138()) return true;
6970 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6974 static final private boolean jj_3R_132() {
6975 if (jj_3R_138()) return true;
6976 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6980 if (jj_3R_139()) { jj_scanpos = xsp; break; }
6981 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6986 static final private boolean jj_3R_203() {
6987 if (jj_scan_token(LPAREN)) return true;
6988 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6991 if (jj_3R_207()) jj_scanpos = xsp;
6992 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6993 if (jj_scan_token(RPAREN)) return true;
6994 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6998 static final private boolean jj_3R_142() {
6999 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
7000 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7004 static final private boolean jj_3R_141() {
7005 if (jj_scan_token(RSIGNEDSHIFT)) return true;
7006 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7010 static final private boolean jj_3R_140() {
7011 if (jj_scan_token(LSHIFT)) return true;
7012 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7016 static final private boolean jj_3R_133() {
7023 if (jj_3R_142()) return true;
7024 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7025 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7026 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7027 if (jj_3R_132()) return true;
7028 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7032 static final private boolean jj_3R_183() {
7033 if (jj_scan_token(NULL)) return true;
7034 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7038 static final private boolean jj_3R_182() {
7039 if (jj_scan_token(FALSE)) return true;
7040 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7044 static final private boolean jj_3R_122() {
7045 if (jj_3R_132()) return true;
7046 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7050 if (jj_3R_133()) { jj_scanpos = xsp; break; }
7051 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7056 static final private boolean jj_3R_181() {
7057 if (jj_scan_token(TRUE)) return true;
7058 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7062 static final private boolean jj_3R_180() {
7063 if (jj_scan_token(STRING_LITERAL)) return true;
7064 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7068 static final private boolean jj_3R_179() {
7069 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
7070 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7074 static final private boolean jj_3R_178() {
7075 if (jj_scan_token(INTEGER_LITERAL)) return true;
7076 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7080 static final private boolean jj_3R_175() {
7093 if (jj_3R_183()) return true;
7094 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7095 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7096 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7097 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7098 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7099 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7103 static final private boolean jj_3R_137() {
7104 if (jj_scan_token(GE)) return true;
7105 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7109 static private boolean jj_initialized_once = false;
7110 static public PHPParserTokenManager token_source;
7111 static SimpleCharStream jj_input_stream;
7112 static public Token token, jj_nt;
7113 static private int jj_ntk;
7114 static private Token jj_scanpos, jj_lastpos;
7115 static private int jj_la;
7116 static public boolean lookingAhead = false;
7117 static private boolean jj_semLA;
7118 static private int jj_gen;
7119 static final private int[] jj_la1 = new int[126];
7120 static private int[] jj_la1_0;
7121 static private int[] jj_la1_1;
7122 static private int[] jj_la1_2;
7123 static private int[] jj_la1_3;
7124 static private int[] jj_la1_4;
7132 private static void jj_la1_0() {
7133 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,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,};
7135 private static void jj_la1_1() {
7136 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,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,};
7138 private static void jj_la1_2() {
7139 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,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,};
7141 private static void jj_la1_3() {
7142 jj_la1_3 = new int[] {0x8a31440,0x0,0x0,0x8a31440,0x8000000,0x8a31440,0x0,0x0,0x0,0x10000000,0x820000,0x0,0x0,0x830000,0x440,0x440,0x21440,0x0,0x231440,0x10000000,0x0,0x10000000,0x10000,0x0,0x0,0x0,0x231440,0x0,0x0,0x0,0x0,0x10,0x10,0x20,0x20,0x20000000,0x0,0x0,0x0,0x0,0x0,0xc0000000,0xc0000000,0xe,0xe,0x0,0x0,0x1,0x1,0x231440,0x231440,0x231440,0x0,0x231440,0x0,0x0,0x0,0x0,0x30000,0x0,0x200000,0x200000,0x200000,0x30000,0x30000,0x830000,0x231440,0x231440,0x231440,0x231440,0x2800000,0x1440,0x231440,0x10000000,0x0,0x8820000,0x8a31440,0x0,0x0,0x0,0x10000,0x10000000,0x10000,0x0,0x10000000,0x10000000,0x10000000,0x8a31440,0x8a31440,0x8a31440,0x8a31440,0x10000000,0x0,0x0,0x0,0x30000,0x800000,0x0,0x0,0x8a31440,0x8a31440,0x0,0x231440,0x8a31440,0x8a31440,0x0,0x0,0x8a31440,0x0,0x0,0x8a31440,0x8a31440,0x8a31440,0x8a31440,0x8a31440,0x8a31440,0x8a31440,0x231440,0x231440,0x231440,0x8a31440,0x8a31440,0x231440,0x10000000,0x231440,0x231440,};
7144 private static void jj_la1_4() {
7145 jj_la1_4 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfff80,0x0,0x0,0x0,0xfff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x79,0x79,0x6,0x6,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,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,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,};
7147 static final private JJCalls[] jj_2_rtns = new JJCalls[5];
7148 static private boolean jj_rescan = false;
7149 static private int jj_gc = 0;
7151 public PHPParser(java.io.InputStream stream) {
7152 if (jj_initialized_once) {
7153 System.out.println("ERROR: Second call to constructor of static parser. You must");
7154 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7155 System.out.println(" during parser generation.");
7158 jj_initialized_once = true;
7159 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7160 token_source = new PHPParserTokenManager(jj_input_stream);
7161 token = new Token();
7164 for (int i = 0; i < 126; i++) jj_la1[i] = -1;
7165 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7168 static public void ReInit(java.io.InputStream stream) {
7169 jj_input_stream.ReInit(stream, 1, 1);
7170 token_source.ReInit(jj_input_stream);
7171 token = new Token();
7174 for (int i = 0; i < 126; i++) jj_la1[i] = -1;
7175 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7178 public PHPParser(java.io.Reader stream) {
7179 if (jj_initialized_once) {
7180 System.out.println("ERROR: Second call to constructor of static parser. You must");
7181 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7182 System.out.println(" during parser generation.");
7185 jj_initialized_once = true;
7186 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7187 token_source = new PHPParserTokenManager(jj_input_stream);
7188 token = new Token();
7191 for (int i = 0; i < 126; i++) jj_la1[i] = -1;
7192 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7195 static public void ReInit(java.io.Reader stream) {
7196 jj_input_stream.ReInit(stream, 1, 1);
7197 token_source.ReInit(jj_input_stream);
7198 token = new Token();
7201 for (int i = 0; i < 126; i++) jj_la1[i] = -1;
7202 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7205 public PHPParser(PHPParserTokenManager tm) {
7206 if (jj_initialized_once) {
7207 System.out.println("ERROR: Second call to constructor of static parser. You must");
7208 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7209 System.out.println(" during parser generation.");
7212 jj_initialized_once = true;
7214 token = new Token();
7217 for (int i = 0; i < 126; i++) jj_la1[i] = -1;
7218 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7221 public void ReInit(PHPParserTokenManager tm) {
7223 token = new Token();
7226 for (int i = 0; i < 126; i++) jj_la1[i] = -1;
7227 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7230 static final private Token jj_consume_token(int kind) throws ParseException {
7232 if ((oldToken = token).next != null) token = token.next;
7233 else token = token.next = token_source.getNextToken();
7235 if (token.kind == kind) {
7237 if (++jj_gc > 100) {
7239 for (int i = 0; i < jj_2_rtns.length; i++) {
7240 JJCalls c = jj_2_rtns[i];
7242 if (c.gen < jj_gen) c.first = null;
7251 throw generateParseException();
7254 static final private boolean jj_scan_token(int kind) {
7255 if (jj_scanpos == jj_lastpos) {
7257 if (jj_scanpos.next == null) {
7258 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
7260 jj_lastpos = jj_scanpos = jj_scanpos.next;
7263 jj_scanpos = jj_scanpos.next;
7266 int i = 0; Token tok = token;
7267 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
7268 if (tok != null) jj_add_error_token(kind, i);
7270 return (jj_scanpos.kind != kind);
7273 static final public Token getNextToken() {
7274 if (token.next != null) token = token.next;
7275 else token = token.next = token_source.getNextToken();
7281 static final public Token getToken(int index) {
7282 Token t = lookingAhead ? jj_scanpos : token;
7283 for (int i = 0; i < index; i++) {
7284 if (t.next != null) t = t.next;
7285 else t = t.next = token_source.getNextToken();
7290 static final private int jj_ntk() {
7291 if ((jj_nt=token.next) == null)
7292 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
7294 return (jj_ntk = jj_nt.kind);
7297 static private java.util.Vector jj_expentries = new java.util.Vector();
7298 static private int[] jj_expentry;
7299 static private int jj_kind = -1;
7300 static private int[] jj_lasttokens = new int[100];
7301 static private int jj_endpos;
7303 static private void jj_add_error_token(int kind, int pos) {
7304 if (pos >= 100) return;
7305 if (pos == jj_endpos + 1) {
7306 jj_lasttokens[jj_endpos++] = kind;
7307 } else if (jj_endpos != 0) {
7308 jj_expentry = new int[jj_endpos];
7309 for (int i = 0; i < jj_endpos; i++) {
7310 jj_expentry[i] = jj_lasttokens[i];
7312 boolean exists = false;
7313 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
7314 int[] oldentry = (int[])(enum.nextElement());
7315 if (oldentry.length == jj_expentry.length) {
7317 for (int i = 0; i < jj_expentry.length; i++) {
7318 if (oldentry[i] != jj_expentry[i]) {
7326 if (!exists) jj_expentries.addElement(jj_expentry);
7327 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
7331 static public ParseException generateParseException() {
7332 jj_expentries.removeAllElements();
7333 boolean[] la1tokens = new boolean[148];
7334 for (int i = 0; i < 148; i++) {
7335 la1tokens[i] = false;
7338 la1tokens[jj_kind] = true;
7341 for (int i = 0; i < 126; i++) {
7342 if (jj_la1[i] == jj_gen) {
7343 for (int j = 0; j < 32; j++) {
7344 if ((jj_la1_0[i] & (1<<j)) != 0) {
7345 la1tokens[j] = true;
7347 if ((jj_la1_1[i] & (1<<j)) != 0) {
7348 la1tokens[32+j] = true;
7350 if ((jj_la1_2[i] & (1<<j)) != 0) {
7351 la1tokens[64+j] = true;
7353 if ((jj_la1_3[i] & (1<<j)) != 0) {
7354 la1tokens[96+j] = true;
7356 if ((jj_la1_4[i] & (1<<j)) != 0) {
7357 la1tokens[128+j] = true;
7362 for (int i = 0; i < 148; i++) {
7364 jj_expentry = new int[1];
7366 jj_expentries.addElement(jj_expentry);
7371 jj_add_error_token(0, 0);
7372 int[][] exptokseq = new int[jj_expentries.size()][];
7373 for (int i = 0; i < jj_expentries.size(); i++) {
7374 exptokseq[i] = (int[])jj_expentries.elementAt(i);
7376 return new ParseException(token, exptokseq, tokenImage);
7379 static final public void enable_tracing() {
7382 static final public void disable_tracing() {
7385 static final private void jj_rescan_token() {
7387 for (int i = 0; i < 5; i++) {
7388 JJCalls p = jj_2_rtns[i];
7390 if (p.gen > jj_gen) {
7391 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7393 case 0: jj_3_1(); break;
7394 case 1: jj_3_2(); break;
7395 case 2: jj_3_3(); break;
7396 case 3: jj_3_4(); break;
7397 case 4: jj_3_5(); break;
7401 } while (p != null);
7406 static final private void jj_save(int index, int xla) {
7407 JJCalls p = jj_2_rtns[index];
7408 while (p.gen > jj_gen) {
7409 if (p.next == null) { p = p.next = new JJCalls(); break; }
7412 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7415 static final class JJCalls {