1 /* Generated By:JavaCC: Do not edit this line. PHPParser.java */
4 import org.eclipse.core.resources.IFile;
5 import org.eclipse.core.resources.IMarker;
6 import org.eclipse.core.runtime.CoreException;
7 import org.eclipse.ui.texteditor.MarkerUtilities;
8 import org.eclipse.jface.preference.IPreferenceStore;
10 import java.util.Hashtable;
11 import java.util.ArrayList;
12 import java.io.StringReader;
14 import java.text.MessageFormat;
16 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
17 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
18 import net.sourceforge.phpdt.internal.compiler.ast.*;
19 import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
20 import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
21 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
22 import net.sourceforge.phpdt.internal.corext.Assert;
26 * This php parser is inspired by the Java 1.2 grammar example
27 * given with JavaCC. You can get JavaCC at http://www.webgain.com
28 * You can test the parser with the PHPParserTestCase2.java
29 * @author Matthieu Casanova
31 public final class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
33 //todo : fix the variables names bug
34 //todo : handle tilde operator
37 /** The current segment. */
38 private static OutlineableWithChildren currentSegment;
40 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
41 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
42 static PHPOutlineInfo outlineInfo;
44 /** The error level of the current ParseException. */
45 private static int errorLevel = ERROR;
46 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
47 private static String errorMessage;
49 private static int errorStart = -1;
50 private static int errorEnd = -1;
51 private static PHPDocument phpDocument;
53 private static final String SYNTAX_ERROR_CHAR = "syntax error";
55 * The point where html starts.
56 * It will be used by the token manager to create HTMLCode objects
58 public static int htmlStart;
61 private final static int AstStackIncrement = 100;
62 /** The stack of node. */
63 private static AstNode[] nodes;
64 /** The cursor in expression stack. */
65 private static int nodePtr;
67 public static final boolean PARSER_DEBUG = false;
69 public final void setFileToParse(final IFile fileToParse) {
70 PHPParser.fileToParse = fileToParse;
76 public PHPParser(final IFile fileToParse) {
77 this(new StringReader(""));
78 PHPParser.fileToParse = fileToParse;
81 public static final void phpParserTester(final String strEval) throws ParseException {
82 final StringReader stream = new StringReader(strEval);
83 if (jj_input_stream == null) {
84 jj_input_stream = new SimpleCharStream(stream, 1, 1);
86 ReInit(new StringReader(strEval));
88 phpDocument = new PHPDocument(null,"_root".toCharArray());
89 currentSegment = phpDocument;
90 outlineInfo = new PHPOutlineInfo(null, currentSegment);
91 PHPParserTokenManager.SwitchTo(PHPParserTokenManager.PHPPARSING);
95 public static final void htmlParserTester(final File fileName) throws FileNotFoundException, ParseException {
96 final Reader stream = new FileReader(fileName);
97 if (jj_input_stream == null) {
98 jj_input_stream = new SimpleCharStream(stream, 1, 1);
102 phpDocument = new PHPDocument(null,"_root".toCharArray());
103 currentSegment = phpDocument;
104 outlineInfo = new PHPOutlineInfo(null, currentSegment);
108 public static final void htmlParserTester(final String strEval) throws ParseException {
109 final StringReader stream = new StringReader(strEval);
110 if (jj_input_stream == null) {
111 jj_input_stream = new SimpleCharStream(stream, 1, 1);
115 phpDocument = new PHPDocument(null,"_root".toCharArray());
116 currentSegment = phpDocument;
117 outlineInfo = new PHPOutlineInfo(null, currentSegment);
122 * Reinitialize the parser.
124 private static final void init() {
125 nodes = new AstNode[AstStackIncrement];
131 * Add an php node on the stack.
132 * @param node the node that will be added to the stack
134 private static final void pushOnAstNodes(final AstNode node) {
136 nodes[++nodePtr] = node;
137 } catch (IndexOutOfBoundsException e) {
138 final int oldStackLength = nodes.length;
139 final AstNode[] oldStack = nodes;
140 nodes = new AstNode[oldStackLength + AstStackIncrement];
141 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
142 nodePtr = oldStackLength;
143 nodes[nodePtr] = node;
147 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
148 phpDocument = new PHPDocument(parent,"_root".toCharArray());
149 currentSegment = phpDocument;
150 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
151 final StringReader stream = new StringReader(s);
152 if (jj_input_stream == null) {
153 jj_input_stream = new SimpleCharStream(stream, 1, 1);
159 phpDocument.nodes = new AstNode[nodes.length];
160 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
161 if (PHPeclipsePlugin.DEBUG) {
162 PHPeclipsePlugin.log(1,phpDocument.toString());
164 } catch (ParseException e) {
165 processParseException(e);
171 * This function will throw the exception if we are in debug mode
172 * and process it if we are in production mode.
173 * this should be fast since the PARSER_DEBUG is static final so the difference will be at compile time
174 * @param e the exception
175 * @throws ParseException the thrown exception
177 private static void processParseExceptionDebug(final ParseException e) throws ParseException {
181 processParseException(e);
184 * This method will process the parse exception.
185 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
186 * @param e the ParseException
188 private static void processParseException(final ParseException e) {
189 if (errorMessage == null) {
190 PHPeclipsePlugin.log(e);
191 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
192 errorStart = e.currentToken.sourceStart;
193 errorEnd = e.currentToken.sourceEnd;
197 // if (PHPeclipsePlugin.DEBUG) PHPeclipsePlugin.log(e);
201 * Create marker for the parse error.
202 * @param e the ParseException
204 private static void setMarker(final ParseException e) {
206 if (errorStart == -1) {
207 setMarker(fileToParse,
209 e.currentToken.sourceStart,
210 e.currentToken.sourceEnd,
212 "Line " + e.currentToken.beginLine+", "+e.currentToken.sourceStart+":"+e.currentToken.sourceEnd);
214 setMarker(fileToParse,
219 "Line " + e.currentToken.beginLine+", "+errorStart+":"+errorEnd);
223 } catch (CoreException e2) {
224 PHPeclipsePlugin.log(e2);
228 private static void scanLine(final String output,
231 final int brIndx) throws CoreException {
233 final StringBuffer lineNumberBuffer = new StringBuffer(10);
235 current = output.substring(indx, brIndx);
237 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
238 final int onLine = current.indexOf("on line <b>");
240 lineNumberBuffer.delete(0, lineNumberBuffer.length());
241 for (int i = onLine; i < current.length(); i++) {
242 ch = current.charAt(i);
243 if ('0' <= ch && '9' >= ch) {
244 lineNumberBuffer.append(ch);
248 final int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
250 final Hashtable attributes = new Hashtable();
252 current = current.replaceAll("\n", "");
253 current = current.replaceAll("<b>", "");
254 current = current.replaceAll("</b>", "");
255 MarkerUtilities.setMessage(attributes, current);
257 if (current.indexOf(PARSE_ERROR_STRING) != -1)
258 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
259 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
260 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
262 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
263 MarkerUtilities.setLineNumber(attributes, lineNumber);
264 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
269 public final void parse(final String s) {
270 final StringReader stream = new StringReader(s);
271 if (jj_input_stream == null) {
272 jj_input_stream = new SimpleCharStream(stream, 1, 1);
278 } catch (ParseException e) {
279 processParseException(e);
284 * Call the php parse command ( php -l -f <filename> )
285 * and create markers according to the external parser output
287 public static void phpExternalParse(final IFile file) {
288 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
289 final String filename = file.getLocation().toString();
291 final String[] arguments = { filename };
292 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
293 final String command = form.format(arguments);
295 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
298 // parse the buffer to find the errors and warnings
299 createMarkers(parserResult, file);
300 } catch (CoreException e) {
301 PHPeclipsePlugin.log(e);
306 * Put a new html block in the stack.
308 public static final void createNewHTMLCode() {
309 final int currentPosition = token.sourceStart;
310 if (currentPosition == htmlStart ||
311 currentPosition < htmlStart ||
312 currentPosition > SimpleCharStream.currentBuffer.length()) {
315 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,
316 currentPosition).toCharArray();
317 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
320 /** Create a new task. */
321 public static final void createNewTask(final int todoStart) {
322 final String todo = SimpleCharStream.currentBuffer.substring(todoStart,
323 SimpleCharStream.currentBuffer.indexOf("\n",
327 setMarker(fileToParse,
329 SimpleCharStream.getBeginLine(),
331 "Line "+SimpleCharStream.getBeginLine());
332 } catch (CoreException e) {
333 PHPeclipsePlugin.log(e);
338 private static final void parse() throws ParseException {
342 static final public void todo() throws ParseException {
344 todoToken = jj_consume_token(23);
345 createNewTask(todoToken.sourceStart);
348 static final public void phpTest() throws ParseException {
353 static final public void phpFile() throws ParseException {
357 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
396 case INTEGER_LITERAL:
397 case FLOATING_POINT_LITERAL:
413 PHPParser.createNewHTMLCode();
414 } catch (TokenMgrError e) {
415 PHPeclipsePlugin.log(e);
416 errorStart = SimpleCharStream.beginOffset;
417 errorEnd = SimpleCharStream.endOffset;
418 errorMessage = e.getMessage();
420 {if (true) throw generateParseException();}
425 * A php block is a <?= expression [;]?>
426 * or <?php somephpcode ?>
427 * or <? somephpcode ?>
429 static final public void PhpBlock() throws ParseException {
430 final PHPEchoBlock phpEchoBlock;
431 final Token token,phpEnd;
432 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
434 phpEchoBlock = phpEchoBlock();
435 pushOnAstNodes(phpEchoBlock);
474 case INTEGER_LITERAL:
475 case FLOATING_POINT_LITERAL:
483 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
486 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
488 jj_consume_token(PHPSTARTLONG);
491 token = jj_consume_token(PHPSTARTSHORT);
493 setMarker(fileToParse,
494 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
498 "Line " + token.beginLine);
499 } catch (CoreException e) {
500 PHPeclipsePlugin.log(e);
505 jj_consume_token(-1);
506 throw new ParseException();
513 PHPParser.createNewHTMLCode();
516 phpEnd = jj_consume_token(PHPEND);
517 htmlStart = phpEnd.sourceEnd;
518 } catch (ParseException e) {
519 errorMessage = "'?>' expected";
521 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
522 errorEnd = SimpleCharStream.getPosition() + 1;
523 processParseExceptionDebug(e);
528 jj_consume_token(-1);
529 throw new ParseException();
533 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
534 final Expression expr;
535 final PHPEchoBlock echoBlock;
536 final Token token, token2;
537 token = jj_consume_token(PHPECHOSTART);
538 PHPParser.createNewHTMLCode();
540 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
542 jj_consume_token(SEMICOLON);
548 token2 = jj_consume_token(PHPEND);
549 htmlStart = token2.sourceEnd;
551 echoBlock = new PHPEchoBlock(expr,token.sourceStart,token2.sourceEnd);
552 pushOnAstNodes(echoBlock);
553 {if (true) return echoBlock;}
554 throw new Error("Missing return statement in function");
557 static final public void Php() throws ParseException {
560 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
595 case INTEGER_LITERAL:
596 case FLOATING_POINT_LITERAL:
614 static final public ClassDeclaration ClassDeclaration() throws ParseException {
615 final ClassDeclaration classDeclaration;
616 Token className = null;
617 final Token superclassName, token, extendsToken;
618 String classNameImage = SYNTAX_ERROR_CHAR;
619 String superclassNameImage = null;
621 token = jj_consume_token(CLASS);
623 className = jj_consume_token(IDENTIFIER);
624 classNameImage = className.image;
625 } catch (ParseException e) {
626 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
628 errorStart = token.sourceEnd+1;
629 errorEnd = token.sourceEnd+1;
630 processParseExceptionDebug(e);
632 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
634 extendsToken = jj_consume_token(EXTENDS);
636 superclassName = jj_consume_token(IDENTIFIER);
637 superclassNameImage = superclassName.image;
638 } catch (ParseException e) {
639 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
641 errorStart = extendsToken.sourceEnd+1;
642 errorEnd = extendsToken.sourceEnd+1;
643 processParseExceptionDebug(e);
644 superclassNameImage = SYNTAX_ERROR_CHAR;
652 if (className == null) {
653 start = token.sourceStart;
654 end = token.sourceEnd;
656 start = className.sourceStart;
657 end = className.sourceEnd;
659 if (superclassNameImage == null) {
661 classDeclaration = new ClassDeclaration(currentSegment,
666 classDeclaration = new ClassDeclaration(currentSegment,
672 currentSegment.add(classDeclaration);
673 currentSegment = classDeclaration;
674 classEnd = ClassBody(classDeclaration);
675 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
676 classDeclaration.sourceEnd = classEnd;
677 pushOnAstNodes(classDeclaration);
678 {if (true) return classDeclaration;}
679 throw new Error("Missing return statement in function");
682 static final public int ClassBody(final ClassDeclaration classDeclaration) throws ParseException {
685 jj_consume_token(LBRACE);
686 } catch (ParseException e) {
687 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "'. '{' expected";
689 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
690 errorEnd = SimpleCharStream.getPosition() + 1;
691 processParseExceptionDebug(e);
695 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
704 ClassBodyDeclaration(classDeclaration);
707 token = jj_consume_token(RBRACE);
708 {if (true) return token.sourceEnd;}
709 } catch (ParseException e) {
710 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. 'var', 'function' or '}' expected";
712 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
713 errorEnd = SimpleCharStream.getPosition() + 1;
714 processParseExceptionDebug(e);
715 {if (true) return PHPParser.token.sourceEnd;}
717 throw new Error("Missing return statement in function");
721 * A class can contain only methods and fields.
723 static final public void ClassBodyDeclaration(final ClassDeclaration classDeclaration) throws ParseException {
724 final MethodDeclaration method;
725 final FieldDeclaration field;
726 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
728 method = MethodDeclaration();
729 method.analyzeCode();
730 classDeclaration.addMethod(method);
733 field = FieldDeclaration();
734 classDeclaration.addField(field);
738 jj_consume_token(-1);
739 throw new ParseException();
744 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
745 * it is only used by ClassBodyDeclaration()
747 static final public FieldDeclaration FieldDeclaration() throws ParseException {
748 VariableDeclaration variableDeclaration;
749 final VariableDeclaration[] list;
750 final ArrayList arrayList = new ArrayList();
754 token = jj_consume_token(VAR);
755 variableDeclaration = VariableDeclaratorNoSuffix();
756 arrayList.add(variableDeclaration);
757 outlineInfo.addVariable(variableDeclaration.name());
758 pos = variableDeclaration.sourceEnd;
761 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
769 jj_consume_token(COMMA);
770 variableDeclaration = VariableDeclaratorNoSuffix();
771 arrayList.add(variableDeclaration);
772 outlineInfo.addVariable(variableDeclaration.name());
773 pos = variableDeclaration.sourceEnd;
776 token2 = jj_consume_token(SEMICOLON);
777 } catch (ParseException e) {
778 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
782 processParseExceptionDebug(e);
784 list = new VariableDeclaration[arrayList.size()];
785 arrayList.toArray(list);
787 if (token2 == null) {
788 end = list[list.length-1].sourceEnd;
790 end = token2.sourceEnd;
792 {if (true) return new FieldDeclaration(list,
796 throw new Error("Missing return statement in function");
800 * a strict variable declarator : there cannot be a suffix here.
801 * It will be used by fields and formal parameters
803 static final public VariableDeclaration VariableDeclaratorNoSuffix() throws ParseException {
804 final Token token, lbrace,rbrace;
805 Expression expr, initializer = null;
808 jj_consume_token(DOLLAR);
809 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
811 token = jj_consume_token(IDENTIFIER);
812 variable = new Variable(token.image,token.sourceStart,token.sourceEnd);
815 lbrace = jj_consume_token(LBRACE);
817 rbrace = jj_consume_token(RBRACE);
818 variable = new Variable(expr,lbrace.sourceStart,rbrace.sourceEnd);
822 jj_consume_token(-1);
823 throw new ParseException();
825 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
827 assignToken = jj_consume_token(ASSIGN);
829 initializer = VariableInitializer();
830 } catch (ParseException e) {
831 errorMessage = "Literal expression expected in variable initializer";
833 errorStart = assignToken.sourceEnd +1;
834 errorEnd = assignToken.sourceEnd +1;
835 processParseExceptionDebug(e);
842 if (initializer == null) {
843 {if (true) return new VariableDeclaration(currentSegment,
845 variable.sourceStart,
846 variable.sourceEnd);}
848 {if (true) return new VariableDeclaration(currentSegment,
851 VariableDeclaration.EQUAL,
852 variable.sourceStart);}
853 throw new Error("Missing return statement in function");
857 * this will be used by static statement
859 static final public VariableDeclaration VariableDeclarator() throws ParseException {
860 final AbstractVariable variable;
861 Expression initializer = null;
863 variable = VariableDeclaratorId();
864 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
866 token = jj_consume_token(ASSIGN);
868 initializer = VariableInitializer();
869 } catch (ParseException e) {
870 errorMessage = "Literal expression expected in variable initializer";
872 errorStart = token.sourceEnd+1;
873 errorEnd = token.sourceEnd+1;
874 processParseExceptionDebug(e);
881 if (initializer == null) {
882 {if (true) return new VariableDeclaration(currentSegment,
884 variable.sourceStart,
885 variable.sourceEnd);}
887 {if (true) return new VariableDeclaration(currentSegment,
890 VariableDeclaration.EQUAL,
891 variable.sourceStart);}
892 throw new Error("Missing return statement in function");
897 * @return the variable name (with suffix)
899 static final public AbstractVariable VariableDeclaratorId() throws ParseException {
901 AbstractVariable expression = null;
911 expression = VariableSuffix(var);
913 if (expression == null) {
914 {if (true) return var;}
916 {if (true) return expression;}
917 } catch (ParseException e) {
918 errorMessage = "'$' expected for variable identifier";
920 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
921 errorEnd = SimpleCharStream.getPosition() + 1;
924 throw new Error("Missing return statement in function");
927 static final public Variable Variable() throws ParseException {
928 Variable variable = null;
930 token = jj_consume_token(DOLLAR);
932 {if (true) return variable;}
933 throw new Error("Missing return statement in function");
936 static final public Variable Var() throws ParseException {
937 Variable variable = null;
938 final Token token,token2;
939 ConstantIdentifier constant;
940 Expression expression;
941 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
943 token = jj_consume_token(DOLLAR);
945 {if (true) return new Variable(variable,variable.sourceStart,variable.sourceEnd);}
948 token = jj_consume_token(LBRACE);
949 expression = Expression();
950 token2 = jj_consume_token(RBRACE);
951 {if (true) return new Variable(expression,
956 token = jj_consume_token(IDENTIFIER);
957 {if (true) return new Variable(token.image,token.sourceStart,token.sourceEnd);}
961 jj_consume_token(-1);
962 throw new ParseException();
964 throw new Error("Missing return statement in function");
967 static final public Expression VariableInitializer() throws ParseException {
968 final Expression expr;
969 final Token token, token2;
970 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
974 case INTEGER_LITERAL:
975 case FLOATING_POINT_LITERAL:
979 {if (true) return expr;}
982 token2 = jj_consume_token(MINUS);
983 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
984 case INTEGER_LITERAL:
985 token = jj_consume_token(INTEGER_LITERAL);
987 case FLOATING_POINT_LITERAL:
988 token = jj_consume_token(FLOATING_POINT_LITERAL);
992 jj_consume_token(-1);
993 throw new ParseException();
995 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
997 token2.sourceStart);}
1000 token2 = jj_consume_token(PLUS);
1001 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1002 case INTEGER_LITERAL:
1003 token = jj_consume_token(INTEGER_LITERAL);
1005 case FLOATING_POINT_LITERAL:
1006 token = jj_consume_token(FLOATING_POINT_LITERAL);
1009 jj_la1[15] = jj_gen;
1010 jj_consume_token(-1);
1011 throw new ParseException();
1013 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
1015 token2.sourceStart);}
1018 expr = ArrayDeclarator();
1019 {if (true) return expr;}
1022 token = jj_consume_token(IDENTIFIER);
1023 {if (true) return new ConstantIdentifier(token);}
1026 jj_la1[16] = jj_gen;
1027 jj_consume_token(-1);
1028 throw new ParseException();
1030 throw new Error("Missing return statement in function");
1033 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
1034 final Expression expr,expr2;
1035 expr = Expression();
1036 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1038 jj_consume_token(ARRAYASSIGN);
1039 expr2 = Expression();
1040 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
1043 jj_la1[17] = jj_gen;
1046 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
1047 throw new Error("Missing return statement in function");
1050 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
1051 ArrayVariableDeclaration expr;
1052 final ArrayList list = new ArrayList();
1053 jj_consume_token(LPAREN);
1054 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1070 case INTEGER_LITERAL:
1071 case FLOATING_POINT_LITERAL:
1072 case STRING_LITERAL:
1077 expr = ArrayVariable();
1086 jj_consume_token(COMMA);
1087 expr = ArrayVariable();
1092 jj_la1[18] = jj_gen;
1095 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1097 jj_consume_token(COMMA);
1101 jj_la1[19] = jj_gen;
1104 jj_consume_token(RPAREN);
1105 final ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1107 {if (true) return vars;}
1108 throw new Error("Missing return statement in function");
1112 * A Method Declaration.
1113 * <b>function</b> MetodDeclarator() Block()
1115 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1116 final MethodDeclaration functionDeclaration;
1118 final OutlineableWithChildren seg = currentSegment;
1120 token = jj_consume_token(FUNCTION);
1122 functionDeclaration = MethodDeclarator(token.sourceStart);
1123 outlineInfo.addVariable(functionDeclaration.name);
1124 } catch (ParseException e) {
1125 if (errorMessage != null) {if (true) throw e;}
1126 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1128 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1129 errorEnd = SimpleCharStream.getPosition() + 1;
1130 {if (true) throw e;}
1132 currentSegment = functionDeclaration;
1134 functionDeclaration.statements = block.statements;
1135 currentSegment = seg;
1136 {if (true) return functionDeclaration;}
1137 throw new Error("Missing return statement in function");
1141 * A MethodDeclarator.
1142 * [&] IDENTIFIER(parameters ...).
1143 * @return a function description for the outline
1145 static final public MethodDeclaration MethodDeclarator(final int start) throws ParseException {
1146 Token identifier = null;
1147 Token reference = null;
1148 final Hashtable formalParameters = new Hashtable();
1149 String identifierChar = SYNTAX_ERROR_CHAR;
1151 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1153 reference = jj_consume_token(BIT_AND);
1154 end = reference.sourceEnd;
1157 jj_la1[20] = jj_gen;
1161 identifier = jj_consume_token(IDENTIFIER);
1162 identifierChar = identifier.image;
1163 end = identifier.sourceEnd;
1164 } catch (ParseException e) {
1165 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1167 errorStart = e.currentToken.sourceEnd;
1168 errorEnd = e.currentToken.next.sourceStart;
1169 processParseExceptionDebug(e);
1171 end = FormalParameters(formalParameters);
1172 int nameStart, nameEnd;
1173 if (identifier == null) {
1174 if (reference == null) {
1175 nameStart = start + 9;
1176 nameEnd = start + 10;
1178 nameStart = reference.sourceEnd + 1;
1179 nameEnd = reference.sourceEnd + 2;
1182 nameStart = identifier.sourceStart;
1183 nameEnd = identifier.sourceEnd;
1185 {if (true) return new MethodDeclaration(currentSegment,
1193 throw new Error("Missing return statement in function");
1197 * FormalParameters follows method identifier.
1198 * (FormalParameter())
1200 static final public int FormalParameters(final Hashtable parameters) throws ParseException {
1201 VariableDeclaration var;
1203 Token tok = PHPParser.token;
1204 int end = tok.sourceEnd;
1206 tok = jj_consume_token(LPAREN);
1207 end = tok.sourceEnd;
1208 } catch (ParseException e) {
1209 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1211 errorStart = e.currentToken.next.sourceStart;
1212 errorEnd = e.currentToken.next.sourceEnd;
1213 processParseExceptionDebug(e);
1215 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1218 var = FormalParameter();
1219 parameters.put(var.name(),var);end = var.sourceEnd;
1222 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1227 jj_la1[21] = jj_gen;
1230 jj_consume_token(COMMA);
1231 var = FormalParameter();
1232 parameters.put(var.name(),var);end = var.sourceEnd;
1236 jj_la1[22] = jj_gen;
1240 token = jj_consume_token(RPAREN);
1241 end = token.sourceEnd;
1242 } catch (ParseException e) {
1243 errorMessage = "')' expected";
1245 errorStart = e.currentToken.next.sourceStart;
1246 errorEnd = e.currentToken.next.sourceEnd;
1247 processParseExceptionDebug(e);
1249 {if (true) return end;}
1250 throw new Error("Missing return statement in function");
1254 * A formal parameter.
1255 * $varname[=value] (,$varname[=value])
1257 static final public VariableDeclaration FormalParameter() throws ParseException {
1258 final VariableDeclaration variableDeclaration;
1260 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1262 token = jj_consume_token(BIT_AND);
1265 jj_la1[23] = jj_gen;
1268 variableDeclaration = VariableDeclaratorNoSuffix();
1269 if (token != null) {
1270 variableDeclaration.setReference(true);
1272 {if (true) return variableDeclaration;}
1273 throw new Error("Missing return statement in function");
1276 static final public ConstantIdentifier Type() throws ParseException {
1278 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1280 token = jj_consume_token(STRING);
1281 {if (true) return new ConstantIdentifier(token);}
1284 token = jj_consume_token(BOOL);
1285 {if (true) return new ConstantIdentifier(token);}
1288 token = jj_consume_token(BOOLEAN);
1289 {if (true) return new ConstantIdentifier(token);}
1292 token = jj_consume_token(REAL);
1293 {if (true) return new ConstantIdentifier(token);}
1296 token = jj_consume_token(DOUBLE);
1297 {if (true) return new ConstantIdentifier(token);}
1300 token = jj_consume_token(FLOAT);
1301 {if (true) return new ConstantIdentifier(token);}
1304 token = jj_consume_token(INT);
1305 {if (true) return new ConstantIdentifier(token);}
1308 token = jj_consume_token(INTEGER);
1309 {if (true) return new ConstantIdentifier(token);}
1312 token = jj_consume_token(OBJECT);
1313 {if (true) return new ConstantIdentifier(token);}
1316 jj_la1[24] = jj_gen;
1317 jj_consume_token(-1);
1318 throw new ParseException();
1320 throw new Error("Missing return statement in function");
1323 static final public Expression Expression() throws ParseException {
1324 final Expression expr;
1325 Expression initializer = null;
1326 int assignOperator = -1;
1327 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1341 case INTEGER_LITERAL:
1342 case FLOATING_POINT_LITERAL:
1343 case STRING_LITERAL:
1348 expr = ConditionalExpression();
1349 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1362 case RSIGNEDSHIFTASSIGN:
1363 assignOperator = AssignmentOperator();
1365 initializer = Expression();
1366 } catch (ParseException e) {
1367 if (errorMessage != null) {
1368 {if (true) throw e;}
1370 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1372 errorEnd = SimpleCharStream.getPosition();
1373 {if (true) throw e;}
1377 jj_la1[25] = jj_gen;
1380 if (assignOperator != -1) {// todo : change this, very very bad :(
1381 if (expr instanceof AbstractVariable) {
1382 {if (true) return new VariableDeclaration(currentSegment,
1383 (AbstractVariable) expr,
1386 initializer.sourceEnd);}
1388 String varName = expr.toStringExpression().substring(1);
1389 {if (true) return new VariableDeclaration(currentSegment,
1390 new Variable(varName,
1394 initializer.sourceEnd);}
1396 {if (true) return expr;}
1400 expr = ExpressionWBang();
1401 {if (true) return expr;}
1404 jj_la1[26] = jj_gen;
1405 jj_consume_token(-1);
1406 throw new ParseException();
1408 throw new Error("Missing return statement in function");
1411 static final public Expression ExpressionWBang() throws ParseException {
1412 final Expression expr;
1414 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1416 token = jj_consume_token(BANG);
1417 expr = ExpressionWBang();
1418 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
1422 expr = ExpressionNoBang();
1423 {if (true) return expr;}
1426 jj_la1[27] = jj_gen;
1427 jj_consume_token(-1);
1428 throw new ParseException();
1430 throw new Error("Missing return statement in function");
1433 static final public Expression ExpressionNoBang() throws ParseException {
1435 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1437 expr = ListExpression();
1438 {if (true) return expr;}
1441 expr = PrintExpression();
1442 {if (true) return expr;}
1445 jj_la1[28] = jj_gen;
1446 jj_consume_token(-1);
1447 throw new ParseException();
1449 throw new Error("Missing return statement in function");
1453 * Any assignement operator.
1454 * @return the assignement operator id
1456 static final public int AssignmentOperator() throws ParseException {
1457 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1459 jj_consume_token(ASSIGN);
1460 {if (true) return VariableDeclaration.EQUAL;}
1463 jj_consume_token(STARASSIGN);
1464 {if (true) return VariableDeclaration.STAR_EQUAL;}
1467 jj_consume_token(SLASHASSIGN);
1468 {if (true) return VariableDeclaration.SLASH_EQUAL;}
1471 jj_consume_token(REMASSIGN);
1472 {if (true) return VariableDeclaration.REM_EQUAL;}
1475 jj_consume_token(PLUSASSIGN);
1476 {if (true) return VariableDeclaration.PLUS_EQUAL;}
1479 jj_consume_token(MINUSASSIGN);
1480 {if (true) return VariableDeclaration.MINUS_EQUAL;}
1483 jj_consume_token(LSHIFTASSIGN);
1484 {if (true) return VariableDeclaration.LSHIFT_EQUAL;}
1486 case RSIGNEDSHIFTASSIGN:
1487 jj_consume_token(RSIGNEDSHIFTASSIGN);
1488 {if (true) return VariableDeclaration.RSIGNEDSHIFT_EQUAL;}
1491 jj_consume_token(ANDASSIGN);
1492 {if (true) return VariableDeclaration.AND_EQUAL;}
1495 jj_consume_token(XORASSIGN);
1496 {if (true) return VariableDeclaration.XOR_EQUAL;}
1499 jj_consume_token(ORASSIGN);
1500 {if (true) return VariableDeclaration.OR_EQUAL;}
1503 jj_consume_token(DOTASSIGN);
1504 {if (true) return VariableDeclaration.DOT_EQUAL;}
1507 jj_consume_token(TILDEEQUAL);
1508 {if (true) return VariableDeclaration.TILDE_EQUAL;}
1511 jj_la1[29] = jj_gen;
1512 jj_consume_token(-1);
1513 throw new ParseException();
1515 throw new Error("Missing return statement in function");
1518 static final public Expression ConditionalExpression() throws ParseException {
1519 final Expression expr;
1520 Expression expr2 = null;
1521 Expression expr3 = null;
1522 expr = ConditionalOrExpression();
1523 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1525 jj_consume_token(HOOK);
1526 expr2 = Expression();
1527 jj_consume_token(COLON);
1528 expr3 = ConditionalExpression();
1531 jj_la1[30] = jj_gen;
1534 if (expr3 == null) {
1535 {if (true) return expr;}
1537 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1538 throw new Error("Missing return statement in function");
1541 static final public Expression ConditionalOrExpression() throws ParseException {
1542 Expression expr,expr2;
1544 expr = ConditionalAndExpression();
1547 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1553 jj_la1[31] = jj_gen;
1556 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1558 jj_consume_token(OR_OR);
1559 operator = OperatorIds.OR_OR;
1562 jj_consume_token(_ORL);
1563 operator = OperatorIds.ORL;
1566 jj_la1[32] = jj_gen;
1567 jj_consume_token(-1);
1568 throw new ParseException();
1570 expr2 = ConditionalAndExpression();
1571 expr = new BinaryExpression(expr,expr2,operator);
1573 {if (true) return expr;}
1574 throw new Error("Missing return statement in function");
1577 static final public Expression ConditionalAndExpression() throws ParseException {
1578 Expression expr,expr2;
1580 expr = ConcatExpression();
1583 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1589 jj_la1[33] = jj_gen;
1592 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1594 jj_consume_token(AND_AND);
1595 operator = OperatorIds.AND_AND;
1598 jj_consume_token(_ANDL);
1599 operator = OperatorIds.ANDL;
1602 jj_la1[34] = jj_gen;
1603 jj_consume_token(-1);
1604 throw new ParseException();
1606 expr2 = ConcatExpression();
1607 expr = new BinaryExpression(expr,expr2,operator);
1609 {if (true) return expr;}
1610 throw new Error("Missing return statement in function");
1613 static final public Expression ConcatExpression() throws ParseException {
1614 Expression expr,expr2;
1615 expr = InclusiveOrExpression();
1618 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1623 jj_la1[35] = jj_gen;
1626 jj_consume_token(DOT);
1627 expr2 = InclusiveOrExpression();
1628 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1630 {if (true) return expr;}
1631 throw new Error("Missing return statement in function");
1634 static final public Expression InclusiveOrExpression() throws ParseException {
1635 Expression expr,expr2;
1636 expr = ExclusiveOrExpression();
1639 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1644 jj_la1[36] = jj_gen;
1647 jj_consume_token(BIT_OR);
1648 expr2 = ExclusiveOrExpression();
1649 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1651 {if (true) return expr;}
1652 throw new Error("Missing return statement in function");
1655 static final public Expression ExclusiveOrExpression() throws ParseException {
1656 Expression expr,expr2;
1657 expr = AndExpression();
1660 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1665 jj_la1[37] = jj_gen;
1668 jj_consume_token(XOR);
1669 expr2 = AndExpression();
1670 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1672 {if (true) return expr;}
1673 throw new Error("Missing return statement in function");
1676 static final public Expression AndExpression() throws ParseException {
1677 Expression expr,expr2;
1678 expr = EqualityExpression();
1681 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1686 jj_la1[38] = jj_gen;
1689 jj_consume_token(BIT_AND);
1690 expr2 = EqualityExpression();
1691 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1693 {if (true) return expr;}
1694 throw new Error("Missing return statement in function");
1697 static final public Expression EqualityExpression() throws ParseException {
1698 Expression expr,expr2;
1701 expr = RelationalExpression();
1704 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1708 case BANGDOUBLEEQUAL:
1713 jj_la1[39] = jj_gen;
1716 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1718 token = jj_consume_token(EQUAL_EQUAL);
1719 operator = OperatorIds.EQUAL_EQUAL;
1722 token = jj_consume_token(DIF);
1723 operator = OperatorIds.DIF;
1726 token = jj_consume_token(NOT_EQUAL);
1727 operator = OperatorIds.DIF;
1729 case BANGDOUBLEEQUAL:
1730 token = jj_consume_token(BANGDOUBLEEQUAL);
1731 operator = OperatorIds.BANG_EQUAL_EQUAL;
1734 token = jj_consume_token(TRIPLEEQUAL);
1735 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1738 jj_la1[40] = jj_gen;
1739 jj_consume_token(-1);
1740 throw new ParseException();
1743 expr2 = RelationalExpression();
1744 } catch (ParseException e) {
1745 if (errorMessage != null) {
1746 {if (true) throw e;}
1748 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1750 errorStart = token.sourceEnd +1;
1751 errorEnd = token.sourceEnd +1;
1752 expr2 = new ConstantIdentifier(SYNTAX_ERROR_CHAR,token.sourceEnd +1,token.sourceEnd +1);
1753 processParseExceptionDebug(e);
1755 expr = new BinaryExpression(expr,expr2,operator);
1757 {if (true) return expr;}
1758 throw new Error("Missing return statement in function");
1761 static final public Expression RelationalExpression() throws ParseException {
1762 Expression expr,expr2;
1764 expr = ShiftExpression();
1767 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1775 jj_la1[41] = jj_gen;
1778 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1780 jj_consume_token(LT);
1781 operator = OperatorIds.LESS;
1784 jj_consume_token(GT);
1785 operator = OperatorIds.GREATER;
1788 jj_consume_token(LE);
1789 operator = OperatorIds.LESS_EQUAL;
1792 jj_consume_token(GE);
1793 operator = OperatorIds.GREATER_EQUAL;
1796 jj_la1[42] = jj_gen;
1797 jj_consume_token(-1);
1798 throw new ParseException();
1800 expr2 = ShiftExpression();
1801 expr = new BinaryExpression(expr,expr2,operator);
1803 {if (true) return expr;}
1804 throw new Error("Missing return statement in function");
1807 static final public Expression ShiftExpression() throws ParseException {
1808 Expression expr,expr2;
1810 expr = AdditiveExpression();
1813 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1816 case RUNSIGNEDSHIFT:
1820 jj_la1[43] = jj_gen;
1823 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1825 jj_consume_token(LSHIFT);
1826 operator = OperatorIds.LEFT_SHIFT;
1829 jj_consume_token(RSIGNEDSHIFT);
1830 operator = OperatorIds.RIGHT_SHIFT;
1832 case RUNSIGNEDSHIFT:
1833 jj_consume_token(RUNSIGNEDSHIFT);
1834 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1837 jj_la1[44] = jj_gen;
1838 jj_consume_token(-1);
1839 throw new ParseException();
1841 expr2 = AdditiveExpression();
1842 expr = new BinaryExpression(expr,expr2,operator);
1844 {if (true) return expr;}
1845 throw new Error("Missing return statement in function");
1848 static final public Expression AdditiveExpression() throws ParseException {
1849 Expression expr,expr2;
1851 expr = MultiplicativeExpression();
1854 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1860 jj_la1[45] = jj_gen;
1863 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1865 jj_consume_token(PLUS);
1866 operator = OperatorIds.PLUS;
1869 jj_consume_token(MINUS);
1870 operator = OperatorIds.MINUS;
1873 jj_la1[46] = jj_gen;
1874 jj_consume_token(-1);
1875 throw new ParseException();
1877 expr2 = MultiplicativeExpression();
1878 expr = new BinaryExpression(expr,expr2,operator);
1880 {if (true) return expr;}
1881 throw new Error("Missing return statement in function");
1884 static final public Expression MultiplicativeExpression() throws ParseException {
1885 Expression expr,expr2;
1888 expr = UnaryExpression();
1889 } catch (ParseException e) {
1890 if (errorMessage != null) {if (true) throw e;}
1891 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1893 errorStart = PHPParser.token.sourceStart;
1894 errorEnd = PHPParser.token.sourceEnd;
1895 {if (true) throw e;}
1899 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1906 jj_la1[47] = jj_gen;
1909 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1911 jj_consume_token(STAR);
1912 operator = OperatorIds.MULTIPLY;
1915 jj_consume_token(SLASH);
1916 operator = OperatorIds.DIVIDE;
1919 jj_consume_token(REMAINDER);
1920 operator = OperatorIds.REMAINDER;
1923 jj_la1[48] = jj_gen;
1924 jj_consume_token(-1);
1925 throw new ParseException();
1927 expr2 = UnaryExpression();
1928 expr = new BinaryExpression(expr,expr2,operator);
1930 {if (true) return expr;}
1931 throw new Error("Missing return statement in function");
1935 * An unary expression starting with @, & or nothing
1937 static final public Expression UnaryExpression() throws ParseException {
1938 final Expression expr;
1939 /* <BIT_AND> expr = UnaryExpressionNoPrefix() //why did I had that ?
1940 {return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1942 expr = AtNotTildeUnaryExpression();
1943 {if (true) return expr;}
1944 throw new Error("Missing return statement in function");
1947 static final public Expression AtNotTildeUnaryExpression() throws ParseException {
1948 final Expression expr;
1950 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1952 token = jj_consume_token(AT);
1953 expr = AtNotTildeUnaryExpression();
1954 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,token.sourceStart);}
1957 token = jj_consume_token(TILDE);
1958 expr = AtNotTildeUnaryExpression();
1959 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.TWIDDLE,token.sourceStart);}
1962 token = jj_consume_token(BANG);
1963 expr = AtNotUnaryExpression();
1964 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
1976 case INTEGER_LITERAL:
1977 case FLOATING_POINT_LITERAL:
1978 case STRING_LITERAL:
1983 expr = UnaryExpressionNoPrefix();
1984 {if (true) return expr;}
1987 jj_la1[49] = jj_gen;
1988 jj_consume_token(-1);
1989 throw new ParseException();
1991 throw new Error("Missing return statement in function");
1995 * An expression prefixed (or not) by one or more @ and !.
1996 * @return the expression
1998 static final public Expression AtNotUnaryExpression() throws ParseException {
1999 final Expression expr;
2001 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2003 token = jj_consume_token(AT);
2004 expr = AtNotUnaryExpression();
2005 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,token.sourceStart);}
2008 token = jj_consume_token(BANG);
2009 expr = AtNotUnaryExpression();
2010 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
2022 case INTEGER_LITERAL:
2023 case FLOATING_POINT_LITERAL:
2024 case STRING_LITERAL:
2029 expr = UnaryExpressionNoPrefix();
2030 {if (true) return expr;}
2033 jj_la1[50] = jj_gen;
2034 jj_consume_token(-1);
2035 throw new ParseException();
2037 throw new Error("Missing return statement in function");
2040 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
2041 final Expression expr;
2043 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2045 token = jj_consume_token(PLUS);
2046 expr = AtNotTildeUnaryExpression();
2047 {if (true) return new PrefixedUnaryExpression(expr,
2049 token.sourceStart);}
2052 token = jj_consume_token(MINUS);
2053 expr = AtNotTildeUnaryExpression();
2054 {if (true) return new PrefixedUnaryExpression(expr,
2056 token.sourceStart);}
2060 expr = PreIncDecExpression();
2061 {if (true) return expr;}
2069 case INTEGER_LITERAL:
2070 case FLOATING_POINT_LITERAL:
2071 case STRING_LITERAL:
2076 expr = UnaryExpressionNotPlusMinus();
2077 {if (true) return expr;}
2080 jj_la1[51] = jj_gen;
2081 jj_consume_token(-1);
2082 throw new ParseException();
2084 throw new Error("Missing return statement in function");
2087 static final public Expression PreIncDecExpression() throws ParseException {
2088 final Expression expr;
2091 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2093 token = jj_consume_token(PLUS_PLUS);
2094 operator = OperatorIds.PLUS_PLUS;
2097 token = jj_consume_token(MINUS_MINUS);
2098 operator = OperatorIds.MINUS_MINUS;
2101 jj_la1[52] = jj_gen;
2102 jj_consume_token(-1);
2103 throw new ParseException();
2105 expr = PrimaryExpression();
2106 {if (true) return new PrefixedUnaryExpression(expr,operator,token.sourceStart);}
2107 throw new Error("Missing return statement in function");
2110 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
2111 final Expression expr;
2112 if (jj_2_3(2147483647)) {
2113 expr = CastExpression();
2114 {if (true) return expr;}
2116 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2122 expr = PostfixExpression();
2123 {if (true) return expr;}
2128 case INTEGER_LITERAL:
2129 case FLOATING_POINT_LITERAL:
2130 case STRING_LITERAL:
2133 {if (true) return expr;}
2136 jj_consume_token(LPAREN);
2137 expr = Expression();
2139 jj_consume_token(RPAREN);
2140 } catch (ParseException e) {
2141 errorMessage = "')' expected";
2143 errorStart = expr.sourceEnd +1;
2144 errorEnd = expr.sourceEnd +1;
2145 processParseExceptionDebug(e);
2147 {if (true) return expr;}
2150 jj_la1[53] = jj_gen;
2151 jj_consume_token(-1);
2152 throw new ParseException();
2155 throw new Error("Missing return statement in function");
2158 static final public CastExpression CastExpression() throws ParseException {
2159 final ConstantIdentifier type;
2160 final Expression expr;
2161 final Token token,token1;
2162 token1 = jj_consume_token(LPAREN);
2163 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2176 token = jj_consume_token(ARRAY);
2177 type = new ConstantIdentifier(token);
2180 jj_la1[54] = jj_gen;
2181 jj_consume_token(-1);
2182 throw new ParseException();
2184 jj_consume_token(RPAREN);
2185 expr = UnaryExpression();
2186 {if (true) return new CastExpression(type,expr,token1.sourceStart,expr.sourceEnd);}
2187 throw new Error("Missing return statement in function");
2190 static final public Expression PostfixExpression() throws ParseException {
2191 final Expression expr;
2194 expr = PrimaryExpression();
2195 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2198 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2200 token = jj_consume_token(PLUS_PLUS);
2201 operator = OperatorIds.PLUS_PLUS;
2204 token = jj_consume_token(MINUS_MINUS);
2205 operator = OperatorIds.MINUS_MINUS;
2208 jj_la1[55] = jj_gen;
2209 jj_consume_token(-1);
2210 throw new ParseException();
2214 jj_la1[56] = jj_gen;
2217 if (operator == -1) {
2218 {if (true) return expr;}
2220 {if (true) return new PostfixedUnaryExpression(expr,operator,token.sourceEnd);}
2221 throw new Error("Missing return statement in function");
2224 static final public Expression PrimaryExpression() throws ParseException {
2227 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2232 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2234 token = jj_consume_token(BIT_AND);
2237 jj_la1[57] = jj_gen;
2240 expr = refPrimaryExpression(token);
2241 {if (true) return expr;}
2244 expr = ArrayDeclarator();
2245 {if (true) return expr;}
2248 jj_la1[58] = jj_gen;
2249 jj_consume_token(-1);
2250 throw new ParseException();
2252 throw new Error("Missing return statement in function");
2255 static final public Expression refPrimaryExpression(final Token reference) throws ParseException {
2257 Expression expr2 = null;
2258 final Token identifier;
2259 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2261 identifier = jj_consume_token(IDENTIFIER);
2262 expr = new ConstantIdentifier(identifier);
2265 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2266 case STATICCLASSACCESS:
2270 jj_la1[59] = jj_gen;
2273 jj_consume_token(STATICCLASSACCESS);
2274 expr2 = ClassIdentifier();
2275 expr = new ClassAccess(expr,
2277 ClassAccess.STATIC);
2279 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2281 expr2 = Arguments(expr);
2284 jj_la1[60] = jj_gen;
2287 if (expr2 == null) {
2288 if (reference != null) {
2289 ParseException e = generateParseException();
2290 errorMessage = "you cannot use a constant by reference";
2292 errorStart = reference.sourceStart;
2293 errorEnd = reference.sourceEnd;
2294 processParseExceptionDebug(e);
2296 {if (true) return expr;}
2298 {if (true) return expr2;}
2301 expr = VariableDeclaratorId();
2302 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2304 expr = Arguments(expr);
2307 jj_la1[61] = jj_gen;
2310 {if (true) return expr;}
2313 token = jj_consume_token(NEW);
2314 expr = ClassIdentifier();
2316 if (reference == null) {
2317 start = token.sourceStart;
2319 start = reference.sourceStart;
2321 expr = new ClassInstantiation(expr,
2324 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2326 expr = Arguments(expr);
2329 jj_la1[62] = jj_gen;
2332 {if (true) return expr;}
2335 jj_la1[63] = jj_gen;
2336 jj_consume_token(-1);
2337 throw new ParseException();
2339 throw new Error("Missing return statement in function");
2343 * An array declarator.
2347 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2348 final ArrayVariableDeclaration[] vars;
2350 token = jj_consume_token(ARRAY);
2351 vars = ArrayInitializer();
2352 {if (true) return new ArrayInitializer(vars,
2354 PHPParser.token.sourceEnd);}
2355 throw new Error("Missing return statement in function");
2358 static final public Expression ClassIdentifier() throws ParseException {
2359 final Expression expr;
2361 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2363 token = jj_consume_token(IDENTIFIER);
2364 {if (true) return new ConstantIdentifier(token);}
2376 {if (true) return expr;}
2379 expr = VariableDeclaratorId();
2380 {if (true) return expr;}
2383 jj_la1[64] = jj_gen;
2384 jj_consume_token(-1);
2385 throw new ParseException();
2387 throw new Error("Missing return statement in function");
2391 * Used by Variabledeclaratorid and primarysuffix
2393 static final public AbstractVariable VariableSuffix(final AbstractVariable prefix) throws ParseException {
2394 Expression expression = null;
2395 final Token classAccessToken,lbrace,rbrace;
2398 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2400 classAccessToken = jj_consume_token(CLASSACCESS);
2402 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2404 lbrace = jj_consume_token(LBRACE);
2405 expression = Expression();
2406 rbrace = jj_consume_token(RBRACE);
2407 expression = new Variable(expression,
2412 token = jj_consume_token(IDENTIFIER);
2413 expression = new ConstantIdentifier(token.image,token.sourceStart,token.sourceEnd);
2416 expression = Variable();
2419 jj_la1[65] = jj_gen;
2420 jj_consume_token(-1);
2421 throw new ParseException();
2423 } catch (ParseException e) {
2424 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2426 errorStart = classAccessToken.sourceEnd +1;
2427 errorEnd = classAccessToken.sourceEnd +1;
2428 processParseExceptionDebug(e);
2430 {if (true) return new ClassAccess(prefix,
2432 ClassAccess.NORMAL);}
2435 token = jj_consume_token(LBRACKET);
2436 pos = token.sourceEnd+1;
2437 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2462 case INTEGER_LITERAL:
2463 case FLOATING_POINT_LITERAL:
2464 case STRING_LITERAL:
2469 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2485 case INTEGER_LITERAL:
2486 case FLOATING_POINT_LITERAL:
2487 case STRING_LITERAL:
2492 expression = Expression();
2493 pos = expression.sourceEnd+1;
2504 expression = Type();
2505 pos = expression.sourceEnd+1;
2508 jj_la1[66] = jj_gen;
2509 jj_consume_token(-1);
2510 throw new ParseException();
2514 jj_la1[67] = jj_gen;
2518 token = jj_consume_token(RBRACKET);
2519 pos = token.sourceEnd;
2520 } catch (ParseException e) {
2521 errorMessage = "']' expected";
2525 processParseExceptionDebug(e);
2527 {if (true) return new ArrayDeclarator(prefix,expression,pos);}
2530 token = jj_consume_token(LBRACE);
2531 pos = token.sourceEnd+1;
2532 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2557 case INTEGER_LITERAL:
2558 case FLOATING_POINT_LITERAL:
2559 case STRING_LITERAL:
2564 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2580 case INTEGER_LITERAL:
2581 case FLOATING_POINT_LITERAL:
2582 case STRING_LITERAL:
2587 expression = Expression();
2588 pos = expression.sourceEnd+1;
2599 expression = Type();
2600 pos = expression.sourceEnd+1;
2603 jj_la1[68] = jj_gen;
2604 jj_consume_token(-1);
2605 throw new ParseException();
2609 jj_la1[69] = jj_gen;
2613 token = jj_consume_token(RBRACE);
2614 pos = token.sourceEnd;
2615 } catch (ParseException e) {
2616 errorMessage = "']' expected";
2620 processParseExceptionDebug(e);
2622 {if (true) return new ArrayDeclarator(prefix,expression,pos);}
2625 jj_la1[70] = jj_gen;
2626 jj_consume_token(-1);
2627 throw new ParseException();
2629 throw new Error("Missing return statement in function");
2632 static final public Literal Literal() throws ParseException {
2634 StringLiteral literal;
2635 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2636 case INTEGER_LITERAL:
2637 token = jj_consume_token(INTEGER_LITERAL);
2638 {if (true) return new NumberLiteral(token);}
2640 case FLOATING_POINT_LITERAL:
2641 token = jj_consume_token(FLOATING_POINT_LITERAL);
2642 {if (true) return new NumberLiteral(token);}
2644 case STRING_LITERAL:
2645 token = jj_consume_token(STRING_LITERAL);
2646 {if (true) return new StringLiteral(token);}
2649 token = jj_consume_token(TRUE);
2650 {if (true) return new TrueLiteral(token);}
2653 token = jj_consume_token(FALSE);
2654 {if (true) return new FalseLiteral(token);}
2657 token = jj_consume_token(NULL);
2658 {if (true) return new NullLiteral(token);}
2661 literal = evaluableString();
2662 {if (true) return literal;}
2665 jj_la1[71] = jj_gen;
2666 jj_consume_token(-1);
2667 throw new ParseException();
2669 throw new Error("Missing return statement in function");
2672 static final public StringLiteral evaluableString() throws ParseException {
2673 ArrayList list = new ArrayList();
2675 Token token,lbrace,rbrace;
2676 AbstractVariable var;
2678 start = jj_consume_token(DOUBLEQUOTE);
2681 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2686 jj_la1[72] = jj_gen;
2689 jj_consume_token(DOLLARS);
2690 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2692 token = jj_consume_token(IDENTIFIER);
2693 list.add(new Variable(token.image,
2698 lbrace = jj_consume_token(LBRACE1);
2699 token = jj_consume_token(ID);
2700 list.add(new Variable(token.image,
2703 rbrace = jj_consume_token(RBRACE1);
2706 jj_la1[73] = jj_gen;
2707 jj_consume_token(-1);
2708 throw new ParseException();
2711 end = jj_consume_token(DOUBLEQUOTE2);
2712 AbstractVariable[] vars = new AbstractVariable[list.size()];
2714 {if (true) return new StringLiteral(SimpleCharStream.currentBuffer.substring(start.sourceEnd,end.sourceStart),
2718 throw new Error("Missing return statement in function");
2721 static final public FunctionCall Arguments(final Expression func) throws ParseException {
2722 Expression[] args = null;
2723 final Token token,lparen;
2724 lparen = jj_consume_token(LPAREN);
2725 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2741 case INTEGER_LITERAL:
2742 case FLOATING_POINT_LITERAL:
2743 case STRING_LITERAL:
2748 args = ArgumentList();
2751 jj_la1[74] = jj_gen;
2755 token = jj_consume_token(RPAREN);
2756 {if (true) return new FunctionCall(func,args,token.sourceEnd);}
2757 } catch (ParseException e) {
2758 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2761 errorStart = lparen.sourceEnd+1;
2762 errorEnd = lparen.sourceEnd+2;
2764 errorStart = args[args.length-1].sourceEnd+1;
2765 errorEnd = args[args.length-1].sourceEnd+2;
2767 processParseExceptionDebug(e);
2769 int sourceEnd = (args == null && args.length != 0) ? lparen.sourceEnd+1 : args[args.length-1].sourceEnd;
2770 {if (true) return new FunctionCall(func,args,sourceEnd);}
2771 throw new Error("Missing return statement in function");
2775 * An argument list is a list of arguments separated by comma :
2776 * argumentDeclaration() (, argumentDeclaration)*
2777 * @return an array of arguments
2779 static final public Expression[] ArgumentList() throws ParseException {
2781 final ArrayList list = new ArrayList();
2785 list.add(arg);pos = arg.sourceEnd;
2788 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2793 jj_la1[75] = jj_gen;
2796 token = jj_consume_token(COMMA);
2797 pos = token.sourceEnd;
2801 pos = arg.sourceEnd;
2802 } catch (ParseException e) {
2803 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2807 processParseException(e);
2810 final Expression[] arguments = new Expression[list.size()];
2811 list.toArray(arguments);
2812 {if (true) return arguments;}
2813 throw new Error("Missing return statement in function");
2817 * A Statement without break.
2818 * @return a statement
2820 static final public Statement StatementNoBreak() throws ParseException {
2821 final Statement statement;
2824 statement = expressionStatement();
2825 {if (true) return statement;}
2827 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2829 statement = LabeledStatement();
2830 {if (true) return statement;}
2833 statement = Block();
2834 {if (true) return statement;}
2837 statement = EmptyStatement();
2838 {if (true) return statement;}
2841 statement = SwitchStatement();
2842 {if (true) return statement;}
2845 statement = IfStatement();
2846 {if (true) return statement;}
2849 statement = WhileStatement();
2850 {if (true) return statement;}
2853 statement = DoStatement();
2854 {if (true) return statement;}
2857 statement = ForStatement();
2858 {if (true) return statement;}
2861 statement = ForeachStatement();
2862 {if (true) return statement;}
2865 statement = ContinueStatement();
2866 {if (true) return statement;}
2869 statement = ReturnStatement();
2870 {if (true) return statement;}
2873 statement = EchoStatement();
2874 {if (true) return statement;}
2881 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2883 token = jj_consume_token(AT);
2886 jj_la1[76] = jj_gen;
2889 statement = IncludeStatement();
2890 if (token != null) {
2891 ((InclusionStatement)statement).silent = true;
2892 statement.sourceStart = token.sourceStart;
2894 {if (true) return statement;}
2897 statement = StaticStatement();
2898 {if (true) return statement;}
2901 statement = GlobalStatement();
2902 {if (true) return statement;}
2905 statement = defineStatement();
2906 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2909 jj_la1[77] = jj_gen;
2910 jj_consume_token(-1);
2911 throw new ParseException();
2914 throw new Error("Missing return statement in function");
2918 * A statement expression.
2920 * @return an expression
2922 static final public Statement expressionStatement() throws ParseException {
2923 final Statement statement;
2925 statement = Expression();
2927 token = jj_consume_token(SEMICOLON);
2928 statement.sourceEnd = token.sourceEnd;
2929 } catch (ParseException e) {
2930 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2931 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2933 errorStart = statement.sourceEnd+1;
2934 errorEnd = statement.sourceEnd+1;
2935 processParseExceptionDebug(e);
2938 {if (true) return statement;}
2939 throw new Error("Missing return statement in function");
2942 static final public Define defineStatement() throws ParseException {
2943 Expression defineName,defineValue;
2944 final Token defineToken;
2947 defineToken = jj_consume_token(DEFINE);
2948 pos = defineToken.sourceEnd+1;
2950 token = jj_consume_token(LPAREN);
2951 pos = token.sourceEnd+1;
2952 } catch (ParseException e) {
2953 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2957 processParseExceptionDebug(e);
2960 defineName = Expression();
2961 pos = defineName.sourceEnd+1;
2962 } catch (ParseException e) {
2963 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2967 processParseExceptionDebug(e);
2968 defineName = new StringLiteral(SYNTAX_ERROR_CHAR,pos,pos);
2971 token = jj_consume_token(COMMA);
2972 pos = defineName.sourceEnd+1;
2973 } catch (ParseException e) {
2974 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2978 processParseExceptionDebug(e);
2981 defineValue = Expression();
2982 pos = defineValue.sourceEnd+1;
2983 } catch (ParseException e) {
2984 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2988 processParseExceptionDebug(e);
2989 defineValue = new StringLiteral(SYNTAX_ERROR_CHAR,pos,pos);
2992 token = jj_consume_token(RPAREN);
2993 pos = token.sourceEnd+1;
2994 } catch (ParseException e) {
2995 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2999 processParseExceptionDebug(e);
3001 {if (true) return new Define(currentSegment,
3004 defineToken.sourceStart,
3006 throw new Error("Missing return statement in function");
3010 * A Normal statement.
3012 static final public Statement Statement() throws ParseException {
3013 final Statement statement;
3014 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3046 case INTEGER_LITERAL:
3047 case FLOATING_POINT_LITERAL:
3048 case STRING_LITERAL:
3055 statement = StatementNoBreak();
3056 {if (true) return statement;}
3059 statement = BreakStatement();
3060 {if (true) return statement;}
3063 jj_la1[78] = jj_gen;
3064 jj_consume_token(-1);
3065 throw new ParseException();
3067 throw new Error("Missing return statement in function");
3071 * An html block inside a php syntax.
3073 static final public HTMLBlock htmlBlock() throws ParseException {
3074 final int startIndex = nodePtr;
3075 final AstNode[] blockNodes;
3078 phpEnd = jj_consume_token(PHPEND);
3079 htmlStart = phpEnd.sourceEnd;
3082 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3087 jj_la1[79] = jj_gen;
3093 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3095 jj_consume_token(PHPSTARTLONG);
3098 jj_consume_token(PHPSTARTSHORT);
3101 jj_la1[80] = jj_gen;
3102 jj_consume_token(-1);
3103 throw new ParseException();
3105 PHPParser.createNewHTMLCode();
3106 } catch (ParseException e) {
3107 errorMessage = "unexpected end of file , '<?php' expected";
3109 errorStart = SimpleCharStream.getPosition();
3110 errorEnd = SimpleCharStream.getPosition();
3111 {if (true) throw e;}
3113 nbNodes = nodePtr - startIndex;
3115 {if (true) return null;}
3117 blockNodes = new AstNode[nbNodes];
3118 System.arraycopy(nodes,startIndex+1,blockNodes,0,nbNodes);
3119 nodePtr = startIndex;
3120 {if (true) return new HTMLBlock(blockNodes);}
3121 throw new Error("Missing return statement in function");
3125 * An include statement. It's "include" an expression;
3127 static final public InclusionStatement IncludeStatement() throws ParseException {
3130 final InclusionStatement inclusionStatement;
3131 final Token token, token2;
3133 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3135 token = jj_consume_token(REQUIRE);
3136 keyword = InclusionStatement.REQUIRE;pos=token.sourceEnd;
3139 token = jj_consume_token(REQUIRE_ONCE);
3140 keyword = InclusionStatement.REQUIRE_ONCE;pos=token.sourceEnd;
3143 token = jj_consume_token(INCLUDE);
3144 keyword = InclusionStatement.INCLUDE;pos=token.sourceEnd;
3147 token = jj_consume_token(INCLUDE_ONCE);
3148 keyword = InclusionStatement.INCLUDE_ONCE;pos=token.sourceEnd;
3151 jj_la1[81] = jj_gen;
3152 jj_consume_token(-1);
3153 throw new ParseException();
3156 expr = Expression();
3157 pos = expr.sourceEnd;
3158 } catch (ParseException e) {
3159 if (errorMessage != null) {
3160 {if (true) throw e;}
3162 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
3164 errorStart = e.currentToken.next.sourceStart;
3165 errorEnd = e.currentToken.next.sourceEnd;
3166 expr = new ConstantIdentifier(SYNTAX_ERROR_CHAR,pos,pos);
3167 processParseExceptionDebug(e);
3170 token2 = jj_consume_token(SEMICOLON);
3171 pos=token2.sourceEnd;
3172 } catch (ParseException e) {
3173 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
3175 errorStart = e.currentToken.next.sourceStart;
3176 errorEnd = e.currentToken.next.sourceEnd;
3177 processParseExceptionDebug(e);
3179 inclusionStatement = new InclusionStatement(currentSegment,
3184 currentSegment.add(inclusionStatement);
3185 {if (true) return inclusionStatement;}
3186 throw new Error("Missing return statement in function");
3189 static final public PrintExpression PrintExpression() throws ParseException {
3190 final Expression expr;
3191 final Token printToken;
3192 token = jj_consume_token(PRINT);
3193 expr = Expression();
3194 {if (true) return new PrintExpression(expr,token.sourceStart,expr.sourceEnd);}
3195 throw new Error("Missing return statement in function");
3198 static final public ListExpression ListExpression() throws ParseException {
3199 Expression expr = null;
3200 final Expression expression;
3201 final ArrayList list = new ArrayList();
3203 final Token listToken, rParen;
3205 listToken = jj_consume_token(LIST);
3206 pos = listToken.sourceEnd;
3208 token = jj_consume_token(LPAREN);
3209 pos = token.sourceEnd;
3210 } catch (ParseException e) {
3211 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
3213 errorStart = listToken.sourceEnd+1;
3214 errorEnd = listToken.sourceEnd+1;
3215 processParseExceptionDebug(e);
3217 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3219 expr = VariableDeclaratorId();
3220 list.add(expr);pos = expr.sourceEnd;
3223 jj_la1[82] = jj_gen;
3226 if (expr == null) list.add(null);
3229 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3234 jj_la1[83] = jj_gen;
3238 token = jj_consume_token(COMMA);
3239 pos = token.sourceEnd;
3240 } catch (ParseException e) {
3241 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
3245 processParseExceptionDebug(e);
3247 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3249 expr = VariableDeclaratorId();
3250 list.add(expr);pos = expr.sourceEnd;
3253 jj_la1[84] = jj_gen;
3258 rParen = jj_consume_token(RPAREN);
3259 pos = rParen.sourceEnd;
3260 } catch (ParseException e) {
3261 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
3265 processParseExceptionDebug(e);
3267 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3269 jj_consume_token(ASSIGN);
3270 expression = Expression();
3271 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3273 {if (true) return new ListExpression(vars,
3275 listToken.sourceStart,
3276 expression.sourceEnd);}
3279 jj_la1[85] = jj_gen;
3282 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3284 {if (true) return new ListExpression(vars,listToken.sourceStart,pos);}
3285 throw new Error("Missing return statement in function");
3289 * An echo statement.
3290 * echo anyexpression (, otherexpression)*
3292 static final public EchoStatement EchoStatement() throws ParseException {
3293 final ArrayList expressions = new ArrayList();
3296 Token token2 = null;
3297 token = jj_consume_token(ECHO);
3298 expr = Expression();
3299 expressions.add(expr);
3302 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3307 jj_la1[86] = jj_gen;
3310 jj_consume_token(COMMA);
3311 expr = Expression();
3312 expressions.add(expr);
3315 token2 = jj_consume_token(SEMICOLON);
3316 } catch (ParseException e) {
3317 if (e.currentToken.next.kind != 4) {
3318 errorMessage = "';' expected after 'echo' statement";
3320 errorStart = e.currentToken.sourceEnd;
3321 errorEnd = e.currentToken.sourceEnd;
3322 processParseExceptionDebug(e);
3325 final Expression[] exprs = new Expression[expressions.size()];
3326 expressions.toArray(exprs);
3327 if (token2 == null) {
3328 {if (true) return new EchoStatement(exprs,token.sourceStart, exprs[exprs.length-1].sourceEnd);}
3330 {if (true) return new EchoStatement(exprs,token.sourceStart, token2.sourceEnd);}
3331 throw new Error("Missing return statement in function");
3334 static final public GlobalStatement GlobalStatement() throws ParseException {
3336 final ArrayList vars = new ArrayList();
3337 final GlobalStatement global;
3338 final Token token, token2;
3340 token = jj_consume_token(GLOBAL);
3342 vars.add(expr);pos = expr.sourceEnd+1;
3345 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3350 jj_la1[87] = jj_gen;
3353 jj_consume_token(COMMA);
3355 vars.add(expr);pos = expr.sourceEnd+1;
3358 token2 = jj_consume_token(SEMICOLON);
3359 pos = token2.sourceEnd+1;
3360 } catch (ParseException e) {
3361 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3365 processParseExceptionDebug(e);
3367 final Variable[] variables = new Variable[vars.size()];
3368 vars.toArray(variables);
3369 global = new GlobalStatement(currentSegment,
3373 currentSegment.add(global);
3374 {if (true) return global;}
3375 throw new Error("Missing return statement in function");
3378 static final public StaticStatement StaticStatement() throws ParseException {
3379 final ArrayList vars = new ArrayList();
3380 VariableDeclaration expr;
3381 final Token token, token2;
3383 token = jj_consume_token(STATIC);
3384 expr = VariableDeclarator();
3385 vars.add(expr);pos = expr.sourceEnd+1;
3388 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3393 jj_la1[88] = jj_gen;
3396 jj_consume_token(COMMA);
3397 expr = VariableDeclarator();
3398 vars.add(expr);pos = expr.sourceEnd+1;
3401 token2 = jj_consume_token(SEMICOLON);
3402 pos = token2.sourceEnd+1;
3403 } catch (ParseException e) {
3404 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3408 processParseException(e);
3410 final VariableDeclaration[] variables = new VariableDeclaration[vars.size()];
3411 vars.toArray(variables);
3412 {if (true) return new StaticStatement(variables,
3415 throw new Error("Missing return statement in function");
3418 static final public LabeledStatement LabeledStatement() throws ParseException {
3420 final Statement statement;
3421 label = jj_consume_token(IDENTIFIER);
3422 jj_consume_token(COLON);
3423 statement = Statement();
3424 {if (true) return new LabeledStatement(label.image,statement,label.sourceStart,statement.sourceEnd);}
3425 throw new Error("Missing return statement in function");
3435 static final public Block Block() throws ParseException {
3436 final ArrayList list = new ArrayList();
3437 Statement statement;
3438 final Token token, token2;
3441 token = jj_consume_token(LBRACE);
3442 pos = token.sourceEnd+1;start=token.sourceStart;
3443 } catch (ParseException e) {
3444 errorMessage = "'{' expected";
3446 pos = PHPParser.token.sourceEnd+1;
3450 processParseExceptionDebug(e);
3454 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3490 case INTEGER_LITERAL:
3491 case FLOATING_POINT_LITERAL:
3492 case STRING_LITERAL:
3502 jj_la1[89] = jj_gen;
3505 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3540 case INTEGER_LITERAL:
3541 case FLOATING_POINT_LITERAL:
3542 case STRING_LITERAL:
3549 statement = BlockStatement();
3550 list.add(statement);pos = statement.sourceEnd+1;
3553 statement = htmlBlock();
3554 if (statement != null) {
3555 list.add(statement);
3556 pos = statement.sourceEnd+1;
3558 pos = PHPParser.token.sourceEnd+1;
3561 jj_la1[90] = jj_gen;
3562 jj_consume_token(-1);
3563 throw new ParseException();
3567 token2 = jj_consume_token(RBRACE);
3568 pos = token2.sourceEnd+1;
3569 } catch (ParseException e) {
3570 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3574 processParseExceptionDebug(e);
3576 final Statement[] statements = new Statement[list.size()];
3577 list.toArray(statements);
3578 {if (true) return new Block(statements,start,pos);}
3579 throw new Error("Missing return statement in function");
3582 static final public Statement BlockStatement() throws ParseException {
3583 final Statement statement;
3584 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3617 case INTEGER_LITERAL:
3618 case FLOATING_POINT_LITERAL:
3619 case STRING_LITERAL:
3627 statement = Statement();
3628 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3629 {if (true) return statement;}
3630 } catch (ParseException e) {
3631 errorMessage = "unexpected token : '"+ e.currentToken.image +"', a statement was expected";
3633 errorStart = e.currentToken.sourceStart;
3634 errorEnd = e.currentToken.sourceEnd;
3635 {if (true) throw e;}
3639 statement = ClassDeclaration();
3640 {if (true) return statement;}
3643 statement = MethodDeclaration();
3644 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3645 currentSegment.add((MethodDeclaration) statement);
3646 ((MethodDeclaration) statement).analyzeCode();
3647 {if (true) return statement;}
3650 jj_la1[91] = jj_gen;
3651 jj_consume_token(-1);
3652 throw new ParseException();
3654 throw new Error("Missing return statement in function");
3658 * A Block statement that will not contain any 'break'
3660 static final public Statement BlockStatementNoBreak() throws ParseException {
3661 final Statement statement;
3662 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3694 case INTEGER_LITERAL:
3695 case FLOATING_POINT_LITERAL:
3696 case STRING_LITERAL:
3703 statement = StatementNoBreak();
3704 {if (true) return statement;}
3707 statement = ClassDeclaration();
3708 {if (true) return statement;}
3711 statement = MethodDeclaration();
3712 currentSegment.add((MethodDeclaration) statement);
3713 ((MethodDeclaration) statement).analyzeCode();
3714 {if (true) return statement;}
3717 jj_la1[92] = jj_gen;
3718 jj_consume_token(-1);
3719 throw new ParseException();
3721 throw new Error("Missing return statement in function");
3725 * used only by ForInit()
3727 static final public Expression[] LocalVariableDeclaration() throws ParseException {
3728 final ArrayList list = new ArrayList();
3734 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3739 jj_la1[93] = jj_gen;
3742 jj_consume_token(COMMA);
3746 final Expression[] vars = new Expression[list.size()];
3748 {if (true) return vars;}
3749 throw new Error("Missing return statement in function");
3753 * used only by LocalVariableDeclaration().
3755 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3756 final Variable varName;
3757 Expression initializer = null;
3758 varName = Variable();
3759 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3761 jj_consume_token(ASSIGN);
3762 initializer = Expression();
3765 jj_la1[94] = jj_gen;
3768 if (initializer == null) {
3769 {if (true) return new VariableDeclaration(currentSegment,
3771 varName.sourceStart,
3772 varName.sourceEnd);}
3774 {if (true) return new VariableDeclaration(currentSegment,
3777 VariableDeclaration.EQUAL,
3778 varName.sourceStart);}
3779 throw new Error("Missing return statement in function");
3782 static final public EmptyStatement EmptyStatement() throws ParseException {
3784 token = jj_consume_token(SEMICOLON);
3785 {if (true) return new EmptyStatement(token.sourceStart,token.sourceEnd);}
3786 throw new Error("Missing return statement in function");
3790 * used only by StatementExpressionList() which is used only by ForInit() and ForStatement()
3792 static final public Expression StatementExpression() throws ParseException {
3793 final Expression expr;
3794 final Token operator;
3795 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3798 expr = PreIncDecExpression();
3799 {if (true) return expr;}
3806 expr = PrimaryExpression();
3807 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3810 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3812 operator = jj_consume_token(PLUS_PLUS);
3813 {if (true) return new PostfixedUnaryExpression(expr,
3814 OperatorIds.PLUS_PLUS,
3815 operator.sourceEnd);}
3818 operator = jj_consume_token(MINUS_MINUS);
3819 {if (true) return new PostfixedUnaryExpression(expr,
3820 OperatorIds.MINUS_MINUS,
3821 operator.sourceEnd);}
3824 jj_la1[95] = jj_gen;
3825 jj_consume_token(-1);
3826 throw new ParseException();
3830 jj_la1[96] = jj_gen;
3833 {if (true) return expr;}
3836 jj_la1[97] = jj_gen;
3837 jj_consume_token(-1);
3838 throw new ParseException();
3840 throw new Error("Missing return statement in function");
3843 static final public SwitchStatement SwitchStatement() throws ParseException {
3844 Expression variable;
3845 final AbstractCase[] cases;
3846 final Token switchToken,lparenToken,rparenToken;
3848 switchToken = jj_consume_token(SWITCH);
3849 pos = switchToken.sourceEnd+1;
3851 lparenToken = jj_consume_token(LPAREN);
3852 pos = lparenToken.sourceEnd+1;
3853 } catch (ParseException e) {
3854 errorMessage = "'(' expected after 'switch'";
3858 processParseExceptionDebug(e);
3861 variable = Expression();
3862 pos = variable.sourceEnd+1;
3863 } catch (ParseException e) {
3864 if (errorMessage != null) {
3865 {if (true) throw e;}
3867 errorMessage = "expression expected";
3871 processParseExceptionDebug(e);
3872 variable = new ConstantIdentifier(SYNTAX_ERROR_CHAR,pos,pos);
3875 rparenToken = jj_consume_token(RPAREN);
3876 pos = rparenToken.sourceEnd+1;
3877 } catch (ParseException e) {
3878 errorMessage = "')' expected";
3882 processParseExceptionDebug(e);
3884 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3886 cases = switchStatementBrace();
3889 cases = switchStatementColon(switchToken.sourceStart, switchToken.sourceEnd);
3892 jj_la1[98] = jj_gen;
3893 jj_consume_token(-1);
3894 throw new ParseException();
3896 {if (true) return new SwitchStatement(variable,
3898 switchToken.sourceStart,
3899 PHPParser.token.sourceEnd);}
3900 throw new Error("Missing return statement in function");
3903 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3905 final ArrayList cases = new ArrayList();
3908 token = jj_consume_token(LBRACE);
3909 pos = token.sourceEnd;
3912 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3918 jj_la1[99] = jj_gen;
3921 cas = switchLabel0();
3922 cases.add(cas);pos = cas.sourceEnd;
3925 token = jj_consume_token(RBRACE);
3926 pos = token.sourceEnd;
3927 } catch (ParseException e) {
3928 errorMessage = "'}' expected";
3932 processParseExceptionDebug(e);
3934 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3935 cases.toArray(abcase);
3936 {if (true) return abcase;}
3937 throw new Error("Missing return statement in function");
3941 * A Switch statement with : ... endswitch;
3942 * @param start the begin offset of the switch
3943 * @param end the end offset of the switch
3945 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3947 final ArrayList cases = new ArrayList();
3950 token = jj_consume_token(COLON);
3951 pos = token.sourceEnd;
3953 setMarker(fileToParse,
3954 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3958 "Line " + token.beginLine);
3959 } catch (CoreException e) {
3960 PHPeclipsePlugin.log(e);
3964 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3970 jj_la1[100] = jj_gen;
3973 cas = switchLabel0();
3974 cases.add(cas);pos = cas.sourceEnd;
3977 token = jj_consume_token(ENDSWITCH);
3978 pos = token.sourceEnd;
3979 } catch (ParseException e) {
3980 errorMessage = "'endswitch' expected";
3984 processParseExceptionDebug(e);
3987 token = jj_consume_token(SEMICOLON);
3988 pos = token.sourceEnd;
3989 } catch (ParseException e) {
3990 errorMessage = "';' expected after 'endswitch' keyword";
3994 processParseExceptionDebug(e);
3996 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3997 cases.toArray(abcase);
3998 {if (true) return abcase;}
3999 throw new Error("Missing return statement in function");
4002 static final public AbstractCase switchLabel0() throws ParseException {
4003 final Expression expr;
4004 Statement statement;
4005 final ArrayList stmts = new ArrayList();
4006 final Token token = PHPParser.token;
4007 expr = SwitchLabel();
4010 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4046 case INTEGER_LITERAL:
4047 case FLOATING_POINT_LITERAL:
4048 case STRING_LITERAL:
4058 jj_la1[101] = jj_gen;
4061 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4095 case INTEGER_LITERAL:
4096 case FLOATING_POINT_LITERAL:
4097 case STRING_LITERAL:
4104 statement = BlockStatementNoBreak();
4105 stmts.add(statement);
4108 statement = htmlBlock();
4109 if (statement != null) {stmts.add(statement);}
4112 statement = BreakStatement();
4113 stmts.add(statement);
4116 jj_la1[102] = jj_gen;
4117 jj_consume_token(-1);
4118 throw new ParseException();
4121 final int listSize = stmts.size();
4122 final Statement[] stmtsArray = new Statement[listSize];
4123 stmts.toArray(stmtsArray);
4124 if (expr == null) {//it's a default
4125 {if (true) return new DefaultCase(stmtsArray,token.sourceStart,stmtsArray[listSize-1].sourceEnd);}
4127 if (listSize != 0) {
4128 {if (true) return new Case(expr,stmtsArray,expr.sourceStart,stmtsArray[listSize-1].sourceEnd);}
4130 {if (true) return new Case(expr,stmtsArray,expr.sourceStart,expr.sourceEnd);}
4132 throw new Error("Missing return statement in function");
4137 * case Expression() :
4139 * @return the if it was a case and null if not
4141 static final public Expression SwitchLabel() throws ParseException {
4142 final Expression expr;
4143 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4145 token = jj_consume_token(CASE);
4147 expr = Expression();
4148 } catch (ParseException e) {
4149 if (errorMessage != null) {if (true) throw e;}
4150 errorMessage = "expression expected after 'case' keyword";
4152 errorStart = token.sourceEnd +1;
4153 errorEnd = token.sourceEnd +1;
4154 {if (true) throw e;}
4157 token = jj_consume_token(COLON);
4158 {if (true) return expr;}
4159 } catch (ParseException e) {
4160 errorMessage = "':' expected after case expression";
4162 errorStart = expr.sourceEnd+1;
4163 errorEnd = expr.sourceEnd+1;
4164 processParseExceptionDebug(e);
4168 token = jj_consume_token(_DEFAULT);
4170 jj_consume_token(COLON);
4171 } catch (ParseException e) {
4172 errorMessage = "':' expected after 'default' keyword";
4174 errorStart = token.sourceEnd+1;
4175 errorEnd = token.sourceEnd+1;
4176 processParseExceptionDebug(e);
4178 {if (true) return null;}
4181 jj_la1[103] = jj_gen;
4182 jj_consume_token(-1);
4183 throw new ParseException();
4185 throw new Error("Missing return statement in function");
4188 static final public Break BreakStatement() throws ParseException {
4189 Expression expression = null;
4190 final Token token, token2;
4192 token = jj_consume_token(BREAK);
4193 pos = token.sourceEnd+1;
4194 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4210 case INTEGER_LITERAL:
4211 case FLOATING_POINT_LITERAL:
4212 case STRING_LITERAL:
4217 expression = Expression();
4218 pos = expression.sourceEnd+1;
4221 jj_la1[104] = jj_gen;
4225 token2 = jj_consume_token(SEMICOLON);
4226 pos = token2.sourceEnd;
4227 } catch (ParseException e) {
4228 errorMessage = "';' expected after 'break' keyword";
4232 processParseExceptionDebug(e);
4234 {if (true) return new Break(expression, token.sourceStart, pos);}
4235 throw new Error("Missing return statement in function");
4238 static final public IfStatement IfStatement() throws ParseException {
4239 final Expression condition;
4240 final IfStatement ifStatement;
4242 token = jj_consume_token(IF);
4243 condition = Condition("if");
4244 ifStatement = IfStatement0(condition,token.sourceStart,token.sourceEnd);
4245 {if (true) return ifStatement;}
4246 throw new Error("Missing return statement in function");
4249 static final public Expression Condition(final String keyword) throws ParseException {
4250 final Expression condition;
4252 jj_consume_token(LPAREN);
4253 } catch (ParseException e) {
4254 errorMessage = "'(' expected after " + keyword + " keyword";
4256 errorStart = PHPParser.token.sourceEnd + 1;
4257 errorEnd = PHPParser.token.sourceEnd + 1;
4258 processParseExceptionDebug(e);
4260 condition = Expression();
4262 jj_consume_token(RPAREN);
4263 } catch (ParseException e) {
4264 errorMessage = "')' expected after " + keyword + " keyword";
4266 errorStart = condition.sourceEnd+1;
4267 errorEnd = condition.sourceEnd+1;
4268 processParseExceptionDebug(e);
4270 {if (true) return condition;}
4271 throw new Error("Missing return statement in function");
4274 static final public IfStatement IfStatement0(final Expression condition, final int start,final int end) throws ParseException {
4275 Statement statement;
4276 final Statement stmt;
4277 final Statement[] statementsArray;
4278 ElseIf elseifStatement;
4279 Else elseStatement = null;
4280 final ArrayList stmts;
4281 final ArrayList elseIfList = new ArrayList();
4282 final ElseIf[] elseIfs;
4283 int pos = SimpleCharStream.getPosition();
4284 final int endStatements;
4285 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4287 jj_consume_token(COLON);
4288 stmts = new ArrayList();
4291 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4325 case INTEGER_LITERAL:
4326 case FLOATING_POINT_LITERAL:
4327 case STRING_LITERAL:
4337 jj_la1[105] = jj_gen;
4340 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4373 case INTEGER_LITERAL:
4374 case FLOATING_POINT_LITERAL:
4375 case STRING_LITERAL:
4382 statement = Statement();
4383 stmts.add(statement);
4386 statement = htmlBlock();
4387 if (statement != null) {stmts.add(statement);}
4390 jj_la1[106] = jj_gen;
4391 jj_consume_token(-1);
4392 throw new ParseException();
4395 endStatements = SimpleCharStream.getPosition();
4398 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4403 jj_la1[107] = jj_gen;
4406 elseifStatement = ElseIfStatementColon();
4407 elseIfList.add(elseifStatement);
4409 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4411 elseStatement = ElseStatementColon();
4414 jj_la1[108] = jj_gen;
4418 setMarker(fileToParse,
4419 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4423 "Line " + token.beginLine);
4424 } catch (CoreException e) {
4425 PHPeclipsePlugin.log(e);
4428 jj_consume_token(ENDIF);
4429 } catch (ParseException e) {
4430 errorMessage = "'endif' expected";
4432 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4433 errorEnd = SimpleCharStream.getPosition() + 1;
4434 {if (true) throw e;}
4437 jj_consume_token(SEMICOLON);
4438 } catch (ParseException e) {
4439 errorMessage = "';' expected after 'endif' keyword";
4441 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4442 errorEnd = SimpleCharStream.getPosition() + 1;
4443 {if (true) throw e;}
4445 elseIfs = new ElseIf[elseIfList.size()];
4446 elseIfList.toArray(elseIfs);
4447 if (stmts.size() == 1) {
4448 {if (true) return new IfStatement(condition,
4449 (Statement) stmts.get(0),
4453 SimpleCharStream.getPosition());}
4455 statementsArray = new Statement[stmts.size()];
4456 stmts.toArray(statementsArray);
4457 {if (true) return new IfStatement(condition,
4458 new Block(statementsArray,pos,endStatements),
4462 SimpleCharStream.getPosition());}
4498 case INTEGER_LITERAL:
4499 case FLOATING_POINT_LITERAL:
4500 case STRING_LITERAL:
4507 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4540 case INTEGER_LITERAL:
4541 case FLOATING_POINT_LITERAL:
4542 case STRING_LITERAL:
4555 jj_la1[109] = jj_gen;
4556 jj_consume_token(-1);
4557 throw new ParseException();
4561 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4566 jj_la1[110] = jj_gen;
4569 elseifStatement = ElseIfStatement();
4570 elseIfList.add(elseifStatement);
4572 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4574 jj_consume_token(ELSE);
4576 pos = SimpleCharStream.getPosition();
4577 statement = Statement();
4578 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4579 } catch (ParseException e) {
4580 if (errorMessage != null) {
4581 {if (true) throw e;}
4583 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4585 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4586 errorEnd = SimpleCharStream.getPosition() + 1;
4587 {if (true) throw e;}
4591 jj_la1[111] = jj_gen;
4594 elseIfs = new ElseIf[elseIfList.size()];
4595 elseIfList.toArray(elseIfs);
4596 {if (true) return new IfStatement(condition,
4601 SimpleCharStream.getPosition());}
4604 jj_la1[112] = jj_gen;
4605 jj_consume_token(-1);
4606 throw new ParseException();
4608 throw new Error("Missing return statement in function");
4611 static final public ElseIf ElseIfStatementColon() throws ParseException {
4612 final Expression condition;
4613 Statement statement;
4614 final ArrayList list = new ArrayList();
4615 final Token elseifToken;
4616 elseifToken = jj_consume_token(ELSEIF);
4617 condition = Condition("elseif");
4618 jj_consume_token(COLON);
4621 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4655 case INTEGER_LITERAL:
4656 case FLOATING_POINT_LITERAL:
4657 case STRING_LITERAL:
4667 jj_la1[113] = jj_gen;
4670 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4703 case INTEGER_LITERAL:
4704 case FLOATING_POINT_LITERAL:
4705 case STRING_LITERAL:
4712 statement = Statement();
4713 list.add(statement);
4716 statement = htmlBlock();
4717 if (statement != null) {list.add(statement);}
4720 jj_la1[114] = jj_gen;
4721 jj_consume_token(-1);
4722 throw new ParseException();
4725 final int sizeList = list.size();
4726 final Statement[] stmtsArray = new Statement[sizeList];
4727 list.toArray(stmtsArray);
4728 {if (true) return new ElseIf(condition,stmtsArray ,
4729 elseifToken.sourceStart,
4730 stmtsArray[sizeList-1].sourceEnd);}
4731 throw new Error("Missing return statement in function");
4734 static final public Else ElseStatementColon() throws ParseException {
4735 Statement statement;
4736 final ArrayList list = new ArrayList();
4737 final Token elseToken;
4738 elseToken = jj_consume_token(ELSE);
4739 jj_consume_token(COLON);
4742 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4776 case INTEGER_LITERAL:
4777 case FLOATING_POINT_LITERAL:
4778 case STRING_LITERAL:
4788 jj_la1[115] = jj_gen;
4791 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4824 case INTEGER_LITERAL:
4825 case FLOATING_POINT_LITERAL:
4826 case STRING_LITERAL:
4833 statement = Statement();
4834 list.add(statement);
4837 statement = htmlBlock();
4838 if (statement != null) {list.add(statement);}
4841 jj_la1[116] = jj_gen;
4842 jj_consume_token(-1);
4843 throw new ParseException();
4846 final int sizeList = list.size();
4847 final Statement[] stmtsArray = new Statement[sizeList];
4848 list.toArray(stmtsArray);
4849 {if (true) return new Else(stmtsArray,elseToken.sourceStart,stmtsArray[sizeList-1].sourceEnd);}
4850 throw new Error("Missing return statement in function");
4853 static final public ElseIf ElseIfStatement() throws ParseException {
4854 final Expression condition;
4855 //final Statement statement;
4856 final Token elseifToken;
4857 final Statement[] statement = new Statement[1];
4858 elseifToken = jj_consume_token(ELSEIF);
4859 condition = Condition("elseif");
4860 statement[0] = Statement();
4861 {if (true) return new ElseIf(condition,statement,elseifToken.sourceStart,statement[0].sourceEnd);}
4862 throw new Error("Missing return statement in function");
4865 static final public WhileStatement WhileStatement() throws ParseException {
4866 final Expression condition;
4867 final Statement action;
4868 final Token whileToken;
4869 whileToken = jj_consume_token(WHILE);
4870 condition = Condition("while");
4871 action = WhileStatement0(whileToken.sourceStart,whileToken.sourceEnd);
4872 {if (true) return new WhileStatement(condition,action,whileToken.sourceStart,action.sourceEnd);}
4873 throw new Error("Missing return statement in function");
4876 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4877 Statement statement;
4878 final ArrayList stmts = new ArrayList();
4879 final int pos = SimpleCharStream.getPosition();
4880 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4882 jj_consume_token(COLON);
4885 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4918 case INTEGER_LITERAL:
4919 case FLOATING_POINT_LITERAL:
4920 case STRING_LITERAL:
4930 jj_la1[117] = jj_gen;
4933 statement = Statement();
4934 stmts.add(statement);
4937 setMarker(fileToParse,
4938 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4942 "Line " + token.beginLine);
4943 } catch (CoreException e) {
4944 PHPeclipsePlugin.log(e);
4947 jj_consume_token(ENDWHILE);
4948 } catch (ParseException e) {
4949 errorMessage = "'endwhile' expected";
4951 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4952 errorEnd = SimpleCharStream.getPosition() + 1;
4953 {if (true) throw e;}
4956 jj_consume_token(SEMICOLON);
4957 final Statement[] stmtsArray = new Statement[stmts.size()];
4958 stmts.toArray(stmtsArray);
4959 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4960 } catch (ParseException e) {
4961 errorMessage = "';' expected after 'endwhile' keyword";
4963 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4964 errorEnd = SimpleCharStream.getPosition() + 1;
4965 {if (true) throw e;}
5000 case INTEGER_LITERAL:
5001 case FLOATING_POINT_LITERAL:
5002 case STRING_LITERAL:
5009 statement = Statement();
5010 {if (true) return statement;}
5013 jj_la1[118] = jj_gen;
5014 jj_consume_token(-1);
5015 throw new ParseException();
5017 throw new Error("Missing return statement in function");
5020 static final public DoStatement DoStatement() throws ParseException {
5021 final Statement action;
5022 final Expression condition;
5024 Token token2 = null;
5025 token = jj_consume_token(DO);
5026 action = Statement();
5027 jj_consume_token(WHILE);
5028 condition = Condition("while");
5030 token2 = jj_consume_token(SEMICOLON);
5031 } catch (ParseException e) {
5032 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
5034 errorStart = condition.sourceEnd+1;
5035 errorEnd = condition.sourceEnd+1;
5036 processParseExceptionDebug(e);
5038 if (token2 == null) {
5039 {if (true) return new DoStatement(condition,action,token.sourceStart,condition.sourceEnd);}
5041 {if (true) return new DoStatement(condition,action,token.sourceStart,token2.sourceEnd);}
5042 throw new Error("Missing return statement in function");
5045 static final public ForeachStatement ForeachStatement() throws ParseException {
5046 Statement statement = null;
5047 Expression expression = null;
5048 ArrayVariableDeclaration variable = null;
5050 Token lparenToken = null;
5051 Token asToken = null;
5052 Token rparenToken = null;
5054 foreachToken = jj_consume_token(FOREACH);
5056 lparenToken = jj_consume_token(LPAREN);
5057 pos = lparenToken.sourceEnd+1;
5058 } catch (ParseException e) {
5059 errorMessage = "'(' expected after 'foreach' keyword";
5061 errorStart = foreachToken.sourceEnd+1;
5062 errorEnd = foreachToken.sourceEnd+1;
5063 processParseExceptionDebug(e);
5064 {pos = foreachToken.sourceEnd+1;}
5067 expression = Expression();
5068 pos = expression.sourceEnd+1;
5069 } catch (ParseException e) {
5070 errorMessage = "variable expected";
5074 processParseExceptionDebug(e);
5077 asToken = jj_consume_token(AS);
5078 pos = asToken.sourceEnd+1;
5079 } catch (ParseException e) {
5080 errorMessage = "'as' expected";
5084 processParseExceptionDebug(e);
5087 variable = ArrayVariable();
5088 pos = variable.sourceEnd+1;
5089 } catch (ParseException e) {
5090 if (errorMessage != null) {if (true) throw e;}
5091 errorMessage = "variable expected";
5095 processParseExceptionDebug(e);
5098 rparenToken = jj_consume_token(RPAREN);
5099 pos = rparenToken.sourceEnd+1;
5100 } catch (ParseException e) {
5101 errorMessage = "')' expected after 'foreach' keyword";
5105 processParseExceptionDebug(e);
5108 statement = Statement();
5109 pos = rparenToken.sourceEnd+1;
5110 } catch (ParseException e) {
5111 if (errorMessage != null) {if (true) throw e;}
5112 errorMessage = "statement expected";
5116 processParseExceptionDebug(e);
5118 {if (true) return new ForeachStatement(expression,
5121 foreachToken.sourceStart,
5122 statement.sourceEnd);}
5123 throw new Error("Missing return statement in function");
5127 * a for declaration.
5128 * @return a node representing the for statement
5130 static final public ForStatement ForStatement() throws ParseException {
5131 final Token token,tokenEndFor,token2,tokenColon;
5133 Expression[] initializations = null;
5134 Expression condition = null;
5135 Expression[] increments = null;
5137 final ArrayList list = new ArrayList();
5138 token = jj_consume_token(FOR);
5140 jj_consume_token(LPAREN);
5141 } catch (ParseException e) {
5142 errorMessage = "'(' expected after 'for' keyword";
5144 errorStart = token.sourceEnd;
5145 errorEnd = token.sourceEnd +1;
5146 processParseExceptionDebug(e);
5148 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5164 case INTEGER_LITERAL:
5165 case FLOATING_POINT_LITERAL:
5166 case STRING_LITERAL:
5171 initializations = ForInit();
5174 jj_la1[119] = jj_gen;
5177 jj_consume_token(SEMICOLON);
5178 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5194 case INTEGER_LITERAL:
5195 case FLOATING_POINT_LITERAL:
5196 case STRING_LITERAL:
5201 condition = Expression();
5204 jj_la1[120] = jj_gen;
5207 jj_consume_token(SEMICOLON);
5208 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5224 case INTEGER_LITERAL:
5225 case FLOATING_POINT_LITERAL:
5226 case STRING_LITERAL:
5231 increments = StatementExpressionList();
5234 jj_la1[121] = jj_gen;
5237 jj_consume_token(RPAREN);
5238 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5271 case INTEGER_LITERAL:
5272 case FLOATING_POINT_LITERAL:
5273 case STRING_LITERAL:
5280 action = Statement();
5281 {if (true) return new ForStatement(initializations,
5289 tokenColon = jj_consume_token(COLON);
5290 pos = tokenColon.sourceEnd+1;
5293 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5326 case INTEGER_LITERAL:
5327 case FLOATING_POINT_LITERAL:
5328 case STRING_LITERAL:
5338 jj_la1[122] = jj_gen;
5341 action = Statement();
5342 list.add(action);pos = action.sourceEnd+1;
5345 setMarker(fileToParse,
5346 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
5350 "Line " + token.beginLine);
5351 } catch (CoreException e) {
5352 PHPeclipsePlugin.log(e);
5355 tokenEndFor = jj_consume_token(ENDFOR);
5356 pos = tokenEndFor.sourceEnd+1;
5357 } catch (ParseException e) {
5358 errorMessage = "'endfor' expected";
5362 processParseExceptionDebug(e);
5365 token2 = jj_consume_token(SEMICOLON);
5366 pos = token2.sourceEnd+1;
5367 } catch (ParseException e) {
5368 errorMessage = "';' expected after 'endfor' keyword";
5372 processParseExceptionDebug(e);
5374 final Statement[] stmtsArray = new Statement[list.size()];
5375 list.toArray(stmtsArray);
5376 {if (true) return new ForStatement(initializations,
5379 new Block(stmtsArray,
5380 stmtsArray[0].sourceStart,
5381 stmtsArray[stmtsArray.length-1].sourceEnd),
5386 jj_la1[123] = jj_gen;
5387 jj_consume_token(-1);
5388 throw new ParseException();
5390 throw new Error("Missing return statement in function");
5393 static final public Expression[] ForInit() throws ParseException {
5394 final Expression[] exprs;
5395 if (jj_2_5(2147483647)) {
5396 exprs = LocalVariableDeclaration();
5397 {if (true) return exprs;}
5399 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5415 case INTEGER_LITERAL:
5416 case FLOATING_POINT_LITERAL:
5417 case STRING_LITERAL:
5422 exprs = StatementExpressionList();
5423 {if (true) return exprs;}
5426 jj_la1[124] = jj_gen;
5427 jj_consume_token(-1);
5428 throw new ParseException();
5431 throw new Error("Missing return statement in function");
5434 static final public Expression[] StatementExpressionList() throws ParseException {
5435 final ArrayList list = new ArrayList();
5436 final Expression expr;
5437 expr = Expression();
5441 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5446 jj_la1[125] = jj_gen;
5449 jj_consume_token(COMMA);
5453 final Expression[] exprsArray = new Expression[list.size()];
5454 list.toArray(exprsArray);
5455 {if (true) return exprsArray;}
5456 throw new Error("Missing return statement in function");
5459 static final public Continue ContinueStatement() throws ParseException {
5460 Expression expr = null;
5462 Token token2 = null;
5463 token = jj_consume_token(CONTINUE);
5464 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5480 case INTEGER_LITERAL:
5481 case FLOATING_POINT_LITERAL:
5482 case STRING_LITERAL:
5487 expr = Expression();
5490 jj_la1[126] = jj_gen;
5494 token2 = jj_consume_token(SEMICOLON);
5495 } catch (ParseException e) {
5496 errorMessage = "';' expected after 'continue' statement";
5499 errorStart = token.sourceEnd+1;
5500 errorEnd = token.sourceEnd+1;
5502 errorStart = expr.sourceEnd+1;
5503 errorEnd = expr.sourceEnd+1;
5505 processParseExceptionDebug(e);
5507 if (token2 == null) {
5509 {if (true) return new Continue(expr,token.sourceStart,token.sourceEnd);}
5511 {if (true) return new Continue(expr,token.sourceStart,expr.sourceEnd);}
5513 {if (true) return new Continue(expr,token.sourceStart,token2.sourceEnd);}
5514 throw new Error("Missing return statement in function");
5517 static final public ReturnStatement ReturnStatement() throws ParseException {
5518 Expression expr = null;
5520 Token token2 = null;
5521 token = jj_consume_token(RETURN);
5522 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5538 case INTEGER_LITERAL:
5539 case FLOATING_POINT_LITERAL:
5540 case STRING_LITERAL:
5545 expr = Expression();
5548 jj_la1[127] = jj_gen;
5552 token2 = jj_consume_token(SEMICOLON);
5553 } catch (ParseException e) {
5554 errorMessage = "';' expected after 'return' statement";
5557 errorStart = token.sourceEnd+1;
5558 errorEnd = token.sourceEnd+1;
5560 errorStart = expr.sourceEnd+1;
5561 errorEnd = expr.sourceEnd+1;
5563 processParseExceptionDebug(e);
5565 if (token2 == null) {
5567 {if (true) return new ReturnStatement(expr,token.sourceStart,token.sourceEnd);}
5569 {if (true) return new ReturnStatement(expr,token.sourceStart,expr.sourceEnd);}
5571 {if (true) return new ReturnStatement(expr,token.sourceStart,token2.sourceEnd);}
5572 throw new Error("Missing return statement in function");
5575 static final private boolean jj_2_1(int xla) {
5576 jj_la = xla; jj_lastpos = jj_scanpos = token;
5577 boolean retval = !jj_3_1();
5582 static final private boolean jj_2_2(int xla) {
5583 jj_la = xla; jj_lastpos = jj_scanpos = token;
5584 boolean retval = !jj_3_2();
5589 static final private boolean jj_2_3(int xla) {
5590 jj_la = xla; jj_lastpos = jj_scanpos = token;
5591 boolean retval = !jj_3_3();
5596 static final private boolean jj_2_4(int xla) {
5597 jj_la = xla; jj_lastpos = jj_scanpos = token;
5598 boolean retval = !jj_3_4();
5603 static final private boolean jj_2_5(int xla) {
5604 jj_la = xla; jj_lastpos = jj_scanpos = token;
5605 boolean retval = !jj_3_5();
5610 static final private boolean jj_3R_115() {
5611 if (jj_scan_token(XOR)) return true;
5612 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5613 if (jj_3R_114()) return true;
5614 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5618 static final private boolean jj_3R_210() {
5619 if (jj_3R_116()) return true;
5620 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5624 static final private boolean jj_3R_209() {
5625 if (jj_3R_50()) return true;
5626 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5630 static final private boolean jj_3R_109() {
5631 if (jj_3R_114()) return true;
5632 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5636 if (jj_3R_115()) { jj_scanpos = xsp; break; }
5637 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5642 static final private boolean jj_3R_208() {
5643 if (jj_scan_token(IDENTIFIER)) return true;
5644 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5648 static final private boolean jj_3R_203() {
5655 if (jj_3R_210()) return true;
5656 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5657 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5658 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5662 static final private boolean jj_3R_110() {
5663 if (jj_scan_token(BIT_OR)) return true;
5664 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5665 if (jj_3R_109()) return true;
5666 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5670 static final private boolean jj_3R_103() {
5671 if (jj_3R_109()) return true;
5672 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5676 if (jj_3R_110()) { jj_scanpos = xsp; break; }
5677 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5682 static final private boolean jj_3R_188() {
5683 if (jj_scan_token(ARRAY)) return true;
5684 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5685 if (jj_3R_198()) return true;
5686 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5690 static final private boolean jj_3R_132() {
5691 if (jj_scan_token(IDENTIFIER)) return true;
5692 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5696 static final private boolean jj_3R_131() {
5697 if (jj_scan_token(LBRACE)) return true;
5698 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5699 if (jj_3R_49()) return true;
5700 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5701 if (jj_scan_token(RBRACE)) return true;
5702 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5706 static final private boolean jj_3R_106() {
5707 if (jj_scan_token(DOT)) return true;
5708 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5709 if (jj_3R_103()) return true;
5710 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5714 static final private boolean jj_3R_122() {
5721 if (jj_3R_132()) return true;
5722 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5723 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5724 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5728 static final private boolean jj_3R_130() {
5729 if (jj_scan_token(DOLLAR)) return true;
5730 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5731 if (jj_3R_122()) return true;
5732 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5736 static final private boolean jj_3R_97() {
5737 if (jj_3R_103()) return true;
5738 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5742 if (jj_3R_106()) { jj_scanpos = xsp; break; }
5743 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5748 static final private boolean jj_3R_204() {
5749 if (jj_3R_207()) return true;
5750 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5754 static final private boolean jj_3R_108() {
5755 if (jj_scan_token(_ANDL)) return true;
5756 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5760 static final private boolean jj_3R_107() {
5761 if (jj_scan_token(AND_AND)) return true;
5762 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5766 static final private boolean jj_3R_68() {
5767 if (jj_scan_token(DOLLAR)) return true;
5768 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5769 if (jj_3R_122()) return true;
5770 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5774 static final private boolean jj_3R_100() {
5779 if (jj_3R_108()) return true;
5780 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5781 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5782 if (jj_3R_97()) return true;
5783 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5787 static final private boolean jj_3R_81() {
5788 if (jj_3R_97()) return true;
5789 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5793 if (jj_3R_100()) { jj_scanpos = xsp; break; }
5794 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5799 static final private boolean jj_3R_79() {
5800 if (jj_scan_token(HOOK)) return true;
5801 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5802 if (jj_3R_49()) return true;
5803 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5804 if (jj_scan_token(COLON)) return true;
5805 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5806 if (jj_3R_73()) return true;
5807 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5811 static final private boolean jj_3R_195() {
5812 if (jj_scan_token(NEW)) return true;
5813 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5814 if (jj_3R_203()) return true;
5815 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5818 if (jj_3R_204()) jj_scanpos = xsp;
5819 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5823 static final private boolean jj_3R_202() {
5824 if (jj_3R_207()) return true;
5825 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5829 static final private boolean jj_3R_194() {
5830 if (jj_3R_116()) return true;
5831 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5834 if (jj_3R_202()) jj_scanpos = xsp;
5835 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5839 static final private boolean jj_3R_102() {
5840 if (jj_scan_token(_ORL)) return true;
5841 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5845 static final private boolean jj_3R_101() {
5846 if (jj_scan_token(OR_OR)) return true;
5847 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5851 static final private boolean jj_3R_83() {
5856 if (jj_3R_102()) return true;
5857 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5858 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5859 if (jj_3R_81()) return true;
5860 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5864 static final private boolean jj_3_1() {
5865 if (jj_3R_40()) return true;
5866 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5870 static final private boolean jj_3R_201() {
5871 if (jj_3R_207()) return true;
5872 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5876 static final private boolean jj_3R_76() {
5877 if (jj_3R_81()) return true;
5878 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5882 if (jj_3R_83()) { jj_scanpos = xsp; break; }
5883 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5888 static final private boolean jj_3R_51() {
5889 if (jj_scan_token(COMMA)) return true;
5890 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5891 if (jj_3R_49()) return true;
5892 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5896 static final private boolean jj_3R_200() {
5897 if (jj_scan_token(STATICCLASSACCESS)) return true;
5898 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5899 if (jj_3R_203()) return true;
5900 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5904 static final private boolean jj_3R_116() {
5905 if (jj_3R_68()) return true;
5906 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5910 if (jj_3_1()) { jj_scanpos = xsp; break; }
5911 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5916 static final private boolean jj_3R_45() {
5917 if (jj_3R_49()) return true;
5918 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5922 if (jj_3R_51()) { jj_scanpos = xsp; break; }
5923 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5928 static final private boolean jj_3R_193() {
5929 if (jj_scan_token(IDENTIFIER)) return true;
5930 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5934 if (jj_3R_200()) { jj_scanpos = xsp; break; }
5935 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5938 if (jj_3R_201()) jj_scanpos = xsp;
5939 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5943 static final private boolean jj_3R_187() {
5950 if (jj_3R_195()) return true;
5951 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5952 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5953 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5957 static final private boolean jj_3R_73() {
5958 if (jj_3R_76()) return true;
5959 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5962 if (jj_3R_79()) jj_scanpos = xsp;
5963 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5967 static final private boolean jj_3R_178() {
5968 if (jj_3R_188()) return true;
5969 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5973 static final private boolean jj_3R_186() {
5974 if (jj_scan_token(BIT_AND)) return true;
5975 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5979 static final private boolean jj_3R_96() {
5980 if (jj_scan_token(TILDEEQUAL)) return true;
5981 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5985 static final private boolean jj_3R_95() {
5986 if (jj_scan_token(DOTASSIGN)) return true;
5987 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5991 static final private boolean jj_3R_173() {
5996 if (jj_3R_178()) return true;
5997 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5998 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6002 static final private boolean jj_3R_177() {
6005 if (jj_3R_186()) jj_scanpos = xsp;
6006 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6007 if (jj_3R_187()) return true;
6008 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6012 static final private boolean jj_3_5() {
6013 if (jj_3R_45()) return true;
6014 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6018 static final private boolean jj_3R_94() {
6019 if (jj_scan_token(ORASSIGN)) return true;
6020 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6024 static final private boolean jj_3R_93() {
6025 if (jj_scan_token(XORASSIGN)) return true;
6026 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6030 static final private boolean jj_3R_92() {
6031 if (jj_scan_token(ANDASSIGN)) return true;
6032 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6036 static final private boolean jj_3R_91() {
6037 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6038 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6042 static final private boolean jj_3R_90() {
6043 if (jj_scan_token(LSHIFTASSIGN)) return true;
6044 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6048 static final private boolean jj_3R_89() {
6049 if (jj_scan_token(MINUSASSIGN)) return true;
6050 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6054 static final private boolean jj_3R_88() {
6055 if (jj_scan_token(PLUSASSIGN)) return true;
6056 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6060 static final private boolean jj_3R_87() {
6061 if (jj_scan_token(REMASSIGN)) return true;
6062 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6066 static final private boolean jj_3R_86() {
6067 if (jj_scan_token(SLASHASSIGN)) return true;
6068 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6072 static final private boolean jj_3R_85() {
6073 if (jj_scan_token(STARASSIGN)) return true;
6074 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6078 static final private boolean jj_3R_84() {
6079 if (jj_scan_token(ASSIGN)) return true;
6080 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6084 static final private boolean jj_3R_80() {
6111 if (jj_3R_96()) return true;
6112 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6113 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6114 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6115 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6116 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6117 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6118 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6119 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6120 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6121 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6122 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6123 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6124 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6128 static final private boolean jj_3R_197() {
6129 if (jj_scan_token(MINUS_MINUS)) return true;
6130 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6134 static final private boolean jj_3R_196() {
6135 if (jj_scan_token(PLUS_PLUS)) return true;
6136 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6140 static final private boolean jj_3R_191() {
6145 if (jj_3R_197()) return true;
6146 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6147 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6151 static final private boolean jj_3R_175() {
6152 if (jj_3R_173()) return true;
6153 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6156 if (jj_3R_191()) jj_scanpos = xsp;
6157 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6161 static final private boolean jj_3R_99() {
6162 if (jj_3R_105()) return true;
6163 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6167 static final private boolean jj_3R_98() {
6168 if (jj_3R_104()) return true;
6169 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6173 static final private boolean jj_3R_82() {
6178 if (jj_3R_99()) return true;
6179 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6180 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6184 static final private boolean jj_3R_190() {
6185 if (jj_scan_token(ARRAY)) return true;
6186 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6190 static final private boolean jj_3R_189() {
6191 if (jj_3R_50()) return true;
6192 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6196 static final private boolean jj_3R_78() {
6197 if (jj_3R_82()) return true;
6198 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6202 static final private boolean jj_3R_43() {
6203 if (jj_scan_token(ARRAY)) return true;
6204 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6208 static final private boolean jj_3R_77() {
6209 if (jj_scan_token(BANG)) return true;
6210 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6211 if (jj_3R_74()) return true;
6212 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6216 static final private boolean jj_3R_74() {
6221 if (jj_3R_78()) return true;
6222 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6223 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6227 static final private boolean jj_3R_174() {
6228 if (jj_scan_token(LPAREN)) return true;
6229 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6234 if (jj_3R_190()) return true;
6235 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6236 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6237 if (jj_scan_token(RPAREN)) return true;
6238 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6239 if (jj_3R_144()) return true;
6240 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6244 static final private boolean jj_3R_42() {
6245 if (jj_3R_50()) return true;
6246 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6250 static final private boolean jj_3R_58() {
6251 if (jj_3R_74()) return true;
6252 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6256 static final private boolean jj_3_3() {
6257 if (jj_scan_token(LPAREN)) return true;
6258 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6263 if (jj_3R_43()) return true;
6264 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6265 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6266 if (jj_scan_token(RPAREN)) return true;
6267 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6271 static final private boolean jj_3R_172() {
6272 if (jj_scan_token(LPAREN)) return true;
6273 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6274 if (jj_3R_49()) return true;
6275 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6276 if (jj_scan_token(RPAREN)) return true;
6277 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6281 static final private boolean jj_3R_171() {
6282 if (jj_3R_176()) return true;
6283 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6287 static final private boolean jj_3R_170() {
6288 if (jj_3R_175()) return true;
6289 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6293 static final private boolean jj_3R_166() {
6302 if (jj_3R_172()) return true;
6303 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6304 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6305 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6306 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6310 static final private boolean jj_3R_169() {
6311 if (jj_3R_174()) return true;
6312 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6316 static final private boolean jj_3R_44() {
6317 if (jj_3R_49()) return true;
6318 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6319 if (jj_scan_token(SEMICOLON)) return true;
6320 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6324 static final private boolean jj_3R_168() {
6325 if (jj_scan_token(MINUS_MINUS)) return true;
6326 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6330 static final private boolean jj_3R_167() {
6331 if (jj_scan_token(PLUS_PLUS)) return true;
6332 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6336 static final private boolean jj_3R_75() {
6337 if (jj_3R_80()) return true;
6338 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6339 if (jj_3R_49()) return true;
6340 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6344 static final private boolean jj_3R_165() {
6349 if (jj_3R_168()) return true;
6350 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6351 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6352 if (jj_3R_173()) return true;
6353 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6357 static final private boolean jj_3R_49() {
6362 if (jj_3R_58()) return true;
6363 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6364 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6368 static final private boolean jj_3R_57() {
6369 if (jj_3R_73()) return true;
6370 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6373 if (jj_3R_75()) jj_scanpos = xsp;
6374 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6378 static final private boolean jj_3R_67() {
6379 if (jj_scan_token(OBJECT)) return true;
6380 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6384 static final private boolean jj_3R_161() {
6385 if (jj_3R_166()) return true;
6386 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6390 static final private boolean jj_3R_66() {
6391 if (jj_scan_token(INTEGER)) return true;
6392 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6396 static final private boolean jj_3R_65() {
6397 if (jj_scan_token(INT)) return true;
6398 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6402 static final private boolean jj_3R_64() {
6403 if (jj_scan_token(FLOAT)) return true;
6404 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6408 static final private boolean jj_3R_160() {
6409 if (jj_3R_165()) return true;
6410 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6414 static final private boolean jj_3R_63() {
6415 if (jj_scan_token(DOUBLE)) return true;
6416 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6420 static final private boolean jj_3R_62() {
6421 if (jj_scan_token(REAL)) return true;
6422 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6426 static final private boolean jj_3R_61() {
6427 if (jj_scan_token(BOOLEAN)) return true;
6428 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6432 static final private boolean jj_3R_60() {
6433 if (jj_scan_token(BOOL)) return true;
6434 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6438 static final private boolean jj_3R_159() {
6439 if (jj_scan_token(MINUS)) return true;
6440 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6441 if (jj_3R_148()) return true;
6442 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6446 static final private boolean jj_3R_50() {
6465 if (jj_3R_67()) return true;
6466 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6467 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6468 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6469 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6470 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6471 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6472 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6473 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6474 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6478 static final private boolean jj_3R_59() {
6479 if (jj_scan_token(STRING)) return true;
6480 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6484 static final private boolean jj_3R_156() {
6493 if (jj_3R_161()) return true;
6494 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6495 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6496 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6497 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6501 static final private boolean jj_3R_158() {
6502 if (jj_scan_token(PLUS)) return true;
6503 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6504 if (jj_3R_148()) return true;
6505 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6509 static final private boolean jj_3_4() {
6510 if (jj_3R_44()) return true;
6511 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6515 static final private boolean jj_3R_164() {
6516 if (jj_3R_156()) return true;
6517 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6521 static final private boolean jj_3R_163() {
6522 if (jj_scan_token(BANG)) return true;
6523 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6524 if (jj_3R_157()) return true;
6525 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6529 static final private boolean jj_3R_157() {
6536 if (jj_3R_164()) 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 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6543 static final private boolean jj_3R_162() {
6544 if (jj_scan_token(AT)) return true;
6545 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6546 if (jj_3R_157()) return true;
6547 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6551 static final private boolean jj_3R_155() {
6552 if (jj_3R_156()) return true;
6553 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6557 static final private boolean jj_3R_216() {
6558 if (jj_scan_token(COMMA)) return true;
6559 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6560 if (jj_3R_49()) return true;
6561 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6565 static final private boolean jj_3R_154() {
6566 if (jj_scan_token(BANG)) return true;
6567 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6568 if (jj_3R_157()) return true;
6569 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6573 static final private boolean jj_3R_215() {
6574 if (jj_3R_49()) return true;
6575 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6579 if (jj_3R_216()) { jj_scanpos = xsp; break; }
6580 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6585 static final private boolean jj_3R_153() {
6586 if (jj_scan_token(TILDE)) return true;
6587 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6588 if (jj_3R_148()) return true;
6589 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6593 static final private boolean jj_3R_148() {
6602 if (jj_3R_155()) return true;
6603 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6604 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6605 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6606 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6610 static final private boolean jj_3R_152() {
6611 if (jj_scan_token(AT)) return true;
6612 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6613 if (jj_3R_148()) return true;
6614 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6618 static final private boolean jj_3R_213() {
6619 if (jj_3R_215()) return true;
6620 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6624 static final private boolean jj_3R_144() {
6625 if (jj_3R_148()) return true;
6626 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6630 static final private boolean jj_3R_151() {
6631 if (jj_scan_token(REMAINDER)) return true;
6632 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6636 static final private boolean jj_3R_150() {
6637 if (jj_scan_token(SLASH)) return true;
6638 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6642 static final private boolean jj_3R_149() {
6643 if (jj_scan_token(STAR)) return true;
6644 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6648 static final private boolean jj_3R_207() {
6649 if (jj_scan_token(LPAREN)) return true;
6650 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6653 if (jj_3R_213()) jj_scanpos = xsp;
6654 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6655 if (jj_scan_token(RPAREN)) return true;
6656 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6660 static final private boolean jj_3R_145() {
6667 if (jj_3R_151()) return true;
6668 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6669 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6670 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6671 if (jj_3R_144()) return true;
6672 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6676 static final private boolean jj_3R_139() {
6677 if (jj_3R_144()) return true;
6678 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6682 if (jj_3R_145()) { jj_scanpos = xsp; break; }
6683 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6688 static final private boolean jj_3R_212() {
6689 if (jj_scan_token(LBRACE1)) return true;
6690 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6691 if (jj_scan_token(ID)) return true;
6692 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6693 if (jj_scan_token(RBRACE1)) return true;
6694 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6698 static final private boolean jj_3R_147() {
6699 if (jj_scan_token(MINUS)) return true;
6700 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6704 static final private boolean jj_3R_211() {
6705 if (jj_scan_token(IDENTIFIER)) return true;
6706 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6710 static final private boolean jj_3R_146() {
6711 if (jj_scan_token(PLUS)) return true;
6712 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6716 static final private boolean jj_3R_140() {
6721 if (jj_3R_147()) return true;
6722 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6723 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6724 if (jj_3R_139()) return true;
6725 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6729 static final private boolean jj_3R_199() {
6730 if (jj_scan_token(DOLLARS)) return true;
6731 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6736 if (jj_3R_212()) return true;
6737 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6738 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6742 static final private boolean jj_3R_133() {
6743 if (jj_3R_139()) return true;
6744 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6748 if (jj_3R_140()) { jj_scanpos = xsp; break; }
6749 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6754 static final private boolean jj_3R_192() {
6755 if (jj_scan_token(DOUBLEQUOTE)) return true;
6756 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6760 if (jj_3R_199()) { jj_scanpos = xsp; break; }
6761 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6763 if (jj_scan_token(DOUBLEQUOTE2)) return true;
6764 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6768 static final private boolean jj_3R_113() {
6769 if (jj_scan_token(ASSIGN)) return true;
6770 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6771 if (jj_3R_49()) return true;
6772 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6776 static final private boolean jj_3R_143() {
6777 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
6778 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6782 static final private boolean jj_3R_142() {
6783 if (jj_scan_token(RSIGNEDSHIFT)) return true;
6784 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6788 static final private boolean jj_3R_141() {
6789 if (jj_scan_token(LSHIFT)) return true;
6790 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6794 static final private boolean jj_3R_185() {
6795 if (jj_3R_192()) return true;
6796 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6800 static final private boolean jj_3R_184() {
6801 if (jj_scan_token(NULL)) return true;
6802 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6806 static final private boolean jj_3R_134() {
6813 if (jj_3R_143()) return true;
6814 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6815 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6816 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6817 if (jj_3R_133()) return true;
6818 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6822 static final private boolean jj_3R_183() {
6823 if (jj_scan_token(FALSE)) return true;
6824 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6828 static final private boolean jj_3R_182() {
6829 if (jj_scan_token(TRUE)) return true;
6830 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6834 static final private boolean jj_3R_123() {
6835 if (jj_3R_133()) return true;
6836 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6840 if (jj_3R_134()) { jj_scanpos = xsp; break; }
6841 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6846 static final private boolean jj_3R_181() {
6847 if (jj_scan_token(STRING_LITERAL)) return true;
6848 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6852 static final private boolean jj_3R_180() {
6853 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
6854 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6858 static final private boolean jj_3R_117() {
6859 if (jj_3R_116()) return true;
6860 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6864 static final private boolean jj_3R_179() {
6865 if (jj_scan_token(INTEGER_LITERAL)) return true;
6866 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6870 static final private boolean jj_3R_176() {
6885 if (jj_3R_185()) return true;
6886 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6887 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6888 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6889 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6890 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6891 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6892 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6896 static final private boolean jj_3R_138() {
6897 if (jj_scan_token(GE)) return true;
6898 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6902 static final private boolean jj_3R_137() {
6903 if (jj_scan_token(LE)) return true;
6904 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6908 static final private boolean jj_3R_136() {
6909 if (jj_scan_token(GT)) return true;
6910 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6914 static final private boolean jj_3R_112() {
6915 if (jj_scan_token(COMMA)) return true;
6916 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6919 if (jj_3R_117()) jj_scanpos = xsp;
6920 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6924 static final private boolean jj_3R_135() {
6925 if (jj_scan_token(LT)) return true;
6926 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6930 static final private boolean jj_3R_124() {
6939 if (jj_3R_138()) return true;
6940 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6941 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6942 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6943 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6944 if (jj_3R_123()) return true;
6945 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6949 static final private boolean jj_3R_120() {
6950 if (jj_3R_123()) return true;
6951 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6955 if (jj_3R_124()) { jj_scanpos = xsp; break; }
6956 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6961 static final private boolean jj_3R_111() {
6962 if (jj_3R_116()) return true;
6963 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6967 static final private boolean jj_3R_72() {
6968 if (jj_3R_50()) return true;
6969 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6973 static final private boolean jj_3R_71() {
6974 if (jj_3R_49()) return true;
6975 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6979 static final private boolean jj_3R_56() {
6984 if (jj_3R_72()) return true;
6985 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6986 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6990 static final private boolean jj_3R_48() {
6991 if (jj_scan_token(LBRACE)) return true;
6992 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6995 if (jj_3R_56()) jj_scanpos = xsp;
6996 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6997 if (jj_scan_token(RBRACE)) return true;
6998 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7002 static final private boolean jj_3R_104() {
7003 if (jj_scan_token(LIST)) return true;
7004 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7005 if (jj_scan_token(LPAREN)) return true;
7006 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7009 if (jj_3R_111()) jj_scanpos = xsp;
7010 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7013 if (jj_3R_112()) { jj_scanpos = xsp; break; }
7014 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7016 if (jj_scan_token(RPAREN)) return true;
7017 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7019 if (jj_3R_113()) jj_scanpos = xsp;
7020 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7024 static final private boolean jj_3R_206() {
7025 if (jj_scan_token(COMMA)) return true;
7026 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7030 static final private boolean jj_3_2() {
7031 if (jj_scan_token(COMMA)) return true;
7032 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7033 if (jj_3R_41()) return true;
7034 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7038 static final private boolean jj_3R_70() {
7039 if (jj_3R_50()) return true;
7040 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7044 static final private boolean jj_3R_55() {
7049 if (jj_3R_70()) return true;
7050 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7051 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7055 static final private boolean jj_3R_69() {
7056 if (jj_3R_49()) return true;
7057 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7061 static final private boolean jj_3R_205() {
7062 if (jj_3R_41()) return true;
7063 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7067 if (jj_3_2()) { jj_scanpos = xsp; break; }
7068 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7073 static final private boolean jj_3R_47() {
7074 if (jj_scan_token(LBRACKET)) return true;
7075 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7078 if (jj_3R_55()) jj_scanpos = xsp;
7079 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7080 if (jj_scan_token(RBRACKET)) return true;
7081 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7085 static final private boolean jj_3R_129() {
7086 if (jj_scan_token(TRIPLEEQUAL)) return true;
7087 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7091 static final private boolean jj_3R_128() {
7092 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
7093 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7097 static final private boolean jj_3R_127() {
7098 if (jj_scan_token(NOT_EQUAL)) return true;
7099 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7103 static final private boolean jj_3R_198() {
7104 if (jj_scan_token(LPAREN)) return true;
7105 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7108 if (jj_3R_205()) jj_scanpos = xsp;
7109 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7111 if (jj_3R_206()) jj_scanpos = xsp;
7112 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7113 if (jj_scan_token(RPAREN)) return true;
7114 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7118 static final private boolean jj_3R_126() {
7119 if (jj_scan_token(DIF)) return true;
7120 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7124 static final private boolean jj_3R_105() {
7125 if (jj_scan_token(PRINT)) return true;
7126 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7127 if (jj_3R_49()) return true;
7128 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7132 static final private boolean jj_3R_125() {
7133 if (jj_scan_token(EQUAL_EQUAL)) return true;
7134 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7138 static final private boolean jj_3R_54() {
7139 if (jj_3R_68()) return true;
7140 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7144 static final private boolean jj_3R_121() {
7155 if (jj_3R_129()) return true;
7156 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7157 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7158 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7159 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7160 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7161 if (jj_3R_120()) return true;
7162 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7166 static final private boolean jj_3R_53() {
7167 if (jj_scan_token(IDENTIFIER)) return true;
7168 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7172 static final private boolean jj_3R_118() {
7173 if (jj_3R_120()) return true;
7174 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7178 if (jj_3R_121()) { jj_scanpos = xsp; break; }
7179 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7184 static final private boolean jj_3R_214() {
7185 if (jj_scan_token(ARRAYASSIGN)) return true;
7186 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7187 if (jj_3R_49()) return true;
7188 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7192 static final private boolean jj_3R_41() {
7193 if (jj_3R_49()) return true;
7194 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7197 if (jj_3R_214()) jj_scanpos = xsp;
7198 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7202 static final private boolean jj_3R_52() {
7203 if (jj_scan_token(LBRACE)) return true;
7204 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7205 if (jj_3R_49()) return true;
7206 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7207 if (jj_scan_token(RBRACE)) return true;
7208 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7212 static final private boolean jj_3R_119() {
7213 if (jj_scan_token(BIT_AND)) return true;
7214 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7215 if (jj_3R_118()) return true;
7216 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7220 static final private boolean jj_3R_46() {
7221 if (jj_scan_token(CLASSACCESS)) return true;
7222 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7229 if (jj_3R_54()) return true;
7230 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7231 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7232 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7236 static final private boolean jj_3R_40() {
7243 if (jj_3R_48()) return true;
7244 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7245 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7246 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7250 static final private boolean jj_3R_114() {
7251 if (jj_3R_118()) return true;
7252 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7256 if (jj_3R_119()) { jj_scanpos = xsp; break; }
7257 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7262 static private boolean jj_initialized_once = false;
7263 static public PHPParserTokenManager token_source;
7264 static SimpleCharStream jj_input_stream;
7265 static public Token token, jj_nt;
7266 static private int jj_ntk;
7267 static private Token jj_scanpos, jj_lastpos;
7268 static private int jj_la;
7269 static public boolean lookingAhead = false;
7270 static private boolean jj_semLA;
7271 static private int jj_gen;
7272 static final private int[] jj_la1 = new int[128];
7273 static private int[] jj_la1_0;
7274 static private int[] jj_la1_1;
7275 static private int[] jj_la1_2;
7276 static private int[] jj_la1_3;
7277 static private int[] jj_la1_4;
7285 private static void jj_la1_0() {
7286 jj_la1_0 = new int[] {0x5800001e,0x6,0x6,0x5800001e,0x0,0x58000000,0x0,0x30000000,0x30000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000000,0x40000000,0x8,0x6,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x58000010,0x58000010,0x58000000,0x58000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x58000010,0x58000010,0x0,0x0,0x40000010,0x40000010,0x80000000,0x0,0x40000010,0x80000000,0x0,0x40000010,0x40000010,0x40000010,0x40000010,0x40000010,0x40000000,0x40000000,0x0,0x0,0x0,0x40000000,0x40000000,0x0,0x0,0x0,0x0,};
7288 private static void jj_la1_1() {
7289 jj_la1_1 = new int[] {0xd7541ffe,0x0,0x0,0xd7541ffe,0x0,0xd7541ffe,0x200000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc2000002,0x8000,0xc300001a,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc300001a,0x18,0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc3000002,0xc3000002,0xc3000002,0x0,0xc3000002,0x2,0x0,0x0,0x0,0x1000002,0x4000,0x0,0x0,0x0,0x1000000,0x0,0x0,0xc300001a,0xc300001a,0xc300001a,0xc300001a,0x2000,0xc2000000,0x0,0x0,0xc300001a,0x0,0x0,0x14541fe0,0xd7541ffe,0x0,0x0,0x3c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xd7541ffa,0x0,0x0,0x0,0x0,0x1000002,0x0,0x90000,0x90000,0xd7541ffe,0xd7541ffe,0x90000,0xc300001a,0xd7541ffe,0xd7541ffe,0x0,0x1,0xd7541ffe,0x0,0x1,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xc300001a,0xc300001a,0xc300001a,0xd7541ffe,0xd7541ffe,0xc300001a,0x0,0xc300001a,0xc300001a,};
7291 private static void jj_la1_2() {
7292 jj_la1_2 = new int[] {0x27870021,0x0,0x0,0x27870021,0x0,0x27870021,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000000,0x0,0x27870000,0x0,0x20000000,0x0,0x20000000,0x20000000,0xff80,0x0,0x27870000,0x20000,0x0,0x0,0x80000,0x200000,0x200000,0x400000,0x400000,0x0,0x40000000,0x80000000,0x20000000,0x0,0x0,0x0,0x0,0x0,0x0,0x6000000,0x6000000,0x18000000,0x18000000,0x27870000,0x27830000,0x27800000,0x1800000,0x20000000,0xff80,0x1800000,0x1800000,0x20000000,0x20000000,0x0,0x0,0x0,0x0,0x0,0xff80,0x0,0x2787ff80,0x2787ff80,0x2787ff80,0x2787ff80,0x0,0x0,0x0,0x0,0x27870000,0x0,0x10000,0x10021,0x27870021,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x27870021,0x27870021,0x27870021,0x27870021,0x0,0x0,0x1800000,0x1800000,0x21800000,0x100000,0x0,0x0,0x27870021,0x27870021,0x0,0x27870000,0x27870021,0x27870021,0x0,0x0,0x27870021,0x0,0x0,0x27970021,0x27870021,0x27870021,0x27870021,0x27870021,0x27870021,0x27970021,0x27870000,0x27870000,0x27870000,0x27870021,0x27970021,0x27870000,0x0,0x27870000,0x27870000,};
7294 private static void jj_la1_3() {
7295 jj_la1_3 = new int[] {0x18011440,0x0,0x0,0x18011440,0x0,0x18011440,0x0,0x0,0x0,0x0,0x10000000,0x0,0x0,0x18000000,0x440,0x440,0x10011440,0x0,0x18011440,0x0,0x0,0x0,0x8000000,0x0,0x0,0x0,0x18011440,0x0,0x0,0x0,0x0,0x10,0x10,0x20,0x20,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe,0xe,0x0,0x0,0x1,0x1,0x18011440,0x18011440,0x18011440,0x0,0x18011440,0x0,0x0,0x0,0x0,0x18000000,0x0,0x0,0x0,0x0,0x18000000,0x18000000,0x18000000,0x18011440,0x18011440,0x18011440,0x18011440,0x0,0x11440,0x20000,0x10080000,0x18011440,0x0,0x0,0x10000000,0x18011440,0x0,0x0,0x0,0x8000000,0x0,0x8000000,0x0,0x0,0x0,0x0,0x18011440,0x18011440,0x18011440,0x18011440,0x0,0x0,0x0,0x0,0x18000000,0x0,0x0,0x0,0x18011440,0x18011440,0x0,0x18011440,0x18011440,0x18011440,0x0,0x0,0x18011440,0x0,0x0,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x0,0x18011440,0x18011440,};
7297 private static void jj_la1_4() {
7298 jj_la1_4 = new int[] {0x8a,0x0,0x0,0x8a,0x80,0x8a,0x0,0x0,0x0,0x100,0x8,0x80000,0x80000,0x8,0x0,0x0,0x0,0x0,0x2,0x100,0x0,0x100,0x0,0x0,0x0,0xfff80000,0x2,0x0,0x0,0xfff80000,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x0,0x0,0x79000,0x79000,0x6c00,0x6c00,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x2,0x2,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x2,0x2,0x0,0x0,0x8,0x2,0x2,0x2,0x2,0x28,0x0,0x0,0x0,0x2,0x100,0x0,0x88,0x8a,0x0,0x0,0x0,0x0,0x100,0x0,0x80000,0x100,0x100,0x100,0x8a,0x8a,0x8a,0x8a,0x100,0x80000,0x0,0x0,0x0,0x8,0x0,0x0,0x8a,0x8a,0x0,0x2,0x8a,0x8a,0x0,0x0,0x8a,0x0,0x0,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x2,0x2,0x2,0x8a,0x8a,0x2,0x100,0x2,0x2,};
7300 static final private JJCalls[] jj_2_rtns = new JJCalls[5];
7301 static private boolean jj_rescan = false;
7302 static private int jj_gc = 0;
7304 public PHPParser(java.io.InputStream stream) {
7305 if (jj_initialized_once) {
7306 System.out.println("ERROR: Second call to constructor of static parser. You must");
7307 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7308 System.out.println(" during parser generation.");
7311 jj_initialized_once = true;
7312 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7313 token_source = new PHPParserTokenManager(jj_input_stream);
7314 token = new Token();
7317 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7318 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7321 static public void ReInit(java.io.InputStream stream) {
7322 jj_input_stream.ReInit(stream, 1, 1);
7323 token_source.ReInit(jj_input_stream);
7324 token = new Token();
7327 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7328 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7331 public PHPParser(java.io.Reader stream) {
7332 if (jj_initialized_once) {
7333 System.out.println("ERROR: Second call to constructor of static parser. You must");
7334 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7335 System.out.println(" during parser generation.");
7338 jj_initialized_once = true;
7339 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7340 token_source = new PHPParserTokenManager(jj_input_stream);
7341 token = new Token();
7344 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7345 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7348 static public void ReInit(java.io.Reader stream) {
7349 jj_input_stream.ReInit(stream, 1, 1);
7350 token_source.ReInit(jj_input_stream);
7351 token = new Token();
7354 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7355 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7358 public PHPParser(PHPParserTokenManager tm) {
7359 if (jj_initialized_once) {
7360 System.out.println("ERROR: Second call to constructor of static parser. You must");
7361 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7362 System.out.println(" during parser generation.");
7365 jj_initialized_once = true;
7367 token = new Token();
7370 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7371 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7374 public void ReInit(PHPParserTokenManager tm) {
7376 token = new Token();
7379 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7380 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7383 static final private Token jj_consume_token(int kind) throws ParseException {
7385 if ((oldToken = token).next != null) token = token.next;
7386 else token = token.next = token_source.getNextToken();
7388 if (token.kind == kind) {
7390 if (++jj_gc > 100) {
7392 for (int i = 0; i < jj_2_rtns.length; i++) {
7393 JJCalls c = jj_2_rtns[i];
7395 if (c.gen < jj_gen) c.first = null;
7404 throw generateParseException();
7407 static final private boolean jj_scan_token(int kind) {
7408 if (jj_scanpos == jj_lastpos) {
7410 if (jj_scanpos.next == null) {
7411 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
7413 jj_lastpos = jj_scanpos = jj_scanpos.next;
7416 jj_scanpos = jj_scanpos.next;
7419 int i = 0; Token tok = token;
7420 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
7421 if (tok != null) jj_add_error_token(kind, i);
7423 return (jj_scanpos.kind != kind);
7426 static final public Token getNextToken() {
7427 if (token.next != null) token = token.next;
7428 else token = token.next = token_source.getNextToken();
7434 static final public Token getToken(int index) {
7435 Token t = lookingAhead ? jj_scanpos : token;
7436 for (int i = 0; i < index; i++) {
7437 if (t.next != null) t = t.next;
7438 else t = t.next = token_source.getNextToken();
7443 static final private int jj_ntk() {
7444 if ((jj_nt=token.next) == null)
7445 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
7447 return (jj_ntk = jj_nt.kind);
7450 static private java.util.Vector jj_expentries = new java.util.Vector();
7451 static private int[] jj_expentry;
7452 static private int jj_kind = -1;
7453 static private int[] jj_lasttokens = new int[100];
7454 static private int jj_endpos;
7456 static private void jj_add_error_token(int kind, int pos) {
7457 if (pos >= 100) return;
7458 if (pos == jj_endpos + 1) {
7459 jj_lasttokens[jj_endpos++] = kind;
7460 } else if (jj_endpos != 0) {
7461 jj_expentry = new int[jj_endpos];
7462 for (int i = 0; i < jj_endpos; i++) {
7463 jj_expentry[i] = jj_lasttokens[i];
7465 boolean exists = false;
7466 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
7467 int[] oldentry = (int[])(enum.nextElement());
7468 if (oldentry.length == jj_expentry.length) {
7470 for (int i = 0; i < jj_expentry.length; i++) {
7471 if (oldentry[i] != jj_expentry[i]) {
7479 if (!exists) jj_expentries.addElement(jj_expentry);
7480 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
7484 static public ParseException generateParseException() {
7485 jj_expentries.removeAllElements();
7486 boolean[] la1tokens = new boolean[160];
7487 for (int i = 0; i < 160; i++) {
7488 la1tokens[i] = false;
7491 la1tokens[jj_kind] = true;
7494 for (int i = 0; i < 128; i++) {
7495 if (jj_la1[i] == jj_gen) {
7496 for (int j = 0; j < 32; j++) {
7497 if ((jj_la1_0[i] & (1<<j)) != 0) {
7498 la1tokens[j] = true;
7500 if ((jj_la1_1[i] & (1<<j)) != 0) {
7501 la1tokens[32+j] = true;
7503 if ((jj_la1_2[i] & (1<<j)) != 0) {
7504 la1tokens[64+j] = true;
7506 if ((jj_la1_3[i] & (1<<j)) != 0) {
7507 la1tokens[96+j] = true;
7509 if ((jj_la1_4[i] & (1<<j)) != 0) {
7510 la1tokens[128+j] = true;
7515 for (int i = 0; i < 160; i++) {
7517 jj_expentry = new int[1];
7519 jj_expentries.addElement(jj_expentry);
7524 jj_add_error_token(0, 0);
7525 int[][] exptokseq = new int[jj_expentries.size()][];
7526 for (int i = 0; i < jj_expentries.size(); i++) {
7527 exptokseq[i] = (int[])jj_expentries.elementAt(i);
7529 return new ParseException(token, exptokseq, tokenImage);
7532 static final public void enable_tracing() {
7535 static final public void disable_tracing() {
7538 static final private void jj_rescan_token() {
7540 for (int i = 0; i < 5; i++) {
7541 JJCalls p = jj_2_rtns[i];
7543 if (p.gen > jj_gen) {
7544 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7546 case 0: jj_3_1(); break;
7547 case 1: jj_3_2(); break;
7548 case 2: jj_3_3(); break;
7549 case 3: jj_3_4(); break;
7550 case 4: jj_3_5(); break;
7554 } while (p != null);
7559 static final private void jj_save(int index, int xla) {
7560 JJCalls p = jj_2_rtns[index];
7561 while (p.gen > jj_gen) {
7562 if (p.next == null) { p = p.next = new JJCalls(); break; }
7565 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7568 static final class JJCalls {