1 /* Generated By:JavaCC: Do not edit this line. PHPParser.java */
5 import java.io.FileNotFoundException;
6 import java.io.FileReader;
8 import java.io.StringReader;
9 import java.text.MessageFormat;
10 import java.util.ArrayList;
11 import java.util.Hashtable;
13 import net.sourceforge.phpdt.core.IJavaModelMarker;
14 import net.sourceforge.phpdt.internal.compiler.ast.AbstractCase;
15 import net.sourceforge.phpdt.internal.compiler.ast.AbstractVariable;
16 import net.sourceforge.phpdt.internal.compiler.ast.ArrayDeclarator;
17 import net.sourceforge.phpdt.internal.compiler.ast.ArrayInitializer;
18 import net.sourceforge.phpdt.internal.compiler.ast.ArrayVariableDeclaration;
19 import net.sourceforge.phpdt.internal.compiler.ast.AstNode;
20 import net.sourceforge.phpdt.internal.compiler.ast.BinaryExpression;
21 import net.sourceforge.phpdt.internal.compiler.ast.Block;
22 import net.sourceforge.phpdt.internal.compiler.ast.Break;
23 import net.sourceforge.phpdt.internal.compiler.ast.Case;
24 import net.sourceforge.phpdt.internal.compiler.ast.CastExpression;
25 import net.sourceforge.phpdt.internal.compiler.ast.ClassAccess;
26 import net.sourceforge.phpdt.internal.compiler.ast.ClassDeclaration;
27 import net.sourceforge.phpdt.internal.compiler.ast.ClassInstantiation;
28 import net.sourceforge.phpdt.internal.compiler.ast.ConditionalExpression;
29 import net.sourceforge.phpdt.internal.compiler.ast.ConstantIdentifier;
30 import net.sourceforge.phpdt.internal.compiler.ast.Continue;
31 import net.sourceforge.phpdt.internal.compiler.ast.DefaultCase;
32 import net.sourceforge.phpdt.internal.compiler.ast.Define;
33 import net.sourceforge.phpdt.internal.compiler.ast.DoStatement;
34 import net.sourceforge.phpdt.internal.compiler.ast.EchoStatement;
35 import net.sourceforge.phpdt.internal.compiler.ast.Else;
36 import net.sourceforge.phpdt.internal.compiler.ast.ElseIf;
37 import net.sourceforge.phpdt.internal.compiler.ast.EmptyStatement;
38 import net.sourceforge.phpdt.internal.compiler.ast.Expression;
39 import net.sourceforge.phpdt.internal.compiler.ast.FalseLiteral;
40 import net.sourceforge.phpdt.internal.compiler.ast.FieldDeclaration;
41 import net.sourceforge.phpdt.internal.compiler.ast.ForStatement;
42 import net.sourceforge.phpdt.internal.compiler.ast.ForeachStatement;
43 import net.sourceforge.phpdt.internal.compiler.ast.FunctionCall;
44 import net.sourceforge.phpdt.internal.compiler.ast.GlobalStatement;
45 import net.sourceforge.phpdt.internal.compiler.ast.HTMLBlock;
46 import net.sourceforge.phpdt.internal.compiler.ast.HTMLCode;
47 import net.sourceforge.phpdt.internal.compiler.ast.IfStatement;
48 import net.sourceforge.phpdt.internal.compiler.ast.InclusionStatement;
49 import net.sourceforge.phpdt.internal.compiler.ast.LabeledStatement;
50 import net.sourceforge.phpdt.internal.compiler.ast.ListExpression;
51 import net.sourceforge.phpdt.internal.compiler.ast.Literal;
52 import net.sourceforge.phpdt.internal.compiler.ast.MethodDeclaration;
53 import net.sourceforge.phpdt.internal.compiler.ast.NullLiteral;
54 import net.sourceforge.phpdt.internal.compiler.ast.NumberLiteral;
55 import net.sourceforge.phpdt.internal.compiler.ast.OperatorIds;
56 import net.sourceforge.phpdt.internal.compiler.ast.PHPDocument;
57 import net.sourceforge.phpdt.internal.compiler.ast.PHPEchoBlock;
58 import net.sourceforge.phpdt.internal.compiler.ast.PostfixedUnaryExpression;
59 import net.sourceforge.phpdt.internal.compiler.ast.PrefixedUnaryExpression;
60 import net.sourceforge.phpdt.internal.compiler.ast.PrintExpression;
61 import net.sourceforge.phpdt.internal.compiler.ast.ReturnStatement;
62 import net.sourceforge.phpdt.internal.compiler.ast.Statement;
63 import net.sourceforge.phpdt.internal.compiler.ast.StaticStatement;
64 import net.sourceforge.phpdt.internal.compiler.ast.StringLiteral;
65 import net.sourceforge.phpdt.internal.compiler.ast.SwitchStatement;
66 import net.sourceforge.phpdt.internal.compiler.ast.TrueLiteral;
67 import net.sourceforge.phpdt.internal.compiler.ast.Variable;
68 import net.sourceforge.phpdt.internal.compiler.ast.VariableDeclaration;
69 import net.sourceforge.phpdt.internal.compiler.ast.WhileStatement;
70 import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
71 import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
72 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
73 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
74 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
76 import org.eclipse.core.resources.IFile;
77 import org.eclipse.core.resources.IMarker;
78 import org.eclipse.core.runtime.CoreException;
79 import org.eclipse.jface.preference.IPreferenceStore;
80 import org.eclipse.ui.texteditor.MarkerUtilities;
84 * This php parser is inspired by the Java 1.2 grammar example
85 * given with JavaCC. You can get JavaCC at http://www.webgain.com
86 * You can test the parser with the PHPParserTestCase2.java
87 * @author Matthieu Casanova
89 public class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
91 //todo : fix the variables names bug
92 //todo : handle tilde operator
95 /** The current segment. */
96 private static OutlineableWithChildren currentSegment;
98 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
99 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
100 static PHPOutlineInfo outlineInfo;
102 /** The error level of the current ParseException. */
103 private static int errorLevel = ERROR;
104 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
105 private static String errorMessage;
107 private static int errorStart = -1;
108 private static int errorEnd = -1;
109 private static PHPDocument phpDocument;
111 private static final String SYNTAX_ERROR_CHAR = "syntax error";
113 * The point where html starts.
114 * It will be used by the token manager to create HTMLCode objects
116 public static int htmlStart;
119 private final static int AstStackIncrement = 100;
120 /** The stack of node. */
121 protected static AstNode[] nodes;
122 /** The cursor in expression stack. */
123 private static int nodePtr;
125 public static final boolean PARSER_DEBUG = false;
127 public final void setFileToParse(final IFile fileToParse) {
128 PHPParser.fileToParse = fileToParse;
134 public PHPParser(final IFile fileToParse) {
135 this(new StringReader(""));
136 PHPParser.fileToParse = fileToParse;
139 public static final void phpParserTester(final String strEval) throws ParseException {
140 final StringReader stream = new StringReader(strEval);
141 if (jj_input_stream == null) {
142 jj_input_stream = new SimpleCharStream(stream, 1, 1);
144 ReInit(new StringReader(strEval));
146 phpDocument = new PHPDocument(null,"_root".toCharArray());
147 currentSegment = phpDocument;
148 outlineInfo = new PHPOutlineInfo(null, currentSegment);
149 PHPParserTokenManager.SwitchTo(PHPParserTokenManager.PHPPARSING);
153 public static final void htmlParserTester(final File fileName) throws FileNotFoundException, ParseException {
154 final Reader stream = new FileReader(fileName);
155 if (jj_input_stream == null) {
156 jj_input_stream = new SimpleCharStream(stream, 1, 1);
160 phpDocument = new PHPDocument(null,"_root".toCharArray());
161 currentSegment = phpDocument;
162 outlineInfo = new PHPOutlineInfo(null, currentSegment);
166 public static final void htmlParserTester(final String strEval) throws ParseException {
167 final StringReader stream = new StringReader(strEval);
168 if (jj_input_stream == null) {
169 jj_input_stream = new SimpleCharStream(stream, 1, 1);
173 phpDocument = new PHPDocument(null,"_root".toCharArray());
174 currentSegment = phpDocument;
175 outlineInfo = new PHPOutlineInfo(null, currentSegment);
180 * Reinitialize the parser.
182 protected static final void init() {
183 nodes = new AstNode[AstStackIncrement];
189 * Add an php node on the stack.
190 * @param node the node that will be added to the stack
192 private static final void pushOnAstNodes(final AstNode node) {
194 nodes[++nodePtr] = node;
195 } catch (IndexOutOfBoundsException e) {
196 final int oldStackLength = nodes.length;
197 final AstNode[] oldStack = nodes;
198 nodes = new AstNode[oldStackLength + AstStackIncrement];
199 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
200 nodePtr = oldStackLength;
201 nodes[nodePtr] = node;
205 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
206 phpDocument = new PHPDocument(parent,"_root".toCharArray());
207 currentSegment = phpDocument;
208 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
209 final StringReader stream = new StringReader(s);
210 if (jj_input_stream == null) {
211 jj_input_stream = new SimpleCharStream(stream, 1, 1);
217 phpDocument.nodes = new AstNode[nodes.length];
218 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
219 if (PHPeclipsePlugin.DEBUG) {
220 PHPeclipsePlugin.log(1,phpDocument.toString());
222 } catch (ParseException e) {
223 processParseException(e);
229 * This function will throw the exception if we are in debug mode
230 * and process it if we are in production mode.
231 * this should be fast since the PARSER_DEBUG is static final so the difference will be at compile time
232 * @param e the exception
233 * @throws ParseException the thrown exception
235 private static void processParseExceptionDebug(final ParseException e) throws ParseException {
239 processParseException(e);
242 * This method will process the parse exception.
243 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
244 * @param e the ParseException
246 private static void processParseException(final ParseException e) {
247 if (errorMessage == null) {
248 PHPeclipsePlugin.log(e);
249 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
250 errorStart = e.currentToken.sourceStart;
251 errorEnd = e.currentToken.sourceEnd;
255 // if (PHPeclipsePlugin.DEBUG) PHPeclipsePlugin.log(e);
259 * Create marker for the parse error.
260 * @param e the ParseException
262 private static void setMarker(final ParseException e) {
264 if (errorStart == -1) {
265 setMarker(fileToParse,
267 e.currentToken.sourceStart,
268 e.currentToken.sourceEnd,
270 "Line " + e.currentToken.beginLine+", "+e.currentToken.sourceStart+':'+e.currentToken.sourceEnd);
272 setMarker(fileToParse,
277 "Line " + e.currentToken.beginLine+", "+errorStart+':'+errorEnd);
281 } catch (CoreException e2) {
282 PHPeclipsePlugin.log(e2);
286 private static void scanLine(final String output,
289 final int brIndx) throws CoreException {
291 final StringBuffer lineNumberBuffer = new StringBuffer(10);
293 current = output.substring(indx, brIndx);
295 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
296 final int onLine = current.indexOf("on line <b>");
298 lineNumberBuffer.delete(0, lineNumberBuffer.length());
299 for (int i = onLine; i < current.length(); i++) {
300 ch = current.charAt(i);
301 if ('0' <= ch && '9' >= ch) {
302 lineNumberBuffer.append(ch);
306 final int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
308 final Hashtable attributes = new Hashtable();
310 current = current.replaceAll("\n", "");
311 current = current.replaceAll("<b>", "");
312 current = current.replaceAll("</b>", "");
313 MarkerUtilities.setMessage(attributes, current);
315 if (current.indexOf(PARSE_ERROR_STRING) != -1)
316 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
317 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
318 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
320 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
321 MarkerUtilities.setLineNumber(attributes, lineNumber);
322 // MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
323 MarkerUtilities.createMarker(file, attributes, IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER);
328 public final void parse(final String s) {
329 final StringReader stream = new StringReader(s);
330 if (jj_input_stream == null) {
331 jj_input_stream = new SimpleCharStream(stream, 1, 1);
337 } catch (ParseException e) {
338 processParseException(e);
343 * Call the php parse command ( php -l -f <filename> )
344 * and create markers according to the external parser output
346 public static void phpExternalParse(final IFile file) {
347 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
348 final String filename = file.getLocation().toString();
350 final String[] arguments = { filename };
351 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
352 final String command = form.format(arguments);
354 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
357 // parse the buffer to find the errors and warnings
358 createMarkers(parserResult, file);
359 } catch (CoreException e) {
360 PHPeclipsePlugin.log(e);
365 * Put a new html block in the stack.
367 public static final void createNewHTMLCode() {
368 final int currentPosition = token.sourceStart;
369 if (currentPosition == htmlStart ||
370 currentPosition < htmlStart ||
371 currentPosition > SimpleCharStream.currentBuffer.length()) {
374 final String html = SimpleCharStream.currentBuffer.substring(htmlStart, currentPosition);
375 pushOnAstNodes(new HTMLCode(html, htmlStart,currentPosition));
378 /** Create a new task. */
379 public static final void createNewTask(final int todoStart) {
380 final String todo = SimpleCharStream.currentBuffer.substring(todoStart,
381 SimpleCharStream.currentBuffer.indexOf("\n",
385 setMarker(fileToParse,
387 SimpleCharStream.getBeginLine(),
389 "Line "+SimpleCharStream.getBeginLine());
390 } catch (CoreException e) {
391 PHPeclipsePlugin.log(e);
396 protected static final void parse() throws ParseException {
400 static final public void todo() throws ParseException {
402 todoToken = jj_consume_token(23);
403 createNewTask(todoToken.sourceStart);
406 static final public void phpTest() throws ParseException {
411 static final public void phpFile() throws ParseException {
415 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
454 case INTEGER_LITERAL:
455 case FLOATING_POINT_LITERAL:
471 PHPParser.createNewHTMLCode();
472 } catch (TokenMgrError e) {
473 PHPeclipsePlugin.log(e);
474 errorStart = SimpleCharStream.beginOffset;
475 errorEnd = SimpleCharStream.endOffset;
476 errorMessage = e.getMessage();
478 {if (true) throw generateParseException();}
483 * A php block is a <?= expression [;]?>
484 * or <?php somephpcode ?>
485 * or <? somephpcode ?>
487 static final public void PhpBlock() throws ParseException {
488 final PHPEchoBlock phpEchoBlock;
489 final Token token,phpEnd;
490 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
492 phpEchoBlock = phpEchoBlock();
493 pushOnAstNodes(phpEchoBlock);
532 case INTEGER_LITERAL:
533 case FLOATING_POINT_LITERAL:
541 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
544 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
546 jj_consume_token(PHPSTARTLONG);
549 token = jj_consume_token(PHPSTARTSHORT);
551 setMarker(fileToParse,
552 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
556 "Line " + token.beginLine);
557 } catch (CoreException e) {
558 PHPeclipsePlugin.log(e);
563 jj_consume_token(-1);
564 throw new ParseException();
571 PHPParser.createNewHTMLCode();
574 phpEnd = jj_consume_token(PHPEND);
575 htmlStart = phpEnd.sourceEnd;
576 } catch (ParseException e) {
577 errorMessage = "'?>' expected";
579 errorStart = e.currentToken.sourceStart;
580 errorEnd = e.currentToken.sourceEnd;
581 processParseExceptionDebug(e);
586 jj_consume_token(-1);
587 throw new ParseException();
591 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
592 final Expression expr;
593 final PHPEchoBlock echoBlock;
594 final Token token, token2;
595 token = jj_consume_token(PHPECHOSTART);
596 PHPParser.createNewHTMLCode();
598 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
600 jj_consume_token(SEMICOLON);
606 token2 = jj_consume_token(PHPEND);
607 htmlStart = token2.sourceEnd;
609 echoBlock = new PHPEchoBlock(expr,token.sourceStart,token2.sourceEnd);
610 pushOnAstNodes(echoBlock);
611 {if (true) return echoBlock;}
612 throw new Error("Missing return statement in function");
615 static final public void Php() throws ParseException {
618 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
653 case INTEGER_LITERAL:
654 case FLOATING_POINT_LITERAL:
672 static final public ClassDeclaration ClassDeclaration() throws ParseException {
673 final ClassDeclaration classDeclaration;
674 Token className = null;
675 final Token superclassName, token, extendsToken;
676 String classNameImage = SYNTAX_ERROR_CHAR;
677 String superclassNameImage = null;
679 token = jj_consume_token(CLASS);
681 className = jj_consume_token(IDENTIFIER);
682 classNameImage = className.image;
683 } catch (ParseException e) {
684 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
686 errorStart = token.sourceEnd+1;
687 errorEnd = token.sourceEnd+1;
688 processParseExceptionDebug(e);
690 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
692 extendsToken = jj_consume_token(EXTENDS);
694 superclassName = jj_consume_token(IDENTIFIER);
695 superclassNameImage = superclassName.image;
696 } catch (ParseException e) {
697 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
699 errorStart = extendsToken.sourceEnd+1;
700 errorEnd = extendsToken.sourceEnd+1;
701 processParseExceptionDebug(e);
702 superclassNameImage = SYNTAX_ERROR_CHAR;
710 if (className == null) {
711 start = token.sourceStart;
712 end = token.sourceEnd;
714 start = className.sourceStart;
715 end = className.sourceEnd;
717 if (superclassNameImage == null) {
719 classDeclaration = new ClassDeclaration(currentSegment,
724 classDeclaration = new ClassDeclaration(currentSegment,
730 currentSegment.add(classDeclaration);
731 currentSegment = classDeclaration;
732 classEnd = ClassBody(classDeclaration);
733 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
734 classDeclaration.sourceEnd = classEnd;
735 pushOnAstNodes(classDeclaration);
736 {if (true) return classDeclaration;}
737 throw new Error("Missing return statement in function");
740 static final public int ClassBody(final ClassDeclaration classDeclaration) throws ParseException {
743 jj_consume_token(LBRACE);
744 } catch (ParseException e) {
745 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "'. '{' expected";
747 errorStart = e.currentToken.sourceStart;
748 errorEnd = e.currentToken.sourceEnd;
749 processParseExceptionDebug(e);
753 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
762 ClassBodyDeclaration(classDeclaration);
765 token = jj_consume_token(RBRACE);
766 {if (true) return token.sourceEnd;}
767 } catch (ParseException e) {
768 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. 'var', 'function' or '}' expected";
770 errorStart = e.currentToken.sourceStart;
771 errorEnd = e.currentToken.sourceEnd;
772 processParseExceptionDebug(e);
773 {if (true) return PHPParser.token.sourceEnd;}
775 throw new Error("Missing return statement in function");
779 * A class can contain only methods and fields.
781 static final public void ClassBodyDeclaration(final ClassDeclaration classDeclaration) throws ParseException {
782 final MethodDeclaration method;
783 final FieldDeclaration field;
784 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
786 method = MethodDeclaration();
787 method.analyzeCode();
788 classDeclaration.addMethod(method);
791 field = FieldDeclaration();
792 classDeclaration.addField(field);
796 jj_consume_token(-1);
797 throw new ParseException();
802 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
803 * it is only used by ClassBodyDeclaration()
805 static final public FieldDeclaration FieldDeclaration() throws ParseException {
806 VariableDeclaration variableDeclaration;
807 final VariableDeclaration[] list;
808 final ArrayList arrayList = new ArrayList();
812 token = jj_consume_token(VAR);
813 variableDeclaration = VariableDeclaratorNoSuffix();
814 arrayList.add(variableDeclaration);
815 pos = variableDeclaration.sourceEnd;
818 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
826 jj_consume_token(COMMA);
827 variableDeclaration = VariableDeclaratorNoSuffix();
828 arrayList.add(variableDeclaration);
829 outlineInfo.addVariable(variableDeclaration.name());
830 pos = variableDeclaration.sourceEnd;
833 token2 = jj_consume_token(SEMICOLON);
834 } catch (ParseException e) {
835 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
839 processParseExceptionDebug(e);
841 list = new VariableDeclaration[arrayList.size()];
842 arrayList.toArray(list);
844 if (token2 == null) {
845 end = list[list.length-1].sourceEnd;
847 end = token2.sourceEnd;
849 {if (true) return new FieldDeclaration(list,
853 throw new Error("Missing return statement in function");
857 * a strict variable declarator : there cannot be a suffix here.
858 * It will be used by fields and formal parameters
860 static final public VariableDeclaration VariableDeclaratorNoSuffix() throws ParseException {
861 final Token token, lbrace,rbrace;
862 Expression expr, initializer = null;
865 jj_consume_token(DOLLAR);
866 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
868 token = jj_consume_token(IDENTIFIER);
869 variable = new Variable(token.image,token.sourceStart,token.sourceEnd);
872 lbrace = jj_consume_token(LBRACE);
874 rbrace = jj_consume_token(RBRACE);
875 variable = new Variable(expr,lbrace.sourceStart,rbrace.sourceEnd);
879 jj_consume_token(-1);
880 throw new ParseException();
882 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
884 assignToken = jj_consume_token(ASSIGN);
886 initializer = VariableInitializer();
887 } catch (ParseException e) {
888 errorMessage = "Literal expression expected in variable initializer";
890 errorStart = assignToken.sourceEnd +1;
891 errorEnd = assignToken.sourceEnd +1;
892 processParseExceptionDebug(e);
899 if (initializer == null) {
900 {if (true) return new VariableDeclaration(currentSegment,
902 variable.sourceStart,
903 variable.sourceEnd);}
905 {if (true) return new VariableDeclaration(currentSegment,
908 VariableDeclaration.EQUAL,
909 variable.sourceStart);}
910 throw new Error("Missing return statement in function");
914 * this will be used by static statement
916 static final public VariableDeclaration VariableDeclarator() throws ParseException {
917 final AbstractVariable variable;
918 Expression initializer = null;
920 variable = VariableDeclaratorId();
921 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
923 token = jj_consume_token(ASSIGN);
925 initializer = VariableInitializer();
926 } catch (ParseException e) {
927 errorMessage = "Literal expression expected in variable initializer";
929 errorStart = token.sourceEnd+1;
930 errorEnd = token.sourceEnd+1;
931 processParseExceptionDebug(e);
938 if (initializer == null) {
939 {if (true) return new VariableDeclaration(currentSegment,
941 variable.sourceStart,
942 variable.sourceEnd);}
944 {if (true) return new VariableDeclaration(currentSegment,
947 VariableDeclaration.EQUAL,
948 variable.sourceStart);}
949 throw new Error("Missing return statement in function");
954 * @return the variable name (with suffix)
956 static final public AbstractVariable VariableDeclaratorId() throws ParseException {
958 AbstractVariable expression = null;
968 expression = VariableSuffix(var);
970 if (expression == null) {
971 {if (true) return var;}
973 {if (true) return expression;}
974 } catch (ParseException e) {
975 errorMessage = "'$' expected for variable identifier";
977 errorStart = e.currentToken.sourceStart;
978 errorEnd = e.currentToken.sourceEnd;
981 throw new Error("Missing return statement in function");
984 static final public Variable Variable() throws ParseException {
985 Variable variable = null;
987 token = jj_consume_token(DOLLAR);
989 {if (true) return variable;}
990 throw new Error("Missing return statement in function");
993 static final public Variable Var() throws ParseException {
994 Variable variable = null;
995 final Token token,token2;
996 ConstantIdentifier constant;
997 Expression expression;
998 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1000 token = jj_consume_token(DOLLAR);
1002 {if (true) return new Variable(variable,variable.sourceStart,variable.sourceEnd);}
1005 token = jj_consume_token(LBRACE);
1006 expression = Expression();
1007 token2 = jj_consume_token(RBRACE);
1008 {if (true) return new Variable(expression,
1013 token = jj_consume_token(IDENTIFIER);
1014 outlineInfo.addVariable('$' + token.image);
1015 {if (true) return new Variable(token.image,token.sourceStart,token.sourceEnd);}
1018 jj_la1[13] = jj_gen;
1019 jj_consume_token(-1);
1020 throw new ParseException();
1022 throw new Error("Missing return statement in function");
1025 static final public Expression VariableInitializer() throws ParseException {
1026 final Expression expr;
1027 final Token token, token2;
1028 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1032 case INTEGER_LITERAL:
1033 case FLOATING_POINT_LITERAL:
1034 case STRING_LITERAL:
1037 {if (true) return expr;}
1040 token2 = jj_consume_token(MINUS);
1041 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1042 case INTEGER_LITERAL:
1043 token = jj_consume_token(INTEGER_LITERAL);
1045 case FLOATING_POINT_LITERAL:
1046 token = jj_consume_token(FLOATING_POINT_LITERAL);
1049 jj_la1[14] = jj_gen;
1050 jj_consume_token(-1);
1051 throw new ParseException();
1053 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
1055 token2.sourceStart);}
1058 token2 = jj_consume_token(PLUS);
1059 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1060 case INTEGER_LITERAL:
1061 token = jj_consume_token(INTEGER_LITERAL);
1063 case FLOATING_POINT_LITERAL:
1064 token = jj_consume_token(FLOATING_POINT_LITERAL);
1067 jj_la1[15] = jj_gen;
1068 jj_consume_token(-1);
1069 throw new ParseException();
1071 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
1073 token2.sourceStart);}
1076 expr = ArrayDeclarator();
1077 {if (true) return expr;}
1080 token = jj_consume_token(IDENTIFIER);
1081 {if (true) return new ConstantIdentifier(token);}
1084 jj_la1[16] = jj_gen;
1085 jj_consume_token(-1);
1086 throw new ParseException();
1088 throw new Error("Missing return statement in function");
1091 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
1092 final Expression expr,expr2;
1093 expr = Expression();
1094 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1096 jj_consume_token(ARRAYASSIGN);
1097 expr2 = Expression();
1098 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
1101 jj_la1[17] = jj_gen;
1104 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
1105 throw new Error("Missing return statement in function");
1108 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
1109 ArrayVariableDeclaration expr;
1110 final ArrayList list = new ArrayList();
1111 jj_consume_token(LPAREN);
1112 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1128 case INTEGER_LITERAL:
1129 case FLOATING_POINT_LITERAL:
1130 case STRING_LITERAL:
1135 expr = ArrayVariable();
1144 jj_consume_token(COMMA);
1145 expr = ArrayVariable();
1150 jj_la1[18] = jj_gen;
1153 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1155 jj_consume_token(COMMA);
1159 jj_la1[19] = jj_gen;
1162 jj_consume_token(RPAREN);
1163 final ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1165 {if (true) return vars;}
1166 throw new Error("Missing return statement in function");
1170 * A Method Declaration.
1171 * <b>function</b> MetodDeclarator() Block()
1173 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1174 final MethodDeclaration functionDeclaration;
1176 final OutlineableWithChildren seg = currentSegment;
1178 token = jj_consume_token(FUNCTION);
1180 functionDeclaration = MethodDeclarator(token.sourceStart);
1181 outlineInfo.addVariable(functionDeclaration.name);
1182 } catch (ParseException e) {
1183 if (errorMessage != null) {if (true) throw e;}
1184 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1186 errorStart = e.currentToken.sourceStart;
1187 errorEnd = e.currentToken.sourceEnd;
1188 {if (true) throw e;}
1190 currentSegment = functionDeclaration;
1192 functionDeclaration.statements = block.statements;
1193 currentSegment = seg;
1194 {if (true) return functionDeclaration;}
1195 throw new Error("Missing return statement in function");
1199 * A MethodDeclarator.
1200 * [&] IDENTIFIER(parameters ...).
1201 * @return a function description for the outline
1203 static final public MethodDeclaration MethodDeclarator(final int start) throws ParseException {
1204 Token identifier = null;
1205 Token reference = null;
1206 final ArrayList formalParameters = new ArrayList();
1207 String identifierChar = SYNTAX_ERROR_CHAR;
1209 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1211 reference = jj_consume_token(BIT_AND);
1212 end = reference.sourceEnd;
1215 jj_la1[20] = jj_gen;
1219 identifier = jj_consume_token(IDENTIFIER);
1220 identifierChar = identifier.image;
1221 end = identifier.sourceEnd;
1222 } catch (ParseException e) {
1223 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1225 errorStart = e.currentToken.sourceEnd;
1226 errorEnd = e.currentToken.next.sourceStart;
1227 processParseExceptionDebug(e);
1229 end = FormalParameters(formalParameters);
1230 int nameStart, nameEnd;
1231 if (identifier == null) {
1232 if (reference == null) {
1233 nameStart = start + 9;
1234 nameEnd = start + 10;
1236 nameStart = reference.sourceEnd + 1;
1237 nameEnd = reference.sourceEnd + 2;
1240 nameStart = identifier.sourceStart;
1241 nameEnd = identifier.sourceEnd;
1243 {if (true) return new MethodDeclaration(currentSegment,
1251 throw new Error("Missing return statement in function");
1255 * FormalParameters follows method identifier.
1256 * (FormalParameter())
1258 static final public int FormalParameters(final ArrayList parameters) throws ParseException {
1259 VariableDeclaration var;
1261 Token tok = PHPParser.token;
1262 int end = tok.sourceEnd;
1264 tok = jj_consume_token(LPAREN);
1265 end = tok.sourceEnd;
1266 } catch (ParseException e) {
1267 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1269 errorStart = e.currentToken.next.sourceStart;
1270 errorEnd = e.currentToken.next.sourceEnd;
1271 processParseExceptionDebug(e);
1273 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1276 var = FormalParameter();
1277 parameters.add(var);end = var.sourceEnd;
1280 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1285 jj_la1[21] = jj_gen;
1288 jj_consume_token(COMMA);
1289 var = FormalParameter();
1290 parameters.add(var);end = var.sourceEnd;
1294 jj_la1[22] = jj_gen;
1298 token = jj_consume_token(RPAREN);
1299 end = token.sourceEnd;
1300 } catch (ParseException e) {
1301 errorMessage = "')' expected";
1303 errorStart = e.currentToken.next.sourceStart;
1304 errorEnd = e.currentToken.next.sourceEnd;
1305 processParseExceptionDebug(e);
1307 {if (true) return end;}
1308 throw new Error("Missing return statement in function");
1312 * A formal parameter.
1313 * $varname[=value] (,$varname[=value])
1315 static final public VariableDeclaration FormalParameter() throws ParseException {
1316 final VariableDeclaration variableDeclaration;
1318 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1320 token = jj_consume_token(BIT_AND);
1323 jj_la1[23] = jj_gen;
1326 variableDeclaration = VariableDeclaratorNoSuffix();
1327 outlineInfo.addVariable('$'+variableDeclaration.name());
1328 if (token != null) {
1329 variableDeclaration.setReference(true);
1331 {if (true) return variableDeclaration;}
1332 throw new Error("Missing return statement in function");
1335 static final public ConstantIdentifier Type() throws ParseException {
1337 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1339 token = jj_consume_token(STRING);
1340 {if (true) return new ConstantIdentifier(token);}
1343 token = jj_consume_token(BOOL);
1344 {if (true) return new ConstantIdentifier(token);}
1347 token = jj_consume_token(BOOLEAN);
1348 {if (true) return new ConstantIdentifier(token);}
1351 token = jj_consume_token(REAL);
1352 {if (true) return new ConstantIdentifier(token);}
1355 token = jj_consume_token(DOUBLE);
1356 {if (true) return new ConstantIdentifier(token);}
1359 token = jj_consume_token(FLOAT);
1360 {if (true) return new ConstantIdentifier(token);}
1363 token = jj_consume_token(INT);
1364 {if (true) return new ConstantIdentifier(token);}
1367 token = jj_consume_token(INTEGER);
1368 {if (true) return new ConstantIdentifier(token);}
1371 token = jj_consume_token(OBJECT);
1372 {if (true) return new ConstantIdentifier(token);}
1375 jj_la1[24] = jj_gen;
1376 jj_consume_token(-1);
1377 throw new ParseException();
1379 throw new Error("Missing return statement in function");
1382 static final public Expression Expression() throws ParseException {
1383 final Expression expr;
1384 Expression initializer = null;
1385 int assignOperator = -1;
1386 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1400 case INTEGER_LITERAL:
1401 case FLOATING_POINT_LITERAL:
1402 case STRING_LITERAL:
1407 expr = ConditionalExpression();
1408 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1421 case RSIGNEDSHIFTASSIGN:
1422 assignOperator = AssignmentOperator();
1424 initializer = Expression();
1425 } catch (ParseException e) {
1426 if (errorMessage != null) {
1427 {if (true) throw e;}
1429 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1431 errorEnd = SimpleCharStream.getPosition();
1432 {if (true) throw e;}
1436 jj_la1[25] = jj_gen;
1439 if (assignOperator != -1) {// todo : change this, very very bad :(
1440 if (expr instanceof AbstractVariable) {
1441 {if (true) return new VariableDeclaration(currentSegment,
1442 (AbstractVariable) expr,
1445 initializer.sourceEnd);}
1447 String varName = expr.toStringExpression().substring(1);
1448 {if (true) return new VariableDeclaration(currentSegment,
1449 new Variable(varName,
1453 initializer.sourceEnd);}
1455 {if (true) return expr;}
1459 expr = ExpressionWBang();
1460 {if (true) return expr;}
1463 jj_la1[26] = jj_gen;
1464 jj_consume_token(-1);
1465 throw new ParseException();
1467 throw new Error("Missing return statement in function");
1470 static final public Expression ExpressionWBang() throws ParseException {
1471 final Expression expr;
1473 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1475 token = jj_consume_token(BANG);
1476 expr = ExpressionWBang();
1477 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
1481 expr = ExpressionNoBang();
1482 {if (true) return expr;}
1485 jj_la1[27] = jj_gen;
1486 jj_consume_token(-1);
1487 throw new ParseException();
1489 throw new Error("Missing return statement in function");
1492 static final public Expression ExpressionNoBang() throws ParseException {
1494 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1496 expr = ListExpression();
1497 {if (true) return expr;}
1500 expr = PrintExpression();
1501 {if (true) return expr;}
1504 jj_la1[28] = jj_gen;
1505 jj_consume_token(-1);
1506 throw new ParseException();
1508 throw new Error("Missing return statement in function");
1512 * Any assignement operator.
1513 * @return the assignement operator id
1515 static final public int AssignmentOperator() throws ParseException {
1516 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1518 jj_consume_token(ASSIGN);
1519 {if (true) return VariableDeclaration.EQUAL;}
1522 jj_consume_token(STARASSIGN);
1523 {if (true) return VariableDeclaration.STAR_EQUAL;}
1526 jj_consume_token(SLASHASSIGN);
1527 {if (true) return VariableDeclaration.SLASH_EQUAL;}
1530 jj_consume_token(REMASSIGN);
1531 {if (true) return VariableDeclaration.REM_EQUAL;}
1534 jj_consume_token(PLUSASSIGN);
1535 {if (true) return VariableDeclaration.PLUS_EQUAL;}
1538 jj_consume_token(MINUSASSIGN);
1539 {if (true) return VariableDeclaration.MINUS_EQUAL;}
1542 jj_consume_token(LSHIFTASSIGN);
1543 {if (true) return VariableDeclaration.LSHIFT_EQUAL;}
1545 case RSIGNEDSHIFTASSIGN:
1546 jj_consume_token(RSIGNEDSHIFTASSIGN);
1547 {if (true) return VariableDeclaration.RSIGNEDSHIFT_EQUAL;}
1550 jj_consume_token(ANDASSIGN);
1551 {if (true) return VariableDeclaration.AND_EQUAL;}
1554 jj_consume_token(XORASSIGN);
1555 {if (true) return VariableDeclaration.XOR_EQUAL;}
1558 jj_consume_token(ORASSIGN);
1559 {if (true) return VariableDeclaration.OR_EQUAL;}
1562 jj_consume_token(DOTASSIGN);
1563 {if (true) return VariableDeclaration.DOT_EQUAL;}
1566 jj_consume_token(TILDEEQUAL);
1567 {if (true) return VariableDeclaration.TILDE_EQUAL;}
1570 jj_la1[29] = jj_gen;
1571 jj_consume_token(-1);
1572 throw new ParseException();
1574 throw new Error("Missing return statement in function");
1577 static final public Expression ConditionalExpression() throws ParseException {
1578 final Expression expr;
1579 Expression expr2 = null;
1580 Expression expr3 = null;
1581 expr = ConditionalOrExpression();
1582 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1584 jj_consume_token(HOOK);
1585 expr2 = Expression();
1586 jj_consume_token(COLON);
1587 expr3 = ConditionalExpression();
1590 jj_la1[30] = jj_gen;
1593 if (expr3 == null) {
1594 {if (true) return expr;}
1596 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1597 throw new Error("Missing return statement in function");
1600 static final public Expression ConditionalOrExpression() throws ParseException {
1601 Expression expr,expr2;
1603 expr = ConditionalAndExpression();
1606 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1612 jj_la1[31] = jj_gen;
1615 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1617 jj_consume_token(OR_OR);
1618 operator = OperatorIds.OR_OR;
1621 jj_consume_token(_ORL);
1622 operator = OperatorIds.ORL;
1625 jj_la1[32] = jj_gen;
1626 jj_consume_token(-1);
1627 throw new ParseException();
1629 expr2 = ConditionalAndExpression();
1630 expr = new BinaryExpression(expr,expr2,operator);
1632 {if (true) return expr;}
1633 throw new Error("Missing return statement in function");
1636 static final public Expression ConditionalAndExpression() throws ParseException {
1637 Expression expr,expr2;
1639 expr = ConcatExpression();
1642 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1648 jj_la1[33] = jj_gen;
1651 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1653 jj_consume_token(AND_AND);
1654 operator = OperatorIds.AND_AND;
1657 jj_consume_token(_ANDL);
1658 operator = OperatorIds.ANDL;
1661 jj_la1[34] = jj_gen;
1662 jj_consume_token(-1);
1663 throw new ParseException();
1665 expr2 = ConcatExpression();
1666 expr = new BinaryExpression(expr,expr2,operator);
1668 {if (true) return expr;}
1669 throw new Error("Missing return statement in function");
1672 static final public Expression ConcatExpression() throws ParseException {
1673 Expression expr,expr2;
1674 expr = InclusiveOrExpression();
1677 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1682 jj_la1[35] = jj_gen;
1685 jj_consume_token(DOT);
1686 expr2 = InclusiveOrExpression();
1687 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1689 {if (true) return expr;}
1690 throw new Error("Missing return statement in function");
1693 static final public Expression InclusiveOrExpression() throws ParseException {
1694 Expression expr,expr2;
1695 expr = ExclusiveOrExpression();
1698 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1703 jj_la1[36] = jj_gen;
1706 jj_consume_token(BIT_OR);
1707 expr2 = ExclusiveOrExpression();
1708 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1710 {if (true) return expr;}
1711 throw new Error("Missing return statement in function");
1714 static final public Expression ExclusiveOrExpression() throws ParseException {
1715 Expression expr,expr2;
1716 expr = AndExpression();
1719 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1724 jj_la1[37] = jj_gen;
1727 jj_consume_token(XOR);
1728 expr2 = AndExpression();
1729 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1731 {if (true) return expr;}
1732 throw new Error("Missing return statement in function");
1735 static final public Expression AndExpression() throws ParseException {
1736 Expression expr,expr2;
1737 expr = EqualityExpression();
1740 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1745 jj_la1[38] = jj_gen;
1748 jj_consume_token(BIT_AND);
1749 expr2 = EqualityExpression();
1750 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1752 {if (true) return expr;}
1753 throw new Error("Missing return statement in function");
1756 static final public Expression EqualityExpression() throws ParseException {
1757 Expression expr,expr2;
1760 expr = RelationalExpression();
1763 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1767 case BANGDOUBLEEQUAL:
1772 jj_la1[39] = jj_gen;
1775 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1777 token = jj_consume_token(EQUAL_EQUAL);
1778 operator = OperatorIds.EQUAL_EQUAL;
1781 token = jj_consume_token(DIF);
1782 operator = OperatorIds.DIF;
1785 token = jj_consume_token(NOT_EQUAL);
1786 operator = OperatorIds.DIF;
1788 case BANGDOUBLEEQUAL:
1789 token = jj_consume_token(BANGDOUBLEEQUAL);
1790 operator = OperatorIds.BANG_EQUAL_EQUAL;
1793 token = jj_consume_token(TRIPLEEQUAL);
1794 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1797 jj_la1[40] = jj_gen;
1798 jj_consume_token(-1);
1799 throw new ParseException();
1802 expr2 = RelationalExpression();
1803 } catch (ParseException e) {
1804 if (errorMessage != null) {
1805 {if (true) throw e;}
1807 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1809 errorStart = token.sourceEnd +1;
1810 errorEnd = token.sourceEnd +1;
1811 expr2 = new ConstantIdentifier(SYNTAX_ERROR_CHAR,token.sourceEnd +1,token.sourceEnd +1);
1812 processParseExceptionDebug(e);
1814 expr = new BinaryExpression(expr,expr2,operator);
1816 {if (true) return expr;}
1817 throw new Error("Missing return statement in function");
1820 static final public Expression RelationalExpression() throws ParseException {
1821 Expression expr,expr2;
1823 expr = ShiftExpression();
1826 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1834 jj_la1[41] = jj_gen;
1837 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1839 jj_consume_token(LT);
1840 operator = OperatorIds.LESS;
1843 jj_consume_token(GT);
1844 operator = OperatorIds.GREATER;
1847 jj_consume_token(LE);
1848 operator = OperatorIds.LESS_EQUAL;
1851 jj_consume_token(GE);
1852 operator = OperatorIds.GREATER_EQUAL;
1855 jj_la1[42] = jj_gen;
1856 jj_consume_token(-1);
1857 throw new ParseException();
1859 expr2 = ShiftExpression();
1860 expr = new BinaryExpression(expr,expr2,operator);
1862 {if (true) return expr;}
1863 throw new Error("Missing return statement in function");
1866 static final public Expression ShiftExpression() throws ParseException {
1867 Expression expr,expr2;
1869 expr = AdditiveExpression();
1872 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1875 case RUNSIGNEDSHIFT:
1879 jj_la1[43] = jj_gen;
1882 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1884 jj_consume_token(LSHIFT);
1885 operator = OperatorIds.LEFT_SHIFT;
1888 jj_consume_token(RSIGNEDSHIFT);
1889 operator = OperatorIds.RIGHT_SHIFT;
1891 case RUNSIGNEDSHIFT:
1892 jj_consume_token(RUNSIGNEDSHIFT);
1893 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1896 jj_la1[44] = jj_gen;
1897 jj_consume_token(-1);
1898 throw new ParseException();
1900 expr2 = AdditiveExpression();
1901 expr = new BinaryExpression(expr,expr2,operator);
1903 {if (true) return expr;}
1904 throw new Error("Missing return statement in function");
1907 static final public Expression AdditiveExpression() throws ParseException {
1908 Expression expr,expr2;
1910 expr = MultiplicativeExpression();
1913 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1919 jj_la1[45] = jj_gen;
1922 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1924 jj_consume_token(PLUS);
1925 operator = OperatorIds.PLUS;
1928 jj_consume_token(MINUS);
1929 operator = OperatorIds.MINUS;
1932 jj_la1[46] = jj_gen;
1933 jj_consume_token(-1);
1934 throw new ParseException();
1936 expr2 = MultiplicativeExpression();
1937 expr = new BinaryExpression(expr,expr2,operator);
1939 {if (true) return expr;}
1940 throw new Error("Missing return statement in function");
1943 static final public Expression MultiplicativeExpression() throws ParseException {
1944 Expression expr,expr2;
1947 expr = UnaryExpression();
1948 } catch (ParseException e) {
1949 if (errorMessage != null) {if (true) throw e;}
1950 errorMessage = "unexpected token '"+e.currentToken.next.image+'\'';
1952 errorStart = PHPParser.token.sourceStart;
1953 errorEnd = PHPParser.token.sourceEnd;
1954 {if (true) throw e;}
1958 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1965 jj_la1[47] = jj_gen;
1968 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1970 jj_consume_token(STAR);
1971 operator = OperatorIds.MULTIPLY;
1974 jj_consume_token(SLASH);
1975 operator = OperatorIds.DIVIDE;
1978 jj_consume_token(REMAINDER);
1979 operator = OperatorIds.REMAINDER;
1982 jj_la1[48] = jj_gen;
1983 jj_consume_token(-1);
1984 throw new ParseException();
1986 expr2 = UnaryExpression();
1987 expr = new BinaryExpression(expr,expr2,operator);
1989 {if (true) return expr;}
1990 throw new Error("Missing return statement in function");
1994 * An unary expression starting with @, & or nothing
1996 static final public Expression UnaryExpression() throws ParseException {
1997 final Expression expr;
1998 /* <BIT_AND> expr = UnaryExpressionNoPrefix() //why did I had that ?
1999 {return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
2001 expr = AtNotTildeUnaryExpression();
2002 {if (true) return expr;}
2003 throw new Error("Missing return statement in function");
2006 static final public Expression AtNotTildeUnaryExpression() throws ParseException {
2007 final Expression expr;
2009 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2011 token = jj_consume_token(AT);
2012 expr = AtNotTildeUnaryExpression();
2013 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,token.sourceStart);}
2016 token = jj_consume_token(TILDE);
2017 expr = AtNotTildeUnaryExpression();
2018 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.TWIDDLE,token.sourceStart);}
2021 token = jj_consume_token(BANG);
2022 expr = AtNotUnaryExpression();
2023 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
2035 case INTEGER_LITERAL:
2036 case FLOATING_POINT_LITERAL:
2037 case STRING_LITERAL:
2042 expr = UnaryExpressionNoPrefix();
2043 {if (true) return expr;}
2046 jj_la1[49] = jj_gen;
2047 jj_consume_token(-1);
2048 throw new ParseException();
2050 throw new Error("Missing return statement in function");
2054 * An expression prefixed (or not) by one or more @ and !.
2055 * @return the expression
2057 static final public Expression AtNotUnaryExpression() throws ParseException {
2058 final Expression expr;
2060 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2062 token = jj_consume_token(AT);
2063 expr = AtNotUnaryExpression();
2064 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,token.sourceStart);}
2067 token = jj_consume_token(BANG);
2068 expr = AtNotUnaryExpression();
2069 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
2081 case INTEGER_LITERAL:
2082 case FLOATING_POINT_LITERAL:
2083 case STRING_LITERAL:
2088 expr = UnaryExpressionNoPrefix();
2089 {if (true) return expr;}
2092 jj_la1[50] = jj_gen;
2093 jj_consume_token(-1);
2094 throw new ParseException();
2096 throw new Error("Missing return statement in function");
2099 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
2100 final Expression expr;
2102 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2104 token = jj_consume_token(PLUS);
2105 expr = AtNotTildeUnaryExpression();
2106 {if (true) return new PrefixedUnaryExpression(expr,
2108 token.sourceStart);}
2111 token = jj_consume_token(MINUS);
2112 expr = AtNotTildeUnaryExpression();
2113 {if (true) return new PrefixedUnaryExpression(expr,
2115 token.sourceStart);}
2119 expr = PreIncDecExpression();
2120 {if (true) return expr;}
2128 case INTEGER_LITERAL:
2129 case FLOATING_POINT_LITERAL:
2130 case STRING_LITERAL:
2135 expr = UnaryExpressionNotPlusMinus();
2136 {if (true) return expr;}
2139 jj_la1[51] = jj_gen;
2140 jj_consume_token(-1);
2141 throw new ParseException();
2143 throw new Error("Missing return statement in function");
2146 static final public Expression PreIncDecExpression() throws ParseException {
2147 final Expression expr;
2150 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2152 token = jj_consume_token(PLUS_PLUS);
2153 operator = OperatorIds.PLUS_PLUS;
2156 token = jj_consume_token(MINUS_MINUS);
2157 operator = OperatorIds.MINUS_MINUS;
2160 jj_la1[52] = jj_gen;
2161 jj_consume_token(-1);
2162 throw new ParseException();
2164 expr = PrimaryExpression();
2165 {if (true) return new PrefixedUnaryExpression(expr,operator,token.sourceStart);}
2166 throw new Error("Missing return statement in function");
2169 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
2170 final Expression expr;
2171 if (jj_2_3(2147483647)) {
2172 expr = CastExpression();
2173 {if (true) return expr;}
2175 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2181 expr = PostfixExpression();
2182 {if (true) return expr;}
2187 case INTEGER_LITERAL:
2188 case FLOATING_POINT_LITERAL:
2189 case STRING_LITERAL:
2192 {if (true) return expr;}
2195 jj_consume_token(LPAREN);
2196 expr = Expression();
2198 jj_consume_token(RPAREN);
2199 } catch (ParseException e) {
2200 errorMessage = "')' expected";
2202 errorStart = expr.sourceEnd +1;
2203 errorEnd = expr.sourceEnd +1;
2204 processParseExceptionDebug(e);
2206 {if (true) return expr;}
2209 jj_la1[53] = jj_gen;
2210 jj_consume_token(-1);
2211 throw new ParseException();
2214 throw new Error("Missing return statement in function");
2217 static final public CastExpression CastExpression() throws ParseException {
2218 final ConstantIdentifier type;
2219 final Expression expr;
2220 final Token token,token1;
2221 token1 = jj_consume_token(LPAREN);
2222 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2235 token = jj_consume_token(ARRAY);
2236 type = new ConstantIdentifier(token);
2239 jj_la1[54] = jj_gen;
2240 jj_consume_token(-1);
2241 throw new ParseException();
2243 jj_consume_token(RPAREN);
2244 expr = UnaryExpression();
2245 {if (true) return new CastExpression(type,expr,token1.sourceStart,expr.sourceEnd);}
2246 throw new Error("Missing return statement in function");
2249 static final public Expression PostfixExpression() throws ParseException {
2250 final Expression expr;
2253 expr = PrimaryExpression();
2254 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2257 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2259 token = jj_consume_token(PLUS_PLUS);
2260 operator = OperatorIds.PLUS_PLUS;
2263 token = jj_consume_token(MINUS_MINUS);
2264 operator = OperatorIds.MINUS_MINUS;
2267 jj_la1[55] = jj_gen;
2268 jj_consume_token(-1);
2269 throw new ParseException();
2273 jj_la1[56] = jj_gen;
2276 if (operator == -1) {
2277 {if (true) return expr;}
2279 {if (true) return new PostfixedUnaryExpression(expr,operator,token.sourceEnd);}
2280 throw new Error("Missing return statement in function");
2283 static final public Expression PrimaryExpression() throws ParseException {
2286 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2291 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2293 token = jj_consume_token(BIT_AND);
2296 jj_la1[57] = jj_gen;
2299 expr = refPrimaryExpression(token);
2300 {if (true) return expr;}
2303 expr = ArrayDeclarator();
2304 {if (true) return expr;}
2307 jj_la1[58] = jj_gen;
2308 jj_consume_token(-1);
2309 throw new ParseException();
2311 throw new Error("Missing return statement in function");
2314 static final public Expression refPrimaryExpression(final Token reference) throws ParseException {
2316 Expression expr2 = null;
2317 final Token identifier;
2318 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2320 identifier = jj_consume_token(IDENTIFIER);
2321 expr = new ConstantIdentifier(identifier);
2324 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2325 case STATICCLASSACCESS:
2329 jj_la1[59] = jj_gen;
2332 jj_consume_token(STATICCLASSACCESS);
2333 expr2 = ClassIdentifier();
2334 expr = new ClassAccess(expr,
2336 ClassAccess.STATIC);
2338 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2340 expr2 = Arguments(expr);
2343 jj_la1[60] = jj_gen;
2346 if (expr2 == null) {
2347 if (reference != null) {
2348 ParseException e = generateParseException();
2349 errorMessage = "you cannot use a constant by reference";
2351 errorStart = reference.sourceStart;
2352 errorEnd = reference.sourceEnd;
2353 processParseExceptionDebug(e);
2355 {if (true) return expr;}
2357 {if (true) return expr2;}
2360 expr = VariableDeclaratorId();
2361 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2363 expr = Arguments(expr);
2366 jj_la1[61] = jj_gen;
2369 {if (true) return expr;}
2372 token = jj_consume_token(NEW);
2373 expr = ClassIdentifier();
2375 if (reference == null) {
2376 start = token.sourceStart;
2378 start = reference.sourceStart;
2380 expr = new ClassInstantiation(expr,
2383 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2385 expr = Arguments(expr);
2388 jj_la1[62] = jj_gen;
2391 {if (true) return expr;}
2394 jj_la1[63] = jj_gen;
2395 jj_consume_token(-1);
2396 throw new ParseException();
2398 throw new Error("Missing return statement in function");
2402 * An array declarator.
2406 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2407 final ArrayVariableDeclaration[] vars;
2409 token = jj_consume_token(ARRAY);
2410 vars = ArrayInitializer();
2411 {if (true) return new ArrayInitializer(vars,
2413 PHPParser.token.sourceEnd);}
2414 throw new Error("Missing return statement in function");
2417 static final public Expression ClassIdentifier() throws ParseException {
2418 final Expression expr;
2420 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2422 token = jj_consume_token(IDENTIFIER);
2423 {if (true) return new ConstantIdentifier(token);}
2435 {if (true) return expr;}
2438 expr = VariableDeclaratorId();
2439 {if (true) return expr;}
2442 jj_la1[64] = jj_gen;
2443 jj_consume_token(-1);
2444 throw new ParseException();
2446 throw new Error("Missing return statement in function");
2450 * Used by Variabledeclaratorid and primarysuffix
2452 static final public AbstractVariable VariableSuffix(final AbstractVariable prefix) throws ParseException {
2453 Expression expression = null;
2454 final Token classAccessToken,lbrace,rbrace;
2457 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2459 classAccessToken = jj_consume_token(CLASSACCESS);
2461 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2463 lbrace = jj_consume_token(LBRACE);
2464 expression = Expression();
2465 rbrace = jj_consume_token(RBRACE);
2466 expression = new Variable(expression,
2471 token = jj_consume_token(IDENTIFIER);
2472 expression = new ConstantIdentifier(token.image,token.sourceStart,token.sourceEnd);
2475 expression = Variable();
2478 jj_la1[65] = jj_gen;
2479 jj_consume_token(-1);
2480 throw new ParseException();
2482 } catch (ParseException e) {
2483 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2485 errorStart = classAccessToken.sourceEnd +1;
2486 errorEnd = classAccessToken.sourceEnd +1;
2487 processParseExceptionDebug(e);
2489 {if (true) return new ClassAccess(prefix,
2491 ClassAccess.NORMAL);}
2494 token = jj_consume_token(LBRACKET);
2495 pos = token.sourceEnd+1;
2496 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2521 case INTEGER_LITERAL:
2522 case FLOATING_POINT_LITERAL:
2523 case STRING_LITERAL:
2528 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2544 case INTEGER_LITERAL:
2545 case FLOATING_POINT_LITERAL:
2546 case STRING_LITERAL:
2551 expression = Expression();
2552 pos = expression.sourceEnd+1;
2563 expression = Type();
2564 pos = expression.sourceEnd+1;
2567 jj_la1[66] = jj_gen;
2568 jj_consume_token(-1);
2569 throw new ParseException();
2573 jj_la1[67] = jj_gen;
2577 token = jj_consume_token(RBRACKET);
2578 pos = token.sourceEnd;
2579 } catch (ParseException e) {
2580 errorMessage = "']' expected";
2584 processParseExceptionDebug(e);
2586 {if (true) return new ArrayDeclarator(prefix,expression,pos);}
2589 token = jj_consume_token(LBRACE);
2590 pos = token.sourceEnd+1;
2591 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2616 case INTEGER_LITERAL:
2617 case FLOATING_POINT_LITERAL:
2618 case STRING_LITERAL:
2623 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2639 case INTEGER_LITERAL:
2640 case FLOATING_POINT_LITERAL:
2641 case STRING_LITERAL:
2646 expression = Expression();
2647 pos = expression.sourceEnd+1;
2658 expression = Type();
2659 pos = expression.sourceEnd+1;
2662 jj_la1[68] = jj_gen;
2663 jj_consume_token(-1);
2664 throw new ParseException();
2668 jj_la1[69] = jj_gen;
2672 token = jj_consume_token(RBRACE);
2673 pos = token.sourceEnd;
2674 } catch (ParseException e) {
2675 errorMessage = "']' expected";
2679 processParseExceptionDebug(e);
2681 {if (true) return new ArrayDeclarator(prefix,expression,pos);}
2684 jj_la1[70] = jj_gen;
2685 jj_consume_token(-1);
2686 throw new ParseException();
2688 throw new Error("Missing return statement in function");
2691 static final public Literal Literal() throws ParseException {
2693 StringLiteral literal;
2694 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2695 case INTEGER_LITERAL:
2696 token = jj_consume_token(INTEGER_LITERAL);
2697 {if (true) return new NumberLiteral(token);}
2699 case FLOATING_POINT_LITERAL:
2700 token = jj_consume_token(FLOATING_POINT_LITERAL);
2701 {if (true) return new NumberLiteral(token);}
2703 case STRING_LITERAL:
2704 token = jj_consume_token(STRING_LITERAL);
2705 {if (true) return new StringLiteral(token);}
2708 token = jj_consume_token(TRUE);
2709 {if (true) return new TrueLiteral(token);}
2712 token = jj_consume_token(FALSE);
2713 {if (true) return new FalseLiteral(token);}
2716 token = jj_consume_token(NULL);
2717 {if (true) return new NullLiteral(token);}
2720 literal = evaluableString();
2721 {if (true) return literal;}
2724 jj_la1[71] = jj_gen;
2725 jj_consume_token(-1);
2726 throw new ParseException();
2728 throw new Error("Missing return statement in function");
2731 static final public StringLiteral evaluableString() throws ParseException {
2732 ArrayList list = new ArrayList();
2734 Token token,lbrace,rbrace;
2735 AbstractVariable var;
2737 start = jj_consume_token(DOUBLEQUOTE);
2740 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2745 jj_la1[72] = jj_gen;
2748 jj_consume_token(DOLLARS);
2749 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2751 token = jj_consume_token(IDENTIFIER);
2752 list.add(new Variable(token.image,
2757 lbrace = jj_consume_token(LBRACE1);
2758 token = jj_consume_token(ID);
2759 list.add(new Variable(token.image,
2762 rbrace = jj_consume_token(RBRACE1);
2765 jj_la1[73] = jj_gen;
2766 jj_consume_token(-1);
2767 throw new ParseException();
2770 end = jj_consume_token(DOUBLEQUOTE2);
2771 AbstractVariable[] vars = new AbstractVariable[list.size()];
2773 {if (true) return new StringLiteral(SimpleCharStream.currentBuffer.substring(start.sourceEnd,end.sourceStart),
2777 throw new Error("Missing return statement in function");
2780 static final public FunctionCall Arguments(final Expression func) throws ParseException {
2781 Expression[] args = null;
2782 final Token token,lparen;
2783 lparen = jj_consume_token(LPAREN);
2784 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2800 case INTEGER_LITERAL:
2801 case FLOATING_POINT_LITERAL:
2802 case STRING_LITERAL:
2807 args = ArgumentList();
2810 jj_la1[74] = jj_gen;
2814 token = jj_consume_token(RPAREN);
2815 {if (true) return new FunctionCall(func,args,token.sourceEnd);}
2816 } catch (ParseException e) {
2817 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2820 errorStart = lparen.sourceEnd+1;
2821 errorEnd = lparen.sourceEnd+2;
2823 errorStart = args[args.length-1].sourceEnd+1;
2824 errorEnd = args[args.length-1].sourceEnd+2;
2826 processParseExceptionDebug(e);
2828 int sourceEnd = (args == null && args.length != 0) ? lparen.sourceEnd+1 : args[args.length-1].sourceEnd;
2829 {if (true) return new FunctionCall(func,args,sourceEnd);}
2830 throw new Error("Missing return statement in function");
2834 * An argument list is a list of arguments separated by comma :
2835 * argumentDeclaration() (, argumentDeclaration)*
2836 * @return an array of arguments
2838 static final public Expression[] ArgumentList() throws ParseException {
2840 final ArrayList list = new ArrayList();
2844 list.add(arg);pos = arg.sourceEnd;
2847 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2852 jj_la1[75] = jj_gen;
2855 token = jj_consume_token(COMMA);
2856 pos = token.sourceEnd;
2860 pos = arg.sourceEnd;
2861 } catch (ParseException e) {
2862 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2866 processParseException(e);
2869 final Expression[] arguments = new Expression[list.size()];
2870 list.toArray(arguments);
2871 {if (true) return arguments;}
2872 throw new Error("Missing return statement in function");
2876 * A Statement without break.
2877 * @return a statement
2879 static final public Statement StatementNoBreak() throws ParseException {
2880 final Statement statement;
2883 statement = expressionStatement();
2884 {if (true) return statement;}
2886 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2888 statement = LabeledStatement();
2889 {if (true) return statement;}
2892 statement = Block();
2893 {if (true) return statement;}
2896 statement = EmptyStatement();
2897 {if (true) return statement;}
2900 statement = SwitchStatement();
2901 {if (true) return statement;}
2904 statement = IfStatement();
2905 {if (true) return statement;}
2908 statement = WhileStatement();
2909 {if (true) return statement;}
2912 statement = DoStatement();
2913 {if (true) return statement;}
2916 statement = ForStatement();
2917 {if (true) return statement;}
2920 statement = ForeachStatement();
2921 {if (true) return statement;}
2924 statement = ContinueStatement();
2925 {if (true) return statement;}
2928 statement = ReturnStatement();
2929 {if (true) return statement;}
2932 statement = EchoStatement();
2933 {if (true) return statement;}
2940 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2942 token = jj_consume_token(AT);
2945 jj_la1[76] = jj_gen;
2948 statement = IncludeStatement();
2949 if (token != null) {
2950 ((InclusionStatement)statement).silent = true;
2951 statement.sourceStart = token.sourceStart;
2953 {if (true) return statement;}
2956 statement = StaticStatement();
2957 {if (true) return statement;}
2960 statement = GlobalStatement();
2961 {if (true) return statement;}
2964 statement = defineStatement();
2965 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2968 jj_la1[77] = jj_gen;
2969 jj_consume_token(-1);
2970 throw new ParseException();
2973 throw new Error("Missing return statement in function");
2977 * A statement expression.
2979 * @return an expression
2981 static final public Statement expressionStatement() throws ParseException {
2982 final Statement statement;
2984 statement = Expression();
2986 token = jj_consume_token(SEMICOLON);
2987 statement.sourceEnd = token.sourceEnd;
2988 } catch (ParseException e) {
2989 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2990 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2992 errorStart = statement.sourceEnd+1;
2993 errorEnd = statement.sourceEnd+1;
2994 processParseExceptionDebug(e);
2997 {if (true) return statement;}
2998 throw new Error("Missing return statement in function");
3001 static final public Define defineStatement() throws ParseException {
3002 Expression defineName,defineValue;
3003 final Token defineToken;
3006 defineToken = jj_consume_token(DEFINE);
3007 pos = defineToken.sourceEnd+1;
3009 token = jj_consume_token(LPAREN);
3010 pos = token.sourceEnd+1;
3011 } catch (ParseException e) {
3012 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
3016 processParseExceptionDebug(e);
3019 defineName = Expression();
3020 pos = defineName.sourceEnd+1;
3021 } catch (ParseException e) {
3022 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
3026 processParseExceptionDebug(e);
3027 defineName = new StringLiteral(SYNTAX_ERROR_CHAR,pos,pos);
3030 token = jj_consume_token(COMMA);
3031 pos = defineName.sourceEnd+1;
3032 } catch (ParseException e) {
3033 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
3037 processParseExceptionDebug(e);
3040 defineValue = Expression();
3041 pos = defineValue.sourceEnd+1;
3042 } catch (ParseException e) {
3043 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
3047 processParseExceptionDebug(e);
3048 defineValue = new StringLiteral(SYNTAX_ERROR_CHAR,pos,pos);
3051 token = jj_consume_token(RPAREN);
3052 pos = token.sourceEnd+1;
3053 } catch (ParseException e) {
3054 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
3058 processParseExceptionDebug(e);
3060 {if (true) return new Define(currentSegment,
3063 defineToken.sourceStart,
3065 throw new Error("Missing return statement in function");
3069 * A Normal statement.
3071 static final public Statement Statement() throws ParseException {
3072 final Statement statement;
3073 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3105 case INTEGER_LITERAL:
3106 case FLOATING_POINT_LITERAL:
3107 case STRING_LITERAL:
3114 statement = StatementNoBreak();
3115 {if (true) return statement;}
3118 statement = BreakStatement();
3119 {if (true) return statement;}
3122 jj_la1[78] = jj_gen;
3123 jj_consume_token(-1);
3124 throw new ParseException();
3126 throw new Error("Missing return statement in function");
3130 * An html block inside a php syntax.
3132 static final public HTMLBlock htmlBlock() throws ParseException {
3133 final int startIndex = nodePtr;
3134 final AstNode[] blockNodes;
3137 phpEnd = jj_consume_token(PHPEND);
3138 htmlStart = phpEnd.sourceEnd;
3141 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3146 jj_la1[79] = jj_gen;
3152 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3154 jj_consume_token(PHPSTARTLONG);
3157 jj_consume_token(PHPSTARTSHORT);
3160 jj_la1[80] = jj_gen;
3161 jj_consume_token(-1);
3162 throw new ParseException();
3164 PHPParser.createNewHTMLCode();
3165 } catch (ParseException e) {
3166 errorMessage = "unexpected end of file , '<?php' expected";
3168 errorStart = e.currentToken.sourceStart;
3169 errorEnd = e.currentToken.sourceEnd;
3170 {if (true) throw e;}
3172 nbNodes = nodePtr - startIndex;
3174 {if (true) return null;}
3176 blockNodes = new AstNode[nbNodes];
3177 System.arraycopy(nodes,startIndex+1,blockNodes,0,nbNodes);
3178 nodePtr = startIndex;
3179 {if (true) return new HTMLBlock(blockNodes);}
3180 throw new Error("Missing return statement in function");
3184 * An include statement. It's "include" an expression;
3186 static final public InclusionStatement IncludeStatement() throws ParseException {
3189 final InclusionStatement inclusionStatement;
3190 final Token token, token2;
3192 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3194 token = jj_consume_token(REQUIRE);
3195 keyword = InclusionStatement.REQUIRE;pos=token.sourceEnd;
3198 token = jj_consume_token(REQUIRE_ONCE);
3199 keyword = InclusionStatement.REQUIRE_ONCE;pos=token.sourceEnd;
3202 token = jj_consume_token(INCLUDE);
3203 keyword = InclusionStatement.INCLUDE;pos=token.sourceEnd;
3206 token = jj_consume_token(INCLUDE_ONCE);
3207 keyword = InclusionStatement.INCLUDE_ONCE;pos=token.sourceEnd;
3210 jj_la1[81] = jj_gen;
3211 jj_consume_token(-1);
3212 throw new ParseException();
3215 expr = Expression();
3216 pos = expr.sourceEnd;
3217 } catch (ParseException e) {
3218 if (errorMessage != null) {
3219 {if (true) throw e;}
3221 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
3223 errorStart = e.currentToken.next.sourceStart;
3224 errorEnd = e.currentToken.next.sourceEnd;
3225 expr = new ConstantIdentifier(SYNTAX_ERROR_CHAR,pos,pos);
3226 processParseExceptionDebug(e);
3229 token2 = jj_consume_token(SEMICOLON);
3230 pos=token2.sourceEnd;
3231 } catch (ParseException e) {
3232 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
3234 errorStart = e.currentToken.next.sourceStart;
3235 errorEnd = e.currentToken.next.sourceEnd;
3236 processParseExceptionDebug(e);
3238 inclusionStatement = new InclusionStatement(currentSegment,
3243 currentSegment.add(inclusionStatement);
3244 {if (true) return inclusionStatement;}
3245 throw new Error("Missing return statement in function");
3248 static final public PrintExpression PrintExpression() throws ParseException {
3249 final Expression expr;
3250 final Token printToken;
3251 token = jj_consume_token(PRINT);
3252 expr = Expression();
3253 {if (true) return new PrintExpression(expr,token.sourceStart,expr.sourceEnd);}
3254 throw new Error("Missing return statement in function");
3257 static final public ListExpression ListExpression() throws ParseException {
3258 Expression expr = null;
3259 final Expression expression;
3260 final ArrayList list = new ArrayList();
3262 final Token listToken, rParen;
3264 listToken = jj_consume_token(LIST);
3265 pos = listToken.sourceEnd;
3267 token = jj_consume_token(LPAREN);
3268 pos = token.sourceEnd;
3269 } catch (ParseException e) {
3270 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
3272 errorStart = listToken.sourceEnd+1;
3273 errorEnd = listToken.sourceEnd+1;
3274 processParseExceptionDebug(e);
3276 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3278 expr = VariableDeclaratorId();
3279 list.add(expr);pos = expr.sourceEnd;
3282 jj_la1[82] = jj_gen;
3285 if (expr == null) list.add(null);
3288 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3293 jj_la1[83] = jj_gen;
3297 token = jj_consume_token(COMMA);
3298 pos = token.sourceEnd;
3299 } catch (ParseException e) {
3300 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
3304 processParseExceptionDebug(e);
3306 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3308 expr = VariableDeclaratorId();
3309 list.add(expr);pos = expr.sourceEnd;
3312 jj_la1[84] = jj_gen;
3317 rParen = jj_consume_token(RPAREN);
3318 pos = rParen.sourceEnd;
3319 } catch (ParseException e) {
3320 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
3324 processParseExceptionDebug(e);
3326 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3328 jj_consume_token(ASSIGN);
3329 expression = Expression();
3330 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3332 {if (true) return new ListExpression(vars,
3334 listToken.sourceStart,
3335 expression.sourceEnd);}
3338 jj_la1[85] = jj_gen;
3341 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3343 {if (true) return new ListExpression(vars,listToken.sourceStart,pos);}
3344 throw new Error("Missing return statement in function");
3348 * An echo statement.
3349 * echo anyexpression (, otherexpression)*
3351 static final public EchoStatement EchoStatement() throws ParseException {
3352 final ArrayList expressions = new ArrayList();
3355 Token token2 = null;
3356 token = jj_consume_token(ECHO);
3357 expr = Expression();
3358 expressions.add(expr);
3361 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3366 jj_la1[86] = jj_gen;
3369 jj_consume_token(COMMA);
3370 expr = Expression();
3371 expressions.add(expr);
3374 token2 = jj_consume_token(SEMICOLON);
3375 } catch (ParseException e) {
3376 if (e.currentToken.next.kind != 4) {
3377 errorMessage = "';' expected after 'echo' statement";
3379 errorStart = e.currentToken.sourceEnd;
3380 errorEnd = e.currentToken.sourceEnd;
3381 processParseExceptionDebug(e);
3384 final Expression[] exprs = new Expression[expressions.size()];
3385 expressions.toArray(exprs);
3386 if (token2 == null) {
3387 {if (true) return new EchoStatement(exprs,token.sourceStart, exprs[exprs.length-1].sourceEnd);}
3389 {if (true) return new EchoStatement(exprs,token.sourceStart, token2.sourceEnd);}
3390 throw new Error("Missing return statement in function");
3393 static final public GlobalStatement GlobalStatement() throws ParseException {
3395 final ArrayList vars = new ArrayList();
3396 final GlobalStatement global;
3397 final Token token, token2;
3399 token = jj_consume_token(GLOBAL);
3401 vars.add(expr);pos = expr.sourceEnd+1;
3404 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3409 jj_la1[87] = jj_gen;
3412 jj_consume_token(COMMA);
3414 vars.add(expr);pos = expr.sourceEnd+1;
3417 token2 = jj_consume_token(SEMICOLON);
3418 pos = token2.sourceEnd+1;
3419 } catch (ParseException e) {
3420 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3424 processParseExceptionDebug(e);
3426 final Variable[] variables = new Variable[vars.size()];
3427 vars.toArray(variables);
3428 global = new GlobalStatement(currentSegment,
3432 currentSegment.add(global);
3433 {if (true) return global;}
3434 throw new Error("Missing return statement in function");
3437 static final public StaticStatement StaticStatement() throws ParseException {
3438 final ArrayList vars = new ArrayList();
3439 VariableDeclaration expr;
3440 final Token token, token2;
3442 token = jj_consume_token(STATIC);
3443 expr = VariableDeclarator();
3444 vars.add(expr);pos = expr.sourceEnd+1;
3447 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3452 jj_la1[88] = jj_gen;
3455 jj_consume_token(COMMA);
3456 expr = VariableDeclarator();
3457 vars.add(expr);pos = expr.sourceEnd+1;
3460 token2 = jj_consume_token(SEMICOLON);
3461 pos = token2.sourceEnd+1;
3462 } catch (ParseException e) {
3463 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3467 processParseException(e);
3469 final VariableDeclaration[] variables = new VariableDeclaration[vars.size()];
3470 vars.toArray(variables);
3471 {if (true) return new StaticStatement(variables,
3474 throw new Error("Missing return statement in function");
3477 static final public LabeledStatement LabeledStatement() throws ParseException {
3479 final Statement statement;
3480 label = jj_consume_token(IDENTIFIER);
3481 jj_consume_token(COLON);
3482 statement = Statement();
3483 {if (true) return new LabeledStatement(label.image,statement,label.sourceStart,statement.sourceEnd);}
3484 throw new Error("Missing return statement in function");
3494 static final public Block Block() throws ParseException {
3495 final ArrayList list = new ArrayList();
3496 Statement statement;
3497 final Token token, token2;
3500 token = jj_consume_token(LBRACE);
3501 pos = token.sourceEnd+1;start=token.sourceStart;
3502 } catch (ParseException e) {
3503 errorMessage = "'{' expected";
3505 pos = PHPParser.token.sourceEnd+1;
3509 processParseExceptionDebug(e);
3513 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3549 case INTEGER_LITERAL:
3550 case FLOATING_POINT_LITERAL:
3551 case STRING_LITERAL:
3561 jj_la1[89] = jj_gen;
3564 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3599 case INTEGER_LITERAL:
3600 case FLOATING_POINT_LITERAL:
3601 case STRING_LITERAL:
3608 statement = BlockStatement();
3609 list.add(statement);pos = statement.sourceEnd+1;
3612 statement = htmlBlock();
3613 if (statement != null) {
3614 list.add(statement);
3615 pos = statement.sourceEnd+1;
3617 pos = PHPParser.token.sourceEnd+1;
3620 jj_la1[90] = jj_gen;
3621 jj_consume_token(-1);
3622 throw new ParseException();
3626 token2 = jj_consume_token(RBRACE);
3627 pos = token2.sourceEnd+1;
3628 } catch (ParseException e) {
3629 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3633 processParseExceptionDebug(e);
3635 final Statement[] statements = new Statement[list.size()];
3636 list.toArray(statements);
3637 {if (true) return new Block(statements,start,pos);}
3638 throw new Error("Missing return statement in function");
3641 static final public Statement BlockStatement() throws ParseException {
3642 final Statement statement;
3643 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3676 case INTEGER_LITERAL:
3677 case FLOATING_POINT_LITERAL:
3678 case STRING_LITERAL:
3686 statement = Statement();
3687 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3688 {if (true) return statement;}
3689 } catch (ParseException e) {
3690 errorMessage = "unexpected token : '"+ e.currentToken.image +"', a statement was expected";
3692 errorStart = e.currentToken.sourceStart;
3693 errorEnd = e.currentToken.sourceEnd;
3694 {if (true) throw e;}
3698 statement = ClassDeclaration();
3699 {if (true) return statement;}
3702 statement = MethodDeclaration();
3703 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3704 currentSegment.add((MethodDeclaration) statement);
3705 ((MethodDeclaration) statement).analyzeCode();
3706 {if (true) return statement;}
3709 jj_la1[91] = jj_gen;
3710 jj_consume_token(-1);
3711 throw new ParseException();
3713 throw new Error("Missing return statement in function");
3717 * A Block statement that will not contain any 'break'
3719 static final public Statement BlockStatementNoBreak() throws ParseException {
3720 final Statement statement;
3721 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3753 case INTEGER_LITERAL:
3754 case FLOATING_POINT_LITERAL:
3755 case STRING_LITERAL:
3762 statement = StatementNoBreak();
3763 {if (true) return statement;}
3766 statement = ClassDeclaration();
3767 {if (true) return statement;}
3770 statement = MethodDeclaration();
3771 currentSegment.add((MethodDeclaration) statement);
3772 ((MethodDeclaration) statement).analyzeCode();
3773 {if (true) return statement;}
3776 jj_la1[92] = jj_gen;
3777 jj_consume_token(-1);
3778 throw new ParseException();
3780 throw new Error("Missing return statement in function");
3784 * used only by ForInit()
3786 static final public Expression[] LocalVariableDeclaration() throws ParseException {
3787 final ArrayList list = new ArrayList();
3793 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3798 jj_la1[93] = jj_gen;
3801 jj_consume_token(COMMA);
3805 final Expression[] vars = new Expression[list.size()];
3807 {if (true) return vars;}
3808 throw new Error("Missing return statement in function");
3812 * used only by LocalVariableDeclaration().
3814 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3815 final Variable varName;
3816 Expression initializer = null;
3817 varName = Variable();
3818 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3820 jj_consume_token(ASSIGN);
3821 initializer = Expression();
3824 jj_la1[94] = jj_gen;
3827 if (initializer == null) {
3828 {if (true) return new VariableDeclaration(currentSegment,
3830 varName.sourceStart,
3831 varName.sourceEnd);}
3833 {if (true) return new VariableDeclaration(currentSegment,
3836 VariableDeclaration.EQUAL,
3837 varName.sourceStart);}
3838 throw new Error("Missing return statement in function");
3841 static final public EmptyStatement EmptyStatement() throws ParseException {
3843 token = jj_consume_token(SEMICOLON);
3844 {if (true) return new EmptyStatement(token.sourceStart,token.sourceEnd);}
3845 throw new Error("Missing return statement in function");
3849 * used only by StatementExpressionList() which is used only by ForInit() and ForStatement()
3851 static final public Expression StatementExpression() throws ParseException {
3852 final Expression expr;
3853 final Token operator;
3854 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3857 expr = PreIncDecExpression();
3858 {if (true) return expr;}
3865 expr = PrimaryExpression();
3866 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3869 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3871 operator = jj_consume_token(PLUS_PLUS);
3872 {if (true) return new PostfixedUnaryExpression(expr,
3873 OperatorIds.PLUS_PLUS,
3874 operator.sourceEnd);}
3877 operator = jj_consume_token(MINUS_MINUS);
3878 {if (true) return new PostfixedUnaryExpression(expr,
3879 OperatorIds.MINUS_MINUS,
3880 operator.sourceEnd);}
3883 jj_la1[95] = jj_gen;
3884 jj_consume_token(-1);
3885 throw new ParseException();
3889 jj_la1[96] = jj_gen;
3892 {if (true) return expr;}
3895 jj_la1[97] = jj_gen;
3896 jj_consume_token(-1);
3897 throw new ParseException();
3899 throw new Error("Missing return statement in function");
3902 static final public SwitchStatement SwitchStatement() throws ParseException {
3903 Expression variable;
3904 final AbstractCase[] cases;
3905 final Token switchToken,lparenToken,rparenToken;
3907 switchToken = jj_consume_token(SWITCH);
3908 pos = switchToken.sourceEnd+1;
3910 lparenToken = jj_consume_token(LPAREN);
3911 pos = lparenToken.sourceEnd+1;
3912 } catch (ParseException e) {
3913 errorMessage = "'(' expected after 'switch'";
3917 processParseExceptionDebug(e);
3920 variable = Expression();
3921 pos = variable.sourceEnd+1;
3922 } catch (ParseException e) {
3923 if (errorMessage != null) {
3924 {if (true) throw e;}
3926 errorMessage = "expression expected";
3930 processParseExceptionDebug(e);
3931 variable = new ConstantIdentifier(SYNTAX_ERROR_CHAR,pos,pos);
3934 rparenToken = jj_consume_token(RPAREN);
3935 pos = rparenToken.sourceEnd+1;
3936 } catch (ParseException e) {
3937 errorMessage = "')' expected";
3941 processParseExceptionDebug(e);
3943 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3945 cases = switchStatementBrace();
3948 cases = switchStatementColon(switchToken.sourceStart, switchToken.sourceEnd);
3951 jj_la1[98] = jj_gen;
3952 jj_consume_token(-1);
3953 throw new ParseException();
3955 {if (true) return new SwitchStatement(variable,
3957 switchToken.sourceStart,
3958 PHPParser.token.sourceEnd);}
3959 throw new Error("Missing return statement in function");
3962 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3964 final ArrayList cases = new ArrayList();
3967 token = jj_consume_token(LBRACE);
3968 pos = token.sourceEnd;
3971 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3977 jj_la1[99] = jj_gen;
3980 cas = switchLabel0();
3981 cases.add(cas);pos = cas.sourceEnd;
3984 token = jj_consume_token(RBRACE);
3985 pos = token.sourceEnd;
3986 } catch (ParseException e) {
3987 errorMessage = "'}' expected";
3991 processParseExceptionDebug(e);
3993 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3994 cases.toArray(abcase);
3995 {if (true) return abcase;}
3996 throw new Error("Missing return statement in function");
4000 * A Switch statement with : ... endswitch;
4001 * @param start the begin offset of the switch
4002 * @param end the end offset of the switch
4004 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
4006 final ArrayList cases = new ArrayList();
4009 token = jj_consume_token(COLON);
4010 pos = token.sourceEnd;
4012 setMarker(fileToParse,
4013 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
4017 "Line " + token.beginLine);
4018 } catch (CoreException e) {
4019 PHPeclipsePlugin.log(e);
4023 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4029 jj_la1[100] = jj_gen;
4032 cas = switchLabel0();
4033 cases.add(cas);pos = cas.sourceEnd;
4036 token = jj_consume_token(ENDSWITCH);
4037 pos = token.sourceEnd;
4038 } catch (ParseException e) {
4039 errorMessage = "'endswitch' expected";
4043 processParseExceptionDebug(e);
4046 token = jj_consume_token(SEMICOLON);
4047 pos = token.sourceEnd;
4048 } catch (ParseException e) {
4049 errorMessage = "';' expected after 'endswitch' keyword";
4053 processParseExceptionDebug(e);
4055 final AbstractCase[] abcase = new AbstractCase[cases.size()];
4056 cases.toArray(abcase);
4057 {if (true) return abcase;}
4058 throw new Error("Missing return statement in function");
4061 static final public AbstractCase switchLabel0() throws ParseException {
4062 final Expression expr;
4063 Statement statement;
4064 final ArrayList stmts = new ArrayList();
4065 final Token token = PHPParser.token;
4066 final int start = PHPParser.token.next.sourceStart;
4067 expr = SwitchLabel();
4070 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4106 case INTEGER_LITERAL:
4107 case FLOATING_POINT_LITERAL:
4108 case STRING_LITERAL:
4118 jj_la1[101] = jj_gen;
4121 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4155 case INTEGER_LITERAL:
4156 case FLOATING_POINT_LITERAL:
4157 case STRING_LITERAL:
4164 statement = BlockStatementNoBreak();
4165 stmts.add(statement);
4168 statement = htmlBlock();
4169 if (statement != null) {stmts.add(statement);}
4172 statement = BreakStatement();
4173 stmts.add(statement);
4176 jj_la1[102] = jj_gen;
4177 jj_consume_token(-1);
4178 throw new ParseException();
4181 final int listSize = stmts.size();
4182 final Statement[] stmtsArray = new Statement[listSize];
4183 stmts.toArray(stmtsArray);
4184 if (expr == null) {//it's a default
4185 final int end = PHPParser.token.next.sourceStart;
4186 {if (true) return new DefaultCase(stmtsArray,start,end);}
4188 if (listSize != 0) {
4189 {if (true) return new Case(expr,stmtsArray,expr.sourceStart,stmtsArray[listSize-1].sourceEnd);}
4191 {if (true) return new Case(expr,stmtsArray,expr.sourceStart,expr.sourceEnd);}
4193 throw new Error("Missing return statement in function");
4198 * case Expression() :
4200 * @return the if it was a case and null if not
4202 static final public Expression SwitchLabel() throws ParseException {
4203 final Expression expr;
4204 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4206 token = jj_consume_token(CASE);
4208 expr = Expression();
4209 } catch (ParseException e) {
4210 if (errorMessage != null) {if (true) throw e;}
4211 errorMessage = "expression expected after 'case' keyword";
4213 errorStart = token.sourceEnd +1;
4214 errorEnd = token.sourceEnd +1;
4215 {if (true) throw e;}
4218 token = jj_consume_token(COLON);
4219 } catch (ParseException e) {
4220 errorMessage = "':' expected after case expression";
4222 errorStart = expr.sourceEnd+1;
4223 errorEnd = expr.sourceEnd+1;
4224 processParseExceptionDebug(e);
4226 {if (true) return expr;}
4229 token = jj_consume_token(_DEFAULT);
4231 jj_consume_token(COLON);
4232 } catch (ParseException e) {
4233 errorMessage = "':' expected after 'default' keyword";
4235 errorStart = token.sourceEnd+1;
4236 errorEnd = token.sourceEnd+1;
4237 processParseExceptionDebug(e);
4239 {if (true) return null;}
4242 jj_la1[103] = jj_gen;
4243 jj_consume_token(-1);
4244 throw new ParseException();
4246 throw new Error("Missing return statement in function");
4249 static final public Break BreakStatement() throws ParseException {
4250 Expression expression = null;
4251 final Token token, token2;
4253 token = jj_consume_token(BREAK);
4254 pos = token.sourceEnd+1;
4255 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4271 case INTEGER_LITERAL:
4272 case FLOATING_POINT_LITERAL:
4273 case STRING_LITERAL:
4278 expression = Expression();
4279 pos = expression.sourceEnd+1;
4282 jj_la1[104] = jj_gen;
4286 token2 = jj_consume_token(SEMICOLON);
4287 pos = token2.sourceEnd;
4288 } catch (ParseException e) {
4289 errorMessage = "';' expected after 'break' keyword";
4293 processParseExceptionDebug(e);
4295 {if (true) return new Break(expression, token.sourceStart, pos);}
4296 throw new Error("Missing return statement in function");
4299 static final public IfStatement IfStatement() throws ParseException {
4300 final Expression condition;
4301 final IfStatement ifStatement;
4303 token = jj_consume_token(IF);
4304 condition = Condition("if");
4305 ifStatement = IfStatement0(condition,token.sourceStart,token.sourceEnd);
4306 {if (true) return ifStatement;}
4307 throw new Error("Missing return statement in function");
4310 static final public Expression Condition(final String keyword) throws ParseException {
4311 final Expression condition;
4313 jj_consume_token(LPAREN);
4314 } catch (ParseException e) {
4315 errorMessage = "'(' expected after " + keyword + " keyword";
4317 errorStart = PHPParser.token.sourceEnd + 1;
4318 errorEnd = PHPParser.token.sourceEnd + 1;
4319 processParseExceptionDebug(e);
4321 condition = Expression();
4323 jj_consume_token(RPAREN);
4324 } catch (ParseException e) {
4325 errorMessage = "')' expected after " + keyword + " keyword";
4327 errorStart = condition.sourceEnd+1;
4328 errorEnd = condition.sourceEnd+1;
4329 processParseExceptionDebug(e);
4331 {if (true) return condition;}
4332 throw new Error("Missing return statement in function");
4335 static final public IfStatement IfStatement0(final Expression condition, final int start,final int end) throws ParseException {
4336 Statement statement;
4337 final Statement stmt;
4338 final Statement[] statementsArray;
4339 ElseIf elseifStatement;
4340 Else elseStatement = null;
4341 final ArrayList stmts;
4342 final ArrayList elseIfList = new ArrayList();
4343 final ElseIf[] elseIfs;
4344 int pos = SimpleCharStream.getPosition();
4345 final int endStatements;
4346 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4348 jj_consume_token(COLON);
4349 stmts = new ArrayList();
4352 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4386 case INTEGER_LITERAL:
4387 case FLOATING_POINT_LITERAL:
4388 case STRING_LITERAL:
4398 jj_la1[105] = jj_gen;
4401 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4434 case INTEGER_LITERAL:
4435 case FLOATING_POINT_LITERAL:
4436 case STRING_LITERAL:
4443 statement = Statement();
4444 stmts.add(statement);
4447 statement = htmlBlock();
4448 if (statement != null) {stmts.add(statement);}
4451 jj_la1[106] = jj_gen;
4452 jj_consume_token(-1);
4453 throw new ParseException();
4456 endStatements = SimpleCharStream.getPosition();
4459 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4464 jj_la1[107] = jj_gen;
4467 elseifStatement = ElseIfStatementColon();
4468 elseIfList.add(elseifStatement);
4470 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4472 elseStatement = ElseStatementColon();
4475 jj_la1[108] = jj_gen;
4479 setMarker(fileToParse,
4480 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4484 "Line " + token.beginLine);
4485 } catch (CoreException e) {
4486 PHPeclipsePlugin.log(e);
4489 jj_consume_token(ENDIF);
4490 } catch (ParseException e) {
4491 errorMessage = "'endif' expected";
4493 errorStart = e.currentToken.sourceStart;
4494 errorEnd = e.currentToken.sourceEnd;
4495 {if (true) throw e;}
4498 jj_consume_token(SEMICOLON);
4499 } catch (ParseException e) {
4500 errorMessage = "';' expected after 'endif' keyword";
4502 errorStart = e.currentToken.sourceStart;
4503 errorEnd = e.currentToken.sourceEnd;
4504 {if (true) throw e;}
4506 elseIfs = new ElseIf[elseIfList.size()];
4507 elseIfList.toArray(elseIfs);
4508 if (stmts.size() == 1) {
4509 {if (true) return new IfStatement(condition,
4510 (Statement) stmts.get(0),
4514 SimpleCharStream.getPosition());}
4516 statementsArray = new Statement[stmts.size()];
4517 stmts.toArray(statementsArray);
4518 {if (true) return new IfStatement(condition,
4519 new Block(statementsArray,pos,endStatements),
4523 SimpleCharStream.getPosition());}
4559 case INTEGER_LITERAL:
4560 case FLOATING_POINT_LITERAL:
4561 case STRING_LITERAL:
4568 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4601 case INTEGER_LITERAL:
4602 case FLOATING_POINT_LITERAL:
4603 case STRING_LITERAL:
4616 jj_la1[109] = jj_gen;
4617 jj_consume_token(-1);
4618 throw new ParseException();
4622 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4627 jj_la1[110] = jj_gen;
4630 elseifStatement = ElseIfStatement();
4631 elseIfList.add(elseifStatement);
4633 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4635 jj_consume_token(ELSE);
4637 pos = SimpleCharStream.getPosition();
4638 statement = Statement();
4639 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4640 } catch (ParseException e) {
4641 if (errorMessage != null) {
4642 {if (true) throw e;}
4644 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4646 errorStart = e.currentToken.sourceStart;
4647 errorEnd = e.currentToken.sourceEnd;
4648 {if (true) throw e;}
4652 jj_la1[111] = jj_gen;
4655 elseIfs = new ElseIf[elseIfList.size()];
4656 elseIfList.toArray(elseIfs);
4657 {if (true) return new IfStatement(condition,
4662 SimpleCharStream.getPosition());}
4665 jj_la1[112] = jj_gen;
4666 jj_consume_token(-1);
4667 throw new ParseException();
4669 throw new Error("Missing return statement in function");
4672 static final public ElseIf ElseIfStatementColon() throws ParseException {
4673 final Expression condition;
4674 Statement statement;
4675 final ArrayList list = new ArrayList();
4676 final Token elseifToken;
4677 elseifToken = jj_consume_token(ELSEIF);
4678 condition = Condition("elseif");
4679 jj_consume_token(COLON);
4682 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4716 case INTEGER_LITERAL:
4717 case FLOATING_POINT_LITERAL:
4718 case STRING_LITERAL:
4728 jj_la1[113] = jj_gen;
4731 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4764 case INTEGER_LITERAL:
4765 case FLOATING_POINT_LITERAL:
4766 case STRING_LITERAL:
4773 statement = Statement();
4774 list.add(statement);
4777 statement = htmlBlock();
4778 if (statement != null) {list.add(statement);}
4781 jj_la1[114] = jj_gen;
4782 jj_consume_token(-1);
4783 throw new ParseException();
4786 final int sizeList = list.size();
4787 final Statement[] stmtsArray = new Statement[sizeList];
4788 list.toArray(stmtsArray);
4789 {if (true) return new ElseIf(condition,stmtsArray ,
4790 elseifToken.sourceStart,
4791 stmtsArray[sizeList-1].sourceEnd);}
4792 throw new Error("Missing return statement in function");
4795 static final public Else ElseStatementColon() throws ParseException {
4796 Statement statement;
4797 final ArrayList list = new ArrayList();
4798 final Token elseToken;
4799 elseToken = jj_consume_token(ELSE);
4800 jj_consume_token(COLON);
4803 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4837 case INTEGER_LITERAL:
4838 case FLOATING_POINT_LITERAL:
4839 case STRING_LITERAL:
4849 jj_la1[115] = jj_gen;
4852 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4885 case INTEGER_LITERAL:
4886 case FLOATING_POINT_LITERAL:
4887 case STRING_LITERAL:
4894 statement = Statement();
4895 list.add(statement);
4898 statement = htmlBlock();
4899 if (statement != null) {list.add(statement);}
4902 jj_la1[116] = jj_gen;
4903 jj_consume_token(-1);
4904 throw new ParseException();
4907 final int sizeList = list.size();
4908 final Statement[] stmtsArray = new Statement[sizeList];
4909 list.toArray(stmtsArray);
4910 {if (true) return new Else(stmtsArray,elseToken.sourceStart,stmtsArray[sizeList-1].sourceEnd);}
4911 throw new Error("Missing return statement in function");
4914 static final public ElseIf ElseIfStatement() throws ParseException {
4915 final Expression condition;
4916 //final Statement statement;
4917 final Token elseifToken;
4918 final Statement[] statement = new Statement[1];
4919 elseifToken = jj_consume_token(ELSEIF);
4920 condition = Condition("elseif");
4921 statement[0] = Statement();
4922 {if (true) return new ElseIf(condition,statement,elseifToken.sourceStart,statement[0].sourceEnd);}
4923 throw new Error("Missing return statement in function");
4926 static final public WhileStatement WhileStatement() throws ParseException {
4927 final Expression condition;
4928 final Statement action;
4929 final Token whileToken;
4930 whileToken = jj_consume_token(WHILE);
4931 condition = Condition("while");
4932 action = WhileStatement0(whileToken.sourceStart,whileToken.sourceEnd);
4933 {if (true) return new WhileStatement(condition,action,whileToken.sourceStart,action.sourceEnd);}
4934 throw new Error("Missing return statement in function");
4937 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4938 Statement statement;
4939 final ArrayList stmts = new ArrayList();
4940 final int pos = SimpleCharStream.getPosition();
4941 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4943 jj_consume_token(COLON);
4946 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4979 case INTEGER_LITERAL:
4980 case FLOATING_POINT_LITERAL:
4981 case STRING_LITERAL:
4991 jj_la1[117] = jj_gen;
4994 statement = Statement();
4995 stmts.add(statement);
4998 setMarker(fileToParse,
4999 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
5003 "Line " + token.beginLine);
5004 } catch (CoreException e) {
5005 PHPeclipsePlugin.log(e);
5008 jj_consume_token(ENDWHILE);
5009 } catch (ParseException e) {
5010 errorMessage = "'endwhile' expected";
5012 errorStart = e.currentToken.sourceStart;
5013 errorEnd = e.currentToken.sourceEnd;
5014 {if (true) throw e;}
5017 jj_consume_token(SEMICOLON);
5018 final Statement[] stmtsArray = new Statement[stmts.size()];
5019 stmts.toArray(stmtsArray);
5020 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
5021 } catch (ParseException e) {
5022 errorMessage = "';' expected after 'endwhile' keyword";
5024 errorStart = e.currentToken.sourceStart;
5025 errorEnd = e.currentToken.sourceEnd;
5026 {if (true) throw e;}
5061 case INTEGER_LITERAL:
5062 case FLOATING_POINT_LITERAL:
5063 case STRING_LITERAL:
5070 statement = Statement();
5071 {if (true) return statement;}
5074 jj_la1[118] = jj_gen;
5075 jj_consume_token(-1);
5076 throw new ParseException();
5078 throw new Error("Missing return statement in function");
5081 static final public DoStatement DoStatement() throws ParseException {
5082 final Statement action;
5083 final Expression condition;
5085 Token token2 = null;
5086 token = jj_consume_token(DO);
5087 action = Statement();
5088 jj_consume_token(WHILE);
5089 condition = Condition("while");
5091 token2 = jj_consume_token(SEMICOLON);
5092 } catch (ParseException e) {
5093 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
5095 errorStart = condition.sourceEnd+1;
5096 errorEnd = condition.sourceEnd+1;
5097 processParseExceptionDebug(e);
5099 if (token2 == null) {
5100 {if (true) return new DoStatement(condition,action,token.sourceStart,condition.sourceEnd);}
5102 {if (true) return new DoStatement(condition,action,token.sourceStart,token2.sourceEnd);}
5103 throw new Error("Missing return statement in function");
5106 static final public ForeachStatement ForeachStatement() throws ParseException {
5107 Statement statement = null;
5108 Expression expression = null;
5109 ArrayVariableDeclaration variable = null;
5111 Token lparenToken = null;
5112 Token asToken = null;
5113 Token rparenToken = null;
5115 foreachToken = jj_consume_token(FOREACH);
5117 lparenToken = jj_consume_token(LPAREN);
5118 pos = lparenToken.sourceEnd+1;
5119 } catch (ParseException e) {
5120 errorMessage = "'(' expected after 'foreach' keyword";
5122 errorStart = e.currentToken.sourceStart;
5123 errorEnd = e.currentToken.sourceEnd;
5124 processParseExceptionDebug(e);
5125 {pos = foreachToken.sourceEnd+1;}
5128 expression = Expression();
5129 pos = expression.sourceEnd+1;
5130 } catch (ParseException e) {
5131 errorMessage = "variable expected";
5133 errorStart = e.currentToken.sourceStart;
5134 errorEnd = e.currentToken.sourceEnd;
5135 processParseExceptionDebug(e);
5138 asToken = jj_consume_token(AS);
5139 pos = asToken.sourceEnd+1;
5140 } catch (ParseException e) {
5141 errorMessage = "'as' expected";
5143 errorStart = e.currentToken.sourceStart;
5144 errorEnd = e.currentToken.sourceEnd;
5145 processParseExceptionDebug(e);
5148 variable = ArrayVariable();
5149 pos = variable.sourceEnd+1;
5150 } catch (ParseException e) {
5151 if (errorMessage != null) {if (true) throw e;}
5152 errorMessage = "variable expected";
5154 errorStart = e.currentToken.sourceStart;
5155 errorEnd = e.currentToken.sourceEnd;
5156 processParseExceptionDebug(e);
5159 rparenToken = jj_consume_token(RPAREN);
5160 pos = rparenToken.sourceEnd+1;
5161 } catch (ParseException e) {
5162 errorMessage = "')' expected after 'foreach' keyword";
5164 errorStart = e.currentToken.sourceStart;
5165 errorEnd = e.currentToken.sourceEnd;
5166 processParseExceptionDebug(e);
5169 statement = Statement();
5170 pos = statement.sourceEnd+1;
5171 } catch (ParseException e) {
5172 if (errorMessage != null) {if (true) throw e;}
5173 errorMessage = "statement expected";
5175 errorStart = e.currentToken.sourceStart;
5176 errorEnd = e.currentToken.sourceEnd;
5177 processParseExceptionDebug(e);
5179 {if (true) return new ForeachStatement(expression,
5182 foreachToken.sourceStart,
5184 throw new Error("Missing return statement in function");
5188 * a for declaration.
5189 * @return a node representing the for statement
5191 static final public ForStatement ForStatement() throws ParseException {
5192 final Token token,tokenEndFor,token2,tokenColon;
5194 Expression[] initializations = null;
5195 Expression condition = null;
5196 Expression[] increments = null;
5198 final ArrayList list = new ArrayList();
5199 token = jj_consume_token(FOR);
5201 jj_consume_token(LPAREN);
5202 } catch (ParseException e) {
5203 errorMessage = "'(' expected after 'for' keyword";
5205 errorStart = token.sourceEnd;
5206 errorEnd = token.sourceEnd +1;
5207 processParseExceptionDebug(e);
5209 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5225 case INTEGER_LITERAL:
5226 case FLOATING_POINT_LITERAL:
5227 case STRING_LITERAL:
5232 initializations = ForInit();
5235 jj_la1[119] = jj_gen;
5238 jj_consume_token(SEMICOLON);
5239 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5255 case INTEGER_LITERAL:
5256 case FLOATING_POINT_LITERAL:
5257 case STRING_LITERAL:
5262 condition = Expression();
5265 jj_la1[120] = jj_gen;
5268 jj_consume_token(SEMICOLON);
5269 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5285 case INTEGER_LITERAL:
5286 case FLOATING_POINT_LITERAL:
5287 case STRING_LITERAL:
5292 increments = StatementExpressionList();
5295 jj_la1[121] = jj_gen;
5298 jj_consume_token(RPAREN);
5299 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5332 case INTEGER_LITERAL:
5333 case FLOATING_POINT_LITERAL:
5334 case STRING_LITERAL:
5341 action = Statement();
5342 {if (true) return new ForStatement(initializations,
5350 tokenColon = jj_consume_token(COLON);
5351 pos = tokenColon.sourceEnd+1;
5354 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5387 case INTEGER_LITERAL:
5388 case FLOATING_POINT_LITERAL:
5389 case STRING_LITERAL:
5399 jj_la1[122] = jj_gen;
5402 action = Statement();
5403 list.add(action);pos = action.sourceEnd+1;
5406 setMarker(fileToParse,
5407 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
5411 "Line " + token.beginLine);
5412 } catch (CoreException e) {
5413 PHPeclipsePlugin.log(e);
5416 tokenEndFor = jj_consume_token(ENDFOR);
5417 pos = tokenEndFor.sourceEnd+1;
5418 } catch (ParseException e) {
5419 errorMessage = "'endfor' expected";
5423 processParseExceptionDebug(e);
5426 token2 = jj_consume_token(SEMICOLON);
5427 pos = token2.sourceEnd+1;
5428 } catch (ParseException e) {
5429 errorMessage = "';' expected after 'endfor' keyword";
5433 processParseExceptionDebug(e);
5435 final Statement[] stmtsArray = new Statement[list.size()];
5436 list.toArray(stmtsArray);
5437 {if (true) return new ForStatement(initializations,
5440 new Block(stmtsArray,
5441 stmtsArray[0].sourceStart,
5442 stmtsArray[stmtsArray.length-1].sourceEnd),
5447 jj_la1[123] = jj_gen;
5448 jj_consume_token(-1);
5449 throw new ParseException();
5451 throw new Error("Missing return statement in function");
5454 static final public Expression[] ForInit() throws ParseException {
5455 final Expression[] exprs;
5456 if (jj_2_5(2147483647)) {
5457 exprs = LocalVariableDeclaration();
5458 {if (true) return exprs;}
5460 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5476 case INTEGER_LITERAL:
5477 case FLOATING_POINT_LITERAL:
5478 case STRING_LITERAL:
5483 exprs = StatementExpressionList();
5484 {if (true) return exprs;}
5487 jj_la1[124] = jj_gen;
5488 jj_consume_token(-1);
5489 throw new ParseException();
5492 throw new Error("Missing return statement in function");
5495 static final public Expression[] StatementExpressionList() throws ParseException {
5496 final ArrayList list = new ArrayList();
5497 final Expression expr;
5498 expr = Expression();
5502 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5507 jj_la1[125] = jj_gen;
5510 jj_consume_token(COMMA);
5514 final Expression[] exprsArray = new Expression[list.size()];
5515 list.toArray(exprsArray);
5516 {if (true) return exprsArray;}
5517 throw new Error("Missing return statement in function");
5520 static final public Continue ContinueStatement() throws ParseException {
5521 Expression expr = null;
5523 Token token2 = null;
5524 token = jj_consume_token(CONTINUE);
5525 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5541 case INTEGER_LITERAL:
5542 case FLOATING_POINT_LITERAL:
5543 case STRING_LITERAL:
5548 expr = Expression();
5551 jj_la1[126] = jj_gen;
5555 token2 = jj_consume_token(SEMICOLON);
5556 } catch (ParseException e) {
5557 errorMessage = "';' expected after 'continue' statement";
5560 errorStart = token.sourceEnd+1;
5561 errorEnd = token.sourceEnd+1;
5563 errorStart = expr.sourceEnd+1;
5564 errorEnd = expr.sourceEnd+1;
5566 processParseExceptionDebug(e);
5568 if (token2 == null) {
5570 {if (true) return new Continue(expr,token.sourceStart,token.sourceEnd);}
5572 {if (true) return new Continue(expr,token.sourceStart,expr.sourceEnd);}
5574 {if (true) return new Continue(expr,token.sourceStart,token2.sourceEnd);}
5575 throw new Error("Missing return statement in function");
5578 static final public ReturnStatement ReturnStatement() throws ParseException {
5579 Expression expr = null;
5581 Token token2 = null;
5582 token = jj_consume_token(RETURN);
5583 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5599 case INTEGER_LITERAL:
5600 case FLOATING_POINT_LITERAL:
5601 case STRING_LITERAL:
5606 expr = Expression();
5609 jj_la1[127] = jj_gen;
5613 token2 = jj_consume_token(SEMICOLON);
5614 } catch (ParseException e) {
5615 errorMessage = "';' expected after 'return' statement";
5618 errorStart = token.sourceEnd+1;
5619 errorEnd = token.sourceEnd+1;
5621 errorStart = expr.sourceEnd+1;
5622 errorEnd = expr.sourceEnd+1;
5624 processParseExceptionDebug(e);
5626 if (token2 == null) {
5628 {if (true) return new ReturnStatement(expr,token.sourceStart,token.sourceEnd);}
5630 {if (true) return new ReturnStatement(expr,token.sourceStart,expr.sourceEnd);}
5632 {if (true) return new ReturnStatement(expr,token.sourceStart,token2.sourceEnd);}
5633 throw new Error("Missing return statement in function");
5636 static final private boolean jj_2_1(int xla) {
5637 jj_la = xla; jj_lastpos = jj_scanpos = token;
5638 boolean retval = !jj_3_1();
5643 static final private boolean jj_2_2(int xla) {
5644 jj_la = xla; jj_lastpos = jj_scanpos = token;
5645 boolean retval = !jj_3_2();
5650 static final private boolean jj_2_3(int xla) {
5651 jj_la = xla; jj_lastpos = jj_scanpos = token;
5652 boolean retval = !jj_3_3();
5657 static final private boolean jj_2_4(int xla) {
5658 jj_la = xla; jj_lastpos = jj_scanpos = token;
5659 boolean retval = !jj_3_4();
5664 static final private boolean jj_2_5(int xla) {
5665 jj_la = xla; jj_lastpos = jj_scanpos = token;
5666 boolean retval = !jj_3_5();
5671 static final private boolean jj_3R_210() {
5672 if (jj_3R_116()) return true;
5673 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5677 static final private boolean jj_3R_209() {
5678 if (jj_3R_50()) return true;
5679 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5683 static final private boolean jj_3R_109() {
5684 if (jj_3R_114()) return true;
5685 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5689 if (jj_3R_115()) { jj_scanpos = xsp; break; }
5690 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5695 static final private boolean jj_3R_208() {
5696 if (jj_scan_token(IDENTIFIER)) return true;
5697 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5701 static final private boolean jj_3R_203() {
5708 if (jj_3R_210()) return true;
5709 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5710 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5711 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5715 static final private boolean jj_3R_110() {
5716 if (jj_scan_token(BIT_OR)) return true;
5717 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5718 if (jj_3R_109()) return true;
5719 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5723 static final private boolean jj_3R_103() {
5724 if (jj_3R_109()) return true;
5725 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5729 if (jj_3R_110()) { jj_scanpos = xsp; break; }
5730 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5735 static final private boolean jj_3R_188() {
5736 if (jj_scan_token(ARRAY)) return true;
5737 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5738 if (jj_3R_198()) return true;
5739 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5743 static final private boolean jj_3R_132() {
5744 if (jj_scan_token(IDENTIFIER)) return true;
5745 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5749 static final private boolean jj_3R_106() {
5750 if (jj_scan_token(DOT)) return true;
5751 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5752 if (jj_3R_103()) return true;
5753 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5757 static final private boolean jj_3R_131() {
5758 if (jj_scan_token(LBRACE)) return true;
5759 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5760 if (jj_3R_49()) return true;
5761 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5762 if (jj_scan_token(RBRACE)) return true;
5763 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5767 static final private boolean jj_3R_97() {
5768 if (jj_3R_103()) return true;
5769 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5773 if (jj_3R_106()) { jj_scanpos = xsp; break; }
5774 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5779 static final private boolean jj_3R_204() {
5780 if (jj_3R_207()) return true;
5781 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5785 static final private boolean jj_3R_122() {
5792 if (jj_3R_132()) return true;
5793 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5794 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5795 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5799 static final private boolean jj_3R_130() {
5800 if (jj_scan_token(DOLLAR)) return true;
5801 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5802 if (jj_3R_122()) return true;
5803 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5807 static final private boolean jj_3R_108() {
5808 if (jj_scan_token(_ANDL)) return true;
5809 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5813 static final private boolean jj_3R_107() {
5814 if (jj_scan_token(AND_AND)) return true;
5815 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5819 static final private boolean jj_3R_100() {
5824 if (jj_3R_108()) return true;
5825 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5826 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5827 if (jj_3R_97()) return true;
5828 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5832 static final private boolean jj_3R_81() {
5833 if (jj_3R_97()) return true;
5834 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5838 if (jj_3R_100()) { jj_scanpos = xsp; break; }
5839 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5844 static final private boolean jj_3R_79() {
5845 if (jj_scan_token(HOOK)) return true;
5846 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5847 if (jj_3R_49()) return true;
5848 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5849 if (jj_scan_token(COLON)) return true;
5850 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5851 if (jj_3R_73()) return true;
5852 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5856 static final private boolean jj_3R_195() {
5857 if (jj_scan_token(NEW)) return true;
5858 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5859 if (jj_3R_203()) return true;
5860 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5863 if (jj_3R_204()) jj_scanpos = xsp;
5864 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5868 static final private boolean jj_3R_68() {
5869 if (jj_scan_token(DOLLAR)) return true;
5870 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5871 if (jj_3R_122()) return true;
5872 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5876 static final private boolean jj_3R_202() {
5877 if (jj_3R_207()) return true;
5878 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5882 static final private boolean jj_3R_194() {
5883 if (jj_3R_116()) return true;
5884 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5887 if (jj_3R_202()) jj_scanpos = xsp;
5888 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5892 static final private boolean jj_3R_102() {
5893 if (jj_scan_token(_ORL)) return true;
5894 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5898 static final private boolean jj_3R_101() {
5899 if (jj_scan_token(OR_OR)) return true;
5900 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5904 static final private boolean jj_3R_83() {
5909 if (jj_3R_102()) return true;
5910 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5911 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5912 if (jj_3R_81()) return true;
5913 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5917 static final private boolean jj_3R_201() {
5918 if (jj_3R_207()) return true;
5919 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5923 static final private boolean jj_3R_76() {
5924 if (jj_3R_81()) return true;
5925 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5929 if (jj_3R_83()) { jj_scanpos = xsp; break; }
5930 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5935 static final private boolean jj_3_1() {
5936 if (jj_3R_40()) return true;
5937 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5941 static final private boolean jj_3R_51() {
5942 if (jj_scan_token(COMMA)) return true;
5943 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5944 if (jj_3R_49()) return true;
5945 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5949 static final private boolean jj_3R_200() {
5950 if (jj_scan_token(STATICCLASSACCESS)) return true;
5951 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5952 if (jj_3R_203()) return true;
5953 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5957 static final private boolean jj_3R_45() {
5958 if (jj_3R_49()) return true;
5959 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5963 if (jj_3R_51()) { jj_scanpos = xsp; break; }
5964 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5969 static final private boolean jj_3R_116() {
5970 if (jj_3R_68()) return true;
5971 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5975 if (jj_3_1()) { jj_scanpos = xsp; break; }
5976 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5981 static final private boolean jj_3R_193() {
5982 if (jj_scan_token(IDENTIFIER)) return true;
5983 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5987 if (jj_3R_200()) { jj_scanpos = xsp; break; }
5988 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5991 if (jj_3R_201()) jj_scanpos = xsp;
5992 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5996 static final private boolean jj_3R_187() {
6003 if (jj_3R_195()) return true;
6004 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6005 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6006 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6010 static final private boolean jj_3R_73() {
6011 if (jj_3R_76()) return true;
6012 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6015 if (jj_3R_79()) jj_scanpos = xsp;
6016 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6020 static final private boolean jj_3R_178() {
6021 if (jj_3R_188()) return true;
6022 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6026 static final private boolean jj_3_5() {
6027 if (jj_3R_45()) return true;
6028 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6032 static final private boolean jj_3R_186() {
6033 if (jj_scan_token(BIT_AND)) return true;
6034 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6038 static final private boolean jj_3R_96() {
6039 if (jj_scan_token(TILDEEQUAL)) return true;
6040 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6044 static final private boolean jj_3R_95() {
6045 if (jj_scan_token(DOTASSIGN)) return true;
6046 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6050 static final private boolean jj_3R_173() {
6055 if (jj_3R_178()) return true;
6056 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6057 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6061 static final private boolean jj_3R_177() {
6064 if (jj_3R_186()) jj_scanpos = xsp;
6065 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6066 if (jj_3R_187()) return true;
6067 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6071 static final private boolean jj_3R_94() {
6072 if (jj_scan_token(ORASSIGN)) return true;
6073 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6077 static final private boolean jj_3R_93() {
6078 if (jj_scan_token(XORASSIGN)) return true;
6079 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6083 static final private boolean jj_3R_92() {
6084 if (jj_scan_token(ANDASSIGN)) return true;
6085 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6089 static final private boolean jj_3R_91() {
6090 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6091 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6095 static final private boolean jj_3R_90() {
6096 if (jj_scan_token(LSHIFTASSIGN)) return true;
6097 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6101 static final private boolean jj_3R_89() {
6102 if (jj_scan_token(MINUSASSIGN)) return true;
6103 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6107 static final private boolean jj_3R_88() {
6108 if (jj_scan_token(PLUSASSIGN)) return true;
6109 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6113 static final private boolean jj_3R_87() {
6114 if (jj_scan_token(REMASSIGN)) return true;
6115 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6119 static final private boolean jj_3R_86() {
6120 if (jj_scan_token(SLASHASSIGN)) return true;
6121 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6125 static final private boolean jj_3R_85() {
6126 if (jj_scan_token(STARASSIGN)) return true;
6127 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6131 static final private boolean jj_3R_84() {
6132 if (jj_scan_token(ASSIGN)) return true;
6133 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6137 static final private boolean jj_3R_80() {
6164 if (jj_3R_96()) return true;
6165 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6166 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6167 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6168 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6169 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6170 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6171 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6172 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6173 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6174 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6175 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6176 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6177 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6181 static final private boolean jj_3R_197() {
6182 if (jj_scan_token(MINUS_MINUS)) return true;
6183 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6187 static final private boolean jj_3R_196() {
6188 if (jj_scan_token(PLUS_PLUS)) return true;
6189 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6193 static final private boolean jj_3R_191() {
6198 if (jj_3R_197()) return true;
6199 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6200 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6204 static final private boolean jj_3R_175() {
6205 if (jj_3R_173()) return true;
6206 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6209 if (jj_3R_191()) jj_scanpos = xsp;
6210 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6214 static final private boolean jj_3R_99() {
6215 if (jj_3R_105()) return true;
6216 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6220 static final private boolean jj_3R_98() {
6221 if (jj_3R_104()) return true;
6222 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6226 static final private boolean jj_3R_82() {
6231 if (jj_3R_99()) return true;
6232 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6233 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6237 static final private boolean jj_3R_190() {
6238 if (jj_scan_token(ARRAY)) return true;
6239 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6243 static final private boolean jj_3R_189() {
6244 if (jj_3R_50()) return true;
6245 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6249 static final private boolean jj_3R_78() {
6250 if (jj_3R_82()) return true;
6251 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6255 static final private boolean jj_3R_43() {
6256 if (jj_scan_token(ARRAY)) return true;
6257 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6261 static final private boolean jj_3R_77() {
6262 if (jj_scan_token(BANG)) return true;
6263 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6264 if (jj_3R_74()) return true;
6265 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6269 static final private boolean jj_3R_74() {
6274 if (jj_3R_78()) return true;
6275 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6276 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6280 static final private boolean jj_3R_174() {
6281 if (jj_scan_token(LPAREN)) return true;
6282 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6287 if (jj_3R_190()) return true;
6288 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6289 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6290 if (jj_scan_token(RPAREN)) return true;
6291 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6292 if (jj_3R_144()) return true;
6293 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6297 static final private boolean jj_3R_42() {
6298 if (jj_3R_50()) return true;
6299 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6303 static final private boolean jj_3R_58() {
6304 if (jj_3R_74()) return true;
6305 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6309 static final private boolean jj_3_3() {
6310 if (jj_scan_token(LPAREN)) return true;
6311 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6316 if (jj_3R_43()) return true;
6317 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6318 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6319 if (jj_scan_token(RPAREN)) return true;
6320 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6324 static final private boolean jj_3R_172() {
6325 if (jj_scan_token(LPAREN)) return true;
6326 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6327 if (jj_3R_49()) return true;
6328 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6329 if (jj_scan_token(RPAREN)) return true;
6330 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6334 static final private boolean jj_3R_171() {
6335 if (jj_3R_176()) return true;
6336 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6340 static final private boolean jj_3R_170() {
6341 if (jj_3R_175()) return true;
6342 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6346 static final private boolean jj_3R_166() {
6355 if (jj_3R_172()) return true;
6356 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6357 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6358 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6359 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6363 static final private boolean jj_3R_169() {
6364 if (jj_3R_174()) return true;
6365 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6369 static final private boolean jj_3R_44() {
6370 if (jj_3R_49()) return true;
6371 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6372 if (jj_scan_token(SEMICOLON)) return true;
6373 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6377 static final private boolean jj_3R_168() {
6378 if (jj_scan_token(MINUS_MINUS)) return true;
6379 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6383 static final private boolean jj_3R_167() {
6384 if (jj_scan_token(PLUS_PLUS)) return true;
6385 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6389 static final private boolean jj_3R_75() {
6390 if (jj_3R_80()) return true;
6391 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6392 if (jj_3R_49()) return true;
6393 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6397 static final private boolean jj_3R_165() {
6402 if (jj_3R_168()) return true;
6403 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6404 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6405 if (jj_3R_173()) return true;
6406 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6410 static final private boolean jj_3R_49() {
6415 if (jj_3R_58()) return true;
6416 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6417 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6421 static final private boolean jj_3R_57() {
6422 if (jj_3R_73()) return true;
6423 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6426 if (jj_3R_75()) jj_scanpos = xsp;
6427 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6431 static final private boolean jj_3R_67() {
6432 if (jj_scan_token(OBJECT)) return true;
6433 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6437 static final private boolean jj_3R_161() {
6438 if (jj_3R_166()) return true;
6439 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6443 static final private boolean jj_3R_66() {
6444 if (jj_scan_token(INTEGER)) return true;
6445 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6449 static final private boolean jj_3R_65() {
6450 if (jj_scan_token(INT)) return true;
6451 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6455 static final private boolean jj_3R_64() {
6456 if (jj_scan_token(FLOAT)) return true;
6457 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6461 static final private boolean jj_3R_160() {
6462 if (jj_3R_165()) return true;
6463 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6467 static final private boolean jj_3R_63() {
6468 if (jj_scan_token(DOUBLE)) return true;
6469 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6473 static final private boolean jj_3R_62() {
6474 if (jj_scan_token(REAL)) return true;
6475 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6479 static final private boolean jj_3R_61() {
6480 if (jj_scan_token(BOOLEAN)) return true;
6481 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6485 static final private boolean jj_3R_60() {
6486 if (jj_scan_token(BOOL)) return true;
6487 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6491 static final private boolean jj_3R_159() {
6492 if (jj_scan_token(MINUS)) return true;
6493 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6494 if (jj_3R_148()) return true;
6495 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6499 static final private boolean jj_3R_50() {
6518 if (jj_3R_67()) return true;
6519 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6520 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6521 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6522 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6523 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6524 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6525 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6526 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6527 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6531 static final private boolean jj_3R_59() {
6532 if (jj_scan_token(STRING)) return true;
6533 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6537 static final private boolean jj_3R_156() {
6546 if (jj_3R_161()) return true;
6547 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6548 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6549 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6550 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6554 static final private boolean jj_3R_158() {
6555 if (jj_scan_token(PLUS)) return true;
6556 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6557 if (jj_3R_148()) return true;
6558 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6562 static final private boolean jj_3_4() {
6563 if (jj_3R_44()) return true;
6564 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6568 static final private boolean jj_3R_164() {
6569 if (jj_3R_156()) return true;
6570 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6574 static final private boolean jj_3R_163() {
6575 if (jj_scan_token(BANG)) return true;
6576 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6577 if (jj_3R_157()) return true;
6578 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6582 static final private boolean jj_3R_157() {
6589 if (jj_3R_164()) return true;
6590 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6591 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6592 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6596 static final private boolean jj_3R_162() {
6597 if (jj_scan_token(AT)) return true;
6598 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6599 if (jj_3R_157()) return true;
6600 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6604 static final private boolean jj_3R_155() {
6605 if (jj_3R_156()) return true;
6606 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6610 static final private boolean jj_3R_216() {
6611 if (jj_scan_token(COMMA)) return true;
6612 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6613 if (jj_3R_49()) return true;
6614 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6618 static final private boolean jj_3R_154() {
6619 if (jj_scan_token(BANG)) return true;
6620 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6621 if (jj_3R_157()) return true;
6622 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6626 static final private boolean jj_3R_215() {
6627 if (jj_3R_49()) return true;
6628 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6632 if (jj_3R_216()) { jj_scanpos = xsp; break; }
6633 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6638 static final private boolean jj_3R_153() {
6639 if (jj_scan_token(TILDE)) return true;
6640 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6641 if (jj_3R_148()) return true;
6642 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6646 static final private boolean jj_3R_148() {
6655 if (jj_3R_155()) return true;
6656 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6657 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6658 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6659 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6663 static final private boolean jj_3R_152() {
6664 if (jj_scan_token(AT)) return true;
6665 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6666 if (jj_3R_148()) return true;
6667 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6671 static final private boolean jj_3R_213() {
6672 if (jj_3R_215()) return true;
6673 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6677 static final private boolean jj_3R_144() {
6678 if (jj_3R_148()) return true;
6679 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6683 static final private boolean jj_3R_151() {
6684 if (jj_scan_token(REMAINDER)) return true;
6685 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6689 static final private boolean jj_3R_150() {
6690 if (jj_scan_token(SLASH)) return true;
6691 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6695 static final private boolean jj_3R_149() {
6696 if (jj_scan_token(STAR)) return true;
6697 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6701 static final private boolean jj_3R_207() {
6702 if (jj_scan_token(LPAREN)) return true;
6703 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6706 if (jj_3R_213()) jj_scanpos = xsp;
6707 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6708 if (jj_scan_token(RPAREN)) return true;
6709 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6713 static final private boolean jj_3R_145() {
6720 if (jj_3R_151()) return true;
6721 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6722 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6723 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6724 if (jj_3R_144()) return true;
6725 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6729 static final private boolean jj_3R_139() {
6730 if (jj_3R_144()) return true;
6731 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6735 if (jj_3R_145()) { jj_scanpos = xsp; break; }
6736 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6741 static final private boolean jj_3R_212() {
6742 if (jj_scan_token(LBRACE1)) return true;
6743 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6744 if (jj_scan_token(ID)) return true;
6745 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6746 if (jj_scan_token(RBRACE1)) return true;
6747 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6751 static final private boolean jj_3R_147() {
6752 if (jj_scan_token(MINUS)) return true;
6753 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6757 static final private boolean jj_3R_211() {
6758 if (jj_scan_token(IDENTIFIER)) return true;
6759 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6763 static final private boolean jj_3R_146() {
6764 if (jj_scan_token(PLUS)) return true;
6765 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6769 static final private boolean jj_3R_140() {
6774 if (jj_3R_147()) return true;
6775 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6776 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6777 if (jj_3R_139()) return true;
6778 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6782 static final private boolean jj_3R_199() {
6783 if (jj_scan_token(DOLLARS)) return true;
6784 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6789 if (jj_3R_212()) return true;
6790 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6791 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6795 static final private boolean jj_3R_133() {
6796 if (jj_3R_139()) return true;
6797 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6801 if (jj_3R_140()) { jj_scanpos = xsp; break; }
6802 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6807 static final private boolean jj_3R_192() {
6808 if (jj_scan_token(DOUBLEQUOTE)) return true;
6809 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6813 if (jj_3R_199()) { jj_scanpos = xsp; break; }
6814 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6816 if (jj_scan_token(DOUBLEQUOTE2)) return true;
6817 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6821 static final private boolean jj_3R_113() {
6822 if (jj_scan_token(ASSIGN)) return true;
6823 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6824 if (jj_3R_49()) return true;
6825 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6829 static final private boolean jj_3R_143() {
6830 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
6831 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6835 static final private boolean jj_3R_142() {
6836 if (jj_scan_token(RSIGNEDSHIFT)) return true;
6837 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6841 static final private boolean jj_3R_141() {
6842 if (jj_scan_token(LSHIFT)) return true;
6843 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6847 static final private boolean jj_3R_185() {
6848 if (jj_3R_192()) return true;
6849 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6853 static final private boolean jj_3R_184() {
6854 if (jj_scan_token(NULL)) return true;
6855 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6859 static final private boolean jj_3R_134() {
6866 if (jj_3R_143()) return true;
6867 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6868 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6869 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6870 if (jj_3R_133()) return true;
6871 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6875 static final private boolean jj_3R_183() {
6876 if (jj_scan_token(FALSE)) return true;
6877 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6881 static final private boolean jj_3R_182() {
6882 if (jj_scan_token(TRUE)) return true;
6883 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6887 static final private boolean jj_3R_123() {
6888 if (jj_3R_133()) return true;
6889 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6893 if (jj_3R_134()) { jj_scanpos = xsp; break; }
6894 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6899 static final private boolean jj_3R_181() {
6900 if (jj_scan_token(STRING_LITERAL)) return true;
6901 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6905 static final private boolean jj_3R_180() {
6906 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
6907 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6911 static final private boolean jj_3R_117() {
6912 if (jj_3R_116()) return true;
6913 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6917 static final private boolean jj_3R_179() {
6918 if (jj_scan_token(INTEGER_LITERAL)) return true;
6919 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6923 static final private boolean jj_3R_176() {
6938 if (jj_3R_185()) return true;
6939 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6940 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6941 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6942 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6943 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6944 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6945 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6949 static final private boolean jj_3R_138() {
6950 if (jj_scan_token(GE)) return true;
6951 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6955 static final private boolean jj_3R_137() {
6956 if (jj_scan_token(LE)) return true;
6957 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6961 static final private boolean jj_3R_136() {
6962 if (jj_scan_token(GT)) return true;
6963 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6967 static final private boolean jj_3R_112() {
6968 if (jj_scan_token(COMMA)) return true;
6969 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6972 if (jj_3R_117()) jj_scanpos = xsp;
6973 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6977 static final private boolean jj_3R_135() {
6978 if (jj_scan_token(LT)) return true;
6979 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6983 static final private boolean jj_3R_124() {
6992 if (jj_3R_138()) return true;
6993 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6994 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6995 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6996 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6997 if (jj_3R_123()) return true;
6998 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7002 static final private boolean jj_3R_120() {
7003 if (jj_3R_123()) return true;
7004 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7008 if (jj_3R_124()) { jj_scanpos = xsp; break; }
7009 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7014 static final private boolean jj_3R_111() {
7015 if (jj_3R_116()) return true;
7016 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7020 static final private boolean jj_3R_72() {
7021 if (jj_3R_50()) return true;
7022 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7026 static final private boolean jj_3R_71() {
7027 if (jj_3R_49()) return true;
7028 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7032 static final private boolean jj_3R_56() {
7037 if (jj_3R_72()) return true;
7038 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7039 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7043 static final private boolean jj_3R_48() {
7044 if (jj_scan_token(LBRACE)) return true;
7045 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7048 if (jj_3R_56()) jj_scanpos = xsp;
7049 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7050 if (jj_scan_token(RBRACE)) return true;
7051 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7055 static final private boolean jj_3R_104() {
7056 if (jj_scan_token(LIST)) return true;
7057 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7058 if (jj_scan_token(LPAREN)) return true;
7059 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7062 if (jj_3R_111()) jj_scanpos = xsp;
7063 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7066 if (jj_3R_112()) { jj_scanpos = xsp; break; }
7067 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7069 if (jj_scan_token(RPAREN)) return true;
7070 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7072 if (jj_3R_113()) jj_scanpos = xsp;
7073 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7077 static final private boolean jj_3R_206() {
7078 if (jj_scan_token(COMMA)) return true;
7079 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7083 static final private boolean jj_3R_70() {
7084 if (jj_3R_50()) return true;
7085 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7089 static final private boolean jj_3_2() {
7090 if (jj_scan_token(COMMA)) return true;
7091 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7092 if (jj_3R_41()) return true;
7093 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7097 static final private boolean jj_3R_55() {
7102 if (jj_3R_70()) return true;
7103 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7104 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7108 static final private boolean jj_3R_69() {
7109 if (jj_3R_49()) return true;
7110 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7114 static final private boolean jj_3R_205() {
7115 if (jj_3R_41()) return true;
7116 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7120 if (jj_3_2()) { jj_scanpos = xsp; break; }
7121 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7126 static final private boolean jj_3R_47() {
7127 if (jj_scan_token(LBRACKET)) return true;
7128 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7131 if (jj_3R_55()) jj_scanpos = xsp;
7132 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7133 if (jj_scan_token(RBRACKET)) return true;
7134 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7138 static final private boolean jj_3R_129() {
7139 if (jj_scan_token(TRIPLEEQUAL)) return true;
7140 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7144 static final private boolean jj_3R_128() {
7145 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
7146 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7150 static final private boolean jj_3R_127() {
7151 if (jj_scan_token(NOT_EQUAL)) return true;
7152 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7156 static final private boolean jj_3R_126() {
7157 if (jj_scan_token(DIF)) return true;
7158 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7162 static final private boolean jj_3R_105() {
7163 if (jj_scan_token(PRINT)) return true;
7164 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7165 if (jj_3R_49()) return true;
7166 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7170 static final private boolean jj_3R_198() {
7171 if (jj_scan_token(LPAREN)) return true;
7172 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7175 if (jj_3R_205()) jj_scanpos = xsp;
7176 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7178 if (jj_3R_206()) jj_scanpos = xsp;
7179 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7180 if (jj_scan_token(RPAREN)) return true;
7181 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7185 static final private boolean jj_3R_125() {
7186 if (jj_scan_token(EQUAL_EQUAL)) return true;
7187 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7191 static final private boolean jj_3R_54() {
7192 if (jj_3R_68()) return true;
7193 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7197 static final private boolean jj_3R_121() {
7208 if (jj_3R_129()) return true;
7209 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7210 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7211 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7212 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7213 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7214 if (jj_3R_120()) return true;
7215 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7219 static final private boolean jj_3R_53() {
7220 if (jj_scan_token(IDENTIFIER)) return true;
7221 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7225 static final private boolean jj_3R_118() {
7226 if (jj_3R_120()) return true;
7227 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7231 if (jj_3R_121()) { jj_scanpos = xsp; break; }
7232 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7237 static final private boolean jj_3R_214() {
7238 if (jj_scan_token(ARRAYASSIGN)) return true;
7239 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7240 if (jj_3R_49()) return true;
7241 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7245 static final private boolean jj_3R_52() {
7246 if (jj_scan_token(LBRACE)) return true;
7247 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7248 if (jj_3R_49()) return true;
7249 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7250 if (jj_scan_token(RBRACE)) return true;
7251 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7255 static final private boolean jj_3R_41() {
7256 if (jj_3R_49()) return true;
7257 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7260 if (jj_3R_214()) jj_scanpos = xsp;
7261 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7265 static final private boolean jj_3R_119() {
7266 if (jj_scan_token(BIT_AND)) return true;
7267 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7268 if (jj_3R_118()) return true;
7269 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7273 static final private boolean jj_3R_46() {
7274 if (jj_scan_token(CLASSACCESS)) return true;
7275 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7282 if (jj_3R_54()) return true;
7283 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7284 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7285 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7289 static final private boolean jj_3R_40() {
7296 if (jj_3R_48()) return true;
7297 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7298 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7299 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7303 static final private boolean jj_3R_114() {
7304 if (jj_3R_118()) return true;
7305 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7309 if (jj_3R_119()) { jj_scanpos = xsp; break; }
7310 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7315 static final private boolean jj_3R_115() {
7316 if (jj_scan_token(XOR)) return true;
7317 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7318 if (jj_3R_114()) return true;
7319 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
7323 static private boolean jj_initialized_once = false;
7324 static public PHPParserTokenManager token_source;
7325 static SimpleCharStream jj_input_stream;
7326 static public Token token, jj_nt;
7327 static private int jj_ntk;
7328 static private Token jj_scanpos, jj_lastpos;
7329 static private int jj_la;
7330 static public boolean lookingAhead = false;
7331 static private boolean jj_semLA;
7332 static private int jj_gen;
7333 static final private int[] jj_la1 = new int[128];
7334 static private int[] jj_la1_0;
7335 static private int[] jj_la1_1;
7336 static private int[] jj_la1_2;
7337 static private int[] jj_la1_3;
7338 static private int[] jj_la1_4;
7346 private static void jj_la1_0() {
7347 jj_la1_0 = new int[] {0x5800001e,0x6,0x6,0x5800001e,0x0,0x58000000,0x0,0x30000000,0x30000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000000,0x40000000,0x8,0x6,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x58000010,0x58000010,0x58000000,0x58000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x58000010,0x58000010,0x0,0x0,0x40000010,0x40000010,0x80000000,0x0,0x40000010,0x80000000,0x0,0x40000010,0x40000010,0x40000010,0x40000010,0x40000010,0x40000000,0x40000000,0x0,0x0,0x0,0x40000000,0x40000000,0x0,0x0,0x0,0x0,};
7349 private static void jj_la1_1() {
7350 jj_la1_1 = new int[] {0xd7541ffe,0x0,0x0,0xd7541ffe,0x0,0xd7541ffe,0x200000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc2000002,0x8000,0xc300001a,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc300001a,0x18,0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc3000002,0xc3000002,0xc3000002,0x0,0xc3000002,0x2,0x0,0x0,0x0,0x1000002,0x4000,0x0,0x0,0x0,0x1000000,0x0,0x0,0xc300001a,0xc300001a,0xc300001a,0xc300001a,0x2000,0xc2000000,0x0,0x0,0xc300001a,0x0,0x0,0x14541fe0,0xd7541ffe,0x0,0x0,0x3c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xd7541ffa,0x0,0x0,0x0,0x0,0x1000002,0x0,0x90000,0x90000,0xd7541ffe,0xd7541ffe,0x90000,0xc300001a,0xd7541ffe,0xd7541ffe,0x0,0x1,0xd7541ffe,0x0,0x1,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xd7541ffe,0xc300001a,0xc300001a,0xc300001a,0xd7541ffe,0xd7541ffe,0xc300001a,0x0,0xc300001a,0xc300001a,};
7352 private static void jj_la1_2() {
7353 jj_la1_2 = new int[] {0x27870021,0x0,0x0,0x27870021,0x0,0x27870021,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000000,0x0,0x27870000,0x0,0x20000000,0x0,0x20000000,0x20000000,0xff80,0x0,0x27870000,0x20000,0x0,0x0,0x80000,0x200000,0x200000,0x400000,0x400000,0x0,0x40000000,0x80000000,0x20000000,0x0,0x0,0x0,0x0,0x0,0x0,0x6000000,0x6000000,0x18000000,0x18000000,0x27870000,0x27830000,0x27800000,0x1800000,0x20000000,0xff80,0x1800000,0x1800000,0x20000000,0x20000000,0x0,0x0,0x0,0x0,0x0,0xff80,0x0,0x2787ff80,0x2787ff80,0x2787ff80,0x2787ff80,0x0,0x0,0x0,0x0,0x27870000,0x0,0x10000,0x10021,0x27870021,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x27870021,0x27870021,0x27870021,0x27870021,0x0,0x0,0x1800000,0x1800000,0x21800000,0x100000,0x0,0x0,0x27870021,0x27870021,0x0,0x27870000,0x27870021,0x27870021,0x0,0x0,0x27870021,0x0,0x0,0x27970021,0x27870021,0x27870021,0x27870021,0x27870021,0x27870021,0x27970021,0x27870000,0x27870000,0x27870000,0x27870021,0x27970021,0x27870000,0x0,0x27870000,0x27870000,};
7355 private static void jj_la1_3() {
7356 jj_la1_3 = new int[] {0x18011440,0x0,0x0,0x18011440,0x0,0x18011440,0x0,0x0,0x0,0x0,0x10000000,0x0,0x0,0x18000000,0x440,0x440,0x10011440,0x0,0x18011440,0x0,0x0,0x0,0x8000000,0x0,0x0,0x0,0x18011440,0x0,0x0,0x0,0x0,0x10,0x10,0x20,0x20,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe,0xe,0x0,0x0,0x1,0x1,0x18011440,0x18011440,0x18011440,0x0,0x18011440,0x0,0x0,0x0,0x0,0x18000000,0x0,0x0,0x0,0x0,0x18000000,0x18000000,0x18000000,0x18011440,0x18011440,0x18011440,0x18011440,0x0,0x11440,0x20000,0x10080000,0x18011440,0x0,0x0,0x10000000,0x18011440,0x0,0x0,0x0,0x8000000,0x0,0x8000000,0x0,0x0,0x0,0x0,0x18011440,0x18011440,0x18011440,0x18011440,0x0,0x0,0x0,0x0,0x18000000,0x0,0x0,0x0,0x18011440,0x18011440,0x0,0x18011440,0x18011440,0x18011440,0x0,0x0,0x18011440,0x0,0x0,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x18011440,0x0,0x18011440,0x18011440,};
7358 private static void jj_la1_4() {
7359 jj_la1_4 = new int[] {0x8a,0x0,0x0,0x8a,0x80,0x8a,0x0,0x0,0x0,0x100,0x8,0x80000,0x80000,0x8,0x0,0x0,0x0,0x0,0x2,0x100,0x0,0x100,0x0,0x0,0x0,0xfff80000,0x2,0x0,0x0,0xfff80000,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x0,0x0,0x79000,0x79000,0x6c00,0x6c00,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x2,0x2,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x2,0x2,0x0,0x0,0x8,0x2,0x2,0x2,0x2,0x28,0x0,0x0,0x0,0x2,0x100,0x0,0x88,0x8a,0x0,0x0,0x0,0x0,0x100,0x0,0x80000,0x100,0x100,0x100,0x8a,0x8a,0x8a,0x8a,0x100,0x80000,0x0,0x0,0x0,0x8,0x0,0x0,0x8a,0x8a,0x0,0x2,0x8a,0x8a,0x0,0x0,0x8a,0x0,0x0,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x2,0x2,0x2,0x8a,0x8a,0x2,0x100,0x2,0x2,};
7361 static final private JJCalls[] jj_2_rtns = new JJCalls[5];
7362 static private boolean jj_rescan = false;
7363 static private int jj_gc = 0;
7365 public PHPParser(java.io.InputStream stream) {
7366 if (jj_initialized_once) {
7367 System.out.println("ERROR: Second call to constructor of static parser. You must");
7368 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7369 System.out.println(" during parser generation.");
7372 jj_initialized_once = true;
7373 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7374 token_source = new PHPParserTokenManager(jj_input_stream);
7375 token = new Token();
7378 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7379 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7382 static public void ReInit(java.io.InputStream stream) {
7383 jj_input_stream.ReInit(stream, 1, 1);
7384 token_source.ReInit(jj_input_stream);
7385 token = new Token();
7388 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7389 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7392 public PHPParser(java.io.Reader stream) {
7393 if (jj_initialized_once) {
7394 System.out.println("ERROR: Second call to constructor of static parser. You must");
7395 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7396 System.out.println(" during parser generation.");
7399 jj_initialized_once = true;
7400 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7401 token_source = new PHPParserTokenManager(jj_input_stream);
7402 token = new Token();
7405 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7406 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7409 static public void ReInit(java.io.Reader stream) {
7410 jj_input_stream.ReInit(stream, 1, 1);
7411 token_source.ReInit(jj_input_stream);
7412 token = new Token();
7415 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7416 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7419 public PHPParser(PHPParserTokenManager tm) {
7420 if (jj_initialized_once) {
7421 System.out.println("ERROR: Second call to constructor of static parser. You must");
7422 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7423 System.out.println(" during parser generation.");
7426 jj_initialized_once = true;
7428 token = new Token();
7431 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7432 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7435 public void ReInit(PHPParserTokenManager tm) {
7437 token = new Token();
7440 for (int i = 0; i < 128; i++) jj_la1[i] = -1;
7441 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7444 static final private Token jj_consume_token(int kind) throws ParseException {
7446 if ((oldToken = token).next != null) token = token.next;
7447 else token = token.next = token_source.getNextToken();
7449 if (token.kind == kind) {
7451 if (++jj_gc > 100) {
7453 for (int i = 0; i < jj_2_rtns.length; i++) {
7454 JJCalls c = jj_2_rtns[i];
7456 if (c.gen < jj_gen) c.first = null;
7465 throw generateParseException();
7468 static final private boolean jj_scan_token(int kind) {
7469 if (jj_scanpos == jj_lastpos) {
7471 if (jj_scanpos.next == null) {
7472 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
7474 jj_lastpos = jj_scanpos = jj_scanpos.next;
7477 jj_scanpos = jj_scanpos.next;
7480 int i = 0; Token tok = token;
7481 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
7482 if (tok != null) jj_add_error_token(kind, i);
7484 return (jj_scanpos.kind != kind);
7487 static final public Token getNextToken() {
7488 if (token.next != null) token = token.next;
7489 else token = token.next = token_source.getNextToken();
7495 static final public Token getToken(int index) {
7496 Token t = lookingAhead ? jj_scanpos : token;
7497 for (int i = 0; i < index; i++) {
7498 if (t.next != null) t = t.next;
7499 else t = t.next = token_source.getNextToken();
7504 static final private int jj_ntk() {
7505 if ((jj_nt=token.next) == null)
7506 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
7508 return (jj_ntk = jj_nt.kind);
7511 static private java.util.Vector jj_expentries = new java.util.Vector();
7512 static private int[] jj_expentry;
7513 static private int jj_kind = -1;
7514 static private int[] jj_lasttokens = new int[100];
7515 static private int jj_endpos;
7517 static private void jj_add_error_token(int kind, int pos) {
7518 if (pos >= 100) return;
7519 if (pos == jj_endpos + 1) {
7520 jj_lasttokens[jj_endpos++] = kind;
7521 } else if (jj_endpos != 0) {
7522 jj_expentry = new int[jj_endpos];
7523 for (int i = 0; i < jj_endpos; i++) {
7524 jj_expentry[i] = jj_lasttokens[i];
7526 boolean exists = false;
7527 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
7528 int[] oldentry = (int[])(enum.nextElement());
7529 if (oldentry.length == jj_expentry.length) {
7531 for (int i = 0; i < jj_expentry.length; i++) {
7532 if (oldentry[i] != jj_expentry[i]) {
7540 if (!exists) jj_expentries.addElement(jj_expentry);
7541 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
7545 static public ParseException generateParseException() {
7546 jj_expentries.removeAllElements();
7547 boolean[] la1tokens = new boolean[160];
7548 for (int i = 0; i < 160; i++) {
7549 la1tokens[i] = false;
7552 la1tokens[jj_kind] = true;
7555 for (int i = 0; i < 128; i++) {
7556 if (jj_la1[i] == jj_gen) {
7557 for (int j = 0; j < 32; j++) {
7558 if ((jj_la1_0[i] & (1<<j)) != 0) {
7559 la1tokens[j] = true;
7561 if ((jj_la1_1[i] & (1<<j)) != 0) {
7562 la1tokens[32+j] = true;
7564 if ((jj_la1_2[i] & (1<<j)) != 0) {
7565 la1tokens[64+j] = true;
7567 if ((jj_la1_3[i] & (1<<j)) != 0) {
7568 la1tokens[96+j] = true;
7570 if ((jj_la1_4[i] & (1<<j)) != 0) {
7571 la1tokens[128+j] = true;
7576 for (int i = 0; i < 160; i++) {
7578 jj_expentry = new int[1];
7580 jj_expentries.addElement(jj_expentry);
7585 jj_add_error_token(0, 0);
7586 int[][] exptokseq = new int[jj_expentries.size()][];
7587 for (int i = 0; i < jj_expentries.size(); i++) {
7588 exptokseq[i] = (int[])jj_expentries.elementAt(i);
7590 return new ParseException(token, exptokseq, tokenImage);
7593 static final public void enable_tracing() {
7596 static final public void disable_tracing() {
7599 static final private void jj_rescan_token() {
7601 for (int i = 0; i < 5; i++) {
7602 JJCalls p = jj_2_rtns[i];
7604 if (p.gen > jj_gen) {
7605 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7607 case 0: jj_3_1(); break;
7608 case 1: jj_3_2(); break;
7609 case 2: jj_3_3(); break;
7610 case 3: jj_3_4(); break;
7611 case 4: jj_3_5(); break;
7615 } while (p != null);
7620 static final private void jj_save(int index, int xla) {
7621 JJCalls p = jj_2_rtns[index];
7622 while (p.gen > jj_gen) {
7623 if (p.next == null) { p = p.next = new JJCalls(); break; }
7626 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7629 static final class JJCalls {