1 /* Generated By:JavaCC: Do not edit this line. PHPParser.java */
4 import org.eclipse.core.resources.IFile;
5 import org.eclipse.core.resources.IMarker;
6 import org.eclipse.core.runtime.CoreException;
7 import org.eclipse.ui.texteditor.MarkerUtilities;
8 import org.eclipse.jface.preference.IPreferenceStore;
10 import java.util.Hashtable;
11 import java.util.ArrayList;
12 import java.io.StringReader;
14 import java.text.MessageFormat;
16 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
17 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
18 import net.sourceforge.phpdt.internal.compiler.ast.*;
19 import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
20 import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
21 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
22 import net.sourceforge.phpdt.internal.corext.Assert;
26 * This php parser is inspired by the Java 1.2 grammar example
27 * given with JavaCC. You can get JavaCC at http://www.webgain.com
28 * You can test the parser with the PHPParserTestCase2.java
29 * @author Matthieu Casanova
31 public final class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
33 //todo : fix the variables names bug
34 //todo : handle tilde operator
37 /** The current segment. */
38 private static OutlineableWithChildren currentSegment;
40 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
41 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
42 static PHPOutlineInfo outlineInfo;
44 /** The error level of the current ParseException. */
45 private static int errorLevel = ERROR;
46 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
47 private static String errorMessage;
49 private static int errorStart = -1;
50 private static int errorEnd = -1;
51 private static PHPDocument phpDocument;
53 private static final String SYNTAX_ERROR_CHAR = "syntax error";
55 * The point where html starts.
56 * It will be used by the token manager to create HTMLCode objects
58 public static int htmlStart;
61 private final static int AstStackIncrement = 100;
62 /** The stack of node. */
63 private static AstNode[] nodes;
64 /** The cursor in expression stack. */
65 private static int nodePtr;
67 public static final boolean PARSER_DEBUG = false;
69 public final void setFileToParse(final IFile fileToParse) {
70 PHPParser.fileToParse = fileToParse;
76 public PHPParser(final IFile fileToParse) {
77 this(new StringReader(""));
78 PHPParser.fileToParse = fileToParse;
81 public static final void phpParserTester(final String strEval) throws ParseException {
82 final StringReader stream = new StringReader(strEval);
83 if (jj_input_stream == null) {
84 jj_input_stream = new SimpleCharStream(stream, 1, 1);
86 ReInit(new StringReader(strEval));
88 phpDocument = new PHPDocument(null,"_root".toCharArray());
89 currentSegment = phpDocument;
90 outlineInfo = new PHPOutlineInfo(null, currentSegment);
91 PHPParserTokenManager.SwitchTo(PHPParserTokenManager.PHPPARSING);
95 public static final void htmlParserTester(final File fileName) throws FileNotFoundException, ParseException {
96 final Reader stream = new FileReader(fileName);
97 if (jj_input_stream == null) {
98 jj_input_stream = new SimpleCharStream(stream, 1, 1);
102 phpDocument = new PHPDocument(null,"_root".toCharArray());
103 currentSegment = phpDocument;
104 outlineInfo = new PHPOutlineInfo(null, currentSegment);
108 public static final void htmlParserTester(final String strEval) throws ParseException {
109 final StringReader stream = new StringReader(strEval);
110 if (jj_input_stream == null) {
111 jj_input_stream = new SimpleCharStream(stream, 1, 1);
115 phpDocument = new PHPDocument(null,"_root".toCharArray());
116 currentSegment = phpDocument;
117 outlineInfo = new PHPOutlineInfo(null, currentSegment);
122 * Reinitialize the parser.
124 private static final void init() {
125 nodes = new AstNode[AstStackIncrement];
131 * Add an php node on the stack.
132 * @param node the node that will be added to the stack
134 private static final void pushOnAstNodes(final AstNode node) {
136 nodes[++nodePtr] = node;
137 } catch (IndexOutOfBoundsException e) {
138 final int oldStackLength = nodes.length;
139 final AstNode[] oldStack = nodes;
140 nodes = new AstNode[oldStackLength + AstStackIncrement];
141 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
142 nodePtr = oldStackLength;
143 nodes[nodePtr] = node;
147 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
148 phpDocument = new PHPDocument(parent,"_root".toCharArray());
149 currentSegment = phpDocument;
150 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
151 final StringReader stream = new StringReader(s);
152 if (jj_input_stream == null) {
153 jj_input_stream = new SimpleCharStream(stream, 1, 1);
159 phpDocument.nodes = new AstNode[nodes.length];
160 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
161 if (PHPeclipsePlugin.DEBUG) {
162 PHPeclipsePlugin.log(1,phpDocument.toString());
164 } catch (ParseException e) {
165 processParseException(e);
171 * This function will throw the exception if we are in debug mode
172 * and process it if we are in production mode.
173 * this should be fast since the PARSER_DEBUG is static final so the difference will be at compile time
174 * @param e the exception
175 * @throws ParseException the thrown exception
177 private static void processParseExceptionDebug(final ParseException e) throws ParseException {
181 processParseException(e);
184 * This method will process the parse exception.
185 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
186 * @param e the ParseException
188 private static void processParseException(final ParseException e) {
189 if (errorMessage == null) {
190 PHPeclipsePlugin.log(e);
191 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
192 errorStart = e.currentToken.sourceStart;
193 errorEnd = e.currentToken.sourceEnd;
197 // if (PHPeclipsePlugin.DEBUG) PHPeclipsePlugin.log(e);
201 * Create marker for the parse error.
202 * @param e the ParseException
204 private static void setMarker(final ParseException e) {
206 if (errorStart == -1) {
207 setMarker(fileToParse,
209 e.currentToken.sourceStart,
210 e.currentToken.sourceEnd,
212 "Line " + e.currentToken.beginLine+", "+e.currentToken.sourceStart+":"+e.currentToken.sourceEnd);
214 setMarker(fileToParse,
219 "Line " + e.currentToken.beginLine+", "+errorStart+":"+errorEnd);
223 } catch (CoreException e2) {
224 PHPeclipsePlugin.log(e2);
228 private static void scanLine(final String output,
231 final int brIndx) throws CoreException {
233 final StringBuffer lineNumberBuffer = new StringBuffer(10);
235 current = output.substring(indx, brIndx);
237 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
238 final int onLine = current.indexOf("on line <b>");
240 lineNumberBuffer.delete(0, lineNumberBuffer.length());
241 for (int i = onLine; i < current.length(); i++) {
242 ch = current.charAt(i);
243 if ('0' <= ch && '9' >= ch) {
244 lineNumberBuffer.append(ch);
248 final int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
250 final Hashtable attributes = new Hashtable();
252 current = current.replaceAll("\n", "");
253 current = current.replaceAll("<b>", "");
254 current = current.replaceAll("</b>", "");
255 MarkerUtilities.setMessage(attributes, current);
257 if (current.indexOf(PARSE_ERROR_STRING) != -1)
258 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
259 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
260 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
262 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
263 MarkerUtilities.setLineNumber(attributes, lineNumber);
264 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
269 public final void parse(final String s) {
270 final StringReader stream = new StringReader(s);
271 if (jj_input_stream == null) {
272 jj_input_stream = new SimpleCharStream(stream, 1, 1);
278 } catch (ParseException e) {
279 processParseException(e);
284 * Call the php parse command ( php -l -f <filename> )
285 * and create markers according to the external parser output
287 public static void phpExternalParse(final IFile file) {
288 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
289 final String filename = file.getLocation().toString();
291 final String[] arguments = { filename };
292 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
293 final String command = form.format(arguments);
295 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
298 // parse the buffer to find the errors and warnings
299 createMarkers(parserResult, file);
300 } catch (CoreException e) {
301 PHPeclipsePlugin.log(e);
306 * Put a new html block in the stack.
308 public static final void createNewHTMLCode() {
309 final int currentPosition = token.sourceStart;
310 if (currentPosition == htmlStart ||
311 currentPosition > SimpleCharStream.currentBuffer.length()) {
314 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray();
315 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
318 /** Create a new task. */
319 public static final void createNewTask() {
320 final int currentPosition = token.sourceStart;
321 final String todo = SimpleCharStream.currentBuffer.substring(currentPosition-3,
322 SimpleCharStream.currentBuffer.indexOf("\n",
326 setMarker(fileToParse,
328 SimpleCharStream.getBeginLine(),
330 "Line "+SimpleCharStream.getBeginLine());
331 } catch (CoreException e) {
332 PHPeclipsePlugin.log(e);
337 private static final void parse() throws ParseException {
341 static final public void phpTest() throws ParseException {
346 static final public void phpFile() throws ParseException {
350 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
389 case INTEGER_LITERAL:
390 case FLOATING_POINT_LITERAL:
405 PHPParser.createNewHTMLCode();
406 } catch (TokenMgrError e) {
407 PHPeclipsePlugin.log(e);
408 errorStart = SimpleCharStream.beginOffset;
409 errorEnd = SimpleCharStream.endOffset;
410 errorMessage = e.getMessage();
412 {if (true) throw generateParseException();}
417 * A php block is a <?= expression [;]?>
418 * or <?php somephpcode ?>
419 * or <? somephpcode ?>
421 static final public void PhpBlock() throws ParseException {
422 final PHPEchoBlock phpEchoBlock;
424 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
426 phpEchoBlock = phpEchoBlock();
427 pushOnAstNodes(phpEchoBlock);
466 case INTEGER_LITERAL:
467 case FLOATING_POINT_LITERAL:
474 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
477 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
479 jj_consume_token(PHPSTARTLONG);
482 token = jj_consume_token(PHPSTARTSHORT);
484 setMarker(fileToParse,
485 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
489 "Line " + token.beginLine);
490 } catch (CoreException e) {
491 PHPeclipsePlugin.log(e);
496 jj_consume_token(-1);
497 throw new ParseException();
506 jj_consume_token(PHPEND);
507 } catch (ParseException e) {
508 errorMessage = "'?>' expected";
510 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
511 errorEnd = SimpleCharStream.getPosition() + 1;
512 processParseExceptionDebug(e);
517 jj_consume_token(-1);
518 throw new ParseException();
522 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
523 final Expression expr;
524 final PHPEchoBlock echoBlock;
525 final Token token, token2;
526 token = jj_consume_token(PHPECHOSTART);
528 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
530 jj_consume_token(SEMICOLON);
536 token2 = jj_consume_token(PHPEND);
537 echoBlock = new PHPEchoBlock(expr,token.sourceStart,token2.sourceEnd);
538 pushOnAstNodes(echoBlock);
539 {if (true) return echoBlock;}
540 throw new Error("Missing return statement in function");
543 static final public void Php() throws ParseException {
546 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
581 case INTEGER_LITERAL:
582 case FLOATING_POINT_LITERAL:
599 static final public ClassDeclaration ClassDeclaration() throws ParseException {
600 final ClassDeclaration classDeclaration;
601 Token className = null;
602 final Token superclassName, token, extendsToken;
603 String classNameImage = SYNTAX_ERROR_CHAR;
604 String superclassNameImage = null;
605 token = jj_consume_token(CLASS);
607 className = jj_consume_token(IDENTIFIER);
608 classNameImage = className.image;
609 } catch (ParseException e) {
610 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
612 errorStart = token.sourceEnd+1;
613 errorEnd = token.sourceEnd+1;
614 processParseExceptionDebug(e);
616 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
618 extendsToken = jj_consume_token(EXTENDS);
620 superclassName = jj_consume_token(IDENTIFIER);
621 superclassNameImage = superclassName.image;
622 } catch (ParseException e) {
623 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
625 errorStart = extendsToken.sourceEnd+1;
626 errorEnd = extendsToken.sourceEnd+1;
627 processParseExceptionDebug(e);
628 superclassNameImage = SYNTAX_ERROR_CHAR;
636 if (className == null) {
637 start = token.sourceStart;
638 end = token.sourceEnd;
640 start = className.sourceStart;
641 end = className.sourceEnd;
643 if (superclassNameImage == null) {
645 classDeclaration = new ClassDeclaration(currentSegment,
650 classDeclaration = new ClassDeclaration(currentSegment,
656 currentSegment.add(classDeclaration);
657 currentSegment = classDeclaration;
658 ClassBody(classDeclaration);
659 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
660 classDeclaration.sourceEnd = SimpleCharStream.getPosition();
661 pushOnAstNodes(classDeclaration);
662 {if (true) return classDeclaration;}
663 throw new Error("Missing return statement in function");
666 static final public void ClassBody(final ClassDeclaration classDeclaration) throws ParseException {
668 jj_consume_token(LBRACE);
669 } catch (ParseException e) {
670 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "'. '{' expected";
672 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
673 errorEnd = SimpleCharStream.getPosition() + 1;
674 processParseExceptionDebug(e);
678 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
687 ClassBodyDeclaration(classDeclaration);
690 jj_consume_token(RBRACE);
691 } catch (ParseException e) {
692 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. 'var', 'function' or '}' expected";
694 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
695 errorEnd = SimpleCharStream.getPosition() + 1;
696 processParseExceptionDebug(e);
701 * A class can contain only methods and fields.
703 static final public void ClassBodyDeclaration(final ClassDeclaration classDeclaration) throws ParseException {
704 final MethodDeclaration method;
705 final FieldDeclaration field;
706 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
708 method = MethodDeclaration();
709 method.analyzeCode();
710 classDeclaration.addMethod(method);
713 field = FieldDeclaration();
714 classDeclaration.addField(field);
718 jj_consume_token(-1);
719 throw new ParseException();
724 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
725 * it is only used by ClassBodyDeclaration()
727 static final public FieldDeclaration FieldDeclaration() throws ParseException {
728 VariableDeclaration variableDeclaration;
729 final VariableDeclaration[] list;
730 final ArrayList arrayList = new ArrayList();
734 token = jj_consume_token(VAR);
735 variableDeclaration = VariableDeclaratorNoSuffix();
736 arrayList.add(variableDeclaration);
737 outlineInfo.addVariable(variableDeclaration.name());
738 pos = variableDeclaration.sourceEnd;
741 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
749 jj_consume_token(COMMA);
750 variableDeclaration = VariableDeclaratorNoSuffix();
751 arrayList.add(variableDeclaration);
752 outlineInfo.addVariable(variableDeclaration.name());
753 pos = variableDeclaration.sourceEnd;
756 token2 = jj_consume_token(SEMICOLON);
757 } catch (ParseException e) {
758 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
762 processParseExceptionDebug(e);
764 list = new VariableDeclaration[arrayList.size()];
765 arrayList.toArray(list);
767 if (token2 == null) {
768 end = list[list.length-1].sourceEnd;
770 end = token2.sourceEnd;
772 {if (true) return new FieldDeclaration(list,
776 throw new Error("Missing return statement in function");
780 * a strict variable declarator : there cannot be a suffix here.
781 * It will be used by fields and formal parameters
783 static final public VariableDeclaration VariableDeclaratorNoSuffix() throws ParseException {
785 Expression initializer = null;
787 varName = jj_consume_token(DOLLAR_ID);
788 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
790 assignToken = jj_consume_token(ASSIGN);
792 initializer = VariableInitializer();
793 } catch (ParseException e) {
794 errorMessage = "Literal expression expected in variable initializer";
796 errorStart = assignToken.sourceEnd +1;
797 errorEnd = assignToken.sourceEnd +1;
798 processParseExceptionDebug(e);
805 if (initializer == null) {
806 {if (true) return new VariableDeclaration(currentSegment,
807 new Variable(varName.image.substring(1),
808 varName.sourceStart+1,
809 varName.sourceEnd+1),
810 varName.sourceStart+1,
811 varName.sourceEnd+1);}
813 {if (true) return new VariableDeclaration(currentSegment,
814 new Variable(varName.image.substring(1),
815 varName.sourceStart+1,
816 varName.sourceEnd+1),
818 VariableDeclaration.EQUAL,
819 varName.sourceStart+1);}
820 throw new Error("Missing return statement in function");
824 * this will be used by static statement
826 static final public VariableDeclaration VariableDeclarator() throws ParseException {
827 final AbstractVariable variable;
828 Expression initializer = null;
830 variable = VariableDeclaratorId();
831 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
833 token = jj_consume_token(ASSIGN);
835 initializer = VariableInitializer();
836 } catch (ParseException e) {
837 errorMessage = "Literal expression expected in variable initializer";
839 errorStart = token.sourceEnd+1;
840 errorEnd = token.sourceEnd+1;
841 processParseExceptionDebug(e);
848 if (initializer == null) {
849 {if (true) return new VariableDeclaration(currentSegment,
851 variable.sourceStart,
852 variable.sourceEnd);}
854 {if (true) return new VariableDeclaration(currentSegment,
857 VariableDeclaration.EQUAL,
858 variable.sourceStart);}
859 throw new Error("Missing return statement in function");
864 * @return the variable name (with suffix)
866 static final public AbstractVariable VariableDeclaratorId() throws ParseException {
868 AbstractVariable expression = null;
878 expression = VariableSuffix(var);
880 if (expression == null) {
881 {if (true) return var;}
883 {if (true) return expression;}
884 } catch (ParseException e) {
885 errorMessage = "'$' expected for variable identifier";
887 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
888 errorEnd = SimpleCharStream.getPosition() + 1;
891 throw new Error("Missing return statement in function");
895 * Return a variablename without the $.
896 * @return a variable name
900 final StringBuffer buff;
901 Expression expression = null;
908 [<LBRACE> expression = Expression() <RBRACE>]
910 if (expression == null) {
911 return new Variable(token.image.substring(1),
915 String s = expression.toStringExpression();
916 buff = new StringBuffer(token.image.length()+s.length()+2);
917 buff.append(token.image);
922 return new Variable(s,token.sourceStart+1,token.sourceEnd+1);
926 expr = VariableName()
927 {return new Variable(expr,token.sourceStart,expr.sourceEnd);}
929 static final public Variable Variable() throws ParseException {
930 Variable variable = null;
932 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
934 token = jj_consume_token(DOLLAR_ID);
935 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
940 variable = Var(token);
946 if (variable == null) {
947 {if (true) return new Variable(token.image.substring(1),token.sourceStart+1,token.sourceEnd+1);}
949 final StringBuffer buff = new StringBuffer();
950 buff.append(token.image.substring(1));
951 buff.append(variable.toStringExpression());
952 {if (true) return new Variable(buff.toString(),token.sourceStart+1,variable.sourceEnd+1);}
955 token = jj_consume_token(DOLLAR);
956 variable = Var(token);
957 {if (true) return new Variable(variable,token.sourceStart,variable.sourceEnd);}
961 jj_consume_token(-1);
962 throw new ParseException();
964 throw new Error("Missing return statement in function");
967 static final public Variable Var(final Token dollar) throws ParseException {
968 Variable variable = null;
970 ConstantIdentifier constant;
971 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
973 token = jj_consume_token(DOLLAR_ID);
974 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
979 variable = Var(token);
985 if (variable == null) {
986 {if (true) return new Variable(token.image.substring(1),token.sourceStart+1,token.sourceEnd+1);}
988 final StringBuffer buff = new StringBuffer();
989 buff.append(token.image.substring(1));
990 buff.append(variable.toStringExpression());
991 {if (true) return new Variable(buff.toString(),dollar.sourceStart,variable.sourceEnd);}
995 if (jj_2_2(2147483647)) {
996 token = jj_consume_token(DOLLAR);
997 variable = Var(token);
998 {if (true) return new Variable(variable,dollar.sourceStart,variable.sourceEnd);}
1000 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1003 constant = VariableName();
1004 {if (true) return new Variable(constant.name,dollar.sourceStart,constant.sourceEnd);}
1007 jj_la1[16] = jj_gen;
1008 jj_consume_token(-1);
1009 throw new ParseException();
1013 throw new Error("Missing return statement in function");
1017 * A Variable name (without the $)
1018 * @return a variable name String
1020 static final public ConstantIdentifier VariableName() throws ParseException {
1021 final StringBuffer buff;
1023 Expression expression = null;
1025 Token token2 = null;
1026 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1028 token = jj_consume_token(LBRACE);
1029 expression = Expression();
1030 token2 = jj_consume_token(RBRACE);
1031 expr = expression.toStringExpression();
1032 buff = new StringBuffer(expr.length()+2);
1036 expr = buff.toString();
1037 {if (true) return new ConstantIdentifier(expr,
1042 token = jj_consume_token(IDENTIFIER);
1043 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1045 jj_consume_token(LBRACE);
1046 expression = Expression();
1047 token2 = jj_consume_token(RBRACE);
1050 jj_la1[17] = jj_gen;
1053 if (expression == null) {
1054 {if (true) return new ConstantIdentifier(token.image,
1058 expr = expression.toStringExpression();
1059 buff = new StringBuffer(token.image.length()+expr.length()+2);
1060 buff.append(token.image);
1064 expr = buff.toString();
1065 {if (true) return new ConstantIdentifier(expr,
1070 jj_la1[18] = jj_gen;
1071 jj_consume_token(-1);
1072 throw new ParseException();
1074 throw new Error("Missing return statement in function");
1077 static final public Expression VariableInitializer() throws ParseException {
1078 final Expression expr;
1079 final Token token, token2;
1080 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1084 case INTEGER_LITERAL:
1085 case FLOATING_POINT_LITERAL:
1086 case STRING_LITERAL:
1088 {if (true) return expr;}
1091 token2 = jj_consume_token(MINUS);
1092 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1093 case INTEGER_LITERAL:
1094 token = jj_consume_token(INTEGER_LITERAL);
1096 case FLOATING_POINT_LITERAL:
1097 token = jj_consume_token(FLOATING_POINT_LITERAL);
1100 jj_la1[19] = jj_gen;
1101 jj_consume_token(-1);
1102 throw new ParseException();
1104 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
1106 token2.sourceStart);}
1109 token2 = jj_consume_token(PLUS);
1110 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1111 case INTEGER_LITERAL:
1112 token = jj_consume_token(INTEGER_LITERAL);
1114 case FLOATING_POINT_LITERAL:
1115 token = jj_consume_token(FLOATING_POINT_LITERAL);
1118 jj_la1[20] = jj_gen;
1119 jj_consume_token(-1);
1120 throw new ParseException();
1122 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
1124 token2.sourceStart);}
1127 expr = ArrayDeclarator();
1128 {if (true) return expr;}
1131 token = jj_consume_token(IDENTIFIER);
1132 {if (true) return new ConstantIdentifier(token);}
1135 jj_la1[21] = jj_gen;
1136 jj_consume_token(-1);
1137 throw new ParseException();
1139 throw new Error("Missing return statement in function");
1142 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
1143 final Expression expr,expr2;
1144 expr = Expression();
1145 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1147 jj_consume_token(ARRAYASSIGN);
1148 expr2 = Expression();
1149 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
1152 jj_la1[22] = jj_gen;
1155 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
1156 throw new Error("Missing return statement in function");
1159 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
1160 ArrayVariableDeclaration expr;
1161 final ArrayList list = new ArrayList();
1162 jj_consume_token(LPAREN);
1163 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1179 case INTEGER_LITERAL:
1180 case FLOATING_POINT_LITERAL:
1181 case STRING_LITERAL:
1185 expr = ArrayVariable();
1194 jj_consume_token(COMMA);
1195 expr = ArrayVariable();
1200 jj_la1[23] = jj_gen;
1203 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1205 jj_consume_token(COMMA);
1209 jj_la1[24] = jj_gen;
1212 jj_consume_token(RPAREN);
1213 final ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1215 {if (true) return vars;}
1216 throw new Error("Missing return statement in function");
1220 * A Method Declaration.
1221 * <b>function</b> MetodDeclarator() Block()
1223 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1224 final MethodDeclaration functionDeclaration;
1226 final OutlineableWithChildren seg = currentSegment;
1228 token = jj_consume_token(FUNCTION);
1230 functionDeclaration = MethodDeclarator(token.sourceStart);
1231 outlineInfo.addVariable(functionDeclaration.name);
1232 } catch (ParseException e) {
1233 if (errorMessage != null) {if (true) throw e;}
1234 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1236 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1237 errorEnd = SimpleCharStream.getPosition() + 1;
1238 {if (true) throw e;}
1240 currentSegment = functionDeclaration;
1242 functionDeclaration.statements = block.statements;
1243 currentSegment = seg;
1244 {if (true) return functionDeclaration;}
1245 throw new Error("Missing return statement in function");
1249 * A MethodDeclarator.
1250 * [&] IDENTIFIER(parameters ...).
1251 * @return a function description for the outline
1253 static final public MethodDeclaration MethodDeclarator(final int start) throws ParseException {
1254 Token identifier = null;
1255 Token reference = null;
1256 final Hashtable formalParameters = new Hashtable();
1257 String identifierChar = SYNTAX_ERROR_CHAR;
1259 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1261 reference = jj_consume_token(BIT_AND);
1262 end = reference.sourceEnd;
1265 jj_la1[25] = jj_gen;
1269 identifier = jj_consume_token(IDENTIFIER);
1270 identifierChar = identifier.image;
1271 end = identifier.sourceEnd;
1272 } catch (ParseException e) {
1273 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1275 errorStart = e.currentToken.sourceEnd;
1276 errorEnd = e.currentToken.next.sourceStart;
1277 processParseExceptionDebug(e);
1279 end = FormalParameters(formalParameters);
1280 int nameStart, nameEnd;
1281 if (identifier == null) {
1282 if (reference == null) {
1283 nameStart = start + 9;
1284 nameEnd = start + 10;
1286 nameStart = reference.sourceEnd + 1;
1287 nameEnd = reference.sourceEnd + 2;
1290 nameStart = identifier.sourceStart;
1291 nameEnd = identifier.sourceEnd;
1293 {if (true) return new MethodDeclaration(currentSegment,
1301 throw new Error("Missing return statement in function");
1305 * FormalParameters follows method identifier.
1306 * (FormalParameter())
1308 static final public int FormalParameters(final Hashtable parameters) throws ParseException {
1309 VariableDeclaration var;
1311 Token tok = PHPParser.token;
1312 int end = tok.sourceEnd;
1314 tok = jj_consume_token(LPAREN);
1315 end = tok.sourceEnd;
1316 } catch (ParseException e) {
1317 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1319 errorStart = e.currentToken.next.sourceStart;
1320 errorEnd = e.currentToken.next.sourceEnd;
1321 processParseExceptionDebug(e);
1323 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1326 var = FormalParameter();
1327 parameters.put(var.name(),var);end = var.sourceEnd;
1330 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1335 jj_la1[26] = jj_gen;
1338 jj_consume_token(COMMA);
1339 var = FormalParameter();
1340 parameters.put(var.name(),var);end = var.sourceEnd;
1344 jj_la1[27] = jj_gen;
1348 token = jj_consume_token(RPAREN);
1349 end = token.sourceEnd;
1350 } catch (ParseException e) {
1351 errorMessage = "')' expected";
1353 errorStart = e.currentToken.next.sourceStart;
1354 errorEnd = e.currentToken.next.sourceEnd;
1355 processParseExceptionDebug(e);
1357 {if (true) return end;}
1358 throw new Error("Missing return statement in function");
1362 * A formal parameter.
1363 * $varname[=value] (,$varname[=value])
1365 static final public VariableDeclaration FormalParameter() throws ParseException {
1366 final VariableDeclaration variableDeclaration;
1368 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1370 token = jj_consume_token(BIT_AND);
1373 jj_la1[28] = jj_gen;
1376 variableDeclaration = VariableDeclaratorNoSuffix();
1377 if (token != null) {
1378 variableDeclaration.setReference(true);
1380 {if (true) return variableDeclaration;}
1381 throw new Error("Missing return statement in function");
1384 static final public ConstantIdentifier Type() throws ParseException {
1386 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1388 token = jj_consume_token(STRING);
1389 {if (true) return new ConstantIdentifier(token);}
1392 token = jj_consume_token(BOOL);
1393 {if (true) return new ConstantIdentifier(token);}
1396 token = jj_consume_token(BOOLEAN);
1397 {if (true) return new ConstantIdentifier(token);}
1400 token = jj_consume_token(REAL);
1401 {if (true) return new ConstantIdentifier(token);}
1404 token = jj_consume_token(DOUBLE);
1405 {if (true) return new ConstantIdentifier(token);}
1408 token = jj_consume_token(FLOAT);
1409 {if (true) return new ConstantIdentifier(token);}
1412 token = jj_consume_token(INT);
1413 {if (true) return new ConstantIdentifier(token);}
1416 token = jj_consume_token(INTEGER);
1417 {if (true) return new ConstantIdentifier(token);}
1420 token = jj_consume_token(OBJECT);
1421 {if (true) return new ConstantIdentifier(token);}
1424 jj_la1[29] = jj_gen;
1425 jj_consume_token(-1);
1426 throw new ParseException();
1428 throw new Error("Missing return statement in function");
1431 static final public Expression Expression() throws ParseException {
1432 final Expression expr;
1433 Expression initializer = null;
1434 int assignOperator = -1;
1435 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1449 case INTEGER_LITERAL:
1450 case FLOATING_POINT_LITERAL:
1451 case STRING_LITERAL:
1455 expr = ConditionalExpression();
1456 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1469 case RSIGNEDSHIFTASSIGN:
1470 assignOperator = AssignmentOperator();
1472 initializer = Expression();
1473 } catch (ParseException e) {
1474 if (errorMessage != null) {
1475 {if (true) throw e;}
1477 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1479 errorEnd = SimpleCharStream.getPosition();
1480 {if (true) throw e;}
1484 jj_la1[30] = jj_gen;
1487 if (assignOperator != -1) {// todo : change this, very very bad :(
1488 if (expr instanceof AbstractVariable) {
1489 {if (true) return new VariableDeclaration(currentSegment,
1490 (AbstractVariable) expr,
1493 initializer.sourceEnd);}
1495 String varName = expr.toStringExpression().substring(1);
1496 {if (true) return new VariableDeclaration(currentSegment,
1497 new Variable(varName,
1501 initializer.sourceEnd);}
1503 {if (true) return expr;}
1507 expr = ExpressionWBang();
1508 {if (true) return expr;}
1511 jj_la1[31] = jj_gen;
1512 jj_consume_token(-1);
1513 throw new ParseException();
1515 throw new Error("Missing return statement in function");
1518 static final public Expression ExpressionWBang() throws ParseException {
1519 final Expression expr;
1521 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1523 token = jj_consume_token(BANG);
1524 expr = ExpressionWBang();
1525 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
1529 expr = ExpressionNoBang();
1530 {if (true) return expr;}
1533 jj_la1[32] = jj_gen;
1534 jj_consume_token(-1);
1535 throw new ParseException();
1537 throw new Error("Missing return statement in function");
1540 static final public Expression ExpressionNoBang() throws ParseException {
1542 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1544 expr = ListExpression();
1545 {if (true) return expr;}
1548 expr = PrintExpression();
1549 {if (true) return expr;}
1552 jj_la1[33] = jj_gen;
1553 jj_consume_token(-1);
1554 throw new ParseException();
1556 throw new Error("Missing return statement in function");
1560 * Any assignement operator.
1561 * @return the assignement operator id
1563 static final public int AssignmentOperator() throws ParseException {
1564 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1566 jj_consume_token(ASSIGN);
1567 {if (true) return VariableDeclaration.EQUAL;}
1570 jj_consume_token(STARASSIGN);
1571 {if (true) return VariableDeclaration.STAR_EQUAL;}
1574 jj_consume_token(SLASHASSIGN);
1575 {if (true) return VariableDeclaration.SLASH_EQUAL;}
1578 jj_consume_token(REMASSIGN);
1579 {if (true) return VariableDeclaration.REM_EQUAL;}
1582 jj_consume_token(PLUSASSIGN);
1583 {if (true) return VariableDeclaration.PLUS_EQUAL;}
1586 jj_consume_token(MINUSASSIGN);
1587 {if (true) return VariableDeclaration.MINUS_EQUAL;}
1590 jj_consume_token(LSHIFTASSIGN);
1591 {if (true) return VariableDeclaration.LSHIFT_EQUAL;}
1593 case RSIGNEDSHIFTASSIGN:
1594 jj_consume_token(RSIGNEDSHIFTASSIGN);
1595 {if (true) return VariableDeclaration.RSIGNEDSHIFT_EQUAL;}
1598 jj_consume_token(ANDASSIGN);
1599 {if (true) return VariableDeclaration.AND_EQUAL;}
1602 jj_consume_token(XORASSIGN);
1603 {if (true) return VariableDeclaration.XOR_EQUAL;}
1606 jj_consume_token(ORASSIGN);
1607 {if (true) return VariableDeclaration.OR_EQUAL;}
1610 jj_consume_token(DOTASSIGN);
1611 {if (true) return VariableDeclaration.DOT_EQUAL;}
1614 jj_consume_token(TILDEEQUAL);
1615 {if (true) return VariableDeclaration.TILDE_EQUAL;}
1618 jj_la1[34] = jj_gen;
1619 jj_consume_token(-1);
1620 throw new ParseException();
1622 throw new Error("Missing return statement in function");
1625 static final public Expression ConditionalExpression() throws ParseException {
1626 final Expression expr;
1627 Expression expr2 = null;
1628 Expression expr3 = null;
1629 expr = ConditionalOrExpression();
1630 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1632 jj_consume_token(HOOK);
1633 expr2 = Expression();
1634 jj_consume_token(COLON);
1635 expr3 = ConditionalExpression();
1638 jj_la1[35] = jj_gen;
1641 if (expr3 == null) {
1642 {if (true) return expr;}
1644 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1645 throw new Error("Missing return statement in function");
1648 static final public Expression ConditionalOrExpression() throws ParseException {
1649 Expression expr,expr2;
1651 expr = ConditionalAndExpression();
1654 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1660 jj_la1[36] = jj_gen;
1663 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1665 jj_consume_token(OR_OR);
1666 operator = OperatorIds.OR_OR;
1669 jj_consume_token(_ORL);
1670 operator = OperatorIds.ORL;
1673 jj_la1[37] = jj_gen;
1674 jj_consume_token(-1);
1675 throw new ParseException();
1677 expr2 = ConditionalAndExpression();
1678 expr = new BinaryExpression(expr,expr2,operator);
1680 {if (true) return expr;}
1681 throw new Error("Missing return statement in function");
1684 static final public Expression ConditionalAndExpression() throws ParseException {
1685 Expression expr,expr2;
1687 expr = ConcatExpression();
1690 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1696 jj_la1[38] = jj_gen;
1699 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1701 jj_consume_token(AND_AND);
1702 operator = OperatorIds.AND_AND;
1705 jj_consume_token(_ANDL);
1706 operator = OperatorIds.ANDL;
1709 jj_la1[39] = jj_gen;
1710 jj_consume_token(-1);
1711 throw new ParseException();
1713 expr2 = ConcatExpression();
1714 expr = new BinaryExpression(expr,expr2,operator);
1716 {if (true) return expr;}
1717 throw new Error("Missing return statement in function");
1720 static final public Expression ConcatExpression() throws ParseException {
1721 Expression expr,expr2;
1722 expr = InclusiveOrExpression();
1725 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1730 jj_la1[40] = jj_gen;
1733 jj_consume_token(DOT);
1734 expr2 = InclusiveOrExpression();
1735 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1737 {if (true) return expr;}
1738 throw new Error("Missing return statement in function");
1741 static final public Expression InclusiveOrExpression() throws ParseException {
1742 Expression expr,expr2;
1743 expr = ExclusiveOrExpression();
1746 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1751 jj_la1[41] = jj_gen;
1754 jj_consume_token(BIT_OR);
1755 expr2 = ExclusiveOrExpression();
1756 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1758 {if (true) return expr;}
1759 throw new Error("Missing return statement in function");
1762 static final public Expression ExclusiveOrExpression() throws ParseException {
1763 Expression expr,expr2;
1764 expr = AndExpression();
1767 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1772 jj_la1[42] = jj_gen;
1775 jj_consume_token(XOR);
1776 expr2 = AndExpression();
1777 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1779 {if (true) return expr;}
1780 throw new Error("Missing return statement in function");
1783 static final public Expression AndExpression() throws ParseException {
1784 Expression expr,expr2;
1785 expr = EqualityExpression();
1788 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1793 jj_la1[43] = jj_gen;
1796 jj_consume_token(BIT_AND);
1797 expr2 = EqualityExpression();
1798 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1800 {if (true) return expr;}
1801 throw new Error("Missing return statement in function");
1804 static final public Expression EqualityExpression() throws ParseException {
1805 Expression expr,expr2;
1808 expr = RelationalExpression();
1811 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1815 case BANGDOUBLEEQUAL:
1820 jj_la1[44] = jj_gen;
1823 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1825 token = jj_consume_token(EQUAL_EQUAL);
1826 operator = OperatorIds.EQUAL_EQUAL;
1829 token = jj_consume_token(DIF);
1830 operator = OperatorIds.DIF;
1833 token = jj_consume_token(NOT_EQUAL);
1834 operator = OperatorIds.DIF;
1836 case BANGDOUBLEEQUAL:
1837 token = jj_consume_token(BANGDOUBLEEQUAL);
1838 operator = OperatorIds.BANG_EQUAL_EQUAL;
1841 token = jj_consume_token(TRIPLEEQUAL);
1842 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1845 jj_la1[45] = jj_gen;
1846 jj_consume_token(-1);
1847 throw new ParseException();
1850 expr2 = RelationalExpression();
1851 } catch (ParseException e) {
1852 if (errorMessage != null) {
1853 {if (true) throw e;}
1855 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1857 errorStart = token.sourceEnd +1;
1858 errorEnd = token.sourceEnd +1;
1859 expr2 = new ConstantIdentifier(SYNTAX_ERROR_CHAR,token.sourceEnd +1,token.sourceEnd +1);
1860 processParseExceptionDebug(e);
1862 expr = new BinaryExpression(expr,expr2,operator);
1864 {if (true) return expr;}
1865 throw new Error("Missing return statement in function");
1868 static final public Expression RelationalExpression() throws ParseException {
1869 Expression expr,expr2;
1871 expr = ShiftExpression();
1874 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1882 jj_la1[46] = jj_gen;
1885 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1887 jj_consume_token(LT);
1888 operator = OperatorIds.LESS;
1891 jj_consume_token(GT);
1892 operator = OperatorIds.GREATER;
1895 jj_consume_token(LE);
1896 operator = OperatorIds.LESS_EQUAL;
1899 jj_consume_token(GE);
1900 operator = OperatorIds.GREATER_EQUAL;
1903 jj_la1[47] = jj_gen;
1904 jj_consume_token(-1);
1905 throw new ParseException();
1907 expr2 = ShiftExpression();
1908 expr = new BinaryExpression(expr,expr2,operator);
1910 {if (true) return expr;}
1911 throw new Error("Missing return statement in function");
1914 static final public Expression ShiftExpression() throws ParseException {
1915 Expression expr,expr2;
1917 expr = AdditiveExpression();
1920 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1923 case RUNSIGNEDSHIFT:
1927 jj_la1[48] = jj_gen;
1930 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1932 jj_consume_token(LSHIFT);
1933 operator = OperatorIds.LEFT_SHIFT;
1936 jj_consume_token(RSIGNEDSHIFT);
1937 operator = OperatorIds.RIGHT_SHIFT;
1939 case RUNSIGNEDSHIFT:
1940 jj_consume_token(RUNSIGNEDSHIFT);
1941 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1944 jj_la1[49] = jj_gen;
1945 jj_consume_token(-1);
1946 throw new ParseException();
1948 expr2 = AdditiveExpression();
1949 expr = new BinaryExpression(expr,expr2,operator);
1951 {if (true) return expr;}
1952 throw new Error("Missing return statement in function");
1955 static final public Expression AdditiveExpression() throws ParseException {
1956 Expression expr,expr2;
1958 expr = MultiplicativeExpression();
1961 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1967 jj_la1[50] = jj_gen;
1970 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1972 jj_consume_token(PLUS);
1973 operator = OperatorIds.PLUS;
1976 jj_consume_token(MINUS);
1977 operator = OperatorIds.MINUS;
1980 jj_la1[51] = jj_gen;
1981 jj_consume_token(-1);
1982 throw new ParseException();
1984 expr2 = MultiplicativeExpression();
1985 expr = new BinaryExpression(expr,expr2,operator);
1987 {if (true) return expr;}
1988 throw new Error("Missing return statement in function");
1991 static final public Expression MultiplicativeExpression() throws ParseException {
1992 Expression expr,expr2;
1995 expr = UnaryExpression();
1996 } catch (ParseException e) {
1997 if (errorMessage != null) {if (true) throw e;}
1998 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
2000 errorStart = PHPParser.token.sourceStart;
2001 errorEnd = PHPParser.token.sourceEnd;
2002 {if (true) throw e;}
2006 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2013 jj_la1[52] = jj_gen;
2016 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2018 jj_consume_token(STAR);
2019 operator = OperatorIds.MULTIPLY;
2022 jj_consume_token(SLASH);
2023 operator = OperatorIds.DIVIDE;
2026 jj_consume_token(REMAINDER);
2027 operator = OperatorIds.REMAINDER;
2030 jj_la1[53] = jj_gen;
2031 jj_consume_token(-1);
2032 throw new ParseException();
2034 expr2 = UnaryExpression();
2035 expr = new BinaryExpression(expr,expr2,operator);
2037 {if (true) return expr;}
2038 throw new Error("Missing return statement in function");
2042 * An unary expression starting with @, & or nothing
2044 static final public Expression UnaryExpression() throws ParseException {
2045 final Expression expr;
2046 /* <BIT_AND> expr = UnaryExpressionNoPrefix() //why did I had that ?
2047 {return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
2049 expr = AtNotUnaryExpression();
2050 {if (true) return expr;}
2051 throw new Error("Missing return statement in function");
2055 * An expression prefixed (or not) by one or more @ and !.
2056 * @return the expression
2058 static final public Expression AtNotUnaryExpression() throws ParseException {
2059 final Expression expr;
2061 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2063 token = jj_consume_token(AT);
2064 expr = AtNotUnaryExpression();
2065 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,token.sourceStart);}
2068 token = jj_consume_token(BANG);
2069 expr = AtNotUnaryExpression();
2070 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
2083 case INTEGER_LITERAL:
2084 case FLOATING_POINT_LITERAL:
2085 case STRING_LITERAL:
2089 expr = UnaryExpressionNoPrefix();
2090 {if (true) return expr;}
2093 jj_la1[54] = jj_gen;
2094 jj_consume_token(-1);
2095 throw new ParseException();
2097 throw new Error("Missing return statement in function");
2100 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
2101 final Expression expr;
2103 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2105 token = jj_consume_token(PLUS);
2106 expr = AtNotUnaryExpression();
2107 {if (true) return new PrefixedUnaryExpression(expr,
2109 token.sourceStart);}
2112 token = jj_consume_token(MINUS);
2113 expr = AtNotUnaryExpression();
2114 {if (true) return new PrefixedUnaryExpression(expr,
2116 token.sourceStart);}
2120 expr = PreIncDecExpression();
2121 {if (true) return expr;}
2130 case INTEGER_LITERAL:
2131 case FLOATING_POINT_LITERAL:
2132 case STRING_LITERAL:
2136 expr = UnaryExpressionNotPlusMinus();
2137 {if (true) return expr;}
2140 jj_la1[55] = jj_gen;
2141 jj_consume_token(-1);
2142 throw new ParseException();
2144 throw new Error("Missing return statement in function");
2147 static final public Expression PreIncDecExpression() throws ParseException {
2148 final Expression expr;
2151 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2153 token = jj_consume_token(PLUS_PLUS);
2154 operator = OperatorIds.PLUS_PLUS;
2157 token = jj_consume_token(MINUS_MINUS);
2158 operator = OperatorIds.MINUS_MINUS;
2161 jj_la1[56] = jj_gen;
2162 jj_consume_token(-1);
2163 throw new ParseException();
2165 expr = PrimaryExpression();
2166 {if (true) return new PrefixedUnaryExpression(expr,operator,token.sourceStart);}
2167 throw new Error("Missing return statement in function");
2170 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
2171 final Expression expr;
2172 if (jj_2_4(2147483647)) {
2173 expr = CastExpression();
2174 {if (true) return expr;}
2176 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2183 expr = PostfixExpression();
2184 {if (true) return expr;}
2189 case INTEGER_LITERAL:
2190 case FLOATING_POINT_LITERAL:
2191 case STRING_LITERAL:
2193 {if (true) return expr;}
2196 jj_consume_token(LPAREN);
2197 expr = Expression();
2199 jj_consume_token(RPAREN);
2200 } catch (ParseException e) {
2201 errorMessage = "')' expected";
2203 errorStart = expr.sourceEnd +1;
2204 errorEnd = expr.sourceEnd +1;
2205 processParseExceptionDebug(e);
2207 {if (true) return expr;}
2210 jj_la1[57] = jj_gen;
2211 jj_consume_token(-1);
2212 throw new ParseException();
2215 throw new Error("Missing return statement in function");
2218 static final public CastExpression CastExpression() throws ParseException {
2219 final ConstantIdentifier type;
2220 final Expression expr;
2221 final Token token,token1;
2222 token1 = jj_consume_token(LPAREN);
2223 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2236 token = jj_consume_token(ARRAY);
2237 type = new ConstantIdentifier(token);
2240 jj_la1[58] = jj_gen;
2241 jj_consume_token(-1);
2242 throw new ParseException();
2244 jj_consume_token(RPAREN);
2245 expr = UnaryExpression();
2246 {if (true) return new CastExpression(type,expr,token1.sourceStart,expr.sourceEnd);}
2247 throw new Error("Missing return statement in function");
2250 static final public Expression PostfixExpression() throws ParseException {
2251 final Expression expr;
2254 expr = PrimaryExpression();
2255 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2258 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2260 token = jj_consume_token(PLUS_PLUS);
2261 operator = OperatorIds.PLUS_PLUS;
2264 token = jj_consume_token(MINUS_MINUS);
2265 operator = OperatorIds.MINUS_MINUS;
2268 jj_la1[59] = jj_gen;
2269 jj_consume_token(-1);
2270 throw new ParseException();
2274 jj_la1[60] = jj_gen;
2277 if (operator == -1) {
2278 {if (true) return expr;}
2280 {if (true) return new PostfixedUnaryExpression(expr,operator,token.sourceEnd);}
2281 throw new Error("Missing return statement in function");
2284 static final public Expression PrimaryExpression() throws ParseException {
2287 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2293 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2295 token = jj_consume_token(BIT_AND);
2298 jj_la1[61] = jj_gen;
2301 expr = refPrimaryExpression(token);
2302 {if (true) return expr;}
2305 expr = ArrayDeclarator();
2306 {if (true) return expr;}
2309 jj_la1[62] = jj_gen;
2310 jj_consume_token(-1);
2311 throw new ParseException();
2313 throw new Error("Missing return statement in function");
2316 static final public Expression refPrimaryExpression(final Token reference) throws ParseException {
2318 Expression expr2 = null;
2319 final Token identifier;
2320 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2322 identifier = jj_consume_token(IDENTIFIER);
2323 expr = new ConstantIdentifier(identifier);
2326 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2327 case STATICCLASSACCESS:
2331 jj_la1[63] = jj_gen;
2334 jj_consume_token(STATICCLASSACCESS);
2335 expr2 = ClassIdentifier();
2336 expr = new ClassAccess(expr,
2338 ClassAccess.STATIC);
2340 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2342 expr2 = Arguments(expr);
2345 jj_la1[64] = jj_gen;
2348 if (expr2 == null) {
2349 if (reference != null) {
2350 ParseException e = generateParseException();
2351 errorMessage = "you cannot use a constant by reference";
2353 errorStart = reference.sourceStart;
2354 errorEnd = reference.sourceEnd;
2355 processParseExceptionDebug(e);
2357 {if (true) return expr;}
2359 {if (true) return expr2;}
2363 expr = VariableDeclaratorId();
2364 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2366 expr = Arguments(expr);
2369 jj_la1[65] = jj_gen;
2372 {if (true) return expr;}
2375 token = jj_consume_token(NEW);
2376 expr = ClassIdentifier();
2378 if (reference == null) {
2379 start = token.sourceStart;
2381 start = reference.sourceStart;
2383 expr = new ClassInstantiation(expr,
2386 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2388 expr = Arguments(expr);
2391 jj_la1[66] = jj_gen;
2394 {if (true) return expr;}
2397 jj_la1[67] = jj_gen;
2398 jj_consume_token(-1);
2399 throw new ParseException();
2401 throw new Error("Missing return statement in function");
2405 * An array declarator.
2409 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2410 final ArrayVariableDeclaration[] vars;
2412 token = jj_consume_token(ARRAY);
2413 vars = ArrayInitializer();
2414 {if (true) return new ArrayInitializer(vars,
2416 PHPParser.token.sourceEnd);}
2417 throw new Error("Missing return statement in function");
2420 static final public Expression ClassIdentifier() throws ParseException {
2421 final Expression expr;
2423 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2425 token = jj_consume_token(IDENTIFIER);
2426 {if (true) return new ConstantIdentifier(token);}
2438 {if (true) return expr;}
2442 expr = VariableDeclaratorId();
2443 {if (true) return expr;}
2446 jj_la1[68] = jj_gen;
2447 jj_consume_token(-1);
2448 throw new ParseException();
2450 throw new Error("Missing return statement in function");
2454 * Used by Variabledeclaratorid and primarysuffix
2456 static final public AbstractVariable VariableSuffix(final AbstractVariable prefix) throws ParseException {
2457 Expression expression = null;
2458 final Token classAccessToken;
2461 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2463 classAccessToken = jj_consume_token(CLASSACCESS);
2465 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2468 expression = VariableName();
2472 expression = Variable();
2475 jj_la1[69] = jj_gen;
2476 jj_consume_token(-1);
2477 throw new ParseException();
2479 } catch (ParseException e) {
2480 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2482 errorStart = classAccessToken.sourceEnd +1;
2483 errorEnd = classAccessToken.sourceEnd +1;
2484 processParseExceptionDebug(e);
2486 {if (true) return new ClassAccess(prefix,
2488 ClassAccess.NORMAL);}
2491 token = jj_consume_token(LBRACKET);
2492 pos = token.sourceEnd+1;
2493 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2518 case INTEGER_LITERAL:
2519 case FLOATING_POINT_LITERAL:
2520 case STRING_LITERAL:
2524 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2540 case INTEGER_LITERAL:
2541 case FLOATING_POINT_LITERAL:
2542 case STRING_LITERAL:
2546 expression = Expression();
2547 pos = expression.sourceEnd+1;
2558 expression = Type();
2559 pos = expression.sourceEnd+1;
2562 jj_la1[70] = jj_gen;
2563 jj_consume_token(-1);
2564 throw new ParseException();
2568 jj_la1[71] = jj_gen;
2572 token = jj_consume_token(RBRACKET);
2573 pos = token.sourceEnd;
2574 } catch (ParseException e) {
2575 errorMessage = "']' expected";
2579 processParseExceptionDebug(e);
2581 {if (true) return new ArrayDeclarator(prefix,expression,pos);}
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 Literal Literal() throws ParseException {
2593 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2594 case INTEGER_LITERAL:
2595 token = jj_consume_token(INTEGER_LITERAL);
2596 {if (true) return new NumberLiteral(token);}
2598 case FLOATING_POINT_LITERAL:
2599 token = jj_consume_token(FLOATING_POINT_LITERAL);
2600 {if (true) return new NumberLiteral(token);}
2602 case STRING_LITERAL:
2603 token = jj_consume_token(STRING_LITERAL);
2604 {if (true) return new StringLiteral(token);}
2607 token = jj_consume_token(TRUE);
2608 {if (true) return new TrueLiteral(token);}
2611 token = jj_consume_token(FALSE);
2612 {if (true) return new FalseLiteral(token);}
2615 token = jj_consume_token(NULL);
2616 {if (true) return new NullLiteral(token);}
2619 jj_la1[73] = jj_gen;
2620 jj_consume_token(-1);
2621 throw new ParseException();
2623 throw new Error("Missing return statement in function");
2626 static final public FunctionCall Arguments(final Expression func) throws ParseException {
2627 Expression[] args = null;
2629 jj_consume_token(LPAREN);
2630 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2646 case INTEGER_LITERAL:
2647 case FLOATING_POINT_LITERAL:
2648 case STRING_LITERAL:
2652 args = ArgumentList();
2655 jj_la1[74] = jj_gen;
2659 token = jj_consume_token(RPAREN);
2660 {if (true) return new FunctionCall(func,args,token.sourceEnd);}
2661 } catch (ParseException e) {
2662 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2664 errorStart = args[args.length-1].sourceEnd+1;
2665 errorEnd = args[args.length-1].sourceEnd+1;
2666 processParseExceptionDebug(e);
2668 {if (true) return new FunctionCall(func,args,args[args.length-1].sourceEnd);}
2669 throw new Error("Missing return statement in function");
2673 * An argument list is a list of arguments separated by comma :
2674 * argumentDeclaration() (, argumentDeclaration)*
2675 * @return an array of arguments
2677 static final public Expression[] ArgumentList() throws ParseException {
2679 final ArrayList list = new ArrayList();
2683 list.add(arg);pos = arg.sourceEnd;
2686 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2691 jj_la1[75] = jj_gen;
2694 token = jj_consume_token(COMMA);
2695 pos = token.sourceEnd;
2699 pos = arg.sourceEnd;
2700 } catch (ParseException e) {
2701 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2705 processParseException(e);
2708 final Expression[] arguments = new Expression[list.size()];
2709 list.toArray(arguments);
2710 {if (true) return arguments;}
2711 throw new Error("Missing return statement in function");
2715 * A Statement without break.
2716 * @return a statement
2718 static final public Statement StatementNoBreak() throws ParseException {
2719 final Statement statement;
2722 statement = expressionStatement();
2723 {if (true) return statement;}
2725 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2727 statement = LabeledStatement();
2728 {if (true) return statement;}
2731 statement = Block();
2732 {if (true) return statement;}
2735 statement = EmptyStatement();
2736 {if (true) return statement;}
2739 statement = SwitchStatement();
2740 {if (true) return statement;}
2743 statement = IfStatement();
2744 {if (true) return statement;}
2747 statement = WhileStatement();
2748 {if (true) return statement;}
2751 statement = DoStatement();
2752 {if (true) return statement;}
2755 statement = ForStatement();
2756 {if (true) return statement;}
2759 statement = ForeachStatement();
2760 {if (true) return statement;}
2763 statement = ContinueStatement();
2764 {if (true) return statement;}
2767 statement = ReturnStatement();
2768 {if (true) return statement;}
2771 statement = EchoStatement();
2772 {if (true) return statement;}
2779 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2781 token = jj_consume_token(AT);
2784 jj_la1[76] = jj_gen;
2787 statement = IncludeStatement();
2788 if (token != null) {
2789 ((InclusionStatement)statement).silent = true;
2790 statement.sourceStart = token.sourceStart;
2792 {if (true) return statement;}
2795 statement = StaticStatement();
2796 {if (true) return statement;}
2799 statement = GlobalStatement();
2800 {if (true) return statement;}
2803 statement = defineStatement();
2804 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2807 jj_la1[77] = jj_gen;
2808 jj_consume_token(-1);
2809 throw new ParseException();
2812 throw new Error("Missing return statement in function");
2816 * A statement expression.
2818 * @return an expression
2820 static final public Statement expressionStatement() throws ParseException {
2821 final Statement statement;
2823 statement = Expression();
2825 token = jj_consume_token(SEMICOLON);
2826 statement.sourceEnd = token.sourceEnd;
2827 } catch (ParseException e) {
2828 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2829 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2831 errorStart = statement.sourceEnd+1;
2832 errorEnd = statement.sourceEnd+1;
2833 processParseExceptionDebug(e);
2836 {if (true) return statement;}
2837 throw new Error("Missing return statement in function");
2840 static final public Define defineStatement() throws ParseException {
2841 Expression defineName,defineValue;
2842 final Token defineToken;
2845 defineToken = jj_consume_token(DEFINE);
2846 pos = defineToken.sourceEnd+1;
2848 token = jj_consume_token(LPAREN);
2849 pos = token.sourceEnd+1;
2850 } catch (ParseException e) {
2851 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2855 processParseExceptionDebug(e);
2858 defineName = Expression();
2859 pos = defineName.sourceEnd+1;
2860 } catch (ParseException e) {
2861 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2865 processParseExceptionDebug(e);
2866 defineName = new StringLiteral(SYNTAX_ERROR_CHAR,pos,pos);
2869 token = jj_consume_token(COMMA);
2870 pos = defineName.sourceEnd+1;
2871 } catch (ParseException e) {
2872 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2876 processParseExceptionDebug(e);
2879 defineValue = Expression();
2880 pos = defineValue.sourceEnd+1;
2881 } catch (ParseException e) {
2882 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2886 processParseExceptionDebug(e);
2887 defineValue = new StringLiteral(SYNTAX_ERROR_CHAR,pos,pos);
2890 token = jj_consume_token(RPAREN);
2891 pos = token.sourceEnd+1;
2892 } catch (ParseException e) {
2893 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2897 processParseExceptionDebug(e);
2899 {if (true) return new Define(currentSegment,
2902 defineToken.sourceStart,
2904 throw new Error("Missing return statement in function");
2908 * A Normal statement.
2910 static final public Statement Statement() throws ParseException {
2911 final Statement statement;
2912 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2944 case INTEGER_LITERAL:
2945 case FLOATING_POINT_LITERAL:
2946 case STRING_LITERAL:
2952 statement = StatementNoBreak();
2953 {if (true) return statement;}
2956 statement = BreakStatement();
2957 {if (true) return statement;}
2960 jj_la1[78] = jj_gen;
2961 jj_consume_token(-1);
2962 throw new ParseException();
2964 throw new Error("Missing return statement in function");
2968 * An html block inside a php syntax.
2970 static final public HTMLBlock htmlBlock() throws ParseException {
2971 final int startIndex = nodePtr;
2972 final AstNode[] blockNodes;
2974 jj_consume_token(PHPEND);
2977 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2982 jj_la1[79] = jj_gen;
2988 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2990 jj_consume_token(PHPSTARTLONG);
2993 jj_consume_token(PHPSTARTSHORT);
2996 jj_la1[80] = jj_gen;
2997 jj_consume_token(-1);
2998 throw new ParseException();
3000 } catch (ParseException e) {
3001 errorMessage = "unexpected end of file , '<?php' expected";
3003 errorStart = SimpleCharStream.getPosition();
3004 errorEnd = SimpleCharStream.getPosition();
3005 {if (true) throw e;}
3007 nbNodes = nodePtr - startIndex;
3008 blockNodes = new AstNode[nbNodes];
3009 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
3010 nodePtr = startIndex;
3011 {if (true) return new HTMLBlock(blockNodes);}
3012 throw new Error("Missing return statement in function");
3016 * An include statement. It's "include" an expression;
3018 static final public InclusionStatement IncludeStatement() throws ParseException {
3021 final InclusionStatement inclusionStatement;
3022 final Token token, token2;
3024 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3026 token = jj_consume_token(REQUIRE);
3027 keyword = InclusionStatement.REQUIRE;pos=token.sourceEnd;
3030 token = jj_consume_token(REQUIRE_ONCE);
3031 keyword = InclusionStatement.REQUIRE_ONCE;pos=token.sourceEnd;
3034 token = jj_consume_token(INCLUDE);
3035 keyword = InclusionStatement.INCLUDE;pos=token.sourceEnd;
3038 token = jj_consume_token(INCLUDE_ONCE);
3039 keyword = InclusionStatement.INCLUDE_ONCE;pos=token.sourceEnd;
3042 jj_la1[81] = jj_gen;
3043 jj_consume_token(-1);
3044 throw new ParseException();
3047 expr = Expression();
3049 } catch (ParseException e) {
3050 if (errorMessage != null) {
3051 {if (true) throw e;}
3053 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
3057 expr = new ConstantIdentifier(SYNTAX_ERROR_CHAR,pos,pos);
3058 processParseExceptionDebug(e);
3060 inclusionStatement = new InclusionStatement(currentSegment,
3064 currentSegment.add(inclusionStatement);
3066 token2 = jj_consume_token(SEMICOLON);
3067 } catch (ParseException e) {
3068 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
3070 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3071 errorEnd = SimpleCharStream.getPosition() + 1;
3072 {if (true) throw e;}
3074 inclusionStatement.sourceEnd = token2.sourceEnd;
3075 {if (true) return inclusionStatement;}
3076 throw new Error("Missing return statement in function");
3079 static final public PrintExpression PrintExpression() throws ParseException {
3080 final Expression expr;
3081 final Token printToken;
3082 token = jj_consume_token(PRINT);
3083 expr = Expression();
3084 {if (true) return new PrintExpression(expr,token.sourceStart,expr.sourceEnd);}
3085 throw new Error("Missing return statement in function");
3088 static final public ListExpression ListExpression() throws ParseException {
3089 Expression expr = null;
3090 final Expression expression;
3091 final ArrayList list = new ArrayList();
3093 final Token listToken, rParen;
3095 listToken = jj_consume_token(LIST);
3096 pos = listToken.sourceEnd;
3098 token = jj_consume_token(LPAREN);
3099 pos = token.sourceEnd;
3100 } catch (ParseException e) {
3101 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
3103 errorStart = listToken.sourceEnd+1;
3104 errorEnd = listToken.sourceEnd+1;
3105 processParseExceptionDebug(e);
3107 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3110 expr = VariableDeclaratorId();
3111 list.add(expr);pos = expr.sourceEnd;
3114 jj_la1[82] = jj_gen;
3117 if (expr == null) list.add(null);
3120 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3125 jj_la1[83] = jj_gen;
3129 token = jj_consume_token(COMMA);
3130 pos = token.sourceEnd;
3131 } catch (ParseException e) {
3132 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
3136 processParseExceptionDebug(e);
3138 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3141 expr = VariableDeclaratorId();
3142 list.add(expr);pos = expr.sourceEnd;
3145 jj_la1[84] = jj_gen;
3150 rParen = jj_consume_token(RPAREN);
3151 pos = rParen.sourceEnd;
3152 } catch (ParseException e) {
3153 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
3157 processParseExceptionDebug(e);
3159 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3161 jj_consume_token(ASSIGN);
3162 expression = Expression();
3163 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3165 {if (true) return new ListExpression(vars,
3167 listToken.sourceStart,
3168 expression.sourceEnd);}
3171 jj_la1[85] = jj_gen;
3174 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3176 {if (true) return new ListExpression(vars,listToken.sourceStart,pos);}
3177 throw new Error("Missing return statement in function");
3181 * An echo statement.
3182 * echo anyexpression (, otherexpression)*
3184 static final public EchoStatement EchoStatement() throws ParseException {
3185 final ArrayList expressions = new ArrayList();
3188 Token token2 = null;
3189 token = jj_consume_token(ECHO);
3190 expr = Expression();
3191 expressions.add(expr);
3194 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3199 jj_la1[86] = jj_gen;
3202 jj_consume_token(COMMA);
3203 expr = Expression();
3204 expressions.add(expr);
3207 token2 = jj_consume_token(SEMICOLON);
3208 } catch (ParseException e) {
3209 if (e.currentToken.next.kind != 4) {
3210 errorMessage = "';' expected after 'echo' statement";
3212 errorStart = e.currentToken.sourceEnd;
3213 errorEnd = e.currentToken.sourceEnd;
3214 processParseExceptionDebug(e);
3217 final Expression[] exprs = new Expression[expressions.size()];
3218 expressions.toArray(exprs);
3219 if (token2 == null) {
3220 {if (true) return new EchoStatement(exprs,token.sourceStart, exprs[exprs.length-1].sourceEnd);}
3222 {if (true) return new EchoStatement(exprs,token.sourceStart, token2.sourceEnd);}
3223 throw new Error("Missing return statement in function");
3226 static final public GlobalStatement GlobalStatement() throws ParseException {
3228 final ArrayList vars = new ArrayList();
3229 final GlobalStatement global;
3230 final Token token, token2;
3232 token = jj_consume_token(GLOBAL);
3234 vars.add(expr);pos = expr.sourceEnd+1;
3237 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3242 jj_la1[87] = jj_gen;
3245 jj_consume_token(COMMA);
3247 vars.add(expr);pos = expr.sourceEnd+1;
3250 token2 = jj_consume_token(SEMICOLON);
3251 pos = token2.sourceEnd+1;
3252 } catch (ParseException e) {
3253 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3257 processParseExceptionDebug(e);
3259 final Variable[] variables = new Variable[vars.size()];
3260 vars.toArray(variables);
3261 global = new GlobalStatement(currentSegment,
3265 currentSegment.add(global);
3266 {if (true) return global;}
3267 throw new Error("Missing return statement in function");
3270 static final public StaticStatement StaticStatement() throws ParseException {
3271 final ArrayList vars = new ArrayList();
3272 VariableDeclaration expr;
3273 final Token token, token2;
3275 token = jj_consume_token(STATIC);
3276 expr = VariableDeclarator();
3277 vars.add(expr);pos = expr.sourceEnd+1;
3280 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3285 jj_la1[88] = jj_gen;
3288 jj_consume_token(COMMA);
3289 expr = VariableDeclarator();
3290 vars.add(expr);pos = expr.sourceEnd+1;
3293 token2 = jj_consume_token(SEMICOLON);
3294 pos = token2.sourceEnd+1;
3295 } catch (ParseException e) {
3296 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3300 processParseException(e);
3302 final VariableDeclaration[] variables = new VariableDeclaration[vars.size()];
3303 vars.toArray(variables);
3304 {if (true) return new StaticStatement(variables,
3307 throw new Error("Missing return statement in function");
3310 static final public LabeledStatement LabeledStatement() throws ParseException {
3312 final Statement statement;
3313 label = jj_consume_token(IDENTIFIER);
3314 jj_consume_token(COLON);
3315 statement = Statement();
3316 {if (true) return new LabeledStatement(label.image,statement,label.sourceStart,statement.sourceEnd);}
3317 throw new Error("Missing return statement in function");
3327 static final public Block Block() throws ParseException {
3328 final ArrayList list = new ArrayList();
3329 Statement statement;
3330 final Token token, token2;
3333 token = jj_consume_token(LBRACE);
3334 pos = token.sourceEnd+1;start=token.sourceStart;
3335 } catch (ParseException e) {
3336 errorMessage = "'{' expected";
3338 pos = PHPParser.token.sourceEnd+1;
3342 processParseExceptionDebug(e);
3346 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3382 case INTEGER_LITERAL:
3383 case FLOATING_POINT_LITERAL:
3384 case STRING_LITERAL:
3393 jj_la1[89] = jj_gen;
3396 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3431 case INTEGER_LITERAL:
3432 case FLOATING_POINT_LITERAL:
3433 case STRING_LITERAL:
3439 statement = BlockStatement();
3440 list.add(statement);pos = statement.sourceEnd+1;
3443 statement = htmlBlock();
3444 list.add(statement);pos = statement.sourceEnd+1;
3447 jj_la1[90] = jj_gen;
3448 jj_consume_token(-1);
3449 throw new ParseException();
3453 token2 = jj_consume_token(RBRACE);
3454 pos = token2.sourceEnd+1;
3455 } catch (ParseException e) {
3456 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3460 processParseExceptionDebug(e);
3462 final Statement[] statements = new Statement[list.size()];
3463 list.toArray(statements);
3464 {if (true) return new Block(statements,start,pos);}
3465 throw new Error("Missing return statement in function");
3468 static final public Statement BlockStatement() throws ParseException {
3469 final Statement statement;
3470 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3503 case INTEGER_LITERAL:
3504 case FLOATING_POINT_LITERAL:
3505 case STRING_LITERAL:
3512 statement = Statement();
3513 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3514 {if (true) return statement;}
3515 } catch (ParseException e) {
3516 errorMessage = "unexpected token : '"+ e.currentToken.image +"', a statement was expected";
3518 errorStart = e.currentToken.sourceStart;
3519 errorEnd = e.currentToken.sourceEnd;
3520 {if (true) throw e;}
3524 statement = ClassDeclaration();
3525 {if (true) return statement;}
3528 statement = MethodDeclaration();
3529 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3530 currentSegment.add((MethodDeclaration) statement);
3531 ((MethodDeclaration) statement).analyzeCode();
3532 {if (true) return statement;}
3535 jj_la1[91] = jj_gen;
3536 jj_consume_token(-1);
3537 throw new ParseException();
3539 throw new Error("Missing return statement in function");
3543 * A Block statement that will not contain any 'break'
3545 static final public Statement BlockStatementNoBreak() throws ParseException {
3546 final Statement statement;
3547 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3579 case INTEGER_LITERAL:
3580 case FLOATING_POINT_LITERAL:
3581 case STRING_LITERAL:
3587 statement = StatementNoBreak();
3588 {if (true) return statement;}
3591 statement = ClassDeclaration();
3592 {if (true) return statement;}
3595 statement = MethodDeclaration();
3596 currentSegment.add((MethodDeclaration) statement);
3597 ((MethodDeclaration) statement).analyzeCode();
3598 {if (true) return statement;}
3601 jj_la1[92] = jj_gen;
3602 jj_consume_token(-1);
3603 throw new ParseException();
3605 throw new Error("Missing return statement in function");
3609 * used only by ForInit()
3611 static final public Expression[] LocalVariableDeclaration() throws ParseException {
3612 final ArrayList list = new ArrayList();
3618 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3623 jj_la1[93] = jj_gen;
3626 jj_consume_token(COMMA);
3630 final Expression[] vars = new Expression[list.size()];
3632 {if (true) return vars;}
3633 throw new Error("Missing return statement in function");
3637 * used only by LocalVariableDeclaration().
3639 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3640 final Variable varName;
3641 Expression initializer = null;
3642 varName = Variable();
3643 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3645 jj_consume_token(ASSIGN);
3646 initializer = Expression();
3649 jj_la1[94] = jj_gen;
3652 if (initializer == null) {
3653 {if (true) return new VariableDeclaration(currentSegment,
3655 varName.sourceStart,
3656 varName.sourceEnd);}
3658 {if (true) return new VariableDeclaration(currentSegment,
3661 VariableDeclaration.EQUAL,
3662 varName.sourceStart);}
3663 throw new Error("Missing return statement in function");
3666 static final public EmptyStatement EmptyStatement() throws ParseException {
3668 token = jj_consume_token(SEMICOLON);
3669 {if (true) return new EmptyStatement(token.sourceStart,token.sourceEnd);}
3670 throw new Error("Missing return statement in function");
3674 * used only by StatementExpressionList() which is used only by ForInit() and ForStatement()
3676 static final public Expression StatementExpression() throws ParseException {
3677 final Expression expr;
3678 final Token operator;
3679 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3682 expr = PreIncDecExpression();
3683 {if (true) return expr;}
3691 expr = PrimaryExpression();
3692 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3695 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3697 operator = jj_consume_token(PLUS_PLUS);
3698 {if (true) return new PostfixedUnaryExpression(expr,
3699 OperatorIds.PLUS_PLUS,
3700 operator.sourceEnd);}
3703 operator = jj_consume_token(MINUS_MINUS);
3704 {if (true) return new PostfixedUnaryExpression(expr,
3705 OperatorIds.MINUS_MINUS,
3706 operator.sourceEnd);}
3709 jj_la1[95] = jj_gen;
3710 jj_consume_token(-1);
3711 throw new ParseException();
3715 jj_la1[96] = jj_gen;
3718 {if (true) return expr;}
3721 jj_la1[97] = jj_gen;
3722 jj_consume_token(-1);
3723 throw new ParseException();
3725 throw new Error("Missing return statement in function");
3728 static final public SwitchStatement SwitchStatement() throws ParseException {
3729 Expression variable;
3730 final AbstractCase[] cases;
3731 final Token switchToken,lparenToken,rparenToken;
3733 switchToken = jj_consume_token(SWITCH);
3734 pos = switchToken.sourceEnd+1;
3736 lparenToken = jj_consume_token(LPAREN);
3737 pos = lparenToken.sourceEnd+1;
3738 } catch (ParseException e) {
3739 errorMessage = "'(' expected after 'switch'";
3743 processParseExceptionDebug(e);
3746 variable = Expression();
3747 pos = variable.sourceEnd+1;
3748 } catch (ParseException e) {
3749 if (errorMessage != null) {
3750 {if (true) throw e;}
3752 errorMessage = "expression expected";
3756 processParseExceptionDebug(e);
3757 variable = new ConstantIdentifier(SYNTAX_ERROR_CHAR,pos,pos);
3760 rparenToken = jj_consume_token(RPAREN);
3761 pos = rparenToken.sourceEnd+1;
3762 } catch (ParseException e) {
3763 errorMessage = "')' expected";
3767 processParseExceptionDebug(e);
3769 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3771 cases = switchStatementBrace();
3774 cases = switchStatementColon(switchToken.sourceStart, switchToken.sourceEnd);
3777 jj_la1[98] = jj_gen;
3778 jj_consume_token(-1);
3779 throw new ParseException();
3781 {if (true) return new SwitchStatement(variable,
3783 switchToken.sourceStart,
3784 PHPParser.token.sourceEnd);}
3785 throw new Error("Missing return statement in function");
3788 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3790 final ArrayList cases = new ArrayList();
3793 token = jj_consume_token(LBRACE);
3794 pos = token.sourceEnd;
3797 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3803 jj_la1[99] = jj_gen;
3806 cas = switchLabel0();
3807 cases.add(cas);pos = cas.sourceEnd;
3810 token = jj_consume_token(RBRACE);
3811 pos = token.sourceEnd;
3812 } catch (ParseException e) {
3813 errorMessage = "'}' expected";
3817 processParseExceptionDebug(e);
3819 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3820 cases.toArray(abcase);
3821 {if (true) return abcase;}
3822 throw new Error("Missing return statement in function");
3826 * A Switch statement with : ... endswitch;
3827 * @param start the begin offset of the switch
3828 * @param end the end offset of the switch
3830 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3832 final ArrayList cases = new ArrayList();
3835 token = jj_consume_token(COLON);
3836 pos = token.sourceEnd;
3838 setMarker(fileToParse,
3839 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3843 "Line " + token.beginLine);
3844 } catch (CoreException e) {
3845 PHPeclipsePlugin.log(e);
3849 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3855 jj_la1[100] = jj_gen;
3858 cas = switchLabel0();
3859 cases.add(cas);pos = cas.sourceEnd;
3862 token = jj_consume_token(ENDSWITCH);
3863 pos = token.sourceEnd;
3864 } catch (ParseException e) {
3865 errorMessage = "'endswitch' expected";
3869 processParseExceptionDebug(e);
3872 token = jj_consume_token(SEMICOLON);
3873 pos = token.sourceEnd;
3874 } catch (ParseException e) {
3875 errorMessage = "';' expected after 'endswitch' keyword";
3879 processParseExceptionDebug(e);
3881 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3882 cases.toArray(abcase);
3883 {if (true) return abcase;}
3884 throw new Error("Missing return statement in function");
3887 static final public AbstractCase switchLabel0() throws ParseException {
3888 final Expression expr;
3889 Statement statement;
3890 final ArrayList stmts = new ArrayList();
3891 final Token token = PHPParser.token;
3892 expr = SwitchLabel();
3895 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3930 case INTEGER_LITERAL:
3931 case FLOATING_POINT_LITERAL:
3932 case STRING_LITERAL:
3941 jj_la1[101] = jj_gen;
3944 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3978 case INTEGER_LITERAL:
3979 case FLOATING_POINT_LITERAL:
3980 case STRING_LITERAL:
3986 statement = BlockStatementNoBreak();
3987 stmts.add(statement);
3990 statement = htmlBlock();
3991 stmts.add(statement);
3994 jj_la1[102] = jj_gen;
3995 jj_consume_token(-1);
3996 throw new ParseException();
3999 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4001 statement = BreakStatement();
4002 stmts.add(statement);
4005 jj_la1[103] = jj_gen;
4008 final int listSize = stmts.size();
4009 final Statement[] stmtsArray = new Statement[listSize];
4010 stmts.toArray(stmtsArray);
4011 if (expr == null) {//it's a default
4012 {if (true) return new DefaultCase(stmtsArray,token.sourceStart,stmtsArray[listSize-1].sourceEnd);}
4014 if (listSize != 0) {
4015 {if (true) return new Case(expr,stmtsArray,expr.sourceStart,stmtsArray[listSize-1].sourceEnd);}
4017 {if (true) return new Case(expr,stmtsArray,expr.sourceStart,expr.sourceEnd);}
4019 throw new Error("Missing return statement in function");
4024 * case Expression() :
4026 * @return the if it was a case and null if not
4028 static final public Expression SwitchLabel() throws ParseException {
4029 final Expression expr;
4030 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4032 token = jj_consume_token(CASE);
4034 expr = Expression();
4035 } catch (ParseException e) {
4036 if (errorMessage != null) {if (true) throw e;}
4037 errorMessage = "expression expected after 'case' keyword";
4039 errorStart = token.sourceEnd +1;
4040 errorEnd = token.sourceEnd +1;
4041 {if (true) throw e;}
4044 token = jj_consume_token(COLON);
4045 {if (true) return expr;}
4046 } catch (ParseException e) {
4047 errorMessage = "':' expected after case expression";
4049 errorStart = expr.sourceEnd+1;
4050 errorEnd = expr.sourceEnd+1;
4051 processParseExceptionDebug(e);
4055 token = jj_consume_token(_DEFAULT);
4057 jj_consume_token(COLON);
4058 {if (true) return null;}
4059 } catch (ParseException e) {
4060 errorMessage = "':' expected after 'default' keyword";
4062 errorStart = token.sourceEnd+1;
4063 errorEnd = token.sourceEnd+1;
4064 processParseExceptionDebug(e);
4068 jj_la1[104] = jj_gen;
4069 jj_consume_token(-1);
4070 throw new ParseException();
4072 throw new Error("Missing return statement in function");
4075 static final public Break BreakStatement() throws ParseException {
4076 Expression expression = null;
4077 final Token token, token2;
4079 token = jj_consume_token(BREAK);
4080 pos = token.sourceEnd+1;
4081 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4097 case INTEGER_LITERAL:
4098 case FLOATING_POINT_LITERAL:
4099 case STRING_LITERAL:
4103 expression = Expression();
4104 pos = expression.sourceEnd+1;
4107 jj_la1[105] = jj_gen;
4111 token2 = jj_consume_token(SEMICOLON);
4112 pos = token2.sourceEnd;
4113 } catch (ParseException e) {
4114 errorMessage = "';' expected after 'break' keyword";
4118 processParseExceptionDebug(e);
4120 {if (true) return new Break(expression, token.sourceStart, pos);}
4121 throw new Error("Missing return statement in function");
4124 static final public IfStatement IfStatement() throws ParseException {
4125 final Expression condition;
4126 final IfStatement ifStatement;
4128 token = jj_consume_token(IF);
4129 condition = Condition("if");
4130 ifStatement = IfStatement0(condition,token.sourceStart,token.sourceEnd);
4131 {if (true) return ifStatement;}
4132 throw new Error("Missing return statement in function");
4135 static final public Expression Condition(final String keyword) throws ParseException {
4136 final Expression condition;
4138 jj_consume_token(LPAREN);
4139 } catch (ParseException e) {
4140 errorMessage = "'(' expected after " + keyword + " keyword";
4142 errorStart = PHPParser.token.sourceEnd + 1;
4143 errorEnd = PHPParser.token.sourceEnd + 1;
4144 processParseExceptionDebug(e);
4146 condition = Expression();
4148 jj_consume_token(RPAREN);
4149 } catch (ParseException e) {
4150 errorMessage = "')' expected after " + keyword + " keyword";
4152 errorStart = condition.sourceEnd+1;
4153 errorEnd = condition.sourceEnd+1;
4154 processParseExceptionDebug(e);
4156 {if (true) return condition;}
4157 throw new Error("Missing return statement in function");
4160 static final public IfStatement IfStatement0(final Expression condition, final int start,final int end) throws ParseException {
4161 Statement statement;
4162 final Statement stmt;
4163 final Statement[] statementsArray;
4164 ElseIf elseifStatement;
4165 Else elseStatement = null;
4166 final ArrayList stmts;
4167 final ArrayList elseIfList = new ArrayList();
4168 final ElseIf[] elseIfs;
4169 int pos = SimpleCharStream.getPosition();
4170 final int endStatements;
4171 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4173 jj_consume_token(COLON);
4174 stmts = new ArrayList();
4177 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4211 case INTEGER_LITERAL:
4212 case FLOATING_POINT_LITERAL:
4213 case STRING_LITERAL:
4222 jj_la1[106] = jj_gen;
4225 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4258 case INTEGER_LITERAL:
4259 case FLOATING_POINT_LITERAL:
4260 case STRING_LITERAL:
4266 statement = Statement();
4267 stmts.add(statement);
4270 statement = htmlBlock();
4271 stmts.add(statement);
4274 jj_la1[107] = jj_gen;
4275 jj_consume_token(-1);
4276 throw new ParseException();
4279 endStatements = SimpleCharStream.getPosition();
4282 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4287 jj_la1[108] = jj_gen;
4290 elseifStatement = ElseIfStatementColon();
4291 elseIfList.add(elseifStatement);
4293 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4295 elseStatement = ElseStatementColon();
4298 jj_la1[109] = jj_gen;
4302 setMarker(fileToParse,
4303 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4307 "Line " + token.beginLine);
4308 } catch (CoreException e) {
4309 PHPeclipsePlugin.log(e);
4312 jj_consume_token(ENDIF);
4313 } catch (ParseException e) {
4314 errorMessage = "'endif' expected";
4316 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4317 errorEnd = SimpleCharStream.getPosition() + 1;
4318 {if (true) throw e;}
4321 jj_consume_token(SEMICOLON);
4322 } catch (ParseException e) {
4323 errorMessage = "';' expected after 'endif' keyword";
4325 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4326 errorEnd = SimpleCharStream.getPosition() + 1;
4327 {if (true) throw e;}
4329 elseIfs = new ElseIf[elseIfList.size()];
4330 elseIfList.toArray(elseIfs);
4331 if (stmts.size() == 1) {
4332 {if (true) return new IfStatement(condition,
4333 (Statement) stmts.get(0),
4337 SimpleCharStream.getPosition());}
4339 statementsArray = new Statement[stmts.size()];
4340 stmts.toArray(statementsArray);
4341 {if (true) return new IfStatement(condition,
4342 new Block(statementsArray,pos,endStatements),
4346 SimpleCharStream.getPosition());}
4382 case INTEGER_LITERAL:
4383 case FLOATING_POINT_LITERAL:
4384 case STRING_LITERAL:
4390 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4423 case INTEGER_LITERAL:
4424 case FLOATING_POINT_LITERAL:
4425 case STRING_LITERAL:
4437 jj_la1[110] = jj_gen;
4438 jj_consume_token(-1);
4439 throw new ParseException();
4443 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4448 jj_la1[111] = jj_gen;
4451 elseifStatement = ElseIfStatement();
4452 elseIfList.add(elseifStatement);
4454 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4456 jj_consume_token(ELSE);
4458 pos = SimpleCharStream.getPosition();
4459 statement = Statement();
4460 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4461 } catch (ParseException e) {
4462 if (errorMessage != null) {
4463 {if (true) throw e;}
4465 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4467 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4468 errorEnd = SimpleCharStream.getPosition() + 1;
4469 {if (true) throw e;}
4473 jj_la1[112] = jj_gen;
4476 elseIfs = new ElseIf[elseIfList.size()];
4477 elseIfList.toArray(elseIfs);
4478 {if (true) return new IfStatement(condition,
4483 SimpleCharStream.getPosition());}
4486 jj_la1[113] = jj_gen;
4487 jj_consume_token(-1);
4488 throw new ParseException();
4490 throw new Error("Missing return statement in function");
4493 static final public ElseIf ElseIfStatementColon() throws ParseException {
4494 final Expression condition;
4495 Statement statement;
4496 final ArrayList list = new ArrayList();
4497 final Token elseifToken;
4498 elseifToken = jj_consume_token(ELSEIF);
4499 condition = Condition("elseif");
4500 jj_consume_token(COLON);
4503 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4537 case INTEGER_LITERAL:
4538 case FLOATING_POINT_LITERAL:
4539 case STRING_LITERAL:
4548 jj_la1[114] = jj_gen;
4551 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4584 case INTEGER_LITERAL:
4585 case FLOATING_POINT_LITERAL:
4586 case STRING_LITERAL:
4592 statement = Statement();
4593 list.add(statement);
4596 statement = htmlBlock();
4597 list.add(statement);
4600 jj_la1[115] = jj_gen;
4601 jj_consume_token(-1);
4602 throw new ParseException();
4605 final int sizeList = list.size();
4606 final Statement[] stmtsArray = new Statement[sizeList];
4607 list.toArray(stmtsArray);
4608 {if (true) return new ElseIf(condition,stmtsArray ,
4609 elseifToken.sourceStart,
4610 stmtsArray[sizeList-1].sourceEnd);}
4611 throw new Error("Missing return statement in function");
4614 static final public Else ElseStatementColon() throws ParseException {
4615 Statement statement;
4616 final ArrayList list = new ArrayList();
4617 final Token elseToken;
4618 elseToken = jj_consume_token(ELSE);
4619 jj_consume_token(COLON);
4622 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4656 case INTEGER_LITERAL:
4657 case FLOATING_POINT_LITERAL:
4658 case STRING_LITERAL:
4667 jj_la1[116] = jj_gen;
4670 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4703 case INTEGER_LITERAL:
4704 case FLOATING_POINT_LITERAL:
4705 case STRING_LITERAL:
4711 statement = Statement();
4712 list.add(statement);
4715 statement = htmlBlock();
4716 list.add(statement);
4719 jj_la1[117] = jj_gen;
4720 jj_consume_token(-1);
4721 throw new ParseException();
4724 final int sizeList = list.size();
4725 final Statement[] stmtsArray = new Statement[sizeList];
4726 list.toArray(stmtsArray);
4727 {if (true) return new Else(stmtsArray,elseToken.sourceStart,stmtsArray[sizeList-1].sourceEnd);}
4728 throw new Error("Missing return statement in function");
4731 static final public ElseIf ElseIfStatement() throws ParseException {
4732 final Expression condition;
4733 //final Statement statement;
4734 final Token elseifToken;
4735 final Statement[] statement = new Statement[1];
4736 elseifToken = jj_consume_token(ELSEIF);
4737 condition = Condition("elseif");
4738 statement[0] = Statement();
4739 {if (true) return new ElseIf(condition,statement,elseifToken.sourceStart,statement[0].sourceEnd);}
4740 throw new Error("Missing return statement in function");
4743 static final public WhileStatement WhileStatement() throws ParseException {
4744 final Expression condition;
4745 final Statement action;
4746 final Token whileToken;
4747 whileToken = jj_consume_token(WHILE);
4748 condition = Condition("while");
4749 action = WhileStatement0(whileToken.sourceStart,whileToken.sourceEnd);
4750 {if (true) return new WhileStatement(condition,action,whileToken.sourceStart,action.sourceEnd);}
4751 throw new Error("Missing return statement in function");
4754 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4755 Statement statement;
4756 final ArrayList stmts = new ArrayList();
4757 final int pos = SimpleCharStream.getPosition();
4758 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4760 jj_consume_token(COLON);
4763 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4796 case INTEGER_LITERAL:
4797 case FLOATING_POINT_LITERAL:
4798 case STRING_LITERAL:
4807 jj_la1[118] = jj_gen;
4810 statement = Statement();
4811 stmts.add(statement);
4814 setMarker(fileToParse,
4815 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4819 "Line " + token.beginLine);
4820 } catch (CoreException e) {
4821 PHPeclipsePlugin.log(e);
4824 jj_consume_token(ENDWHILE);
4825 } catch (ParseException e) {
4826 errorMessage = "'endwhile' expected";
4828 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4829 errorEnd = SimpleCharStream.getPosition() + 1;
4830 {if (true) throw e;}
4833 jj_consume_token(SEMICOLON);
4834 final Statement[] stmtsArray = new Statement[stmts.size()];
4835 stmts.toArray(stmtsArray);
4836 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4837 } catch (ParseException e) {
4838 errorMessage = "';' expected after 'endwhile' keyword";
4840 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4841 errorEnd = SimpleCharStream.getPosition() + 1;
4842 {if (true) throw e;}
4877 case INTEGER_LITERAL:
4878 case FLOATING_POINT_LITERAL:
4879 case STRING_LITERAL:
4885 statement = Statement();
4886 {if (true) return statement;}
4889 jj_la1[119] = jj_gen;
4890 jj_consume_token(-1);
4891 throw new ParseException();
4893 throw new Error("Missing return statement in function");
4896 static final public DoStatement DoStatement() throws ParseException {
4897 final Statement action;
4898 final Expression condition;
4900 Token token2 = null;
4901 token = jj_consume_token(DO);
4902 action = Statement();
4903 jj_consume_token(WHILE);
4904 condition = Condition("while");
4906 token2 = jj_consume_token(SEMICOLON);
4907 } catch (ParseException e) {
4908 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4910 errorStart = condition.sourceEnd+1;
4911 errorEnd = condition.sourceEnd+1;
4912 processParseExceptionDebug(e);
4914 if (token2 == null) {
4915 {if (true) return new DoStatement(condition,action,token.sourceStart,condition.sourceEnd);}
4917 {if (true) return new DoStatement(condition,action,token.sourceStart,token2.sourceEnd);}
4918 throw new Error("Missing return statement in function");
4921 static final public ForeachStatement ForeachStatement() throws ParseException {
4922 Statement statement = null;
4923 Expression expression = null;
4924 ArrayVariableDeclaration variable = null;
4926 Token lparenToken = null;
4927 Token asToken = null;
4928 Token rparenToken = null;
4930 foreachToken = jj_consume_token(FOREACH);
4932 lparenToken = jj_consume_token(LPAREN);
4933 pos = lparenToken.sourceEnd+1;
4934 } catch (ParseException e) {
4935 errorMessage = "'(' expected after 'foreach' keyword";
4937 errorStart = foreachToken.sourceEnd+1;
4938 errorEnd = foreachToken.sourceEnd+1;
4939 processParseExceptionDebug(e);
4940 {pos = foreachToken.sourceEnd+1;}
4943 expression = Expression();
4944 pos = expression.sourceEnd+1;
4945 } catch (ParseException e) {
4946 errorMessage = "variable expected";
4950 processParseExceptionDebug(e);
4953 asToken = jj_consume_token(AS);
4954 pos = asToken.sourceEnd+1;
4955 } catch (ParseException e) {
4956 errorMessage = "'as' expected";
4960 processParseExceptionDebug(e);
4963 variable = ArrayVariable();
4964 pos = variable.sourceEnd+1;
4965 } catch (ParseException e) {
4966 if (errorMessage != null) {if (true) throw e;}
4967 errorMessage = "variable expected";
4971 processParseExceptionDebug(e);
4974 rparenToken = jj_consume_token(RPAREN);
4975 pos = rparenToken.sourceEnd+1;
4976 } catch (ParseException e) {
4977 errorMessage = "')' expected after 'foreach' keyword";
4981 processParseExceptionDebug(e);
4984 statement = Statement();
4985 pos = rparenToken.sourceEnd+1;
4986 } catch (ParseException e) {
4987 if (errorMessage != null) {if (true) throw e;}
4988 errorMessage = "statement expected";
4992 processParseExceptionDebug(e);
4994 {if (true) return new ForeachStatement(expression,
4997 foreachToken.sourceStart,
4998 statement.sourceEnd);}
4999 throw new Error("Missing return statement in function");
5003 * a for declaration.
5004 * @return a node representing the for statement
5006 static final public ForStatement ForStatement() throws ParseException {
5007 final Token token,tokenEndFor,token2,tokenColon;
5009 Expression[] initializations = null;
5010 Expression condition = null;
5011 Expression[] increments = null;
5013 final ArrayList list = new ArrayList();
5014 token = jj_consume_token(FOR);
5016 jj_consume_token(LPAREN);
5017 } catch (ParseException e) {
5018 errorMessage = "'(' expected after 'for' keyword";
5020 errorStart = token.sourceEnd;
5021 errorEnd = token.sourceEnd +1;
5022 processParseExceptionDebug(e);
5024 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5040 case INTEGER_LITERAL:
5041 case FLOATING_POINT_LITERAL:
5042 case STRING_LITERAL:
5046 initializations = ForInit();
5049 jj_la1[120] = jj_gen;
5052 jj_consume_token(SEMICOLON);
5053 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5069 case INTEGER_LITERAL:
5070 case FLOATING_POINT_LITERAL:
5071 case STRING_LITERAL:
5075 condition = Expression();
5078 jj_la1[121] = jj_gen;
5081 jj_consume_token(SEMICOLON);
5082 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5098 case INTEGER_LITERAL:
5099 case FLOATING_POINT_LITERAL:
5100 case STRING_LITERAL:
5104 increments = StatementExpressionList();
5107 jj_la1[122] = jj_gen;
5110 jj_consume_token(RPAREN);
5111 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5144 case INTEGER_LITERAL:
5145 case FLOATING_POINT_LITERAL:
5146 case STRING_LITERAL:
5152 action = Statement();
5153 {if (true) return new ForStatement(initializations,
5161 tokenColon = jj_consume_token(COLON);
5162 pos = tokenColon.sourceEnd+1;
5165 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5198 case INTEGER_LITERAL:
5199 case FLOATING_POINT_LITERAL:
5200 case STRING_LITERAL:
5209 jj_la1[123] = jj_gen;
5212 action = Statement();
5213 list.add(action);pos = action.sourceEnd+1;
5216 setMarker(fileToParse,
5217 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
5221 "Line " + token.beginLine);
5222 } catch (CoreException e) {
5223 PHPeclipsePlugin.log(e);
5226 tokenEndFor = jj_consume_token(ENDFOR);
5227 pos = tokenEndFor.sourceEnd+1;
5228 } catch (ParseException e) {
5229 errorMessage = "'endfor' expected";
5233 processParseExceptionDebug(e);
5236 token2 = jj_consume_token(SEMICOLON);
5237 pos = token2.sourceEnd+1;
5238 } catch (ParseException e) {
5239 errorMessage = "';' expected after 'endfor' keyword";
5243 processParseExceptionDebug(e);
5245 final Statement[] stmtsArray = new Statement[list.size()];
5246 list.toArray(stmtsArray);
5247 {if (true) return new ForStatement(initializations,
5250 new Block(stmtsArray,
5251 stmtsArray[0].sourceStart,
5252 stmtsArray[stmtsArray.length-1].sourceEnd),
5257 jj_la1[124] = jj_gen;
5258 jj_consume_token(-1);
5259 throw new ParseException();
5261 throw new Error("Missing return statement in function");
5264 static final public Expression[] ForInit() throws ParseException {
5265 final Expression[] exprs;
5266 if (jj_2_6(2147483647)) {
5267 exprs = LocalVariableDeclaration();
5268 {if (true) return exprs;}
5270 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5286 case INTEGER_LITERAL:
5287 case FLOATING_POINT_LITERAL:
5288 case STRING_LITERAL:
5292 exprs = StatementExpressionList();
5293 {if (true) return exprs;}
5296 jj_la1[125] = jj_gen;
5297 jj_consume_token(-1);
5298 throw new ParseException();
5301 throw new Error("Missing return statement in function");
5304 static final public Expression[] StatementExpressionList() throws ParseException {
5305 final ArrayList list = new ArrayList();
5306 final Expression expr;
5307 expr = Expression();
5311 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5316 jj_la1[126] = jj_gen;
5319 jj_consume_token(COMMA);
5323 final Expression[] exprsArray = new Expression[list.size()];
5324 list.toArray(exprsArray);
5325 {if (true) return exprsArray;}
5326 throw new Error("Missing return statement in function");
5329 static final public Continue ContinueStatement() throws ParseException {
5330 Expression expr = null;
5332 Token token2 = null;
5333 token = jj_consume_token(CONTINUE);
5334 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5350 case INTEGER_LITERAL:
5351 case FLOATING_POINT_LITERAL:
5352 case STRING_LITERAL:
5356 expr = Expression();
5359 jj_la1[127] = jj_gen;
5363 token2 = jj_consume_token(SEMICOLON);
5364 } catch (ParseException e) {
5365 errorMessage = "';' expected after 'continue' statement";
5368 errorStart = token.sourceEnd+1;
5369 errorEnd = token.sourceEnd+1;
5371 errorStart = expr.sourceEnd+1;
5372 errorEnd = expr.sourceEnd+1;
5374 processParseExceptionDebug(e);
5376 if (token2 == null) {
5378 {if (true) return new Continue(expr,token.sourceStart,token.sourceEnd);}
5380 {if (true) return new Continue(expr,token.sourceStart,expr.sourceEnd);}
5382 {if (true) return new Continue(expr,token.sourceStart,token2.sourceEnd);}
5383 throw new Error("Missing return statement in function");
5386 static final public ReturnStatement ReturnStatement() throws ParseException {
5387 Expression expr = null;
5389 Token token2 = null;
5390 token = jj_consume_token(RETURN);
5391 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5407 case INTEGER_LITERAL:
5408 case FLOATING_POINT_LITERAL:
5409 case STRING_LITERAL:
5413 expr = Expression();
5416 jj_la1[128] = jj_gen;
5420 token2 = jj_consume_token(SEMICOLON);
5421 } catch (ParseException e) {
5422 errorMessage = "';' expected after 'return' statement";
5425 errorStart = token.sourceEnd+1;
5426 errorEnd = token.sourceEnd+1;
5428 errorStart = expr.sourceEnd+1;
5429 errorEnd = expr.sourceEnd+1;
5431 processParseExceptionDebug(e);
5433 if (token2 == null) {
5435 {if (true) return new ReturnStatement(expr,token.sourceStart,token.sourceEnd);}
5437 {if (true) return new ReturnStatement(expr,token.sourceStart,expr.sourceEnd);}
5439 {if (true) return new ReturnStatement(expr,token.sourceStart,token2.sourceEnd);}
5440 throw new Error("Missing return statement in function");
5443 static final private boolean jj_2_1(int xla) {
5444 jj_la = xla; jj_lastpos = jj_scanpos = token;
5445 boolean retval = !jj_3_1();
5450 static final private boolean jj_2_2(int xla) {
5451 jj_la = xla; jj_lastpos = jj_scanpos = token;
5452 boolean retval = !jj_3_2();
5457 static final private boolean jj_2_3(int xla) {
5458 jj_la = xla; jj_lastpos = jj_scanpos = token;
5459 boolean retval = !jj_3_3();
5464 static final private boolean jj_2_4(int xla) {
5465 jj_la = xla; jj_lastpos = jj_scanpos = token;
5466 boolean retval = !jj_3_4();
5471 static final private boolean jj_2_5(int xla) {
5472 jj_la = xla; jj_lastpos = jj_scanpos = token;
5473 boolean retval = !jj_3_5();
5478 static final private boolean jj_2_6(int xla) {
5479 jj_la = xla; jj_lastpos = jj_scanpos = token;
5480 boolean retval = !jj_3_6();
5485 static final private boolean jj_3R_112() {
5486 if (jj_scan_token(ASSIGN)) return true;
5487 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5488 if (jj_3R_47()) return true;
5489 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5493 static final private boolean jj_3R_204() {
5494 if (jj_3R_115()) return true;
5495 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5499 static final private boolean jj_3R_105() {
5500 if (jj_scan_token(DOT)) return true;
5501 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5502 if (jj_3R_102()) return true;
5503 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5507 static final private boolean jj_3R_203() {
5508 if (jj_3R_48()) return true;
5509 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5513 static final private boolean jj_3R_202() {
5514 if (jj_scan_token(IDENTIFIER)) return true;
5515 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5519 static final private boolean jj_3R_197() {
5526 if (jj_3R_204()) return true;
5527 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5528 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5529 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5533 static final private boolean jj_3R_116() {
5534 if (jj_3R_115()) return true;
5535 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5539 static final private boolean jj_3R_96() {
5540 if (jj_3R_102()) return true;
5541 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5545 if (jj_3R_105()) { jj_scanpos = xsp; break; }
5546 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5551 static final private boolean jj_3R_107() {
5552 if (jj_scan_token(_ANDL)) return true;
5553 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5557 static final private boolean jj_3R_106() {
5558 if (jj_scan_token(AND_AND)) return true;
5559 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5563 static final private boolean jj_3R_184() {
5564 if (jj_scan_token(ARRAY)) return true;
5565 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5566 if (jj_3R_193()) return true;
5567 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5571 static final private boolean jj_3R_111() {
5572 if (jj_scan_token(COMMA)) return true;
5573 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5576 if (jj_3R_116()) jj_scanpos = xsp;
5577 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5581 static final private boolean jj_3R_99() {
5586 if (jj_3R_107()) return true;
5587 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5588 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5589 if (jj_3R_96()) return true;
5590 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5594 static final private boolean jj_3R_80() {
5595 if (jj_3R_96()) return true;
5596 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5600 if (jj_3R_99()) { jj_scanpos = xsp; break; }
5601 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5606 static final private boolean jj_3R_78() {
5607 if (jj_scan_token(HOOK)) return true;
5608 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5609 if (jj_3R_47()) return true;
5610 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5611 if (jj_scan_token(COLON)) return true;
5612 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5613 if (jj_3R_68()) return true;
5614 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5618 static final private boolean jj_3R_110() {
5619 if (jj_3R_115()) return true;
5620 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5624 static final private boolean jj_3R_153() {
5625 if (jj_scan_token(LBRACE)) return true;
5626 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5627 if (jj_3R_47()) return true;
5628 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5629 if (jj_scan_token(RBRACE)) return true;
5630 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5634 static final private boolean jj_3R_72() {
5635 if (jj_scan_token(IDENTIFIER)) return true;
5636 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5639 if (jj_3R_153()) jj_scanpos = xsp;
5640 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5644 static final private boolean jj_3R_198() {
5645 if (jj_3R_201()) return true;
5646 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5650 static final private boolean jj_3R_101() {
5651 if (jj_scan_token(_ORL)) return true;
5652 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5656 static final private boolean jj_3R_100() {
5657 if (jj_scan_token(OR_OR)) return true;
5658 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5662 static final private boolean jj_3R_103() {
5663 if (jj_scan_token(LIST)) return true;
5664 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5665 if (jj_scan_token(LPAREN)) return true;
5666 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5669 if (jj_3R_110()) jj_scanpos = xsp;
5670 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5673 if (jj_3R_111()) { jj_scanpos = xsp; break; }
5674 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5676 if (jj_scan_token(RPAREN)) return true;
5677 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5679 if (jj_3R_112()) jj_scanpos = xsp;
5680 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5684 static final private boolean jj_3R_82() {
5689 if (jj_3R_101()) return true;
5690 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5691 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5692 if (jj_3R_80()) return true;
5693 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5697 static final private boolean jj_3R_71() {
5698 if (jj_scan_token(LBRACE)) return true;
5699 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5700 if (jj_3R_47()) return true;
5701 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5702 if (jj_scan_token(RBRACE)) return true;
5703 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5707 static final private boolean jj_3R_64() {
5712 if (jj_3R_72()) return true;
5713 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5714 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5718 static final private boolean jj_3R_75() {
5719 if (jj_3R_80()) return true;
5720 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5724 if (jj_3R_82()) { jj_scanpos = xsp; break; }
5725 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5730 static final private boolean jj_3R_190() {
5731 if (jj_scan_token(NEW)) return true;
5732 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5733 if (jj_3R_197()) return true;
5734 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5737 if (jj_3R_198()) jj_scanpos = xsp;
5738 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5742 static final private boolean jj_3R_196() {
5743 if (jj_3R_201()) return true;
5744 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5748 static final private boolean jj_3R_189() {
5749 if (jj_3R_115()) return true;
5750 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5753 if (jj_3R_196()) jj_scanpos = xsp;
5754 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5758 static final private boolean jj_3R_104() {
5759 if (jj_scan_token(PRINT)) return true;
5760 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5761 if (jj_3R_47()) return true;
5762 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5766 static final private boolean jj_3R_144() {
5767 if (jj_3R_129()) return true;
5768 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5772 static final private boolean jj_3_2() {
5773 if (jj_scan_token(DOLLAR)) return true;
5774 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5775 if (jj_scan_token(DOLLAR)) return true;
5776 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5780 static final private boolean jj_3R_68() {
5781 if (jj_3R_75()) return true;
5782 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5785 if (jj_3R_78()) jj_scanpos = xsp;
5786 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5790 static final private boolean jj_3R_138() {
5791 if (jj_3R_64()) return true;
5792 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5796 static final private boolean jj_3R_137() {
5797 if (jj_scan_token(DOLLAR)) return true;
5798 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5799 if (jj_3R_129()) return true;
5800 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5804 static final private boolean jj_3R_195() {
5805 if (jj_3R_201()) return true;
5806 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5810 static final private boolean jj_3R_95() {
5811 if (jj_scan_token(TILDEEQUAL)) return true;
5812 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5816 static final private boolean jj_3R_94() {
5817 if (jj_scan_token(DOTASSIGN)) return true;
5818 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5822 static final private boolean jj_3R_194() {
5823 if (jj_scan_token(STATICCLASSACCESS)) return true;
5824 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5825 if (jj_3R_197()) return true;
5826 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5830 static final private boolean jj_3R_93() {
5831 if (jj_scan_token(ORASSIGN)) return true;
5832 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5836 static final private boolean jj_3R_92() {
5837 if (jj_scan_token(XORASSIGN)) return true;
5838 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5842 static final private boolean jj_3R_91() {
5843 if (jj_scan_token(ANDASSIGN)) return true;
5844 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5848 static final private boolean jj_3R_129() {
5855 if (jj_3R_138()) return true;
5856 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5857 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5858 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5862 static final private boolean jj_3R_136() {
5863 if (jj_scan_token(DOLLAR_ID)) return true;
5864 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5867 if (jj_3R_144()) jj_scanpos = xsp;
5868 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5872 static final private boolean jj_3R_90() {
5873 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
5874 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5878 static final private boolean jj_3R_89() {
5879 if (jj_scan_token(LSHIFTASSIGN)) return true;
5880 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5884 static final private boolean jj_3R_88() {
5885 if (jj_scan_token(MINUSASSIGN)) return true;
5886 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5890 static final private boolean jj_3R_87() {
5891 if (jj_scan_token(PLUSASSIGN)) return true;
5892 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5896 static final private boolean jj_3R_188() {
5897 if (jj_scan_token(IDENTIFIER)) return true;
5898 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5902 if (jj_3R_194()) { jj_scanpos = xsp; break; }
5903 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5906 if (jj_3R_195()) jj_scanpos = xsp;
5907 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5911 static final private boolean jj_3R_183() {
5918 if (jj_3R_190()) return true;
5919 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5920 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5921 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5925 static final private boolean jj_3R_128() {
5926 if (jj_3R_129()) return true;
5927 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5931 static final private boolean jj_3R_86() {
5932 if (jj_scan_token(REMASSIGN)) return true;
5933 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5937 static final private boolean jj_3R_85() {
5938 if (jj_scan_token(SLASHASSIGN)) return true;
5939 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5943 static final private boolean jj_3R_84() {
5944 if (jj_scan_token(STARASSIGN)) return true;
5945 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5949 static final private boolean jj_3R_83() {
5950 if (jj_scan_token(ASSIGN)) return true;
5951 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5955 static final private boolean jj_3R_79() {
5982 if (jj_3R_95()) return true;
5983 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5984 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5985 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5986 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5987 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5988 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5989 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5990 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5991 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5992 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5993 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5994 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5995 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5999 static final private boolean jj_3R_74() {
6000 if (jj_scan_token(DOLLAR)) return true;
6001 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6002 if (jj_3R_129()) return true;
6003 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6007 static final private boolean jj_3R_175() {
6008 if (jj_3R_184()) return true;
6009 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6013 static final private boolean jj_3R_182() {
6014 if (jj_scan_token(BIT_AND)) return true;
6015 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6019 static final private boolean jj_3R_98() {
6020 if (jj_3R_104()) return true;
6021 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6025 static final private boolean jj_3R_170() {
6030 if (jj_3R_175()) return true;
6031 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6032 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6036 static final private boolean jj_3R_174() {
6039 if (jj_3R_182()) jj_scanpos = xsp;
6040 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6041 if (jj_3R_183()) return true;
6042 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6046 static final private boolean jj_3R_97() {
6047 if (jj_3R_103()) return true;
6048 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6052 static final private boolean jj_3R_81() {
6057 if (jj_3R_98()) return true;
6058 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6059 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6063 static final private boolean jj_3R_73() {
6064 if (jj_scan_token(DOLLAR_ID)) return true;
6065 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6068 if (jj_3R_128()) jj_scanpos = xsp;
6069 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6073 static final private boolean jj_3R_65() {
6078 if (jj_3R_74()) return true;
6079 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6080 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6084 static final private boolean jj_3R_77() {
6085 if (jj_3R_81()) return true;
6086 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6090 static final private boolean jj_3R_76() {
6091 if (jj_scan_token(BANG)) return true;
6092 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6093 if (jj_3R_69()) return true;
6094 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6098 static final private boolean jj_3R_69() {
6103 if (jj_3R_77()) return true;
6104 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6105 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6109 static final private boolean jj_3R_192() {
6110 if (jj_scan_token(MINUS_MINUS)) return true;
6111 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6115 static final private boolean jj_3R_191() {
6116 if (jj_scan_token(PLUS_PLUS)) return true;
6117 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6121 static final private boolean jj_3R_187() {
6126 if (jj_3R_192()) return true;
6127 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6128 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6132 static final private boolean jj_3R_54() {
6133 if (jj_3R_69()) return true;
6134 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6138 static final private boolean jj_3R_172() {
6139 if (jj_3R_170()) return true;
6140 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6143 if (jj_3R_187()) jj_scanpos = xsp;
6144 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6148 static final private boolean jj_3R_186() {
6149 if (jj_scan_token(ARRAY)) return true;
6150 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6154 static final private boolean jj_3R_185() {
6155 if (jj_3R_48()) return true;
6156 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6160 static final private boolean jj_3R_42() {
6161 if (jj_scan_token(ARRAY)) return true;
6162 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6166 static final private boolean jj_3R_171() {
6167 if (jj_scan_token(LPAREN)) return true;
6168 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6173 if (jj_3R_186()) return true;
6174 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6175 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6176 if (jj_scan_token(RPAREN)) return true;
6177 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6178 if (jj_3R_145()) return true;
6179 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6183 static final private boolean jj_3R_41() {
6184 if (jj_3R_48()) return true;
6185 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6189 static final private boolean jj_3R_70() {
6190 if (jj_3R_79()) return true;
6191 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6192 if (jj_3R_47()) return true;
6193 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6197 static final private boolean jj_3_4() {
6198 if (jj_scan_token(LPAREN)) return true;
6199 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6204 if (jj_3R_42()) return true;
6205 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6206 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6207 if (jj_scan_token(RPAREN)) return true;
6208 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6212 static final private boolean jj_3R_47() {
6217 if (jj_3R_54()) return true;
6218 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6219 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6223 static final private boolean jj_3R_53() {
6224 if (jj_3R_68()) return true;
6225 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6228 if (jj_3R_70()) jj_scanpos = xsp;
6229 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6233 static final private boolean jj_3R_169() {
6234 if (jj_scan_token(LPAREN)) return true;
6235 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6236 if (jj_3R_47()) return true;
6237 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6238 if (jj_scan_token(RPAREN)) return true;
6239 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6243 static final private boolean jj_3R_168() {
6244 if (jj_3R_173()) return true;
6245 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6249 static final private boolean jj_3R_167() {
6250 if (jj_3R_172()) return true;
6251 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6255 static final private boolean jj_3R_163() {
6264 if (jj_3R_169()) return true;
6265 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6266 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6267 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6268 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6272 static final private boolean jj_3R_166() {
6273 if (jj_3R_171()) return true;
6274 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6278 static final private boolean jj_3_1() {
6279 if (jj_3R_39()) return true;
6280 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6284 static final private boolean jj_3R_63() {
6285 if (jj_scan_token(OBJECT)) return true;
6286 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6290 static final private boolean jj_3R_49() {
6291 if (jj_scan_token(COMMA)) return true;
6292 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6293 if (jj_3R_47()) return true;
6294 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6298 static final private boolean jj_3R_62() {
6299 if (jj_scan_token(INTEGER)) return true;
6300 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6304 static final private boolean jj_3R_61() {
6305 if (jj_scan_token(INT)) return true;
6306 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6310 static final private boolean jj_3R_60() {
6311 if (jj_scan_token(FLOAT)) return true;
6312 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6316 static final private boolean jj_3R_165() {
6317 if (jj_scan_token(MINUS_MINUS)) return true;
6318 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6322 static final private boolean jj_3R_115() {
6323 if (jj_3R_65()) return true;
6324 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6328 if (jj_3_1()) { jj_scanpos = xsp; break; }
6329 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6334 static final private boolean jj_3R_59() {
6335 if (jj_scan_token(DOUBLE)) return true;
6336 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6340 static final private boolean jj_3R_44() {
6341 if (jj_3R_47()) return true;
6342 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6346 if (jj_3R_49()) { jj_scanpos = xsp; break; }
6347 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6352 static final private boolean jj_3R_58() {
6353 if (jj_scan_token(REAL)) return true;
6354 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6358 static final private boolean jj_3R_164() {
6359 if (jj_scan_token(PLUS_PLUS)) return true;
6360 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6364 static final private boolean jj_3R_57() {
6365 if (jj_scan_token(BOOLEAN)) return true;
6366 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6370 static final private boolean jj_3R_56() {
6371 if (jj_scan_token(BOOL)) return true;
6372 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6376 static final private boolean jj_3R_48() {
6395 if (jj_3R_63()) return true;
6396 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6397 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6398 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6399 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6400 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6401 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6402 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6403 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6404 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6408 static final private boolean jj_3R_55() {
6409 if (jj_scan_token(STRING)) return true;
6410 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6414 static final private boolean jj_3R_162() {
6419 if (jj_3R_165()) return true;
6420 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6421 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6422 if (jj_3R_170()) return true;
6423 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6427 static final private boolean jj_3R_161() {
6428 if (jj_3R_163()) return true;
6429 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6433 static final private boolean jj_3_6() {
6434 if (jj_3R_44()) return true;
6435 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6439 static final private boolean jj_3R_160() {
6440 if (jj_3R_162()) return true;
6441 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6445 static final private boolean jj_3R_159() {
6446 if (jj_scan_token(MINUS)) return true;
6447 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6448 if (jj_3R_149()) return true;
6449 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6453 static final private boolean jj_3R_157() {
6462 if (jj_3R_161()) return true;
6463 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6464 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6465 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6466 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6470 static final private boolean jj_3R_158() {
6471 if (jj_scan_token(PLUS)) return true;
6472 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6473 if (jj_3R_149()) return true;
6474 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6478 static final private boolean jj_3R_156() {
6479 if (jj_3R_157()) return true;
6480 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6484 static final private boolean jj_3R_155() {
6485 if (jj_scan_token(BANG)) return true;
6486 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6487 if (jj_3R_149()) return true;
6488 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6492 static final private boolean jj_3R_149() {
6499 if (jj_3R_156()) return true;
6500 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6501 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6502 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6506 static final private boolean jj_3R_154() {
6507 if (jj_scan_token(AT)) return true;
6508 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6509 if (jj_3R_149()) return true;
6510 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6514 static final private boolean jj_3R_145() {
6515 if (jj_3R_149()) return true;
6516 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6520 static final private boolean jj_3R_43() {
6521 if (jj_3R_47()) return true;
6522 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6523 if (jj_scan_token(SEMICOLON)) return true;
6524 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6528 static final private boolean jj_3R_152() {
6529 if (jj_scan_token(REMAINDER)) return true;
6530 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6534 static final private boolean jj_3R_151() {
6535 if (jj_scan_token(SLASH)) return true;
6536 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6540 static final private boolean jj_3R_150() {
6541 if (jj_scan_token(STAR)) return true;
6542 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6546 static final private boolean jj_3R_146() {
6553 if (jj_3R_152()) return true;
6554 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6555 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6556 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6557 if (jj_3R_145()) return true;
6558 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6562 static final private boolean jj_3R_139() {
6563 if (jj_3R_145()) return true;
6564 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6568 if (jj_3R_146()) { jj_scanpos = xsp; break; }
6569 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6574 static final private boolean jj_3R_148() {
6575 if (jj_scan_token(MINUS)) return true;
6576 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6580 static final private boolean jj_3R_147() {
6581 if (jj_scan_token(PLUS)) return true;
6582 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6586 static final private boolean jj_3R_140() {
6591 if (jj_3R_148()) return true;
6592 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6593 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6594 if (jj_3R_139()) return true;
6595 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6599 static final private boolean jj_3_5() {
6600 if (jj_3R_43()) return true;
6601 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6605 static final private boolean jj_3R_130() {
6606 if (jj_3R_139()) return true;
6607 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6611 if (jj_3R_140()) { jj_scanpos = xsp; break; }
6612 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6617 static final private boolean jj_3R_143() {
6618 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
6619 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6623 static final private boolean jj_3R_142() {
6624 if (jj_scan_token(RSIGNEDSHIFT)) return true;
6625 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6629 static final private boolean jj_3R_141() {
6630 if (jj_scan_token(LSHIFT)) return true;
6631 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6635 static final private boolean jj_3R_131() {
6642 if (jj_3R_143()) return true;
6643 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6644 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6645 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6646 if (jj_3R_130()) return true;
6647 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6651 static final private boolean jj_3R_121() {
6652 if (jj_3R_130()) return true;
6653 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6657 if (jj_3R_131()) { jj_scanpos = xsp; break; }
6658 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6663 static final private boolean jj_3R_208() {
6664 if (jj_scan_token(COMMA)) return true;
6665 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6666 if (jj_3R_47()) return true;
6667 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6671 static final private boolean jj_3R_135() {
6672 if (jj_scan_token(GE)) return true;
6673 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6677 static final private boolean jj_3R_207() {
6678 if (jj_3R_47()) return true;
6679 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6683 if (jj_3R_208()) { jj_scanpos = xsp; break; }
6684 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6689 static final private boolean jj_3R_134() {
6690 if (jj_scan_token(LE)) return true;
6691 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6695 static final private boolean jj_3R_133() {
6696 if (jj_scan_token(GT)) return true;
6697 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6701 static final private boolean jj_3R_132() {
6702 if (jj_scan_token(LT)) return true;
6703 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6707 static final private boolean jj_3R_122() {
6716 if (jj_3R_135()) return true;
6717 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6718 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6719 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6720 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6721 if (jj_3R_121()) return true;
6722 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6726 static final private boolean jj_3R_119() {
6727 if (jj_3R_121()) return true;
6728 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6732 if (jj_3R_122()) { jj_scanpos = xsp; break; }
6733 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6738 static final private boolean jj_3R_205() {
6739 if (jj_3R_207()) return true;
6740 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6744 static final private boolean jj_3R_200() {
6745 if (jj_scan_token(COMMA)) return true;
6746 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6750 static final private boolean jj_3_3() {
6751 if (jj_scan_token(COMMA)) return true;
6752 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6753 if (jj_3R_40()) return true;
6754 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6758 static final private boolean jj_3R_201() {
6759 if (jj_scan_token(LPAREN)) return true;
6760 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6763 if (jj_3R_205()) jj_scanpos = xsp;
6764 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6765 if (jj_scan_token(RPAREN)) return true;
6766 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6770 static final private boolean jj_3R_199() {
6771 if (jj_3R_40()) return true;
6772 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6776 if (jj_3_3()) { jj_scanpos = xsp; break; }
6777 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6782 static final private boolean jj_3R_127() {
6783 if (jj_scan_token(TRIPLEEQUAL)) return true;
6784 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6788 static final private boolean jj_3R_126() {
6789 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
6790 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6794 static final private boolean jj_3R_125() {
6795 if (jj_scan_token(NOT_EQUAL)) return true;
6796 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6800 static final private boolean jj_3R_193() {
6801 if (jj_scan_token(LPAREN)) return true;
6802 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6805 if (jj_3R_199()) jj_scanpos = xsp;
6806 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6808 if (jj_3R_200()) jj_scanpos = xsp;
6809 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6810 if (jj_scan_token(RPAREN)) return true;
6811 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6815 static final private boolean jj_3R_124() {
6816 if (jj_scan_token(DIF)) return true;
6817 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6821 static final private boolean jj_3R_123() {
6822 if (jj_scan_token(EQUAL_EQUAL)) return true;
6823 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6827 static final private boolean jj_3R_181() {
6828 if (jj_scan_token(NULL)) return true;
6829 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6833 static final private boolean jj_3R_180() {
6834 if (jj_scan_token(FALSE)) return true;
6835 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6839 static final private boolean jj_3R_179() {
6840 if (jj_scan_token(TRUE)) return true;
6841 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6845 static final private boolean jj_3R_120() {
6856 if (jj_3R_127()) return true;
6857 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6858 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6859 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6860 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6861 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6862 if (jj_3R_119()) return true;
6863 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6867 static final private boolean jj_3R_178() {
6868 if (jj_scan_token(STRING_LITERAL)) return true;
6869 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6873 static final private boolean jj_3R_177() {
6874 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
6875 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6879 static final private boolean jj_3R_117() {
6880 if (jj_3R_119()) return true;
6881 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6885 if (jj_3R_120()) { jj_scanpos = xsp; break; }
6886 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6891 static final private boolean jj_3R_51() {
6892 if (jj_3R_65()) return true;
6893 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6897 static final private boolean jj_3R_176() {
6898 if (jj_scan_token(INTEGER_LITERAL)) return true;
6899 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6903 static final private boolean jj_3R_173() {
6916 if (jj_3R_181()) return true;
6917 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6918 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6919 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6920 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6921 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6922 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6926 static final private boolean jj_3R_206() {
6927 if (jj_scan_token(ARRAYASSIGN)) return true;
6928 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6929 if (jj_3R_47()) return true;
6930 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6934 static final private boolean jj_3R_40() {
6935 if (jj_3R_47()) return true;
6936 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6939 if (jj_3R_206()) jj_scanpos = xsp;
6940 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6944 static final private boolean jj_3R_118() {
6945 if (jj_scan_token(BIT_AND)) return true;
6946 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6947 if (jj_3R_117()) return true;
6948 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6952 static final private boolean jj_3R_113() {
6953 if (jj_3R_117()) return true;
6954 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6958 if (jj_3R_118()) { jj_scanpos = xsp; break; }
6959 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6964 static final private boolean jj_3R_67() {
6965 if (jj_3R_48()) return true;
6966 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6970 static final private boolean jj_3R_52() {
6975 if (jj_3R_67()) return true;
6976 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6977 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6981 static final private boolean jj_3R_66() {
6982 if (jj_3R_47()) return true;
6983 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6987 static final private boolean jj_3R_46() {
6988 if (jj_scan_token(LBRACKET)) return true;
6989 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6992 if (jj_3R_52()) jj_scanpos = xsp;
6993 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6994 if (jj_scan_token(RBRACKET)) return true;
6995 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6999 static final private boolean jj_3R_114() {
7000 if (jj_scan_token(XOR)) return true;
7001 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7002 if (jj_3R_113()) return true;
7003 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7007 static final private boolean jj_3R_108() {
7008 if (jj_3R_113()) return true;
7009 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7013 if (jj_3R_114()) { jj_scanpos = xsp; break; }
7014 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7019 static final private boolean jj_3R_50() {
7020 if (jj_3R_64()) return true;
7021 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7025 static final private boolean jj_3R_45() {
7026 if (jj_scan_token(CLASSACCESS)) return true;
7027 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7032 if (jj_3R_51()) return true;
7033 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7034 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7038 static final private boolean jj_3R_39() {
7043 if (jj_3R_46()) return true;
7044 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7045 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7049 static final private boolean jj_3R_109() {
7050 if (jj_scan_token(BIT_OR)) return true;
7051 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7052 if (jj_3R_108()) return true;
7053 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7057 static final private boolean jj_3R_102() {
7058 if (jj_3R_108()) return true;
7059 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7063 if (jj_3R_109()) { jj_scanpos = xsp; break; }
7064 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7069 static private boolean jj_initialized_once = false;
7070 static public PHPParserTokenManager token_source;
7071 static SimpleCharStream jj_input_stream;
7072 static public Token token, jj_nt;
7073 static private int jj_ntk;
7074 static private Token jj_scanpos, jj_lastpos;
7075 static private int jj_la;
7076 static public boolean lookingAhead = false;
7077 static private boolean jj_semLA;
7078 static private int jj_gen;
7079 static final private int[] jj_la1 = new int[129];
7080 static private int[] jj_la1_0;
7081 static private int[] jj_la1_1;
7082 static private int[] jj_la1_2;
7083 static private int[] jj_la1_3;
7084 static private int[] jj_la1_4;
7092 private static void jj_la1_0() {
7093 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,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,0x68000000,0x68000000,0x68000000,0xf9000000,0xf9000000,0x68000000,0x0,0x68000000,0x68000000,};
7095 private static void jj_la1_1() {
7096 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,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,0x30c0000,0x30c0000,0x30c0000,0x875d507f,0x875d507f,0x30c0000,0x0,0x30c0000,0x30c0000,};
7098 private static void jj_la1_2() {
7099 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,0x800,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,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c9c00,0x13c1c00,0x0,0x13c1c00,0x13c1c00,};
7101 private static void jj_la1_3() {
7102 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,0x20800,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,0x88a2,0x88a2,0x88a2,0x2288a2,0x2288a2,0x88a2,0x400000,0x88a2,0x88a2,};
7104 private static void jj_la1_4() {
7105 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,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,};
7107 static final private JJCalls[] jj_2_rtns = new JJCalls[6];
7108 static private boolean jj_rescan = false;
7109 static private int jj_gc = 0;
7111 public PHPParser(java.io.InputStream stream) {
7112 if (jj_initialized_once) {
7113 System.out.println("ERROR: Second call to constructor of static parser. You must");
7114 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7115 System.out.println(" during parser generation.");
7118 jj_initialized_once = true;
7119 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7120 token_source = new PHPParserTokenManager(jj_input_stream);
7121 token = new Token();
7124 for (int i = 0; i < 129; i++) jj_la1[i] = -1;
7125 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7128 static public void ReInit(java.io.InputStream stream) {
7129 jj_input_stream.ReInit(stream, 1, 1);
7130 token_source.ReInit(jj_input_stream);
7131 token = new Token();
7134 for (int i = 0; i < 129; i++) jj_la1[i] = -1;
7135 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7138 public PHPParser(java.io.Reader stream) {
7139 if (jj_initialized_once) {
7140 System.out.println("ERROR: Second call to constructor of static parser. You must");
7141 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7142 System.out.println(" during parser generation.");
7145 jj_initialized_once = true;
7146 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7147 token_source = new PHPParserTokenManager(jj_input_stream);
7148 token = new Token();
7151 for (int i = 0; i < 129; i++) jj_la1[i] = -1;
7152 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7155 static public void ReInit(java.io.Reader stream) {
7156 jj_input_stream.ReInit(stream, 1, 1);
7157 token_source.ReInit(jj_input_stream);
7158 token = new Token();
7161 for (int i = 0; i < 129; i++) jj_la1[i] = -1;
7162 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7165 public PHPParser(PHPParserTokenManager tm) {
7166 if (jj_initialized_once) {
7167 System.out.println("ERROR: Second call to constructor of static parser. You must");
7168 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7169 System.out.println(" during parser generation.");
7172 jj_initialized_once = true;
7174 token = new Token();
7177 for (int i = 0; i < 129; i++) jj_la1[i] = -1;
7178 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7181 public void ReInit(PHPParserTokenManager tm) {
7183 token = new Token();
7186 for (int i = 0; i < 129; i++) jj_la1[i] = -1;
7187 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7190 static final private Token jj_consume_token(int kind) throws ParseException {
7192 if ((oldToken = token).next != null) token = token.next;
7193 else token = token.next = token_source.getNextToken();
7195 if (token.kind == kind) {
7197 if (++jj_gc > 100) {
7199 for (int i = 0; i < jj_2_rtns.length; i++) {
7200 JJCalls c = jj_2_rtns[i];
7202 if (c.gen < jj_gen) c.first = null;
7211 throw generateParseException();
7214 static final private boolean jj_scan_token(int kind) {
7215 if (jj_scanpos == jj_lastpos) {
7217 if (jj_scanpos.next == null) {
7218 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
7220 jj_lastpos = jj_scanpos = jj_scanpos.next;
7223 jj_scanpos = jj_scanpos.next;
7226 int i = 0; Token tok = token;
7227 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
7228 if (tok != null) jj_add_error_token(kind, i);
7230 return (jj_scanpos.kind != kind);
7233 static final public Token getNextToken() {
7234 if (token.next != null) token = token.next;
7235 else token = token.next = token_source.getNextToken();
7241 static final public Token getToken(int index) {
7242 Token t = lookingAhead ? jj_scanpos : token;
7243 for (int i = 0; i < index; i++) {
7244 if (t.next != null) t = t.next;
7245 else t = t.next = token_source.getNextToken();
7250 static final private int jj_ntk() {
7251 if ((jj_nt=token.next) == null)
7252 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
7254 return (jj_ntk = jj_nt.kind);
7257 static private java.util.Vector jj_expentries = new java.util.Vector();
7258 static private int[] jj_expentry;
7259 static private int jj_kind = -1;
7260 static private int[] jj_lasttokens = new int[100];
7261 static private int jj_endpos;
7263 static private void jj_add_error_token(int kind, int pos) {
7264 if (pos >= 100) return;
7265 if (pos == jj_endpos + 1) {
7266 jj_lasttokens[jj_endpos++] = kind;
7267 } else if (jj_endpos != 0) {
7268 jj_expentry = new int[jj_endpos];
7269 for (int i = 0; i < jj_endpos; i++) {
7270 jj_expentry[i] = jj_lasttokens[i];
7272 boolean exists = false;
7273 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
7274 int[] oldentry = (int[])(enum.nextElement());
7275 if (oldentry.length == jj_expentry.length) {
7277 for (int i = 0; i < jj_expentry.length; i++) {
7278 if (oldentry[i] != jj_expentry[i]) {
7286 if (!exists) jj_expentries.addElement(jj_expentry);
7287 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
7291 static public ParseException generateParseException() {
7292 jj_expentries.removeAllElements();
7293 boolean[] la1tokens = new boolean[143];
7294 for (int i = 0; i < 143; i++) {
7295 la1tokens[i] = false;
7298 la1tokens[jj_kind] = true;
7301 for (int i = 0; i < 129; i++) {
7302 if (jj_la1[i] == jj_gen) {
7303 for (int j = 0; j < 32; j++) {
7304 if ((jj_la1_0[i] & (1<<j)) != 0) {
7305 la1tokens[j] = true;
7307 if ((jj_la1_1[i] & (1<<j)) != 0) {
7308 la1tokens[32+j] = true;
7310 if ((jj_la1_2[i] & (1<<j)) != 0) {
7311 la1tokens[64+j] = true;
7313 if ((jj_la1_3[i] & (1<<j)) != 0) {
7314 la1tokens[96+j] = true;
7316 if ((jj_la1_4[i] & (1<<j)) != 0) {
7317 la1tokens[128+j] = true;
7322 for (int i = 0; i < 143; i++) {
7324 jj_expentry = new int[1];
7326 jj_expentries.addElement(jj_expentry);
7331 jj_add_error_token(0, 0);
7332 int[][] exptokseq = new int[jj_expentries.size()][];
7333 for (int i = 0; i < jj_expentries.size(); i++) {
7334 exptokseq[i] = (int[])jj_expentries.elementAt(i);
7336 return new ParseException(token, exptokseq, tokenImage);
7339 static final public void enable_tracing() {
7342 static final public void disable_tracing() {
7345 static final private void jj_rescan_token() {
7347 for (int i = 0; i < 6; i++) {
7348 JJCalls p = jj_2_rtns[i];
7350 if (p.gen > jj_gen) {
7351 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7353 case 0: jj_3_1(); break;
7354 case 1: jj_3_2(); break;
7355 case 2: jj_3_3(); break;
7356 case 3: jj_3_4(); break;
7357 case 4: jj_3_5(); break;
7358 case 5: jj_3_6(); break;
7362 } while (p != null);
7367 static final private void jj_save(int index, int xla) {
7368 JJCalls p = jj_2_rtns[index];
7369 while (p.gen > jj_gen) {
7370 if (p.next == null) { p = p.next = new JJCalls(); break; }
7373 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7376 static final class JJCalls {