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 {if (true) return new FunctionCall(func,args,args[args.length-1].sourceEnd);}
2770 throw new Error("Missing return statement in function");
2774 * An argument list is a list of arguments separated by comma :
2775 * argumentDeclaration() (, argumentDeclaration)*
2776 * @return an array of arguments
2778 static final public Expression[] ArgumentList() throws ParseException {
2780 final ArrayList list = new ArrayList();
2784 list.add(arg);pos = arg.sourceEnd;
2787 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2792 jj_la1[75] = jj_gen;
2795 token = jj_consume_token(COMMA);
2796 pos = token.sourceEnd;
2800 pos = arg.sourceEnd;
2801 } catch (ParseException e) {
2802 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2806 processParseException(e);
2809 final Expression[] arguments = new Expression[list.size()];
2810 list.toArray(arguments);
2811 {if (true) return arguments;}
2812 throw new Error("Missing return statement in function");
2816 * A Statement without break.
2817 * @return a statement
2819 static final public Statement StatementNoBreak() throws ParseException {
2820 final Statement statement;
2823 statement = expressionStatement();
2824 {if (true) return statement;}
2826 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2828 statement = LabeledStatement();
2829 {if (true) return statement;}
2832 statement = Block();
2833 {if (true) return statement;}
2836 statement = EmptyStatement();
2837 {if (true) return statement;}
2840 statement = SwitchStatement();
2841 {if (true) return statement;}
2844 statement = IfStatement();
2845 {if (true) return statement;}
2848 statement = WhileStatement();
2849 {if (true) return statement;}
2852 statement = DoStatement();
2853 {if (true) return statement;}
2856 statement = ForStatement();
2857 {if (true) return statement;}
2860 statement = ForeachStatement();
2861 {if (true) return statement;}
2864 statement = ContinueStatement();
2865 {if (true) return statement;}
2868 statement = ReturnStatement();
2869 {if (true) return statement;}
2872 statement = EchoStatement();
2873 {if (true) return statement;}
2880 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2882 token = jj_consume_token(AT);
2885 jj_la1[76] = jj_gen;
2888 statement = IncludeStatement();
2889 if (token != null) {
2890 ((InclusionStatement)statement).silent = true;
2891 statement.sourceStart = token.sourceStart;
2893 {if (true) return statement;}
2896 statement = StaticStatement();
2897 {if (true) return statement;}
2900 statement = GlobalStatement();
2901 {if (true) return statement;}
2904 statement = defineStatement();
2905 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2908 jj_la1[77] = jj_gen;
2909 jj_consume_token(-1);
2910 throw new ParseException();
2913 throw new Error("Missing return statement in function");
2917 * A statement expression.
2919 * @return an expression
2921 static final public Statement expressionStatement() throws ParseException {
2922 final Statement statement;
2924 statement = Expression();
2926 token = jj_consume_token(SEMICOLON);
2927 statement.sourceEnd = token.sourceEnd;
2928 } catch (ParseException e) {
2929 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2930 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2932 errorStart = statement.sourceEnd+1;
2933 errorEnd = statement.sourceEnd+1;
2934 processParseExceptionDebug(e);
2937 {if (true) return statement;}
2938 throw new Error("Missing return statement in function");
2941 static final public Define defineStatement() throws ParseException {
2942 Expression defineName,defineValue;
2943 final Token defineToken;
2946 defineToken = jj_consume_token(DEFINE);
2947 pos = defineToken.sourceEnd+1;
2949 token = jj_consume_token(LPAREN);
2950 pos = token.sourceEnd+1;
2951 } catch (ParseException e) {
2952 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2956 processParseExceptionDebug(e);
2959 defineName = Expression();
2960 pos = defineName.sourceEnd+1;
2961 } catch (ParseException e) {
2962 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2966 processParseExceptionDebug(e);
2967 defineName = new StringLiteral(SYNTAX_ERROR_CHAR,pos,pos);
2970 token = jj_consume_token(COMMA);
2971 pos = defineName.sourceEnd+1;
2972 } catch (ParseException e) {
2973 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2977 processParseExceptionDebug(e);
2980 defineValue = Expression();
2981 pos = defineValue.sourceEnd+1;
2982 } catch (ParseException e) {
2983 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2987 processParseExceptionDebug(e);
2988 defineValue = new StringLiteral(SYNTAX_ERROR_CHAR,pos,pos);
2991 token = jj_consume_token(RPAREN);
2992 pos = token.sourceEnd+1;
2993 } catch (ParseException e) {
2994 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2998 processParseExceptionDebug(e);
3000 {if (true) return new Define(currentSegment,
3003 defineToken.sourceStart,
3005 throw new Error("Missing return statement in function");
3009 * A Normal statement.
3011 static final public Statement Statement() throws ParseException {
3012 final Statement statement;
3013 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3045 case INTEGER_LITERAL:
3046 case FLOATING_POINT_LITERAL:
3047 case STRING_LITERAL:
3054 statement = StatementNoBreak();
3055 {if (true) return statement;}
3058 statement = BreakStatement();
3059 {if (true) return statement;}
3062 jj_la1[78] = jj_gen;
3063 jj_consume_token(-1);
3064 throw new ParseException();
3066 throw new Error("Missing return statement in function");
3070 * An html block inside a php syntax.
3072 static final public HTMLBlock htmlBlock() throws ParseException {
3073 final int startIndex = nodePtr;
3074 final AstNode[] blockNodes;
3077 phpEnd = jj_consume_token(PHPEND);
3078 htmlStart = phpEnd.sourceEnd;
3081 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3086 jj_la1[79] = jj_gen;
3092 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3094 jj_consume_token(PHPSTARTLONG);
3097 jj_consume_token(PHPSTARTSHORT);
3100 jj_la1[80] = jj_gen;
3101 jj_consume_token(-1);
3102 throw new ParseException();
3104 PHPParser.createNewHTMLCode();
3105 } catch (ParseException e) {
3106 errorMessage = "unexpected end of file , '<?php' expected";
3108 errorStart = SimpleCharStream.getPosition();
3109 errorEnd = SimpleCharStream.getPosition();
3110 {if (true) throw e;}
3112 nbNodes = nodePtr - startIndex;
3114 {if (true) return null;}
3116 blockNodes = new AstNode[nbNodes];
3117 System.arraycopy(nodes,startIndex+1,blockNodes,0,nbNodes);
3118 nodePtr = startIndex;
3119 {if (true) return new HTMLBlock(blockNodes);}
3120 throw new Error("Missing return statement in function");
3124 * An include statement. It's "include" an expression;
3126 static final public InclusionStatement IncludeStatement() throws ParseException {
3129 final InclusionStatement inclusionStatement;
3130 final Token token, token2;
3132 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3134 token = jj_consume_token(REQUIRE);
3135 keyword = InclusionStatement.REQUIRE;pos=token.sourceEnd;
3138 token = jj_consume_token(REQUIRE_ONCE);
3139 keyword = InclusionStatement.REQUIRE_ONCE;pos=token.sourceEnd;
3142 token = jj_consume_token(INCLUDE);
3143 keyword = InclusionStatement.INCLUDE;pos=token.sourceEnd;
3146 token = jj_consume_token(INCLUDE_ONCE);
3147 keyword = InclusionStatement.INCLUDE_ONCE;pos=token.sourceEnd;
3150 jj_la1[81] = jj_gen;
3151 jj_consume_token(-1);
3152 throw new ParseException();
3155 expr = Expression();
3156 pos = expr.sourceEnd;
3157 } catch (ParseException e) {
3158 if (errorMessage != null) {
3159 {if (true) throw e;}
3161 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
3163 errorStart = e.currentToken.next.sourceStart;
3164 errorEnd = e.currentToken.next.sourceEnd;
3165 expr = new ConstantIdentifier(SYNTAX_ERROR_CHAR,pos,pos);
3166 processParseExceptionDebug(e);
3169 token2 = jj_consume_token(SEMICOLON);
3170 pos=token2.sourceEnd;
3171 } catch (ParseException e) {
3172 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
3174 errorStart = e.currentToken.next.sourceStart;
3175 errorEnd = e.currentToken.next.sourceEnd;
3176 processParseExceptionDebug(e);
3178 inclusionStatement = new InclusionStatement(currentSegment,
3183 currentSegment.add(inclusionStatement);
3184 {if (true) return inclusionStatement;}
3185 throw new Error("Missing return statement in function");
3188 static final public PrintExpression PrintExpression() throws ParseException {
3189 final Expression expr;
3190 final Token printToken;
3191 token = jj_consume_token(PRINT);
3192 expr = Expression();
3193 {if (true) return new PrintExpression(expr,token.sourceStart,expr.sourceEnd);}
3194 throw new Error("Missing return statement in function");
3197 static final public ListExpression ListExpression() throws ParseException {
3198 Expression expr = null;
3199 final Expression expression;
3200 final ArrayList list = new ArrayList();
3202 final Token listToken, rParen;
3204 listToken = jj_consume_token(LIST);
3205 pos = listToken.sourceEnd;
3207 token = jj_consume_token(LPAREN);
3208 pos = token.sourceEnd;
3209 } catch (ParseException e) {
3210 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
3212 errorStart = listToken.sourceEnd+1;
3213 errorEnd = listToken.sourceEnd+1;
3214 processParseExceptionDebug(e);
3216 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3218 expr = VariableDeclaratorId();
3219 list.add(expr);pos = expr.sourceEnd;
3222 jj_la1[82] = jj_gen;
3225 if (expr == null) list.add(null);
3228 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3233 jj_la1[83] = jj_gen;
3237 token = jj_consume_token(COMMA);
3238 pos = token.sourceEnd;
3239 } catch (ParseException e) {
3240 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
3244 processParseExceptionDebug(e);
3246 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3248 expr = VariableDeclaratorId();
3249 list.add(expr);pos = expr.sourceEnd;
3252 jj_la1[84] = jj_gen;
3257 rParen = jj_consume_token(RPAREN);
3258 pos = rParen.sourceEnd;
3259 } catch (ParseException e) {
3260 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
3264 processParseExceptionDebug(e);
3266 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3268 jj_consume_token(ASSIGN);
3269 expression = Expression();
3270 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3272 {if (true) return new ListExpression(vars,
3274 listToken.sourceStart,
3275 expression.sourceEnd);}
3278 jj_la1[85] = jj_gen;
3281 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3283 {if (true) return new ListExpression(vars,listToken.sourceStart,pos);}
3284 throw new Error("Missing return statement in function");
3288 * An echo statement.
3289 * echo anyexpression (, otherexpression)*
3291 static final public EchoStatement EchoStatement() throws ParseException {
3292 final ArrayList expressions = new ArrayList();
3295 Token token2 = null;
3296 token = jj_consume_token(ECHO);
3297 expr = Expression();
3298 expressions.add(expr);
3301 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3306 jj_la1[86] = jj_gen;
3309 jj_consume_token(COMMA);
3310 expr = Expression();
3311 expressions.add(expr);
3314 token2 = jj_consume_token(SEMICOLON);
3315 } catch (ParseException e) {
3316 if (e.currentToken.next.kind != 4) {
3317 errorMessage = "';' expected after 'echo' statement";
3319 errorStart = e.currentToken.sourceEnd;
3320 errorEnd = e.currentToken.sourceEnd;
3321 processParseExceptionDebug(e);
3324 final Expression[] exprs = new Expression[expressions.size()];
3325 expressions.toArray(exprs);
3326 if (token2 == null) {
3327 {if (true) return new EchoStatement(exprs,token.sourceStart, exprs[exprs.length-1].sourceEnd);}
3329 {if (true) return new EchoStatement(exprs,token.sourceStart, token2.sourceEnd);}
3330 throw new Error("Missing return statement in function");
3333 static final public GlobalStatement GlobalStatement() throws ParseException {
3335 final ArrayList vars = new ArrayList();
3336 final GlobalStatement global;
3337 final Token token, token2;
3339 token = jj_consume_token(GLOBAL);
3341 vars.add(expr);pos = expr.sourceEnd+1;
3344 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3349 jj_la1[87] = jj_gen;
3352 jj_consume_token(COMMA);
3354 vars.add(expr);pos = expr.sourceEnd+1;
3357 token2 = jj_consume_token(SEMICOLON);
3358 pos = token2.sourceEnd+1;
3359 } catch (ParseException e) {
3360 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3364 processParseExceptionDebug(e);
3366 final Variable[] variables = new Variable[vars.size()];
3367 vars.toArray(variables);
3368 global = new GlobalStatement(currentSegment,
3372 currentSegment.add(global);
3373 {if (true) return global;}
3374 throw new Error("Missing return statement in function");
3377 static final public StaticStatement StaticStatement() throws ParseException {
3378 final ArrayList vars = new ArrayList();
3379 VariableDeclaration expr;
3380 final Token token, token2;
3382 token = jj_consume_token(STATIC);
3383 expr = VariableDeclarator();
3384 vars.add(expr);pos = expr.sourceEnd+1;
3387 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3392 jj_la1[88] = jj_gen;
3395 jj_consume_token(COMMA);
3396 expr = VariableDeclarator();
3397 vars.add(expr);pos = expr.sourceEnd+1;
3400 token2 = jj_consume_token(SEMICOLON);
3401 pos = token2.sourceEnd+1;
3402 } catch (ParseException e) {
3403 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3407 processParseException(e);
3409 final VariableDeclaration[] variables = new VariableDeclaration[vars.size()];
3410 vars.toArray(variables);
3411 {if (true) return new StaticStatement(variables,
3414 throw new Error("Missing return statement in function");
3417 static final public LabeledStatement LabeledStatement() throws ParseException {
3419 final Statement statement;
3420 label = jj_consume_token(IDENTIFIER);
3421 jj_consume_token(COLON);
3422 statement = Statement();
3423 {if (true) return new LabeledStatement(label.image,statement,label.sourceStart,statement.sourceEnd);}
3424 throw new Error("Missing return statement in function");
3434 static final public Block Block() throws ParseException {
3435 final ArrayList list = new ArrayList();
3436 Statement statement;
3437 final Token token, token2;
3440 token = jj_consume_token(LBRACE);
3441 pos = token.sourceEnd+1;start=token.sourceStart;
3442 } catch (ParseException e) {
3443 errorMessage = "'{' expected";
3445 pos = PHPParser.token.sourceEnd+1;
3449 processParseExceptionDebug(e);
3453 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3489 case INTEGER_LITERAL:
3490 case FLOATING_POINT_LITERAL:
3491 case STRING_LITERAL:
3501 jj_la1[89] = jj_gen;
3504 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3539 case INTEGER_LITERAL:
3540 case FLOATING_POINT_LITERAL:
3541 case STRING_LITERAL:
3548 statement = BlockStatement();
3549 list.add(statement);pos = statement.sourceEnd+1;
3552 statement = htmlBlock();
3553 if (statement != null) {
3554 list.add(statement);
3555 pos = statement.sourceEnd+1;
3557 pos = PHPParser.token.sourceEnd+1;
3560 jj_la1[90] = jj_gen;
3561 jj_consume_token(-1);
3562 throw new ParseException();
3566 token2 = jj_consume_token(RBRACE);
3567 pos = token2.sourceEnd+1;
3568 } catch (ParseException e) {
3569 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3573 processParseExceptionDebug(e);
3575 final Statement[] statements = new Statement[list.size()];
3576 list.toArray(statements);
3577 {if (true) return new Block(statements,start,pos);}
3578 throw new Error("Missing return statement in function");
3581 static final public Statement BlockStatement() throws ParseException {
3582 final Statement statement;
3583 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3616 case INTEGER_LITERAL:
3617 case FLOATING_POINT_LITERAL:
3618 case STRING_LITERAL:
3626 statement = Statement();
3627 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3628 {if (true) return statement;}
3629 } catch (ParseException e) {
3630 errorMessage = "unexpected token : '"+ e.currentToken.image +"', a statement was expected";
3632 errorStart = e.currentToken.sourceStart;
3633 errorEnd = e.currentToken.sourceEnd;
3634 {if (true) throw e;}
3638 statement = ClassDeclaration();
3639 {if (true) return statement;}
3642 statement = MethodDeclaration();
3643 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3644 currentSegment.add((MethodDeclaration) statement);
3645 ((MethodDeclaration) statement).analyzeCode();
3646 {if (true) return statement;}
3649 jj_la1[91] = jj_gen;
3650 jj_consume_token(-1);
3651 throw new ParseException();
3653 throw new Error("Missing return statement in function");
3657 * A Block statement that will not contain any 'break'
3659 static final public Statement BlockStatementNoBreak() throws ParseException {
3660 final Statement statement;
3661 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3693 case INTEGER_LITERAL:
3694 case FLOATING_POINT_LITERAL:
3695 case STRING_LITERAL:
3702 statement = StatementNoBreak();
3703 {if (true) return statement;}
3706 statement = ClassDeclaration();
3707 {if (true) return statement;}
3710 statement = MethodDeclaration();
3711 currentSegment.add((MethodDeclaration) statement);
3712 ((MethodDeclaration) statement).analyzeCode();
3713 {if (true) return statement;}
3716 jj_la1[92] = jj_gen;
3717 jj_consume_token(-1);
3718 throw new ParseException();
3720 throw new Error("Missing return statement in function");
3724 * used only by ForInit()
3726 static final public Expression[] LocalVariableDeclaration() throws ParseException {
3727 final ArrayList list = new ArrayList();
3733 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3738 jj_la1[93] = jj_gen;
3741 jj_consume_token(COMMA);
3745 final Expression[] vars = new Expression[list.size()];
3747 {if (true) return vars;}
3748 throw new Error("Missing return statement in function");
3752 * used only by LocalVariableDeclaration().
3754 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3755 final Variable varName;
3756 Expression initializer = null;
3757 varName = Variable();
3758 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3760 jj_consume_token(ASSIGN);
3761 initializer = Expression();
3764 jj_la1[94] = jj_gen;
3767 if (initializer == null) {
3768 {if (true) return new VariableDeclaration(currentSegment,
3770 varName.sourceStart,
3771 varName.sourceEnd);}
3773 {if (true) return new VariableDeclaration(currentSegment,
3776 VariableDeclaration.EQUAL,
3777 varName.sourceStart);}
3778 throw new Error("Missing return statement in function");
3781 static final public EmptyStatement EmptyStatement() throws ParseException {
3783 token = jj_consume_token(SEMICOLON);
3784 {if (true) return new EmptyStatement(token.sourceStart,token.sourceEnd);}
3785 throw new Error("Missing return statement in function");
3789 * used only by StatementExpressionList() which is used only by ForInit() and ForStatement()
3791 static final public Expression StatementExpression() throws ParseException {
3792 final Expression expr;
3793 final Token operator;
3794 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3797 expr = PreIncDecExpression();
3798 {if (true) return expr;}
3805 expr = PrimaryExpression();
3806 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3809 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3811 operator = jj_consume_token(PLUS_PLUS);
3812 {if (true) return new PostfixedUnaryExpression(expr,
3813 OperatorIds.PLUS_PLUS,
3814 operator.sourceEnd);}
3817 operator = jj_consume_token(MINUS_MINUS);
3818 {if (true) return new PostfixedUnaryExpression(expr,
3819 OperatorIds.MINUS_MINUS,
3820 operator.sourceEnd);}
3823 jj_la1[95] = jj_gen;
3824 jj_consume_token(-1);
3825 throw new ParseException();
3829 jj_la1[96] = jj_gen;
3832 {if (true) return expr;}
3835 jj_la1[97] = jj_gen;
3836 jj_consume_token(-1);
3837 throw new ParseException();
3839 throw new Error("Missing return statement in function");
3842 static final public SwitchStatement SwitchStatement() throws ParseException {
3843 Expression variable;
3844 final AbstractCase[] cases;
3845 final Token switchToken,lparenToken,rparenToken;
3847 switchToken = jj_consume_token(SWITCH);
3848 pos = switchToken.sourceEnd+1;
3850 lparenToken = jj_consume_token(LPAREN);
3851 pos = lparenToken.sourceEnd+1;
3852 } catch (ParseException e) {
3853 errorMessage = "'(' expected after 'switch'";
3857 processParseExceptionDebug(e);
3860 variable = Expression();
3861 pos = variable.sourceEnd+1;
3862 } catch (ParseException e) {
3863 if (errorMessage != null) {
3864 {if (true) throw e;}
3866 errorMessage = "expression expected";
3870 processParseExceptionDebug(e);
3871 variable = new ConstantIdentifier(SYNTAX_ERROR_CHAR,pos,pos);
3874 rparenToken = jj_consume_token(RPAREN);
3875 pos = rparenToken.sourceEnd+1;
3876 } catch (ParseException e) {
3877 errorMessage = "')' expected";
3881 processParseExceptionDebug(e);
3883 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3885 cases = switchStatementBrace();
3888 cases = switchStatementColon(switchToken.sourceStart, switchToken.sourceEnd);
3891 jj_la1[98] = jj_gen;
3892 jj_consume_token(-1);
3893 throw new ParseException();
3895 {if (true) return new SwitchStatement(variable,
3897 switchToken.sourceStart,
3898 PHPParser.token.sourceEnd);}
3899 throw new Error("Missing return statement in function");
3902 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3904 final ArrayList cases = new ArrayList();
3907 token = jj_consume_token(LBRACE);
3908 pos = token.sourceEnd;
3911 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3917 jj_la1[99] = jj_gen;
3920 cas = switchLabel0();
3921 cases.add(cas);pos = cas.sourceEnd;
3924 token = jj_consume_token(RBRACE);
3925 pos = token.sourceEnd;
3926 } catch (ParseException e) {
3927 errorMessage = "'}' expected";
3931 processParseExceptionDebug(e);
3933 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3934 cases.toArray(abcase);
3935 {if (true) return abcase;}
3936 throw new Error("Missing return statement in function");
3940 * A Switch statement with : ... endswitch;
3941 * @param start the begin offset of the switch
3942 * @param end the end offset of the switch
3944 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3946 final ArrayList cases = new ArrayList();
3949 token = jj_consume_token(COLON);
3950 pos = token.sourceEnd;
3952 setMarker(fileToParse,
3953 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3957 "Line " + token.beginLine);
3958 } catch (CoreException e) {
3959 PHPeclipsePlugin.log(e);
3963 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3969 jj_la1[100] = jj_gen;
3972 cas = switchLabel0();
3973 cases.add(cas);pos = cas.sourceEnd;
3976 token = jj_consume_token(ENDSWITCH);
3977 pos = token.sourceEnd;
3978 } catch (ParseException e) {
3979 errorMessage = "'endswitch' expected";
3983 processParseExceptionDebug(e);
3986 token = jj_consume_token(SEMICOLON);
3987 pos = token.sourceEnd;
3988 } catch (ParseException e) {
3989 errorMessage = "';' expected after 'endswitch' keyword";
3993 processParseExceptionDebug(e);
3995 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3996 cases.toArray(abcase);
3997 {if (true) return abcase;}
3998 throw new Error("Missing return statement in function");
4001 static final public AbstractCase switchLabel0() throws ParseException {
4002 final Expression expr;
4003 Statement statement;
4004 final ArrayList stmts = new ArrayList();
4005 final Token token = PHPParser.token;
4006 expr = SwitchLabel();
4009 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4045 case INTEGER_LITERAL:
4046 case FLOATING_POINT_LITERAL:
4047 case STRING_LITERAL:
4057 jj_la1[101] = jj_gen;
4060 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4094 case INTEGER_LITERAL:
4095 case FLOATING_POINT_LITERAL:
4096 case STRING_LITERAL:
4103 statement = BlockStatementNoBreak();
4104 stmts.add(statement);
4107 statement = htmlBlock();
4108 if (statement != null) {stmts.add(statement);}
4111 statement = BreakStatement();
4112 stmts.add(statement);
4115 jj_la1[102] = jj_gen;
4116 jj_consume_token(-1);
4117 throw new ParseException();
4120 final int listSize = stmts.size();
4121 final Statement[] stmtsArray = new Statement[listSize];
4122 stmts.toArray(stmtsArray);
4123 if (expr == null) {//it's a default
4124 {if (true) return new DefaultCase(stmtsArray,token.sourceStart,stmtsArray[listSize-1].sourceEnd);}
4126 if (listSize != 0) {
4127 {if (true) return new Case(expr,stmtsArray,expr.sourceStart,stmtsArray[listSize-1].sourceEnd);}
4129 {if (true) return new Case(expr,stmtsArray,expr.sourceStart,expr.sourceEnd);}
4131 throw new Error("Missing return statement in function");
4136 * case Expression() :
4138 * @return the if it was a case and null if not
4140 static final public Expression SwitchLabel() throws ParseException {
4141 final Expression expr;
4142 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4144 token = jj_consume_token(CASE);
4146 expr = Expression();
4147 } catch (ParseException e) {
4148 if (errorMessage != null) {if (true) throw e;}
4149 errorMessage = "expression expected after 'case' keyword";
4151 errorStart = token.sourceEnd +1;
4152 errorEnd = token.sourceEnd +1;
4153 {if (true) throw e;}
4156 token = jj_consume_token(COLON);
4157 {if (true) return expr;}
4158 } catch (ParseException e) {
4159 errorMessage = "':' expected after case expression";
4161 errorStart = expr.sourceEnd+1;
4162 errorEnd = expr.sourceEnd+1;
4163 processParseExceptionDebug(e);
4167 token = jj_consume_token(_DEFAULT);
4169 jj_consume_token(COLON);
4170 } catch (ParseException e) {
4171 errorMessage = "':' expected after 'default' keyword";
4173 errorStart = token.sourceEnd+1;
4174 errorEnd = token.sourceEnd+1;
4175 processParseExceptionDebug(e);
4177 {if (true) return null;}
4180 jj_la1[103] = jj_gen;
4181 jj_consume_token(-1);
4182 throw new ParseException();
4184 throw new Error("Missing return statement in function");
4187 static final public Break BreakStatement() throws ParseException {
4188 Expression expression = null;
4189 final Token token, token2;
4191 token = jj_consume_token(BREAK);
4192 pos = token.sourceEnd+1;
4193 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4209 case INTEGER_LITERAL:
4210 case FLOATING_POINT_LITERAL:
4211 case STRING_LITERAL:
4216 expression = Expression();
4217 pos = expression.sourceEnd+1;
4220 jj_la1[104] = jj_gen;
4224 token2 = jj_consume_token(SEMICOLON);
4225 pos = token2.sourceEnd;
4226 } catch (ParseException e) {
4227 errorMessage = "';' expected after 'break' keyword";
4231 processParseExceptionDebug(e);
4233 {if (true) return new Break(expression, token.sourceStart, pos);}
4234 throw new Error("Missing return statement in function");
4237 static final public IfStatement IfStatement() throws ParseException {
4238 final Expression condition;
4239 final IfStatement ifStatement;
4241 token = jj_consume_token(IF);
4242 condition = Condition("if");
4243 ifStatement = IfStatement0(condition,token.sourceStart,token.sourceEnd);
4244 {if (true) return ifStatement;}
4245 throw new Error("Missing return statement in function");
4248 static final public Expression Condition(final String keyword) throws ParseException {
4249 final Expression condition;
4251 jj_consume_token(LPAREN);
4252 } catch (ParseException e) {
4253 errorMessage = "'(' expected after " + keyword + " keyword";
4255 errorStart = PHPParser.token.sourceEnd + 1;
4256 errorEnd = PHPParser.token.sourceEnd + 1;
4257 processParseExceptionDebug(e);
4259 condition = Expression();
4261 jj_consume_token(RPAREN);
4262 } catch (ParseException e) {
4263 errorMessage = "')' expected after " + keyword + " keyword";
4265 errorStart = condition.sourceEnd+1;
4266 errorEnd = condition.sourceEnd+1;
4267 processParseExceptionDebug(e);
4269 {if (true) return condition;}
4270 throw new Error("Missing return statement in function");
4273 static final public IfStatement IfStatement0(final Expression condition, final int start,final int end) throws ParseException {
4274 Statement statement;
4275 final Statement stmt;
4276 final Statement[] statementsArray;
4277 ElseIf elseifStatement;
4278 Else elseStatement = null;
4279 final ArrayList stmts;
4280 final ArrayList elseIfList = new ArrayList();
4281 final ElseIf[] elseIfs;
4282 int pos = SimpleCharStream.getPosition();
4283 final int endStatements;
4284 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4286 jj_consume_token(COLON);
4287 stmts = new ArrayList();
4290 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4324 case INTEGER_LITERAL:
4325 case FLOATING_POINT_LITERAL:
4326 case STRING_LITERAL:
4336 jj_la1[105] = jj_gen;
4339 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4372 case INTEGER_LITERAL:
4373 case FLOATING_POINT_LITERAL:
4374 case STRING_LITERAL:
4381 statement = Statement();
4382 stmts.add(statement);
4385 statement = htmlBlock();
4386 if (statement != null) {stmts.add(statement);}
4389 jj_la1[106] = jj_gen;
4390 jj_consume_token(-1);
4391 throw new ParseException();
4394 endStatements = SimpleCharStream.getPosition();
4397 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4402 jj_la1[107] = jj_gen;
4405 elseifStatement = ElseIfStatementColon();
4406 elseIfList.add(elseifStatement);
4408 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4410 elseStatement = ElseStatementColon();
4413 jj_la1[108] = jj_gen;
4417 setMarker(fileToParse,
4418 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4422 "Line " + token.beginLine);
4423 } catch (CoreException e) {
4424 PHPeclipsePlugin.log(e);
4427 jj_consume_token(ENDIF);
4428 } catch (ParseException e) {
4429 errorMessage = "'endif' expected";
4431 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4432 errorEnd = SimpleCharStream.getPosition() + 1;
4433 {if (true) throw e;}
4436 jj_consume_token(SEMICOLON);
4437 } catch (ParseException e) {
4438 errorMessage = "';' expected after 'endif' keyword";
4440 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4441 errorEnd = SimpleCharStream.getPosition() + 1;
4442 {if (true) throw e;}
4444 elseIfs = new ElseIf[elseIfList.size()];
4445 elseIfList.toArray(elseIfs);
4446 if (stmts.size() == 1) {
4447 {if (true) return new IfStatement(condition,
4448 (Statement) stmts.get(0),
4452 SimpleCharStream.getPosition());}
4454 statementsArray = new Statement[stmts.size()];
4455 stmts.toArray(statementsArray);
4456 {if (true) return new IfStatement(condition,
4457 new Block(statementsArray,pos,endStatements),
4461 SimpleCharStream.getPosition());}
4497 case INTEGER_LITERAL:
4498 case FLOATING_POINT_LITERAL:
4499 case STRING_LITERAL:
4506 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4539 case INTEGER_LITERAL:
4540 case FLOATING_POINT_LITERAL:
4541 case STRING_LITERAL:
4554 jj_la1[109] = jj_gen;
4555 jj_consume_token(-1);
4556 throw new ParseException();
4560 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4565 jj_la1[110] = jj_gen;
4568 elseifStatement = ElseIfStatement();
4569 elseIfList.add(elseifStatement);
4571 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4573 jj_consume_token(ELSE);
4575 pos = SimpleCharStream.getPosition();
4576 statement = Statement();
4577 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4578 } catch (ParseException e) {
4579 if (errorMessage != null) {
4580 {if (true) throw e;}
4582 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4584 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4585 errorEnd = SimpleCharStream.getPosition() + 1;
4586 {if (true) throw e;}
4590 jj_la1[111] = jj_gen;
4593 elseIfs = new ElseIf[elseIfList.size()];
4594 elseIfList.toArray(elseIfs);
4595 {if (true) return new IfStatement(condition,
4600 SimpleCharStream.getPosition());}
4603 jj_la1[112] = jj_gen;
4604 jj_consume_token(-1);
4605 throw new ParseException();
4607 throw new Error("Missing return statement in function");
4610 static final public ElseIf ElseIfStatementColon() throws ParseException {
4611 final Expression condition;
4612 Statement statement;
4613 final ArrayList list = new ArrayList();
4614 final Token elseifToken;
4615 elseifToken = jj_consume_token(ELSEIF);
4616 condition = Condition("elseif");
4617 jj_consume_token(COLON);
4620 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4654 case INTEGER_LITERAL:
4655 case FLOATING_POINT_LITERAL:
4656 case STRING_LITERAL:
4666 jj_la1[113] = jj_gen;
4669 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4702 case INTEGER_LITERAL:
4703 case FLOATING_POINT_LITERAL:
4704 case STRING_LITERAL:
4711 statement = Statement();
4712 list.add(statement);
4715 statement = htmlBlock();
4716 if (statement != null) {list.add(statement);}
4719 jj_la1[114] = jj_gen;
4720 jj_consume_token(-1);
4721 throw new ParseException();
4724 final int sizeList = list.size();
4725 final Statement[] stmtsArray = new Statement[sizeList];
4726 list.toArray(stmtsArray);
4727 {if (true) return new ElseIf(condition,stmtsArray ,
4728 elseifToken.sourceStart,
4729 stmtsArray[sizeList-1].sourceEnd);}
4730 throw new Error("Missing return statement in function");
4733 static final public Else ElseStatementColon() throws ParseException {
4734 Statement statement;
4735 final ArrayList list = new ArrayList();
4736 final Token elseToken;
4737 elseToken = jj_consume_token(ELSE);
4738 jj_consume_token(COLON);
4741 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4775 case INTEGER_LITERAL:
4776 case FLOATING_POINT_LITERAL:
4777 case STRING_LITERAL:
4787 jj_la1[115] = jj_gen;
4790 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4823 case INTEGER_LITERAL:
4824 case FLOATING_POINT_LITERAL:
4825 case STRING_LITERAL:
4832 statement = Statement();
4833 list.add(statement);
4836 statement = htmlBlock();
4837 if (statement != null) {list.add(statement);}
4840 jj_la1[116] = jj_gen;
4841 jj_consume_token(-1);
4842 throw new ParseException();
4845 final int sizeList = list.size();
4846 final Statement[] stmtsArray = new Statement[sizeList];
4847 list.toArray(stmtsArray);
4848 {if (true) return new Else(stmtsArray,elseToken.sourceStart,stmtsArray[sizeList-1].sourceEnd);}
4849 throw new Error("Missing return statement in function");
4852 static final public ElseIf ElseIfStatement() throws ParseException {
4853 final Expression condition;
4854 //final Statement statement;
4855 final Token elseifToken;
4856 final Statement[] statement = new Statement[1];
4857 elseifToken = jj_consume_token(ELSEIF);
4858 condition = Condition("elseif");
4859 statement[0] = Statement();
4860 {if (true) return new ElseIf(condition,statement,elseifToken.sourceStart,statement[0].sourceEnd);}
4861 throw new Error("Missing return statement in function");
4864 static final public WhileStatement WhileStatement() throws ParseException {
4865 final Expression condition;
4866 final Statement action;
4867 final Token whileToken;
4868 whileToken = jj_consume_token(WHILE);
4869 condition = Condition("while");
4870 action = WhileStatement0(whileToken.sourceStart,whileToken.sourceEnd);
4871 {if (true) return new WhileStatement(condition,action,whileToken.sourceStart,action.sourceEnd);}
4872 throw new Error("Missing return statement in function");
4875 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4876 Statement statement;
4877 final ArrayList stmts = new ArrayList();
4878 final int pos = SimpleCharStream.getPosition();
4879 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4881 jj_consume_token(COLON);
4884 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4917 case INTEGER_LITERAL:
4918 case FLOATING_POINT_LITERAL:
4919 case STRING_LITERAL:
4929 jj_la1[117] = jj_gen;
4932 statement = Statement();
4933 stmts.add(statement);
4936 setMarker(fileToParse,
4937 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4941 "Line " + token.beginLine);
4942 } catch (CoreException e) {
4943 PHPeclipsePlugin.log(e);
4946 jj_consume_token(ENDWHILE);
4947 } catch (ParseException e) {
4948 errorMessage = "'endwhile' expected";
4950 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4951 errorEnd = SimpleCharStream.getPosition() + 1;
4952 {if (true) throw e;}
4955 jj_consume_token(SEMICOLON);
4956 final Statement[] stmtsArray = new Statement[stmts.size()];
4957 stmts.toArray(stmtsArray);
4958 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4959 } catch (ParseException e) {
4960 errorMessage = "';' expected after 'endwhile' keyword";
4962 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4963 errorEnd = SimpleCharStream.getPosition() + 1;
4964 {if (true) throw e;}
4999 case INTEGER_LITERAL:
5000 case FLOATING_POINT_LITERAL:
5001 case STRING_LITERAL:
5008 statement = Statement();
5009 {if (true) return statement;}
5012 jj_la1[118] = jj_gen;
5013 jj_consume_token(-1);
5014 throw new ParseException();
5016 throw new Error("Missing return statement in function");
5019 static final public DoStatement DoStatement() throws ParseException {
5020 final Statement action;
5021 final Expression condition;
5023 Token token2 = null;
5024 token = jj_consume_token(DO);
5025 action = Statement();
5026 jj_consume_token(WHILE);
5027 condition = Condition("while");
5029 token2 = jj_consume_token(SEMICOLON);
5030 } catch (ParseException e) {
5031 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
5033 errorStart = condition.sourceEnd+1;
5034 errorEnd = condition.sourceEnd+1;
5035 processParseExceptionDebug(e);
5037 if (token2 == null) {
5038 {if (true) return new DoStatement(condition,action,token.sourceStart,condition.sourceEnd);}
5040 {if (true) return new DoStatement(condition,action,token.sourceStart,token2.sourceEnd);}
5041 throw new Error("Missing return statement in function");
5044 static final public ForeachStatement ForeachStatement() throws ParseException {
5045 Statement statement = null;
5046 Expression expression = null;
5047 ArrayVariableDeclaration variable = null;
5049 Token lparenToken = null;
5050 Token asToken = null;
5051 Token rparenToken = null;
5053 foreachToken = jj_consume_token(FOREACH);
5055 lparenToken = jj_consume_token(LPAREN);
5056 pos = lparenToken.sourceEnd+1;
5057 } catch (ParseException e) {
5058 errorMessage = "'(' expected after 'foreach' keyword";
5060 errorStart = foreachToken.sourceEnd+1;
5061 errorEnd = foreachToken.sourceEnd+1;
5062 processParseExceptionDebug(e);
5063 {pos = foreachToken.sourceEnd+1;}
5066 expression = Expression();
5067 pos = expression.sourceEnd+1;
5068 } catch (ParseException e) {
5069 errorMessage = "variable expected";
5073 processParseExceptionDebug(e);
5076 asToken = jj_consume_token(AS);
5077 pos = asToken.sourceEnd+1;
5078 } catch (ParseException e) {
5079 errorMessage = "'as' expected";
5083 processParseExceptionDebug(e);
5086 variable = ArrayVariable();
5087 pos = variable.sourceEnd+1;
5088 } catch (ParseException e) {
5089 if (errorMessage != null) {if (true) throw e;}
5090 errorMessage = "variable expected";
5094 processParseExceptionDebug(e);
5097 rparenToken = jj_consume_token(RPAREN);
5098 pos = rparenToken.sourceEnd+1;
5099 } catch (ParseException e) {
5100 errorMessage = "')' expected after 'foreach' keyword";
5104 processParseExceptionDebug(e);
5107 statement = Statement();
5108 pos = rparenToken.sourceEnd+1;
5109 } catch (ParseException e) {
5110 if (errorMessage != null) {if (true) throw e;}
5111 errorMessage = "statement expected";
5115 processParseExceptionDebug(e);
5117 {if (true) return new ForeachStatement(expression,
5120 foreachToken.sourceStart,
5121 statement.sourceEnd);}
5122 throw new Error("Missing return statement in function");
5126 * a for declaration.
5127 * @return a node representing the for statement
5129 static final public ForStatement ForStatement() throws ParseException {
5130 final Token token,tokenEndFor,token2,tokenColon;
5132 Expression[] initializations = null;
5133 Expression condition = null;
5134 Expression[] increments = null;
5136 final ArrayList list = new ArrayList();
5137 token = jj_consume_token(FOR);
5139 jj_consume_token(LPAREN);
5140 } catch (ParseException e) {
5141 errorMessage = "'(' expected after 'for' keyword";
5143 errorStart = token.sourceEnd;
5144 errorEnd = token.sourceEnd +1;
5145 processParseExceptionDebug(e);
5147 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5163 case INTEGER_LITERAL:
5164 case FLOATING_POINT_LITERAL:
5165 case STRING_LITERAL:
5170 initializations = ForInit();
5173 jj_la1[119] = jj_gen;
5176 jj_consume_token(SEMICOLON);
5177 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5193 case INTEGER_LITERAL:
5194 case FLOATING_POINT_LITERAL:
5195 case STRING_LITERAL:
5200 condition = Expression();
5203 jj_la1[120] = jj_gen;
5206 jj_consume_token(SEMICOLON);
5207 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5223 case INTEGER_LITERAL:
5224 case FLOATING_POINT_LITERAL:
5225 case STRING_LITERAL:
5230 increments = StatementExpressionList();
5233 jj_la1[121] = jj_gen;
5236 jj_consume_token(RPAREN);
5237 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5270 case INTEGER_LITERAL:
5271 case FLOATING_POINT_LITERAL:
5272 case STRING_LITERAL:
5279 action = Statement();
5280 {if (true) return new ForStatement(initializations,
5288 tokenColon = jj_consume_token(COLON);
5289 pos = tokenColon.sourceEnd+1;
5292 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5325 case INTEGER_LITERAL:
5326 case FLOATING_POINT_LITERAL:
5327 case STRING_LITERAL:
5337 jj_la1[122] = jj_gen;
5340 action = Statement();
5341 list.add(action);pos = action.sourceEnd+1;
5344 setMarker(fileToParse,
5345 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
5349 "Line " + token.beginLine);
5350 } catch (CoreException e) {
5351 PHPeclipsePlugin.log(e);
5354 tokenEndFor = jj_consume_token(ENDFOR);
5355 pos = tokenEndFor.sourceEnd+1;
5356 } catch (ParseException e) {
5357 errorMessage = "'endfor' expected";
5361 processParseExceptionDebug(e);
5364 token2 = jj_consume_token(SEMICOLON);
5365 pos = token2.sourceEnd+1;
5366 } catch (ParseException e) {
5367 errorMessage = "';' expected after 'endfor' keyword";
5371 processParseExceptionDebug(e);
5373 final Statement[] stmtsArray = new Statement[list.size()];
5374 list.toArray(stmtsArray);
5375 {if (true) return new ForStatement(initializations,
5378 new Block(stmtsArray,
5379 stmtsArray[0].sourceStart,
5380 stmtsArray[stmtsArray.length-1].sourceEnd),
5385 jj_la1[123] = jj_gen;
5386 jj_consume_token(-1);
5387 throw new ParseException();
5389 throw new Error("Missing return statement in function");
5392 static final public Expression[] ForInit() throws ParseException {
5393 final Expression[] exprs;
5394 if (jj_2_5(2147483647)) {
5395 exprs = LocalVariableDeclaration();
5396 {if (true) return exprs;}
5398 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5414 case INTEGER_LITERAL:
5415 case FLOATING_POINT_LITERAL:
5416 case STRING_LITERAL:
5421 exprs = StatementExpressionList();
5422 {if (true) return exprs;}
5425 jj_la1[124] = jj_gen;
5426 jj_consume_token(-1);
5427 throw new ParseException();
5430 throw new Error("Missing return statement in function");
5433 static final public Expression[] StatementExpressionList() throws ParseException {
5434 final ArrayList list = new ArrayList();
5435 final Expression expr;
5436 expr = Expression();
5440 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5445 jj_la1[125] = jj_gen;
5448 jj_consume_token(COMMA);
5452 final Expression[] exprsArray = new Expression[list.size()];
5453 list.toArray(exprsArray);
5454 {if (true) return exprsArray;}
5455 throw new Error("Missing return statement in function");
5458 static final public Continue ContinueStatement() throws ParseException {
5459 Expression expr = null;
5461 Token token2 = null;
5462 token = jj_consume_token(CONTINUE);
5463 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5479 case INTEGER_LITERAL:
5480 case FLOATING_POINT_LITERAL:
5481 case STRING_LITERAL:
5486 expr = Expression();
5489 jj_la1[126] = jj_gen;
5493 token2 = jj_consume_token(SEMICOLON);
5494 } catch (ParseException e) {
5495 errorMessage = "';' expected after 'continue' statement";
5498 errorStart = token.sourceEnd+1;
5499 errorEnd = token.sourceEnd+1;
5501 errorStart = expr.sourceEnd+1;
5502 errorEnd = expr.sourceEnd+1;
5504 processParseExceptionDebug(e);
5506 if (token2 == null) {
5508 {if (true) return new Continue(expr,token.sourceStart,token.sourceEnd);}
5510 {if (true) return new Continue(expr,token.sourceStart,expr.sourceEnd);}
5512 {if (true) return new Continue(expr,token.sourceStart,token2.sourceEnd);}
5513 throw new Error("Missing return statement in function");
5516 static final public ReturnStatement ReturnStatement() throws ParseException {
5517 Expression expr = null;
5519 Token token2 = null;
5520 token = jj_consume_token(RETURN);
5521 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5537 case INTEGER_LITERAL:
5538 case FLOATING_POINT_LITERAL:
5539 case STRING_LITERAL:
5544 expr = Expression();
5547 jj_la1[127] = jj_gen;
5551 token2 = jj_consume_token(SEMICOLON);
5552 } catch (ParseException e) {
5553 errorMessage = "';' expected after 'return' statement";
5556 errorStart = token.sourceEnd+1;
5557 errorEnd = token.sourceEnd+1;
5559 errorStart = expr.sourceEnd+1;
5560 errorEnd = expr.sourceEnd+1;
5562 processParseExceptionDebug(e);
5564 if (token2 == null) {
5566 {if (true) return new ReturnStatement(expr,token.sourceStart,token.sourceEnd);}
5568 {if (true) return new ReturnStatement(expr,token.sourceStart,expr.sourceEnd);}
5570 {if (true) return new ReturnStatement(expr,token.sourceStart,token2.sourceEnd);}
5571 throw new Error("Missing return statement in function");
5574 static final private boolean jj_2_1(int xla) {
5575 jj_la = xla; jj_lastpos = jj_scanpos = token;
5576 boolean retval = !jj_3_1();
5581 static final private boolean jj_2_2(int xla) {
5582 jj_la = xla; jj_lastpos = jj_scanpos = token;
5583 boolean retval = !jj_3_2();
5588 static final private boolean jj_2_3(int xla) {
5589 jj_la = xla; jj_lastpos = jj_scanpos = token;
5590 boolean retval = !jj_3_3();
5595 static final private boolean jj_2_4(int xla) {
5596 jj_la = xla; jj_lastpos = jj_scanpos = token;
5597 boolean retval = !jj_3_4();
5602 static final private boolean jj_2_5(int xla) {
5603 jj_la = xla; jj_lastpos = jj_scanpos = token;
5604 boolean retval = !jj_3_5();
5609 static final private boolean jj_3R_115() {
5610 if (jj_scan_token(XOR)) return true;
5611 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5612 if (jj_3R_114()) return true;
5613 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5617 static final private boolean jj_3R_210() {
5618 if (jj_3R_116()) return true;
5619 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5623 static final private boolean jj_3R_209() {
5624 if (jj_3R_50()) return true;
5625 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5629 static final private boolean jj_3R_109() {
5630 if (jj_3R_114()) return true;
5631 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5635 if (jj_3R_115()) { jj_scanpos = xsp; break; }
5636 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5641 static final private boolean jj_3R_208() {
5642 if (jj_scan_token(IDENTIFIER)) return true;
5643 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5647 static final private boolean jj_3R_203() {
5654 if (jj_3R_210()) return true;
5655 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5656 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5657 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5661 static final private boolean jj_3R_110() {
5662 if (jj_scan_token(BIT_OR)) return true;
5663 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5664 if (jj_3R_109()) return true;
5665 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5669 static final private boolean jj_3R_103() {
5670 if (jj_3R_109()) return true;
5671 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5675 if (jj_3R_110()) { jj_scanpos = xsp; break; }
5676 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5681 static final private boolean jj_3R_188() {
5682 if (jj_scan_token(ARRAY)) return true;
5683 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5684 if (jj_3R_198()) return true;
5685 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5689 static final private boolean jj_3R_132() {
5690 if (jj_scan_token(IDENTIFIER)) return true;
5691 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5695 static final private boolean jj_3R_131() {
5696 if (jj_scan_token(LBRACE)) return true;
5697 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5698 if (jj_3R_49()) return true;
5699 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5700 if (jj_scan_token(RBRACE)) return true;
5701 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5705 static final private boolean jj_3R_106() {
5706 if (jj_scan_token(DOT)) return true;
5707 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5708 if (jj_3R_103()) return true;
5709 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5713 static final private boolean jj_3R_122() {
5720 if (jj_3R_132()) return true;
5721 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5722 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5723 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5727 static final private boolean jj_3R_130() {
5728 if (jj_scan_token(DOLLAR)) return true;
5729 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5730 if (jj_3R_122()) return true;
5731 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5735 static final private boolean jj_3R_97() {
5736 if (jj_3R_103()) return true;
5737 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5741 if (jj_3R_106()) { jj_scanpos = xsp; break; }
5742 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5747 static final private boolean jj_3R_204() {
5748 if (jj_3R_207()) return true;
5749 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5753 static final private boolean jj_3R_108() {
5754 if (jj_scan_token(_ANDL)) return true;
5755 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5759 static final private boolean jj_3R_107() {
5760 if (jj_scan_token(AND_AND)) return true;
5761 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5765 static final private boolean jj_3R_68() {
5766 if (jj_scan_token(DOLLAR)) return true;
5767 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5768 if (jj_3R_122()) return true;
5769 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5773 static final private boolean jj_3R_100() {
5778 if (jj_3R_108()) return true;
5779 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5780 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5781 if (jj_3R_97()) return true;
5782 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5786 static final private boolean jj_3R_81() {
5787 if (jj_3R_97()) return true;
5788 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5792 if (jj_3R_100()) { jj_scanpos = xsp; break; }
5793 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5798 static final private boolean jj_3R_79() {
5799 if (jj_scan_token(HOOK)) return true;
5800 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5801 if (jj_3R_49()) return true;
5802 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5803 if (jj_scan_token(COLON)) return true;
5804 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5805 if (jj_3R_73()) return true;
5806 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5810 static final private boolean jj_3R_195() {
5811 if (jj_scan_token(NEW)) return true;
5812 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5813 if (jj_3R_203()) return true;
5814 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5817 if (jj_3R_204()) jj_scanpos = xsp;
5818 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5822 static final private boolean jj_3R_202() {
5823 if (jj_3R_207()) return true;
5824 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5828 static final private boolean jj_3R_194() {
5829 if (jj_3R_116()) return true;
5830 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5833 if (jj_3R_202()) jj_scanpos = xsp;
5834 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5838 static final private boolean jj_3R_102() {
5839 if (jj_scan_token(_ORL)) return true;
5840 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5844 static final private boolean jj_3R_101() {
5845 if (jj_scan_token(OR_OR)) return true;
5846 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5850 static final private boolean jj_3R_83() {
5855 if (jj_3R_102()) return true;
5856 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5857 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5858 if (jj_3R_81()) return true;
5859 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5863 static final private boolean jj_3_1() {
5864 if (jj_3R_40()) return true;
5865 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5869 static final private boolean jj_3R_201() {
5870 if (jj_3R_207()) return true;
5871 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5875 static final private boolean jj_3R_76() {
5876 if (jj_3R_81()) return true;
5877 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5881 if (jj_3R_83()) { jj_scanpos = xsp; break; }
5882 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5887 static final private boolean jj_3R_200() {
5888 if (jj_scan_token(STATICCLASSACCESS)) return true;
5889 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5890 if (jj_3R_203()) return true;
5891 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5895 static final private boolean jj_3R_116() {
5896 if (jj_3R_68()) return true;
5897 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5901 if (jj_3_1()) { jj_scanpos = xsp; break; }
5902 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5907 static final private boolean jj_3R_51() {
5908 if (jj_scan_token(COMMA)) return true;
5909 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5910 if (jj_3R_49()) return true;
5911 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5915 static final private boolean jj_3R_45() {
5916 if (jj_3R_49()) return true;
5917 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5921 if (jj_3R_51()) { jj_scanpos = xsp; break; }
5922 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5927 static final private boolean jj_3R_193() {
5928 if (jj_scan_token(IDENTIFIER)) return true;
5929 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5933 if (jj_3R_200()) { jj_scanpos = xsp; break; }
5934 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5937 if (jj_3R_201()) jj_scanpos = xsp;
5938 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5942 static final private boolean jj_3R_187() {
5949 if (jj_3R_195()) return true;
5950 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5951 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5952 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5956 static final private boolean jj_3R_73() {
5957 if (jj_3R_76()) return true;
5958 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5961 if (jj_3R_79()) jj_scanpos = xsp;
5962 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5966 static final private boolean jj_3R_178() {
5967 if (jj_3R_188()) return true;
5968 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5972 static final private boolean jj_3R_186() {
5973 if (jj_scan_token(BIT_AND)) return true;
5974 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5978 static final private boolean jj_3R_96() {
5979 if (jj_scan_token(TILDEEQUAL)) return true;
5980 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5984 static final private boolean jj_3R_95() {
5985 if (jj_scan_token(DOTASSIGN)) return true;
5986 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5990 static final private boolean jj_3R_173() {
5995 if (jj_3R_178()) return true;
5996 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5997 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6001 static final private boolean jj_3R_177() {
6004 if (jj_3R_186()) jj_scanpos = xsp;
6005 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6006 if (jj_3R_187()) return true;
6007 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6011 static final private boolean jj_3R_94() {
6012 if (jj_scan_token(ORASSIGN)) return true;
6013 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6017 static final private boolean jj_3R_93() {
6018 if (jj_scan_token(XORASSIGN)) return true;
6019 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6023 static final private boolean jj_3_5() {
6024 if (jj_3R_45()) return true;
6025 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6029 static final private boolean jj_3R_92() {
6030 if (jj_scan_token(ANDASSIGN)) return true;
6031 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6035 static final private boolean jj_3R_91() {
6036 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6037 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6041 static final private boolean jj_3R_90() {
6042 if (jj_scan_token(LSHIFTASSIGN)) return true;
6043 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6047 static final private boolean jj_3R_89() {
6048 if (jj_scan_token(MINUSASSIGN)) return true;
6049 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6053 static final private boolean jj_3R_88() {
6054 if (jj_scan_token(PLUSASSIGN)) return true;
6055 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6059 static final private boolean jj_3R_87() {
6060 if (jj_scan_token(REMASSIGN)) return true;
6061 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6065 static final private boolean jj_3R_86() {
6066 if (jj_scan_token(SLASHASSIGN)) return true;
6067 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6071 static final private boolean jj_3R_85() {
6072 if (jj_scan_token(STARASSIGN)) return true;
6073 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6077 static final private boolean jj_3R_84() {
6078 if (jj_scan_token(ASSIGN)) return true;
6079 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6083 static final private boolean jj_3R_80() {
6110 if (jj_3R_96()) return true;
6111 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6112 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6113 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6114 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6115 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6116 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6117 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6118 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6119 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6120 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6121 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6122 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6123 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6127 static final private boolean jj_3R_197() {
6128 if (jj_scan_token(MINUS_MINUS)) return true;
6129 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6133 static final private boolean jj_3R_196() {
6134 if (jj_scan_token(PLUS_PLUS)) return true;
6135 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6139 static final private boolean jj_3R_191() {
6144 if (jj_3R_197()) return true;
6145 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6146 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6150 static final private boolean jj_3R_175() {
6151 if (jj_3R_173()) return true;
6152 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6155 if (jj_3R_191()) jj_scanpos = xsp;
6156 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6160 static final private boolean jj_3R_99() {
6161 if (jj_3R_105()) return true;
6162 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6166 static final private boolean jj_3R_98() {
6167 if (jj_3R_104()) return true;
6168 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6172 static final private boolean jj_3R_82() {
6177 if (jj_3R_99()) return true;
6178 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6179 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6183 static final private boolean jj_3R_190() {
6184 if (jj_scan_token(ARRAY)) return true;
6185 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6189 static final private boolean jj_3R_189() {
6190 if (jj_3R_50()) return true;
6191 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6195 static final private boolean jj_3R_78() {
6196 if (jj_3R_82()) return true;
6197 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6201 static final private boolean jj_3R_43() {
6202 if (jj_scan_token(ARRAY)) return true;
6203 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6207 static final private boolean jj_3R_77() {
6208 if (jj_scan_token(BANG)) return true;
6209 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6210 if (jj_3R_74()) return true;
6211 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6215 static final private boolean jj_3R_74() {
6220 if (jj_3R_78()) return true;
6221 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6222 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6226 static final private boolean jj_3R_174() {
6227 if (jj_scan_token(LPAREN)) return true;
6228 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6233 if (jj_3R_190()) return true;
6234 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6235 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6236 if (jj_scan_token(RPAREN)) return true;
6237 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6238 if (jj_3R_144()) return true;
6239 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6243 static final private boolean jj_3R_42() {
6244 if (jj_3R_50()) return true;
6245 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6249 static final private boolean jj_3R_58() {
6250 if (jj_3R_74()) return true;
6251 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6255 static final private boolean jj_3_3() {
6256 if (jj_scan_token(LPAREN)) return true;
6257 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6262 if (jj_3R_43()) return true;
6263 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6264 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6265 if (jj_scan_token(RPAREN)) return true;
6266 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6270 static final private boolean jj_3R_172() {
6271 if (jj_scan_token(LPAREN)) return true;
6272 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6273 if (jj_3R_49()) return true;
6274 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6275 if (jj_scan_token(RPAREN)) return true;
6276 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6280 static final private boolean jj_3R_171() {
6281 if (jj_3R_176()) return true;
6282 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6286 static final private boolean jj_3R_170() {
6287 if (jj_3R_175()) return true;
6288 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6292 static final private boolean jj_3R_166() {
6301 if (jj_3R_172()) return true;
6302 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6303 } else 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;
6309 static final private boolean jj_3R_169() {
6310 if (jj_3R_174()) return true;
6311 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6315 static final private boolean jj_3R_168() {
6316 if (jj_scan_token(MINUS_MINUS)) return true;
6317 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6321 static final private boolean jj_3R_44() {
6322 if (jj_3R_49()) return true;
6323 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6324 if (jj_scan_token(SEMICOLON)) return true;
6325 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6329 static final private boolean jj_3R_167() {
6330 if (jj_scan_token(PLUS_PLUS)) return true;
6331 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6335 static final private boolean jj_3R_75() {
6336 if (jj_3R_80()) return true;
6337 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6338 if (jj_3R_49()) return true;
6339 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6343 static final private boolean jj_3R_165() {
6348 if (jj_3R_168()) return true;
6349 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6350 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6351 if (jj_3R_173()) return true;
6352 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6356 static final private boolean jj_3R_49() {
6361 if (jj_3R_58()) return true;
6362 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6363 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6367 static final private boolean jj_3R_57() {
6368 if (jj_3R_73()) return true;
6369 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6372 if (jj_3R_75()) jj_scanpos = xsp;
6373 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6377 static final private boolean jj_3R_67() {
6378 if (jj_scan_token(OBJECT)) return true;
6379 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6383 static final private boolean jj_3R_161() {
6384 if (jj_3R_166()) return true;
6385 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6389 static final private boolean jj_3R_66() {
6390 if (jj_scan_token(INTEGER)) return true;
6391 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6395 static final private boolean jj_3R_65() {
6396 if (jj_scan_token(INT)) return true;
6397 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6401 static final private boolean jj_3R_64() {
6402 if (jj_scan_token(FLOAT)) return true;
6403 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6407 static final private boolean jj_3R_160() {
6408 if (jj_3R_165()) return true;
6409 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6413 static final private boolean jj_3R_63() {
6414 if (jj_scan_token(DOUBLE)) return true;
6415 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6419 static final private boolean jj_3R_62() {
6420 if (jj_scan_token(REAL)) return true;
6421 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6425 static final private boolean jj_3R_61() {
6426 if (jj_scan_token(BOOLEAN)) return true;
6427 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6431 static final private boolean jj_3R_60() {
6432 if (jj_scan_token(BOOL)) return true;
6433 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6437 static final private boolean jj_3R_159() {
6438 if (jj_scan_token(MINUS)) return true;
6439 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6440 if (jj_3R_148()) return true;
6441 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6445 static final private boolean jj_3R_50() {
6464 if (jj_3R_67()) return true;
6465 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6466 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6467 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6468 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
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;
6477 static final private boolean jj_3R_59() {
6478 if (jj_scan_token(STRING)) return true;
6479 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6483 static final private boolean jj_3R_156() {
6492 if (jj_3R_161()) return true;
6493 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6494 } else 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;
6500 static final private boolean jj_3R_158() {
6501 if (jj_scan_token(PLUS)) return true;
6502 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6503 if (jj_3R_148()) return true;
6504 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6508 static final private boolean jj_3_4() {
6509 if (jj_3R_44()) return true;
6510 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6514 static final private boolean jj_3R_164() {
6515 if (jj_3R_156()) return true;
6516 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6520 static final private boolean jj_3R_163() {
6521 if (jj_scan_token(BANG)) return true;
6522 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6523 if (jj_3R_157()) return true;
6524 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6528 static final private boolean jj_3R_157() {
6535 if (jj_3R_164()) return true;
6536 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6537 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6538 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6542 static final private boolean jj_3R_162() {
6543 if (jj_scan_token(AT)) return true;
6544 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6545 if (jj_3R_157()) return true;
6546 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6550 static final private boolean jj_3R_155() {
6551 if (jj_3R_156()) return true;
6552 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6556 static final private boolean jj_3R_216() {
6557 if (jj_scan_token(COMMA)) return true;
6558 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6559 if (jj_3R_49()) return true;
6560 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6564 static final private boolean jj_3R_154() {
6565 if (jj_scan_token(BANG)) return true;
6566 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6567 if (jj_3R_157()) return true;
6568 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6572 static final private boolean jj_3R_215() {
6573 if (jj_3R_49()) return true;
6574 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6578 if (jj_3R_216()) { jj_scanpos = xsp; break; }
6579 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6584 static final private boolean jj_3R_153() {
6585 if (jj_scan_token(TILDE)) return true;
6586 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6587 if (jj_3R_148()) return true;
6588 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6592 static final private boolean jj_3R_148() {
6601 if (jj_3R_155()) return true;
6602 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6603 } else 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;
6609 static final private boolean jj_3R_152() {
6610 if (jj_scan_token(AT)) return true;
6611 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6612 if (jj_3R_148()) return true;
6613 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6617 static final private boolean jj_3R_213() {
6618 if (jj_3R_215()) return true;
6619 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6623 static final private boolean jj_3R_144() {
6624 if (jj_3R_148()) return true;
6625 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6629 static final private boolean jj_3R_151() {
6630 if (jj_scan_token(REMAINDER)) return true;
6631 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6635 static final private boolean jj_3R_150() {
6636 if (jj_scan_token(SLASH)) return true;
6637 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6641 static final private boolean jj_3R_149() {
6642 if (jj_scan_token(STAR)) return true;
6643 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6647 static final private boolean jj_3R_207() {
6648 if (jj_scan_token(LPAREN)) return true;
6649 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6652 if (jj_3R_213()) jj_scanpos = xsp;
6653 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6654 if (jj_scan_token(RPAREN)) return true;
6655 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6659 static final private boolean jj_3R_145() {
6666 if (jj_3R_151()) return true;
6667 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6668 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6669 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6670 if (jj_3R_144()) return true;
6671 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6675 static final private boolean jj_3R_139() {
6676 if (jj_3R_144()) return true;
6677 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6681 if (jj_3R_145()) { jj_scanpos = xsp; break; }
6682 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6687 static final private boolean jj_3R_212() {
6688 if (jj_scan_token(LBRACE1)) return true;
6689 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6690 if (jj_scan_token(ID)) return true;
6691 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6692 if (jj_scan_token(RBRACE1)) return true;
6693 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6697 static final private boolean jj_3R_147() {
6698 if (jj_scan_token(MINUS)) return true;
6699 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6703 static final private boolean jj_3R_211() {
6704 if (jj_scan_token(IDENTIFIER)) return true;
6705 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6709 static final private boolean jj_3R_146() {
6710 if (jj_scan_token(PLUS)) return true;
6711 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6715 static final private boolean jj_3R_140() {
6720 if (jj_3R_147()) return true;
6721 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6722 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6723 if (jj_3R_139()) return true;
6724 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6728 static final private boolean jj_3R_199() {
6729 if (jj_scan_token(DOLLARS)) return true;
6730 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6735 if (jj_3R_212()) return true;
6736 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6737 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6741 static final private boolean jj_3R_133() {
6742 if (jj_3R_139()) return true;
6743 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6747 if (jj_3R_140()) { jj_scanpos = xsp; break; }
6748 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6753 static final private boolean jj_3R_192() {
6754 if (jj_scan_token(DOUBLEQUOTE)) return true;
6755 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6759 if (jj_3R_199()) { jj_scanpos = xsp; break; }
6760 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6762 if (jj_scan_token(DOUBLEQUOTE2)) return true;
6763 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6767 static final private boolean jj_3R_113() {
6768 if (jj_scan_token(ASSIGN)) return true;
6769 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6770 if (jj_3R_49()) return true;
6771 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6775 static final private boolean jj_3R_143() {
6776 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
6777 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6781 static final private boolean jj_3R_142() {
6782 if (jj_scan_token(RSIGNEDSHIFT)) return true;
6783 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6787 static final private boolean jj_3R_141() {
6788 if (jj_scan_token(LSHIFT)) return true;
6789 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6793 static final private boolean jj_3R_185() {
6794 if (jj_3R_192()) return true;
6795 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6799 static final private boolean jj_3R_184() {
6800 if (jj_scan_token(NULL)) return true;
6801 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6805 static final private boolean jj_3R_134() {
6812 if (jj_3R_143()) return true;
6813 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6814 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6815 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6816 if (jj_3R_133()) return true;
6817 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6821 static final private boolean jj_3R_183() {
6822 if (jj_scan_token(FALSE)) return true;
6823 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6827 static final private boolean jj_3R_182() {
6828 if (jj_scan_token(TRUE)) return true;
6829 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6833 static final private boolean jj_3R_123() {
6834 if (jj_3R_133()) return true;
6835 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6839 if (jj_3R_134()) { jj_scanpos = xsp; break; }
6840 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6845 static final private boolean jj_3R_181() {
6846 if (jj_scan_token(STRING_LITERAL)) return true;
6847 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6851 static final private boolean jj_3R_180() {
6852 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
6853 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6857 static final private boolean jj_3R_179() {
6858 if (jj_scan_token(INTEGER_LITERAL)) return true;
6859 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6863 static final private boolean jj_3R_176() {
6878 if (jj_3R_185()) return true;
6879 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6880 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6881 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6882 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6883 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6884 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6885 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6889 static final private boolean jj_3R_117() {
6890 if (jj_3R_116()) return true;
6891 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6895 static final private boolean jj_3R_138() {
6896 if (jj_scan_token(GE)) return true;
6897 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6901 static final private boolean jj_3R_137() {
6902 if (jj_scan_token(LE)) return true;
6903 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6907 static final private boolean jj_3R_136() {
6908 if (jj_scan_token(GT)) return true;
6909 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6913 static final private boolean jj_3R_135() {
6914 if (jj_scan_token(LT)) return true;
6915 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6919 static final private boolean jj_3R_112() {
6920 if (jj_scan_token(COMMA)) return true;
6921 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6924 if (jj_3R_117()) jj_scanpos = xsp;
6925 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6929 static final private boolean jj_3R_124() {
6938 if (jj_3R_138()) return true;
6939 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6940 } else 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 if (jj_3R_123()) return true;
6944 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6948 static final private boolean jj_3R_120() {
6949 if (jj_3R_123()) return true;
6950 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6954 if (jj_3R_124()) { jj_scanpos = xsp; break; }
6955 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6960 static final private boolean jj_3R_72() {
6961 if (jj_3R_50()) return true;
6962 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6966 static final private boolean jj_3R_111() {
6967 if (jj_3R_116()) return true;
6968 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6972 static final private boolean jj_3R_71() {
6973 if (jj_3R_49()) return true;
6974 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6978 static final private boolean jj_3R_56() {
6983 if (jj_3R_72()) return true;
6984 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6985 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6989 static final private boolean jj_3R_48() {
6990 if (jj_scan_token(LBRACE)) return true;
6991 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6994 if (jj_3R_56()) jj_scanpos = xsp;
6995 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6996 if (jj_scan_token(RBRACE)) return true;
6997 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7001 static final private boolean jj_3R_206() {
7002 if (jj_scan_token(COMMA)) return true;
7003 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7007 static final private boolean jj_3R_104() {
7008 if (jj_scan_token(LIST)) return true;
7009 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7010 if (jj_scan_token(LPAREN)) return true;
7011 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7014 if (jj_3R_111()) jj_scanpos = xsp;
7015 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7018 if (jj_3R_112()) { jj_scanpos = xsp; break; }
7019 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7021 if (jj_scan_token(RPAREN)) return true;
7022 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7024 if (jj_3R_113()) jj_scanpos = xsp;
7025 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7029 static final private boolean jj_3_2() {
7030 if (jj_scan_token(COMMA)) return true;
7031 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7032 if (jj_3R_41()) return true;
7033 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7037 static final private boolean jj_3R_70() {
7038 if (jj_3R_50()) return true;
7039 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7043 static final private boolean jj_3R_55() {
7048 if (jj_3R_70()) return true;
7049 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7050 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7054 static final private boolean jj_3R_69() {
7055 if (jj_3R_49()) return true;
7056 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7060 static final private boolean jj_3R_205() {
7061 if (jj_3R_41()) return true;
7062 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7066 if (jj_3_2()) { jj_scanpos = xsp; break; }
7067 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7072 static final private boolean jj_3R_47() {
7073 if (jj_scan_token(LBRACKET)) return true;
7074 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7077 if (jj_3R_55()) jj_scanpos = xsp;
7078 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7079 if (jj_scan_token(RBRACKET)) return true;
7080 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7084 static final private boolean jj_3R_129() {
7085 if (jj_scan_token(TRIPLEEQUAL)) return true;
7086 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7090 static final private boolean jj_3R_128() {
7091 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
7092 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7096 static final private boolean jj_3R_127() {
7097 if (jj_scan_token(NOT_EQUAL)) return true;
7098 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7102 static final private boolean jj_3R_198() {
7103 if (jj_scan_token(LPAREN)) return true;
7104 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7107 if (jj_3R_205()) jj_scanpos = xsp;
7108 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7110 if (jj_3R_206()) jj_scanpos = xsp;
7111 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7112 if (jj_scan_token(RPAREN)) return true;
7113 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7117 static final private boolean jj_3R_126() {
7118 if (jj_scan_token(DIF)) return true;
7119 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7123 static final private boolean jj_3R_125() {
7124 if (jj_scan_token(EQUAL_EQUAL)) return true;
7125 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7129 static final private boolean jj_3R_54() {
7130 if (jj_3R_68()) return true;
7131 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7135 static final private boolean jj_3R_105() {
7136 if (jj_scan_token(PRINT)) return true;
7137 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7138 if (jj_3R_49()) return true;
7139 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7143 static final private boolean jj_3R_121() {
7154 if (jj_3R_129()) return true;
7155 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7156 } else 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 if (jj_3R_120()) return true;
7161 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7165 static final private boolean jj_3R_53() {
7166 if (jj_scan_token(IDENTIFIER)) return true;
7167 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7171 static final private boolean jj_3R_118() {
7172 if (jj_3R_120()) return true;
7173 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7177 if (jj_3R_121()) { jj_scanpos = xsp; break; }
7178 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7183 static final private boolean jj_3R_214() {
7184 if (jj_scan_token(ARRAYASSIGN)) return true;
7185 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7186 if (jj_3R_49()) return true;
7187 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7191 static final private boolean jj_3R_41() {
7192 if (jj_3R_49()) return true;
7193 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7196 if (jj_3R_214()) jj_scanpos = xsp;
7197 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7201 static final private boolean jj_3R_52() {
7202 if (jj_scan_token(LBRACE)) return true;
7203 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7204 if (jj_3R_49()) return true;
7205 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7206 if (jj_scan_token(RBRACE)) return true;
7207 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7211 static final private boolean jj_3R_119() {
7212 if (jj_scan_token(BIT_AND)) return true;
7213 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7214 if (jj_3R_118()) return true;
7215 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7219 static final private boolean jj_3R_46() {
7220 if (jj_scan_token(CLASSACCESS)) return true;
7221 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7228 if (jj_3R_54()) return true;
7229 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7230 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7231 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7235 static final private boolean jj_3R_40() {
7242 if (jj_3R_48()) return true;
7243 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7244 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7245 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7249 static final private boolean jj_3R_114() {
7250 if (jj_3R_118()) return true;
7251 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7255 if (jj_3R_119()) { jj_scanpos = xsp; break; }
7256 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7261 static private boolean jj_initialized_once = false;
7262 static public PHPParserTokenManager token_source;
7263 static SimpleCharStream jj_input_stream;
7264 static public Token token, jj_nt;
7265 static private int jj_ntk;
7266 static private Token jj_scanpos, jj_lastpos;
7267 static private int jj_la;
7268 static public boolean lookingAhead = false;
7269 static private boolean jj_semLA;
7270 static private int jj_gen;
7271 static final private int[] jj_la1 = new int[128];
7272 static private int[] jj_la1_0;
7273 static private int[] jj_la1_1;
7274 static private int[] jj_la1_2;
7275 static private int[] jj_la1_3;
7276 static private int[] jj_la1_4;
7284 private static void jj_la1_0() {
7285 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,};
7287 private static void jj_la1_1() {
7288 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,};
7290 private static void jj_la1_2() {
7291 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,};
7293 private static void jj_la1_3() {
7294 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,};
7296 private static void jj_la1_4() {
7297 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,};
7299 static final private JJCalls[] jj_2_rtns = new JJCalls[5];
7300 static private boolean jj_rescan = false;
7301 static private int jj_gc = 0;
7303 public PHPParser(java.io.InputStream stream) {
7304 if (jj_initialized_once) {
7305 System.out.println("ERROR: Second call to constructor of static parser. You must");
7306 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7307 System.out.println(" during parser generation.");
7310 jj_initialized_once = true;
7311 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7312 token_source = new PHPParserTokenManager(jj_input_stream);
7313 token = new Token();
7316 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7317 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7320 static public void ReInit(java.io.InputStream stream) {
7321 jj_input_stream.ReInit(stream, 1, 1);
7322 token_source.ReInit(jj_input_stream);
7323 token = new Token();
7326 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7327 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7330 public PHPParser(java.io.Reader stream) {
7331 if (jj_initialized_once) {
7332 System.out.println("ERROR: Second call to constructor of static parser. You must");
7333 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7334 System.out.println(" during parser generation.");
7337 jj_initialized_once = true;
7338 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7339 token_source = new PHPParserTokenManager(jj_input_stream);
7340 token = new Token();
7343 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7344 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7347 static public void ReInit(java.io.Reader stream) {
7348 jj_input_stream.ReInit(stream, 1, 1);
7349 token_source.ReInit(jj_input_stream);
7350 token = new Token();
7353 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7354 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7357 public PHPParser(PHPParserTokenManager tm) {
7358 if (jj_initialized_once) {
7359 System.out.println("ERROR: Second call to constructor of static parser. You must");
7360 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7361 System.out.println(" during parser generation.");
7364 jj_initialized_once = true;
7366 token = new Token();
7369 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7370 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7373 public void ReInit(PHPParserTokenManager tm) {
7375 token = new Token();
7378 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7379 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7382 static final private Token jj_consume_token(int kind) throws ParseException {
7384 if ((oldToken = token).next != null) token = token.next;
7385 else token = token.next = token_source.getNextToken();
7387 if (token.kind == kind) {
7389 if (++jj_gc > 100) {
7391 for (int i = 0; i < jj_2_rtns.length; i++) {
7392 JJCalls c = jj_2_rtns[i];
7394 if (c.gen < jj_gen) c.first = null;
7403 throw generateParseException();
7406 static final private boolean jj_scan_token(int kind) {
7407 if (jj_scanpos == jj_lastpos) {
7409 if (jj_scanpos.next == null) {
7410 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
7412 jj_lastpos = jj_scanpos = jj_scanpos.next;
7415 jj_scanpos = jj_scanpos.next;
7418 int i = 0; Token tok = token;
7419 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
7420 if (tok != null) jj_add_error_token(kind, i);
7422 return (jj_scanpos.kind != kind);
7425 static final public Token getNextToken() {
7426 if (token.next != null) token = token.next;
7427 else token = token.next = token_source.getNextToken();
7433 static final public Token getToken(int index) {
7434 Token t = lookingAhead ? jj_scanpos : token;
7435 for (int i = 0; i < index; i++) {
7436 if (t.next != null) t = t.next;
7437 else t = t.next = token_source.getNextToken();
7442 static final private int jj_ntk() {
7443 if ((jj_nt=token.next) == null)
7444 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
7446 return (jj_ntk = jj_nt.kind);
7449 static private java.util.Vector jj_expentries = new java.util.Vector();
7450 static private int[] jj_expentry;
7451 static private int jj_kind = -1;
7452 static private int[] jj_lasttokens = new int[100];
7453 static private int jj_endpos;
7455 static private void jj_add_error_token(int kind, int pos) {
7456 if (pos >= 100) return;
7457 if (pos == jj_endpos + 1) {
7458 jj_lasttokens[jj_endpos++] = kind;
7459 } else if (jj_endpos != 0) {
7460 jj_expentry = new int[jj_endpos];
7461 for (int i = 0; i < jj_endpos; i++) {
7462 jj_expentry[i] = jj_lasttokens[i];
7464 boolean exists = false;
7465 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
7466 int[] oldentry = (int[])(enum.nextElement());
7467 if (oldentry.length == jj_expentry.length) {
7469 for (int i = 0; i < jj_expentry.length; i++) {
7470 if (oldentry[i] != jj_expentry[i]) {
7478 if (!exists) jj_expentries.addElement(jj_expentry);
7479 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
7483 static public ParseException generateParseException() {
7484 jj_expentries.removeAllElements();
7485 boolean[] la1tokens = new boolean[160];
7486 for (int i = 0; i < 160; i++) {
7487 la1tokens[i] = false;
7490 la1tokens[jj_kind] = true;
7493 for (int i = 0; i < 128; i++) {
7494 if (jj_la1[i] == jj_gen) {
7495 for (int j = 0; j < 32; j++) {
7496 if ((jj_la1_0[i] & (1<<j)) != 0) {
7497 la1tokens[j] = true;
7499 if ((jj_la1_1[i] & (1<<j)) != 0) {
7500 la1tokens[32+j] = true;
7502 if ((jj_la1_2[i] & (1<<j)) != 0) {
7503 la1tokens[64+j] = true;
7505 if ((jj_la1_3[i] & (1<<j)) != 0) {
7506 la1tokens[96+j] = true;
7508 if ((jj_la1_4[i] & (1<<j)) != 0) {
7509 la1tokens[128+j] = true;
7514 for (int i = 0; i < 160; i++) {
7516 jj_expentry = new int[1];
7518 jj_expentries.addElement(jj_expentry);
7523 jj_add_error_token(0, 0);
7524 int[][] exptokseq = new int[jj_expentries.size()][];
7525 for (int i = 0; i < jj_expentries.size(); i++) {
7526 exptokseq[i] = (int[])jj_expentries.elementAt(i);
7528 return new ParseException(token, exptokseq, tokenImage);
7531 static final public void enable_tracing() {
7534 static final public void disable_tracing() {
7537 static final private void jj_rescan_token() {
7539 for (int i = 0; i < 5; i++) {
7540 JJCalls p = jj_2_rtns[i];
7542 if (p.gen > jj_gen) {
7543 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7545 case 0: jj_3_1(); break;
7546 case 1: jj_3_2(); break;
7547 case 2: jj_3_3(); break;
7548 case 3: jj_3_4(); break;
7549 case 4: jj_3_5(); break;
7553 } while (p != null);
7558 static final private void jj_save(int index, int xla) {
7559 JJCalls p = jj_2_rtns[index];
7560 while (p.gen > jj_gen) {
7561 if (p.next == null) { p = p.next = new JJCalls(); break; }
7564 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7567 static final class JJCalls {