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;
2724 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";
2760 errorStart = args[args.length-1].sourceEnd+1;
2761 errorEnd = args[args.length-1].sourceEnd+1;
2762 processParseExceptionDebug(e);
2764 {if (true) return new FunctionCall(func,args,args[args.length-1].sourceEnd);}
2765 throw new Error("Missing return statement in function");
2769 * An argument list is a list of arguments separated by comma :
2770 * argumentDeclaration() (, argumentDeclaration)*
2771 * @return an array of arguments
2773 static final public Expression[] ArgumentList() throws ParseException {
2775 final ArrayList list = new ArrayList();
2779 list.add(arg);pos = arg.sourceEnd;
2782 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2787 jj_la1[75] = jj_gen;
2790 token = jj_consume_token(COMMA);
2791 pos = token.sourceEnd;
2795 pos = arg.sourceEnd;
2796 } catch (ParseException e) {
2797 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2801 processParseException(e);
2804 final Expression[] arguments = new Expression[list.size()];
2805 list.toArray(arguments);
2806 {if (true) return arguments;}
2807 throw new Error("Missing return statement in function");
2811 * A Statement without break.
2812 * @return a statement
2814 static final public Statement StatementNoBreak() throws ParseException {
2815 final Statement statement;
2818 statement = expressionStatement();
2819 {if (true) return statement;}
2821 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2823 statement = LabeledStatement();
2824 {if (true) return statement;}
2827 statement = Block();
2828 {if (true) return statement;}
2831 statement = EmptyStatement();
2832 {if (true) return statement;}
2835 statement = SwitchStatement();
2836 {if (true) return statement;}
2839 statement = IfStatement();
2840 {if (true) return statement;}
2843 statement = WhileStatement();
2844 {if (true) return statement;}
2847 statement = DoStatement();
2848 {if (true) return statement;}
2851 statement = ForStatement();
2852 {if (true) return statement;}
2855 statement = ForeachStatement();
2856 {if (true) return statement;}
2859 statement = ContinueStatement();
2860 {if (true) return statement;}
2863 statement = ReturnStatement();
2864 {if (true) return statement;}
2867 statement = EchoStatement();
2868 {if (true) return statement;}
2875 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2877 token = jj_consume_token(AT);
2880 jj_la1[76] = jj_gen;
2883 statement = IncludeStatement();
2884 if (token != null) {
2885 ((InclusionStatement)statement).silent = true;
2886 statement.sourceStart = token.sourceStart;
2888 {if (true) return statement;}
2891 statement = StaticStatement();
2892 {if (true) return statement;}
2895 statement = GlobalStatement();
2896 {if (true) return statement;}
2899 statement = defineStatement();
2900 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2903 jj_la1[77] = jj_gen;
2904 jj_consume_token(-1);
2905 throw new ParseException();
2908 throw new Error("Missing return statement in function");
2912 * A statement expression.
2914 * @return an expression
2916 static final public Statement expressionStatement() throws ParseException {
2917 final Statement statement;
2919 statement = Expression();
2921 token = jj_consume_token(SEMICOLON);
2922 statement.sourceEnd = token.sourceEnd;
2923 } catch (ParseException e) {
2924 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2925 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2927 errorStart = statement.sourceEnd+1;
2928 errorEnd = statement.sourceEnd+1;
2929 processParseExceptionDebug(e);
2932 {if (true) return statement;}
2933 throw new Error("Missing return statement in function");
2936 static final public Define defineStatement() throws ParseException {
2937 Expression defineName,defineValue;
2938 final Token defineToken;
2941 defineToken = jj_consume_token(DEFINE);
2942 pos = defineToken.sourceEnd+1;
2944 token = jj_consume_token(LPAREN);
2945 pos = token.sourceEnd+1;
2946 } catch (ParseException e) {
2947 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2951 processParseExceptionDebug(e);
2954 defineName = Expression();
2955 pos = defineName.sourceEnd+1;
2956 } catch (ParseException e) {
2957 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2961 processParseExceptionDebug(e);
2962 defineName = new StringLiteral(SYNTAX_ERROR_CHAR,pos,pos);
2965 token = jj_consume_token(COMMA);
2966 pos = defineName.sourceEnd+1;
2967 } catch (ParseException e) {
2968 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2972 processParseExceptionDebug(e);
2975 defineValue = Expression();
2976 pos = defineValue.sourceEnd+1;
2977 } catch (ParseException e) {
2978 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2982 processParseExceptionDebug(e);
2983 defineValue = new StringLiteral(SYNTAX_ERROR_CHAR,pos,pos);
2986 token = jj_consume_token(RPAREN);
2987 pos = token.sourceEnd+1;
2988 } catch (ParseException e) {
2989 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2993 processParseExceptionDebug(e);
2995 {if (true) return new Define(currentSegment,
2998 defineToken.sourceStart,
3000 throw new Error("Missing return statement in function");
3004 * A Normal statement.
3006 static final public Statement Statement() throws ParseException {
3007 final Statement statement;
3008 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3040 case INTEGER_LITERAL:
3041 case FLOATING_POINT_LITERAL:
3042 case STRING_LITERAL:
3049 statement = StatementNoBreak();
3050 {if (true) return statement;}
3053 statement = BreakStatement();
3054 {if (true) return statement;}
3057 jj_la1[78] = jj_gen;
3058 jj_consume_token(-1);
3059 throw new ParseException();
3061 throw new Error("Missing return statement in function");
3065 * An html block inside a php syntax.
3067 static final public HTMLBlock htmlBlock() throws ParseException {
3068 final int startIndex = nodePtr;
3069 final AstNode[] blockNodes;
3072 phpEnd = jj_consume_token(PHPEND);
3073 htmlStart = phpEnd.sourceEnd;
3076 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3081 jj_la1[79] = jj_gen;
3087 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3089 jj_consume_token(PHPSTARTLONG);
3092 jj_consume_token(PHPSTARTSHORT);
3095 jj_la1[80] = jj_gen;
3096 jj_consume_token(-1);
3097 throw new ParseException();
3099 PHPParser.createNewHTMLCode();
3100 } catch (ParseException e) {
3101 errorMessage = "unexpected end of file , '<?php' expected";
3103 errorStart = SimpleCharStream.getPosition();
3104 errorEnd = SimpleCharStream.getPosition();
3105 {if (true) throw e;}
3107 nbNodes = nodePtr - startIndex;
3109 {if (true) return null;}
3111 blockNodes = new AstNode[nbNodes];
3112 System.arraycopy(nodes,startIndex+1,blockNodes,0,nbNodes);
3113 nodePtr = startIndex;
3114 {if (true) return new HTMLBlock(blockNodes);}
3115 throw new Error("Missing return statement in function");
3119 * An include statement. It's "include" an expression;
3121 static final public InclusionStatement IncludeStatement() throws ParseException {
3124 final InclusionStatement inclusionStatement;
3125 final Token token, token2;
3127 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3129 token = jj_consume_token(REQUIRE);
3130 keyword = InclusionStatement.REQUIRE;pos=token.sourceEnd;
3133 token = jj_consume_token(REQUIRE_ONCE);
3134 keyword = InclusionStatement.REQUIRE_ONCE;pos=token.sourceEnd;
3137 token = jj_consume_token(INCLUDE);
3138 keyword = InclusionStatement.INCLUDE;pos=token.sourceEnd;
3141 token = jj_consume_token(INCLUDE_ONCE);
3142 keyword = InclusionStatement.INCLUDE_ONCE;pos=token.sourceEnd;
3145 jj_la1[81] = jj_gen;
3146 jj_consume_token(-1);
3147 throw new ParseException();
3150 expr = Expression();
3151 pos = expr.sourceEnd;
3152 } catch (ParseException e) {
3153 if (errorMessage != null) {
3154 {if (true) throw e;}
3156 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
3158 errorStart = e.currentToken.next.sourceStart;
3159 errorEnd = e.currentToken.next.sourceEnd;
3160 expr = new ConstantIdentifier(SYNTAX_ERROR_CHAR,pos,pos);
3161 processParseExceptionDebug(e);
3164 token2 = jj_consume_token(SEMICOLON);
3165 pos=token2.sourceEnd;
3166 } catch (ParseException e) {
3167 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
3169 errorStart = e.currentToken.next.sourceStart;
3170 errorEnd = e.currentToken.next.sourceEnd;
3171 processParseExceptionDebug(e);
3173 inclusionStatement = new InclusionStatement(currentSegment,
3178 currentSegment.add(inclusionStatement);
3179 {if (true) return inclusionStatement;}
3180 throw new Error("Missing return statement in function");
3183 static final public PrintExpression PrintExpression() throws ParseException {
3184 final Expression expr;
3185 final Token printToken;
3186 token = jj_consume_token(PRINT);
3187 expr = Expression();
3188 {if (true) return new PrintExpression(expr,token.sourceStart,expr.sourceEnd);}
3189 throw new Error("Missing return statement in function");
3192 static final public ListExpression ListExpression() throws ParseException {
3193 Expression expr = null;
3194 final Expression expression;
3195 final ArrayList list = new ArrayList();
3197 final Token listToken, rParen;
3199 listToken = jj_consume_token(LIST);
3200 pos = listToken.sourceEnd;
3202 token = jj_consume_token(LPAREN);
3203 pos = token.sourceEnd;
3204 } catch (ParseException e) {
3205 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
3207 errorStart = listToken.sourceEnd+1;
3208 errorEnd = listToken.sourceEnd+1;
3209 processParseExceptionDebug(e);
3211 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3213 expr = VariableDeclaratorId();
3214 list.add(expr);pos = expr.sourceEnd;
3217 jj_la1[82] = jj_gen;
3220 if (expr == null) list.add(null);
3223 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3228 jj_la1[83] = jj_gen;
3232 token = jj_consume_token(COMMA);
3233 pos = token.sourceEnd;
3234 } catch (ParseException e) {
3235 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
3239 processParseExceptionDebug(e);
3241 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3243 expr = VariableDeclaratorId();
3244 list.add(expr);pos = expr.sourceEnd;
3247 jj_la1[84] = jj_gen;
3252 rParen = jj_consume_token(RPAREN);
3253 pos = rParen.sourceEnd;
3254 } catch (ParseException e) {
3255 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
3259 processParseExceptionDebug(e);
3261 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3263 jj_consume_token(ASSIGN);
3264 expression = Expression();
3265 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3267 {if (true) return new ListExpression(vars,
3269 listToken.sourceStart,
3270 expression.sourceEnd);}
3273 jj_la1[85] = jj_gen;
3276 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3278 {if (true) return new ListExpression(vars,listToken.sourceStart,pos);}
3279 throw new Error("Missing return statement in function");
3283 * An echo statement.
3284 * echo anyexpression (, otherexpression)*
3286 static final public EchoStatement EchoStatement() throws ParseException {
3287 final ArrayList expressions = new ArrayList();
3290 Token token2 = null;
3291 token = jj_consume_token(ECHO);
3292 expr = Expression();
3293 expressions.add(expr);
3296 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3301 jj_la1[86] = jj_gen;
3304 jj_consume_token(COMMA);
3305 expr = Expression();
3306 expressions.add(expr);
3309 token2 = jj_consume_token(SEMICOLON);
3310 } catch (ParseException e) {
3311 if (e.currentToken.next.kind != 4) {
3312 errorMessage = "';' expected after 'echo' statement";
3314 errorStart = e.currentToken.sourceEnd;
3315 errorEnd = e.currentToken.sourceEnd;
3316 processParseExceptionDebug(e);
3319 final Expression[] exprs = new Expression[expressions.size()];
3320 expressions.toArray(exprs);
3321 if (token2 == null) {
3322 {if (true) return new EchoStatement(exprs,token.sourceStart, exprs[exprs.length-1].sourceEnd);}
3324 {if (true) return new EchoStatement(exprs,token.sourceStart, token2.sourceEnd);}
3325 throw new Error("Missing return statement in function");
3328 static final public GlobalStatement GlobalStatement() throws ParseException {
3330 final ArrayList vars = new ArrayList();
3331 final GlobalStatement global;
3332 final Token token, token2;
3334 token = jj_consume_token(GLOBAL);
3336 vars.add(expr);pos = expr.sourceEnd+1;
3339 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3344 jj_la1[87] = jj_gen;
3347 jj_consume_token(COMMA);
3349 vars.add(expr);pos = expr.sourceEnd+1;
3352 token2 = jj_consume_token(SEMICOLON);
3353 pos = token2.sourceEnd+1;
3354 } catch (ParseException e) {
3355 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3359 processParseExceptionDebug(e);
3361 final Variable[] variables = new Variable[vars.size()];
3362 vars.toArray(variables);
3363 global = new GlobalStatement(currentSegment,
3367 currentSegment.add(global);
3368 {if (true) return global;}
3369 throw new Error("Missing return statement in function");
3372 static final public StaticStatement StaticStatement() throws ParseException {
3373 final ArrayList vars = new ArrayList();
3374 VariableDeclaration expr;
3375 final Token token, token2;
3377 token = jj_consume_token(STATIC);
3378 expr = VariableDeclarator();
3379 vars.add(expr);pos = expr.sourceEnd+1;
3382 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3387 jj_la1[88] = jj_gen;
3390 jj_consume_token(COMMA);
3391 expr = VariableDeclarator();
3392 vars.add(expr);pos = expr.sourceEnd+1;
3395 token2 = jj_consume_token(SEMICOLON);
3396 pos = token2.sourceEnd+1;
3397 } catch (ParseException e) {
3398 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3402 processParseException(e);
3404 final VariableDeclaration[] variables = new VariableDeclaration[vars.size()];
3405 vars.toArray(variables);
3406 {if (true) return new StaticStatement(variables,
3409 throw new Error("Missing return statement in function");
3412 static final public LabeledStatement LabeledStatement() throws ParseException {
3414 final Statement statement;
3415 label = jj_consume_token(IDENTIFIER);
3416 jj_consume_token(COLON);
3417 statement = Statement();
3418 {if (true) return new LabeledStatement(label.image,statement,label.sourceStart,statement.sourceEnd);}
3419 throw new Error("Missing return statement in function");
3429 static final public Block Block() throws ParseException {
3430 final ArrayList list = new ArrayList();
3431 Statement statement;
3432 final Token token, token2;
3435 token = jj_consume_token(LBRACE);
3436 pos = token.sourceEnd+1;start=token.sourceStart;
3437 } catch (ParseException e) {
3438 errorMessage = "'{' expected";
3440 pos = PHPParser.token.sourceEnd+1;
3444 processParseExceptionDebug(e);
3448 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3484 case INTEGER_LITERAL:
3485 case FLOATING_POINT_LITERAL:
3486 case STRING_LITERAL:
3496 jj_la1[89] = jj_gen;
3499 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3534 case INTEGER_LITERAL:
3535 case FLOATING_POINT_LITERAL:
3536 case STRING_LITERAL:
3543 statement = BlockStatement();
3544 list.add(statement);pos = statement.sourceEnd+1;
3547 statement = htmlBlock();
3548 if (statement != null) {
3549 list.add(statement);
3550 pos = statement.sourceEnd+1;
3552 pos = PHPParser.token.sourceEnd+1;
3555 jj_la1[90] = jj_gen;
3556 jj_consume_token(-1);
3557 throw new ParseException();
3561 token2 = jj_consume_token(RBRACE);
3562 pos = token2.sourceEnd+1;
3563 } catch (ParseException e) {
3564 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3568 processParseExceptionDebug(e);
3570 final Statement[] statements = new Statement[list.size()];
3571 list.toArray(statements);
3572 {if (true) return new Block(statements,start,pos);}
3573 throw new Error("Missing return statement in function");
3576 static final public Statement BlockStatement() throws ParseException {
3577 final Statement statement;
3578 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3611 case INTEGER_LITERAL:
3612 case FLOATING_POINT_LITERAL:
3613 case STRING_LITERAL:
3621 statement = Statement();
3622 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3623 {if (true) return statement;}
3624 } catch (ParseException e) {
3625 errorMessage = "unexpected token : '"+ e.currentToken.image +"', a statement was expected";
3627 errorStart = e.currentToken.sourceStart;
3628 errorEnd = e.currentToken.sourceEnd;
3629 {if (true) throw e;}
3633 statement = ClassDeclaration();
3634 {if (true) return statement;}
3637 statement = MethodDeclaration();
3638 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3639 currentSegment.add((MethodDeclaration) statement);
3640 ((MethodDeclaration) statement).analyzeCode();
3641 {if (true) return statement;}
3644 jj_la1[91] = jj_gen;
3645 jj_consume_token(-1);
3646 throw new ParseException();
3648 throw new Error("Missing return statement in function");
3652 * A Block statement that will not contain any 'break'
3654 static final public Statement BlockStatementNoBreak() throws ParseException {
3655 final Statement statement;
3656 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3688 case INTEGER_LITERAL:
3689 case FLOATING_POINT_LITERAL:
3690 case STRING_LITERAL:
3697 statement = StatementNoBreak();
3698 {if (true) return statement;}
3701 statement = ClassDeclaration();
3702 {if (true) return statement;}
3705 statement = MethodDeclaration();
3706 currentSegment.add((MethodDeclaration) statement);
3707 ((MethodDeclaration) statement).analyzeCode();
3708 {if (true) return statement;}
3711 jj_la1[92] = jj_gen;
3712 jj_consume_token(-1);
3713 throw new ParseException();
3715 throw new Error("Missing return statement in function");
3719 * used only by ForInit()
3721 static final public Expression[] LocalVariableDeclaration() throws ParseException {
3722 final ArrayList list = new ArrayList();
3728 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3733 jj_la1[93] = jj_gen;
3736 jj_consume_token(COMMA);
3740 final Expression[] vars = new Expression[list.size()];
3742 {if (true) return vars;}
3743 throw new Error("Missing return statement in function");
3747 * used only by LocalVariableDeclaration().
3749 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3750 final Variable varName;
3751 Expression initializer = null;
3752 varName = Variable();
3753 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3755 jj_consume_token(ASSIGN);
3756 initializer = Expression();
3759 jj_la1[94] = jj_gen;
3762 if (initializer == null) {
3763 {if (true) return new VariableDeclaration(currentSegment,
3765 varName.sourceStart,
3766 varName.sourceEnd);}
3768 {if (true) return new VariableDeclaration(currentSegment,
3771 VariableDeclaration.EQUAL,
3772 varName.sourceStart);}
3773 throw new Error("Missing return statement in function");
3776 static final public EmptyStatement EmptyStatement() throws ParseException {
3778 token = jj_consume_token(SEMICOLON);
3779 {if (true) return new EmptyStatement(token.sourceStart,token.sourceEnd);}
3780 throw new Error("Missing return statement in function");
3784 * used only by StatementExpressionList() which is used only by ForInit() and ForStatement()
3786 static final public Expression StatementExpression() throws ParseException {
3787 final Expression expr;
3788 final Token operator;
3789 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3792 expr = PreIncDecExpression();
3793 {if (true) return expr;}
3800 expr = PrimaryExpression();
3801 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3804 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3806 operator = jj_consume_token(PLUS_PLUS);
3807 {if (true) return new PostfixedUnaryExpression(expr,
3808 OperatorIds.PLUS_PLUS,
3809 operator.sourceEnd);}
3812 operator = jj_consume_token(MINUS_MINUS);
3813 {if (true) return new PostfixedUnaryExpression(expr,
3814 OperatorIds.MINUS_MINUS,
3815 operator.sourceEnd);}
3818 jj_la1[95] = jj_gen;
3819 jj_consume_token(-1);
3820 throw new ParseException();
3824 jj_la1[96] = jj_gen;
3827 {if (true) return expr;}
3830 jj_la1[97] = jj_gen;
3831 jj_consume_token(-1);
3832 throw new ParseException();
3834 throw new Error("Missing return statement in function");
3837 static final public SwitchStatement SwitchStatement() throws ParseException {
3838 Expression variable;
3839 final AbstractCase[] cases;
3840 final Token switchToken,lparenToken,rparenToken;
3842 switchToken = jj_consume_token(SWITCH);
3843 pos = switchToken.sourceEnd+1;
3845 lparenToken = jj_consume_token(LPAREN);
3846 pos = lparenToken.sourceEnd+1;
3847 } catch (ParseException e) {
3848 errorMessage = "'(' expected after 'switch'";
3852 processParseExceptionDebug(e);
3855 variable = Expression();
3856 pos = variable.sourceEnd+1;
3857 } catch (ParseException e) {
3858 if (errorMessage != null) {
3859 {if (true) throw e;}
3861 errorMessage = "expression expected";
3865 processParseExceptionDebug(e);
3866 variable = new ConstantIdentifier(SYNTAX_ERROR_CHAR,pos,pos);
3869 rparenToken = jj_consume_token(RPAREN);
3870 pos = rparenToken.sourceEnd+1;
3871 } catch (ParseException e) {
3872 errorMessage = "')' expected";
3876 processParseExceptionDebug(e);
3878 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3880 cases = switchStatementBrace();
3883 cases = switchStatementColon(switchToken.sourceStart, switchToken.sourceEnd);
3886 jj_la1[98] = jj_gen;
3887 jj_consume_token(-1);
3888 throw new ParseException();
3890 {if (true) return new SwitchStatement(variable,
3892 switchToken.sourceStart,
3893 PHPParser.token.sourceEnd);}
3894 throw new Error("Missing return statement in function");
3897 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3899 final ArrayList cases = new ArrayList();
3902 token = jj_consume_token(LBRACE);
3903 pos = token.sourceEnd;
3906 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3912 jj_la1[99] = jj_gen;
3915 cas = switchLabel0();
3916 cases.add(cas);pos = cas.sourceEnd;
3919 token = jj_consume_token(RBRACE);
3920 pos = token.sourceEnd;
3921 } catch (ParseException e) {
3922 errorMessage = "'}' expected";
3926 processParseExceptionDebug(e);
3928 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3929 cases.toArray(abcase);
3930 {if (true) return abcase;}
3931 throw new Error("Missing return statement in function");
3935 * A Switch statement with : ... endswitch;
3936 * @param start the begin offset of the switch
3937 * @param end the end offset of the switch
3939 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3941 final ArrayList cases = new ArrayList();
3944 token = jj_consume_token(COLON);
3945 pos = token.sourceEnd;
3947 setMarker(fileToParse,
3948 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3952 "Line " + token.beginLine);
3953 } catch (CoreException e) {
3954 PHPeclipsePlugin.log(e);
3958 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3964 jj_la1[100] = jj_gen;
3967 cas = switchLabel0();
3968 cases.add(cas);pos = cas.sourceEnd;
3971 token = jj_consume_token(ENDSWITCH);
3972 pos = token.sourceEnd;
3973 } catch (ParseException e) {
3974 errorMessage = "'endswitch' expected";
3978 processParseExceptionDebug(e);
3981 token = jj_consume_token(SEMICOLON);
3982 pos = token.sourceEnd;
3983 } catch (ParseException e) {
3984 errorMessage = "';' expected after 'endswitch' keyword";
3988 processParseExceptionDebug(e);
3990 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3991 cases.toArray(abcase);
3992 {if (true) return abcase;}
3993 throw new Error("Missing return statement in function");
3996 static final public AbstractCase switchLabel0() throws ParseException {
3997 final Expression expr;
3998 Statement statement;
3999 final ArrayList stmts = new ArrayList();
4000 final Token token = PHPParser.token;
4001 expr = SwitchLabel();
4004 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4040 case INTEGER_LITERAL:
4041 case FLOATING_POINT_LITERAL:
4042 case STRING_LITERAL:
4052 jj_la1[101] = jj_gen;
4055 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4089 case INTEGER_LITERAL:
4090 case FLOATING_POINT_LITERAL:
4091 case STRING_LITERAL:
4098 statement = BlockStatementNoBreak();
4099 stmts.add(statement);
4102 statement = htmlBlock();
4103 if (statement != null) {stmts.add(statement);}
4106 statement = BreakStatement();
4107 stmts.add(statement);
4110 jj_la1[102] = jj_gen;
4111 jj_consume_token(-1);
4112 throw new ParseException();
4115 final int listSize = stmts.size();
4116 final Statement[] stmtsArray = new Statement[listSize];
4117 stmts.toArray(stmtsArray);
4118 if (expr == null) {//it's a default
4119 {if (true) return new DefaultCase(stmtsArray,token.sourceStart,stmtsArray[listSize-1].sourceEnd);}
4121 if (listSize != 0) {
4122 {if (true) return new Case(expr,stmtsArray,expr.sourceStart,stmtsArray[listSize-1].sourceEnd);}
4124 {if (true) return new Case(expr,stmtsArray,expr.sourceStart,expr.sourceEnd);}
4126 throw new Error("Missing return statement in function");
4131 * case Expression() :
4133 * @return the if it was a case and null if not
4135 static final public Expression SwitchLabel() throws ParseException {
4136 final Expression expr;
4137 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4139 token = jj_consume_token(CASE);
4141 expr = Expression();
4142 } catch (ParseException e) {
4143 if (errorMessage != null) {if (true) throw e;}
4144 errorMessage = "expression expected after 'case' keyword";
4146 errorStart = token.sourceEnd +1;
4147 errorEnd = token.sourceEnd +1;
4148 {if (true) throw e;}
4151 token = jj_consume_token(COLON);
4152 {if (true) return expr;}
4153 } catch (ParseException e) {
4154 errorMessage = "':' expected after case expression";
4156 errorStart = expr.sourceEnd+1;
4157 errorEnd = expr.sourceEnd+1;
4158 processParseExceptionDebug(e);
4162 token = jj_consume_token(_DEFAULT);
4164 jj_consume_token(COLON);
4165 {if (true) return null;}
4166 } catch (ParseException e) {
4167 errorMessage = "':' expected after 'default' keyword";
4169 errorStart = token.sourceEnd+1;
4170 errorEnd = token.sourceEnd+1;
4171 processParseExceptionDebug(e);
4175 jj_la1[103] = jj_gen;
4176 jj_consume_token(-1);
4177 throw new ParseException();
4179 throw new Error("Missing return statement in function");
4182 static final public Break BreakStatement() throws ParseException {
4183 Expression expression = null;
4184 final Token token, token2;
4186 token = jj_consume_token(BREAK);
4187 pos = token.sourceEnd+1;
4188 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4204 case INTEGER_LITERAL:
4205 case FLOATING_POINT_LITERAL:
4206 case STRING_LITERAL:
4211 expression = Expression();
4212 pos = expression.sourceEnd+1;
4215 jj_la1[104] = jj_gen;
4219 token2 = jj_consume_token(SEMICOLON);
4220 pos = token2.sourceEnd;
4221 } catch (ParseException e) {
4222 errorMessage = "';' expected after 'break' keyword";
4226 processParseExceptionDebug(e);
4228 {if (true) return new Break(expression, token.sourceStart, pos);}
4229 throw new Error("Missing return statement in function");
4232 static final public IfStatement IfStatement() throws ParseException {
4233 final Expression condition;
4234 final IfStatement ifStatement;
4236 token = jj_consume_token(IF);
4237 condition = Condition("if");
4238 ifStatement = IfStatement0(condition,token.sourceStart,token.sourceEnd);
4239 {if (true) return ifStatement;}
4240 throw new Error("Missing return statement in function");
4243 static final public Expression Condition(final String keyword) throws ParseException {
4244 final Expression condition;
4246 jj_consume_token(LPAREN);
4247 } catch (ParseException e) {
4248 errorMessage = "'(' expected after " + keyword + " keyword";
4250 errorStart = PHPParser.token.sourceEnd + 1;
4251 errorEnd = PHPParser.token.sourceEnd + 1;
4252 processParseExceptionDebug(e);
4254 condition = Expression();
4256 jj_consume_token(RPAREN);
4257 } catch (ParseException e) {
4258 errorMessage = "')' expected after " + keyword + " keyword";
4260 errorStart = condition.sourceEnd+1;
4261 errorEnd = condition.sourceEnd+1;
4262 processParseExceptionDebug(e);
4264 {if (true) return condition;}
4265 throw new Error("Missing return statement in function");
4268 static final public IfStatement IfStatement0(final Expression condition, final int start,final int end) throws ParseException {
4269 Statement statement;
4270 final Statement stmt;
4271 final Statement[] statementsArray;
4272 ElseIf elseifStatement;
4273 Else elseStatement = null;
4274 final ArrayList stmts;
4275 final ArrayList elseIfList = new ArrayList();
4276 final ElseIf[] elseIfs;
4277 int pos = SimpleCharStream.getPosition();
4278 final int endStatements;
4279 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4281 jj_consume_token(COLON);
4282 stmts = new ArrayList();
4285 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4319 case INTEGER_LITERAL:
4320 case FLOATING_POINT_LITERAL:
4321 case STRING_LITERAL:
4331 jj_la1[105] = jj_gen;
4334 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4367 case INTEGER_LITERAL:
4368 case FLOATING_POINT_LITERAL:
4369 case STRING_LITERAL:
4376 statement = Statement();
4377 stmts.add(statement);
4380 statement = htmlBlock();
4381 if (statement != null) {stmts.add(statement);}
4384 jj_la1[106] = jj_gen;
4385 jj_consume_token(-1);
4386 throw new ParseException();
4389 endStatements = SimpleCharStream.getPosition();
4392 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4397 jj_la1[107] = jj_gen;
4400 elseifStatement = ElseIfStatementColon();
4401 elseIfList.add(elseifStatement);
4403 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4405 elseStatement = ElseStatementColon();
4408 jj_la1[108] = jj_gen;
4412 setMarker(fileToParse,
4413 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4417 "Line " + token.beginLine);
4418 } catch (CoreException e) {
4419 PHPeclipsePlugin.log(e);
4422 jj_consume_token(ENDIF);
4423 } catch (ParseException e) {
4424 errorMessage = "'endif' expected";
4426 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4427 errorEnd = SimpleCharStream.getPosition() + 1;
4428 {if (true) throw e;}
4431 jj_consume_token(SEMICOLON);
4432 } catch (ParseException e) {
4433 errorMessage = "';' expected after 'endif' keyword";
4435 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4436 errorEnd = SimpleCharStream.getPosition() + 1;
4437 {if (true) throw e;}
4439 elseIfs = new ElseIf[elseIfList.size()];
4440 elseIfList.toArray(elseIfs);
4441 if (stmts.size() == 1) {
4442 {if (true) return new IfStatement(condition,
4443 (Statement) stmts.get(0),
4447 SimpleCharStream.getPosition());}
4449 statementsArray = new Statement[stmts.size()];
4450 stmts.toArray(statementsArray);
4451 {if (true) return new IfStatement(condition,
4452 new Block(statementsArray,pos,endStatements),
4456 SimpleCharStream.getPosition());}
4492 case INTEGER_LITERAL:
4493 case FLOATING_POINT_LITERAL:
4494 case STRING_LITERAL:
4501 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4534 case INTEGER_LITERAL:
4535 case FLOATING_POINT_LITERAL:
4536 case STRING_LITERAL:
4549 jj_la1[109] = jj_gen;
4550 jj_consume_token(-1);
4551 throw new ParseException();
4555 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4560 jj_la1[110] = jj_gen;
4563 elseifStatement = ElseIfStatement();
4564 elseIfList.add(elseifStatement);
4566 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4568 jj_consume_token(ELSE);
4570 pos = SimpleCharStream.getPosition();
4571 statement = Statement();
4572 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4573 } catch (ParseException e) {
4574 if (errorMessage != null) {
4575 {if (true) throw e;}
4577 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4579 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4580 errorEnd = SimpleCharStream.getPosition() + 1;
4581 {if (true) throw e;}
4585 jj_la1[111] = jj_gen;
4588 elseIfs = new ElseIf[elseIfList.size()];
4589 elseIfList.toArray(elseIfs);
4590 {if (true) return new IfStatement(condition,
4595 SimpleCharStream.getPosition());}
4598 jj_la1[112] = jj_gen;
4599 jj_consume_token(-1);
4600 throw new ParseException();
4602 throw new Error("Missing return statement in function");
4605 static final public ElseIf ElseIfStatementColon() throws ParseException {
4606 final Expression condition;
4607 Statement statement;
4608 final ArrayList list = new ArrayList();
4609 final Token elseifToken;
4610 elseifToken = jj_consume_token(ELSEIF);
4611 condition = Condition("elseif");
4612 jj_consume_token(COLON);
4615 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4649 case INTEGER_LITERAL:
4650 case FLOATING_POINT_LITERAL:
4651 case STRING_LITERAL:
4661 jj_la1[113] = jj_gen;
4664 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4697 case INTEGER_LITERAL:
4698 case FLOATING_POINT_LITERAL:
4699 case STRING_LITERAL:
4706 statement = Statement();
4707 list.add(statement);
4710 statement = htmlBlock();
4711 if (statement != null) {list.add(statement);}
4714 jj_la1[114] = jj_gen;
4715 jj_consume_token(-1);
4716 throw new ParseException();
4719 final int sizeList = list.size();
4720 final Statement[] stmtsArray = new Statement[sizeList];
4721 list.toArray(stmtsArray);
4722 {if (true) return new ElseIf(condition,stmtsArray ,
4723 elseifToken.sourceStart,
4724 stmtsArray[sizeList-1].sourceEnd);}
4725 throw new Error("Missing return statement in function");
4728 static final public Else ElseStatementColon() throws ParseException {
4729 Statement statement;
4730 final ArrayList list = new ArrayList();
4731 final Token elseToken;
4732 elseToken = jj_consume_token(ELSE);
4733 jj_consume_token(COLON);
4736 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4770 case INTEGER_LITERAL:
4771 case FLOATING_POINT_LITERAL:
4772 case STRING_LITERAL:
4782 jj_la1[115] = jj_gen;
4785 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4818 case INTEGER_LITERAL:
4819 case FLOATING_POINT_LITERAL:
4820 case STRING_LITERAL:
4827 statement = Statement();
4828 list.add(statement);
4831 statement = htmlBlock();
4832 if (statement != null) {list.add(statement);}
4835 jj_la1[116] = jj_gen;
4836 jj_consume_token(-1);
4837 throw new ParseException();
4840 final int sizeList = list.size();
4841 final Statement[] stmtsArray = new Statement[sizeList];
4842 list.toArray(stmtsArray);
4843 {if (true) return new Else(stmtsArray,elseToken.sourceStart,stmtsArray[sizeList-1].sourceEnd);}
4844 throw new Error("Missing return statement in function");
4847 static final public ElseIf ElseIfStatement() throws ParseException {
4848 final Expression condition;
4849 //final Statement statement;
4850 final Token elseifToken;
4851 final Statement[] statement = new Statement[1];
4852 elseifToken = jj_consume_token(ELSEIF);
4853 condition = Condition("elseif");
4854 statement[0] = Statement();
4855 {if (true) return new ElseIf(condition,statement,elseifToken.sourceStart,statement[0].sourceEnd);}
4856 throw new Error("Missing return statement in function");
4859 static final public WhileStatement WhileStatement() throws ParseException {
4860 final Expression condition;
4861 final Statement action;
4862 final Token whileToken;
4863 whileToken = jj_consume_token(WHILE);
4864 condition = Condition("while");
4865 action = WhileStatement0(whileToken.sourceStart,whileToken.sourceEnd);
4866 {if (true) return new WhileStatement(condition,action,whileToken.sourceStart,action.sourceEnd);}
4867 throw new Error("Missing return statement in function");
4870 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4871 Statement statement;
4872 final ArrayList stmts = new ArrayList();
4873 final int pos = SimpleCharStream.getPosition();
4874 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4876 jj_consume_token(COLON);
4879 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4912 case INTEGER_LITERAL:
4913 case FLOATING_POINT_LITERAL:
4914 case STRING_LITERAL:
4924 jj_la1[117] = jj_gen;
4927 statement = Statement();
4928 stmts.add(statement);
4931 setMarker(fileToParse,
4932 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4936 "Line " + token.beginLine);
4937 } catch (CoreException e) {
4938 PHPeclipsePlugin.log(e);
4941 jj_consume_token(ENDWHILE);
4942 } catch (ParseException e) {
4943 errorMessage = "'endwhile' expected";
4945 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4946 errorEnd = SimpleCharStream.getPosition() + 1;
4947 {if (true) throw e;}
4950 jj_consume_token(SEMICOLON);
4951 final Statement[] stmtsArray = new Statement[stmts.size()];
4952 stmts.toArray(stmtsArray);
4953 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4954 } catch (ParseException e) {
4955 errorMessage = "';' expected after 'endwhile' keyword";
4957 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4958 errorEnd = SimpleCharStream.getPosition() + 1;
4959 {if (true) throw e;}
4994 case INTEGER_LITERAL:
4995 case FLOATING_POINT_LITERAL:
4996 case STRING_LITERAL:
5003 statement = Statement();
5004 {if (true) return statement;}
5007 jj_la1[118] = jj_gen;
5008 jj_consume_token(-1);
5009 throw new ParseException();
5011 throw new Error("Missing return statement in function");
5014 static final public DoStatement DoStatement() throws ParseException {
5015 final Statement action;
5016 final Expression condition;
5018 Token token2 = null;
5019 token = jj_consume_token(DO);
5020 action = Statement();
5021 jj_consume_token(WHILE);
5022 condition = Condition("while");
5024 token2 = jj_consume_token(SEMICOLON);
5025 } catch (ParseException e) {
5026 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
5028 errorStart = condition.sourceEnd+1;
5029 errorEnd = condition.sourceEnd+1;
5030 processParseExceptionDebug(e);
5032 if (token2 == null) {
5033 {if (true) return new DoStatement(condition,action,token.sourceStart,condition.sourceEnd);}
5035 {if (true) return new DoStatement(condition,action,token.sourceStart,token2.sourceEnd);}
5036 throw new Error("Missing return statement in function");
5039 static final public ForeachStatement ForeachStatement() throws ParseException {
5040 Statement statement = null;
5041 Expression expression = null;
5042 ArrayVariableDeclaration variable = null;
5044 Token lparenToken = null;
5045 Token asToken = null;
5046 Token rparenToken = null;
5048 foreachToken = jj_consume_token(FOREACH);
5050 lparenToken = jj_consume_token(LPAREN);
5051 pos = lparenToken.sourceEnd+1;
5052 } catch (ParseException e) {
5053 errorMessage = "'(' expected after 'foreach' keyword";
5055 errorStart = foreachToken.sourceEnd+1;
5056 errorEnd = foreachToken.sourceEnd+1;
5057 processParseExceptionDebug(e);
5058 {pos = foreachToken.sourceEnd+1;}
5061 expression = Expression();
5062 pos = expression.sourceEnd+1;
5063 } catch (ParseException e) {
5064 errorMessage = "variable expected";
5068 processParseExceptionDebug(e);
5071 asToken = jj_consume_token(AS);
5072 pos = asToken.sourceEnd+1;
5073 } catch (ParseException e) {
5074 errorMessage = "'as' expected";
5078 processParseExceptionDebug(e);
5081 variable = ArrayVariable();
5082 pos = variable.sourceEnd+1;
5083 } catch (ParseException e) {
5084 if (errorMessage != null) {if (true) throw e;}
5085 errorMessage = "variable expected";
5089 processParseExceptionDebug(e);
5092 rparenToken = jj_consume_token(RPAREN);
5093 pos = rparenToken.sourceEnd+1;
5094 } catch (ParseException e) {
5095 errorMessage = "')' expected after 'foreach' keyword";
5099 processParseExceptionDebug(e);
5102 statement = Statement();
5103 pos = rparenToken.sourceEnd+1;
5104 } catch (ParseException e) {
5105 if (errorMessage != null) {if (true) throw e;}
5106 errorMessage = "statement expected";
5110 processParseExceptionDebug(e);
5112 {if (true) return new ForeachStatement(expression,
5115 foreachToken.sourceStart,
5116 statement.sourceEnd);}
5117 throw new Error("Missing return statement in function");
5121 * a for declaration.
5122 * @return a node representing the for statement
5124 static final public ForStatement ForStatement() throws ParseException {
5125 final Token token,tokenEndFor,token2,tokenColon;
5127 Expression[] initializations = null;
5128 Expression condition = null;
5129 Expression[] increments = null;
5131 final ArrayList list = new ArrayList();
5132 token = jj_consume_token(FOR);
5134 jj_consume_token(LPAREN);
5135 } catch (ParseException e) {
5136 errorMessage = "'(' expected after 'for' keyword";
5138 errorStart = token.sourceEnd;
5139 errorEnd = token.sourceEnd +1;
5140 processParseExceptionDebug(e);
5142 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5158 case INTEGER_LITERAL:
5159 case FLOATING_POINT_LITERAL:
5160 case STRING_LITERAL:
5165 initializations = ForInit();
5168 jj_la1[119] = jj_gen;
5171 jj_consume_token(SEMICOLON);
5172 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5188 case INTEGER_LITERAL:
5189 case FLOATING_POINT_LITERAL:
5190 case STRING_LITERAL:
5195 condition = Expression();
5198 jj_la1[120] = jj_gen;
5201 jj_consume_token(SEMICOLON);
5202 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5218 case INTEGER_LITERAL:
5219 case FLOATING_POINT_LITERAL:
5220 case STRING_LITERAL:
5225 increments = StatementExpressionList();
5228 jj_la1[121] = jj_gen;
5231 jj_consume_token(RPAREN);
5232 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5265 case INTEGER_LITERAL:
5266 case FLOATING_POINT_LITERAL:
5267 case STRING_LITERAL:
5274 action = Statement();
5275 {if (true) return new ForStatement(initializations,
5283 tokenColon = jj_consume_token(COLON);
5284 pos = tokenColon.sourceEnd+1;
5287 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5320 case INTEGER_LITERAL:
5321 case FLOATING_POINT_LITERAL:
5322 case STRING_LITERAL:
5332 jj_la1[122] = jj_gen;
5335 action = Statement();
5336 list.add(action);pos = action.sourceEnd+1;
5339 setMarker(fileToParse,
5340 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
5344 "Line " + token.beginLine);
5345 } catch (CoreException e) {
5346 PHPeclipsePlugin.log(e);
5349 tokenEndFor = jj_consume_token(ENDFOR);
5350 pos = tokenEndFor.sourceEnd+1;
5351 } catch (ParseException e) {
5352 errorMessage = "'endfor' expected";
5356 processParseExceptionDebug(e);
5359 token2 = jj_consume_token(SEMICOLON);
5360 pos = token2.sourceEnd+1;
5361 } catch (ParseException e) {
5362 errorMessage = "';' expected after 'endfor' keyword";
5366 processParseExceptionDebug(e);
5368 final Statement[] stmtsArray = new Statement[list.size()];
5369 list.toArray(stmtsArray);
5370 {if (true) return new ForStatement(initializations,
5373 new Block(stmtsArray,
5374 stmtsArray[0].sourceStart,
5375 stmtsArray[stmtsArray.length-1].sourceEnd),
5380 jj_la1[123] = jj_gen;
5381 jj_consume_token(-1);
5382 throw new ParseException();
5384 throw new Error("Missing return statement in function");
5387 static final public Expression[] ForInit() throws ParseException {
5388 final Expression[] exprs;
5389 if (jj_2_5(2147483647)) {
5390 exprs = LocalVariableDeclaration();
5391 {if (true) return exprs;}
5393 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5409 case INTEGER_LITERAL:
5410 case FLOATING_POINT_LITERAL:
5411 case STRING_LITERAL:
5416 exprs = StatementExpressionList();
5417 {if (true) return exprs;}
5420 jj_la1[124] = jj_gen;
5421 jj_consume_token(-1);
5422 throw new ParseException();
5425 throw new Error("Missing return statement in function");
5428 static final public Expression[] StatementExpressionList() throws ParseException {
5429 final ArrayList list = new ArrayList();
5430 final Expression expr;
5431 expr = Expression();
5435 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5440 jj_la1[125] = jj_gen;
5443 jj_consume_token(COMMA);
5447 final Expression[] exprsArray = new Expression[list.size()];
5448 list.toArray(exprsArray);
5449 {if (true) return exprsArray;}
5450 throw new Error("Missing return statement in function");
5453 static final public Continue ContinueStatement() throws ParseException {
5454 Expression expr = null;
5456 Token token2 = null;
5457 token = jj_consume_token(CONTINUE);
5458 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5474 case INTEGER_LITERAL:
5475 case FLOATING_POINT_LITERAL:
5476 case STRING_LITERAL:
5481 expr = Expression();
5484 jj_la1[126] = jj_gen;
5488 token2 = jj_consume_token(SEMICOLON);
5489 } catch (ParseException e) {
5490 errorMessage = "';' expected after 'continue' statement";
5493 errorStart = token.sourceEnd+1;
5494 errorEnd = token.sourceEnd+1;
5496 errorStart = expr.sourceEnd+1;
5497 errorEnd = expr.sourceEnd+1;
5499 processParseExceptionDebug(e);
5501 if (token2 == null) {
5503 {if (true) return new Continue(expr,token.sourceStart,token.sourceEnd);}
5505 {if (true) return new Continue(expr,token.sourceStart,expr.sourceEnd);}
5507 {if (true) return new Continue(expr,token.sourceStart,token2.sourceEnd);}
5508 throw new Error("Missing return statement in function");
5511 static final public ReturnStatement ReturnStatement() throws ParseException {
5512 Expression expr = null;
5514 Token token2 = null;
5515 token = jj_consume_token(RETURN);
5516 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5532 case INTEGER_LITERAL:
5533 case FLOATING_POINT_LITERAL:
5534 case STRING_LITERAL:
5539 expr = Expression();
5542 jj_la1[127] = jj_gen;
5546 token2 = jj_consume_token(SEMICOLON);
5547 } catch (ParseException e) {
5548 errorMessage = "';' expected after 'return' statement";
5551 errorStart = token.sourceEnd+1;
5552 errorEnd = token.sourceEnd+1;
5554 errorStart = expr.sourceEnd+1;
5555 errorEnd = expr.sourceEnd+1;
5557 processParseExceptionDebug(e);
5559 if (token2 == null) {
5561 {if (true) return new ReturnStatement(expr,token.sourceStart,token.sourceEnd);}
5563 {if (true) return new ReturnStatement(expr,token.sourceStart,expr.sourceEnd);}
5565 {if (true) return new ReturnStatement(expr,token.sourceStart,token2.sourceEnd);}
5566 throw new Error("Missing return statement in function");
5569 static final private boolean jj_2_1(int xla) {
5570 jj_la = xla; jj_lastpos = jj_scanpos = token;
5571 boolean retval = !jj_3_1();
5576 static final private boolean jj_2_2(int xla) {
5577 jj_la = xla; jj_lastpos = jj_scanpos = token;
5578 boolean retval = !jj_3_2();
5583 static final private boolean jj_2_3(int xla) {
5584 jj_la = xla; jj_lastpos = jj_scanpos = token;
5585 boolean retval = !jj_3_3();
5590 static final private boolean jj_2_4(int xla) {
5591 jj_la = xla; jj_lastpos = jj_scanpos = token;
5592 boolean retval = !jj_3_4();
5597 static final private boolean jj_2_5(int xla) {
5598 jj_la = xla; jj_lastpos = jj_scanpos = token;
5599 boolean retval = !jj_3_5();
5604 static final private boolean jj_3R_115() {
5605 if (jj_scan_token(XOR)) return true;
5606 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5607 if (jj_3R_114()) return true;
5608 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5612 static final private boolean jj_3R_210() {
5613 if (jj_3R_116()) return true;
5614 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5618 static final private boolean jj_3R_209() {
5619 if (jj_3R_50()) return true;
5620 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5624 static final private boolean jj_3R_109() {
5625 if (jj_3R_114()) return true;
5626 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5630 if (jj_3R_115()) { jj_scanpos = xsp; break; }
5631 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5636 static final private boolean jj_3R_208() {
5637 if (jj_scan_token(IDENTIFIER)) return true;
5638 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5642 static final private boolean jj_3R_203() {
5649 if (jj_3R_210()) return true;
5650 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5651 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5652 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5656 static final private boolean jj_3R_110() {
5657 if (jj_scan_token(BIT_OR)) return true;
5658 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5659 if (jj_3R_109()) return true;
5660 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5664 static final private boolean jj_3R_103() {
5665 if (jj_3R_109()) return true;
5666 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5670 if (jj_3R_110()) { jj_scanpos = xsp; break; }
5671 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5676 static final private boolean jj_3R_188() {
5677 if (jj_scan_token(ARRAY)) return true;
5678 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5679 if (jj_3R_198()) return true;
5680 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5684 static final private boolean jj_3R_132() {
5685 if (jj_scan_token(IDENTIFIER)) return true;
5686 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5690 static final private boolean jj_3R_131() {
5691 if (jj_scan_token(LBRACE)) return true;
5692 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5693 if (jj_3R_49()) return true;
5694 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5695 if (jj_scan_token(RBRACE)) return true;
5696 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5700 static final private boolean jj_3R_106() {
5701 if (jj_scan_token(DOT)) return true;
5702 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5703 if (jj_3R_103()) return true;
5704 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5708 static final private boolean jj_3R_122() {
5715 if (jj_3R_132()) return true;
5716 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5717 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5718 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5722 static final private boolean jj_3R_130() {
5723 if (jj_scan_token(DOLLAR)) return true;
5724 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5725 if (jj_3R_122()) return true;
5726 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5730 static final private boolean jj_3R_97() {
5731 if (jj_3R_103()) return true;
5732 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5736 if (jj_3R_106()) { jj_scanpos = xsp; break; }
5737 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5742 static final private boolean jj_3R_204() {
5743 if (jj_3R_207()) return true;
5744 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5748 static final private boolean jj_3R_108() {
5749 if (jj_scan_token(_ANDL)) return true;
5750 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5754 static final private boolean jj_3R_107() {
5755 if (jj_scan_token(AND_AND)) return true;
5756 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5760 static final private boolean jj_3R_68() {
5761 if (jj_scan_token(DOLLAR)) return true;
5762 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5763 if (jj_3R_122()) return true;
5764 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5768 static final private boolean jj_3R_100() {
5773 if (jj_3R_108()) return true;
5774 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5775 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5776 if (jj_3R_97()) return true;
5777 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5781 static final private boolean jj_3R_81() {
5782 if (jj_3R_97()) return true;
5783 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5787 if (jj_3R_100()) { jj_scanpos = xsp; break; }
5788 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5793 static final private boolean jj_3R_79() {
5794 if (jj_scan_token(HOOK)) return true;
5795 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5796 if (jj_3R_49()) return true;
5797 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5798 if (jj_scan_token(COLON)) return true;
5799 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5800 if (jj_3R_73()) return true;
5801 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5805 static final private boolean jj_3R_195() {
5806 if (jj_scan_token(NEW)) return true;
5807 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5808 if (jj_3R_203()) return true;
5809 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5812 if (jj_3R_204()) jj_scanpos = xsp;
5813 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5817 static final private boolean jj_3R_202() {
5818 if (jj_3R_207()) return true;
5819 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5823 static final private boolean jj_3R_194() {
5824 if (jj_3R_116()) return true;
5825 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5828 if (jj_3R_202()) jj_scanpos = xsp;
5829 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5833 static final private boolean jj_3R_102() {
5834 if (jj_scan_token(_ORL)) return true;
5835 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5839 static final private boolean jj_3R_101() {
5840 if (jj_scan_token(OR_OR)) return true;
5841 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5845 static final private boolean jj_3R_83() {
5850 if (jj_3R_102()) return true;
5851 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5852 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5853 if (jj_3R_81()) return true;
5854 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5858 static final private boolean jj_3_1() {
5859 if (jj_3R_40()) return true;
5860 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5864 static final private boolean jj_3R_201() {
5865 if (jj_3R_207()) return true;
5866 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5870 static final private boolean jj_3R_76() {
5871 if (jj_3R_81()) return true;
5872 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5876 if (jj_3R_83()) { jj_scanpos = xsp; break; }
5877 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5882 static final private boolean jj_3R_200() {
5883 if (jj_scan_token(STATICCLASSACCESS)) return true;
5884 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5885 if (jj_3R_203()) return true;
5886 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5890 static final private boolean jj_3R_116() {
5891 if (jj_3R_68()) return true;
5892 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5896 if (jj_3_1()) { jj_scanpos = xsp; break; }
5897 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5902 static final private boolean jj_3R_51() {
5903 if (jj_scan_token(COMMA)) return true;
5904 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5905 if (jj_3R_49()) return true;
5906 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5910 static final private boolean jj_3R_193() {
5911 if (jj_scan_token(IDENTIFIER)) return true;
5912 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5916 if (jj_3R_200()) { jj_scanpos = xsp; break; }
5917 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5920 if (jj_3R_201()) jj_scanpos = xsp;
5921 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5925 static final private boolean jj_3R_187() {
5932 if (jj_3R_195()) return true;
5933 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5934 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5935 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5939 static final private boolean jj_3R_73() {
5940 if (jj_3R_76()) return true;
5941 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5944 if (jj_3R_79()) jj_scanpos = xsp;
5945 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5949 static final private boolean jj_3R_45() {
5950 if (jj_3R_49()) return true;
5951 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5955 if (jj_3R_51()) { jj_scanpos = xsp; break; }
5956 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5961 static final private boolean jj_3R_178() {
5962 if (jj_3R_188()) return true;
5963 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5967 static final private boolean jj_3R_186() {
5968 if (jj_scan_token(BIT_AND)) return true;
5969 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5973 static final private boolean jj_3R_96() {
5974 if (jj_scan_token(TILDEEQUAL)) return true;
5975 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5979 static final private boolean jj_3R_95() {
5980 if (jj_scan_token(DOTASSIGN)) return true;
5981 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5985 static final private boolean jj_3R_173() {
5990 if (jj_3R_178()) return true;
5991 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5992 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5996 static final private boolean jj_3R_177() {
5999 if (jj_3R_186()) jj_scanpos = xsp;
6000 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6001 if (jj_3R_187()) return true;
6002 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6006 static final private boolean jj_3R_94() {
6007 if (jj_scan_token(ORASSIGN)) return true;
6008 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6012 static final private boolean jj_3R_93() {
6013 if (jj_scan_token(XORASSIGN)) return true;
6014 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6018 static final private boolean jj_3R_92() {
6019 if (jj_scan_token(ANDASSIGN)) return true;
6020 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6024 static final private boolean jj_3R_91() {
6025 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6026 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6030 static final private boolean jj_3R_90() {
6031 if (jj_scan_token(LSHIFTASSIGN)) return true;
6032 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6036 static final private boolean jj_3R_89() {
6037 if (jj_scan_token(MINUSASSIGN)) return true;
6038 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6042 static final private boolean jj_3R_88() {
6043 if (jj_scan_token(PLUSASSIGN)) return true;
6044 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6048 static final private boolean jj_3_5() {
6049 if (jj_3R_45()) return true;
6050 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6054 static final private boolean jj_3R_87() {
6055 if (jj_scan_token(REMASSIGN)) return true;
6056 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6060 static final private boolean jj_3R_86() {
6061 if (jj_scan_token(SLASHASSIGN)) return true;
6062 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6066 static final private boolean jj_3R_85() {
6067 if (jj_scan_token(STARASSIGN)) return true;
6068 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6072 static final private boolean jj_3R_84() {
6073 if (jj_scan_token(ASSIGN)) return true;
6074 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6078 static final private boolean jj_3R_80() {
6105 if (jj_3R_96()) return true;
6106 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6107 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6108 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6109 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6110 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6111 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6112 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6113 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6114 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6115 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6116 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6117 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6118 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6122 static final private boolean jj_3R_197() {
6123 if (jj_scan_token(MINUS_MINUS)) return true;
6124 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6128 static final private boolean jj_3R_196() {
6129 if (jj_scan_token(PLUS_PLUS)) return true;
6130 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6134 static final private boolean jj_3R_191() {
6139 if (jj_3R_197()) return true;
6140 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6141 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6145 static final private boolean jj_3R_175() {
6146 if (jj_3R_173()) return true;
6147 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6150 if (jj_3R_191()) jj_scanpos = xsp;
6151 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6155 static final private boolean jj_3R_99() {
6156 if (jj_3R_105()) return true;
6157 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6161 static final private boolean jj_3R_98() {
6162 if (jj_3R_104()) return true;
6163 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6167 static final private boolean jj_3R_82() {
6172 if (jj_3R_99()) return true;
6173 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6174 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6178 static final private boolean jj_3R_190() {
6179 if (jj_scan_token(ARRAY)) return true;
6180 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6184 static final private boolean jj_3R_189() {
6185 if (jj_3R_50()) return true;
6186 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6190 static final private boolean jj_3R_78() {
6191 if (jj_3R_82()) return true;
6192 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6196 static final private boolean jj_3R_43() {
6197 if (jj_scan_token(ARRAY)) return true;
6198 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6202 static final private boolean jj_3R_77() {
6203 if (jj_scan_token(BANG)) return true;
6204 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6205 if (jj_3R_74()) return true;
6206 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6210 static final private boolean jj_3R_74() {
6215 if (jj_3R_78()) return true;
6216 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6217 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6221 static final private boolean jj_3R_174() {
6222 if (jj_scan_token(LPAREN)) return true;
6223 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6228 if (jj_3R_190()) return true;
6229 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6230 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6231 if (jj_scan_token(RPAREN)) return true;
6232 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6233 if (jj_3R_144()) return true;
6234 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6238 static final private boolean jj_3R_42() {
6239 if (jj_3R_50()) return true;
6240 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6244 static final private boolean jj_3R_58() {
6245 if (jj_3R_74()) return true;
6246 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6250 static final private boolean jj_3_3() {
6251 if (jj_scan_token(LPAREN)) return true;
6252 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6257 if (jj_3R_43()) return true;
6258 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6259 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6260 if (jj_scan_token(RPAREN)) return true;
6261 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6265 static final private boolean jj_3R_172() {
6266 if (jj_scan_token(LPAREN)) return true;
6267 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6268 if (jj_3R_49()) return true;
6269 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6270 if (jj_scan_token(RPAREN)) return true;
6271 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6275 static final private boolean jj_3R_171() {
6276 if (jj_3R_176()) return true;
6277 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6281 static final private boolean jj_3R_170() {
6282 if (jj_3R_175()) return true;
6283 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6287 static final private boolean jj_3R_166() {
6296 if (jj_3R_172()) return true;
6297 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6298 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6299 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6300 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6304 static final private boolean jj_3R_169() {
6305 if (jj_3R_174()) return true;
6306 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6310 static final private boolean jj_3R_168() {
6311 if (jj_scan_token(MINUS_MINUS)) return true;
6312 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6316 static final private boolean jj_3R_167() {
6317 if (jj_scan_token(PLUS_PLUS)) return true;
6318 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6322 static final private boolean jj_3R_75() {
6323 if (jj_3R_80()) return true;
6324 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6325 if (jj_3R_49()) return true;
6326 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6330 static final private boolean jj_3R_44() {
6331 if (jj_3R_49()) return true;
6332 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6333 if (jj_scan_token(SEMICOLON)) return true;
6334 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6338 static final private boolean jj_3R_165() {
6343 if (jj_3R_168()) return true;
6344 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6345 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6346 if (jj_3R_173()) return true;
6347 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6351 static final private boolean jj_3R_49() {
6356 if (jj_3R_58()) return true;
6357 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6358 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6362 static final private boolean jj_3R_57() {
6363 if (jj_3R_73()) return true;
6364 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6367 if (jj_3R_75()) jj_scanpos = xsp;
6368 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6372 static final private boolean jj_3R_67() {
6373 if (jj_scan_token(OBJECT)) return true;
6374 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6378 static final private boolean jj_3R_161() {
6379 if (jj_3R_166()) return true;
6380 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6384 static final private boolean jj_3R_66() {
6385 if (jj_scan_token(INTEGER)) return true;
6386 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6390 static final private boolean jj_3R_65() {
6391 if (jj_scan_token(INT)) return true;
6392 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6396 static final private boolean jj_3R_64() {
6397 if (jj_scan_token(FLOAT)) return true;
6398 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6402 static final private boolean jj_3R_160() {
6403 if (jj_3R_165()) return true;
6404 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6408 static final private boolean jj_3R_63() {
6409 if (jj_scan_token(DOUBLE)) return true;
6410 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6414 static final private boolean jj_3R_62() {
6415 if (jj_scan_token(REAL)) return true;
6416 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6420 static final private boolean jj_3R_61() {
6421 if (jj_scan_token(BOOLEAN)) return true;
6422 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6426 static final private boolean jj_3R_60() {
6427 if (jj_scan_token(BOOL)) return true;
6428 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6432 static final private boolean jj_3R_159() {
6433 if (jj_scan_token(MINUS)) return true;
6434 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6435 if (jj_3R_148()) return true;
6436 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6440 static final private boolean jj_3R_50() {
6459 if (jj_3R_67()) return true;
6460 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6461 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6462 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6463 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6464 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6465 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6466 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6467 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6468 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6472 static final private boolean jj_3R_59() {
6473 if (jj_scan_token(STRING)) return true;
6474 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6478 static final private boolean jj_3R_156() {
6487 if (jj_3R_161()) return true;
6488 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6489 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6490 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6491 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6495 static final private boolean jj_3R_158() {
6496 if (jj_scan_token(PLUS)) return true;
6497 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6498 if (jj_3R_148()) return true;
6499 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6503 static final private boolean jj_3R_164() {
6504 if (jj_3R_156()) return true;
6505 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6509 static final private boolean jj_3_4() {
6510 if (jj_3R_44()) return true;
6511 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6515 static final private boolean jj_3R_163() {
6516 if (jj_scan_token(BANG)) return true;
6517 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6518 if (jj_3R_157()) return true;
6519 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6523 static final private boolean jj_3R_157() {
6530 if (jj_3R_164()) return true;
6531 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6532 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6533 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6537 static final private boolean jj_3R_162() {
6538 if (jj_scan_token(AT)) return true;
6539 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6540 if (jj_3R_157()) return true;
6541 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6545 static final private boolean jj_3R_155() {
6546 if (jj_3R_156()) return true;
6547 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6551 static final private boolean jj_3R_154() {
6552 if (jj_scan_token(BANG)) return true;
6553 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6554 if (jj_3R_157()) return true;
6555 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6559 static final private boolean jj_3R_216() {
6560 if (jj_scan_token(COMMA)) return true;
6561 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6562 if (jj_3R_49()) return true;
6563 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6567 static final private boolean jj_3R_153() {
6568 if (jj_scan_token(TILDE)) return true;
6569 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6570 if (jj_3R_148()) return true;
6571 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6575 static final private boolean jj_3R_215() {
6576 if (jj_3R_49()) return true;
6577 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6581 if (jj_3R_216()) { jj_scanpos = xsp; break; }
6582 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6587 static final private boolean jj_3R_148() {
6596 if (jj_3R_155()) return true;
6597 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6598 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6599 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6600 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6604 static final private boolean jj_3R_152() {
6605 if (jj_scan_token(AT)) return true;
6606 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6607 if (jj_3R_148()) return true;
6608 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6612 static final private boolean jj_3R_144() {
6613 if (jj_3R_148()) return true;
6614 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6618 static final private boolean jj_3R_213() {
6619 if (jj_3R_215()) return true;
6620 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6624 static final private boolean jj_3R_151() {
6625 if (jj_scan_token(REMAINDER)) return true;
6626 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6630 static final private boolean jj_3R_150() {
6631 if (jj_scan_token(SLASH)) return true;
6632 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6636 static final private boolean jj_3R_149() {
6637 if (jj_scan_token(STAR)) return true;
6638 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6642 static final private boolean jj_3R_207() {
6643 if (jj_scan_token(LPAREN)) return true;
6644 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6647 if (jj_3R_213()) jj_scanpos = xsp;
6648 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6649 if (jj_scan_token(RPAREN)) return true;
6650 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6654 static final private boolean jj_3R_145() {
6661 if (jj_3R_151()) return true;
6662 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6663 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6664 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6665 if (jj_3R_144()) return true;
6666 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6670 static final private boolean jj_3R_139() {
6671 if (jj_3R_144()) return true;
6672 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6676 if (jj_3R_145()) { jj_scanpos = xsp; break; }
6677 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6682 static final private boolean jj_3R_212() {
6683 if (jj_scan_token(LBRACE1)) return true;
6684 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6685 if (jj_scan_token(ID)) return true;
6686 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6687 if (jj_scan_token(RBRACE1)) return true;
6688 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6692 static final private boolean jj_3R_147() {
6693 if (jj_scan_token(MINUS)) return true;
6694 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6698 static final private boolean jj_3R_211() {
6699 if (jj_scan_token(IDENTIFIER)) return true;
6700 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6704 static final private boolean jj_3R_146() {
6705 if (jj_scan_token(PLUS)) return true;
6706 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6710 static final private boolean jj_3R_140() {
6715 if (jj_3R_147()) return true;
6716 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6717 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6718 if (jj_3R_139()) return true;
6719 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6723 static final private boolean jj_3R_199() {
6724 if (jj_scan_token(DOLLARS)) return true;
6725 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6730 if (jj_3R_212()) return true;
6731 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6732 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6736 static final private boolean jj_3R_133() {
6737 if (jj_3R_139()) return true;
6738 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6742 if (jj_3R_140()) { jj_scanpos = xsp; break; }
6743 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6748 static final private boolean jj_3R_192() {
6749 if (jj_scan_token(DOUBLEQUOTE)) return true;
6750 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6754 if (jj_3R_199()) { jj_scanpos = xsp; break; }
6755 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6757 if (jj_scan_token(DOUBLEQUOTE2)) return true;
6758 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6762 static final private boolean jj_3R_143() {
6763 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
6764 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6768 static final private boolean jj_3R_142() {
6769 if (jj_scan_token(RSIGNEDSHIFT)) return true;
6770 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6774 static final private boolean jj_3R_141() {
6775 if (jj_scan_token(LSHIFT)) return true;
6776 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6780 static final private boolean jj_3R_185() {
6781 if (jj_3R_192()) return true;
6782 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6786 static final private boolean jj_3R_184() {
6787 if (jj_scan_token(NULL)) return true;
6788 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6792 static final private boolean jj_3R_134() {
6799 if (jj_3R_143()) return true;
6800 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6801 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6802 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6803 if (jj_3R_133()) return true;
6804 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6808 static final private boolean jj_3R_113() {
6809 if (jj_scan_token(ASSIGN)) return true;
6810 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6811 if (jj_3R_49()) return true;
6812 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6816 static final private boolean jj_3R_183() {
6817 if (jj_scan_token(FALSE)) return true;
6818 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6822 static final private boolean jj_3R_182() {
6823 if (jj_scan_token(TRUE)) return true;
6824 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6828 static final private boolean jj_3R_123() {
6829 if (jj_3R_133()) return true;
6830 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6834 if (jj_3R_134()) { jj_scanpos = xsp; break; }
6835 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6840 static final private boolean jj_3R_181() {
6841 if (jj_scan_token(STRING_LITERAL)) return true;
6842 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6846 static final private boolean jj_3R_180() {
6847 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
6848 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6852 static final private boolean jj_3R_179() {
6853 if (jj_scan_token(INTEGER_LITERAL)) return true;
6854 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6858 static final private boolean jj_3R_176() {
6873 if (jj_3R_185()) return true;
6874 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6875 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6876 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6877 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6878 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6879 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6880 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6884 static final private boolean jj_3R_117() {
6885 if (jj_3R_116()) return true;
6886 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6890 static final private boolean jj_3R_138() {
6891 if (jj_scan_token(GE)) return true;
6892 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6896 static final private boolean jj_3R_137() {
6897 if (jj_scan_token(LE)) return true;
6898 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6902 static final private boolean jj_3R_136() {
6903 if (jj_scan_token(GT)) return true;
6904 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6908 static final private boolean jj_3R_135() {
6909 if (jj_scan_token(LT)) return true;
6910 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6914 static final private boolean jj_3R_124() {
6923 if (jj_3R_138()) return true;
6924 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6925 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6926 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6927 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6928 if (jj_3R_123()) return true;
6929 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6933 static final private boolean jj_3R_120() {
6934 if (jj_3R_123()) return true;
6935 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6939 if (jj_3R_124()) { jj_scanpos = xsp; break; }
6940 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6945 static final private boolean jj_3R_72() {
6946 if (jj_3R_50()) return true;
6947 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6951 static final private boolean jj_3R_112() {
6952 if (jj_scan_token(COMMA)) return true;
6953 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6956 if (jj_3R_117()) jj_scanpos = xsp;
6957 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6961 static final private boolean jj_3R_71() {
6962 if (jj_3R_49()) return true;
6963 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6967 static final private boolean jj_3R_56() {
6972 if (jj_3R_72()) return true;
6973 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6974 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6978 static final private boolean jj_3R_48() {
6979 if (jj_scan_token(LBRACE)) return true;
6980 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6983 if (jj_3R_56()) jj_scanpos = xsp;
6984 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6985 if (jj_scan_token(RBRACE)) return true;
6986 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6990 static final private boolean jj_3R_111() {
6991 if (jj_3R_116()) return true;
6992 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6996 static final private boolean jj_3R_206() {
6997 if (jj_scan_token(COMMA)) return true;
6998 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7002 static final private boolean jj_3_2() {
7003 if (jj_scan_token(COMMA)) return true;
7004 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7005 if (jj_3R_41()) return true;
7006 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7010 static final private boolean jj_3R_70() {
7011 if (jj_3R_50()) return true;
7012 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7016 static final private boolean jj_3R_55() {
7021 if (jj_3R_70()) return true;
7022 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7023 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7027 static final private boolean jj_3R_69() {
7028 if (jj_3R_49()) return true;
7029 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7033 static final private boolean jj_3R_104() {
7034 if (jj_scan_token(LIST)) return true;
7035 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7036 if (jj_scan_token(LPAREN)) return true;
7037 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7040 if (jj_3R_111()) jj_scanpos = xsp;
7041 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7044 if (jj_3R_112()) { jj_scanpos = xsp; break; }
7045 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7047 if (jj_scan_token(RPAREN)) return true;
7048 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7050 if (jj_3R_113()) jj_scanpos = xsp;
7051 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7055 static final private boolean jj_3R_205() {
7056 if (jj_3R_41()) return true;
7057 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7061 if (jj_3_2()) { jj_scanpos = xsp; break; }
7062 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7067 static final private boolean jj_3R_47() {
7068 if (jj_scan_token(LBRACKET)) return true;
7069 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7072 if (jj_3R_55()) jj_scanpos = xsp;
7073 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7074 if (jj_scan_token(RBRACKET)) return true;
7075 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7079 static final private boolean jj_3R_129() {
7080 if (jj_scan_token(TRIPLEEQUAL)) return true;
7081 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7085 static final private boolean jj_3R_128() {
7086 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
7087 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7091 static final private boolean jj_3R_127() {
7092 if (jj_scan_token(NOT_EQUAL)) return true;
7093 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7097 static final private boolean jj_3R_198() {
7098 if (jj_scan_token(LPAREN)) return true;
7099 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7102 if (jj_3R_205()) jj_scanpos = xsp;
7103 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7105 if (jj_3R_206()) jj_scanpos = xsp;
7106 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7107 if (jj_scan_token(RPAREN)) return true;
7108 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7112 static final private boolean jj_3R_126() {
7113 if (jj_scan_token(DIF)) return true;
7114 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7118 static final private boolean jj_3R_125() {
7119 if (jj_scan_token(EQUAL_EQUAL)) return true;
7120 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7124 static final private boolean jj_3R_54() {
7125 if (jj_3R_68()) return true;
7126 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7130 static final private boolean jj_3R_121() {
7141 if (jj_3R_129()) return true;
7142 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7143 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7144 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7145 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7146 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7147 if (jj_3R_120()) return true;
7148 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7152 static final private boolean jj_3R_53() {
7153 if (jj_scan_token(IDENTIFIER)) return true;
7154 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7158 static final private boolean jj_3R_118() {
7159 if (jj_3R_120()) return true;
7160 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7164 if (jj_3R_121()) { jj_scanpos = xsp; break; }
7165 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7170 static final private boolean jj_3R_105() {
7171 if (jj_scan_token(PRINT)) return true;
7172 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7173 if (jj_3R_49()) return true;
7174 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7178 static final private boolean jj_3R_214() {
7179 if (jj_scan_token(ARRAYASSIGN)) return true;
7180 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7181 if (jj_3R_49()) return true;
7182 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7186 static final private boolean jj_3R_41() {
7187 if (jj_3R_49()) return true;
7188 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7191 if (jj_3R_214()) jj_scanpos = xsp;
7192 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7196 static final private boolean jj_3R_52() {
7197 if (jj_scan_token(LBRACE)) return true;
7198 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7199 if (jj_3R_49()) return true;
7200 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7201 if (jj_scan_token(RBRACE)) return true;
7202 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7206 static final private boolean jj_3R_119() {
7207 if (jj_scan_token(BIT_AND)) return true;
7208 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7209 if (jj_3R_118()) return true;
7210 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7214 static final private boolean jj_3R_46() {
7215 if (jj_scan_token(CLASSACCESS)) return true;
7216 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7223 if (jj_3R_54()) return true;
7224 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7225 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7226 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7230 static final private boolean jj_3R_40() {
7237 if (jj_3R_48()) return true;
7238 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7239 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7240 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7244 static final private boolean jj_3R_114() {
7245 if (jj_3R_118()) return true;
7246 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7250 if (jj_3R_119()) { jj_scanpos = xsp; break; }
7251 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7256 static private boolean jj_initialized_once = false;
7257 static public PHPParserTokenManager token_source;
7258 static SimpleCharStream jj_input_stream;
7259 static public Token token, jj_nt;
7260 static private int jj_ntk;
7261 static private Token jj_scanpos, jj_lastpos;
7262 static private int jj_la;
7263 static public boolean lookingAhead = false;
7264 static private boolean jj_semLA;
7265 static private int jj_gen;
7266 static final private int[] jj_la1 = new int[128];
7267 static private int[] jj_la1_0;
7268 static private int[] jj_la1_1;
7269 static private int[] jj_la1_2;
7270 static private int[] jj_la1_3;
7271 static private int[] jj_la1_4;
7279 private static void jj_la1_0() {
7280 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,};
7282 private static void jj_la1_1() {
7283 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,};
7285 private static void jj_la1_2() {
7286 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,};
7288 private static void jj_la1_3() {
7289 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,};
7291 private static void jj_la1_4() {
7292 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,};
7294 static final private JJCalls[] jj_2_rtns = new JJCalls[5];
7295 static private boolean jj_rescan = false;
7296 static private int jj_gc = 0;
7298 public PHPParser(java.io.InputStream stream) {
7299 if (jj_initialized_once) {
7300 System.out.println("ERROR: Second call to constructor of static parser. You must");
7301 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7302 System.out.println(" during parser generation.");
7305 jj_initialized_once = true;
7306 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7307 token_source = new PHPParserTokenManager(jj_input_stream);
7308 token = new Token();
7311 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7312 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7315 static public void ReInit(java.io.InputStream stream) {
7316 jj_input_stream.ReInit(stream, 1, 1);
7317 token_source.ReInit(jj_input_stream);
7318 token = new Token();
7321 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7322 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7325 public PHPParser(java.io.Reader stream) {
7326 if (jj_initialized_once) {
7327 System.out.println("ERROR: Second call to constructor of static parser. You must");
7328 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7329 System.out.println(" during parser generation.");
7332 jj_initialized_once = true;
7333 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7334 token_source = new PHPParserTokenManager(jj_input_stream);
7335 token = new Token();
7338 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7339 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7342 static public void ReInit(java.io.Reader stream) {
7343 jj_input_stream.ReInit(stream, 1, 1);
7344 token_source.ReInit(jj_input_stream);
7345 token = new Token();
7348 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7349 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7352 public PHPParser(PHPParserTokenManager tm) {
7353 if (jj_initialized_once) {
7354 System.out.println("ERROR: Second call to constructor of static parser. You must");
7355 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7356 System.out.println(" during parser generation.");
7359 jj_initialized_once = true;
7361 token = new Token();
7364 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7365 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7368 public void ReInit(PHPParserTokenManager tm) {
7370 token = new Token();
7373 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7374 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7377 static final private Token jj_consume_token(int kind) throws ParseException {
7379 if ((oldToken = token).next != null) token = token.next;
7380 else token = token.next = token_source.getNextToken();
7382 if (token.kind == kind) {
7384 if (++jj_gc > 100) {
7386 for (int i = 0; i < jj_2_rtns.length; i++) {
7387 JJCalls c = jj_2_rtns[i];
7389 if (c.gen < jj_gen) c.first = null;
7398 throw generateParseException();
7401 static final private boolean jj_scan_token(int kind) {
7402 if (jj_scanpos == jj_lastpos) {
7404 if (jj_scanpos.next == null) {
7405 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
7407 jj_lastpos = jj_scanpos = jj_scanpos.next;
7410 jj_scanpos = jj_scanpos.next;
7413 int i = 0; Token tok = token;
7414 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
7415 if (tok != null) jj_add_error_token(kind, i);
7417 return (jj_scanpos.kind != kind);
7420 static final public Token getNextToken() {
7421 if (token.next != null) token = token.next;
7422 else token = token.next = token_source.getNextToken();
7428 static final public Token getToken(int index) {
7429 Token t = lookingAhead ? jj_scanpos : token;
7430 for (int i = 0; i < index; i++) {
7431 if (t.next != null) t = t.next;
7432 else t = t.next = token_source.getNextToken();
7437 static final private int jj_ntk() {
7438 if ((jj_nt=token.next) == null)
7439 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
7441 return (jj_ntk = jj_nt.kind);
7444 static private java.util.Vector jj_expentries = new java.util.Vector();
7445 static private int[] jj_expentry;
7446 static private int jj_kind = -1;
7447 static private int[] jj_lasttokens = new int[100];
7448 static private int jj_endpos;
7450 static private void jj_add_error_token(int kind, int pos) {
7451 if (pos >= 100) return;
7452 if (pos == jj_endpos + 1) {
7453 jj_lasttokens[jj_endpos++] = kind;
7454 } else if (jj_endpos != 0) {
7455 jj_expentry = new int[jj_endpos];
7456 for (int i = 0; i < jj_endpos; i++) {
7457 jj_expentry[i] = jj_lasttokens[i];
7459 boolean exists = false;
7460 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
7461 int[] oldentry = (int[])(enum.nextElement());
7462 if (oldentry.length == jj_expentry.length) {
7464 for (int i = 0; i < jj_expentry.length; i++) {
7465 if (oldentry[i] != jj_expentry[i]) {
7473 if (!exists) jj_expentries.addElement(jj_expentry);
7474 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
7478 static public ParseException generateParseException() {
7479 jj_expentries.removeAllElements();
7480 boolean[] la1tokens = new boolean[160];
7481 for (int i = 0; i < 160; i++) {
7482 la1tokens[i] = false;
7485 la1tokens[jj_kind] = true;
7488 for (int i = 0; i < 128; i++) {
7489 if (jj_la1[i] == jj_gen) {
7490 for (int j = 0; j < 32; j++) {
7491 if ((jj_la1_0[i] & (1<<j)) != 0) {
7492 la1tokens[j] = true;
7494 if ((jj_la1_1[i] & (1<<j)) != 0) {
7495 la1tokens[32+j] = true;
7497 if ((jj_la1_2[i] & (1<<j)) != 0) {
7498 la1tokens[64+j] = true;
7500 if ((jj_la1_3[i] & (1<<j)) != 0) {
7501 la1tokens[96+j] = true;
7503 if ((jj_la1_4[i] & (1<<j)) != 0) {
7504 la1tokens[128+j] = true;
7509 for (int i = 0; i < 160; i++) {
7511 jj_expentry = new int[1];
7513 jj_expentries.addElement(jj_expentry);
7518 jj_add_error_token(0, 0);
7519 int[][] exptokseq = new int[jj_expentries.size()][];
7520 for (int i = 0; i < jj_expentries.size(); i++) {
7521 exptokseq[i] = (int[])jj_expentries.elementAt(i);
7523 return new ParseException(token, exptokseq, tokenImage);
7526 static final public void enable_tracing() {
7529 static final public void disable_tracing() {
7532 static final private void jj_rescan_token() {
7534 for (int i = 0; i < 5; i++) {
7535 JJCalls p = jj_2_rtns[i];
7537 if (p.gen > jj_gen) {
7538 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7540 case 0: jj_3_1(); break;
7541 case 1: jj_3_2(); break;
7542 case 2: jj_3_3(); break;
7543 case 3: jj_3_4(); break;
7544 case 4: jj_3_5(); break;
7548 } while (p != null);
7553 static final private void jj_save(int index, int xla) {
7554 JJCalls p = jj_2_rtns[index];
7555 while (p.gen > jj_gen) {
7556 if (p.next == null) { p = p.next = new JJCalls(); break; }
7559 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7562 static final class JJCalls {