1 /* Generated By:JavaCC: Do not edit this line. PHPParser.java */
4 import org.eclipse.core.resources.IFile;
5 import org.eclipse.core.resources.IMarker;
6 import org.eclipse.core.runtime.CoreException;
7 import org.eclipse.ui.texteditor.MarkerUtilities;
8 import org.eclipse.jface.preference.IPreferenceStore;
10 import java.util.Hashtable;
11 import java.util.Enumeration;
12 import java.util.ArrayList;
13 import java.io.StringReader;
15 import java.text.MessageFormat;
17 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
18 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
19 import net.sourceforge.phpdt.internal.compiler.ast.*;
20 import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
21 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
25 * This php parser is inspired by the Java 1.2 grammar example
26 * given with JavaCC. You can get JavaCC at http://www.webgain.com
27 * You can test the parser with the PHPParserTestCase2.java
28 * @author Matthieu Casanova
30 public final class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
32 /** The file that is parsed. */
33 private static IFile fileToParse;
35 /** The current segment. */
36 private static OutlineableWithChildren currentSegment;
38 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
39 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
40 static PHPOutlineInfo outlineInfo;
42 public static MethodDeclaration currentFunction;
43 private static boolean assigning;
45 /** The error level of the current ParseException. */
46 private static int errorLevel = ERROR;
47 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
48 private static String errorMessage;
50 private static int errorStart = -1;
51 private static int errorEnd = -1;
52 private static PHPDocument phpDocument;
54 * The point where html starts.
55 * It will be used by the token manager to create HTMLCode objects
57 public static int htmlStart;
60 private final static int AstStackIncrement = 100;
61 /** The stack of node. */
62 private static AstNode[] nodes;
63 /** The cursor in expression stack. */
64 private static int nodePtr;
66 public final void setFileToParse(final IFile fileToParse) {
67 this.fileToParse = fileToParse;
73 public PHPParser(final IFile fileToParse) {
74 this(new StringReader(""));
75 this.fileToParse = fileToParse;
79 * Reinitialize the parser.
81 private static final void init() {
82 nodes = new AstNode[AstStackIncrement];
88 * Add an php node on the stack.
89 * @param node the node that will be added to the stack
91 private static final void pushOnAstNodes(AstNode node) {
93 nodes[++nodePtr] = node;
94 } catch (IndexOutOfBoundsException e) {
95 int oldStackLength = nodes.length;
96 AstNode[] oldStack = nodes;
97 nodes = new AstNode[oldStackLength + AstStackIncrement];
98 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
99 nodePtr = oldStackLength;
100 nodes[nodePtr] = node;
104 public static final void phpParserTester(final String strEval) throws CoreException, ParseException {
105 PHPParserTokenManager.SwitchTo(PHPParserTokenManager.PHPPARSING);
106 final StringReader stream = new StringReader(strEval);
107 if (jj_input_stream == null) {
108 jj_input_stream = new SimpleCharStream(stream, 1, 1);
110 ReInit(new StringReader(strEval));
115 public static final void htmlParserTester(final File fileName) throws CoreException, ParseException {
117 final Reader stream = new FileReader(fileName);
118 if (jj_input_stream == null) {
119 jj_input_stream = new SimpleCharStream(stream, 1, 1);
124 } catch (FileNotFoundException e) {
125 e.printStackTrace(); //To change body of catch statement use Options | File Templates.
129 public static final void htmlParserTester(final String strEval) throws CoreException, ParseException {
130 final StringReader stream = new StringReader(strEval);
131 if (jj_input_stream == null) {
132 jj_input_stream = new SimpleCharStream(stream, 1, 1);
139 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
140 currentSegment = new PHPDocument(parent);
141 outlineInfo = new PHPOutlineInfo(parent);
142 final StringReader stream = new StringReader(s);
143 if (jj_input_stream == null) {
144 jj_input_stream = new SimpleCharStream(stream, 1, 1);
150 //PHPeclipsePlugin.log(1,phpDocument.toString());
151 } catch (ParseException e) {
152 processParseException(e);
158 * This method will process the parse exception.
159 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
160 * @param e the ParseException
162 private static void processParseException(final ParseException e) {
163 if (errorMessage == null) {
164 PHPeclipsePlugin.log(e);
165 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
166 errorStart = jj_input_stream.getPosition();
167 errorEnd = errorStart + 1;
174 * Create marker for the parse error
175 * @param e the ParseException
177 private static void setMarker(final ParseException e) {
179 if (errorStart == -1) {
180 setMarker(fileToParse,
182 jj_input_stream.tokenBegin,
183 jj_input_stream.tokenBegin + e.currentToken.image.length(),
185 "Line " + e.currentToken.beginLine);
187 setMarker(fileToParse,
192 "Line " + e.currentToken.beginLine);
196 } catch (CoreException e2) {
197 PHPeclipsePlugin.log(e2);
202 * Create markers according to the external parser output
204 private static void createMarkers(final String output, final IFile file) throws CoreException {
205 // delete all markers
206 file.deleteMarkers(IMarker.PROBLEM, false, 0);
211 while ((brIndx = output.indexOf("<br />", indx)) != -1) {
212 // newer php error output (tested with 4.2.3)
213 scanLine(output, file, indx, brIndx);
218 while ((brIndx = output.indexOf("<br>", indx)) != -1) {
219 // older php error output (tested with 4.2.3)
220 scanLine(output, file, indx, brIndx);
226 private static void scanLine(final String output,
229 final int brIndx) throws CoreException {
231 StringBuffer lineNumberBuffer = new StringBuffer(10);
233 current = output.substring(indx, brIndx);
235 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
236 int onLine = current.indexOf("on line <b>");
238 lineNumberBuffer.delete(0, lineNumberBuffer.length());
239 for (int i = onLine; i < current.length(); i++) {
240 ch = current.charAt(i);
241 if ('0' <= ch && '9' >= ch) {
242 lineNumberBuffer.append(ch);
246 int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
248 Hashtable attributes = new Hashtable();
250 current = current.replaceAll("\n", "");
251 current = current.replaceAll("<b>", "");
252 current = current.replaceAll("</b>", "");
253 MarkerUtilities.setMessage(attributes, current);
255 if (current.indexOf(PARSE_ERROR_STRING) != -1)
256 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
257 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
258 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
260 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
261 MarkerUtilities.setLineNumber(attributes, lineNumber);
262 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
267 public final void parse(final String s) throws CoreException {
268 final StringReader stream = new StringReader(s);
269 if (jj_input_stream == null) {
270 jj_input_stream = new SimpleCharStream(stream, 1, 1);
276 } catch (ParseException e) {
277 processParseException(e);
282 * Call the php parse command ( php -l -f <filename> )
283 * and create markers according to the external parser output
285 public static void phpExternalParse(final IFile file) {
286 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
287 final String filename = file.getLocation().toString();
289 final String[] arguments = { filename };
290 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
291 final String command = form.format(arguments);
293 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
296 // parse the buffer to find the errors and warnings
297 createMarkers(parserResult, file);
298 } catch (CoreException e) {
299 PHPeclipsePlugin.log(e);
304 * Put a new html block in the stack.
306 public static final void createNewHTMLCode() {
307 final int currentPosition = SimpleCharStream.getPosition();
308 if (currentPosition == htmlStart) {
311 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition).toCharArray();
312 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
315 private static final void parse() throws ParseException {
319 static final public void phpTest() throws ParseException {
322 PHPParser.createNewHTMLCode();
325 static final public void phpFile() throws ParseException {
329 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
367 case INTEGER_LITERAL:
368 case FLOATING_POINT_LITERAL:
384 } catch (TokenMgrError e) {
385 PHPeclipsePlugin.log(e);
386 errorStart = SimpleCharStream.getPosition();
387 errorEnd = errorStart + 1;
388 errorMessage = e.getMessage();
390 {if (true) throw generateParseException();}
395 * A php block is a <?= expression [;]?>
396 * or <?php somephpcode ?>
397 * or <? somephpcode ?>
399 static final public void PhpBlock() throws ParseException {
400 final int start = jj_input_stream.getPosition();
401 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
441 case INTEGER_LITERAL:
442 case FLOATING_POINT_LITERAL:
449 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
452 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
454 jj_consume_token(PHPSTARTLONG);
457 jj_consume_token(PHPSTARTSHORT);
459 setMarker(fileToParse,
460 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
462 jj_input_stream.getPosition(),
464 "Line " + token.beginLine);
465 } catch (CoreException e) {
466 PHPeclipsePlugin.log(e);
471 jj_consume_token(-1);
472 throw new ParseException();
481 jj_consume_token(PHPEND);
482 } catch (ParseException e) {
483 errorMessage = "'?>' expected";
485 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
486 errorEnd = jj_input_stream.getPosition() + 1;
492 jj_consume_token(-1);
493 throw new ParseException();
497 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
498 final Expression expr;
499 final int pos = SimpleCharStream.getPosition();
500 PHPEchoBlock echoBlock;
501 jj_consume_token(PHPECHOSTART);
503 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
505 jj_consume_token(SEMICOLON);
511 jj_consume_token(PHPEND);
512 echoBlock = new PHPEchoBlock(expr,pos,SimpleCharStream.getPosition());
513 pushOnAstNodes(echoBlock);
514 {if (true) return echoBlock;}
515 throw new Error("Missing return statement in function");
518 static final public void Php() throws ParseException {
521 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
555 case INTEGER_LITERAL:
556 case FLOATING_POINT_LITERAL:
573 static final public ClassDeclaration ClassDeclaration() throws ParseException {
574 final ClassDeclaration classDeclaration;
575 final Token className;
576 Token superclassName = null;
578 jj_consume_token(CLASS);
580 pos = jj_input_stream.getPosition();
581 className = jj_consume_token(IDENTIFIER);
582 } catch (ParseException e) {
583 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
585 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
586 errorEnd = jj_input_stream.getPosition() + 1;
589 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
591 jj_consume_token(EXTENDS);
593 superclassName = jj_consume_token(IDENTIFIER);
594 } catch (ParseException e) {
595 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
597 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
598 errorEnd = jj_input_stream.getPosition() + 1;
606 if (superclassName == null) {
607 classDeclaration = new ClassDeclaration(currentSegment,
608 className.image.toCharArray(),
609 superclassName.image.toCharArray(),
613 classDeclaration = new ClassDeclaration(currentSegment,
614 className.image.toCharArray(),
618 currentSegment.add(classDeclaration);
619 currentSegment = classDeclaration;
620 ClassBody(classDeclaration);
621 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
622 classDeclaration.sourceEnd = SimpleCharStream.getPosition();
623 pushOnAstNodes(classDeclaration);
624 {if (true) return classDeclaration;}
625 throw new Error("Missing return statement in function");
628 static final public void ClassBody(ClassDeclaration classDeclaration) throws ParseException {
630 jj_consume_token(LBRACE);
631 } catch (ParseException e) {
632 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "', '{' expected";
634 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
635 errorEnd = jj_input_stream.getPosition() + 1;
640 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
649 ClassBodyDeclaration(classDeclaration);
652 jj_consume_token(RBRACE);
653 } catch (ParseException e) {
654 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', 'var', 'function' or '}' expected";
656 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
657 errorEnd = jj_input_stream.getPosition() + 1;
663 * A class can contain only methods and fields.
665 static final public void ClassBodyDeclaration(ClassDeclaration classDeclaration) throws ParseException {
666 MethodDeclaration method;
667 FieldDeclaration field;
668 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
670 method = MethodDeclaration();
671 classDeclaration.addMethod(method);
674 field = FieldDeclaration();
675 classDeclaration.addVariable(field);
679 jj_consume_token(-1);
680 throw new ParseException();
685 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
687 static final public FieldDeclaration FieldDeclaration() throws ParseException {
688 VariableDeclaration variableDeclaration;
689 jj_consume_token(VAR);
690 variableDeclaration = VariableDeclarator();
691 outlineInfo.addVariable(new String(variableDeclaration.name));
692 if (currentSegment != null) {
693 currentSegment.add(variableDeclaration);
697 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
705 jj_consume_token(COMMA);
706 variableDeclaration = VariableDeclarator();
707 if (currentSegment != null) {
708 currentSegment.add(variableDeclaration);
712 jj_consume_token(SEMICOLON);
713 } catch (ParseException e) {
714 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
716 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
717 errorEnd = jj_input_stream.getPosition() + 1;
720 throw new Error("Missing return statement in function");
723 static final public VariableDeclaration VariableDeclarator() throws ParseException {
724 final String varName, varValue;
725 Expression initializer = null;
726 final int pos = jj_input_stream.getPosition();
727 varName = VariableDeclaratorId();
728 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
730 jj_consume_token(ASSIGN);
732 initializer = VariableInitializer();
733 } catch (ParseException e) {
734 errorMessage = "Literal expression expected in variable initializer";
736 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
737 errorEnd = jj_input_stream.getPosition() + 1;
745 {if (true) return new VariableDeclaration(currentSegment,
746 varName.toCharArray(),
749 throw new Error("Missing return statement in function");
754 * @return the variable name (with suffix)
756 static final public String VariableDeclaratorId() throws ParseException {
758 Expression expression;
759 final StringBuffer buff = new StringBuffer();
760 final int pos = SimpleCharStream.getPosition();
761 ConstantIdentifier ex;
772 ex = new ConstantIdentifier(expr.toCharArray(),
774 SimpleCharStream.getPosition());
775 expression = VariableSuffix(ex);
776 buff.append(expression.toStringExpression());
778 {if (true) return buff.toString();}
779 } catch (ParseException e) {
780 errorMessage = "'$' expected for variable identifier";
782 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
783 errorEnd = jj_input_stream.getPosition() + 1;
786 throw new Error("Missing return statement in function");
789 static final public String Variable() throws ParseException {
790 final StringBuffer buff;
791 Expression expression = null;
794 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
796 token = jj_consume_token(DOLLAR_ID);
797 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
799 jj_consume_token(LBRACE);
800 expression = Expression();
801 jj_consume_token(RBRACE);
807 if (expression == null && !assigning) {
808 {if (true) return token.image.substring(1);}
810 buff = new StringBuffer(token.image);
812 buff.append(expression.toStringExpression());
814 {if (true) return buff.toString();}
817 jj_consume_token(DOLLAR);
818 expr = VariableName();
819 {if (true) return expr;}
823 jj_consume_token(-1);
824 throw new ParseException();
826 throw new Error("Missing return statement in function");
829 static final public String VariableName() throws ParseException {
830 final StringBuffer buff;
832 Expression expression = null;
834 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
836 jj_consume_token(LBRACE);
837 expression = Expression();
838 jj_consume_token(RBRACE);
839 buff = new StringBuffer('{');
840 buff.append(expression.toStringExpression());
842 {if (true) return buff.toString();}
845 token = jj_consume_token(IDENTIFIER);
846 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
848 jj_consume_token(LBRACE);
849 expression = Expression();
850 jj_consume_token(RBRACE);
856 if (expression == null) {
857 {if (true) return token.image;}
859 buff = new StringBuffer(token.image);
861 buff.append(expression.toStringExpression());
863 {if (true) return buff.toString();}
866 jj_consume_token(DOLLAR);
867 expr = VariableName();
868 buff = new StringBuffer('$');
870 {if (true) return buff.toString();}
873 token = jj_consume_token(DOLLAR_ID);
874 {if (true) return token.image;}
878 jj_consume_token(-1);
879 throw new ParseException();
881 throw new Error("Missing return statement in function");
884 static final public Expression VariableInitializer() throws ParseException {
885 final Expression expr;
887 final int pos = SimpleCharStream.getPosition();
888 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
892 case INTEGER_LITERAL:
893 case FLOATING_POINT_LITERAL:
896 {if (true) return expr;}
899 jj_consume_token(MINUS);
900 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
901 case INTEGER_LITERAL:
902 token = jj_consume_token(INTEGER_LITERAL);
904 case FLOATING_POINT_LITERAL:
905 token = jj_consume_token(FLOATING_POINT_LITERAL);
909 jj_consume_token(-1);
910 throw new ParseException();
912 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
914 SimpleCharStream.getPosition()),
919 jj_consume_token(PLUS);
920 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
921 case INTEGER_LITERAL:
922 token = jj_consume_token(INTEGER_LITERAL);
924 case FLOATING_POINT_LITERAL:
925 token = jj_consume_token(FLOATING_POINT_LITERAL);
929 jj_consume_token(-1);
930 throw new ParseException();
932 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
934 SimpleCharStream.getPosition()),
939 expr = ArrayDeclarator();
940 {if (true) return expr;}
943 token = jj_consume_token(IDENTIFIER);
944 {if (true) return new ConstantIdentifier(token.image.toCharArray(),pos,SimpleCharStream.getPosition());}
948 jj_consume_token(-1);
949 throw new ParseException();
951 throw new Error("Missing return statement in function");
954 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
956 Expression expr2 = null;
958 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
960 jj_consume_token(ARRAYASSIGN);
961 expr2 = Expression();
967 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
968 throw new Error("Missing return statement in function");
971 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
972 ArrayVariableDeclaration expr;
973 final ArrayList list = new ArrayList();
974 jj_consume_token(LPAREN);
975 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
991 case INTEGER_LITERAL:
992 case FLOATING_POINT_LITERAL:
997 expr = ArrayVariable();
1006 jj_consume_token(COMMA);
1007 expr = ArrayVariable();
1012 jj_la1[19] = jj_gen;
1015 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1017 jj_consume_token(COMMA);
1021 jj_la1[20] = jj_gen;
1024 jj_consume_token(RPAREN);
1025 {if (true) return (ArrayVariableDeclaration[]) list.toArray();}
1026 throw new Error("Missing return statement in function");
1030 * A Method Declaration.
1031 * <b>function</b> MetodDeclarator() Block()
1033 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1034 final MethodDeclaration functionDeclaration;
1035 Token functionToken;
1037 functionToken = jj_consume_token(FUNCTION);
1039 functionDeclaration = MethodDeclarator();
1040 outlineInfo.addVariable(new String(functionDeclaration.name));
1041 } catch (ParseException e) {
1042 if (errorMessage != null) {
1043 {if (true) throw e;}
1045 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1047 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1048 errorEnd = jj_input_stream.getPosition() + 1;
1049 {if (true) throw e;}
1051 if (currentSegment != null) {
1052 currentSegment.add(functionDeclaration);
1053 currentSegment = functionDeclaration;
1055 currentFunction = functionDeclaration;
1057 functionDeclaration.statements = block.statements;
1058 currentFunction = null;
1059 if (currentSegment != null) {
1060 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
1062 {if (true) return functionDeclaration;}
1063 throw new Error("Missing return statement in function");
1067 * A MethodDeclarator.
1068 * [&] IDENTIFIER(parameters ...).
1069 * @return a function description for the outline
1071 static final public MethodDeclaration MethodDeclarator() throws ParseException {
1072 final Token identifier;
1073 Token reference = null;
1074 final Hashtable formalParameters;
1075 final int pos = SimpleCharStream.getPosition();
1076 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1078 reference = jj_consume_token(BIT_AND);
1081 jj_la1[21] = jj_gen;
1084 identifier = jj_consume_token(IDENTIFIER);
1085 formalParameters = FormalParameters();
1086 {if (true) return new MethodDeclaration(currentSegment,
1087 identifier.image.toCharArray(),
1091 SimpleCharStream.getPosition());}
1092 throw new Error("Missing return statement in function");
1096 * FormalParameters follows method identifier.
1097 * (FormalParameter())
1099 static final public Hashtable FormalParameters() throws ParseException {
1101 final StringBuffer buff = new StringBuffer("(");
1102 VariableDeclaration var;
1103 final Hashtable parameters = new Hashtable();
1105 jj_consume_token(LPAREN);
1106 } catch (ParseException e) {
1107 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1109 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1110 errorEnd = jj_input_stream.getPosition() + 1;
1111 {if (true) throw e;}
1113 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1117 var = FormalParameter();
1118 parameters.put(new String(var.name),var);
1121 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1126 jj_la1[22] = jj_gen;
1129 jj_consume_token(COMMA);
1130 var = FormalParameter();
1131 parameters.put(new String(var.name),var);
1135 jj_la1[23] = jj_gen;
1139 jj_consume_token(RPAREN);
1140 } catch (ParseException e) {
1141 errorMessage = "')' expected";
1143 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1144 errorEnd = jj_input_stream.getPosition() + 1;
1145 {if (true) throw e;}
1147 {if (true) return parameters;}
1148 throw new Error("Missing return statement in function");
1152 * A formal parameter.
1153 * $varname[=value] (,$varname[=value])
1155 static final public VariableDeclaration FormalParameter() throws ParseException {
1156 final VariableDeclaration variableDeclaration;
1158 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1160 token = jj_consume_token(BIT_AND);
1163 jj_la1[24] = jj_gen;
1166 variableDeclaration = VariableDeclarator();
1167 if (token != null) {
1168 variableDeclaration.setReference(true);
1170 {if (true) return variableDeclaration;}
1171 throw new Error("Missing return statement in function");
1174 static final public ConstantIdentifier Type() throws ParseException {
1176 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1178 jj_consume_token(STRING);
1179 pos = SimpleCharStream.getPosition();
1180 {if (true) return new ConstantIdentifier(Types.STRING,
1184 jj_consume_token(BOOL);
1185 pos = SimpleCharStream.getPosition();
1186 {if (true) return new ConstantIdentifier(Types.BOOL,
1190 jj_consume_token(BOOLEAN);
1191 pos = SimpleCharStream.getPosition();
1192 {if (true) return new ConstantIdentifier(Types.BOOLEAN,
1196 jj_consume_token(REAL);
1197 pos = SimpleCharStream.getPosition();
1198 {if (true) return new ConstantIdentifier(Types.REAL,
1202 jj_consume_token(DOUBLE);
1203 pos = SimpleCharStream.getPosition();
1204 {if (true) return new ConstantIdentifier(Types.DOUBLE,
1208 jj_consume_token(FLOAT);
1209 pos = SimpleCharStream.getPosition();
1210 {if (true) return new ConstantIdentifier(Types.FLOAT,
1214 jj_consume_token(INT);
1215 pos = SimpleCharStream.getPosition();
1216 {if (true) return new ConstantIdentifier(Types.INT,
1220 jj_consume_token(INTEGER);
1221 pos = SimpleCharStream.getPosition();
1222 {if (true) return new ConstantIdentifier(Types.INTEGER,
1226 jj_consume_token(OBJECT);
1227 pos = SimpleCharStream.getPosition();
1228 {if (true) return new ConstantIdentifier(Types.OBJECT,
1232 jj_la1[25] = jj_gen;
1233 jj_consume_token(-1);
1234 throw new ParseException();
1236 throw new Error("Missing return statement in function");
1239 static final public Expression Expression() throws ParseException {
1240 final Expression expr;
1241 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1243 expr = PrintExpression();
1244 {if (true) return expr;}
1247 expr = ListExpression();
1248 {if (true) return expr;}
1251 jj_la1[26] = jj_gen;
1252 if (jj_2_3(2147483647)) {
1253 expr = varAssignation();
1254 {if (true) return expr;}
1256 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1270 case INTEGER_LITERAL:
1271 case FLOATING_POINT_LITERAL:
1272 case STRING_LITERAL:
1276 expr = ConditionalExpression();
1277 {if (true) return expr;}
1280 jj_la1[27] = jj_gen;
1281 jj_consume_token(-1);
1282 throw new ParseException();
1286 throw new Error("Missing return statement in function");
1290 * A Variable assignation.
1291 * varName (an assign operator) any expression
1293 static final public VarAssignation varAssignation() throws ParseException {
1295 final Expression expression;
1296 final int assignOperator;
1297 final int pos = SimpleCharStream.getPosition();
1298 varName = VariableDeclaratorId();
1299 assignOperator = AssignmentOperator();
1301 expression = Expression();
1302 } catch (ParseException e) {
1303 if (errorMessage != null) {
1304 {if (true) throw e;}
1306 errorMessage = "expression expected";
1308 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1309 errorEnd = jj_input_stream.getPosition() + 1;
1310 {if (true) throw e;}
1312 {if (true) return new VarAssignation(varName.toCharArray(),
1316 SimpleCharStream.getPosition());}
1317 throw new Error("Missing return statement in function");
1320 static final public int AssignmentOperator() throws ParseException {
1321 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1323 jj_consume_token(ASSIGN);
1324 {if (true) return VarAssignation.EQUAL;}
1327 jj_consume_token(STARASSIGN);
1328 {if (true) return VarAssignation.STAR_EQUAL;}
1331 jj_consume_token(SLASHASSIGN);
1332 {if (true) return VarAssignation.SLASH_EQUAL;}
1335 jj_consume_token(REMASSIGN);
1336 {if (true) return VarAssignation.REM_EQUAL;}
1339 jj_consume_token(PLUSASSIGN);
1340 {if (true) return VarAssignation.PLUS_EQUAL;}
1343 jj_consume_token(MINUSASSIGN);
1344 {if (true) return VarAssignation.MINUS_EQUAL;}
1347 jj_consume_token(LSHIFTASSIGN);
1348 {if (true) return VarAssignation.LSHIFT_EQUAL;}
1350 case RSIGNEDSHIFTASSIGN:
1351 jj_consume_token(RSIGNEDSHIFTASSIGN);
1352 {if (true) return VarAssignation.RSIGNEDSHIFT_EQUAL;}
1355 jj_consume_token(ANDASSIGN);
1356 {if (true) return VarAssignation.AND_EQUAL;}
1359 jj_consume_token(XORASSIGN);
1360 {if (true) return VarAssignation.XOR_EQUAL;}
1363 jj_consume_token(ORASSIGN);
1364 {if (true) return VarAssignation.OR_EQUAL;}
1367 jj_consume_token(DOTASSIGN);
1368 {if (true) return VarAssignation.DOT_EQUAL;}
1371 jj_consume_token(TILDEEQUAL);
1372 {if (true) return VarAssignation.TILDE_EQUAL;}
1375 jj_la1[28] = 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 ConditionalExpression() throws ParseException {
1383 final Expression expr;
1384 Expression expr2 = null;
1385 Expression expr3 = null;
1386 expr = ConditionalOrExpression();
1387 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1389 jj_consume_token(HOOK);
1390 expr2 = Expression();
1391 jj_consume_token(COLON);
1392 expr3 = ConditionalExpression();
1395 jj_la1[29] = jj_gen;
1398 if (expr3 == null) {
1399 {if (true) return expr;}
1401 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1402 throw new Error("Missing return statement in function");
1405 static final public Expression ConditionalOrExpression() throws ParseException {
1406 Expression expr,expr2;
1408 expr = ConditionalAndExpression();
1411 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1417 jj_la1[30] = jj_gen;
1420 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1422 jj_consume_token(OR_OR);
1423 operator = OperatorIds.OR_OR;
1426 jj_consume_token(_ORL);
1427 operator = OperatorIds.ORL;
1430 jj_la1[31] = jj_gen;
1431 jj_consume_token(-1);
1432 throw new ParseException();
1434 expr2 = ConditionalAndExpression();
1435 expr = new BinaryExpression(expr,expr2,operator);
1437 {if (true) return expr;}
1438 throw new Error("Missing return statement in function");
1441 static final public Expression ConditionalAndExpression() throws ParseException {
1442 Expression expr,expr2;
1444 expr = ConcatExpression();
1447 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1453 jj_la1[32] = jj_gen;
1456 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1458 jj_consume_token(AND_AND);
1459 operator = OperatorIds.AND_AND;
1462 jj_consume_token(_ANDL);
1463 operator = OperatorIds.ANDL;
1466 jj_la1[33] = jj_gen;
1467 jj_consume_token(-1);
1468 throw new ParseException();
1470 expr2 = ConcatExpression();
1471 expr = new BinaryExpression(expr,expr2,operator);
1473 {if (true) return expr;}
1474 throw new Error("Missing return statement in function");
1477 static final public Expression ConcatExpression() throws ParseException {
1478 Expression expr,expr2;
1479 expr = InclusiveOrExpression();
1482 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1487 jj_la1[34] = jj_gen;
1490 jj_consume_token(DOT);
1491 expr2 = InclusiveOrExpression();
1492 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1494 {if (true) return expr;}
1495 throw new Error("Missing return statement in function");
1498 static final public Expression InclusiveOrExpression() throws ParseException {
1499 Expression expr,expr2;
1500 expr = ExclusiveOrExpression();
1503 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1508 jj_la1[35] = jj_gen;
1511 jj_consume_token(BIT_OR);
1512 expr2 = ExclusiveOrExpression();
1513 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1515 {if (true) return expr;}
1516 throw new Error("Missing return statement in function");
1519 static final public Expression ExclusiveOrExpression() throws ParseException {
1520 Expression expr,expr2;
1521 expr = AndExpression();
1524 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1529 jj_la1[36] = jj_gen;
1532 jj_consume_token(XOR);
1533 expr2 = AndExpression();
1534 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1536 {if (true) return expr;}
1537 throw new Error("Missing return statement in function");
1540 static final public Expression AndExpression() throws ParseException {
1541 Expression expr,expr2;
1542 expr = EqualityExpression();
1545 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1550 jj_la1[37] = jj_gen;
1553 jj_consume_token(BIT_AND);
1554 expr2 = EqualityExpression();
1555 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1557 {if (true) return expr;}
1558 throw new Error("Missing return statement in function");
1561 static final public Expression EqualityExpression() throws ParseException {
1562 Expression expr,expr2;
1564 expr = RelationalExpression();
1567 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1571 case BANGDOUBLEEQUAL:
1576 jj_la1[38] = jj_gen;
1579 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1581 jj_consume_token(EQUAL_EQUAL);
1582 operator = OperatorIds.EQUAL_EQUAL;
1585 jj_consume_token(DIF);
1586 operator = OperatorIds.DIF;
1589 jj_consume_token(NOT_EQUAL);
1590 operator = OperatorIds.DIF;
1592 case BANGDOUBLEEQUAL:
1593 jj_consume_token(BANGDOUBLEEQUAL);
1594 operator = OperatorIds.BANG_EQUAL_EQUAL;
1597 jj_consume_token(TRIPLEEQUAL);
1598 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1601 jj_la1[39] = jj_gen;
1602 jj_consume_token(-1);
1603 throw new ParseException();
1606 expr2 = RelationalExpression();
1607 } catch (ParseException e) {
1608 if (errorMessage != null) {
1609 {if (true) throw e;}
1611 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1613 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1614 errorEnd = jj_input_stream.getPosition() + 1;
1615 {if (true) throw e;}
1617 expr = new BinaryExpression(expr,expr2,operator);
1619 {if (true) return expr;}
1620 throw new Error("Missing return statement in function");
1623 static final public Expression RelationalExpression() throws ParseException {
1624 Expression expr,expr2;
1626 expr = ShiftExpression();
1629 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1637 jj_la1[40] = jj_gen;
1640 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1642 jj_consume_token(LT);
1643 operator = OperatorIds.LESS;
1646 jj_consume_token(GT);
1647 operator = OperatorIds.GREATER;
1650 jj_consume_token(LE);
1651 operator = OperatorIds.LESS_EQUAL;
1654 jj_consume_token(GE);
1655 operator = OperatorIds.GREATER_EQUAL;
1658 jj_la1[41] = jj_gen;
1659 jj_consume_token(-1);
1660 throw new ParseException();
1662 expr2 = ShiftExpression();
1663 expr = new BinaryExpression(expr,expr2,operator);
1665 {if (true) return expr;}
1666 throw new Error("Missing return statement in function");
1669 static final public Expression ShiftExpression() throws ParseException {
1670 Expression expr,expr2;
1672 expr = AdditiveExpression();
1675 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1678 case RUNSIGNEDSHIFT:
1682 jj_la1[42] = jj_gen;
1685 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1687 jj_consume_token(LSHIFT);
1688 operator = OperatorIds.LEFT_SHIFT;
1691 jj_consume_token(RSIGNEDSHIFT);
1692 operator = OperatorIds.RIGHT_SHIFT;
1694 case RUNSIGNEDSHIFT:
1695 jj_consume_token(RUNSIGNEDSHIFT);
1696 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1699 jj_la1[43] = jj_gen;
1700 jj_consume_token(-1);
1701 throw new ParseException();
1703 expr2 = AdditiveExpression();
1704 expr = new BinaryExpression(expr,expr2,operator);
1706 {if (true) return expr;}
1707 throw new Error("Missing return statement in function");
1710 static final public Expression AdditiveExpression() throws ParseException {
1711 Expression expr,expr2;
1713 expr = MultiplicativeExpression();
1716 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1722 jj_la1[44] = jj_gen;
1725 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1727 jj_consume_token(PLUS);
1728 operator = OperatorIds.PLUS;
1731 jj_consume_token(MINUS);
1732 operator = OperatorIds.MINUS;
1735 jj_la1[45] = jj_gen;
1736 jj_consume_token(-1);
1737 throw new ParseException();
1739 expr2 = MultiplicativeExpression();
1740 expr = new BinaryExpression(expr,expr2,operator);
1742 {if (true) return expr;}
1743 throw new Error("Missing return statement in function");
1746 static final public Expression MultiplicativeExpression() throws ParseException {
1747 Expression expr,expr2;
1750 expr = UnaryExpression();
1751 } catch (ParseException e) {
1752 if (errorMessage != null) {
1753 {if (true) throw e;}
1755 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1757 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1758 errorEnd = jj_input_stream.getPosition() + 1;
1759 {if (true) throw e;}
1763 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1770 jj_la1[46] = jj_gen;
1773 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1775 jj_consume_token(STAR);
1776 operator = OperatorIds.MULTIPLY;
1779 jj_consume_token(SLASH);
1780 operator = OperatorIds.DIVIDE;
1783 jj_consume_token(REMAINDER);
1784 operator = OperatorIds.REMAINDER;
1787 jj_la1[47] = jj_gen;
1788 jj_consume_token(-1);
1789 throw new ParseException();
1791 expr2 = UnaryExpression();
1792 expr = new BinaryExpression(expr,expr2,operator);
1794 {if (true) return expr;}
1795 throw new Error("Missing return statement in function");
1799 * An unary expression starting with @, & or nothing
1801 static final public Expression UnaryExpression() throws ParseException {
1803 final int pos = SimpleCharStream.getPosition();
1804 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1806 jj_consume_token(BIT_AND);
1807 expr = UnaryExpressionNoPrefix();
1808 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1822 case INTEGER_LITERAL:
1823 case FLOATING_POINT_LITERAL:
1824 case STRING_LITERAL:
1828 expr = AtUnaryExpression();
1829 {if (true) return expr;}
1832 jj_la1[48] = jj_gen;
1833 jj_consume_token(-1);
1834 throw new ParseException();
1836 throw new Error("Missing return statement in function");
1839 static final public Expression AtUnaryExpression() throws ParseException {
1841 final int pos = SimpleCharStream.getPosition();
1842 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1844 jj_consume_token(AT);
1845 expr = AtUnaryExpression();
1846 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,pos);}
1859 case INTEGER_LITERAL:
1860 case FLOATING_POINT_LITERAL:
1861 case STRING_LITERAL:
1865 expr = UnaryExpressionNoPrefix();
1866 {if (true) return expr;}
1869 jj_la1[49] = jj_gen;
1870 jj_consume_token(-1);
1871 throw new ParseException();
1873 throw new Error("Missing return statement in function");
1876 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
1879 final int pos = SimpleCharStream.getPosition();
1880 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1883 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1885 jj_consume_token(PLUS);
1886 operator = OperatorIds.PLUS;
1889 jj_consume_token(MINUS);
1890 operator = OperatorIds.MINUS;
1893 jj_la1[50] = jj_gen;
1894 jj_consume_token(-1);
1895 throw new ParseException();
1897 expr = UnaryExpression();
1898 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1902 expr = PreIncDecExpression();
1903 {if (true) return expr;}
1912 case INTEGER_LITERAL:
1913 case FLOATING_POINT_LITERAL:
1914 case STRING_LITERAL:
1918 expr = UnaryExpressionNotPlusMinus();
1919 {if (true) return expr;}
1922 jj_la1[51] = jj_gen;
1923 jj_consume_token(-1);
1924 throw new ParseException();
1926 throw new Error("Missing return statement in function");
1929 static final public Expression PreIncDecExpression() throws ParseException {
1930 final Expression expr;
1932 final int pos = SimpleCharStream.getPosition();
1933 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1935 jj_consume_token(INCR);
1936 operator = OperatorIds.PLUS_PLUS;
1939 jj_consume_token(DECR);
1940 operator = OperatorIds.MINUS_MINUS;
1943 jj_la1[52] = jj_gen;
1944 jj_consume_token(-1);
1945 throw new ParseException();
1947 expr = PrimaryExpression();
1948 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1949 throw new Error("Missing return statement in function");
1952 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
1954 final int pos = SimpleCharStream.getPosition();
1955 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1957 jj_consume_token(BANG);
1958 expr = UnaryExpression();
1959 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1962 jj_la1[53] = jj_gen;
1963 if (jj_2_4(2147483647)) {
1964 expr = CastExpression();
1965 {if (true) return expr;}
1967 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1973 expr = PostfixExpression();
1974 {if (true) return expr;}
1979 case INTEGER_LITERAL:
1980 case FLOATING_POINT_LITERAL:
1981 case STRING_LITERAL:
1983 {if (true) return expr;}
1986 jj_consume_token(LPAREN);
1987 expr = Expression();
1989 jj_consume_token(RPAREN);
1990 } catch (ParseException e) {
1991 errorMessage = "')' expected";
1993 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
1994 errorEnd = jj_input_stream.getPosition() + 1;
1995 {if (true) throw e;}
1997 {if (true) return expr;}
2000 jj_la1[54] = jj_gen;
2001 jj_consume_token(-1);
2002 throw new ParseException();
2006 throw new Error("Missing return statement in function");
2009 static final public CastExpression CastExpression() throws ParseException {
2010 final ConstantIdentifier type;
2011 final Expression expr;
2012 final int pos = SimpleCharStream.getPosition();
2013 jj_consume_token(LPAREN);
2014 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2027 jj_consume_token(ARRAY);
2028 type = new ConstantIdentifier(Types.ARRAY,pos,SimpleCharStream.getPosition());
2031 jj_la1[55] = jj_gen;
2032 jj_consume_token(-1);
2033 throw new ParseException();
2035 jj_consume_token(RPAREN);
2036 expr = UnaryExpression();
2037 {if (true) return new CastExpression(type,expr,pos,SimpleCharStream.getPosition());}
2038 throw new Error("Missing return statement in function");
2041 static final public Expression PostfixExpression() throws ParseException {
2044 final int pos = SimpleCharStream.getPosition();
2045 expr = PrimaryExpression();
2046 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2049 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2051 jj_consume_token(INCR);
2052 operator = OperatorIds.PLUS_PLUS;
2055 jj_consume_token(DECR);
2056 operator = OperatorIds.MINUS_MINUS;
2059 jj_la1[56] = jj_gen;
2060 jj_consume_token(-1);
2061 throw new ParseException();
2065 jj_la1[57] = jj_gen;
2068 if (operator == -1) {
2069 {if (true) return expr;}
2071 {if (true) return new PostfixedUnaryExpression(expr,operator,pos);}
2072 throw new Error("Missing return statement in function");
2075 static final public Expression PrimaryExpression() throws ParseException {
2076 final Token identifier;
2078 final StringBuffer buff = new StringBuffer();
2079 final int pos = SimpleCharStream.getPosition();
2081 identifier = jj_consume_token(IDENTIFIER);
2082 jj_consume_token(STATICCLASSACCESS);
2083 expr = ClassIdentifier();
2084 expr = new ClassAccess(new ConstantIdentifier(identifier.image.toCharArray(),
2086 SimpleCharStream.getPosition()),
2088 ClassAccess.STATIC);
2091 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2098 jj_la1[58] = jj_gen;
2101 expr = PrimarySuffix(expr);
2103 {if (true) return expr;}
2105 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2110 expr = PrimaryPrefix();
2113 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2120 jj_la1[59] = jj_gen;
2123 expr = PrimarySuffix(expr);
2125 {if (true) return expr;}
2128 expr = ArrayDeclarator();
2129 {if (true) return expr;}
2132 jj_la1[60] = jj_gen;
2133 jj_consume_token(-1);
2134 throw new ParseException();
2137 throw new Error("Missing return statement in function");
2140 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2141 final ArrayVariableDeclaration[] vars;
2142 final int pos = SimpleCharStream.getPosition();
2143 jj_consume_token(ARRAY);
2144 vars = ArrayInitializer();
2145 {if (true) return new ArrayInitializer(vars,pos,SimpleCharStream.getPosition());}
2146 throw new Error("Missing return statement in function");
2149 static final public Expression PrimaryPrefix() throws ParseException {
2150 final Expression expr;
2153 final int pos = SimpleCharStream.getPosition();
2154 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2156 token = jj_consume_token(IDENTIFIER);
2157 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2159 SimpleCharStream.getPosition());}
2162 jj_consume_token(NEW);
2163 expr = ClassIdentifier();
2164 {if (true) return new PrefixedUnaryExpression(expr,
2170 var = VariableDeclaratorId();
2171 {if (true) return new ConstantIdentifier(var.toCharArray(),
2173 SimpleCharStream.getPosition());}
2176 jj_la1[61] = jj_gen;
2177 jj_consume_token(-1);
2178 throw new ParseException();
2180 throw new Error("Missing return statement in function");
2183 static final public PrefixedUnaryExpression classInstantiation() throws ParseException {
2185 final StringBuffer buff;
2186 final int pos = SimpleCharStream.getPosition();
2187 jj_consume_token(NEW);
2188 expr = ClassIdentifier();
2189 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2195 buff = new StringBuffer(expr.toStringExpression());
2196 expr = PrimaryExpression();
2197 buff.append(expr.toStringExpression());
2198 expr = new ConstantIdentifier(buff.toString().toCharArray(),
2200 SimpleCharStream.getPosition());
2203 jj_la1[62] = jj_gen;
2206 {if (true) return new PrefixedUnaryExpression(expr,
2209 throw new Error("Missing return statement in function");
2212 static final public ConstantIdentifier ClassIdentifier() throws ParseException {
2215 final int pos = SimpleCharStream.getPosition();
2216 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2218 token = jj_consume_token(IDENTIFIER);
2219 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2221 SimpleCharStream.getPosition());}
2225 expr = VariableDeclaratorId();
2226 {if (true) return new ConstantIdentifier(expr.toCharArray(),
2228 SimpleCharStream.getPosition());}
2231 jj_la1[63] = jj_gen;
2232 jj_consume_token(-1);
2233 throw new ParseException();
2235 throw new Error("Missing return statement in function");
2238 static final public AbstractSuffixExpression PrimarySuffix(Expression prefix) throws ParseException {
2239 final AbstractSuffixExpression expr;
2240 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2242 expr = Arguments(prefix);
2243 {if (true) return expr;}
2247 expr = VariableSuffix(prefix);
2248 {if (true) return expr;}
2251 jj_la1[64] = jj_gen;
2252 jj_consume_token(-1);
2253 throw new ParseException();
2255 throw new Error("Missing return statement in function");
2258 static final public AbstractSuffixExpression VariableSuffix(Expression prefix) throws ParseException {
2260 final int pos = SimpleCharStream.getPosition();
2261 Expression expression = null;
2262 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2264 jj_consume_token(CLASSACCESS);
2266 expr = VariableName();
2267 } catch (ParseException e) {
2268 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2270 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2271 errorEnd = jj_input_stream.getPosition() + 1;
2272 {if (true) throw e;}
2274 {if (true) return new ClassAccess(prefix,
2275 new ConstantIdentifier(expr.toCharArray(),pos,SimpleCharStream.getPosition()),
2276 ClassAccess.NORMAL);}
2279 jj_consume_token(LBRACKET);
2280 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2305 case INTEGER_LITERAL:
2306 case FLOATING_POINT_LITERAL:
2307 case STRING_LITERAL:
2311 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2327 case INTEGER_LITERAL:
2328 case FLOATING_POINT_LITERAL:
2329 case STRING_LITERAL:
2333 expression = Expression();
2344 expression = Type();
2347 jj_la1[65] = jj_gen;
2348 jj_consume_token(-1);
2349 throw new ParseException();
2353 jj_la1[66] = jj_gen;
2357 jj_consume_token(RBRACKET);
2358 } catch (ParseException e) {
2359 errorMessage = "']' expected";
2361 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2362 errorEnd = jj_input_stream.getPosition() + 1;
2363 {if (true) throw e;}
2365 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2368 jj_la1[67] = jj_gen;
2369 jj_consume_token(-1);
2370 throw new ParseException();
2372 throw new Error("Missing return statement in function");
2375 static final public Literal Literal() throws ParseException {
2378 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2379 case INTEGER_LITERAL:
2380 token = jj_consume_token(INTEGER_LITERAL);
2381 pos = SimpleCharStream.getPosition();
2382 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2384 case FLOATING_POINT_LITERAL:
2385 token = jj_consume_token(FLOATING_POINT_LITERAL);
2386 pos = SimpleCharStream.getPosition();
2387 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2389 case STRING_LITERAL:
2390 token = jj_consume_token(STRING_LITERAL);
2391 pos = SimpleCharStream.getPosition();
2392 {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2395 jj_consume_token(TRUE);
2396 pos = SimpleCharStream.getPosition();
2397 {if (true) return new TrueLiteral(pos-4,pos);}
2400 jj_consume_token(FALSE);
2401 pos = SimpleCharStream.getPosition();
2402 {if (true) return new FalseLiteral(pos-4,pos);}
2405 jj_consume_token(NULL);
2406 pos = SimpleCharStream.getPosition();
2407 {if (true) return new NullLiteral(pos-4,pos);}
2410 jj_la1[68] = jj_gen;
2411 jj_consume_token(-1);
2412 throw new ParseException();
2414 throw new Error("Missing return statement in function");
2417 static final public FunctionCall Arguments(Expression func) throws ParseException {
2418 ArgumentDeclaration[] args = null;
2419 jj_consume_token(LPAREN);
2420 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2436 case INTEGER_LITERAL:
2437 case FLOATING_POINT_LITERAL:
2438 case STRING_LITERAL:
2442 args = ArgumentList();
2445 jj_la1[69] = jj_gen;
2449 jj_consume_token(RPAREN);
2450 } catch (ParseException e) {
2451 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2453 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2454 errorEnd = jj_input_stream.getPosition() + 1;
2455 {if (true) throw e;}
2457 {if (true) return new FunctionCall(func,args,SimpleCharStream.getPosition());}
2458 throw new Error("Missing return statement in function");
2461 static final public ArgumentDeclaration[] ArgumentList() throws ParseException {
2463 final ArrayList list = new ArrayList();
2464 expr = Expression();
2468 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2473 jj_la1[70] = jj_gen;
2476 jj_consume_token(COMMA);
2478 expr = Expression();
2480 } catch (ParseException e) {
2481 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2483 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2484 errorEnd = jj_input_stream.getPosition() + 1;
2485 {if (true) throw e;}
2488 {if (true) return (ArgumentDeclaration[]) list.toArray();}
2489 throw new Error("Missing return statement in function");
2493 * A Statement without break.
2495 static final public Statement StatementNoBreak() throws ParseException {
2496 final Statement statement;
2499 statement = Expression();
2501 jj_consume_token(SEMICOLON);
2502 } catch (ParseException e) {
2503 if (e.currentToken.next.kind != 4) {
2504 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2506 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2507 errorEnd = jj_input_stream.getPosition() + 1;
2508 {if (true) throw e;}
2511 {if (true) return statement;}
2512 } else if (jj_2_7(2)) {
2513 statement = LabeledStatement();
2514 {if (true) return statement;}
2516 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2518 statement = Block();
2519 {if (true) return statement;}
2522 statement = EmptyStatement();
2523 {if (true) return statement;}
2532 statement = StatementExpression();
2534 jj_consume_token(SEMICOLON);
2535 } catch (ParseException e) {
2536 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2538 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2539 errorEnd = jj_input_stream.getPosition() + 1;
2540 {if (true) throw e;}
2542 {if (true) return statement;}
2545 statement = SwitchStatement();
2546 {if (true) return statement;}
2549 statement = IfStatement();
2550 {if (true) return statement;}
2553 statement = WhileStatement();
2554 {if (true) return statement;}
2557 statement = DoStatement();
2558 {if (true) return statement;}
2561 statement = ForStatement();
2562 {if (true) return statement;}
2565 statement = ForeachStatement();
2566 {if (true) return statement;}
2569 statement = ContinueStatement();
2570 {if (true) return statement;}
2573 statement = ReturnStatement();
2574 {if (true) return statement;}
2577 statement = EchoStatement();
2578 {if (true) return statement;}
2585 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2587 token = jj_consume_token(AT);
2590 jj_la1[71] = jj_gen;
2593 statement = IncludeStatement();
2594 if (token != null) {
2595 ((InclusionStatement)statement).silent = true;
2597 {if (true) return statement;}
2600 statement = StaticStatement();
2601 {if (true) return statement;}
2604 statement = GlobalStatement();
2605 {if (true) return statement;}
2608 jj_la1[72] = jj_gen;
2609 jj_consume_token(-1);
2610 throw new ParseException();
2613 throw new Error("Missing return statement in function");
2617 * A Normal statement.
2619 static final public Statement Statement() throws ParseException {
2620 final Statement statement;
2621 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2652 case INTEGER_LITERAL:
2653 case FLOATING_POINT_LITERAL:
2654 case STRING_LITERAL:
2660 statement = StatementNoBreak();
2661 {if (true) return statement;}
2664 statement = BreakStatement();
2665 {if (true) return statement;}
2668 jj_la1[73] = jj_gen;
2669 jj_consume_token(-1);
2670 throw new ParseException();
2672 throw new Error("Missing return statement in function");
2676 * An html block inside a php syntax.
2678 static final public HTMLBlock htmlBlock() throws ParseException {
2679 final int startIndex = nodePtr;
2680 AstNode[] blockNodes;
2682 jj_consume_token(PHPEND);
2685 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2690 jj_la1[74] = jj_gen;
2696 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2698 jj_consume_token(PHPSTARTLONG);
2701 jj_consume_token(PHPSTARTSHORT);
2704 jj_la1[75] = jj_gen;
2705 jj_consume_token(-1);
2706 throw new ParseException();
2708 } catch (ParseException e) {
2709 errorMessage = "End of file unexpected, '<?php' expected";
2711 errorStart = jj_input_stream.getPosition();
2712 errorEnd = jj_input_stream.getPosition();
2713 {if (true) throw e;}
2715 nbNodes = nodePtr-startIndex;
2716 blockNodes = new AstNode[nbNodes];
2717 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2718 {if (true) return new HTMLBlock(nodes);}
2719 throw new Error("Missing return statement in function");
2723 * An include statement. It's "include" an expression;
2725 static final public InclusionStatement IncludeStatement() throws ParseException {
2726 final Expression expr;
2729 final int pos = jj_input_stream.getPosition();
2730 final InclusionStatement inclusionStatement;
2731 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2733 jj_consume_token(REQUIRE);
2734 keyword = InclusionStatement.REQUIRE;
2737 jj_consume_token(REQUIRE_ONCE);
2738 keyword = InclusionStatement.REQUIRE_ONCE;
2741 jj_consume_token(INCLUDE);
2742 keyword = InclusionStatement.INCLUDE;
2745 jj_consume_token(INCLUDE_ONCE);
2746 keyword = InclusionStatement.INCLUDE_ONCE;
2749 jj_la1[76] = jj_gen;
2750 jj_consume_token(-1);
2751 throw new ParseException();
2754 expr = Expression();
2755 } catch (ParseException e) {
2756 if (errorMessage != null) {
2757 {if (true) throw e;}
2759 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
2761 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2762 errorEnd = jj_input_stream.getPosition() + 1;
2763 {if (true) throw e;}
2765 inclusionStatement = new InclusionStatement(currentSegment,
2769 currentSegment.add(inclusionStatement);
2771 jj_consume_token(SEMICOLON);
2772 } catch (ParseException e) {
2773 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2775 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2776 errorEnd = jj_input_stream.getPosition() + 1;
2777 {if (true) throw e;}
2779 {if (true) return inclusionStatement;}
2780 throw new Error("Missing return statement in function");
2783 static final public PrintExpression PrintExpression() throws ParseException {
2784 final Expression expr;
2785 final int pos = SimpleCharStream.getPosition();
2786 jj_consume_token(PRINT);
2787 expr = Expression();
2788 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
2789 throw new Error("Missing return statement in function");
2792 static final public ListExpression ListExpression() throws ParseException {
2794 Expression expression = null;
2795 ArrayList list = new ArrayList();
2796 final int pos = SimpleCharStream.getPosition();
2797 jj_consume_token(LIST);
2799 jj_consume_token(LPAREN);
2800 } catch (ParseException e) {
2801 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2803 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2804 errorEnd = jj_input_stream.getPosition() + 1;
2805 {if (true) throw e;}
2807 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2810 expr = VariableDeclaratorId();
2814 jj_la1[77] = jj_gen;
2817 if (expr == null) list.add(null);
2820 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2825 jj_la1[78] = jj_gen;
2829 jj_consume_token(COMMA);
2830 } catch (ParseException e) {
2831 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2833 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2834 errorEnd = jj_input_stream.getPosition() + 1;
2835 {if (true) throw e;}
2837 expr = VariableDeclaratorId();
2841 jj_consume_token(RPAREN);
2842 } catch (ParseException e) {
2843 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2845 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2846 errorEnd = jj_input_stream.getPosition() + 1;
2847 {if (true) throw e;}
2849 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2851 jj_consume_token(ASSIGN);
2852 expression = Expression();
2853 {if (true) return new ListExpression((String[]) list.toArray(),expression,pos,SimpleCharStream.getPosition());}
2856 jj_la1[79] = jj_gen;
2859 {if (true) return new ListExpression((String[]) list.toArray(),null,pos,SimpleCharStream.getPosition());}
2860 throw new Error("Missing return statement in function");
2864 * An echo statement.
2865 * echo anyexpression (, otherexpression)*
2867 static final public EchoStatement EchoStatement() throws ParseException {
2868 final ArrayList expressions = new ArrayList();
2870 final int pos = SimpleCharStream.getPosition();
2871 jj_consume_token(ECHO);
2872 expr = Expression();
2873 expressions.add(expr);
2876 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2881 jj_la1[80] = jj_gen;
2884 jj_consume_token(COMMA);
2885 expr = Expression();
2886 expressions.add(expr);
2889 jj_consume_token(SEMICOLON);
2890 {if (true) return new EchoStatement((Expression[]) expressions.toArray(),pos);}
2891 } catch (ParseException e) {
2892 if (e.currentToken.next.kind != 4) {
2893 errorMessage = "';' expected after 'echo' statement";
2895 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2896 errorEnd = jj_input_stream.getPosition() + 1;
2897 {if (true) throw e;}
2900 throw new Error("Missing return statement in function");
2903 static final public GlobalStatement GlobalStatement() throws ParseException {
2904 final int pos = jj_input_stream.getPosition();
2906 ArrayList vars = new ArrayList();
2907 GlobalStatement global;
2908 jj_consume_token(GLOBAL);
2909 expr = VariableDeclaratorId();
2913 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2918 jj_la1[81] = jj_gen;
2921 jj_consume_token(COMMA);
2922 expr = VariableDeclaratorId();
2926 jj_consume_token(SEMICOLON);
2927 global = new GlobalStatement(currentSegment,
2928 (String[]) vars.toArray(),
2930 SimpleCharStream.getPosition());
2931 currentSegment.add(global);
2932 {if (true) return global;}
2933 } catch (ParseException e) {
2934 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
2936 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2937 errorEnd = jj_input_stream.getPosition() + 1;
2938 {if (true) throw e;}
2940 throw new Error("Missing return statement in function");
2943 static final public StaticStatement StaticStatement() throws ParseException {
2944 final int pos = SimpleCharStream.getPosition();
2945 final ArrayList vars = new ArrayList();
2946 VariableDeclaration expr;
2947 jj_consume_token(STATIC);
2948 expr = VariableDeclarator();
2949 vars.add(new String(expr.name));
2952 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2957 jj_la1[82] = jj_gen;
2960 jj_consume_token(COMMA);
2961 expr = VariableDeclarator();
2962 vars.add(new String(expr.name));
2965 jj_consume_token(SEMICOLON);
2966 {if (true) return new StaticStatement((String[])vars.toArray(),
2968 SimpleCharStream.getPosition());}
2969 } catch (ParseException e) {
2970 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
2972 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
2973 errorEnd = jj_input_stream.getPosition() + 1;
2974 {if (true) throw e;}
2976 throw new Error("Missing return statement in function");
2979 static final public LabeledStatement LabeledStatement() throws ParseException {
2980 final int pos = SimpleCharStream.getPosition();
2982 final Statement statement;
2983 label = jj_consume_token(IDENTIFIER);
2984 jj_consume_token(COLON);
2985 statement = Statement();
2986 {if (true) return new LabeledStatement(label.image.toCharArray(),statement,pos,SimpleCharStream.getPosition());}
2987 throw new Error("Missing return statement in function");
2997 static final public Block Block() throws ParseException {
2998 final int pos = SimpleCharStream.getPosition();
3000 jj_consume_token(LBRACE);
3001 } catch (ParseException e) {
3002 errorMessage = "'{' expected";
3004 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3005 errorEnd = jj_input_stream.getPosition() + 1;
3006 {if (true) throw e;}
3010 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3045 case INTEGER_LITERAL:
3046 case FLOATING_POINT_LITERAL:
3047 case STRING_LITERAL:
3056 jj_la1[83] = jj_gen;
3059 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3093 case INTEGER_LITERAL:
3094 case FLOATING_POINT_LITERAL:
3095 case STRING_LITERAL:
3107 jj_la1[84] = jj_gen;
3108 jj_consume_token(-1);
3109 throw new ParseException();
3113 jj_consume_token(RBRACE);
3114 } catch (ParseException e) {
3115 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3117 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3118 errorEnd = jj_input_stream.getPosition() + 1;
3119 {if (true) throw e;}
3121 throw new Error("Missing return statement in function");
3124 static final public Statement BlockStatement() throws ParseException {
3125 final Statement statement;
3126 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3158 case INTEGER_LITERAL:
3159 case FLOATING_POINT_LITERAL:
3160 case STRING_LITERAL:
3166 statement = Statement();
3167 {if (true) return statement;}
3170 statement = ClassDeclaration();
3171 {if (true) return statement;}
3174 statement = MethodDeclaration();
3175 {if (true) return statement;}
3178 jj_la1[85] = jj_gen;
3179 jj_consume_token(-1);
3180 throw new ParseException();
3182 throw new Error("Missing return statement in function");
3186 * A Block statement that will not contain any 'break'
3188 static final public Statement BlockStatementNoBreak() throws ParseException {
3189 final Statement statement;
3190 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3221 case INTEGER_LITERAL:
3222 case FLOATING_POINT_LITERAL:
3223 case STRING_LITERAL:
3229 statement = StatementNoBreak();
3230 {if (true) return statement;}
3233 statement = ClassDeclaration();
3234 {if (true) return statement;}
3237 statement = MethodDeclaration();
3238 {if (true) return statement;}
3241 jj_la1[86] = jj_gen;
3242 jj_consume_token(-1);
3243 throw new ParseException();
3245 throw new Error("Missing return statement in function");
3248 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3249 final ArrayList list = new ArrayList();
3250 VariableDeclaration var;
3251 var = LocalVariableDeclarator();
3255 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3260 jj_la1[87] = jj_gen;
3263 jj_consume_token(COMMA);
3264 var = LocalVariableDeclarator();
3267 {if (true) return (VariableDeclaration[]) list.toArray();}
3268 throw new Error("Missing return statement in function");
3271 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3272 final String varName;
3273 Expression init = null;
3274 final int pos = SimpleCharStream.getPosition();
3275 varName = VariableDeclaratorId();
3276 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3278 jj_consume_token(ASSIGN);
3279 init = Expression();
3282 jj_la1[88] = jj_gen;
3285 {if (true) return new VariableDeclaration(varName.toCharArray(),init,pos);}
3286 throw new Error("Missing return statement in function");
3289 static final public EmptyStatement EmptyStatement() throws ParseException {
3291 jj_consume_token(SEMICOLON);
3292 pos = SimpleCharStream.getPosition();
3293 {if (true) return new EmptyStatement(pos-1,pos);}
3294 throw new Error("Missing return statement in function");
3297 static final public Statement StatementExpression() throws ParseException {
3299 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3302 expr = PreIncDecExpression();
3303 {if (true) return expr;}
3310 expr = PrimaryExpression();
3311 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3326 case RSIGNEDSHIFTASSIGN:
3327 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3329 jj_consume_token(INCR);
3330 expr = new PostfixedUnaryExpression(expr,
3331 OperatorIds.PLUS_PLUS,
3332 SimpleCharStream.getPosition());
3335 jj_consume_token(DECR);
3336 expr = new PostfixedUnaryExpression(expr,
3337 OperatorIds.MINUS_MINUS,
3338 SimpleCharStream.getPosition());
3352 case RSIGNEDSHIFTASSIGN:
3353 AssignmentOperator();
3357 jj_la1[89] = jj_gen;
3358 jj_consume_token(-1);
3359 throw new ParseException();
3363 jj_la1[90] = jj_gen;
3368 jj_la1[91] = jj_gen;
3369 jj_consume_token(-1);
3370 throw new ParseException();
3372 throw new Error("Missing return statement in function");
3375 static final public SwitchStatement SwitchStatement() throws ParseException {
3376 final Expression variable;
3377 final AbstractCase[] cases;
3378 final int pos = SimpleCharStream.getPosition();
3379 jj_consume_token(SWITCH);
3381 jj_consume_token(LPAREN);
3382 } catch (ParseException e) {
3383 errorMessage = "'(' expected after 'switch'";
3385 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3386 errorEnd = jj_input_stream.getPosition() + 1;
3387 {if (true) throw e;}
3390 variable = Expression();
3391 } catch (ParseException e) {
3392 if (errorMessage != null) {
3393 {if (true) throw e;}
3395 errorMessage = "expression expected";
3397 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3398 errorEnd = jj_input_stream.getPosition() + 1;
3399 {if (true) throw e;}
3402 jj_consume_token(RPAREN);
3403 } catch (ParseException e) {
3404 errorMessage = "')' expected";
3406 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3407 errorEnd = jj_input_stream.getPosition() + 1;
3408 {if (true) throw e;}
3410 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3412 cases = switchStatementBrace();
3415 cases = switchStatementColon(pos, pos + 6);
3418 jj_la1[92] = jj_gen;
3419 jj_consume_token(-1);
3420 throw new ParseException();
3422 {if (true) return new SwitchStatement(variable,cases,pos,SimpleCharStream.getPosition());}
3423 throw new Error("Missing return statement in function");
3426 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3428 final ArrayList cases = new ArrayList();
3429 jj_consume_token(LBRACE);
3432 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3438 jj_la1[93] = jj_gen;
3441 cas = switchLabel0();
3445 jj_consume_token(RBRACE);
3446 {if (true) return (AbstractCase[]) cases.toArray();}
3447 } catch (ParseException e) {
3448 errorMessage = "'}' expected";
3450 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3451 errorEnd = jj_input_stream.getPosition() + 1;
3452 {if (true) throw e;}
3454 throw new Error("Missing return statement in function");
3458 * A Switch statement with : ... endswitch;
3459 * @param start the begin offset of the switch
3460 * @param end the end offset of the switch
3462 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3464 final ArrayList cases = new ArrayList();
3465 jj_consume_token(COLON);
3467 setMarker(fileToParse,
3468 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3472 "Line " + token.beginLine);
3473 } catch (CoreException e) {
3474 PHPeclipsePlugin.log(e);
3478 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3484 jj_la1[94] = jj_gen;
3487 cas = switchLabel0();
3491 jj_consume_token(ENDSWITCH);
3492 } catch (ParseException e) {
3493 errorMessage = "'endswitch' expected";
3495 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3496 errorEnd = jj_input_stream.getPosition() + 1;
3497 {if (true) throw e;}
3500 jj_consume_token(SEMICOLON);
3501 {if (true) return (AbstractCase[]) cases.toArray();}
3502 } catch (ParseException e) {
3503 errorMessage = "';' expected after 'endswitch' keyword";
3505 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3506 errorEnd = jj_input_stream.getPosition() + 1;
3507 {if (true) throw e;}
3509 throw new Error("Missing return statement in function");
3512 static final public AbstractCase switchLabel0() throws ParseException {
3513 final Expression expr;
3514 Statement statement;
3515 final ArrayList stmts = new ArrayList();
3516 final int pos = SimpleCharStream.getPosition();
3517 expr = SwitchLabel();
3520 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3554 case INTEGER_LITERAL:
3555 case FLOATING_POINT_LITERAL:
3556 case STRING_LITERAL:
3565 jj_la1[95] = jj_gen;
3568 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3601 case INTEGER_LITERAL:
3602 case FLOATING_POINT_LITERAL:
3603 case STRING_LITERAL:
3609 statement = BlockStatementNoBreak();
3610 stmts.add(statement);
3613 statement = htmlBlock();
3614 stmts.add(statement);
3617 jj_la1[96] = jj_gen;
3618 jj_consume_token(-1);
3619 throw new ParseException();
3622 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3624 statement = BreakStatement();
3625 stmts.add(statement);
3628 jj_la1[97] = jj_gen;
3631 if (expr == null) {//it's a default
3632 {if (true) return new DefaultCase((Statement[]) stmts.toArray(),pos,SimpleCharStream.getPosition());}
3634 {if (true) return new Case(expr,(Statement[]) stmts.toArray(),pos,SimpleCharStream.getPosition());}
3635 throw new Error("Missing return statement in function");
3640 * case Expression() :
3642 * @return the if it was a case and null if not
3644 static final public Expression SwitchLabel() throws ParseException {
3646 final Expression expr;
3647 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3649 token = jj_consume_token(CASE);
3651 expr = Expression();
3652 } catch (ParseException e) {
3653 if (errorMessage != null) {if (true) throw e;}
3654 errorMessage = "expression expected after 'case' keyword";
3656 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3657 errorEnd = jj_input_stream.getPosition() + 1;
3658 {if (true) throw e;}
3661 jj_consume_token(COLON);
3662 {if (true) return expr;}
3663 } catch (ParseException e) {
3664 errorMessage = "':' expected after case expression";
3666 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3667 errorEnd = jj_input_stream.getPosition() + 1;
3668 {if (true) throw e;}
3672 token = jj_consume_token(_DEFAULT);
3674 jj_consume_token(COLON);
3675 {if (true) return null;}
3676 } catch (ParseException e) {
3677 errorMessage = "':' expected after 'default' keyword";
3679 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3680 errorEnd = jj_input_stream.getPosition() + 1;
3681 {if (true) throw e;}
3685 jj_la1[98] = jj_gen;
3686 jj_consume_token(-1);
3687 throw new ParseException();
3689 throw new Error("Missing return statement in function");
3692 static final public Break BreakStatement() throws ParseException {
3693 Expression expression = null;
3694 final int start = SimpleCharStream.getPosition();
3695 jj_consume_token(BREAK);
3696 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3712 case INTEGER_LITERAL:
3713 case FLOATING_POINT_LITERAL:
3714 case STRING_LITERAL:
3718 expression = Expression();
3721 jj_la1[99] = jj_gen;
3725 jj_consume_token(SEMICOLON);
3726 } catch (ParseException e) {
3727 errorMessage = "';' expected after 'break' keyword";
3729 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3730 errorEnd = jj_input_stream.getPosition() + 1;
3731 {if (true) throw e;}
3733 {if (true) return new Break(expression, start, SimpleCharStream.getPosition());}
3734 throw new Error("Missing return statement in function");
3737 static final public IfStatement IfStatement() throws ParseException {
3738 final int pos = jj_input_stream.getPosition();
3739 Expression condition;
3740 IfStatement ifStatement;
3741 jj_consume_token(IF);
3742 condition = Condition("if");
3743 ifStatement = IfStatement0(condition, pos,pos+2);
3744 {if (true) return ifStatement;}
3745 throw new Error("Missing return statement in function");
3748 static final public Expression Condition(final String keyword) throws ParseException {
3749 final Expression condition;
3751 jj_consume_token(LPAREN);
3752 } catch (ParseException e) {
3753 errorMessage = "'(' expected after " + keyword + " keyword";
3755 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length();
3756 errorEnd = errorStart +1;
3757 processParseException(e);
3759 condition = Expression();
3761 jj_consume_token(RPAREN);
3762 {if (true) return condition;}
3763 } catch (ParseException e) {
3764 errorMessage = "')' expected after " + keyword + " keyword";
3766 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3767 errorEnd = jj_input_stream.getPosition() + 1;
3768 {if (true) throw e;}
3770 throw new Error("Missing return statement in function");
3773 static final public IfStatement IfStatement0(Expression condition, final int start,final int end) throws ParseException {
3774 Statement statement;
3775 ElseIf elseifStatement;
3776 Else elseStatement = null;
3777 ArrayList stmts = new ArrayList();
3778 ArrayList elseifs = new ArrayList();
3779 int pos = SimpleCharStream.getPosition();
3780 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3782 jj_consume_token(COLON);
3785 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3818 case INTEGER_LITERAL:
3819 case FLOATING_POINT_LITERAL:
3820 case STRING_LITERAL:
3829 jj_la1[100] = jj_gen;
3832 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3864 case INTEGER_LITERAL:
3865 case FLOATING_POINT_LITERAL:
3866 case STRING_LITERAL:
3872 statement = Statement();
3873 stmts.add(statement);
3876 statement = htmlBlock();
3877 stmts.add(statement);
3880 jj_la1[101] = jj_gen;
3881 jj_consume_token(-1);
3882 throw new ParseException();
3887 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3892 jj_la1[102] = jj_gen;
3895 elseifStatement = ElseIfStatementColon();
3896 elseifs.add(elseifStatement);
3898 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3900 elseStatement = ElseStatementColon();
3903 jj_la1[103] = jj_gen;
3907 setMarker(fileToParse,
3908 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
3912 "Line " + token.beginLine);
3913 } catch (CoreException e) {
3914 PHPeclipsePlugin.log(e);
3917 jj_consume_token(ENDIF);
3918 } catch (ParseException e) {
3919 errorMessage = "'endif' expected";
3921 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3922 errorEnd = jj_input_stream.getPosition() + 1;
3923 {if (true) throw e;}
3926 jj_consume_token(SEMICOLON);
3927 {if (true) return new IfStatement(condition,
3928 (ElseIf[]) elseifs.toArray(),
3931 SimpleCharStream.getPosition());}
3932 } catch (ParseException e) {
3933 errorMessage = "';' expected after 'endif' keyword";
3935 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
3936 errorEnd = jj_input_stream.getPosition() + 1;
3937 {if (true) throw e;}
3972 case INTEGER_LITERAL:
3973 case FLOATING_POINT_LITERAL:
3974 case STRING_LITERAL:
3980 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4012 case INTEGER_LITERAL:
4013 case FLOATING_POINT_LITERAL:
4014 case STRING_LITERAL:
4020 statement = Statement();
4023 statement = htmlBlock();
4026 jj_la1[104] = jj_gen;
4027 jj_consume_token(-1);
4028 throw new ParseException();
4030 stmts.add(statement);
4033 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4038 jj_la1[105] = jj_gen;
4041 elseifStatement = ElseIfStatement();
4042 elseifs.add(elseifStatement);
4044 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4046 jj_consume_token(ELSE);
4048 pos = SimpleCharStream.getPosition();
4049 statement = Statement();
4050 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4051 } catch (ParseException e) {
4052 if (errorMessage != null) {
4053 {if (true) throw e;}
4055 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4057 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4058 errorEnd = jj_input_stream.getPosition() + 1;
4059 {if (true) throw e;}
4063 jj_la1[106] = jj_gen;
4066 {if (true) return new IfStatement(condition,
4067 (ElseIf[]) elseifs.toArray(),
4070 SimpleCharStream.getPosition());}
4073 jj_la1[107] = jj_gen;
4074 jj_consume_token(-1);
4075 throw new ParseException();
4077 throw new Error("Missing return statement in function");
4080 static final public ElseIf ElseIfStatementColon() throws ParseException {
4081 Expression condition;
4082 Statement statement;
4083 final ArrayList list = new ArrayList();
4084 final int pos = SimpleCharStream.getPosition();
4085 jj_consume_token(ELSEIF);
4086 condition = Condition("elseif");
4087 jj_consume_token(COLON);
4090 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4123 case INTEGER_LITERAL:
4124 case FLOATING_POINT_LITERAL:
4125 case STRING_LITERAL:
4134 jj_la1[108] = jj_gen;
4137 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4169 case INTEGER_LITERAL:
4170 case FLOATING_POINT_LITERAL:
4171 case STRING_LITERAL:
4177 statement = Statement();
4178 list.add(statement);
4181 statement = htmlBlock();
4182 list.add(statement);
4185 jj_la1[109] = jj_gen;
4186 jj_consume_token(-1);
4187 throw new ParseException();
4190 {if (true) return new ElseIf(condition,(Statement[]) list.toArray(),pos,SimpleCharStream.getPosition());}
4191 throw new Error("Missing return statement in function");
4194 static final public Else ElseStatementColon() throws ParseException {
4195 Statement statement;
4196 final ArrayList list = new ArrayList();
4197 final int pos = SimpleCharStream.getPosition();
4198 jj_consume_token(ELSE);
4199 jj_consume_token(COLON);
4202 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4235 case INTEGER_LITERAL:
4236 case FLOATING_POINT_LITERAL:
4237 case STRING_LITERAL:
4246 jj_la1[110] = jj_gen;
4249 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4281 case INTEGER_LITERAL:
4282 case FLOATING_POINT_LITERAL:
4283 case STRING_LITERAL:
4289 statement = Statement();
4290 list.add(statement);
4293 statement = htmlBlock();
4294 list.add(statement);
4297 jj_la1[111] = jj_gen;
4298 jj_consume_token(-1);
4299 throw new ParseException();
4302 {if (true) return new Else((Statement[]) list.toArray(),pos,SimpleCharStream.getPosition());}
4303 throw new Error("Missing return statement in function");
4306 static final public ElseIf ElseIfStatement() throws ParseException {
4307 Expression condition;
4308 Statement statement;
4309 final ArrayList list = new ArrayList();
4310 final int pos = SimpleCharStream.getPosition();
4311 jj_consume_token(ELSEIF);
4312 condition = Condition("elseif");
4313 statement = Statement();
4314 list.add(statement);/*todo:do better*/
4315 {if (true) return new ElseIf(condition,(Statement[]) list.toArray(),pos,SimpleCharStream.getPosition());}
4316 throw new Error("Missing return statement in function");
4319 static final public WhileStatement WhileStatement() throws ParseException {
4320 final Expression condition;
4321 final Statement action;
4322 final int pos = SimpleCharStream.getPosition();
4323 jj_consume_token(WHILE);
4324 condition = Condition("while");
4325 action = WhileStatement0(pos,pos + 5);
4326 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4327 throw new Error("Missing return statement in function");
4330 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4331 Statement statement;
4332 final ArrayList stmts = new ArrayList();
4333 final int pos = SimpleCharStream.getPosition();
4334 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4336 jj_consume_token(COLON);
4339 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4371 case INTEGER_LITERAL:
4372 case FLOATING_POINT_LITERAL:
4373 case STRING_LITERAL:
4382 jj_la1[112] = jj_gen;
4385 statement = Statement();
4386 stmts.add(statement);
4389 setMarker(fileToParse,
4390 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4394 "Line " + token.beginLine);
4395 } catch (CoreException e) {
4396 PHPeclipsePlugin.log(e);
4399 jj_consume_token(ENDWHILE);
4400 } catch (ParseException e) {
4401 errorMessage = "'endwhile' expected";
4403 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4404 errorEnd = jj_input_stream.getPosition() + 1;
4405 {if (true) throw e;}
4408 jj_consume_token(SEMICOLON);
4409 {if (true) return new Block((Statement[]) stmts.toArray(),pos,SimpleCharStream.getPosition());}
4410 } catch (ParseException e) {
4411 errorMessage = "';' expected after 'endwhile' keyword";
4413 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4414 errorEnd = jj_input_stream.getPosition() + 1;
4415 {if (true) throw e;}
4449 case INTEGER_LITERAL:
4450 case FLOATING_POINT_LITERAL:
4451 case STRING_LITERAL:
4457 statement = Statement();
4458 {if (true) return statement;}
4461 jj_la1[113] = jj_gen;
4462 jj_consume_token(-1);
4463 throw new ParseException();
4465 throw new Error("Missing return statement in function");
4468 static final public DoStatement DoStatement() throws ParseException {
4469 final Statement action;
4470 final Expression condition;
4471 final int pos = SimpleCharStream.getPosition();
4472 jj_consume_token(DO);
4473 action = Statement();
4474 jj_consume_token(WHILE);
4475 condition = Condition("while");
4477 jj_consume_token(SEMICOLON);
4478 {if (true) return new DoStatement(condition,action,pos,SimpleCharStream.getPosition());}
4479 } catch (ParseException e) {
4480 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4482 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4483 errorEnd = jj_input_stream.getPosition() + 1;
4484 {if (true) throw e;}
4486 throw new Error("Missing return statement in function");
4489 static final public ForeachStatement ForeachStatement() throws ParseException {
4490 Statement statement;
4491 Expression expression;
4492 final StringBuffer buff = new StringBuffer();
4493 final int pos = SimpleCharStream.getPosition();
4494 ArrayVariableDeclaration variable;
4495 jj_consume_token(FOREACH);
4497 jj_consume_token(LPAREN);
4498 } catch (ParseException e) {
4499 errorMessage = "'(' expected after 'foreach' keyword";
4501 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4502 errorEnd = jj_input_stream.getPosition() + 1;
4503 {if (true) throw e;}
4506 expression = Expression();
4507 } catch (ParseException e) {
4508 errorMessage = "variable expected";
4510 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4511 errorEnd = jj_input_stream.getPosition() + 1;
4512 {if (true) throw e;}
4515 jj_consume_token(AS);
4516 } catch (ParseException e) {
4517 errorMessage = "'as' expected";
4519 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4520 errorEnd = jj_input_stream.getPosition() + 1;
4521 {if (true) throw e;}
4524 variable = ArrayVariable();
4525 } catch (ParseException e) {
4526 errorMessage = "variable expected";
4528 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4529 errorEnd = jj_input_stream.getPosition() + 1;
4530 {if (true) throw e;}
4533 jj_consume_token(RPAREN);
4534 } catch (ParseException e) {
4535 errorMessage = "')' expected after 'foreach' keyword";
4537 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4538 errorEnd = jj_input_stream.getPosition() + 1;
4539 {if (true) throw e;}
4542 statement = Statement();
4543 } catch (ParseException e) {
4544 if (errorMessage != null) {if (true) throw e;}
4545 errorMessage = "statement expected";
4547 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4548 errorEnd = jj_input_stream.getPosition() + 1;
4549 {if (true) throw e;}
4551 {if (true) return new ForeachStatement(expression,
4555 SimpleCharStream.getPosition());}
4556 throw new Error("Missing return statement in function");
4559 static final public ForStatement ForStatement() throws ParseException {
4561 final int pos = SimpleCharStream.getPosition();
4562 Statement[] initializations = null;
4563 Expression condition = null;
4564 Statement[] increments = null;
4566 final ArrayList list = new ArrayList();
4567 final int startBlock, endBlock;
4568 token = jj_consume_token(FOR);
4570 jj_consume_token(LPAREN);
4571 } catch (ParseException e) {
4572 errorMessage = "'(' expected after 'for' keyword";
4574 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4575 errorEnd = jj_input_stream.getPosition() + 1;
4576 {if (true) throw e;}
4578 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4586 initializations = ForInit();
4589 jj_la1[114] = jj_gen;
4592 jj_consume_token(SEMICOLON);
4593 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4609 case INTEGER_LITERAL:
4610 case FLOATING_POINT_LITERAL:
4611 case STRING_LITERAL:
4615 condition = Expression();
4618 jj_la1[115] = jj_gen;
4621 jj_consume_token(SEMICOLON);
4622 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4630 increments = StatementExpressionList();
4633 jj_la1[116] = jj_gen;
4636 jj_consume_token(RPAREN);
4637 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4669 case INTEGER_LITERAL:
4670 case FLOATING_POINT_LITERAL:
4671 case STRING_LITERAL:
4677 action = Statement();
4678 {if (true) return new ForStatement(initializations,condition,increments,action,pos,SimpleCharStream.getPosition());}
4681 jj_consume_token(COLON);
4682 startBlock = SimpleCharStream.getPosition();
4685 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4717 case INTEGER_LITERAL:
4718 case FLOATING_POINT_LITERAL:
4719 case STRING_LITERAL:
4728 jj_la1[117] = jj_gen;
4731 action = Statement();
4735 setMarker(fileToParse,
4736 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
4738 pos+token.image.length(),
4740 "Line " + token.beginLine);
4741 } catch (CoreException e) {
4742 PHPeclipsePlugin.log(e);
4744 endBlock = SimpleCharStream.getPosition();
4746 jj_consume_token(ENDFOR);
4747 } catch (ParseException e) {
4748 errorMessage = "'endfor' expected";
4750 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4751 errorEnd = jj_input_stream.getPosition() + 1;
4752 {if (true) throw e;}
4755 jj_consume_token(SEMICOLON);
4756 {if (true) return new ForStatement(initializations,condition,increments,new Block((Statement[])list.toArray(),startBlock,endBlock),pos,SimpleCharStream.getPosition());}
4757 } catch (ParseException e) {
4758 errorMessage = "';' expected after 'endfor' keyword";
4760 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4761 errorEnd = jj_input_stream.getPosition() + 1;
4762 {if (true) throw e;}
4766 jj_la1[118] = jj_gen;
4767 jj_consume_token(-1);
4768 throw new ParseException();
4770 throw new Error("Missing return statement in function");
4773 static final public Statement[] ForInit() throws ParseException {
4774 Statement[] statements;
4775 if (jj_2_8(2147483647)) {
4776 statements = LocalVariableDeclaration();
4777 {if (true) return statements;}
4779 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4787 statements = StatementExpressionList();
4788 {if (true) return statements;}
4791 jj_la1[119] = jj_gen;
4792 jj_consume_token(-1);
4793 throw new ParseException();
4796 throw new Error("Missing return statement in function");
4799 static final public Statement[] StatementExpressionList() throws ParseException {
4800 final ArrayList list = new ArrayList();
4802 expr = StatementExpression();
4806 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4811 jj_la1[120] = jj_gen;
4814 jj_consume_token(COMMA);
4815 StatementExpression();
4818 {if (true) return (Statement[]) list.toArray();}
4819 throw new Error("Missing return statement in function");
4822 static final public Continue ContinueStatement() throws ParseException {
4823 Expression expr = null;
4824 final int pos = SimpleCharStream.getPosition();
4825 jj_consume_token(CONTINUE);
4826 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4842 case INTEGER_LITERAL:
4843 case FLOATING_POINT_LITERAL:
4844 case STRING_LITERAL:
4848 expr = Expression();
4851 jj_la1[121] = jj_gen;
4855 jj_consume_token(SEMICOLON);
4856 {if (true) return new Continue(expr,pos,SimpleCharStream.getPosition());}
4857 } catch (ParseException e) {
4858 errorMessage = "';' expected after 'continue' statement";
4860 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4861 errorEnd = jj_input_stream.getPosition() + 1;
4862 {if (true) throw e;}
4864 throw new Error("Missing return statement in function");
4867 static final public ReturnStatement ReturnStatement() throws ParseException {
4868 Expression expr = null;
4869 final int pos = SimpleCharStream.getPosition();
4870 jj_consume_token(RETURN);
4871 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4887 case INTEGER_LITERAL:
4888 case FLOATING_POINT_LITERAL:
4889 case STRING_LITERAL:
4893 expr = Expression();
4896 jj_la1[122] = jj_gen;
4900 jj_consume_token(SEMICOLON);
4901 {if (true) return new ReturnStatement(expr,pos,SimpleCharStream.getPosition());}
4902 } catch (ParseException e) {
4903 errorMessage = "';' expected after 'return' statement";
4905 errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1;
4906 errorEnd = jj_input_stream.getPosition() + 1;
4907 {if (true) throw e;}
4909 throw new Error("Missing return statement in function");
4912 static final private boolean jj_2_1(int xla) {
4913 jj_la = xla; jj_lastpos = jj_scanpos = token;
4914 boolean retval = !jj_3_1();
4919 static final private boolean jj_2_2(int xla) {
4920 jj_la = xla; jj_lastpos = jj_scanpos = token;
4921 boolean retval = !jj_3_2();
4926 static final private boolean jj_2_3(int xla) {
4927 jj_la = xla; jj_lastpos = jj_scanpos = token;
4928 boolean retval = !jj_3_3();
4933 static final private boolean jj_2_4(int xla) {
4934 jj_la = xla; jj_lastpos = jj_scanpos = token;
4935 boolean retval = !jj_3_4();
4940 static final private boolean jj_2_5(int xla) {
4941 jj_la = xla; jj_lastpos = jj_scanpos = token;
4942 boolean retval = !jj_3_5();
4947 static final private boolean jj_2_6(int xla) {
4948 jj_la = xla; jj_lastpos = jj_scanpos = token;
4949 boolean retval = !jj_3_6();
4954 static final private boolean jj_2_7(int xla) {
4955 jj_la = xla; jj_lastpos = jj_scanpos = token;
4956 boolean retval = !jj_3_7();
4961 static final private boolean jj_2_8(int xla) {
4962 jj_la = xla; jj_lastpos = jj_scanpos = token;
4963 boolean retval = !jj_3_8();
4968 static final private boolean jj_3R_160() {
4969 if (jj_scan_token(DECR)) return true;
4970 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
4974 static final private boolean jj_3R_159() {
4975 if (jj_scan_token(INCR)) return true;
4976 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
4980 static final private boolean jj_3R_157() {
4985 if (jj_3R_160()) return true;
4986 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
4987 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
4988 if (jj_3R_166()) return true;
4989 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
4993 static final private boolean jj_3R_152() {
4994 if (jj_3R_158()) return true;
4995 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
4999 static final private boolean jj_3R_151() {
5000 if (jj_3R_157()) return true;
5001 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5005 static final private boolean jj_3R_156() {
5006 if (jj_scan_token(MINUS)) return true;
5007 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5011 static final private boolean jj_3R_155() {
5012 if (jj_scan_token(PLUS)) return true;
5013 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5017 static final private boolean jj_3R_148() {
5024 if (jj_3R_152()) return true;
5025 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5026 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5027 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5031 static final private boolean jj_3R_150() {
5036 if (jj_3R_156()) return true;
5037 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5038 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5039 if (jj_3R_139()) return true;
5040 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5044 static final private boolean jj_3R_154() {
5045 if (jj_3R_148()) return true;
5046 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5050 static final private boolean jj_3R_149() {
5055 if (jj_3R_154()) return true;
5056 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5057 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5061 static final private boolean jj_3R_153() {
5062 if (jj_scan_token(AT)) return true;
5063 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5064 if (jj_3R_149()) return true;
5065 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5069 static final private boolean jj_3R_144() {
5070 if (jj_3R_149()) return true;
5071 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5075 static final private boolean jj_3R_139() {
5080 if (jj_3R_144()) return true;
5081 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5082 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5086 static final private boolean jj_3R_143() {
5087 if (jj_scan_token(BIT_AND)) return true;
5088 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5089 if (jj_3R_148()) return true;
5090 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5094 static final private boolean jj_3R_147() {
5095 if (jj_scan_token(REMAINDER)) return true;
5096 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5100 static final private boolean jj_3R_146() {
5101 if (jj_scan_token(SLASH)) return true;
5102 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5106 static final private boolean jj_3R_145() {
5107 if (jj_scan_token(STAR)) return true;
5108 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5112 static final private boolean jj_3R_140() {
5119 if (jj_3R_147()) return true;
5120 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5121 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5122 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5123 if (jj_3R_139()) return true;
5124 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5128 static final private boolean jj_3R_134() {
5129 if (jj_3R_139()) return true;
5130 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5134 if (jj_3R_140()) { jj_scanpos = xsp; break; }
5135 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5140 static final private boolean jj_3R_142() {
5141 if (jj_scan_token(MINUS)) return true;
5142 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5146 static final private boolean jj_3R_141() {
5147 if (jj_scan_token(PLUS)) return true;
5148 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5152 static final private boolean jj_3R_135() {
5157 if (jj_3R_142()) return true;
5158 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5159 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5160 if (jj_3R_134()) return true;
5161 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5165 static final private boolean jj_3R_128() {
5166 if (jj_3R_134()) return true;
5167 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5171 if (jj_3R_135()) { jj_scanpos = xsp; break; }
5172 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5177 static final private boolean jj_3R_87() {
5178 if (jj_scan_token(ASSIGN)) return true;
5179 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5180 if (jj_3R_45()) return true;
5181 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5185 static final private boolean jj_3R_198() {
5186 if (jj_scan_token(COMMA)) return true;
5187 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5191 static final private boolean jj_3_7() {
5192 if (jj_3R_46()) return true;
5193 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5197 static final private boolean jj_3_2() {
5198 if (jj_scan_token(COMMA)) return true;
5199 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5200 if (jj_3R_41()) return true;
5201 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5205 static final private boolean jj_3R_138() {
5206 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
5207 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5211 static final private boolean jj_3R_201() {
5212 if (jj_scan_token(ARRAYASSIGN)) return true;
5213 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5214 if (jj_3R_45()) return true;
5215 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5219 static final private boolean jj_3R_197() {
5220 if (jj_3R_41()) return true;
5221 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5225 if (jj_3_2()) { jj_scanpos = xsp; break; }
5226 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5231 static final private boolean jj_3R_137() {
5232 if (jj_scan_token(RSIGNEDSHIFT)) return true;
5233 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5237 static final private boolean jj_3R_136() {
5238 if (jj_scan_token(LSHIFT)) return true;
5239 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5243 static final private boolean jj_3R_129() {
5250 if (jj_3R_138()) return true;
5251 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5252 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5253 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5254 if (jj_3R_128()) return true;
5255 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5259 static final private boolean jj_3R_121() {
5260 if (jj_3R_128()) return true;
5261 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5265 if (jj_3R_129()) { jj_scanpos = xsp; break; }
5266 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5271 static final private boolean jj_3_6() {
5272 if (jj_3R_45()) return true;
5273 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5274 if (jj_scan_token(SEMICOLON)) return true;
5275 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5279 static final private boolean jj_3R_192() {
5280 if (jj_scan_token(LPAREN)) return true;
5281 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5284 if (jj_3R_197()) jj_scanpos = xsp;
5285 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5287 if (jj_3R_198()) jj_scanpos = xsp;
5288 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5289 if (jj_scan_token(RPAREN)) return true;
5290 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5294 static final private boolean jj_3R_133() {
5295 if (jj_scan_token(GE)) return true;
5296 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5300 static final private boolean jj_3R_132() {
5301 if (jj_scan_token(LE)) return true;
5302 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5306 static final private boolean jj_3R_131() {
5307 if (jj_scan_token(GT)) return true;
5308 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5312 static final private boolean jj_3R_130() {
5313 if (jj_scan_token(LT)) return true;
5314 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5318 static final private boolean jj_3R_41() {
5319 if (jj_3R_45()) return true;
5320 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5323 if (jj_3R_201()) jj_scanpos = xsp;
5324 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5328 static final private boolean jj_3R_122() {
5337 if (jj_3R_133()) return true;
5338 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5339 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5340 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5341 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5342 if (jj_3R_121()) return true;
5343 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5347 static final private boolean jj_3R_119() {
5348 if (jj_3R_121()) return true;
5349 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5353 if (jj_3R_122()) { jj_scanpos = xsp; break; }
5354 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5359 static final private boolean jj_3R_57() {
5360 if (jj_3R_50()) return true;
5361 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5364 if (jj_3R_87()) jj_scanpos = xsp;
5365 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5369 static final private boolean jj_3R_203() {
5370 if (jj_scan_token(COMMA)) return true;
5371 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5372 if (jj_3R_45()) return true;
5373 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5377 static final private boolean jj_3R_202() {
5378 if (jj_3R_45()) return true;
5379 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5383 if (jj_3R_203()) { jj_scanpos = xsp; break; }
5384 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5389 static final private boolean jj_3R_58() {
5390 if (jj_scan_token(COMMA)) return true;
5391 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5392 if (jj_3R_57()) return true;
5393 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5397 static final private boolean jj_3R_47() {
5398 if (jj_3R_57()) return true;
5399 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5403 if (jj_3R_58()) { jj_scanpos = xsp; break; }
5404 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5409 static final private boolean jj_3R_200() {
5410 if (jj_3R_202()) return true;
5411 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5415 static final private boolean jj_3R_127() {
5416 if (jj_scan_token(TRIPLEEQUAL)) return true;
5417 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5421 static final private boolean jj_3R_126() {
5422 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5423 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5427 static final private boolean jj_3R_125() {
5428 if (jj_scan_token(NOT_EQUAL)) return true;
5429 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5433 static final private boolean jj_3R_124() {
5434 if (jj_scan_token(DIF)) return true;
5435 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5439 static final private boolean jj_3R_123() {
5440 if (jj_scan_token(EQUAL_EQUAL)) return true;
5441 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5445 static final private boolean jj_3R_93() {
5446 if (jj_3R_52()) return true;
5447 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5451 static final private boolean jj_3R_199() {
5452 if (jj_scan_token(LPAREN)) return true;
5453 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5456 if (jj_3R_200()) jj_scanpos = xsp;
5457 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5458 if (jj_scan_token(RPAREN)) return true;
5459 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5463 static final private boolean jj_3R_120() {
5474 if (jj_3R_127()) return true;
5475 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5476 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5477 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5478 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5479 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5480 if (jj_3R_119()) return true;
5481 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5485 static final private boolean jj_3R_117() {
5486 if (jj_3R_119()) return true;
5487 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5491 if (jj_3R_120()) { jj_scanpos = xsp; break; }
5492 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5497 static final private boolean jj_3R_108() {
5498 if (jj_scan_token(LBRACE)) return true;
5499 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5500 if (jj_3R_45()) return true;
5501 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5502 if (jj_scan_token(RBRACE)) return true;
5503 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5507 static final private boolean jj_3R_91() {
5508 if (jj_scan_token(DOLLAR_ID)) return true;
5509 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5513 static final private boolean jj_3R_177() {
5514 if (jj_scan_token(NULL)) return true;
5515 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5519 static final private boolean jj_3R_176() {
5520 if (jj_scan_token(FALSE)) return true;
5521 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5525 static final private boolean jj_3R_118() {
5526 if (jj_scan_token(BIT_AND)) return true;
5527 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5528 if (jj_3R_117()) return true;
5529 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5533 static final private boolean jj_3R_175() {
5534 if (jj_scan_token(TRUE)) return true;
5535 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5539 static final private boolean jj_3R_90() {
5540 if (jj_scan_token(DOLLAR)) return true;
5541 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5542 if (jj_3R_59()) return true;
5543 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5547 static final private boolean jj_3R_174() {
5548 if (jj_scan_token(STRING_LITERAL)) return true;
5549 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5553 static final private boolean jj_3R_115() {
5554 if (jj_3R_117()) return true;
5555 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5559 if (jj_3R_118()) { jj_scanpos = xsp; break; }
5560 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5565 static final private boolean jj_3R_173() {
5566 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
5567 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5571 static final private boolean jj_3R_169() {
5584 if (jj_3R_177()) return true;
5585 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5586 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5587 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5588 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5589 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5590 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5594 static final private boolean jj_3R_172() {
5595 if (jj_scan_token(INTEGER_LITERAL)) return true;
5596 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5600 static final private boolean jj_3R_116() {
5601 if (jj_scan_token(XOR)) return true;
5602 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5603 if (jj_3R_115()) return true;
5604 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5608 static final private boolean jj_3R_92() {
5609 if (jj_3R_45()) return true;
5610 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5614 static final private boolean jj_3R_60() {
5619 if (jj_3R_93()) return true;
5620 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5621 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5625 static final private boolean jj_3R_89() {
5626 if (jj_scan_token(IDENTIFIER)) return true;
5627 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5630 if (jj_3R_108()) jj_scanpos = xsp;
5631 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5635 static final private boolean jj_3R_113() {
5636 if (jj_3R_115()) return true;
5637 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5641 if (jj_3R_116()) { jj_scanpos = xsp; break; }
5642 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5647 static final private boolean jj_3R_88() {
5648 if (jj_scan_token(LBRACE)) return true;
5649 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5650 if (jj_3R_45()) return true;
5651 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5652 if (jj_scan_token(RBRACE)) return true;
5653 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5657 static final private boolean jj_3R_59() {
5666 if (jj_3R_91()) return true;
5667 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5668 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5669 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5670 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5674 static final private boolean jj_3R_98() {
5675 if (jj_scan_token(LBRACE)) return true;
5676 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5677 if (jj_3R_45()) return true;
5678 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5679 if (jj_scan_token(RBRACE)) return true;
5680 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5684 static final private boolean jj_3R_49() {
5685 if (jj_scan_token(LBRACKET)) return true;
5686 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5689 if (jj_3R_60()) jj_scanpos = xsp;
5690 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5691 if (jj_scan_token(RBRACKET)) return true;
5692 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5696 static final private boolean jj_3R_114() {
5697 if (jj_scan_token(BIT_OR)) return true;
5698 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5699 if (jj_3R_113()) return true;
5700 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5704 static final private boolean jj_3R_109() {
5705 if (jj_3R_113()) return true;
5706 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5710 if (jj_3R_114()) { jj_scanpos = xsp; break; }
5711 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5716 static final private boolean jj_3R_95() {
5717 if (jj_scan_token(DOLLAR)) return true;
5718 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5719 if (jj_3R_59()) return true;
5720 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5724 static final private boolean jj_3R_110() {
5725 if (jj_scan_token(DOT)) return true;
5726 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5727 if (jj_3R_109()) return true;
5728 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5732 static final private boolean jj_3R_48() {
5733 if (jj_scan_token(CLASSACCESS)) return true;
5734 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5735 if (jj_3R_59()) return true;
5736 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5740 static final private boolean jj_3R_40() {
5745 if (jj_3R_49()) return true;
5746 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5747 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5751 static final private boolean jj_3R_104() {
5752 if (jj_3R_109()) return true;
5753 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5757 if (jj_3R_110()) { jj_scanpos = xsp; break; }
5758 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5763 static final private boolean jj_3R_46() {
5764 if (jj_scan_token(IDENTIFIER)) return true;
5765 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5766 if (jj_scan_token(COLON)) return true;
5767 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5771 static final private boolean jj_3R_94() {
5772 if (jj_scan_token(DOLLAR_ID)) return true;
5773 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5776 if (jj_3R_98()) jj_scanpos = xsp;
5777 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5781 static final private boolean jj_3R_61() {
5786 if (jj_3R_95()) return true;
5787 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5788 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5792 static final private boolean jj_3R_196() {
5793 if (jj_3R_40()) return true;
5794 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5798 static final private boolean jj_3R_112() {
5799 if (jj_scan_token(_ANDL)) return true;
5800 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5804 static final private boolean jj_3R_195() {
5805 if (jj_3R_199()) return true;
5806 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5810 static final private boolean jj_3R_188() {
5815 if (jj_3R_196()) return true;
5816 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5817 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5821 static final private boolean jj_3R_111() {
5822 if (jj_scan_token(AND_AND)) return true;
5823 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5827 static final private boolean jj_3R_105() {
5832 if (jj_3R_112()) return true;
5833 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5834 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5835 if (jj_3R_104()) return true;
5836 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5840 static final private boolean jj_3R_97() {
5841 if (jj_scan_token(HOOK)) return true;
5842 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5843 if (jj_3R_45()) return true;
5844 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5845 if (jj_scan_token(COLON)) return true;
5846 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5847 if (jj_3R_86()) return true;
5848 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5852 static final private boolean jj_3R_102() {
5853 if (jj_3R_104()) return true;
5854 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5858 if (jj_3R_105()) { jj_scanpos = xsp; break; }
5859 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5864 static final private boolean jj_3R_187() {
5865 if (jj_3R_50()) return true;
5866 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5870 static final private boolean jj_3R_186() {
5871 if (jj_scan_token(IDENTIFIER)) return true;
5872 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5876 static final private boolean jj_3R_178() {
5881 if (jj_3R_187()) return true;
5882 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5883 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5887 static final private boolean jj_3_1() {
5888 if (jj_3R_40()) return true;
5889 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5893 static final private boolean jj_3R_107() {
5894 if (jj_scan_token(_ORL)) return true;
5895 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5899 static final private boolean jj_3R_106() {
5900 if (jj_scan_token(OR_OR)) return true;
5901 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5905 static final private boolean jj_3R_50() {
5906 if (jj_3R_61()) return true;
5907 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5911 if (jj_3_1()) { jj_scanpos = xsp; break; }
5912 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5917 static final private boolean jj_3R_103() {
5922 if (jj_3R_107()) return true;
5923 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5924 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5925 if (jj_3R_102()) return true;
5926 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5930 static final private boolean jj_3R_96() {
5931 if (jj_3R_102()) return true;
5932 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5936 if (jj_3R_103()) { jj_scanpos = xsp; break; }
5937 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5942 static final private boolean jj_3R_86() {
5943 if (jj_3R_96()) return true;
5944 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5947 if (jj_3R_97()) jj_scanpos = xsp;
5948 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5952 static final private boolean jj_3R_191() {
5953 if (jj_3R_50()) return true;
5954 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5958 static final private boolean jj_3R_190() {
5959 if (jj_scan_token(NEW)) return true;
5960 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5961 if (jj_3R_178()) return true;
5962 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5966 static final private boolean jj_3R_74() {
5967 if (jj_scan_token(TILDEEQUAL)) return true;
5968 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5972 static final private boolean jj_3R_73() {
5973 if (jj_scan_token(DOTASSIGN)) return true;
5974 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5978 static final private boolean jj_3R_72() {
5979 if (jj_scan_token(ORASSIGN)) return true;
5980 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5984 static final private boolean jj_3R_189() {
5985 if (jj_scan_token(IDENTIFIER)) return true;
5986 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5990 static final private boolean jj_3R_180() {
5997 if (jj_3R_191()) return true;
5998 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5999 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6000 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6004 static final private boolean jj_3R_71() {
6005 if (jj_scan_token(XORASSIGN)) return true;
6006 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6010 static final private boolean jj_3R_70() {
6011 if (jj_scan_token(ANDASSIGN)) return true;
6012 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6016 static final private boolean jj_3R_69() {
6017 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6018 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6022 static final private boolean jj_3R_68() {
6023 if (jj_scan_token(LSHIFTASSIGN)) return true;
6024 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6028 static final private boolean jj_3R_67() {
6029 if (jj_scan_token(MINUSASSIGN)) return true;
6030 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6034 static final private boolean jj_3R_66() {
6035 if (jj_scan_token(PLUSASSIGN)) return true;
6036 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6040 static final private boolean jj_3R_65() {
6041 if (jj_scan_token(REMASSIGN)) return true;
6042 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6046 static final private boolean jj_3R_64() {
6047 if (jj_scan_token(SLASHASSIGN)) return true;
6048 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6052 static final private boolean jj_3R_63() {
6053 if (jj_scan_token(STARASSIGN)) return true;
6054 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6058 static final private boolean jj_3R_51() {
6085 if (jj_3R_74()) return true;
6086 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6087 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6088 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6089 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6090 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6091 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6092 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6093 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6094 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6095 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6096 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6097 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6098 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6102 static final private boolean jj_3R_62() {
6103 if (jj_scan_token(ASSIGN)) return true;
6104 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6108 static final private boolean jj_3R_182() {
6109 if (jj_scan_token(ARRAY)) return true;
6110 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6111 if (jj_3R_192()) return true;
6112 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6116 static final private boolean jj_3R_171() {
6117 if (jj_3R_182()) return true;
6118 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6122 static final private boolean jj_3_8() {
6123 if (jj_3R_47()) return true;
6124 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6128 static final private boolean jj_3R_181() {
6129 if (jj_3R_188()) return true;
6130 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6134 static final private boolean jj_3R_170() {
6135 if (jj_3R_180()) return true;
6136 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6140 if (jj_3R_181()) { jj_scanpos = xsp; break; }
6141 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6146 static final private boolean jj_3R_179() {
6147 if (jj_3R_188()) return true;
6148 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6152 static final private boolean jj_3R_42() {
6153 if (jj_3R_50()) return true;
6154 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6155 if (jj_3R_51()) return true;
6156 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6157 if (jj_3R_45()) return true;
6158 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6162 static final private boolean jj_3R_101() {
6163 if (jj_scan_token(ASSIGN)) return true;
6164 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6165 if (jj_3R_45()) return true;
6166 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6170 static final private boolean jj_3_5() {
6171 if (jj_scan_token(IDENTIFIER)) return true;
6172 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6173 if (jj_scan_token(STATICCLASSACCESS)) return true;
6174 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6175 if (jj_3R_178()) return true;
6176 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6180 if (jj_3R_179()) { jj_scanpos = xsp; break; }
6181 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6186 static final private boolean jj_3R_166() {
6193 if (jj_3R_171()) return true;
6194 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6195 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6196 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6200 static final private boolean jj_3_3() {
6201 if (jj_3R_42()) return true;
6202 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6206 static final private boolean jj_3R_56() {
6207 if (jj_3R_86()) return true;
6208 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6212 static final private boolean jj_3R_55() {
6213 if (jj_3R_42()) return true;
6214 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6218 static final private boolean jj_3R_194() {
6219 if (jj_scan_token(DECR)) return true;
6220 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6224 static final private boolean jj_3R_54() {
6225 if (jj_3R_85()) return true;
6226 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6230 static final private boolean jj_3R_193() {
6231 if (jj_scan_token(INCR)) return true;
6232 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6236 static final private boolean jj_3R_185() {
6241 if (jj_3R_194()) return true;
6242 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6243 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6247 static final private boolean jj_3R_45() {
6256 if (jj_3R_56()) return true;
6257 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6258 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6259 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6260 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6264 static final private boolean jj_3R_53() {
6265 if (jj_3R_84()) return true;
6266 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6270 static final private boolean jj_3R_168() {
6271 if (jj_3R_166()) return true;
6272 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6275 if (jj_3R_185()) jj_scanpos = xsp;
6276 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6280 static final private boolean jj_3R_100() {
6281 if (jj_scan_token(COMMA)) return true;
6282 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6283 if (jj_3R_50()) return true;
6284 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6288 static final private boolean jj_3R_99() {
6289 if (jj_3R_50()) return true;
6290 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6294 static final private boolean jj_3R_83() {
6295 if (jj_scan_token(OBJECT)) return true;
6296 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6300 static final private boolean jj_3R_44() {
6301 if (jj_scan_token(ARRAY)) return true;
6302 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6306 static final private boolean jj_3R_184() {
6307 if (jj_scan_token(ARRAY)) return true;
6308 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6312 static final private boolean jj_3R_82() {
6313 if (jj_scan_token(INTEGER)) return true;
6314 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6318 static final private boolean jj_3R_183() {
6319 if (jj_3R_52()) return true;
6320 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6324 static final private boolean jj_3R_81() {
6325 if (jj_scan_token(INT)) return true;
6326 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6330 static final private boolean jj_3R_167() {
6331 if (jj_scan_token(LPAREN)) return true;
6332 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6337 if (jj_3R_184()) return true;
6338 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6339 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6340 if (jj_scan_token(RPAREN)) return true;
6341 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6342 if (jj_3R_139()) return true;
6343 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6347 static final private boolean jj_3R_80() {
6348 if (jj_scan_token(FLOAT)) return true;
6349 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6353 static final private boolean jj_3R_43() {
6354 if (jj_3R_52()) return true;
6355 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6359 static final private boolean jj_3R_79() {
6360 if (jj_scan_token(DOUBLE)) return true;
6361 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6365 static final private boolean jj_3R_85() {
6366 if (jj_scan_token(LIST)) return true;
6367 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6368 if (jj_scan_token(LPAREN)) return true;
6369 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6372 if (jj_3R_99()) jj_scanpos = xsp;
6373 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6376 if (jj_3R_100()) { jj_scanpos = xsp; break; }
6377 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6379 if (jj_scan_token(RPAREN)) return true;
6380 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6382 if (jj_3R_101()) jj_scanpos = xsp;
6383 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6387 static final private boolean jj_3R_78() {
6388 if (jj_scan_token(REAL)) return true;
6389 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6393 static final private boolean jj_3R_77() {
6394 if (jj_scan_token(BOOLEAN)) return true;
6395 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6399 static final private boolean jj_3_4() {
6400 if (jj_scan_token(LPAREN)) return true;
6401 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6406 if (jj_3R_44()) return true;
6407 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6408 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6409 if (jj_scan_token(RPAREN)) return true;
6410 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6414 static final private boolean jj_3R_76() {
6415 if (jj_scan_token(BOOL)) return true;
6416 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6420 static final private boolean jj_3R_84() {
6421 if (jj_scan_token(PRINT)) return true;
6422 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6423 if (jj_3R_45()) return true;
6424 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6428 static final private boolean jj_3R_75() {
6429 if (jj_scan_token(STRING)) return true;
6430 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6434 static final private boolean jj_3R_52() {
6453 if (jj_3R_83()) return true;
6454 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6455 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6456 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6457 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6458 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6459 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6460 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6461 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6462 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6466 static final private boolean jj_3R_165() {
6467 if (jj_scan_token(LPAREN)) return true;
6468 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6469 if (jj_3R_45()) return true;
6470 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6471 if (jj_scan_token(RPAREN)) return true;
6472 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6476 static final private boolean jj_3R_164() {
6477 if (jj_3R_169()) return true;
6478 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6482 static final private boolean jj_3R_163() {
6483 if (jj_3R_168()) return true;
6484 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6488 static final private boolean jj_3R_162() {
6489 if (jj_3R_167()) return true;
6490 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6494 static final private boolean jj_3R_158() {
6505 if (jj_3R_165()) return true;
6506 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6507 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6508 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6509 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6510 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6514 static final private boolean jj_3R_161() {
6515 if (jj_scan_token(BANG)) return true;
6516 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6517 if (jj_3R_139()) return true;
6518 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6522 static private boolean jj_initialized_once = false;
6523 static public PHPParserTokenManager token_source;
6524 static SimpleCharStream jj_input_stream;
6525 static public Token token, jj_nt;
6526 static private int jj_ntk;
6527 static private Token jj_scanpos, jj_lastpos;
6528 static private int jj_la;
6529 static public boolean lookingAhead = false;
6530 static private boolean jj_semLA;
6531 static private int jj_gen;
6532 static final private int[] jj_la1 = new int[123];
6533 static private int[] jj_la1_0;
6534 static private int[] jj_la1_1;
6535 static private int[] jj_la1_2;
6536 static private int[] jj_la1_3;
6537 static private int[] jj_la1_4;
6545 private static void jj_la1_0() {
6546 jj_la1_0 = new int[] {0xfcb0001e,0x6,0x6,0xfcb0001e,0x0,0xfcb00000,0x0,0x600000,0x600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x0,0x34000000,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x4000000,0x0,0x4000000,0x0,0x0,0x4000000,0x4000000,0x0,0x0,0x0,0x0,0x4000000,0x0,0x4000000,0x0,0x0,0x34000000,0x34000000,0x0,0x0,0x34000000,0x0,0x0,0xc4800000,0xfc800000,0x8,0x6,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0xfcb00010,0xfcb00010,0xfcb00000,0xf4b00000,0x0,0x0,0x0,0x0,0x4000000,0x0,0x0,0x0,0xf4b00010,0xf4b00010,0x8000000,0x0,0x34000000,0xfc800010,0xfc800010,0x1000000,0x2000000,0xfc800010,0x1000000,0x2000000,0xfc800010,0xfc800010,0xfc800010,0xfc800010,0xfc800010,0xfc800000,0xfc800000,0x4000000,0x34000000,0x4000000,0xfc800000,0xfc800000,0x4000000,0x0,0x34000000,0x34000000,};
6548 private static void jj_la1_1() {
6549 jj_la1_1 = new int[] {0x21d7541f,0x0,0x0,0x21d7541f,0x0,0x21d7541f,0x2000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc20000,0x80,0xc30000,0x0,0x0,0x0,0x0,0x0,0x80000000,0x0,0xc30000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc30000,0xc30000,0x0,0xc30000,0x0,0x0,0xc30000,0x80000000,0x0,0x0,0x20,0x20,0x10000,0x10000,0x10000,0x0,0x20,0x80c30000,0x80c30000,0x20,0xc20000,0xc30000,0x0,0x0,0x2115541f,0x21d7541f,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x21d7541f,0x21d7541f,0x21d7541f,0x21d7541f,0x0,0x0,0x0,0x0,0x10000,0x0,0x900,0x900,0x21d7541f,0x21d7541f,0x0,0x900,0xc30000,0x21d7541f,0x21d7541f,0x0,0x0,0x21d7541f,0x0,0x0,0x21d7541f,0x21d7541f,0x21d7541f,0x21d7541f,0x21d7541f,0x21d7541f,0x21d7541f,0x10000,0xc30000,0x10000,0x21d7541f,0x21d7541f,0x10000,0x0,0xc30000,0xc30000,};
6551 private static void jj_la1_2() {
6552 jj_la1_2 = new int[] {0x804f0700,0x0,0x0,0x804f0700,0x0,0x804f0700,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x200,0x80000000,0x80000000,0x800c0000,0x0,0x804f0700,0x0,0x400000,0x0,0x400200,0x400000,0xff,0x0,0x804f0700,0x0,0x1000,0x20004000,0x20004000,0x40008000,0x40008000,0x0,0x800000,0x1000000,0x400000,0x0,0x0,0x0,0x0,0x1c000000,0x1c000000,0xc0000,0xc0000,0x2300000,0x2300000,0x804f0700,0x800f0700,0xc0000,0x800f0600,0x30000,0x400,0x80000200,0xff,0x30000,0x30000,0x0,0x0,0x200,0x200,0x200,0x200,0x0,0x804f07ff,0x804f07ff,0x0,0x80000000,0x804f0700,0x0,0x100,0x30300,0x804f0700,0x0,0x0,0x0,0x200,0x0,0x0,0x0,0x0,0x0,0x804f0700,0x804f0700,0x804f0700,0x804f0700,0x0,0x0,0x30000,0x30000,0x30200,0x2000,0x0,0x0,0x804f0700,0x804f0700,0x0,0x0,0x804f0700,0x804f0700,0x804f0700,0x0,0x0,0x804f0700,0x0,0x0,0x804f2700,0x804f0700,0x804f0700,0x804f0700,0x804f0700,0x804f0700,0x804f2700,0x30200,0x804f0700,0x30200,0x804f0700,0x804f2700,0x30200,0x0,0x804f0700,0x804f0700,};
6554 private static void jj_la1_3() {
6555 jj_la1_3 = new int[] {0x8a228,0x0,0x0,0x8a228,0x80000,0x8a228,0x0,0x0,0x0,0x100000,0x80000000,0x8000,0x0,0x8000,0x8200,0x8,0x8,0x228,0x0,0x2228,0x100000,0x0,0x100000,0x0,0x0,0x0,0x0,0x2228,0x80000000,0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x0,0x0,0x79000000,0x79000000,0x6c00000,0x6c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x2228,0x2228,0x0,0x2228,0x0,0x0,0x2228,0x0,0x0,0x0,0x22000,0x22000,0x200,0x200,0x200,0x200,0x22000,0x2228,0x2228,0x20000,0x28,0x2228,0x100000,0x0,0x88200,0x8a228,0x0,0x0,0x0,0x0,0x100000,0x80000000,0x100000,0x100000,0x100000,0x8a228,0x8a228,0x8a228,0x8a228,0x100000,0x80000000,0x80000000,0x80000000,0x200,0x8000,0x0,0x0,0x8a228,0x8a228,0x0,0x0,0x2228,0x8a228,0x8a228,0x0,0x0,0x8a228,0x0,0x0,0x8a228,0x8a228,0x8a228,0x8a228,0x8a228,0x8a228,0x8a228,0x200,0x2228,0x200,0x8a228,0x8a228,0x200,0x100000,0x2228,0x2228,};
6557 private static void jj_la1_4() {
6558 jj_la1_4 = new int[] {0x1000,0x0,0x0,0x1000,0x0,0x1000,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x0,0x1000,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x1000,0xfff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x1000,0x0,0x1000,0x0,0x0,0x1000,0x0,0x0,0x0,0x0,0x0,0x1000,0x1000,0x1000,0x1000,0x0,0x1000,0x1000,0x0,0x0,0x1000,0x0,0x0,0x1000,0x1000,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x0,0x0,0x1000,0x1000,0x1000,0x1000,0x0,0x0,0xfff,0xfff,0x1000,0x0,0x0,0x0,0x1000,0x1000,0x0,0x0,0x1000,0x1000,0x1000,0x0,0x0,0x1000,0x0,0x0,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x0,0x1000,0x1000,};
6560 static final private JJCalls[] jj_2_rtns = new JJCalls[8];
6561 static private boolean jj_rescan = false;
6562 static private int jj_gc = 0;
6564 public PHPParser(java.io.InputStream stream) {
6565 if (jj_initialized_once) {
6566 System.out.println("ERROR: Second call to constructor of static parser. You must");
6567 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6568 System.out.println(" during parser generation.");
6571 jj_initialized_once = true;
6572 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6573 token_source = new PHPParserTokenManager(jj_input_stream);
6574 token = new Token();
6577 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6578 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6581 static public void ReInit(java.io.InputStream stream) {
6582 jj_input_stream.ReInit(stream, 1, 1);
6583 token_source.ReInit(jj_input_stream);
6584 token = new Token();
6587 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6588 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6591 public PHPParser(java.io.Reader stream) {
6592 if (jj_initialized_once) {
6593 System.out.println("ERROR: Second call to constructor of static parser. You must");
6594 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6595 System.out.println(" during parser generation.");
6598 jj_initialized_once = true;
6599 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6600 token_source = new PHPParserTokenManager(jj_input_stream);
6601 token = new Token();
6604 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6605 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6608 static public void ReInit(java.io.Reader stream) {
6609 jj_input_stream.ReInit(stream, 1, 1);
6610 token_source.ReInit(jj_input_stream);
6611 token = new Token();
6614 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6615 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6618 public PHPParser(PHPParserTokenManager tm) {
6619 if (jj_initialized_once) {
6620 System.out.println("ERROR: Second call to constructor of static parser. You must");
6621 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6622 System.out.println(" during parser generation.");
6625 jj_initialized_once = true;
6627 token = new Token();
6630 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6631 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6634 public void ReInit(PHPParserTokenManager tm) {
6636 token = new Token();
6639 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6640 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6643 static final private Token jj_consume_token(int kind) throws ParseException {
6645 if ((oldToken = token).next != null) token = token.next;
6646 else token = token.next = token_source.getNextToken();
6648 if (token.kind == kind) {
6650 if (++jj_gc > 100) {
6652 for (int i = 0; i < jj_2_rtns.length; i++) {
6653 JJCalls c = jj_2_rtns[i];
6655 if (c.gen < jj_gen) c.first = null;
6664 throw generateParseException();
6667 static final private boolean jj_scan_token(int kind) {
6668 if (jj_scanpos == jj_lastpos) {
6670 if (jj_scanpos.next == null) {
6671 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
6673 jj_lastpos = jj_scanpos = jj_scanpos.next;
6676 jj_scanpos = jj_scanpos.next;
6679 int i = 0; Token tok = token;
6680 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
6681 if (tok != null) jj_add_error_token(kind, i);
6683 return (jj_scanpos.kind != kind);
6686 static final public Token getNextToken() {
6687 if (token.next != null) token = token.next;
6688 else token = token.next = token_source.getNextToken();
6694 static final public Token getToken(int index) {
6695 Token t = lookingAhead ? jj_scanpos : token;
6696 for (int i = 0; i < index; i++) {
6697 if (t.next != null) t = t.next;
6698 else t = t.next = token_source.getNextToken();
6703 static final private int jj_ntk() {
6704 if ((jj_nt=token.next) == null)
6705 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
6707 return (jj_ntk = jj_nt.kind);
6710 static private java.util.Vector jj_expentries = new java.util.Vector();
6711 static private int[] jj_expentry;
6712 static private int jj_kind = -1;
6713 static private int[] jj_lasttokens = new int[100];
6714 static private int jj_endpos;
6716 static private void jj_add_error_token(int kind, int pos) {
6717 if (pos >= 100) return;
6718 if (pos == jj_endpos + 1) {
6719 jj_lasttokens[jj_endpos++] = kind;
6720 } else if (jj_endpos != 0) {
6721 jj_expentry = new int[jj_endpos];
6722 for (int i = 0; i < jj_endpos; i++) {
6723 jj_expentry[i] = jj_lasttokens[i];
6725 boolean exists = false;
6726 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
6727 int[] oldentry = (int[])(enum.nextElement());
6728 if (oldentry.length == jj_expentry.length) {
6730 for (int i = 0; i < jj_expentry.length; i++) {
6731 if (oldentry[i] != jj_expentry[i]) {
6739 if (!exists) jj_expentries.addElement(jj_expentry);
6740 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
6744 static public ParseException generateParseException() {
6745 jj_expentries.removeAllElements();
6746 boolean[] la1tokens = new boolean[141];
6747 for (int i = 0; i < 141; i++) {
6748 la1tokens[i] = false;
6751 la1tokens[jj_kind] = true;
6754 for (int i = 0; i < 123; i++) {
6755 if (jj_la1[i] == jj_gen) {
6756 for (int j = 0; j < 32; j++) {
6757 if ((jj_la1_0[i] & (1<<j)) != 0) {
6758 la1tokens[j] = true;
6760 if ((jj_la1_1[i] & (1<<j)) != 0) {
6761 la1tokens[32+j] = true;
6763 if ((jj_la1_2[i] & (1<<j)) != 0) {
6764 la1tokens[64+j] = true;
6766 if ((jj_la1_3[i] & (1<<j)) != 0) {
6767 la1tokens[96+j] = true;
6769 if ((jj_la1_4[i] & (1<<j)) != 0) {
6770 la1tokens[128+j] = true;
6775 for (int i = 0; i < 141; i++) {
6777 jj_expentry = new int[1];
6779 jj_expentries.addElement(jj_expentry);
6784 jj_add_error_token(0, 0);
6785 int[][] exptokseq = new int[jj_expentries.size()][];
6786 for (int i = 0; i < jj_expentries.size(); i++) {
6787 exptokseq[i] = (int[])jj_expentries.elementAt(i);
6789 return new ParseException(token, exptokseq, tokenImage);
6792 static final public void enable_tracing() {
6795 static final public void disable_tracing() {
6798 static final private void jj_rescan_token() {
6800 for (int i = 0; i < 8; i++) {
6801 JJCalls p = jj_2_rtns[i];
6803 if (p.gen > jj_gen) {
6804 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
6806 case 0: jj_3_1(); break;
6807 case 1: jj_3_2(); break;
6808 case 2: jj_3_3(); break;
6809 case 3: jj_3_4(); break;
6810 case 4: jj_3_5(); break;
6811 case 5: jj_3_6(); break;
6812 case 6: jj_3_7(); break;
6813 case 7: jj_3_8(); break;
6817 } while (p != null);
6822 static final private void jj_save(int index, int xla) {
6823 JJCalls p = jj_2_rtns[index];
6824 while (p.gen > jj_gen) {
6825 if (p.next == null) { p = p.next = new JJCalls(); break; }
6828 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
6831 static final class JJCalls {