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 /** The current segment. */
34 private static OutlineableWithChildren currentSegment;
36 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
37 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
38 static PHPOutlineInfo outlineInfo;
40 /** The error level of the current ParseException. */
41 private static int errorLevel = ERROR;
42 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
43 private static String errorMessage;
45 private static int errorStart = -1;
46 private static int errorEnd = -1;
47 private static PHPDocument phpDocument;
49 private static final String SYNTAX_ERROR_CHAR = "syntax error";
51 * The point where html starts.
52 * It will be used by the token manager to create HTMLCode objects
54 public static int htmlStart;
57 private final static int AstStackIncrement = 100;
58 /** The stack of node. */
59 private static AstNode[] nodes;
60 /** The cursor in expression stack. */
61 private static int nodePtr;
63 private static final boolean PARSER_DEBUG = false;
65 public final void setFileToParse(final IFile fileToParse) {
66 PHPParser.fileToParse = fileToParse;
72 public PHPParser(final IFile fileToParse) {
73 this(new StringReader(""));
74 PHPParser.fileToParse = fileToParse;
77 public static final void phpParserTester(final String strEval) throws ParseException {
78 final StringReader stream = new StringReader(strEval);
79 if (jj_input_stream == null) {
80 jj_input_stream = new SimpleCharStream(stream, 1, 1);
82 ReInit(new StringReader(strEval));
84 phpDocument = new PHPDocument(null,"_root".toCharArray());
85 currentSegment = phpDocument;
86 outlineInfo = new PHPOutlineInfo(null, currentSegment);
87 PHPParserTokenManager.SwitchTo(PHPParserTokenManager.PHPPARSING);
91 public static final void htmlParserTester(final File fileName) throws FileNotFoundException, ParseException {
92 final Reader stream = new FileReader(fileName);
93 if (jj_input_stream == null) {
94 jj_input_stream = new SimpleCharStream(stream, 1, 1);
98 phpDocument = new PHPDocument(null,"_root".toCharArray());
99 currentSegment = phpDocument;
100 outlineInfo = new PHPOutlineInfo(null, currentSegment);
104 public static final void htmlParserTester(final String strEval) throws ParseException {
105 final StringReader stream = new StringReader(strEval);
106 if (jj_input_stream == null) {
107 jj_input_stream = new SimpleCharStream(stream, 1, 1);
111 phpDocument = new PHPDocument(null,"_root".toCharArray());
112 currentSegment = phpDocument;
113 outlineInfo = new PHPOutlineInfo(null, currentSegment);
118 * Reinitialize the parser.
120 private static final void init() {
121 nodes = new AstNode[AstStackIncrement];
127 * Add an php node on the stack.
128 * @param node the node that will be added to the stack
130 private static final void pushOnAstNodes(final AstNode node) {
132 nodes[++nodePtr] = node;
133 } catch (IndexOutOfBoundsException e) {
134 final int oldStackLength = nodes.length;
135 final AstNode[] oldStack = nodes;
136 nodes = new AstNode[oldStackLength + AstStackIncrement];
137 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
138 nodePtr = oldStackLength;
139 nodes[nodePtr] = node;
143 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
144 phpDocument = new PHPDocument(parent,"_root".toCharArray());
145 currentSegment = phpDocument;
146 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
147 final StringReader stream = new StringReader(s);
148 if (jj_input_stream == null) {
149 jj_input_stream = new SimpleCharStream(stream, 1, 1);
155 phpDocument.nodes = new AstNode[nodes.length];
156 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
157 if (PHPeclipsePlugin.DEBUG) {
158 PHPeclipsePlugin.log(1,phpDocument.toString());
160 } catch (ParseException e) {
161 processParseException(e);
166 private static void processParseExceptionDebug(final ParseException e) throws ParseException {
170 processParseException(e);
173 * This method will process the parse exception.
174 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
175 * @param e the ParseException
177 private static void processParseException(final ParseException e) {
178 if (errorMessage == null) {
179 PHPeclipsePlugin.log(e);
180 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
181 errorStart = e.currentToken.sourceStart;
182 errorEnd = e.currentToken.sourceEnd;
186 // if (PHPeclipsePlugin.DEBUG) PHPeclipsePlugin.log(e);
190 * Create marker for the parse error.
191 * @param e the ParseException
193 private static void setMarker(final ParseException e) {
195 if (errorStart == -1) {
196 setMarker(fileToParse,
198 e.currentToken.sourceStart,
199 e.currentToken.sourceEnd,
201 "Line " + e.currentToken.beginLine);
203 setMarker(fileToParse,
208 "Line " + e.currentToken.beginLine);
212 } catch (CoreException e2) {
213 PHPeclipsePlugin.log(e2);
217 private static void scanLine(final String output,
220 final int brIndx) throws CoreException {
222 final StringBuffer lineNumberBuffer = new StringBuffer(10);
224 current = output.substring(indx, brIndx);
226 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
227 final int onLine = current.indexOf("on line <b>");
229 lineNumberBuffer.delete(0, lineNumberBuffer.length());
230 for (int i = onLine; i < current.length(); i++) {
231 ch = current.charAt(i);
232 if ('0' <= ch && '9' >= ch) {
233 lineNumberBuffer.append(ch);
237 final int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
239 final Hashtable attributes = new Hashtable();
241 current = current.replaceAll("\n", "");
242 current = current.replaceAll("<b>", "");
243 current = current.replaceAll("</b>", "");
244 MarkerUtilities.setMessage(attributes, current);
246 if (current.indexOf(PARSE_ERROR_STRING) != -1)
247 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
248 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
249 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
251 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
252 MarkerUtilities.setLineNumber(attributes, lineNumber);
253 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
258 public final void parse(final String s) {
259 final StringReader stream = new StringReader(s);
260 if (jj_input_stream == null) {
261 jj_input_stream = new SimpleCharStream(stream, 1, 1);
267 } catch (ParseException e) {
268 processParseException(e);
273 * Call the php parse command ( php -l -f <filename> )
274 * and create markers according to the external parser output
276 public static void phpExternalParse(final IFile file) {
277 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
278 final String filename = file.getLocation().toString();
280 final String[] arguments = { filename };
281 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
282 final String command = form.format(arguments);
284 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
287 // parse the buffer to find the errors and warnings
288 createMarkers(parserResult, file);
289 } catch (CoreException e) {
290 PHPeclipsePlugin.log(e);
295 * Put a new html block in the stack.
297 public static final void createNewHTMLCode() {
298 final int currentPosition = SimpleCharStream.getPosition();
299 if (currentPosition == htmlStart || currentPosition > SimpleCharStream.currentBuffer.length()) {
302 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray();
303 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
306 /** Create a new task. */
307 public static final void createNewTask() {
308 final int currentPosition = SimpleCharStream.getPosition();
309 final String todo = SimpleCharStream.currentBuffer.substring(currentPosition-3,
310 SimpleCharStream.currentBuffer.indexOf("\n",
312 PHPeclipsePlugin.log(1,SimpleCharStream.currentBuffer.toString());
314 setMarker(fileToParse,
316 SimpleCharStream.getBeginLine(),
318 "Line "+SimpleCharStream.getBeginLine());
319 } catch (CoreException e) {
320 PHPeclipsePlugin.log(e);
324 private static final void parse() throws ParseException {
328 static final public void phpTest() throws ParseException {
333 static final public void phpFile() throws ParseException {
337 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
376 case INTEGER_LITERAL:
377 case FLOATING_POINT_LITERAL:
392 PHPParser.createNewHTMLCode();
393 } catch (TokenMgrError e) {
394 PHPeclipsePlugin.log(e);
395 errorStart = SimpleCharStream.getPosition();
396 errorEnd = errorStart + 1;
397 errorMessage = e.getMessage();
399 {if (true) throw generateParseException();}
404 * A php block is a <?= expression [;]?>
405 * or <?php somephpcode ?>
406 * or <? somephpcode ?>
408 static final public void PhpBlock() throws ParseException {
409 final int start = SimpleCharStream.getPosition();
410 final PHPEchoBlock phpEchoBlock;
411 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
413 phpEchoBlock = phpEchoBlock();
414 pushOnAstNodes(phpEchoBlock);
453 case INTEGER_LITERAL:
454 case FLOATING_POINT_LITERAL:
461 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
464 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
466 jj_consume_token(PHPSTARTLONG);
469 jj_consume_token(PHPSTARTSHORT);
471 setMarker(fileToParse,
472 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
474 SimpleCharStream.getPosition(),
476 "Line " + token.beginLine);
477 } catch (CoreException e) {
478 PHPeclipsePlugin.log(e);
483 jj_consume_token(-1);
484 throw new ParseException();
493 jj_consume_token(PHPEND);
494 } catch (ParseException e) {
495 errorMessage = "'?>' expected";
497 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
498 errorEnd = SimpleCharStream.getPosition() + 1;
499 processParseExceptionDebug(e);
504 jj_consume_token(-1);
505 throw new ParseException();
509 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
510 final Expression expr;
511 final PHPEchoBlock echoBlock;
512 final Token token, token2;
513 token = jj_consume_token(PHPECHOSTART);
515 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
517 jj_consume_token(SEMICOLON);
523 token2 = jj_consume_token(PHPEND);
524 echoBlock = new PHPEchoBlock(expr,token.sourceStart,token.sourceEnd);
525 pushOnAstNodes(echoBlock);
526 {if (true) return echoBlock;}
527 throw new Error("Missing return statement in function");
530 static final public void Php() throws ParseException {
533 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
568 case INTEGER_LITERAL:
569 case FLOATING_POINT_LITERAL:
586 static final public ClassDeclaration ClassDeclaration() throws ParseException {
587 final ClassDeclaration classDeclaration;
588 Token className = null;
589 final Token superclassName, token;
590 String classNameImage = SYNTAX_ERROR_CHAR;
591 String superclassNameImage = null;
592 token = jj_consume_token(CLASS);
594 className = jj_consume_token(IDENTIFIER);
595 classNameImage = className.image;
596 } catch (ParseException e) {
597 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
599 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
600 errorEnd = SimpleCharStream.getPosition() + 1;
601 processParseExceptionDebug(e);
603 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
605 jj_consume_token(EXTENDS);
607 superclassName = jj_consume_token(IDENTIFIER);
608 superclassNameImage = superclassName.image;
609 } catch (ParseException e) {
610 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
612 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
613 errorEnd = SimpleCharStream.getPosition() + 1;
614 processParseExceptionDebug(e);
615 superclassNameImage = SYNTAX_ERROR_CHAR;
623 if (className == null) {
624 start = token.sourceStart;
625 end = token.sourceEnd;
627 start = className.sourceStart;
628 end = className.sourceEnd;
630 if (superclassNameImage == null) {
632 classDeclaration = new ClassDeclaration(currentSegment,
637 classDeclaration = new ClassDeclaration(currentSegment,
643 currentSegment.add(classDeclaration);
644 currentSegment = classDeclaration;
645 ClassBody(classDeclaration);
646 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
647 classDeclaration.sourceEnd = SimpleCharStream.getPosition();
648 pushOnAstNodes(classDeclaration);
649 {if (true) return classDeclaration;}
650 throw new Error("Missing return statement in function");
653 static final public void ClassBody(final ClassDeclaration classDeclaration) throws ParseException {
655 jj_consume_token(LBRACE);
656 } catch (ParseException e) {
657 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "'. '{' expected";
659 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
660 errorEnd = SimpleCharStream.getPosition() + 1;
661 processParseExceptionDebug(e);
665 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
674 ClassBodyDeclaration(classDeclaration);
677 jj_consume_token(RBRACE);
678 } catch (ParseException e) {
679 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. 'var', 'function' or '}' expected";
681 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
682 errorEnd = SimpleCharStream.getPosition() + 1;
683 processParseExceptionDebug(e);
688 * A class can contain only methods and fields.
690 static final public void ClassBodyDeclaration(final ClassDeclaration classDeclaration) throws ParseException {
691 final MethodDeclaration method;
692 final FieldDeclaration field;
693 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
695 method = MethodDeclaration();
696 method.analyzeCode();
697 classDeclaration.addMethod(method);
700 field = FieldDeclaration();
701 classDeclaration.addField(field);
705 jj_consume_token(-1);
706 throw new ParseException();
711 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
712 * it is only used by ClassBodyDeclaration()
714 static final public FieldDeclaration FieldDeclaration() throws ParseException {
715 VariableDeclaration variableDeclaration;
716 final VariableDeclaration[] list;
717 final ArrayList arrayList = new ArrayList();
718 final int pos = SimpleCharStream.getPosition();
721 token = jj_consume_token(VAR);
722 variableDeclaration = VariableDeclaratorNoSuffix();
723 arrayList.add(variableDeclaration);
724 outlineInfo.addVariable(variableDeclaration.name());
727 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
735 jj_consume_token(COMMA);
736 variableDeclaration = VariableDeclaratorNoSuffix();
737 arrayList.add(variableDeclaration);
738 outlineInfo.addVariable(variableDeclaration.name());
741 token2 = jj_consume_token(SEMICOLON);
742 } catch (ParseException e) {
743 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
745 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
746 errorEnd = SimpleCharStream.getPosition() + 1;
747 processParseExceptionDebug(e);
749 list = new VariableDeclaration[arrayList.size()];
750 arrayList.toArray(list);
752 if (token2 == null) {
753 end = list[list.length-1].sourceEnd;
755 end = token2.sourceEnd;
757 {if (true) return new FieldDeclaration(list,
761 throw new Error("Missing return statement in function");
765 * a strict variable declarator : there cannot be a suffix here.
766 * It will be used by fields and formal parameters
768 static final public VariableDeclaration VariableDeclaratorNoSuffix() throws ParseException {
770 Expression initializer = null;
771 varName = jj_consume_token(DOLLAR_ID);
772 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
774 jj_consume_token(ASSIGN);
776 initializer = VariableInitializer();
777 } catch (ParseException e) {
778 errorMessage = "Literal expression expected in variable initializer";
780 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
781 errorEnd = SimpleCharStream.getPosition() + 1;
782 processParseExceptionDebug(e);
789 if (initializer == null) {
790 {if (true) return new VariableDeclaration(currentSegment,
791 new Variable(varName.image.substring(1),
797 {if (true) return new VariableDeclaration(currentSegment,
798 new Variable(varName.image.substring(1),
802 VariableDeclaration.EQUAL,
803 varName.sourceStart);}
804 throw new Error("Missing return statement in function");
808 * this will be used by static statement
810 static final public VariableDeclaration VariableDeclarator() throws ParseException {
811 final AbstractVariable variable;
812 Expression initializer = null;
813 variable = VariableDeclaratorId();
814 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
816 jj_consume_token(ASSIGN);
818 initializer = VariableInitializer();
819 } catch (ParseException e) {
820 errorMessage = "Literal expression expected in variable initializer";
822 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
823 errorEnd = SimpleCharStream.getPosition() + 1;
824 processParseExceptionDebug(e);
831 if (initializer == null) {
832 {if (true) return new VariableDeclaration(currentSegment,
834 variable.sourceStart,
835 variable.sourceEnd);}
837 {if (true) return new VariableDeclaration(currentSegment,
840 VariableDeclaration.EQUAL,
841 variable.sourceStart);}
842 throw new Error("Missing return statement in function");
847 * @return the variable name (with suffix)
849 static final public AbstractVariable VariableDeclaratorId() throws ParseException {
851 AbstractVariable expression = null;
852 final int pos = SimpleCharStream.getPosition();
862 expression = VariableSuffix(var);
864 if (expression == null) {
865 {if (true) return var;}
867 {if (true) return expression;}
868 } catch (ParseException e) {
869 errorMessage = "'$' expected for variable identifier";
871 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
872 errorEnd = SimpleCharStream.getPosition() + 1;
875 throw new Error("Missing return statement in function");
879 * Return a variablename without the $.
880 * @return a variable name
884 final StringBuffer buff;
885 Expression expression = null;
892 [<LBRACE> expression = Expression() <RBRACE>]
894 if (expression == null) {
895 return new Variable(token.image.substring(1),
899 String s = expression.toStringExpression();
900 buff = new StringBuffer(token.image.length()+s.length()+2);
901 buff.append(token.image);
906 return new Variable(s,token.sourceStart,token.sourceEnd);
910 expr = VariableName()
911 {return new Variable(expr,token.sourceStart,expr.sourceEnd);}
913 static final public Variable Variable() throws ParseException {
914 Variable variable = null;
916 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
918 token = jj_consume_token(DOLLAR_ID);
919 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
924 variable = Var(token);
930 if (variable == null) {
931 {if (true) return new Variable(token.image.substring(1),token.sourceStart,token.sourceEnd);}
933 final StringBuffer buff = new StringBuffer();
934 buff.append(token.image.substring(1));
935 buff.append(variable.toStringExpression());
936 {if (true) return new Variable(buff.toString(),token.sourceStart,variable.sourceEnd);}
939 token = jj_consume_token(DOLLAR);
940 variable = Var(token);
941 {if (true) return new Variable(variable,token.sourceStart,variable.sourceEnd);}
945 jj_consume_token(-1);
946 throw new ParseException();
948 throw new Error("Missing return statement in function");
951 static final public Variable Var(final Token dollar) throws ParseException {
952 Variable variable = null;
954 ConstantIdentifier constant;
955 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
957 token = jj_consume_token(DOLLAR_ID);
958 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
963 variable = Var(token);
969 if (variable == null) {
970 {if (true) return new Variable(token.image.substring(1),token.sourceStart,token.sourceEnd);}
972 final StringBuffer buff = new StringBuffer();
973 buff.append(token.image.substring(1));
974 buff.append(variable.toStringExpression());
975 {if (true) return new Variable(buff.toString(),dollar.sourceStart,variable.sourceEnd);}
979 if (jj_2_2(2147483647)) {
980 token = jj_consume_token(DOLLAR);
981 variable = Var(token);
982 {if (true) return new Variable(variable,dollar.sourceStart,variable.sourceEnd);}
984 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
987 constant = VariableName();
988 {if (true) return new Variable(constant.name,dollar.sourceStart,constant.sourceEnd);}
992 jj_consume_token(-1);
993 throw new ParseException();
997 throw new Error("Missing return statement in function");
1001 * A Variable name (without the $)
1002 * @return a variable name String
1004 static final public ConstantIdentifier VariableName() throws ParseException {
1005 final StringBuffer buff;
1008 Expression expression = null;
1010 Token token2 = null;
1012 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1014 token = jj_consume_token(LBRACE);
1015 expression = Expression();
1016 token2 = jj_consume_token(RBRACE);
1017 expr = expression.toStringExpression();
1018 buff = new StringBuffer(expr.length()+2);
1022 pos = SimpleCharStream.getPosition();
1023 expr = buff.toString();
1024 {if (true) return new ConstantIdentifier(expr,
1029 token = jj_consume_token(IDENTIFIER);
1030 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1032 jj_consume_token(LBRACE);
1033 expression = Expression();
1034 token2 = jj_consume_token(RBRACE);
1037 jj_la1[17] = jj_gen;
1040 if (expression == null) {
1041 {if (true) return new ConstantIdentifier(token.image,
1045 expr = expression.toStringExpression();
1046 buff = new StringBuffer(token.image.length()+expr.length()+2);
1047 buff.append(token.image);
1051 expr = buff.toString();
1052 {if (true) return new ConstantIdentifier(expr,
1057 jj_la1[18] = jj_gen;
1058 jj_consume_token(-1);
1059 throw new ParseException();
1061 throw new Error("Missing return statement in function");
1064 static final public Expression VariableInitializer() throws ParseException {
1065 final Expression expr;
1066 final Token token, token2;
1067 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1071 case INTEGER_LITERAL:
1072 case FLOATING_POINT_LITERAL:
1073 case STRING_LITERAL:
1075 {if (true) return expr;}
1078 token2 = jj_consume_token(MINUS);
1079 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1080 case INTEGER_LITERAL:
1081 token = jj_consume_token(INTEGER_LITERAL);
1083 case FLOATING_POINT_LITERAL:
1084 token = jj_consume_token(FLOATING_POINT_LITERAL);
1087 jj_la1[19] = jj_gen;
1088 jj_consume_token(-1);
1089 throw new ParseException();
1091 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
1093 token2.sourceStart);}
1096 token2 = jj_consume_token(PLUS);
1097 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1098 case INTEGER_LITERAL:
1099 token = jj_consume_token(INTEGER_LITERAL);
1101 case FLOATING_POINT_LITERAL:
1102 token = jj_consume_token(FLOATING_POINT_LITERAL);
1105 jj_la1[20] = jj_gen;
1106 jj_consume_token(-1);
1107 throw new ParseException();
1109 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
1111 token2.sourceStart);}
1114 expr = ArrayDeclarator();
1115 {if (true) return expr;}
1118 token = jj_consume_token(IDENTIFIER);
1119 {if (true) return new ConstantIdentifier(token);}
1122 jj_la1[21] = jj_gen;
1123 jj_consume_token(-1);
1124 throw new ParseException();
1126 throw new Error("Missing return statement in function");
1129 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
1130 final Expression expr,expr2;
1131 expr = Expression();
1132 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1134 jj_consume_token(ARRAYASSIGN);
1135 expr2 = Expression();
1136 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
1139 jj_la1[22] = jj_gen;
1142 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
1143 throw new Error("Missing return statement in function");
1146 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
1147 ArrayVariableDeclaration expr;
1148 final ArrayList list = new ArrayList();
1149 jj_consume_token(LPAREN);
1150 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1166 case INTEGER_LITERAL:
1167 case FLOATING_POINT_LITERAL:
1168 case STRING_LITERAL:
1172 expr = ArrayVariable();
1181 jj_consume_token(COMMA);
1182 expr = ArrayVariable();
1187 jj_la1[23] = jj_gen;
1190 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1192 jj_consume_token(COMMA);
1196 jj_la1[24] = jj_gen;
1199 jj_consume_token(RPAREN);
1200 final ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1202 {if (true) return vars;}
1203 throw new Error("Missing return statement in function");
1207 * A Method Declaration.
1208 * <b>function</b> MetodDeclarator() Block()
1210 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1211 final MethodDeclaration functionDeclaration;
1213 final OutlineableWithChildren seg = currentSegment;
1215 token = jj_consume_token(FUNCTION);
1217 functionDeclaration = MethodDeclarator(token.sourceStart);
1218 outlineInfo.addVariable(new String(functionDeclaration.name));
1219 } catch (ParseException e) {
1220 if (errorMessage != null) {if (true) throw e;}
1221 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1223 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1224 errorEnd = SimpleCharStream.getPosition() + 1;
1225 {if (true) throw e;}
1227 currentSegment = functionDeclaration;
1229 functionDeclaration.statements = block.statements;
1230 currentSegment = seg;
1231 {if (true) return functionDeclaration;}
1232 throw new Error("Missing return statement in function");
1236 * A MethodDeclarator.
1237 * [&] IDENTIFIER(parameters ...).
1238 * @return a function description for the outline
1240 static final public MethodDeclaration MethodDeclarator(final int start) throws ParseException {
1241 Token identifier = null;
1242 Token reference = null;
1243 final Hashtable formalParameters = new Hashtable();
1244 String identifierChar = SYNTAX_ERROR_CHAR;
1246 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1248 reference = jj_consume_token(BIT_AND);
1251 jj_la1[25] = jj_gen;
1255 identifier = jj_consume_token(IDENTIFIER);
1256 identifierChar = identifier.image;
1257 } catch (ParseException e) {
1258 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1260 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1261 errorEnd = SimpleCharStream.getPosition() + 1;
1262 processParseExceptionDebug(e);
1264 end = FormalParameters(formalParameters);
1265 int nameStart, nameEnd;
1266 if (identifier == null) {
1267 if (reference == null) {
1268 nameStart = start + 9;
1269 nameEnd = start + 10;
1271 nameStart = reference.sourceEnd + 1;
1272 nameEnd = reference.sourceEnd + 2;
1275 nameStart = identifier.sourceStart;
1276 nameEnd = identifier.sourceEnd;
1278 {if (true) return new MethodDeclaration(currentSegment,
1286 throw new Error("Missing return statement in function");
1290 * FormalParameters follows method identifier.
1291 * (FormalParameter())
1293 static final public int FormalParameters(final Hashtable parameters) throws ParseException {
1294 VariableDeclaration var;
1298 jj_consume_token(LPAREN);
1299 } catch (ParseException e) {
1300 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1302 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1303 errorEnd = SimpleCharStream.getPosition() + 1;
1304 processParseExceptionDebug(e);
1306 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1309 var = FormalParameter();
1310 parameters.put(new String(var.name()),var);
1313 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1318 jj_la1[26] = jj_gen;
1321 jj_consume_token(COMMA);
1322 var = FormalParameter();
1323 parameters.put(new String(var.name()),var);
1327 jj_la1[27] = jj_gen;
1331 token = jj_consume_token(RPAREN);
1332 end = token.sourceEnd;
1333 } catch (ParseException e) {
1334 errorMessage = "')' expected";
1336 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1337 errorEnd = SimpleCharStream.getPosition() + 1;
1338 processParseExceptionDebug(e);
1339 end = e.currentToken.sourceStart;
1341 {if (true) return end;}
1342 throw new Error("Missing return statement in function");
1346 * A formal parameter.
1347 * $varname[=value] (,$varname[=value])
1349 static final public VariableDeclaration FormalParameter() throws ParseException {
1350 final VariableDeclaration variableDeclaration;
1352 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1354 token = jj_consume_token(BIT_AND);
1357 jj_la1[28] = jj_gen;
1360 variableDeclaration = VariableDeclaratorNoSuffix();
1361 if (token != null) {
1362 variableDeclaration.setReference(true);
1364 {if (true) return variableDeclaration;}
1365 throw new Error("Missing return statement in function");
1368 static final public ConstantIdentifier Type() throws ParseException {
1370 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1372 token = jj_consume_token(STRING);
1373 {if (true) return new ConstantIdentifier(token);}
1376 token = jj_consume_token(BOOL);
1377 {if (true) return new ConstantIdentifier(token);}
1380 token = jj_consume_token(BOOLEAN);
1381 {if (true) return new ConstantIdentifier(token);}
1384 token = jj_consume_token(REAL);
1385 {if (true) return new ConstantIdentifier(token);}
1388 token = jj_consume_token(DOUBLE);
1389 {if (true) return new ConstantIdentifier(token);}
1392 token = jj_consume_token(FLOAT);
1393 {if (true) return new ConstantIdentifier(token);}
1396 token = jj_consume_token(INT);
1397 {if (true) return new ConstantIdentifier(token);}
1400 token = jj_consume_token(INTEGER);
1401 {if (true) return new ConstantIdentifier(token);}
1404 token = jj_consume_token(OBJECT);
1405 {if (true) return new ConstantIdentifier(token);}
1408 jj_la1[29] = jj_gen;
1409 jj_consume_token(-1);
1410 throw new ParseException();
1412 throw new Error("Missing return statement in function");
1415 static final public Expression Expression() throws ParseException {
1416 final Expression expr;
1417 Expression initializer = null;
1418 int assignOperator = -1;
1419 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1433 case INTEGER_LITERAL:
1434 case FLOATING_POINT_LITERAL:
1435 case STRING_LITERAL:
1439 expr = ConditionalExpression();
1440 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1453 case RSIGNEDSHIFTASSIGN:
1454 assignOperator = AssignmentOperator();
1456 initializer = Expression();
1457 } catch (ParseException e) {
1458 if (errorMessage != null) {
1459 {if (true) throw e;}
1461 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1463 errorEnd = SimpleCharStream.getPosition();
1464 {if (true) throw e;}
1468 jj_la1[30] = jj_gen;
1471 if (assignOperator != -1) {// todo : change this, very very bad :(
1472 if (expr instanceof AbstractVariable) {
1473 {if (true) return new VariableDeclaration(currentSegment,
1474 (AbstractVariable) expr,
1477 initializer.sourceEnd);}
1479 String varName = expr.toStringExpression().substring(1);
1480 {if (true) return new VariableDeclaration(currentSegment,
1481 new Variable(varName,
1485 initializer.sourceEnd);}
1487 {if (true) return expr;}
1491 expr = ExpressionWBang();
1492 {if (true) return expr;}
1495 jj_la1[31] = jj_gen;
1496 jj_consume_token(-1);
1497 throw new ParseException();
1499 throw new Error("Missing return statement in function");
1502 static final public Expression ExpressionWBang() throws ParseException {
1503 final Expression expr;
1505 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1507 token = jj_consume_token(BANG);
1508 expr = ExpressionWBang();
1509 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
1513 expr = ExpressionNoBang();
1514 {if (true) return expr;}
1517 jj_la1[32] = jj_gen;
1518 jj_consume_token(-1);
1519 throw new ParseException();
1521 throw new Error("Missing return statement in function");
1524 static final public Expression ExpressionNoBang() throws ParseException {
1526 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1528 expr = ListExpression();
1529 {if (true) return expr;}
1532 expr = PrintExpression();
1533 {if (true) return expr;}
1536 jj_la1[33] = jj_gen;
1537 jj_consume_token(-1);
1538 throw new ParseException();
1540 throw new Error("Missing return statement in function");
1544 * Any assignement operator.
1545 * @return the assignement operator id
1547 static final public int AssignmentOperator() throws ParseException {
1548 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1550 jj_consume_token(ASSIGN);
1551 {if (true) return VariableDeclaration.EQUAL;}
1554 jj_consume_token(STARASSIGN);
1555 {if (true) return VariableDeclaration.STAR_EQUAL;}
1558 jj_consume_token(SLASHASSIGN);
1559 {if (true) return VariableDeclaration.SLASH_EQUAL;}
1562 jj_consume_token(REMASSIGN);
1563 {if (true) return VariableDeclaration.REM_EQUAL;}
1566 jj_consume_token(PLUSASSIGN);
1567 {if (true) return VariableDeclaration.PLUS_EQUAL;}
1570 jj_consume_token(MINUSASSIGN);
1571 {if (true) return VariableDeclaration.MINUS_EQUAL;}
1574 jj_consume_token(LSHIFTASSIGN);
1575 {if (true) return VariableDeclaration.LSHIFT_EQUAL;}
1577 case RSIGNEDSHIFTASSIGN:
1578 jj_consume_token(RSIGNEDSHIFTASSIGN);
1579 {if (true) return VariableDeclaration.RSIGNEDSHIFT_EQUAL;}
1582 jj_consume_token(ANDASSIGN);
1583 {if (true) return VariableDeclaration.AND_EQUAL;}
1586 jj_consume_token(XORASSIGN);
1587 {if (true) return VariableDeclaration.XOR_EQUAL;}
1590 jj_consume_token(ORASSIGN);
1591 {if (true) return VariableDeclaration.OR_EQUAL;}
1594 jj_consume_token(DOTASSIGN);
1595 {if (true) return VariableDeclaration.DOT_EQUAL;}
1598 jj_consume_token(TILDEEQUAL);
1599 {if (true) return VariableDeclaration.TILDE_EQUAL;}
1602 jj_la1[34] = jj_gen;
1603 jj_consume_token(-1);
1604 throw new ParseException();
1606 throw new Error("Missing return statement in function");
1609 static final public Expression ConditionalExpression() throws ParseException {
1610 final Expression expr;
1611 Expression expr2 = null;
1612 Expression expr3 = null;
1613 expr = ConditionalOrExpression();
1614 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1616 jj_consume_token(HOOK);
1617 expr2 = Expression();
1618 jj_consume_token(COLON);
1619 expr3 = ConditionalExpression();
1622 jj_la1[35] = jj_gen;
1625 if (expr3 == null) {
1626 {if (true) return expr;}
1628 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1629 throw new Error("Missing return statement in function");
1632 static final public Expression ConditionalOrExpression() throws ParseException {
1633 Expression expr,expr2;
1635 expr = ConditionalAndExpression();
1638 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1644 jj_la1[36] = jj_gen;
1647 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1649 jj_consume_token(OR_OR);
1650 operator = OperatorIds.OR_OR;
1653 jj_consume_token(_ORL);
1654 operator = OperatorIds.ORL;
1657 jj_la1[37] = jj_gen;
1658 jj_consume_token(-1);
1659 throw new ParseException();
1661 expr2 = ConditionalAndExpression();
1662 expr = new BinaryExpression(expr,expr2,operator);
1664 {if (true) return expr;}
1665 throw new Error("Missing return statement in function");
1668 static final public Expression ConditionalAndExpression() throws ParseException {
1669 Expression expr,expr2;
1671 expr = ConcatExpression();
1674 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1680 jj_la1[38] = jj_gen;
1683 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1685 jj_consume_token(AND_AND);
1686 operator = OperatorIds.AND_AND;
1689 jj_consume_token(_ANDL);
1690 operator = OperatorIds.ANDL;
1693 jj_la1[39] = jj_gen;
1694 jj_consume_token(-1);
1695 throw new ParseException();
1697 expr2 = ConcatExpression();
1698 expr = new BinaryExpression(expr,expr2,operator);
1700 {if (true) return expr;}
1701 throw new Error("Missing return statement in function");
1704 static final public Expression ConcatExpression() throws ParseException {
1705 Expression expr,expr2;
1706 expr = InclusiveOrExpression();
1709 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1714 jj_la1[40] = jj_gen;
1717 jj_consume_token(DOT);
1718 expr2 = InclusiveOrExpression();
1719 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1721 {if (true) return expr;}
1722 throw new Error("Missing return statement in function");
1725 static final public Expression InclusiveOrExpression() throws ParseException {
1726 Expression expr,expr2;
1727 expr = ExclusiveOrExpression();
1730 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1735 jj_la1[41] = jj_gen;
1738 jj_consume_token(BIT_OR);
1739 expr2 = ExclusiveOrExpression();
1740 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1742 {if (true) return expr;}
1743 throw new Error("Missing return statement in function");
1746 static final public Expression ExclusiveOrExpression() throws ParseException {
1747 Expression expr,expr2;
1748 expr = AndExpression();
1751 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1756 jj_la1[42] = jj_gen;
1759 jj_consume_token(XOR);
1760 expr2 = AndExpression();
1761 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1763 {if (true) return expr;}
1764 throw new Error("Missing return statement in function");
1767 static final public Expression AndExpression() throws ParseException {
1768 Expression expr,expr2;
1769 expr = EqualityExpression();
1772 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1777 jj_la1[43] = jj_gen;
1780 jj_consume_token(BIT_AND);
1781 expr2 = EqualityExpression();
1782 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1784 {if (true) return expr;}
1785 throw new Error("Missing return statement in function");
1788 static final public Expression EqualityExpression() throws ParseException {
1789 Expression expr,expr2;
1791 expr = RelationalExpression();
1794 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1798 case BANGDOUBLEEQUAL:
1803 jj_la1[44] = jj_gen;
1806 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1808 jj_consume_token(EQUAL_EQUAL);
1809 operator = OperatorIds.EQUAL_EQUAL;
1812 jj_consume_token(DIF);
1813 operator = OperatorIds.DIF;
1816 jj_consume_token(NOT_EQUAL);
1817 operator = OperatorIds.DIF;
1819 case BANGDOUBLEEQUAL:
1820 jj_consume_token(BANGDOUBLEEQUAL);
1821 operator = OperatorIds.BANG_EQUAL_EQUAL;
1824 jj_consume_token(TRIPLEEQUAL);
1825 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1828 jj_la1[45] = jj_gen;
1829 jj_consume_token(-1);
1830 throw new ParseException();
1833 expr2 = RelationalExpression();
1834 } catch (ParseException e) {
1835 if (errorMessage != null) {
1836 {if (true) throw e;}
1838 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1840 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1841 errorEnd = SimpleCharStream.getPosition() + 1;
1842 {if (true) throw e;}
1844 expr = new BinaryExpression(expr,expr2,operator);
1846 {if (true) return expr;}
1847 throw new Error("Missing return statement in function");
1850 static final public Expression RelationalExpression() throws ParseException {
1851 Expression expr,expr2;
1853 expr = ShiftExpression();
1856 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1864 jj_la1[46] = jj_gen;
1867 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1869 jj_consume_token(LT);
1870 operator = OperatorIds.LESS;
1873 jj_consume_token(GT);
1874 operator = OperatorIds.GREATER;
1877 jj_consume_token(LE);
1878 operator = OperatorIds.LESS_EQUAL;
1881 jj_consume_token(GE);
1882 operator = OperatorIds.GREATER_EQUAL;
1885 jj_la1[47] = jj_gen;
1886 jj_consume_token(-1);
1887 throw new ParseException();
1889 expr2 = ShiftExpression();
1890 expr = new BinaryExpression(expr,expr2,operator);
1892 {if (true) return expr;}
1893 throw new Error("Missing return statement in function");
1896 static final public Expression ShiftExpression() throws ParseException {
1897 Expression expr,expr2;
1899 expr = AdditiveExpression();
1902 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1905 case RUNSIGNEDSHIFT:
1909 jj_la1[48] = jj_gen;
1912 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1914 jj_consume_token(LSHIFT);
1915 operator = OperatorIds.LEFT_SHIFT;
1918 jj_consume_token(RSIGNEDSHIFT);
1919 operator = OperatorIds.RIGHT_SHIFT;
1921 case RUNSIGNEDSHIFT:
1922 jj_consume_token(RUNSIGNEDSHIFT);
1923 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1926 jj_la1[49] = jj_gen;
1927 jj_consume_token(-1);
1928 throw new ParseException();
1930 expr2 = AdditiveExpression();
1931 expr = new BinaryExpression(expr,expr2,operator);
1933 {if (true) return expr;}
1934 throw new Error("Missing return statement in function");
1937 static final public Expression AdditiveExpression() throws ParseException {
1938 Expression expr,expr2;
1940 expr = MultiplicativeExpression();
1943 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1949 jj_la1[50] = jj_gen;
1952 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1954 jj_consume_token(PLUS);
1955 operator = OperatorIds.PLUS;
1958 jj_consume_token(MINUS);
1959 operator = OperatorIds.MINUS;
1962 jj_la1[51] = jj_gen;
1963 jj_consume_token(-1);
1964 throw new ParseException();
1966 expr2 = MultiplicativeExpression();
1967 expr = new BinaryExpression(expr,expr2,operator);
1969 {if (true) return expr;}
1970 throw new Error("Missing return statement in function");
1973 static final public Expression MultiplicativeExpression() throws ParseException {
1974 Expression expr,expr2;
1977 expr = UnaryExpression();
1978 } catch (ParseException e) {
1979 if (errorMessage != null) {if (true) throw e;}
1980 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1982 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1983 errorEnd = SimpleCharStream.getPosition() + 1;
1984 {if (true) throw e;}
1988 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1995 jj_la1[52] = jj_gen;
1998 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2000 jj_consume_token(STAR);
2001 operator = OperatorIds.MULTIPLY;
2004 jj_consume_token(SLASH);
2005 operator = OperatorIds.DIVIDE;
2008 jj_consume_token(REMAINDER);
2009 operator = OperatorIds.REMAINDER;
2012 jj_la1[53] = jj_gen;
2013 jj_consume_token(-1);
2014 throw new ParseException();
2016 expr2 = UnaryExpression();
2017 expr = new BinaryExpression(expr,expr2,operator);
2019 {if (true) return expr;}
2020 throw new Error("Missing return statement in function");
2024 * An unary expression starting with @, & or nothing
2026 static final public Expression UnaryExpression() throws ParseException {
2027 final Expression expr;
2028 /* <BIT_AND> expr = UnaryExpressionNoPrefix() //why did I had that ?
2029 {return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
2031 expr = AtNotUnaryExpression();
2032 {if (true) return expr;}
2033 throw new Error("Missing return statement in function");
2037 * An expression prefixed (or not) by one or more @ and !.
2038 * @return the expression
2040 static final public Expression AtNotUnaryExpression() throws ParseException {
2041 final Expression expr;
2043 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2045 token = jj_consume_token(AT);
2046 expr = AtNotUnaryExpression();
2047 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,token.sourceStart);}
2050 token = jj_consume_token(BANG);
2051 expr = AtNotUnaryExpression();
2052 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
2065 case INTEGER_LITERAL:
2066 case FLOATING_POINT_LITERAL:
2067 case STRING_LITERAL:
2071 expr = UnaryExpressionNoPrefix();
2072 {if (true) return expr;}
2075 jj_la1[54] = jj_gen;
2076 jj_consume_token(-1);
2077 throw new ParseException();
2079 throw new Error("Missing return statement in function");
2082 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
2083 final Expression expr;
2085 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2087 token = jj_consume_token(PLUS);
2088 expr = AtNotUnaryExpression();
2089 {if (true) return new PrefixedUnaryExpression(expr,
2091 token.sourceStart);}
2094 token = jj_consume_token(MINUS);
2095 expr = AtNotUnaryExpression();
2096 {if (true) return new PrefixedUnaryExpression(expr,
2098 token.sourceStart);}
2102 expr = PreIncDecExpression();
2103 {if (true) return expr;}
2112 case INTEGER_LITERAL:
2113 case FLOATING_POINT_LITERAL:
2114 case STRING_LITERAL:
2118 expr = UnaryExpressionNotPlusMinus();
2119 {if (true) return expr;}
2122 jj_la1[55] = jj_gen;
2123 jj_consume_token(-1);
2124 throw new ParseException();
2126 throw new Error("Missing return statement in function");
2129 static final public Expression PreIncDecExpression() throws ParseException {
2130 final Expression expr;
2133 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2135 token = jj_consume_token(PLUS_PLUS);
2136 operator = OperatorIds.PLUS_PLUS;
2139 token = jj_consume_token(MINUS_MINUS);
2140 operator = OperatorIds.MINUS_MINUS;
2143 jj_la1[56] = jj_gen;
2144 jj_consume_token(-1);
2145 throw new ParseException();
2147 expr = PrimaryExpression();
2148 {if (true) return new PrefixedUnaryExpression(expr,operator,token.sourceStart);}
2149 throw new Error("Missing return statement in function");
2152 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
2153 final Expression expr;
2154 if (jj_2_4(2147483647)) {
2155 expr = CastExpression();
2156 {if (true) return expr;}
2158 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2165 expr = PostfixExpression();
2166 {if (true) return expr;}
2171 case INTEGER_LITERAL:
2172 case FLOATING_POINT_LITERAL:
2173 case STRING_LITERAL:
2175 {if (true) return expr;}
2178 jj_consume_token(LPAREN);
2179 expr = Expression();
2181 jj_consume_token(RPAREN);
2182 } catch (ParseException e) {
2183 errorMessage = "')' expected";
2185 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2186 errorEnd = SimpleCharStream.getPosition() + 1;
2187 {if (true) throw e;}
2189 {if (true) return expr;}
2192 jj_la1[57] = jj_gen;
2193 jj_consume_token(-1);
2194 throw new ParseException();
2197 throw new Error("Missing return statement in function");
2200 static final public CastExpression CastExpression() throws ParseException {
2201 final ConstantIdentifier type;
2202 final Expression expr;
2203 final Token token,token1;
2204 token1 = jj_consume_token(LPAREN);
2205 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2218 token = jj_consume_token(ARRAY);
2219 type = new ConstantIdentifier(token);
2222 jj_la1[58] = jj_gen;
2223 jj_consume_token(-1);
2224 throw new ParseException();
2226 jj_consume_token(RPAREN);
2227 expr = UnaryExpression();
2228 {if (true) return new CastExpression(type,expr,token1.sourceStart,expr.sourceEnd);}
2229 throw new Error("Missing return statement in function");
2232 static final public Expression PostfixExpression() throws ParseException {
2233 final Expression expr;
2236 expr = PrimaryExpression();
2237 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2240 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2242 token = jj_consume_token(PLUS_PLUS);
2243 operator = OperatorIds.PLUS_PLUS;
2246 token = jj_consume_token(MINUS_MINUS);
2247 operator = OperatorIds.MINUS_MINUS;
2250 jj_la1[59] = jj_gen;
2251 jj_consume_token(-1);
2252 throw new ParseException();
2256 jj_la1[60] = jj_gen;
2259 if (operator == -1) {
2260 {if (true) return expr;}
2262 {if (true) return new PostfixedUnaryExpression(expr,operator,token.sourceEnd);}
2263 throw new Error("Missing return statement in function");
2266 static final public Expression PrimaryExpression() throws ParseException {
2267 Expression expr = null;
2269 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2275 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2277 token = jj_consume_token(BIT_AND);
2280 jj_la1[61] = jj_gen;
2283 expr = refPrimaryExpression(token);
2284 {if (true) return expr;}
2287 expr = ArrayDeclarator();
2288 {if (true) return expr;}
2291 jj_la1[62] = jj_gen;
2292 jj_consume_token(-1);
2293 throw new ParseException();
2295 throw new Error("Missing return statement in function");
2298 static final public Expression refPrimaryExpression(final Token reference) throws ParseException {
2299 Expression expr = null;
2300 Expression expr2 = null;
2301 int assignOperator = -1;
2302 final Token identifier;
2304 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2306 identifier = jj_consume_token(IDENTIFIER);
2307 expr = new ConstantIdentifier(identifier);
2310 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2311 case STATICCLASSACCESS:
2315 jj_la1[63] = jj_gen;
2318 jj_consume_token(STATICCLASSACCESS);
2319 expr2 = ClassIdentifier();
2320 expr = new ClassAccess(expr,
2322 ClassAccess.STATIC);
2324 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2326 expr2 = Arguments(expr);
2329 jj_la1[64] = jj_gen;
2332 if (expr2 == null) {
2333 if (reference != null) {
2334 ParseException e = generateParseException();
2335 errorMessage = "you cannot use a constant by reference";
2337 errorStart = reference.sourceStart;
2338 errorEnd = reference.sourceEnd;
2339 processParseExceptionDebug(e);
2341 {if (true) return expr;}
2343 {if (true) return expr2;}
2347 expr = VariableDeclaratorId();
2348 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2350 expr = Arguments(expr);
2353 jj_la1[65] = jj_gen;
2356 {if (true) return expr;}
2359 token = jj_consume_token(NEW);
2360 expr = ClassIdentifier();
2362 if (reference == null) {
2363 start = token.sourceStart;
2365 start = reference.sourceStart;
2367 expr = new ClassInstantiation(expr,
2370 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2372 expr = Arguments(expr);
2375 jj_la1[66] = jj_gen;
2378 {if (true) return expr;}
2381 jj_la1[67] = jj_gen;
2382 jj_consume_token(-1);
2383 throw new ParseException();
2385 throw new Error("Missing return statement in function");
2389 * An array declarator.
2393 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2394 final ArrayVariableDeclaration[] vars;
2396 token = jj_consume_token(ARRAY);
2397 vars = ArrayInitializer();
2398 {if (true) return new ArrayInitializer(vars,token.sourceStart,SimpleCharStream.getPosition());}
2399 throw new Error("Missing return statement in function");
2402 static final public Expression ClassIdentifier() throws ParseException {
2403 final Expression expr;
2405 final ConstantIdentifier type;
2406 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2408 token = jj_consume_token(IDENTIFIER);
2409 {if (true) return new ConstantIdentifier(token);}
2421 {if (true) return expr;}
2425 expr = VariableDeclaratorId();
2426 {if (true) return expr;}
2429 jj_la1[68] = jj_gen;
2430 jj_consume_token(-1);
2431 throw new ParseException();
2433 throw new Error("Missing return statement in function");
2437 * Used by Variabledeclaratorid and primarysuffix
2439 static final public AbstractVariable VariableSuffix(final AbstractVariable prefix) throws ParseException {
2440 Variable expr = null;
2441 final int pos = SimpleCharStream.getPosition();
2442 Expression expression = null;
2443 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2445 jj_consume_token(CLASSACCESS);
2447 expression = VariableName();
2448 } catch (ParseException e) {
2449 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2451 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2452 errorEnd = SimpleCharStream.getPosition() + 1;
2453 {if (true) throw e;}
2455 {if (true) return new ClassAccess(prefix,
2457 ClassAccess.NORMAL);}
2460 jj_consume_token(LBRACKET);
2461 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2486 case INTEGER_LITERAL:
2487 case FLOATING_POINT_LITERAL:
2488 case STRING_LITERAL:
2492 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2508 case INTEGER_LITERAL:
2509 case FLOATING_POINT_LITERAL:
2510 case STRING_LITERAL:
2514 expression = Expression();
2525 expression = Type();
2528 jj_la1[69] = jj_gen;
2529 jj_consume_token(-1);
2530 throw new ParseException();
2534 jj_la1[70] = jj_gen;
2538 jj_consume_token(RBRACKET);
2539 } catch (ParseException e) {
2540 errorMessage = "']' expected";
2542 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2543 errorEnd = SimpleCharStream.getPosition() + 1;
2544 {if (true) throw e;}
2546 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2549 jj_la1[71] = jj_gen;
2550 jj_consume_token(-1);
2551 throw new ParseException();
2553 throw new Error("Missing return statement in function");
2556 static final public Literal Literal() throws ParseException {
2558 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2559 case INTEGER_LITERAL:
2560 token = jj_consume_token(INTEGER_LITERAL);
2561 {if (true) return new NumberLiteral(token);}
2563 case FLOATING_POINT_LITERAL:
2564 token = jj_consume_token(FLOATING_POINT_LITERAL);
2565 {if (true) return new NumberLiteral(token);}
2567 case STRING_LITERAL:
2568 token = jj_consume_token(STRING_LITERAL);
2569 {if (true) return new StringLiteral(token);}
2572 token = jj_consume_token(TRUE);
2573 {if (true) return new TrueLiteral(token);}
2576 token = jj_consume_token(FALSE);
2577 {if (true) return new FalseLiteral(token);}
2580 token = jj_consume_token(NULL);
2581 {if (true) return new NullLiteral(token);}
2584 jj_la1[72] = jj_gen;
2585 jj_consume_token(-1);
2586 throw new ParseException();
2588 throw new Error("Missing return statement in function");
2591 static final public FunctionCall Arguments(final Expression func) throws ParseException {
2592 Expression[] args = null;
2594 jj_consume_token(LPAREN);
2595 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2611 case INTEGER_LITERAL:
2612 case FLOATING_POINT_LITERAL:
2613 case STRING_LITERAL:
2617 args = ArgumentList();
2620 jj_la1[73] = jj_gen;
2624 token = jj_consume_token(RPAREN);
2625 } catch (ParseException e) {
2626 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2628 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2629 errorEnd = SimpleCharStream.getPosition() + 1;
2630 {if (true) throw e;}
2632 {if (true) return new FunctionCall(func,args,token.sourceEnd);}
2633 throw new Error("Missing return statement in function");
2637 * An argument list is a list of arguments separated by comma :
2638 * argumentDeclaration() (, argumentDeclaration)*
2639 * @return an array of arguments
2641 static final public Expression[] ArgumentList() throws ParseException {
2643 final ArrayList list = new ArrayList();
2648 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2653 jj_la1[74] = jj_gen;
2656 jj_consume_token(COMMA);
2660 } catch (ParseException e) {
2661 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2663 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2664 errorEnd = SimpleCharStream.getPosition() + 1;
2665 {if (true) throw e;}
2668 final Expression[] arguments = new Expression[list.size()];
2669 list.toArray(arguments);
2670 {if (true) return arguments;}
2671 throw new Error("Missing return statement in function");
2675 * A Statement without break.
2676 * @return a statement
2678 static final public Statement StatementNoBreak() throws ParseException {
2679 final Statement statement;
2682 statement = expressionStatement();
2683 {if (true) return statement;}
2685 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2687 statement = LabeledStatement();
2688 {if (true) return statement;}
2691 statement = Block();
2692 {if (true) return statement;}
2695 statement = EmptyStatement();
2696 {if (true) return statement;}
2699 statement = SwitchStatement();
2700 {if (true) return statement;}
2703 statement = IfStatement();
2704 {if (true) return statement;}
2707 statement = WhileStatement();
2708 {if (true) return statement;}
2711 statement = DoStatement();
2712 {if (true) return statement;}
2715 statement = ForStatement();
2716 {if (true) return statement;}
2719 statement = ForeachStatement();
2720 {if (true) return statement;}
2723 statement = ContinueStatement();
2724 {if (true) return statement;}
2727 statement = ReturnStatement();
2728 {if (true) return statement;}
2731 statement = EchoStatement();
2732 {if (true) return statement;}
2739 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2741 token = jj_consume_token(AT);
2744 jj_la1[75] = jj_gen;
2747 statement = IncludeStatement();
2748 if (token != null) {
2749 ((InclusionStatement)statement).silent = true;
2750 statement.sourceStart = token.sourceStart;
2752 {if (true) return statement;}
2755 statement = StaticStatement();
2756 {if (true) return statement;}
2759 statement = GlobalStatement();
2760 {if (true) return statement;}
2763 statement = defineStatement();
2764 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2767 jj_la1[76] = jj_gen;
2768 jj_consume_token(-1);
2769 throw new ParseException();
2772 throw new Error("Missing return statement in function");
2776 * A statement expression.
2778 * @return an expression
2780 static final public Statement expressionStatement() throws ParseException {
2781 final Statement statement;
2783 statement = Expression();
2785 token = jj_consume_token(SEMICOLON);
2786 statement.sourceEnd = token.sourceEnd;
2787 } catch (ParseException e) {
2788 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2789 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2791 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2792 errorEnd = SimpleCharStream.getPosition() + 1;
2793 {if (true) throw e;}
2796 {if (true) return statement;}
2797 throw new Error("Missing return statement in function");
2800 static final public Define defineStatement() throws ParseException {
2801 final int start = SimpleCharStream.getPosition();
2802 Expression defineName,defineValue;
2803 jj_consume_token(DEFINE);
2805 jj_consume_token(LPAREN);
2806 } catch (ParseException e) {
2807 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2809 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2810 errorEnd = SimpleCharStream.getPosition() + 1;
2811 processParseExceptionDebug(e);
2814 defineName = Expression();
2815 } catch (ParseException e) {
2816 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2818 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2819 errorEnd = SimpleCharStream.getPosition() + 1;
2820 {if (true) throw e;}
2823 jj_consume_token(COMMA);
2824 } catch (ParseException e) {
2825 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2827 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2828 errorEnd = SimpleCharStream.getPosition() + 1;
2829 processParseExceptionDebug(e);
2832 defineValue = Expression();
2833 } catch (ParseException e) {
2834 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2836 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2837 errorEnd = SimpleCharStream.getPosition() + 1;
2838 {if (true) throw e;}
2841 jj_consume_token(RPAREN);
2842 } catch (ParseException e) {
2843 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2845 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2846 errorEnd = SimpleCharStream.getPosition() + 1;
2847 processParseExceptionDebug(e);
2849 {if (true) return new Define(currentSegment,
2853 SimpleCharStream.getPosition());}
2854 throw new Error("Missing return statement in function");
2858 * A Normal statement.
2860 static final public Statement Statement() throws ParseException {
2861 final Statement statement;
2862 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2894 case INTEGER_LITERAL:
2895 case FLOATING_POINT_LITERAL:
2896 case STRING_LITERAL:
2902 statement = StatementNoBreak();
2903 {if (true) return statement;}
2906 statement = BreakStatement();
2907 {if (true) return statement;}
2910 jj_la1[77] = jj_gen;
2911 jj_consume_token(-1);
2912 throw new ParseException();
2914 throw new Error("Missing return statement in function");
2918 * An html block inside a php syntax.
2920 static final public HTMLBlock htmlBlock() throws ParseException {
2921 final int startIndex = nodePtr;
2922 final AstNode[] blockNodes;
2924 jj_consume_token(PHPEND);
2927 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2932 jj_la1[78] = jj_gen;
2938 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2940 jj_consume_token(PHPSTARTLONG);
2943 jj_consume_token(PHPSTARTSHORT);
2946 jj_la1[79] = jj_gen;
2947 jj_consume_token(-1);
2948 throw new ParseException();
2950 } catch (ParseException e) {
2951 errorMessage = "unexpected end of file , '<?php' expected";
2953 errorStart = SimpleCharStream.getPosition();
2954 errorEnd = SimpleCharStream.getPosition();
2955 {if (true) throw e;}
2957 nbNodes = nodePtr - startIndex;
2958 blockNodes = new AstNode[nbNodes];
2959 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2960 nodePtr = startIndex;
2961 {if (true) return new HTMLBlock(blockNodes);}
2962 throw new Error("Missing return statement in function");
2966 * An include statement. It's "include" an expression;
2968 static final public InclusionStatement IncludeStatement() throws ParseException {
2969 final Expression expr;
2971 final InclusionStatement inclusionStatement;
2972 final Token token, token2;
2973 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2975 token = jj_consume_token(REQUIRE);
2976 keyword = InclusionStatement.REQUIRE;
2979 token = jj_consume_token(REQUIRE_ONCE);
2980 keyword = InclusionStatement.REQUIRE_ONCE;
2983 token = jj_consume_token(INCLUDE);
2984 keyword = InclusionStatement.INCLUDE;
2987 token = jj_consume_token(INCLUDE_ONCE);
2988 keyword = InclusionStatement.INCLUDE_ONCE;
2991 jj_la1[80] = jj_gen;
2992 jj_consume_token(-1);
2993 throw new ParseException();
2996 expr = Expression();
2997 } catch (ParseException e) {
2998 if (errorMessage != null) {
2999 {if (true) throw e;}
3001 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
3003 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3004 errorEnd = SimpleCharStream.getPosition() + 1;
3005 {if (true) throw e;}
3007 inclusionStatement = new InclusionStatement(currentSegment,
3011 currentSegment.add(inclusionStatement);
3013 token2 = jj_consume_token(SEMICOLON);
3014 } catch (ParseException e) {
3015 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
3017 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3018 errorEnd = SimpleCharStream.getPosition() + 1;
3019 {if (true) throw e;}
3021 inclusionStatement.sourceEnd = token2.sourceEnd;
3022 {if (true) return inclusionStatement;}
3023 throw new Error("Missing return statement in function");
3026 static final public PrintExpression PrintExpression() throws ParseException {
3027 final Expression expr;
3028 final int pos = SimpleCharStream.getPosition();
3029 jj_consume_token(PRINT);
3030 expr = Expression();
3031 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
3032 throw new Error("Missing return statement in function");
3035 static final public ListExpression ListExpression() throws ParseException {
3036 Expression expr = null;
3037 final Expression expression;
3038 final ArrayList list = new ArrayList();
3039 final int pos = SimpleCharStream.getPosition();
3040 jj_consume_token(LIST);
3042 jj_consume_token(LPAREN);
3043 } catch (ParseException e) {
3044 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
3046 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3047 errorEnd = SimpleCharStream.getPosition() + 1;
3048 {if (true) throw e;}
3050 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3053 expr = VariableDeclaratorId();
3057 jj_la1[81] = jj_gen;
3060 if (expr == null) list.add(null);
3063 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3068 jj_la1[82] = jj_gen;
3072 jj_consume_token(COMMA);
3073 } catch (ParseException e) {
3074 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
3076 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3077 errorEnd = SimpleCharStream.getPosition() + 1;
3078 {if (true) throw e;}
3080 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3083 expr = VariableDeclaratorId();
3087 jj_la1[83] = jj_gen;
3092 jj_consume_token(RPAREN);
3093 } catch (ParseException e) {
3094 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
3096 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3097 errorEnd = SimpleCharStream.getPosition() + 1;
3098 {if (true) throw e;}
3100 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3102 jj_consume_token(ASSIGN);
3103 expression = Expression();
3104 final Variable[] vars = new Variable[list.size()];
3106 {if (true) return new ListExpression(vars,
3109 SimpleCharStream.getPosition());}
3112 jj_la1[84] = jj_gen;
3115 final Variable[] vars = new Variable[list.size()];
3117 {if (true) return new ListExpression(vars,pos,SimpleCharStream.getPosition());}
3118 throw new Error("Missing return statement in function");
3122 * An echo statement.
3123 * echo anyexpression (, otherexpression)*
3125 static final public EchoStatement EchoStatement() throws ParseException {
3126 final ArrayList expressions = new ArrayList();
3129 Token token2 = null;
3130 token = jj_consume_token(ECHO);
3131 expr = Expression();
3132 expressions.add(expr);
3135 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3140 jj_la1[85] = jj_gen;
3143 jj_consume_token(COMMA);
3144 expr = Expression();
3145 expressions.add(expr);
3148 token2 = jj_consume_token(SEMICOLON);
3149 } catch (ParseException e) {
3150 if (e.currentToken.next.kind != 4) {
3151 errorMessage = "';' expected after 'echo' statement";
3153 errorStart = e.currentToken.sourceEnd;
3154 errorEnd = e.currentToken.sourceEnd;
3155 processParseExceptionDebug(e);
3158 final Expression[] exprs = new Expression[expressions.size()];
3159 expressions.toArray(exprs);
3160 if (token2 == null) {
3161 {if (true) return new EchoStatement(exprs,token.sourceStart, exprs[exprs.length-1].sourceEnd);}
3163 {if (true) return new EchoStatement(exprs,token.sourceStart, token2.sourceEnd);}
3164 throw new Error("Missing return statement in function");
3167 static final public GlobalStatement GlobalStatement() throws ParseException {
3169 final ArrayList vars = new ArrayList();
3170 final GlobalStatement global;
3171 final Token token, token2;
3172 token = jj_consume_token(GLOBAL);
3177 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3182 jj_la1[86] = jj_gen;
3185 jj_consume_token(COMMA);
3190 token2 = jj_consume_token(SEMICOLON);
3191 final Variable[] variables = new Variable[vars.size()];
3192 vars.toArray(variables);
3193 global = new GlobalStatement(currentSegment,
3197 currentSegment.add(global);
3198 {if (true) return global;}
3199 } catch (ParseException e) {
3200 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3202 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3203 errorEnd = SimpleCharStream.getPosition() + 1;
3204 {if (true) throw e;}
3206 throw new Error("Missing return statement in function");
3209 static final public StaticStatement StaticStatement() throws ParseException {
3210 final ArrayList vars = new ArrayList();
3211 VariableDeclaration expr;
3212 final Token token, token2;
3213 token = jj_consume_token(STATIC);
3214 expr = VariableDeclarator();
3218 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3223 jj_la1[87] = jj_gen;
3226 jj_consume_token(COMMA);
3227 expr = VariableDeclarator();
3231 token2 = jj_consume_token(SEMICOLON);
3232 final VariableDeclaration[] variables = new VariableDeclaration[vars.size()];
3233 vars.toArray(variables);
3234 {if (true) return new StaticStatement(variables,
3237 } catch (ParseException e) {
3238 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3240 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3241 errorEnd = SimpleCharStream.getPosition() + 1;
3242 {if (true) throw e;}
3244 throw new Error("Missing return statement in function");
3247 static final public LabeledStatement LabeledStatement() throws ParseException {
3249 final Statement statement;
3250 label = jj_consume_token(IDENTIFIER);
3251 jj_consume_token(COLON);
3252 statement = Statement();
3253 {if (true) return new LabeledStatement(label.image,statement,label.sourceStart,statement.sourceEnd);}
3254 throw new Error("Missing return statement in function");
3264 static final public Block Block() throws ParseException {
3265 final ArrayList list = new ArrayList();
3266 Statement statement;
3267 final Token token, token2;
3269 token = jj_consume_token(LBRACE);
3270 } catch (ParseException e) {
3271 errorMessage = "'{' expected";
3273 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3274 errorEnd = SimpleCharStream.getPosition() + 1;
3275 {if (true) throw e;}
3279 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3315 case INTEGER_LITERAL:
3316 case FLOATING_POINT_LITERAL:
3317 case STRING_LITERAL:
3326 jj_la1[88] = jj_gen;
3329 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3364 case INTEGER_LITERAL:
3365 case FLOATING_POINT_LITERAL:
3366 case STRING_LITERAL:
3372 statement = BlockStatement();
3373 list.add(statement);
3376 statement = htmlBlock();
3377 list.add(statement);
3380 jj_la1[89] = jj_gen;
3381 jj_consume_token(-1);
3382 throw new ParseException();
3386 token2 = jj_consume_token(RBRACE);
3387 } catch (ParseException e) {
3388 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3390 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3391 errorEnd = SimpleCharStream.getPosition() + 1;
3392 {if (true) throw e;}
3394 final Statement[] statements = new Statement[list.size()];
3395 list.toArray(statements);
3396 {if (true) return new Block(statements,token.sourceStart,token2.sourceEnd);}
3397 throw new Error("Missing return statement in function");
3400 static final public Statement BlockStatement() throws ParseException {
3401 final Statement statement;
3402 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3435 case INTEGER_LITERAL:
3436 case FLOATING_POINT_LITERAL:
3437 case STRING_LITERAL:
3444 statement = Statement();
3445 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3446 {if (true) return statement;}
3447 } catch (ParseException e) {
3448 errorMessage = "unexpected token : '"+ e.currentToken.image +"', a statement was expected";
3450 errorStart = e.currentToken.sourceStart;
3451 errorEnd = e.currentToken.sourceEnd;
3452 {if (true) throw e;}
3456 statement = ClassDeclaration();
3457 {if (true) return statement;}
3460 statement = MethodDeclaration();
3461 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3462 currentSegment.add((MethodDeclaration) statement);
3463 ((MethodDeclaration) statement).analyzeCode();
3464 {if (true) return statement;}
3467 jj_la1[90] = jj_gen;
3468 jj_consume_token(-1);
3469 throw new ParseException();
3471 throw new Error("Missing return statement in function");
3475 * A Block statement that will not contain any 'break'
3477 static final public Statement BlockStatementNoBreak() throws ParseException {
3478 final Statement statement;
3479 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3511 case INTEGER_LITERAL:
3512 case FLOATING_POINT_LITERAL:
3513 case STRING_LITERAL:
3519 statement = StatementNoBreak();
3520 {if (true) return statement;}
3523 statement = ClassDeclaration();
3524 {if (true) return statement;}
3527 statement = MethodDeclaration();
3528 currentSegment.add((MethodDeclaration) statement);
3529 ((MethodDeclaration) statement).analyzeCode();
3530 {if (true) return statement;}
3533 jj_la1[91] = jj_gen;
3534 jj_consume_token(-1);
3535 throw new ParseException();
3537 throw new Error("Missing return statement in function");
3541 * used only by ForInit()
3543 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3544 final ArrayList list = new ArrayList();
3545 VariableDeclaration var;
3546 var = LocalVariableDeclarator();
3550 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3555 jj_la1[92] = jj_gen;
3558 jj_consume_token(COMMA);
3559 var = LocalVariableDeclarator();
3562 final VariableDeclaration[] vars = new VariableDeclaration[list.size()];
3564 {if (true) return vars;}
3565 throw new Error("Missing return statement in function");
3569 * used only by LocalVariableDeclaration().
3571 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3572 final Variable varName;
3573 Expression initializer = null;
3574 varName = Variable();
3575 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3577 jj_consume_token(ASSIGN);
3578 initializer = Expression();
3581 jj_la1[93] = jj_gen;
3584 if (initializer == null) {
3585 {if (true) return new VariableDeclaration(currentSegment,
3587 varName.sourceStart,
3588 varName.sourceEnd);}
3590 {if (true) return new VariableDeclaration(currentSegment,
3593 VariableDeclaration.EQUAL,
3594 varName.sourceStart);}
3595 throw new Error("Missing return statement in function");
3598 static final public EmptyStatement EmptyStatement() throws ParseException {
3600 token = jj_consume_token(SEMICOLON);
3601 {if (true) return new EmptyStatement(token.sourceStart,token.sourceEnd);}
3602 throw new Error("Missing return statement in function");
3606 * used only by StatementExpressionList() which is used only by ForInit() and ForStatement()
3608 static final public Expression StatementExpression() throws ParseException {
3609 final Expression expr,expr2;
3611 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3614 expr = PreIncDecExpression();
3615 {if (true) return expr;}
3623 expr = PrimaryExpression();
3624 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3627 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3629 jj_consume_token(PLUS_PLUS);
3630 {if (true) return new PostfixedUnaryExpression(expr,
3631 OperatorIds.PLUS_PLUS,
3632 SimpleCharStream.getPosition());}
3635 jj_consume_token(MINUS_MINUS);
3636 {if (true) return new PostfixedUnaryExpression(expr,
3637 OperatorIds.MINUS_MINUS,
3638 SimpleCharStream.getPosition());}
3641 jj_la1[94] = jj_gen;
3642 jj_consume_token(-1);
3643 throw new ParseException();
3647 jj_la1[95] = jj_gen;
3650 {if (true) return expr;}
3653 jj_la1[96] = jj_gen;
3654 jj_consume_token(-1);
3655 throw new ParseException();
3657 throw new Error("Missing return statement in function");
3660 static final public SwitchStatement SwitchStatement() throws ParseException {
3661 final Expression variable;
3662 final AbstractCase[] cases;
3663 final int pos = SimpleCharStream.getPosition();
3664 jj_consume_token(SWITCH);
3666 jj_consume_token(LPAREN);
3667 } catch (ParseException e) {
3668 errorMessage = "'(' expected after 'switch'";
3670 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3671 errorEnd = SimpleCharStream.getPosition() + 1;
3672 {if (true) throw e;}
3675 variable = Expression();
3676 } catch (ParseException e) {
3677 if (errorMessage != null) {
3678 {if (true) throw e;}
3680 errorMessage = "expression expected";
3682 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3683 errorEnd = SimpleCharStream.getPosition() + 1;
3684 {if (true) throw e;}
3687 jj_consume_token(RPAREN);
3688 } catch (ParseException e) {
3689 errorMessage = "')' expected";
3691 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3692 errorEnd = SimpleCharStream.getPosition() + 1;
3693 {if (true) throw e;}
3695 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3697 cases = switchStatementBrace();
3700 cases = switchStatementColon(pos, pos + 6);
3703 jj_la1[97] = jj_gen;
3704 jj_consume_token(-1);
3705 throw new ParseException();
3707 {if (true) return new SwitchStatement(variable,cases,pos,SimpleCharStream.getPosition());}
3708 throw new Error("Missing return statement in function");
3711 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3713 final ArrayList cases = new ArrayList();
3714 jj_consume_token(LBRACE);
3717 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3723 jj_la1[98] = jj_gen;
3726 cas = switchLabel0();
3730 jj_consume_token(RBRACE);
3731 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3732 cases.toArray(abcase);
3733 {if (true) return abcase;}
3734 } catch (ParseException e) {
3735 errorMessage = "'}' expected";
3737 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3738 errorEnd = SimpleCharStream.getPosition() + 1;
3739 {if (true) throw e;}
3741 throw new Error("Missing return statement in function");
3745 * A Switch statement with : ... endswitch;
3746 * @param start the begin offset of the switch
3747 * @param end the end offset of the switch
3749 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3751 final ArrayList cases = new ArrayList();
3752 jj_consume_token(COLON);
3754 setMarker(fileToParse,
3755 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3759 "Line " + token.beginLine);
3760 } catch (CoreException e) {
3761 PHPeclipsePlugin.log(e);
3765 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3771 jj_la1[99] = jj_gen;
3774 cas = switchLabel0();
3778 jj_consume_token(ENDSWITCH);
3779 } catch (ParseException e) {
3780 errorMessage = "'endswitch' expected";
3782 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3783 errorEnd = SimpleCharStream.getPosition() + 1;
3784 {if (true) throw e;}
3787 jj_consume_token(SEMICOLON);
3788 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3789 cases.toArray(abcase);
3790 {if (true) return abcase;}
3791 } catch (ParseException e) {
3792 errorMessage = "';' expected after 'endswitch' keyword";
3794 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3795 errorEnd = SimpleCharStream.getPosition() + 1;
3796 {if (true) throw e;}
3798 throw new Error("Missing return statement in function");
3801 static final public AbstractCase switchLabel0() throws ParseException {
3802 final Expression expr;
3803 Statement statement;
3804 final ArrayList stmts = new ArrayList();
3805 final int pos = SimpleCharStream.getPosition();
3806 expr = SwitchLabel();
3809 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3844 case INTEGER_LITERAL:
3845 case FLOATING_POINT_LITERAL:
3846 case STRING_LITERAL:
3855 jj_la1[100] = jj_gen;
3858 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3892 case INTEGER_LITERAL:
3893 case FLOATING_POINT_LITERAL:
3894 case STRING_LITERAL:
3900 statement = BlockStatementNoBreak();
3901 stmts.add(statement);
3904 statement = htmlBlock();
3905 stmts.add(statement);
3908 jj_la1[101] = jj_gen;
3909 jj_consume_token(-1);
3910 throw new ParseException();
3913 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3915 statement = BreakStatement();
3916 stmts.add(statement);
3919 jj_la1[102] = jj_gen;
3922 final Statement[] stmtsArray = new Statement[stmts.size()];
3923 stmts.toArray(stmtsArray);
3924 if (expr == null) {//it's a default
3925 {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3927 {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3928 throw new Error("Missing return statement in function");
3933 * case Expression() :
3935 * @return the if it was a case and null if not
3937 static final public Expression SwitchLabel() throws ParseException {
3938 final Expression expr;
3939 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3941 token = jj_consume_token(CASE);
3943 expr = Expression();
3944 } catch (ParseException e) {
3945 if (errorMessage != null) {if (true) throw e;}
3946 errorMessage = "expression expected after 'case' keyword";
3948 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3949 errorEnd = SimpleCharStream.getPosition() + 1;
3950 {if (true) throw e;}
3953 jj_consume_token(COLON);
3954 {if (true) return expr;}
3955 } catch (ParseException e) {
3956 errorMessage = "':' expected after case expression";
3958 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3959 errorEnd = SimpleCharStream.getPosition() + 1;
3960 {if (true) throw e;}
3964 token = jj_consume_token(_DEFAULT);
3966 jj_consume_token(COLON);
3967 {if (true) return null;}
3968 } catch (ParseException e) {
3969 errorMessage = "':' expected after 'default' keyword";
3971 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3972 errorEnd = SimpleCharStream.getPosition() + 1;
3973 {if (true) throw e;}
3977 jj_la1[103] = jj_gen;
3978 jj_consume_token(-1);
3979 throw new ParseException();
3981 throw new Error("Missing return statement in function");
3984 static final public Break BreakStatement() throws ParseException {
3985 Expression expression = null;
3986 final Token token, token2;
3987 token = jj_consume_token(BREAK);
3988 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4004 case INTEGER_LITERAL:
4005 case FLOATING_POINT_LITERAL:
4006 case STRING_LITERAL:
4010 expression = Expression();
4013 jj_la1[104] = jj_gen;
4017 token2 = jj_consume_token(SEMICOLON);
4018 } catch (ParseException e) {
4019 errorMessage = "';' expected after 'break' keyword";
4021 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4022 errorEnd = SimpleCharStream.getPosition() + 1;
4023 {if (true) throw e;}
4025 {if (true) return new Break(expression, token.sourceStart, token2.sourceEnd);}
4026 throw new Error("Missing return statement in function");
4029 static final public IfStatement IfStatement() throws ParseException {
4030 final int pos = SimpleCharStream.getPosition();
4031 final Expression condition;
4032 final IfStatement ifStatement;
4034 token = jj_consume_token(IF);
4035 condition = Condition("if");
4036 ifStatement = IfStatement0(condition,
4037 token.sourceStart,token.sourceStart+2);
4038 {if (true) return ifStatement;}
4039 throw new Error("Missing return statement in function");
4042 static final public Expression Condition(final String keyword) throws ParseException {
4043 final Expression condition;
4045 jj_consume_token(LPAREN);
4046 } catch (ParseException e) {
4047 errorMessage = "'(' expected after " + keyword + " keyword";
4049 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length();
4050 errorEnd = errorStart +1;
4051 processParseExceptionDebug(e);
4053 condition = Expression();
4055 jj_consume_token(RPAREN);
4056 } catch (ParseException e) {
4057 errorMessage = "')' expected after " + keyword + " keyword";
4059 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4060 errorEnd = SimpleCharStream.getPosition() + 1;
4061 processParseExceptionDebug(e);
4063 {if (true) return condition;}
4064 throw new Error("Missing return statement in function");
4067 static final public IfStatement IfStatement0(final Expression condition, final int start,final int end) throws ParseException {
4068 Statement statement;
4069 final Statement stmt;
4070 final Statement[] statementsArray;
4071 ElseIf elseifStatement;
4072 Else elseStatement = null;
4073 final ArrayList stmts;
4074 final ArrayList elseIfList = new ArrayList();
4075 final ElseIf[] elseIfs;
4076 int pos = SimpleCharStream.getPosition();
4077 final int endStatements;
4078 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4080 jj_consume_token(COLON);
4081 stmts = new ArrayList();
4084 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4118 case INTEGER_LITERAL:
4119 case FLOATING_POINT_LITERAL:
4120 case STRING_LITERAL:
4129 jj_la1[105] = jj_gen;
4132 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4165 case INTEGER_LITERAL:
4166 case FLOATING_POINT_LITERAL:
4167 case STRING_LITERAL:
4173 statement = Statement();
4174 stmts.add(statement);
4177 statement = htmlBlock();
4178 stmts.add(statement);
4181 jj_la1[106] = jj_gen;
4182 jj_consume_token(-1);
4183 throw new ParseException();
4186 endStatements = SimpleCharStream.getPosition();
4189 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4194 jj_la1[107] = jj_gen;
4197 elseifStatement = ElseIfStatementColon();
4198 elseIfList.add(elseifStatement);
4200 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4202 elseStatement = ElseStatementColon();
4205 jj_la1[108] = jj_gen;
4209 setMarker(fileToParse,
4210 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4214 "Line " + token.beginLine);
4215 } catch (CoreException e) {
4216 PHPeclipsePlugin.log(e);
4219 jj_consume_token(ENDIF);
4220 } catch (ParseException e) {
4221 errorMessage = "'endif' expected";
4223 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4224 errorEnd = SimpleCharStream.getPosition() + 1;
4225 {if (true) throw e;}
4228 jj_consume_token(SEMICOLON);
4229 } catch (ParseException e) {
4230 errorMessage = "';' expected after 'endif' keyword";
4232 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4233 errorEnd = SimpleCharStream.getPosition() + 1;
4234 {if (true) throw e;}
4236 elseIfs = new ElseIf[elseIfList.size()];
4237 elseIfList.toArray(elseIfs);
4238 if (stmts.size() == 1) {
4239 {if (true) return new IfStatement(condition,
4240 (Statement) stmts.get(0),
4244 SimpleCharStream.getPosition());}
4246 statementsArray = new Statement[stmts.size()];
4247 stmts.toArray(statementsArray);
4248 {if (true) return new IfStatement(condition,
4249 new Block(statementsArray,pos,endStatements),
4253 SimpleCharStream.getPosition());}
4289 case INTEGER_LITERAL:
4290 case FLOATING_POINT_LITERAL:
4291 case STRING_LITERAL:
4297 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4330 case INTEGER_LITERAL:
4331 case FLOATING_POINT_LITERAL:
4332 case STRING_LITERAL:
4344 jj_la1[109] = jj_gen;
4345 jj_consume_token(-1);
4346 throw new ParseException();
4350 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4355 jj_la1[110] = jj_gen;
4358 elseifStatement = ElseIfStatement();
4359 elseIfList.add(elseifStatement);
4361 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4363 jj_consume_token(ELSE);
4365 pos = SimpleCharStream.getPosition();
4366 statement = Statement();
4367 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4368 } catch (ParseException e) {
4369 if (errorMessage != null) {
4370 {if (true) throw e;}
4372 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4374 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4375 errorEnd = SimpleCharStream.getPosition() + 1;
4376 {if (true) throw e;}
4380 jj_la1[111] = jj_gen;
4383 elseIfs = new ElseIf[elseIfList.size()];
4384 elseIfList.toArray(elseIfs);
4385 {if (true) return new IfStatement(condition,
4390 SimpleCharStream.getPosition());}
4393 jj_la1[112] = jj_gen;
4394 jj_consume_token(-1);
4395 throw new ParseException();
4397 throw new Error("Missing return statement in function");
4400 static final public ElseIf ElseIfStatementColon() throws ParseException {
4401 final Expression condition;
4402 Statement statement;
4403 final ArrayList list = new ArrayList();
4404 final int pos = SimpleCharStream.getPosition();
4405 jj_consume_token(ELSEIF);
4406 condition = Condition("elseif");
4407 jj_consume_token(COLON);
4410 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4444 case INTEGER_LITERAL:
4445 case FLOATING_POINT_LITERAL:
4446 case STRING_LITERAL:
4455 jj_la1[113] = jj_gen;
4458 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4491 case INTEGER_LITERAL:
4492 case FLOATING_POINT_LITERAL:
4493 case STRING_LITERAL:
4499 statement = Statement();
4500 list.add(statement);
4503 statement = htmlBlock();
4504 list.add(statement);
4507 jj_la1[114] = jj_gen;
4508 jj_consume_token(-1);
4509 throw new ParseException();
4512 final Statement[] stmtsArray = new Statement[list.size()];
4513 list.toArray(stmtsArray);
4514 {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4515 throw new Error("Missing return statement in function");
4518 static final public Else ElseStatementColon() throws ParseException {
4519 Statement statement;
4520 final ArrayList list = new ArrayList();
4521 final int pos = SimpleCharStream.getPosition();
4522 jj_consume_token(ELSE);
4523 jj_consume_token(COLON);
4526 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4560 case INTEGER_LITERAL:
4561 case FLOATING_POINT_LITERAL:
4562 case STRING_LITERAL:
4571 jj_la1[115] = jj_gen;
4574 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4607 case INTEGER_LITERAL:
4608 case FLOATING_POINT_LITERAL:
4609 case STRING_LITERAL:
4615 statement = Statement();
4616 list.add(statement);
4619 statement = htmlBlock();
4620 list.add(statement);
4623 jj_la1[116] = jj_gen;
4624 jj_consume_token(-1);
4625 throw new ParseException();
4628 final Statement[] stmtsArray = new Statement[list.size()];
4629 list.toArray(stmtsArray);
4630 {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4631 throw new Error("Missing return statement in function");
4634 static final public ElseIf ElseIfStatement() throws ParseException {
4635 final Expression condition;
4636 final Statement statement;
4637 final ArrayList list = new ArrayList();
4638 final int pos = SimpleCharStream.getPosition();
4639 jj_consume_token(ELSEIF);
4640 condition = Condition("elseif");
4641 statement = Statement();
4642 list.add(statement);/*todo:do better*/
4643 final Statement[] stmtsArray = new Statement[list.size()];
4644 list.toArray(stmtsArray);
4645 {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4646 throw new Error("Missing return statement in function");
4649 static final public WhileStatement WhileStatement() throws ParseException {
4650 final Expression condition;
4651 final Statement action;
4652 final int pos = SimpleCharStream.getPosition();
4653 jj_consume_token(WHILE);
4654 condition = Condition("while");
4655 action = WhileStatement0(pos,pos + 5);
4656 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4657 throw new Error("Missing return statement in function");
4660 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4661 Statement statement;
4662 final ArrayList stmts = new ArrayList();
4663 final int pos = SimpleCharStream.getPosition();
4664 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4666 jj_consume_token(COLON);
4669 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4702 case INTEGER_LITERAL:
4703 case FLOATING_POINT_LITERAL:
4704 case STRING_LITERAL:
4713 jj_la1[117] = jj_gen;
4716 statement = Statement();
4717 stmts.add(statement);
4720 setMarker(fileToParse,
4721 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4725 "Line " + token.beginLine);
4726 } catch (CoreException e) {
4727 PHPeclipsePlugin.log(e);
4730 jj_consume_token(ENDWHILE);
4731 } catch (ParseException e) {
4732 errorMessage = "'endwhile' expected";
4734 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4735 errorEnd = SimpleCharStream.getPosition() + 1;
4736 {if (true) throw e;}
4739 jj_consume_token(SEMICOLON);
4740 final Statement[] stmtsArray = new Statement[stmts.size()];
4741 stmts.toArray(stmtsArray);
4742 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4743 } catch (ParseException e) {
4744 errorMessage = "';' expected after 'endwhile' keyword";
4746 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4747 errorEnd = SimpleCharStream.getPosition() + 1;
4748 {if (true) throw e;}
4783 case INTEGER_LITERAL:
4784 case FLOATING_POINT_LITERAL:
4785 case STRING_LITERAL:
4791 statement = Statement();
4792 {if (true) return statement;}
4795 jj_la1[118] = jj_gen;
4796 jj_consume_token(-1);
4797 throw new ParseException();
4799 throw new Error("Missing return statement in function");
4802 static final public DoStatement DoStatement() throws ParseException {
4803 final Statement action;
4804 final Expression condition;
4805 final Token token, token2;
4806 token = jj_consume_token(DO);
4807 action = Statement();
4808 jj_consume_token(WHILE);
4809 condition = Condition("while");
4811 token2 = jj_consume_token(SEMICOLON);
4812 {if (true) return new DoStatement(condition,action,token.sourceStart,token2.sourceEnd);}
4813 } catch (ParseException e) {
4814 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4816 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4817 errorEnd = SimpleCharStream.getPosition() + 1;
4818 {if (true) throw e;}
4820 throw new Error("Missing return statement in function");
4823 static final public ForeachStatement ForeachStatement() throws ParseException {
4824 Statement statement;
4825 Expression expression;
4826 ArrayVariableDeclaration variable;
4828 token = jj_consume_token(FOREACH);
4830 jj_consume_token(LPAREN);
4831 } catch (ParseException e) {
4832 errorMessage = "'(' expected after 'foreach' keyword";
4834 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4835 errorEnd = SimpleCharStream.getPosition() + 1;
4836 {if (true) throw e;}
4839 expression = Expression();
4840 } catch (ParseException e) {
4841 errorMessage = "variable expected";
4843 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4844 errorEnd = SimpleCharStream.getPosition() + 1;
4845 {if (true) throw e;}
4848 jj_consume_token(AS);
4849 } catch (ParseException e) {
4850 errorMessage = "'as' expected";
4852 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4853 errorEnd = SimpleCharStream.getPosition() + 1;
4854 {if (true) throw e;}
4857 variable = ArrayVariable();
4858 } catch (ParseException e) {
4859 errorMessage = "variable expected";
4861 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4862 errorEnd = SimpleCharStream.getPosition() + 1;
4863 {if (true) throw e;}
4866 jj_consume_token(RPAREN);
4867 } catch (ParseException e) {
4868 errorMessage = "')' expected after 'foreach' keyword";
4870 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4871 errorEnd = SimpleCharStream.getPosition() + 1;
4872 {if (true) throw e;}
4875 statement = Statement();
4876 } catch (ParseException e) {
4877 if (errorMessage != null) {if (true) throw e;}
4878 errorMessage = "statement expected";
4880 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4881 errorEnd = SimpleCharStream.getPosition() + 1;
4882 {if (true) throw e;}
4884 {if (true) return new ForeachStatement(expression,
4888 statement.sourceEnd);}
4889 throw new Error("Missing return statement in function");
4892 static final public ForStatement ForStatement() throws ParseException {
4893 final Token token,token2;
4894 final int pos = SimpleCharStream.getPosition();
4895 Expression[] initializations = null;
4896 Expression condition = null;
4897 Expression[] increments = null;
4899 final ArrayList list = new ArrayList();
4900 final int startBlock, endBlock;
4901 token = jj_consume_token(FOR);
4903 jj_consume_token(LPAREN);
4904 } catch (ParseException e) {
4905 errorMessage = "'(' expected after 'for' keyword";
4907 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4908 errorEnd = SimpleCharStream.getPosition() + 1;
4909 {if (true) throw e;}
4911 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4920 initializations = ForInit();
4923 jj_la1[119] = jj_gen;
4926 jj_consume_token(SEMICOLON);
4927 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4943 case INTEGER_LITERAL:
4944 case FLOATING_POINT_LITERAL:
4945 case STRING_LITERAL:
4949 condition = Expression();
4952 jj_la1[120] = jj_gen;
4955 jj_consume_token(SEMICOLON);
4956 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4965 increments = StatementExpressionList();
4968 jj_la1[121] = jj_gen;
4971 jj_consume_token(RPAREN);
4972 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5005 case INTEGER_LITERAL:
5006 case FLOATING_POINT_LITERAL:
5007 case STRING_LITERAL:
5013 action = Statement();
5014 {if (true) return new ForStatement(initializations,
5022 jj_consume_token(COLON);
5023 startBlock = SimpleCharStream.getPosition();
5026 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5059 case INTEGER_LITERAL:
5060 case FLOATING_POINT_LITERAL:
5061 case STRING_LITERAL:
5070 jj_la1[122] = jj_gen;
5073 action = Statement();
5077 setMarker(fileToParse,
5078 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
5080 pos+token.image.length(),
5082 "Line " + token.beginLine);
5083 } catch (CoreException e) {
5084 PHPeclipsePlugin.log(e);
5086 endBlock = SimpleCharStream.getPosition();
5088 jj_consume_token(ENDFOR);
5089 } catch (ParseException e) {
5090 errorMessage = "'endfor' expected";
5092 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5093 errorEnd = SimpleCharStream.getPosition() + 1;
5094 {if (true) throw e;}
5097 token2 = jj_consume_token(SEMICOLON);
5098 final Statement[] stmtsArray = new Statement[list.size()];
5099 list.toArray(stmtsArray);
5100 {if (true) return new ForStatement(initializations,
5103 new Block(stmtsArray,
5104 stmtsArray[0].sourceStart,
5105 stmtsArray[stmtsArray.length-1].sourceEnd),
5108 } catch (ParseException e) {
5109 errorMessage = "';' expected after 'endfor' keyword";
5111 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5112 errorEnd = SimpleCharStream.getPosition() + 1;
5113 {if (true) throw e;}
5117 jj_la1[123] = jj_gen;
5118 jj_consume_token(-1);
5119 throw new ParseException();
5121 throw new Error("Missing return statement in function");
5124 static final public Expression[] ForInit() throws ParseException {
5125 final Expression[] exprs;
5126 if (jj_2_6(2147483647)) {
5127 exprs = LocalVariableDeclaration();
5128 {if (true) return exprs;}
5130 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5139 exprs = StatementExpressionList();
5140 {if (true) return exprs;}
5143 jj_la1[124] = jj_gen;
5144 jj_consume_token(-1);
5145 throw new ParseException();
5148 throw new Error("Missing return statement in function");
5151 static final public Expression[] StatementExpressionList() throws ParseException {
5152 final ArrayList list = new ArrayList();
5153 final Expression expr;
5154 expr = StatementExpression();
5158 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5163 jj_la1[125] = jj_gen;
5166 jj_consume_token(COMMA);
5167 StatementExpression();
5170 final Expression[] exprsArray = new Expression[list.size()];
5171 list.toArray(exprsArray);
5172 {if (true) return exprsArray;}
5173 throw new Error("Missing return statement in function");
5176 static final public Continue ContinueStatement() throws ParseException {
5177 Expression expr = null;
5178 final Token token,token2;
5179 token = jj_consume_token(CONTINUE);
5180 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5196 case INTEGER_LITERAL:
5197 case FLOATING_POINT_LITERAL:
5198 case STRING_LITERAL:
5202 expr = Expression();
5205 jj_la1[126] = jj_gen;
5209 token2 = jj_consume_token(SEMICOLON);
5210 {if (true) return new Continue(expr,token.sourceStart,token2.sourceEnd);}
5211 } catch (ParseException e) {
5212 errorMessage = "';' expected after 'continue' statement";
5214 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5215 errorEnd = SimpleCharStream.getPosition() + 1;
5216 {if (true) throw e;}
5218 throw new Error("Missing return statement in function");
5221 static final public ReturnStatement ReturnStatement() throws ParseException {
5222 Expression expr = null;
5223 final Token token,token2;
5224 token = jj_consume_token(RETURN);
5225 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5241 case INTEGER_LITERAL:
5242 case FLOATING_POINT_LITERAL:
5243 case STRING_LITERAL:
5247 expr = Expression();
5250 jj_la1[127] = jj_gen;
5254 token2 = jj_consume_token(SEMICOLON);
5255 {if (true) return new ReturnStatement(expr,token.sourceStart,token2.sourceEnd);}
5256 } catch (ParseException e) {
5257 errorMessage = "';' expected after 'return' statement";
5259 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5260 errorEnd = SimpleCharStream.getPosition() + 1;
5261 {if (true) throw e;}
5263 throw new Error("Missing return statement in function");
5266 static final private boolean jj_2_1(int xla) {
5267 jj_la = xla; jj_lastpos = jj_scanpos = token;
5268 boolean retval = !jj_3_1();
5273 static final private boolean jj_2_2(int xla) {
5274 jj_la = xla; jj_lastpos = jj_scanpos = token;
5275 boolean retval = !jj_3_2();
5280 static final private boolean jj_2_3(int xla) {
5281 jj_la = xla; jj_lastpos = jj_scanpos = token;
5282 boolean retval = !jj_3_3();
5287 static final private boolean jj_2_4(int xla) {
5288 jj_la = xla; jj_lastpos = jj_scanpos = token;
5289 boolean retval = !jj_3_4();
5294 static final private boolean jj_2_5(int xla) {
5295 jj_la = xla; jj_lastpos = jj_scanpos = token;
5296 boolean retval = !jj_3_5();
5301 static final private boolean jj_2_6(int xla) {
5302 jj_la = xla; jj_lastpos = jj_scanpos = token;
5303 boolean retval = !jj_3_6();
5308 static final private boolean jj_3R_46() {
5309 if (jj_scan_token(LBRACKET)) return true;
5310 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5313 if (jj_3R_52()) jj_scanpos = xsp;
5314 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5315 if (jj_scan_token(RBRACKET)) return true;
5316 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5320 static final private boolean jj_3R_118() {
5321 if (jj_scan_token(XOR)) return true;
5322 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5323 if (jj_3R_117()) return true;
5324 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5328 static final private boolean jj_3R_114() {
5329 if (jj_3R_117()) return true;
5330 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5334 if (jj_3R_118()) { jj_scanpos = xsp; break; }
5335 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5340 static final private boolean jj_3R_45() {
5341 if (jj_scan_token(CLASSACCESS)) return true;
5342 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5343 if (jj_3R_51()) return true;
5344 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5348 static final private boolean jj_3R_39() {
5353 if (jj_3R_46()) return true;
5354 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5355 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5359 static final private boolean jj_3R_115() {
5360 if (jj_scan_token(BIT_OR)) return true;
5361 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5362 if (jj_3R_114()) return true;
5363 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5367 static final private boolean jj_3R_108() {
5368 if (jj_3R_114()) return true;
5369 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5373 if (jj_3R_115()) { jj_scanpos = xsp; break; }
5374 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5379 static final private boolean jj_3R_204() {
5380 if (jj_3R_126()) return true;
5381 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5385 static final private boolean jj_3R_111() {
5386 if (jj_scan_token(DOT)) return true;
5387 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5388 if (jj_3R_108()) return true;
5389 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5393 static final private boolean jj_3R_203() {
5394 if (jj_3R_48()) return true;
5395 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5399 static final private boolean jj_3R_202() {
5400 if (jj_scan_token(IDENTIFIER)) return true;
5401 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5405 static final private boolean jj_3R_197() {
5412 if (jj_3R_204()) return true;
5413 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5414 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5415 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5419 static final private boolean jj_3R_101() {
5420 if (jj_3R_108()) return true;
5421 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5425 if (jj_3R_111()) { jj_scanpos = xsp; break; }
5426 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5431 static final private boolean jj_3R_113() {
5432 if (jj_scan_token(_ANDL)) return true;
5433 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5437 static final private boolean jj_3R_184() {
5438 if (jj_scan_token(ARRAY)) return true;
5439 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5440 if (jj_3R_193()) return true;
5441 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5445 static final private boolean jj_3R_112() {
5446 if (jj_scan_token(AND_AND)) return true;
5447 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5451 static final private boolean jj_3R_104() {
5456 if (jj_3R_113()) return true;
5457 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5458 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5459 if (jj_3R_101()) return true;
5460 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5464 static final private boolean jj_3R_123() {
5465 if (jj_scan_token(ASSIGN)) return true;
5466 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5467 if (jj_3R_47()) return true;
5468 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5472 static final private boolean jj_3R_116() {
5473 if (jj_scan_token(LBRACE)) return true;
5474 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5475 if (jj_3R_47()) return true;
5476 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5477 if (jj_scan_token(RBRACE)) return true;
5478 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5482 static final private boolean jj_3R_82() {
5483 if (jj_3R_101()) return true;
5484 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5488 if (jj_3R_104()) { jj_scanpos = xsp; break; }
5489 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5494 static final private boolean jj_3R_78() {
5495 if (jj_scan_token(HOOK)) return true;
5496 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5497 if (jj_3R_47()) return true;
5498 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5499 if (jj_scan_token(COLON)) return true;
5500 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5501 if (jj_3R_70()) return true;
5502 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5506 static final private boolean jj_3R_67() {
5507 if (jj_scan_token(IDENTIFIER)) return true;
5508 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5511 if (jj_3R_116()) jj_scanpos = xsp;
5512 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5516 static final private boolean jj_3R_198() {
5517 if (jj_3R_201()) return true;
5518 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5522 static final private boolean jj_3R_127() {
5523 if (jj_3R_126()) return true;
5524 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5528 static final private boolean jj_3R_106() {
5529 if (jj_scan_token(_ORL)) return true;
5530 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5534 static final private boolean jj_3R_105() {
5535 if (jj_scan_token(OR_OR)) return true;
5536 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5540 static final private boolean jj_3R_51() {
5545 if (jj_3R_67()) return true;
5546 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5547 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5551 static final private boolean jj_3R_66() {
5552 if (jj_scan_token(LBRACE)) return true;
5553 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5554 if (jj_3R_47()) return true;
5555 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5556 if (jj_scan_token(RBRACE)) return true;
5557 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5561 static final private boolean jj_3R_84() {
5566 if (jj_3R_106()) return true;
5567 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5568 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5569 if (jj_3R_82()) return true;
5570 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5574 static final private boolean jj_3R_122() {
5575 if (jj_scan_token(COMMA)) return true;
5576 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5579 if (jj_3R_127()) jj_scanpos = xsp;
5580 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5584 static final private boolean jj_3R_75() {
5585 if (jj_3R_82()) return true;
5586 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5590 if (jj_3R_84()) { jj_scanpos = xsp; break; }
5591 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5596 static final private boolean jj_3R_190() {
5597 if (jj_scan_token(NEW)) return true;
5598 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5599 if (jj_3R_197()) return true;
5600 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5603 if (jj_3R_198()) jj_scanpos = xsp;
5604 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5608 static final private boolean jj_3R_196() {
5609 if (jj_3R_201()) return true;
5610 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5614 static final private boolean jj_3R_121() {
5615 if (jj_3R_126()) return true;
5616 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5620 static final private boolean jj_3R_189() {
5621 if (jj_3R_126()) return true;
5622 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5625 if (jj_3R_196()) jj_scanpos = xsp;
5626 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5630 static final private boolean jj_3R_107() {
5631 if (jj_3R_81()) return true;
5632 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5636 static final private boolean jj_3_2() {
5637 if (jj_scan_token(DOLLAR)) return true;
5638 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5639 if (jj_scan_token(DOLLAR)) return true;
5640 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5644 static final private boolean jj_3R_100() {
5645 if (jj_3R_51()) return true;
5646 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5650 static final private boolean jj_3R_70() {
5651 if (jj_3R_75()) return true;
5652 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5655 if (jj_3R_78()) jj_scanpos = xsp;
5656 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5660 static final private boolean jj_3R_109() {
5661 if (jj_scan_token(LIST)) return true;
5662 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5663 if (jj_scan_token(LPAREN)) return true;
5664 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5667 if (jj_3R_121()) jj_scanpos = xsp;
5668 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5671 if (jj_3R_122()) { jj_scanpos = xsp; break; }
5672 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5674 if (jj_scan_token(RPAREN)) return true;
5675 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5677 if (jj_3R_123()) jj_scanpos = xsp;
5678 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5682 static final private boolean jj_3R_99() {
5683 if (jj_scan_token(DOLLAR)) return true;
5684 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5685 if (jj_3R_81()) return true;
5686 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5690 static final private boolean jj_3R_195() {
5691 if (jj_3R_201()) return true;
5692 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5696 static final private boolean jj_3R_97() {
5697 if (jj_scan_token(TILDEEQUAL)) return true;
5698 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5702 static final private boolean jj_3R_194() {
5703 if (jj_scan_token(STATICCLASSACCESS)) return true;
5704 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5705 if (jj_3R_197()) return true;
5706 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5710 static final private boolean jj_3R_96() {
5711 if (jj_scan_token(DOTASSIGN)) return true;
5712 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5716 static final private boolean jj_3R_95() {
5717 if (jj_scan_token(ORASSIGN)) return true;
5718 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5722 static final private boolean jj_3R_94() {
5723 if (jj_scan_token(XORASSIGN)) return true;
5724 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5728 static final private boolean jj_3R_110() {
5729 if (jj_scan_token(PRINT)) return true;
5730 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5731 if (jj_3R_47()) return true;
5732 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5736 static final private boolean jj_3R_98() {
5737 if (jj_scan_token(DOLLAR_ID)) return true;
5738 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5741 if (jj_3R_107()) jj_scanpos = xsp;
5742 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5746 static final private boolean jj_3R_81() {
5753 if (jj_3R_100()) return true;
5754 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5755 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5756 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5760 static final private boolean jj_3R_93() {
5761 if (jj_scan_token(ANDASSIGN)) return true;
5762 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5766 static final private boolean jj_3R_92() {
5767 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
5768 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5772 static final private boolean jj_3R_91() {
5773 if (jj_scan_token(LSHIFTASSIGN)) return true;
5774 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5778 static final private boolean jj_3R_90() {
5779 if (jj_scan_token(MINUSASSIGN)) return true;
5780 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5784 static final private boolean jj_3R_188() {
5785 if (jj_scan_token(IDENTIFIER)) return true;
5786 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5790 if (jj_3R_194()) { jj_scanpos = xsp; break; }
5791 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5794 if (jj_3R_195()) jj_scanpos = xsp;
5795 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5799 static final private boolean jj_3R_183() {
5806 if (jj_3R_190()) return true;
5807 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5808 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5809 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5813 static final private boolean jj_3R_80() {
5814 if (jj_3R_81()) return true;
5815 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5819 static final private boolean jj_3R_89() {
5820 if (jj_scan_token(PLUSASSIGN)) return true;
5821 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5825 static final private boolean jj_3R_88() {
5826 if (jj_scan_token(REMASSIGN)) return true;
5827 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5831 static final private boolean jj_3R_87() {
5832 if (jj_scan_token(SLASHASSIGN)) return true;
5833 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5837 static final private boolean jj_3R_86() {
5838 if (jj_scan_token(STARASSIGN)) return true;
5839 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5843 static final private boolean jj_3R_85() {
5844 if (jj_scan_token(ASSIGN)) return true;
5845 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5849 static final private boolean jj_3R_79() {
5876 if (jj_3R_97()) return true;
5877 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5878 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5879 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5880 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5881 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5882 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5883 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5884 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5885 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5886 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5887 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5888 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5889 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5893 static final private boolean jj_3R_74() {
5894 if (jj_scan_token(DOLLAR)) return true;
5895 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5896 if (jj_3R_81()) return true;
5897 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5901 static final private boolean jj_3R_175() {
5902 if (jj_3R_184()) return true;
5903 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5907 static final private boolean jj_3R_103() {
5908 if (jj_3R_110()) return true;
5909 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5913 static final private boolean jj_3R_182() {
5914 if (jj_scan_token(BIT_AND)) return true;
5915 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5919 static final private boolean jj_3R_102() {
5920 if (jj_3R_109()) return true;
5921 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5925 static final private boolean jj_3R_83() {
5930 if (jj_3R_103()) return true;
5931 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5932 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5936 static final private boolean jj_3R_170() {
5941 if (jj_3R_175()) return true;
5942 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5943 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5947 static final private boolean jj_3R_174() {
5950 if (jj_3R_182()) jj_scanpos = xsp;
5951 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5952 if (jj_3R_183()) return true;
5953 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5957 static final private boolean jj_3R_73() {
5958 if (jj_scan_token(DOLLAR_ID)) return true;
5959 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5962 if (jj_3R_80()) jj_scanpos = xsp;
5963 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5967 static final private boolean jj_3R_64() {
5972 if (jj_3R_74()) return true;
5973 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5974 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5978 static final private boolean jj_3R_77() {
5979 if (jj_3R_83()) return true;
5980 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5984 static final private boolean jj_3R_76() {
5985 if (jj_scan_token(BANG)) return true;
5986 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5987 if (jj_3R_71()) return true;
5988 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5992 static final private boolean jj_3R_71() {
5997 if (jj_3R_77()) return true;
5998 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5999 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6003 static final private boolean jj_3R_192() {
6004 if (jj_scan_token(MINUS_MINUS)) return true;
6005 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6009 static final private boolean jj_3R_191() {
6010 if (jj_scan_token(PLUS_PLUS)) return true;
6011 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6015 static final private boolean jj_3R_187() {
6020 if (jj_3R_192()) return true;
6021 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6022 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6026 static final private boolean jj_3R_54() {
6027 if (jj_3R_71()) return true;
6028 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6032 static final private boolean jj_3R_172() {
6033 if (jj_3R_170()) return true;
6034 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6037 if (jj_3R_187()) jj_scanpos = xsp;
6038 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6042 static final private boolean jj_3R_186() {
6043 if (jj_scan_token(ARRAY)) return true;
6044 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6048 static final private boolean jj_3R_185() {
6049 if (jj_3R_48()) return true;
6050 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6054 static final private boolean jj_3R_42() {
6055 if (jj_scan_token(ARRAY)) return true;
6056 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6060 static final private boolean jj_3R_171() {
6061 if (jj_scan_token(LPAREN)) return true;
6062 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6067 if (jj_3R_186()) return true;
6068 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6069 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6070 if (jj_scan_token(RPAREN)) return true;
6071 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6072 if (jj_3R_146()) return true;
6073 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6077 static final private boolean jj_3R_41() {
6078 if (jj_3R_48()) return true;
6079 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6083 static final private boolean jj_3R_72() {
6084 if (jj_3R_79()) return true;
6085 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6086 if (jj_3R_47()) return true;
6087 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6091 static final private boolean jj_3_4() {
6092 if (jj_scan_token(LPAREN)) return true;
6093 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6098 if (jj_3R_42()) return true;
6099 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6100 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6101 if (jj_scan_token(RPAREN)) return true;
6102 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6106 static final private boolean jj_3R_47() {
6111 if (jj_3R_54()) return true;
6112 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6113 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6117 static final private boolean jj_3R_53() {
6118 if (jj_3R_70()) return true;
6119 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6122 if (jj_3R_72()) jj_scanpos = xsp;
6123 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6127 static final private boolean jj_3R_169() {
6128 if (jj_scan_token(LPAREN)) return true;
6129 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6130 if (jj_3R_47()) return true;
6131 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6132 if (jj_scan_token(RPAREN)) return true;
6133 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6137 static final private boolean jj_3R_168() {
6138 if (jj_3R_173()) return true;
6139 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6143 static final private boolean jj_3R_167() {
6144 if (jj_3R_172()) return true;
6145 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6149 static final private boolean jj_3_1() {
6150 if (jj_3R_39()) return true;
6151 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6155 static final private boolean jj_3R_163() {
6164 if (jj_3R_169()) return true;
6165 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6166 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6167 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6168 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6172 static final private boolean jj_3R_166() {
6173 if (jj_3R_171()) return true;
6174 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6178 static final private boolean jj_3R_65() {
6179 if (jj_scan_token(ASSIGN)) return true;
6180 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6181 if (jj_3R_47()) return true;
6182 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6186 static final private boolean jj_3R_63() {
6187 if (jj_scan_token(OBJECT)) return true;
6188 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6192 static final private boolean jj_3R_62() {
6193 if (jj_scan_token(INTEGER)) return true;
6194 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6198 static final private boolean jj_3R_61() {
6199 if (jj_scan_token(INT)) return true;
6200 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6204 static final private boolean jj_3R_126() {
6205 if (jj_3R_64()) return true;
6206 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6210 if (jj_3_1()) { jj_scanpos = xsp; break; }
6211 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6216 static final private boolean jj_3R_60() {
6217 if (jj_scan_token(FLOAT)) return true;
6218 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6222 static final private boolean jj_3R_59() {
6223 if (jj_scan_token(DOUBLE)) return true;
6224 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6228 static final private boolean jj_3R_165() {
6229 if (jj_scan_token(MINUS_MINUS)) return true;
6230 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6234 static final private boolean jj_3R_58() {
6235 if (jj_scan_token(REAL)) return true;
6236 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6240 static final private boolean jj_3R_57() {
6241 if (jj_scan_token(BOOLEAN)) return true;
6242 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6246 static final private boolean jj_3R_164() {
6247 if (jj_scan_token(PLUS_PLUS)) return true;
6248 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6252 static final private boolean jj_3R_56() {
6253 if (jj_scan_token(BOOL)) return true;
6254 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6258 static final private boolean jj_3R_48() {
6277 if (jj_3R_63()) return true;
6278 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6279 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6280 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6281 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6282 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6283 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6284 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6285 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6286 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6290 static final private boolean jj_3R_55() {
6291 if (jj_scan_token(STRING)) return true;
6292 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6296 static final private boolean jj_3R_162() {
6301 if (jj_3R_165()) return true;
6302 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6303 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6304 if (jj_3R_170()) return true;
6305 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6309 static final private boolean jj_3R_49() {
6310 if (jj_3R_64()) return true;
6311 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6314 if (jj_3R_65()) jj_scanpos = xsp;
6315 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6319 static final private boolean jj_3R_161() {
6320 if (jj_3R_163()) return true;
6321 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6325 static final private boolean jj_3R_160() {
6326 if (jj_3R_162()) return true;
6327 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6331 static final private boolean jj_3R_159() {
6332 if (jj_scan_token(MINUS)) return true;
6333 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6334 if (jj_3R_150()) return true;
6335 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6339 static final private boolean jj_3R_157() {
6348 if (jj_3R_161()) return true;
6349 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6350 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6351 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6352 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6356 static final private boolean jj_3R_158() {
6357 if (jj_scan_token(PLUS)) return true;
6358 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6359 if (jj_3R_150()) return true;
6360 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6364 static final private boolean jj_3R_50() {
6365 if (jj_scan_token(COMMA)) return true;
6366 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6367 if (jj_3R_49()) return true;
6368 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6372 static final private boolean jj_3R_44() {
6373 if (jj_3R_49()) return true;
6374 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6378 if (jj_3R_50()) { jj_scanpos = xsp; break; }
6379 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6384 static final private boolean jj_3R_156() {
6385 if (jj_3R_157()) return true;
6386 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6390 static final private boolean jj_3R_155() {
6391 if (jj_scan_token(BANG)) return true;
6392 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6393 if (jj_3R_150()) return true;
6394 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6398 static final private boolean jj_3R_150() {
6405 if (jj_3R_156()) return true;
6406 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6407 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6408 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6412 static final private boolean jj_3R_154() {
6413 if (jj_scan_token(AT)) return true;
6414 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6415 if (jj_3R_150()) return true;
6416 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6420 static final private boolean jj_3R_146() {
6421 if (jj_3R_150()) return true;
6422 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6426 static final private boolean jj_3R_153() {
6427 if (jj_scan_token(REMAINDER)) return true;
6428 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6432 static final private boolean jj_3R_152() {
6433 if (jj_scan_token(SLASH)) return true;
6434 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6438 static final private boolean jj_3R_151() {
6439 if (jj_scan_token(STAR)) return true;
6440 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6444 static final private boolean jj_3R_43() {
6445 if (jj_3R_47()) return true;
6446 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6447 if (jj_scan_token(SEMICOLON)) return true;
6448 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6452 static final private boolean jj_3R_147() {
6459 if (jj_3R_153()) 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 if (jj_3R_146()) return true;
6464 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6468 static final private boolean jj_3R_141() {
6469 if (jj_3R_146()) return true;
6470 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6474 if (jj_3R_147()) { jj_scanpos = xsp; break; }
6475 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6480 static final private boolean jj_3_6() {
6481 if (jj_3R_44()) return true;
6482 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6486 static final private boolean jj_3R_149() {
6487 if (jj_scan_token(MINUS)) return true;
6488 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6492 static final private boolean jj_3R_148() {
6493 if (jj_scan_token(PLUS)) return true;
6494 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6498 static final private boolean jj_3R_142() {
6503 if (jj_3R_149()) return true;
6504 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6505 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6506 if (jj_3R_141()) return true;
6507 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6511 static final private boolean jj_3R_135() {
6512 if (jj_3R_141()) return true;
6513 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6517 if (jj_3R_142()) { jj_scanpos = xsp; break; }
6518 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6523 static final private boolean jj_3_5() {
6524 if (jj_3R_43()) return true;
6525 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6529 static final private boolean jj_3R_145() {
6530 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
6531 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6535 static final private boolean jj_3R_144() {
6536 if (jj_scan_token(RSIGNEDSHIFT)) return true;
6537 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6541 static final private boolean jj_3R_143() {
6542 if (jj_scan_token(LSHIFT)) return true;
6543 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6547 static final private boolean jj_3R_136() {
6554 if (jj_3R_145()) return true;
6555 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6556 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6557 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6558 if (jj_3R_135()) return true;
6559 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6563 static final private boolean jj_3R_128() {
6564 if (jj_3R_135()) return true;
6565 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6569 if (jj_3R_136()) { jj_scanpos = xsp; break; }
6570 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6575 static final private boolean jj_3R_140() {
6576 if (jj_scan_token(GE)) return true;
6577 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6581 static final private boolean jj_3R_139() {
6582 if (jj_scan_token(LE)) return true;
6583 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6587 static final private boolean jj_3R_208() {
6588 if (jj_scan_token(COMMA)) return true;
6589 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6590 if (jj_3R_47()) return true;
6591 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6595 static final private boolean jj_3R_138() {
6596 if (jj_scan_token(GT)) return true;
6597 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6601 static final private boolean jj_3R_137() {
6602 if (jj_scan_token(LT)) return true;
6603 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6607 static final private boolean jj_3R_129() {
6616 if (jj_3R_140()) return true;
6617 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6618 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6619 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6620 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6621 if (jj_3R_128()) return true;
6622 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6626 static final private boolean jj_3R_207() {
6627 if (jj_3R_47()) return true;
6628 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6632 if (jj_3R_208()) { jj_scanpos = xsp; break; }
6633 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6638 static final private boolean jj_3R_124() {
6639 if (jj_3R_128()) return true;
6640 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6644 if (jj_3R_129()) { jj_scanpos = xsp; break; }
6645 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6650 static final private boolean jj_3R_200() {
6651 if (jj_scan_token(COMMA)) return true;
6652 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6656 static final private boolean jj_3_3() {
6657 if (jj_scan_token(COMMA)) return true;
6658 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6659 if (jj_3R_40()) return true;
6660 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6664 static final private boolean jj_3R_205() {
6665 if (jj_3R_207()) return true;
6666 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6670 static final private boolean jj_3R_69() {
6671 if (jj_3R_48()) return true;
6672 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6676 static final private boolean jj_3R_199() {
6677 if (jj_3R_40()) return true;
6678 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6682 if (jj_3_3()) { jj_scanpos = xsp; break; }
6683 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6688 static final private boolean jj_3R_193() {
6689 if (jj_scan_token(LPAREN)) return true;
6690 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6693 if (jj_3R_199()) jj_scanpos = xsp;
6694 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6696 if (jj_3R_200()) jj_scanpos = xsp;
6697 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6698 if (jj_scan_token(RPAREN)) return true;
6699 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6703 static final private boolean jj_3R_201() {
6704 if (jj_scan_token(LPAREN)) return true;
6705 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6708 if (jj_3R_205()) jj_scanpos = xsp;
6709 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6710 if (jj_scan_token(RPAREN)) return true;
6711 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6715 static final private boolean jj_3R_134() {
6716 if (jj_scan_token(TRIPLEEQUAL)) return true;
6717 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6721 static final private boolean jj_3R_133() {
6722 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
6723 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6727 static final private boolean jj_3R_132() {
6728 if (jj_scan_token(NOT_EQUAL)) return true;
6729 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6733 static final private boolean jj_3R_131() {
6734 if (jj_scan_token(DIF)) return true;
6735 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6739 static final private boolean jj_3R_130() {
6740 if (jj_scan_token(EQUAL_EQUAL)) return true;
6741 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6745 static final private boolean jj_3R_206() {
6746 if (jj_scan_token(ARRAYASSIGN)) return true;
6747 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6748 if (jj_3R_47()) return true;
6749 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6753 static final private boolean jj_3R_125() {
6764 if (jj_3R_134()) return true;
6765 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6766 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6767 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6768 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6769 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6770 if (jj_3R_124()) return true;
6771 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6775 static final private boolean jj_3R_181() {
6776 if (jj_scan_token(NULL)) return true;
6777 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6781 static final private boolean jj_3R_180() {
6782 if (jj_scan_token(FALSE)) return true;
6783 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6787 static final private boolean jj_3R_119() {
6788 if (jj_3R_124()) return true;
6789 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6793 if (jj_3R_125()) { jj_scanpos = xsp; break; }
6794 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6799 static final private boolean jj_3R_179() {
6800 if (jj_scan_token(TRUE)) return true;
6801 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6805 static final private boolean jj_3R_178() {
6806 if (jj_scan_token(STRING_LITERAL)) return true;
6807 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6811 static final private boolean jj_3R_40() {
6812 if (jj_3R_47()) return true;
6813 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6816 if (jj_3R_206()) jj_scanpos = xsp;
6817 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6821 static final private boolean jj_3R_177() {
6822 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
6823 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6827 static final private boolean jj_3R_176() {
6828 if (jj_scan_token(INTEGER_LITERAL)) return true;
6829 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6833 static final private boolean jj_3R_173() {
6846 if (jj_3R_181()) return true;
6847 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6848 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6849 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6850 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6851 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6852 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6856 static final private boolean jj_3R_68() {
6857 if (jj_3R_47()) return true;
6858 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6862 static final private boolean jj_3R_52() {
6867 if (jj_3R_69()) return true;
6868 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6869 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6873 static final private boolean jj_3R_120() {
6874 if (jj_scan_token(BIT_AND)) return true;
6875 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6876 if (jj_3R_119()) return true;
6877 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6881 static final private boolean jj_3R_117() {
6882 if (jj_3R_119()) return true;
6883 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6887 if (jj_3R_120()) { jj_scanpos = xsp; break; }
6888 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6893 static private boolean jj_initialized_once = false;
6894 static public PHPParserTokenManager token_source;
6895 static SimpleCharStream jj_input_stream;
6896 static public Token token, jj_nt;
6897 static private int jj_ntk;
6898 static private Token jj_scanpos, jj_lastpos;
6899 static private int jj_la;
6900 static public boolean lookingAhead = false;
6901 static private boolean jj_semLA;
6902 static private int jj_gen;
6903 static final private int[] jj_la1 = new int[128];
6904 static private int[] jj_la1_0;
6905 static private int[] jj_la1_1;
6906 static private int[] jj_la1_2;
6907 static private int[] jj_la1_3;
6908 static private int[] jj_la1_4;
6916 private static void jj_la1_0() {
6917 jj_la1_0 = new int[] {0xf960001e,0x6,0x6,0xf960001e,0x0,0xf9600000,0x0,0xc00000,0xc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x68000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x68000000,0x60000000,0x60000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x8000000,0x0,0x8000000,0x8000000,0x0,0x0,0x0,0x8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x68000000,0x68000000,0x0,0x0,0x68000000,0x0,0x0,0x81000000,0xf9000000,0x8,0x6,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf9600010,0xf9600010,0xf9600000,0xe9600000,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x0,0xe9600010,0xe9600010,0x10000000,0x0,0x68000000,0xf9000010,0xf9000010,0x2000000,0x4000000,0xf9000010,0x2000000,0x4000000,0xf9000010,0xf9000010,0xf9000010,0xf9000010,0xf9000010,0xf9000000,0xf9000000,0x8000000,0x68000000,0x8000000,0xf9000000,0xf9000000,0x8000000,0x0,0x68000000,0x68000000,};
6919 private static void jj_la1_1() {
6920 jj_la1_1 = new int[] {0x875d507f,0x0,0x0,0x875d507f,0x0,0x875d507f,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3080000,0x200,0x30c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30c0000,0x30c0000,0x0,0x30c0000,0x0,0x0,0x0,0x0,0x40000,0x100,0x0,0x0,0x0,0x40000,0x0,0x30c0000,0x30c0000,0x80,0x3080000,0x30c0000,0x0,0x0,0x8451507f,0x875d507f,0x0,0x0,0xf,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x0,0x0,0x0,0x0,0x40000,0x0,0x2400,0x2400,0x875d507f,0x875d507f,0x0,0x2400,0x30c0000,0x875d507f,0x875d507f,0x0,0x0,0x875d507f,0x0,0x0,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x40000,0x30c0000,0x40000,0x875d507f,0x875d507f,0x40000,0x0,0x30c0000,0x30c0000,};
6922 private static void jj_la1_2() {
6923 jj_la1_2 = new int[] {0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x13c1c00,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x800,0x800,0x0,0x0,0x0,0x0,0x0,0x0,0x300000,0x0,0x13c1c00,0x0,0x1000000,0x0,0x1000000,0x1000000,0x3fe,0x0,0x13c1c00,0x1000,0x0,0x0,0x4000,0x80010000,0x80010000,0x20000,0x20000,0x0,0x2000000,0x4000000,0x1000000,0x0,0x0,0x0,0x0,0x70000000,0x70000000,0x300000,0x300000,0x8c00000,0x8c00000,0x13c1c00,0x13c0800,0xc0000,0x1000800,0x3fe,0xc0000,0xc0000,0x1000000,0x1000800,0x0,0x0,0x0,0x0,0x800,0xbfe,0x13c1ffe,0x13c1ffe,0x0,0x0,0x13c1c00,0x0,0x400,0x400,0x13c1c00,0x0,0x0,0x0,0x800,0x0,0x800,0x0,0x0,0x0,0x0,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x0,0x0,0xc0000,0xc0000,0x10c0800,0x8000,0x0,0x0,0x13c1c00,0x13c1c00,0x0,0x0,0x13c1c00,0x13c1c00,0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x0,0x13c9c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c9c00,0x10c0800,0x13c1c00,0x10c0800,0x13c1c00,0x13c9c00,0x10c0800,0x0,0x13c1c00,0x13c1c00,};
6925 private static void jj_la1_3() {
6926 jj_la1_3 = new int[] {0x2288a2,0x0,0x0,0x2288a2,0x200000,0x2288a2,0x0,0x0,0x0,0x400000,0x0,0x0,0x20800,0x0,0x20800,0x0,0x20800,0x20000,0x20800,0x22,0x22,0x8a2,0x0,0x88a2,0x400000,0x0,0x400000,0x0,0x0,0x0,0x0,0x88a2,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x800000,0x0,0x0,0x0,0xe4000000,0xe4000000,0x1b000000,0x1b000000,0x0,0x0,0x0,0x0,0x0,0x0,0x88a2,0x88a2,0x0,0x88a2,0x0,0x0,0x0,0x0,0x800,0x0,0x8000,0x8000,0x8000,0x800,0x800,0x88a2,0x88a2,0x80000,0xa2,0x88a2,0x400000,0x0,0x220800,0x2288a2,0x0,0x0,0x0,0x0,0x400000,0x0,0x0,0x400000,0x400000,0x400000,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x400000,0x0,0x0,0x0,0x800,0x20000,0x0,0x0,0x2288a2,0x2288a2,0x0,0x0,0x88a2,0x2288a2,0x2288a2,0x0,0x0,0x2288a2,0x0,0x0,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x800,0x88a2,0x800,0x2288a2,0x2288a2,0x800,0x400000,0x88a2,0x88a2,};
6928 private static void jj_la1_4() {
6929 jj_la1_4 = new int[] {0x4000,0x0,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x2,0x2,0x4000,0x4000,0x4000,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x0,0x3ffe,0x4000,0x0,0x0,0x3ffe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x0,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x4000,0x2,0x0,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x0,0x2,0x0,0x0,0x4000,0x0,0x0,0x0,0x4000,0x4000,0x0,0x0,0x4000,0x4000,0x4000,0x0,0x0,0x4000,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x0,0x4000,0x4000,};
6931 static final private JJCalls[] jj_2_rtns = new JJCalls[6];
6932 static private boolean jj_rescan = false;
6933 static private int jj_gc = 0;
6935 public PHPParser(java.io.InputStream stream) {
6936 if (jj_initialized_once) {
6937 System.out.println("ERROR: Second call to constructor of static parser. You must");
6938 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6939 System.out.println(" during parser generation.");
6942 jj_initialized_once = true;
6943 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6944 token_source = new PHPParserTokenManager(jj_input_stream);
6945 token = new Token();
6948 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
6949 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6952 static public void ReInit(java.io.InputStream stream) {
6953 jj_input_stream.ReInit(stream, 1, 1);
6954 token_source.ReInit(jj_input_stream);
6955 token = new Token();
6958 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
6959 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6962 public PHPParser(java.io.Reader stream) {
6963 if (jj_initialized_once) {
6964 System.out.println("ERROR: Second call to constructor of static parser. You must");
6965 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6966 System.out.println(" during parser generation.");
6969 jj_initialized_once = true;
6970 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6971 token_source = new PHPParserTokenManager(jj_input_stream);
6972 token = new Token();
6975 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
6976 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6979 static public void ReInit(java.io.Reader stream) {
6980 jj_input_stream.ReInit(stream, 1, 1);
6981 token_source.ReInit(jj_input_stream);
6982 token = new Token();
6985 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
6986 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6989 public PHPParser(PHPParserTokenManager tm) {
6990 if (jj_initialized_once) {
6991 System.out.println("ERROR: Second call to constructor of static parser. You must");
6992 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6993 System.out.println(" during parser generation.");
6996 jj_initialized_once = true;
6998 token = new Token();
7001 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7002 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7005 public void ReInit(PHPParserTokenManager tm) {
7007 token = new Token();
7010 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7011 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7014 static final private Token jj_consume_token(int kind) throws ParseException {
7016 if ((oldToken = token).next != null) token = token.next;
7017 else token = token.next = token_source.getNextToken();
7019 if (token.kind == kind) {
7021 if (++jj_gc > 100) {
7023 for (int i = 0; i < jj_2_rtns.length; i++) {
7024 JJCalls c = jj_2_rtns[i];
7026 if (c.gen < jj_gen) c.first = null;
7035 throw generateParseException();
7038 static final private boolean jj_scan_token(int kind) {
7039 if (jj_scanpos == jj_lastpos) {
7041 if (jj_scanpos.next == null) {
7042 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
7044 jj_lastpos = jj_scanpos = jj_scanpos.next;
7047 jj_scanpos = jj_scanpos.next;
7050 int i = 0; Token tok = token;
7051 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
7052 if (tok != null) jj_add_error_token(kind, i);
7054 return (jj_scanpos.kind != kind);
7057 static final public Token getNextToken() {
7058 if (token.next != null) token = token.next;
7059 else token = token.next = token_source.getNextToken();
7065 static final public Token getToken(int index) {
7066 Token t = lookingAhead ? jj_scanpos : token;
7067 for (int i = 0; i < index; i++) {
7068 if (t.next != null) t = t.next;
7069 else t = t.next = token_source.getNextToken();
7074 static final private int jj_ntk() {
7075 if ((jj_nt=token.next) == null)
7076 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
7078 return (jj_ntk = jj_nt.kind);
7081 static private java.util.Vector jj_expentries = new java.util.Vector();
7082 static private int[] jj_expentry;
7083 static private int jj_kind = -1;
7084 static private int[] jj_lasttokens = new int[100];
7085 static private int jj_endpos;
7087 static private void jj_add_error_token(int kind, int pos) {
7088 if (pos >= 100) return;
7089 if (pos == jj_endpos + 1) {
7090 jj_lasttokens[jj_endpos++] = kind;
7091 } else if (jj_endpos != 0) {
7092 jj_expentry = new int[jj_endpos];
7093 for (int i = 0; i < jj_endpos; i++) {
7094 jj_expentry[i] = jj_lasttokens[i];
7096 boolean exists = false;
7097 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
7098 int[] oldentry = (int[])(enum.nextElement());
7099 if (oldentry.length == jj_expentry.length) {
7101 for (int i = 0; i < jj_expentry.length; i++) {
7102 if (oldentry[i] != jj_expentry[i]) {
7110 if (!exists) jj_expentries.addElement(jj_expentry);
7111 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
7115 static public ParseException generateParseException() {
7116 jj_expentries.removeAllElements();
7117 boolean[] la1tokens = new boolean[143];
7118 for (int i = 0; i < 143; i++) {
7119 la1tokens[i] = false;
7122 la1tokens[jj_kind] = true;
7125 for (int i = 0; i < 128; i++) {
7126 if (jj_la1[i] == jj_gen) {
7127 for (int j = 0; j < 32; j++) {
7128 if ((jj_la1_0[i] & (1<<j)) != 0) {
7129 la1tokens[j] = true;
7131 if ((jj_la1_1[i] & (1<<j)) != 0) {
7132 la1tokens[32+j] = true;
7134 if ((jj_la1_2[i] & (1<<j)) != 0) {
7135 la1tokens[64+j] = true;
7137 if ((jj_la1_3[i] & (1<<j)) != 0) {
7138 la1tokens[96+j] = true;
7140 if ((jj_la1_4[i] & (1<<j)) != 0) {
7141 la1tokens[128+j] = true;
7146 for (int i = 0; i < 143; i++) {
7148 jj_expentry = new int[1];
7150 jj_expentries.addElement(jj_expentry);
7155 jj_add_error_token(0, 0);
7156 int[][] exptokseq = new int[jj_expentries.size()][];
7157 for (int i = 0; i < jj_expentries.size(); i++) {
7158 exptokseq[i] = (int[])jj_expentries.elementAt(i);
7160 return new ParseException(token, exptokseq, tokenImage);
7163 static final public void enable_tracing() {
7166 static final public void disable_tracing() {
7169 static final private void jj_rescan_token() {
7171 for (int i = 0; i < 6; i++) {
7172 JJCalls p = jj_2_rtns[i];
7174 if (p.gen > jj_gen) {
7175 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7177 case 0: jj_3_1(); break;
7178 case 1: jj_3_2(); break;
7179 case 2: jj_3_3(); break;
7180 case 3: jj_3_4(); break;
7181 case 4: jj_3_5(); break;
7182 case 5: jj_3_6(); break;
7186 } while (p != null);
7191 static final private void jj_save(int index, int xla) {
7192 JJCalls p = jj_2_rtns[index];
7193 while (p.gen > jj_gen) {
7194 if (p.next == null) { p = p.next = new JJCalls(); break; }
7197 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7200 static final class JJCalls {