1 /* Generated By:JavaCC: Do not edit this line. PHPParser.java */
4 import org.eclipse.core.resources.IFile;
5 import org.eclipse.core.resources.IMarker;
6 import org.eclipse.core.runtime.CoreException;
7 import org.eclipse.ui.texteditor.MarkerUtilities;
8 import org.eclipse.jface.preference.IPreferenceStore;
10 import java.util.Hashtable;
11 import java.util.ArrayList;
12 import java.io.StringReader;
14 import java.text.MessageFormat;
16 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
17 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
18 import net.sourceforge.phpdt.internal.compiler.ast.*;
19 import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
20 import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
21 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
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
29 * @version $Reference: 1.0$
31 public final class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
33 /** The file that is parsed. */
34 private static IFile fileToParse;
36 /** The current segment. */
37 private static OutlineableWithChildren currentSegment;
39 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
40 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
41 static PHPOutlineInfo outlineInfo;
43 /** The error level of the current ParseException. */
44 private static int errorLevel = ERROR;
45 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
46 private static String errorMessage;
48 private static int errorStart = -1;
49 private static int errorEnd = -1;
50 private static PHPDocument phpDocument;
52 private static final char[] SYNTAX_ERROR_CHAR = {'s','y','n','t','a','x',' ','e','r','r','o','r'};
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(final AstNode node) {
93 nodes[++nodePtr] = node;
94 } catch (IndexOutOfBoundsException e) {
95 final int oldStackLength = nodes.length;
96 final 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 final PHPOutlineInfo parseInfo(final Object parent, final String s) {
105 phpDocument = new PHPDocument(parent,"_root".toCharArray());
106 currentSegment = phpDocument;
107 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
108 final StringReader stream = new StringReader(s);
109 if (jj_input_stream == null) {
110 jj_input_stream = new SimpleCharStream(stream, 1, 1);
116 phpDocument.nodes = new AstNode[nodes.length];
117 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
118 if (PHPeclipsePlugin.DEBUG) {
119 PHPeclipsePlugin.log(1,phpDocument.toString());
121 } catch (ParseException e) {
122 processParseException(e);
128 * This method will process the parse exception.
129 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
130 * @param e the ParseException
132 private static void processParseException(final ParseException e) {
133 if (errorMessage == null) {
134 PHPeclipsePlugin.log(e);
135 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
136 errorStart = SimpleCharStream.getPosition();
137 errorEnd = errorStart + 1;
141 if (PHPeclipsePlugin.DEBUG) PHPeclipsePlugin.log(e);
145 * Create marker for the parse error
146 * @param e the ParseException
148 private static void setMarker(final ParseException e) {
150 if (errorStart == -1) {
151 setMarker(fileToParse,
153 SimpleCharStream.tokenBegin,
154 SimpleCharStream.tokenBegin + e.currentToken.image.length(),
156 "Line " + e.currentToken.beginLine);
158 setMarker(fileToParse,
163 "Line " + e.currentToken.beginLine);
167 } catch (CoreException e2) {
168 PHPeclipsePlugin.log(e2);
172 private static void scanLine(final String output,
175 final int brIndx) throws CoreException {
177 StringBuffer lineNumberBuffer = new StringBuffer(10);
179 current = output.substring(indx, brIndx);
181 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
182 int onLine = current.indexOf("on line <b>");
184 lineNumberBuffer.delete(0, lineNumberBuffer.length());
185 for (int i = onLine; i < current.length(); i++) {
186 ch = current.charAt(i);
187 if ('0' <= ch && '9' >= ch) {
188 lineNumberBuffer.append(ch);
192 int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
194 Hashtable attributes = new Hashtable();
196 current = current.replaceAll("\n", "");
197 current = current.replaceAll("<b>", "");
198 current = current.replaceAll("</b>", "");
199 MarkerUtilities.setMessage(attributes, current);
201 if (current.indexOf(PARSE_ERROR_STRING) != -1)
202 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
203 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
204 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
206 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
207 MarkerUtilities.setLineNumber(attributes, lineNumber);
208 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
213 public final void parse(final String s) throws CoreException {
214 final StringReader stream = new StringReader(s);
215 if (jj_input_stream == null) {
216 jj_input_stream = new SimpleCharStream(stream, 1, 1);
222 } catch (ParseException e) {
223 processParseException(e);
228 * Call the php parse command ( php -l -f <filename> )
229 * and create markers according to the external parser output
231 public static void phpExternalParse(final IFile file) {
232 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
233 final String filename = file.getLocation().toString();
235 final String[] arguments = { filename };
236 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
237 final String command = form.format(arguments);
239 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
242 // parse the buffer to find the errors and warnings
243 createMarkers(parserResult, file);
244 } catch (CoreException e) {
245 PHPeclipsePlugin.log(e);
250 * Put a new html block in the stack.
252 public static final void createNewHTMLCode() {
253 final int currentPosition = SimpleCharStream.getPosition();
254 if (currentPosition == htmlStart || currentPosition > SimpleCharStream.currentBuffer.length()) {
257 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray();
258 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
264 public static final void createNewTask() {
265 final int currentPosition = SimpleCharStream.getPosition();
266 final String todo = SimpleCharStream.currentBuffer.substring(currentPosition+1,
267 SimpleCharStream.currentBuffer.indexOf("\n",
270 setMarker(fileToParse,
272 SimpleCharStream.getBeginLine(),
274 "Line "+SimpleCharStream.getBeginLine());
275 } catch (CoreException e) {
276 PHPeclipsePlugin.log(e);
280 private static final void parse() throws ParseException {
284 static final public void phpFile() throws ParseException {
288 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
327 case INTEGER_LITERAL:
328 case FLOATING_POINT_LITERAL:
343 PHPParser.createNewHTMLCode();
344 } catch (TokenMgrError e) {
345 PHPeclipsePlugin.log(e);
346 errorStart = SimpleCharStream.getPosition();
347 errorEnd = errorStart + 1;
348 errorMessage = e.getMessage();
350 {if (true) throw generateParseException();}
355 * A php block is a <?= expression [;]?>
356 * or <?php somephpcode ?>
357 * or <? somephpcode ?>
359 static final public void PhpBlock() throws ParseException {
360 final int start = SimpleCharStream.getPosition();
361 final PHPEchoBlock phpEchoBlock;
362 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
364 phpEchoBlock = phpEchoBlock();
365 pushOnAstNodes(phpEchoBlock);
404 case INTEGER_LITERAL:
405 case FLOATING_POINT_LITERAL:
412 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
415 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
417 jj_consume_token(PHPSTARTLONG);
420 jj_consume_token(PHPSTARTSHORT);
422 setMarker(fileToParse,
423 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
425 SimpleCharStream.getPosition(),
427 "Line " + token.beginLine);
428 } catch (CoreException e) {
429 PHPeclipsePlugin.log(e);
434 jj_consume_token(-1);
435 throw new ParseException();
444 jj_consume_token(PHPEND);
445 } catch (ParseException e) {
446 errorMessage = "'?>' expected";
448 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
449 errorEnd = SimpleCharStream.getPosition() + 1;
450 processParseException(e);
455 jj_consume_token(-1);
456 throw new ParseException();
460 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
461 final Expression expr;
462 final int pos = SimpleCharStream.getPosition();
463 final PHPEchoBlock echoBlock;
464 jj_consume_token(PHPECHOSTART);
466 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
468 jj_consume_token(SEMICOLON);
474 jj_consume_token(PHPEND);
475 echoBlock = new PHPEchoBlock(expr,pos,SimpleCharStream.getPosition());
476 pushOnAstNodes(echoBlock);
477 {if (true) return echoBlock;}
478 throw new Error("Missing return statement in function");
481 static final public void Php() throws ParseException {
484 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
519 case INTEGER_LITERAL:
520 case FLOATING_POINT_LITERAL:
537 static final public ClassDeclaration ClassDeclaration() throws ParseException {
538 final ClassDeclaration classDeclaration;
539 final Token className,superclassName;
541 char[] classNameImage = SYNTAX_ERROR_CHAR;
542 char[] superclassNameImage = null;
543 jj_consume_token(CLASS);
544 pos = SimpleCharStream.getPosition();
546 className = jj_consume_token(IDENTIFIER);
547 classNameImage = className.image.toCharArray();
548 } catch (ParseException e) {
549 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
551 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
552 errorEnd = SimpleCharStream.getPosition() + 1;
553 processParseException(e);
555 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
557 jj_consume_token(EXTENDS);
559 superclassName = jj_consume_token(IDENTIFIER);
560 superclassNameImage = superclassName.image.toCharArray();
561 } catch (ParseException e) {
562 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
564 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
565 errorEnd = SimpleCharStream.getPosition() + 1;
566 processParseException(e);
567 superclassNameImage = SYNTAX_ERROR_CHAR;
574 if (superclassNameImage == null) {
575 classDeclaration = new ClassDeclaration(currentSegment,
580 classDeclaration = new ClassDeclaration(currentSegment,
586 currentSegment.add(classDeclaration);
587 currentSegment = classDeclaration;
588 ClassBody(classDeclaration);
589 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
590 classDeclaration.sourceEnd = SimpleCharStream.getPosition();
591 pushOnAstNodes(classDeclaration);
592 {if (true) return classDeclaration;}
593 throw new Error("Missing return statement in function");
596 static final public void ClassBody(final ClassDeclaration classDeclaration) throws ParseException {
598 jj_consume_token(LBRACE);
599 } catch (ParseException e) {
600 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "', '{' expected";
602 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
603 errorEnd = SimpleCharStream.getPosition() + 1;
608 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
617 ClassBodyDeclaration(classDeclaration);
620 jj_consume_token(RBRACE);
621 } catch (ParseException e) {
622 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', 'var', 'function' or '}' expected";
624 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
625 errorEnd = SimpleCharStream.getPosition() + 1;
631 * A class can contain only methods and fields.
633 static final public void ClassBodyDeclaration(final ClassDeclaration classDeclaration) throws ParseException {
634 final MethodDeclaration method;
635 final FieldDeclaration field;
636 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
638 method = MethodDeclaration();
639 classDeclaration.addMethod(method);
642 field = FieldDeclaration();
643 classDeclaration.addField(field);
647 jj_consume_token(-1);
648 throw new ParseException();
653 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
655 static final public FieldDeclaration FieldDeclaration() throws ParseException {
656 VariableDeclaration variableDeclaration;
657 final VariableDeclaration[] list;
658 final ArrayList arrayList = new ArrayList();
659 final int pos = SimpleCharStream.getPosition();
660 jj_consume_token(VAR);
661 variableDeclaration = VariableDeclarator();
662 arrayList.add(variableDeclaration);
663 outlineInfo.addVariable(new String(variableDeclaration.name));
666 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
674 jj_consume_token(COMMA);
675 variableDeclaration = VariableDeclarator();
676 arrayList.add(variableDeclaration);
677 outlineInfo.addVariable(new String(variableDeclaration.name));
680 jj_consume_token(SEMICOLON);
681 } catch (ParseException e) {
682 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
684 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
685 errorEnd = SimpleCharStream.getPosition() + 1;
686 processParseException(e);
688 list = new VariableDeclaration[arrayList.size()];
689 arrayList.toArray(list);
690 {if (true) return new FieldDeclaration(list,
692 SimpleCharStream.getPosition(),
694 throw new Error("Missing return statement in function");
697 static final public VariableDeclaration VariableDeclarator() throws ParseException {
698 final String varName;
699 Expression initializer = null;
700 final int pos = SimpleCharStream.getPosition();
701 varName = VariableDeclaratorId();
702 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
704 jj_consume_token(ASSIGN);
706 initializer = VariableInitializer();
707 } catch (ParseException e) {
708 errorMessage = "Literal expression expected in variable initializer";
710 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
711 errorEnd = SimpleCharStream.getPosition() + 1;
719 if (initializer == null) {
720 {if (true) return new VariableDeclaration(currentSegment,
721 varName.toCharArray(),
723 SimpleCharStream.getPosition());}
725 {if (true) return new VariableDeclaration(currentSegment,
726 varName.toCharArray(),
729 throw new Error("Missing return statement in function");
734 * @return the variable name (with suffix)
736 static final public String VariableDeclaratorId() throws ParseException {
738 Expression expression = null;
739 final int pos = SimpleCharStream.getPosition();
740 ConstantIdentifier ex;
750 ex = new ConstantIdentifier(expr.toCharArray(),
752 SimpleCharStream.getPosition());
753 expression = VariableSuffix(ex);
755 if (expression == null) {
756 {if (true) return expr;}
758 {if (true) return expression.toStringExpression();}
759 } catch (ParseException e) {
760 errorMessage = "'$' expected for variable identifier";
762 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
763 errorEnd = SimpleCharStream.getPosition() + 1;
766 throw new Error("Missing return statement in function");
770 * Return a variablename without the $.
771 * @return a variable name
773 static final public String Variable() throws ParseException {
774 final StringBuffer buff;
775 Expression expression = null;
778 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
780 token = jj_consume_token(DOLLAR_ID);
781 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
783 jj_consume_token(LBRACE);
784 expression = Expression();
785 jj_consume_token(RBRACE);
791 if (expression == null) {
792 {if (true) return token.image.substring(1);}
794 buff = new StringBuffer(token.image);
796 buff.append(expression.toStringExpression());
798 {if (true) return buff.toString();}
801 jj_consume_token(DOLLAR);
802 expr = VariableName();
803 {if (true) return expr;}
807 jj_consume_token(-1);
808 throw new ParseException();
810 throw new Error("Missing return statement in function");
814 * A Variable name (without the $)
815 * @return a variable name String
817 static final public String VariableName() throws ParseException {
818 final StringBuffer buff;
820 Expression expression = null;
822 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
824 jj_consume_token(LBRACE);
825 expression = Expression();
826 jj_consume_token(RBRACE);
827 buff = new StringBuffer("{");
828 buff.append(expression.toStringExpression());
830 {if (true) return buff.toString();}
833 token = jj_consume_token(IDENTIFIER);
834 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
836 jj_consume_token(LBRACE);
837 expression = Expression();
838 jj_consume_token(RBRACE);
844 if (expression == null) {
845 {if (true) return token.image;}
847 buff = new StringBuffer(token.image);
849 buff.append(expression.toStringExpression());
851 {if (true) return buff.toString();}
854 jj_consume_token(DOLLAR);
855 expr = VariableName();
856 buff = new StringBuffer("$");
858 {if (true) return buff.toString();}
861 token = jj_consume_token(DOLLAR_ID);
862 {if (true) return token.image;}
866 jj_consume_token(-1);
867 throw new ParseException();
869 throw new Error("Missing return statement in function");
872 static final public Expression VariableInitializer() throws ParseException {
873 final Expression expr;
875 final int pos = SimpleCharStream.getPosition();
876 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
880 case INTEGER_LITERAL:
881 case FLOATING_POINT_LITERAL:
884 {if (true) return expr;}
887 jj_consume_token(MINUS);
888 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
889 case INTEGER_LITERAL:
890 token = jj_consume_token(INTEGER_LITERAL);
892 case FLOATING_POINT_LITERAL:
893 token = jj_consume_token(FLOATING_POINT_LITERAL);
897 jj_consume_token(-1);
898 throw new ParseException();
900 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
902 SimpleCharStream.getPosition()),
907 jj_consume_token(PLUS);
908 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
909 case INTEGER_LITERAL:
910 token = jj_consume_token(INTEGER_LITERAL);
912 case FLOATING_POINT_LITERAL:
913 token = jj_consume_token(FLOATING_POINT_LITERAL);
917 jj_consume_token(-1);
918 throw new ParseException();
920 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
922 SimpleCharStream.getPosition()),
927 expr = ArrayDeclarator();
928 {if (true) return expr;}
931 token = jj_consume_token(IDENTIFIER);
932 {if (true) return new ConstantIdentifier(token.image.toCharArray(),pos,SimpleCharStream.getPosition());}
936 jj_consume_token(-1);
937 throw new ParseException();
939 throw new Error("Missing return statement in function");
942 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
943 final Expression expr,expr2;
945 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
947 jj_consume_token(ARRAYASSIGN);
948 expr2 = Expression();
949 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
955 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
956 throw new Error("Missing return statement in function");
959 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
960 ArrayVariableDeclaration expr;
961 final ArrayList list = new ArrayList();
962 jj_consume_token(LPAREN);
963 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
979 case INTEGER_LITERAL:
980 case FLOATING_POINT_LITERAL:
985 expr = ArrayVariable();
994 jj_consume_token(COMMA);
995 expr = ArrayVariable();
1000 jj_la1[19] = jj_gen;
1003 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1005 jj_consume_token(COMMA);
1009 jj_la1[20] = jj_gen;
1012 jj_consume_token(RPAREN);
1013 final ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1015 {if (true) return vars;}
1016 throw new Error("Missing return statement in function");
1020 * A Method Declaration.
1021 * <b>function</b> MetodDeclarator() Block()
1023 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1024 final MethodDeclaration functionDeclaration;
1026 final OutlineableWithChildren seg = currentSegment;
1027 jj_consume_token(FUNCTION);
1029 functionDeclaration = MethodDeclarator();
1030 outlineInfo.addVariable(new String(functionDeclaration.name));
1031 } catch (ParseException e) {
1032 if (errorMessage != null) {if (true) throw e;}
1033 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1035 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1036 errorEnd = SimpleCharStream.getPosition() + 1;
1037 {if (true) throw e;}
1039 currentSegment = functionDeclaration;
1041 functionDeclaration.statements = block.statements;
1042 currentSegment = seg;
1043 {if (true) return functionDeclaration;}
1044 throw new Error("Missing return statement in function");
1048 * A MethodDeclarator.
1049 * [&] IDENTIFIER(parameters ...).
1050 * @return a function description for the outline
1052 static final public MethodDeclaration MethodDeclarator() throws ParseException {
1053 final Token identifier;
1054 Token reference = null;
1055 final Hashtable formalParameters;
1056 final int pos = SimpleCharStream.getPosition();
1057 char[] identifierChar = SYNTAX_ERROR_CHAR;
1058 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1060 reference = jj_consume_token(BIT_AND);
1063 jj_la1[21] = jj_gen;
1067 identifier = jj_consume_token(IDENTIFIER);
1068 identifierChar = identifier.image.toCharArray();
1069 } catch (ParseException e) {
1070 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1072 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1073 errorEnd = SimpleCharStream.getPosition() + 1;
1074 processParseException(e);
1076 formalParameters = FormalParameters();
1077 {if (true) return new MethodDeclaration(currentSegment,
1082 SimpleCharStream.getPosition());}
1083 throw new Error("Missing return statement in function");
1087 * FormalParameters follows method identifier.
1088 * (FormalParameter())
1090 static final public Hashtable FormalParameters() throws ParseException {
1091 VariableDeclaration var;
1092 final Hashtable parameters = new Hashtable();
1094 jj_consume_token(LPAREN);
1095 } catch (ParseException e) {
1096 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1098 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1099 errorEnd = SimpleCharStream.getPosition() + 1;
1100 processParseException(e);
1102 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1106 var = FormalParameter();
1107 parameters.put(new String(var.name),var);
1110 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1115 jj_la1[22] = jj_gen;
1118 jj_consume_token(COMMA);
1119 var = FormalParameter();
1120 parameters.put(new String(var.name),var);
1124 jj_la1[23] = jj_gen;
1128 jj_consume_token(RPAREN);
1129 } catch (ParseException e) {
1130 errorMessage = "')' expected";
1132 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1133 errorEnd = SimpleCharStream.getPosition() + 1;
1134 processParseException(e);
1136 {if (true) return parameters;}
1137 throw new Error("Missing return statement in function");
1141 * A formal parameter.
1142 * $varname[=value] (,$varname[=value])
1144 static final public VariableDeclaration FormalParameter() throws ParseException {
1145 final VariableDeclaration variableDeclaration;
1147 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1149 token = jj_consume_token(BIT_AND);
1152 jj_la1[24] = jj_gen;
1155 variableDeclaration = VariableDeclarator();
1156 if (token != null) {
1157 variableDeclaration.setReference(true);
1159 {if (true) return variableDeclaration;}
1160 throw new Error("Missing return statement in function");
1163 static final public ConstantIdentifier Type() throws ParseException {
1165 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1167 jj_consume_token(STRING);
1168 pos = SimpleCharStream.getPosition();
1169 {if (true) return new ConstantIdentifier(Types.STRING,pos,pos-6);}
1172 jj_consume_token(BOOL);
1173 pos = SimpleCharStream.getPosition();
1174 {if (true) return new ConstantIdentifier(Types.BOOL,pos,pos-4);}
1177 jj_consume_token(BOOLEAN);
1178 pos = SimpleCharStream.getPosition();
1179 {if (true) return new ConstantIdentifier(Types.BOOLEAN,pos,pos-7);}
1182 jj_consume_token(REAL);
1183 pos = SimpleCharStream.getPosition();
1184 {if (true) return new ConstantIdentifier(Types.REAL,pos,pos-4);}
1187 jj_consume_token(DOUBLE);
1188 pos = SimpleCharStream.getPosition();
1189 {if (true) return new ConstantIdentifier(Types.DOUBLE,pos,pos-5);}
1192 jj_consume_token(FLOAT);
1193 pos = SimpleCharStream.getPosition();
1194 {if (true) return new ConstantIdentifier(Types.FLOAT,pos,pos-5);}
1197 jj_consume_token(INT);
1198 pos = SimpleCharStream.getPosition();
1199 {if (true) return new ConstantIdentifier(Types.INT,pos,pos-3);}
1202 jj_consume_token(INTEGER);
1203 pos = SimpleCharStream.getPosition();
1204 {if (true) return new ConstantIdentifier(Types.INTEGER,pos,pos-7);}
1207 jj_consume_token(OBJECT);
1208 pos = SimpleCharStream.getPosition();
1209 {if (true) return new ConstantIdentifier(Types.OBJECT,pos,pos-6);}
1212 jj_la1[25] = jj_gen;
1213 jj_consume_token(-1);
1214 throw new ParseException();
1216 throw new Error("Missing return statement in function");
1219 static final public Expression Expression() throws ParseException {
1220 final Expression expr;
1221 Expression initializer = null;
1222 int assignOperator = -1;
1223 final int pos = SimpleCharStream.getPosition();
1224 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1238 case INTEGER_LITERAL:
1239 case FLOATING_POINT_LITERAL:
1240 case STRING_LITERAL:
1244 expr = ConditionalExpression();
1245 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1258 case RSIGNEDSHIFTASSIGN:
1259 assignOperator = AssignmentOperator();
1261 final int errorStart = SimpleCharStream.getPosition();
1262 initializer = Expression();
1263 } catch (ParseException e) {
1264 if (errorMessage != null) {
1265 {if (true) throw e;}
1267 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1269 errorEnd = SimpleCharStream.getPosition();
1270 {if (true) throw e;}
1274 jj_la1[26] = jj_gen;
1277 if (assignOperator == -1) {if (true) return expr;}
1278 {if (true) return new VarAssignation(expr,
1282 SimpleCharStream.getPosition());}
1283 {if (true) return expr;}
1287 expr = ExpressionWBang();
1288 {if (true) return expr;}
1291 jj_la1[27] = jj_gen;
1292 jj_consume_token(-1);
1293 throw new ParseException();
1295 throw new Error("Missing return statement in function");
1298 static final public Expression ExpressionWBang() throws ParseException {
1299 final Expression expr;
1300 final int pos = SimpleCharStream.getPosition();
1301 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1303 jj_consume_token(BANG);
1304 expr = ExpressionWBang();
1305 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1309 expr = ExpressionNoBang();
1310 {if (true) return expr;}
1313 jj_la1[28] = jj_gen;
1314 jj_consume_token(-1);
1315 throw new ParseException();
1317 throw new Error("Missing return statement in function");
1320 static final public Expression ExpressionNoBang() throws ParseException {
1321 final Expression expr;
1322 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1324 expr = PrintExpression();
1325 {if (true) return expr;}
1328 expr = ListExpression();
1329 {if (true) return expr;}
1332 jj_la1[29] = jj_gen;
1333 jj_consume_token(-1);
1334 throw new ParseException();
1336 throw new Error("Missing return statement in function");
1340 * Any assignement operator.
1341 * @return the assignement operator id
1343 static final public int AssignmentOperator() throws ParseException {
1344 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1346 jj_consume_token(ASSIGN);
1347 {if (true) return VarAssignation.EQUAL;}
1350 jj_consume_token(STARASSIGN);
1351 {if (true) return VarAssignation.STAR_EQUAL;}
1354 jj_consume_token(SLASHASSIGN);
1355 {if (true) return VarAssignation.SLASH_EQUAL;}
1358 jj_consume_token(REMASSIGN);
1359 {if (true) return VarAssignation.REM_EQUAL;}
1362 jj_consume_token(PLUSASSIGN);
1363 {if (true) return VarAssignation.PLUS_EQUAL;}
1366 jj_consume_token(MINUSASSIGN);
1367 {if (true) return VarAssignation.MINUS_EQUAL;}
1370 jj_consume_token(LSHIFTASSIGN);
1371 {if (true) return VarAssignation.LSHIFT_EQUAL;}
1373 case RSIGNEDSHIFTASSIGN:
1374 jj_consume_token(RSIGNEDSHIFTASSIGN);
1375 {if (true) return VarAssignation.RSIGNEDSHIFT_EQUAL;}
1378 jj_consume_token(ANDASSIGN);
1379 {if (true) return VarAssignation.AND_EQUAL;}
1382 jj_consume_token(XORASSIGN);
1383 {if (true) return VarAssignation.XOR_EQUAL;}
1386 jj_consume_token(ORASSIGN);
1387 {if (true) return VarAssignation.OR_EQUAL;}
1390 jj_consume_token(DOTASSIGN);
1391 {if (true) return VarAssignation.DOT_EQUAL;}
1394 jj_consume_token(TILDEEQUAL);
1395 {if (true) return VarAssignation.TILDE_EQUAL;}
1398 jj_la1[30] = jj_gen;
1399 jj_consume_token(-1);
1400 throw new ParseException();
1402 throw new Error("Missing return statement in function");
1405 static final public Expression ConditionalExpression() throws ParseException {
1406 final Expression expr;
1407 Expression expr2 = null;
1408 Expression expr3 = null;
1409 expr = ConditionalOrExpression();
1410 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1412 jj_consume_token(HOOK);
1413 expr2 = Expression();
1414 jj_consume_token(COLON);
1415 expr3 = ConditionalExpression();
1418 jj_la1[31] = jj_gen;
1421 if (expr3 == null) {
1422 {if (true) return expr;}
1424 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1425 throw new Error("Missing return statement in function");
1428 static final public Expression ConditionalOrExpression() throws ParseException {
1429 Expression expr,expr2;
1431 expr = ConditionalAndExpression();
1434 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1440 jj_la1[32] = jj_gen;
1443 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1445 jj_consume_token(OR_OR);
1446 operator = OperatorIds.OR_OR;
1449 jj_consume_token(_ORL);
1450 operator = OperatorIds.ORL;
1453 jj_la1[33] = jj_gen;
1454 jj_consume_token(-1);
1455 throw new ParseException();
1457 expr2 = ConditionalAndExpression();
1458 expr = new BinaryExpression(expr,expr2,operator);
1460 {if (true) return expr;}
1461 throw new Error("Missing return statement in function");
1464 static final public Expression ConditionalAndExpression() throws ParseException {
1465 Expression expr,expr2;
1467 expr = ConcatExpression();
1470 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1476 jj_la1[34] = jj_gen;
1479 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1481 jj_consume_token(AND_AND);
1482 operator = OperatorIds.AND_AND;
1485 jj_consume_token(_ANDL);
1486 operator = OperatorIds.ANDL;
1489 jj_la1[35] = jj_gen;
1490 jj_consume_token(-1);
1491 throw new ParseException();
1493 expr2 = ConcatExpression();
1494 expr = new BinaryExpression(expr,expr2,operator);
1496 {if (true) return expr;}
1497 throw new Error("Missing return statement in function");
1500 static final public Expression ConcatExpression() throws ParseException {
1501 Expression expr,expr2;
1502 expr = InclusiveOrExpression();
1505 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1510 jj_la1[36] = jj_gen;
1513 jj_consume_token(DOT);
1514 expr2 = InclusiveOrExpression();
1515 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1517 {if (true) return expr;}
1518 throw new Error("Missing return statement in function");
1521 static final public Expression InclusiveOrExpression() throws ParseException {
1522 Expression expr,expr2;
1523 expr = ExclusiveOrExpression();
1526 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1531 jj_la1[37] = jj_gen;
1534 jj_consume_token(BIT_OR);
1535 expr2 = ExclusiveOrExpression();
1536 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1538 {if (true) return expr;}
1539 throw new Error("Missing return statement in function");
1542 static final public Expression ExclusiveOrExpression() throws ParseException {
1543 Expression expr,expr2;
1544 expr = AndExpression();
1547 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1552 jj_la1[38] = jj_gen;
1555 jj_consume_token(XOR);
1556 expr2 = AndExpression();
1557 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1559 {if (true) return expr;}
1560 throw new Error("Missing return statement in function");
1563 static final public Expression AndExpression() throws ParseException {
1564 Expression expr,expr2;
1565 expr = EqualityExpression();
1568 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1573 jj_la1[39] = jj_gen;
1576 jj_consume_token(BIT_AND);
1577 expr2 = EqualityExpression();
1578 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1580 {if (true) return expr;}
1581 throw new Error("Missing return statement in function");
1584 static final public Expression EqualityExpression() throws ParseException {
1585 Expression expr,expr2;
1587 expr = RelationalExpression();
1590 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1594 case BANGDOUBLEEQUAL:
1599 jj_la1[40] = jj_gen;
1602 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1604 jj_consume_token(EQUAL_EQUAL);
1605 operator = OperatorIds.EQUAL_EQUAL;
1608 jj_consume_token(DIF);
1609 operator = OperatorIds.DIF;
1612 jj_consume_token(NOT_EQUAL);
1613 operator = OperatorIds.DIF;
1615 case BANGDOUBLEEQUAL:
1616 jj_consume_token(BANGDOUBLEEQUAL);
1617 operator = OperatorIds.BANG_EQUAL_EQUAL;
1620 jj_consume_token(TRIPLEEQUAL);
1621 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1624 jj_la1[41] = jj_gen;
1625 jj_consume_token(-1);
1626 throw new ParseException();
1629 expr2 = RelationalExpression();
1630 } catch (ParseException e) {
1631 if (errorMessage != null) {
1632 {if (true) throw e;}
1634 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1636 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1637 errorEnd = SimpleCharStream.getPosition() + 1;
1638 {if (true) throw e;}
1640 expr = new BinaryExpression(expr,expr2,operator);
1642 {if (true) return expr;}
1643 throw new Error("Missing return statement in function");
1646 static final public Expression RelationalExpression() throws ParseException {
1647 Expression expr,expr2;
1649 expr = ShiftExpression();
1652 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1660 jj_la1[42] = jj_gen;
1663 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1665 jj_consume_token(LT);
1666 operator = OperatorIds.LESS;
1669 jj_consume_token(GT);
1670 operator = OperatorIds.GREATER;
1673 jj_consume_token(LE);
1674 operator = OperatorIds.LESS_EQUAL;
1677 jj_consume_token(GE);
1678 operator = OperatorIds.GREATER_EQUAL;
1681 jj_la1[43] = jj_gen;
1682 jj_consume_token(-1);
1683 throw new ParseException();
1685 expr2 = ShiftExpression();
1686 expr = new BinaryExpression(expr,expr2,operator);
1688 {if (true) return expr;}
1689 throw new Error("Missing return statement in function");
1692 static final public Expression ShiftExpression() throws ParseException {
1693 Expression expr,expr2;
1695 expr = AdditiveExpression();
1698 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1701 case RUNSIGNEDSHIFT:
1705 jj_la1[44] = jj_gen;
1708 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1710 jj_consume_token(LSHIFT);
1711 operator = OperatorIds.LEFT_SHIFT;
1714 jj_consume_token(RSIGNEDSHIFT);
1715 operator = OperatorIds.RIGHT_SHIFT;
1717 case RUNSIGNEDSHIFT:
1718 jj_consume_token(RUNSIGNEDSHIFT);
1719 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1722 jj_la1[45] = jj_gen;
1723 jj_consume_token(-1);
1724 throw new ParseException();
1726 expr2 = AdditiveExpression();
1727 expr = new BinaryExpression(expr,expr2,operator);
1729 {if (true) return expr;}
1730 throw new Error("Missing return statement in function");
1733 static final public Expression AdditiveExpression() throws ParseException {
1734 Expression expr,expr2;
1736 expr = MultiplicativeExpression();
1739 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1745 jj_la1[46] = jj_gen;
1748 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1750 jj_consume_token(PLUS);
1751 operator = OperatorIds.PLUS;
1754 jj_consume_token(MINUS);
1755 operator = OperatorIds.MINUS;
1758 jj_la1[47] = jj_gen;
1759 jj_consume_token(-1);
1760 throw new ParseException();
1762 expr2 = MultiplicativeExpression();
1763 expr = new BinaryExpression(expr,expr2,operator);
1765 {if (true) return expr;}
1766 throw new Error("Missing return statement in function");
1769 static final public Expression MultiplicativeExpression() throws ParseException {
1770 Expression expr,expr2;
1773 expr = UnaryExpression();
1774 } catch (ParseException e) {
1775 if (errorMessage != null) {if (true) throw e;}
1776 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1778 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1779 errorEnd = SimpleCharStream.getPosition() + 1;
1780 {if (true) throw e;}
1784 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1791 jj_la1[48] = jj_gen;
1794 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1796 jj_consume_token(STAR);
1797 operator = OperatorIds.MULTIPLY;
1800 jj_consume_token(SLASH);
1801 operator = OperatorIds.DIVIDE;
1804 jj_consume_token(REMAINDER);
1805 operator = OperatorIds.REMAINDER;
1808 jj_la1[49] = jj_gen;
1809 jj_consume_token(-1);
1810 throw new ParseException();
1812 expr2 = UnaryExpression();
1813 expr = new BinaryExpression(expr,expr2,operator);
1815 {if (true) return expr;}
1816 throw new Error("Missing return statement in function");
1820 * An unary expression starting with @, & or nothing
1822 static final public Expression UnaryExpression() throws ParseException {
1823 final Expression expr;
1824 final int pos = SimpleCharStream.getPosition();
1825 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1827 jj_consume_token(BIT_AND);
1828 expr = UnaryExpressionNoPrefix();
1829 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1843 case INTEGER_LITERAL:
1844 case FLOATING_POINT_LITERAL:
1845 case STRING_LITERAL:
1849 expr = AtUnaryExpression();
1850 {if (true) return expr;}
1853 jj_la1[50] = jj_gen;
1854 jj_consume_token(-1);
1855 throw new ParseException();
1857 throw new Error("Missing return statement in function");
1860 static final public Expression AtUnaryExpression() throws ParseException {
1861 final Expression expr;
1862 final int pos = SimpleCharStream.getPosition();
1863 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1865 jj_consume_token(AT);
1866 expr = AtUnaryExpression();
1867 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,pos);}
1880 case INTEGER_LITERAL:
1881 case FLOATING_POINT_LITERAL:
1882 case STRING_LITERAL:
1886 expr = UnaryExpressionNoPrefix();
1887 {if (true) return expr;}
1890 jj_la1[51] = jj_gen;
1891 jj_consume_token(-1);
1892 throw new ParseException();
1894 throw new Error("Missing return statement in function");
1897 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
1898 final Expression expr;
1900 final int pos = SimpleCharStream.getPosition();
1901 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1904 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1906 jj_consume_token(PLUS);
1907 operator = OperatorIds.PLUS;
1910 jj_consume_token(MINUS);
1911 operator = OperatorIds.MINUS;
1914 jj_la1[52] = jj_gen;
1915 jj_consume_token(-1);
1916 throw new ParseException();
1918 expr = UnaryExpression();
1919 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1923 expr = PreIncDecExpression();
1924 {if (true) return expr;}
1933 case INTEGER_LITERAL:
1934 case FLOATING_POINT_LITERAL:
1935 case STRING_LITERAL:
1939 expr = UnaryExpressionNotPlusMinus();
1940 {if (true) return expr;}
1943 jj_la1[53] = jj_gen;
1944 jj_consume_token(-1);
1945 throw new ParseException();
1947 throw new Error("Missing return statement in function");
1950 static final public Expression PreIncDecExpression() throws ParseException {
1951 final Expression expr;
1953 final int pos = SimpleCharStream.getPosition();
1954 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1956 jj_consume_token(PLUS_PLUS);
1957 operator = OperatorIds.PLUS_PLUS;
1960 jj_consume_token(MINUS_MINUS);
1961 operator = OperatorIds.MINUS_MINUS;
1964 jj_la1[54] = jj_gen;
1965 jj_consume_token(-1);
1966 throw new ParseException();
1968 expr = PrimaryExpression();
1969 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1970 throw new Error("Missing return statement in function");
1973 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
1974 final Expression expr;
1975 final int pos = SimpleCharStream.getPosition();
1976 if (jj_2_3(2147483647)) {
1977 expr = CastExpression();
1978 {if (true) return expr;}
1980 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1982 jj_consume_token(BANG);
1983 expr = UnaryExpression();
1984 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1991 expr = PostfixExpression();
1992 {if (true) return expr;}
1997 case INTEGER_LITERAL:
1998 case FLOATING_POINT_LITERAL:
1999 case STRING_LITERAL:
2001 {if (true) return expr;}
2004 jj_consume_token(LPAREN);
2005 expr = Expression();
2007 jj_consume_token(RPAREN);
2008 } catch (ParseException e) {
2009 errorMessage = "')' expected";
2011 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2012 errorEnd = SimpleCharStream.getPosition() + 1;
2013 {if (true) throw e;}
2015 {if (true) return expr;}
2018 jj_la1[55] = jj_gen;
2019 jj_consume_token(-1);
2020 throw new ParseException();
2023 throw new Error("Missing return statement in function");
2026 static final public CastExpression CastExpression() throws ParseException {
2027 final ConstantIdentifier type;
2028 final Expression expr;
2029 final int pos = SimpleCharStream.getPosition();
2030 jj_consume_token(LPAREN);
2031 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2044 jj_consume_token(ARRAY);
2045 type = new ConstantIdentifier(Types.ARRAY,pos,SimpleCharStream.getPosition());
2048 jj_la1[56] = jj_gen;
2049 jj_consume_token(-1);
2050 throw new ParseException();
2052 jj_consume_token(RPAREN);
2053 expr = UnaryExpression();
2054 {if (true) return new CastExpression(type,expr,pos,SimpleCharStream.getPosition());}
2055 throw new Error("Missing return statement in function");
2058 static final public Expression PostfixExpression() throws ParseException {
2059 final Expression expr;
2061 final int pos = SimpleCharStream.getPosition();
2062 expr = PrimaryExpression();
2063 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2066 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2068 jj_consume_token(PLUS_PLUS);
2069 operator = OperatorIds.PLUS_PLUS;
2072 jj_consume_token(MINUS_MINUS);
2073 operator = OperatorIds.MINUS_MINUS;
2076 jj_la1[57] = jj_gen;
2077 jj_consume_token(-1);
2078 throw new ParseException();
2082 jj_la1[58] = jj_gen;
2085 if (operator == -1) {
2086 {if (true) return expr;}
2088 {if (true) return new PostfixedUnaryExpression(expr,operator,pos);}
2089 throw new Error("Missing return statement in function");
2092 static final public Expression PrimaryExpression() throws ParseException {
2093 final Token identifier;
2095 final int pos = SimpleCharStream.getPosition();
2096 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2101 expr = PrimaryPrefix();
2104 if (jj_2_4(2147483647)) {
2109 expr = PrimarySuffix(expr);
2111 {if (true) return expr;}
2114 expr = ArrayDeclarator();
2115 {if (true) return expr;}
2118 jj_la1[59] = jj_gen;
2119 jj_consume_token(-1);
2120 throw new ParseException();
2122 throw new Error("Missing return statement in function");
2125 static final public Expression PrimaryPrefix() throws ParseException {
2126 final Expression expr;
2129 final int pos = SimpleCharStream.getPosition();
2130 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2132 token = jj_consume_token(IDENTIFIER);
2133 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2135 SimpleCharStream.getPosition());}
2138 jj_consume_token(NEW);
2139 expr = ClassIdentifier();
2140 {if (true) return new PrefixedUnaryExpression(expr,
2146 var = VariableDeclaratorId();
2147 {if (true) return new VariableDeclaration(currentSegment,
2150 SimpleCharStream.getPosition());}
2153 jj_la1[60] = jj_gen;
2154 jj_consume_token(-1);
2155 throw new ParseException();
2157 throw new Error("Missing return statement in function");
2160 static final public AbstractSuffixExpression PrimarySuffix(final Expression prefix) throws ParseException {
2161 final AbstractSuffixExpression suffix;
2162 final Expression expr;
2163 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2165 suffix = Arguments(prefix);
2166 {if (true) return suffix;}
2170 suffix = VariableSuffix(prefix);
2171 {if (true) return suffix;}
2173 case STATICCLASSACCESS:
2174 jj_consume_token(STATICCLASSACCESS);
2175 expr = ClassIdentifier();
2176 suffix = new ClassAccess(prefix,
2178 ClassAccess.STATIC);
2179 {if (true) return suffix;}
2182 jj_la1[61] = jj_gen;
2183 jj_consume_token(-1);
2184 throw new ParseException();
2186 throw new Error("Missing return statement in function");
2190 * An array declarator.
2194 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2195 final ArrayVariableDeclaration[] vars;
2196 final int pos = SimpleCharStream.getPosition();
2197 jj_consume_token(ARRAY);
2198 vars = ArrayInitializer();
2199 {if (true) return new ArrayInitializer(vars,pos,SimpleCharStream.getPosition());}
2200 throw new Error("Missing return statement in function");
2203 static final public PrefixedUnaryExpression classInstantiation() throws ParseException {
2205 final StringBuffer buff;
2206 final int pos = SimpleCharStream.getPosition();
2207 jj_consume_token(NEW);
2208 expr = ClassIdentifier();
2209 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2215 buff = new StringBuffer(expr.toStringExpression());
2216 expr = PrimaryExpression();
2217 buff.append(expr.toStringExpression());
2218 expr = new ConstantIdentifier(buff.toString().toCharArray(),
2220 SimpleCharStream.getPosition());
2223 jj_la1[62] = jj_gen;
2226 {if (true) return new PrefixedUnaryExpression(expr,
2229 throw new Error("Missing return statement in function");
2232 static final public ConstantIdentifier ClassIdentifier() throws ParseException {
2235 final int pos = SimpleCharStream.getPosition();
2236 final ConstantIdentifier type;
2237 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2239 token = jj_consume_token(IDENTIFIER);
2240 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2242 SimpleCharStream.getPosition());}
2254 {if (true) return type;}
2258 expr = VariableDeclaratorId();
2259 {if (true) return new ConstantIdentifier(expr.toCharArray(),
2261 SimpleCharStream.getPosition());}
2264 jj_la1[63] = jj_gen;
2265 jj_consume_token(-1);
2266 throw new ParseException();
2268 throw new Error("Missing return statement in function");
2271 static final public AbstractSuffixExpression VariableSuffix(final Expression prefix) throws ParseException {
2273 final int pos = SimpleCharStream.getPosition();
2274 Expression expression = null;
2275 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2277 jj_consume_token(CLASSACCESS);
2279 expr = VariableName();
2280 } catch (ParseException e) {
2281 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2283 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2284 errorEnd = SimpleCharStream.getPosition() + 1;
2285 {if (true) throw e;}
2287 {if (true) return new ClassAccess(prefix,
2288 new ConstantIdentifier(expr.toCharArray(),pos,SimpleCharStream.getPosition()),
2289 ClassAccess.NORMAL);}
2292 jj_consume_token(LBRACKET);
2293 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2318 case INTEGER_LITERAL:
2319 case FLOATING_POINT_LITERAL:
2320 case STRING_LITERAL:
2324 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2340 case INTEGER_LITERAL:
2341 case FLOATING_POINT_LITERAL:
2342 case STRING_LITERAL:
2346 expression = Expression();
2357 expression = Type();
2360 jj_la1[64] = jj_gen;
2361 jj_consume_token(-1);
2362 throw new ParseException();
2366 jj_la1[65] = jj_gen;
2370 jj_consume_token(RBRACKET);
2371 } catch (ParseException e) {
2372 errorMessage = "']' expected";
2374 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2375 errorEnd = SimpleCharStream.getPosition() + 1;
2376 {if (true) throw e;}
2378 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2381 jj_la1[66] = jj_gen;
2382 jj_consume_token(-1);
2383 throw new ParseException();
2385 throw new Error("Missing return statement in function");
2388 static final public Literal Literal() throws ParseException {
2391 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2392 case INTEGER_LITERAL:
2393 token = jj_consume_token(INTEGER_LITERAL);
2394 pos = SimpleCharStream.getPosition();
2395 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2397 case FLOATING_POINT_LITERAL:
2398 token = jj_consume_token(FLOATING_POINT_LITERAL);
2399 pos = SimpleCharStream.getPosition();
2400 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2402 case STRING_LITERAL:
2403 token = jj_consume_token(STRING_LITERAL);
2404 pos = SimpleCharStream.getPosition();
2405 {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length());}
2408 jj_consume_token(TRUE);
2409 pos = SimpleCharStream.getPosition();
2410 {if (true) return new TrueLiteral(pos-4,pos);}
2413 jj_consume_token(FALSE);
2414 pos = SimpleCharStream.getPosition();
2415 {if (true) return new FalseLiteral(pos-4,pos);}
2418 jj_consume_token(NULL);
2419 pos = SimpleCharStream.getPosition();
2420 {if (true) return new NullLiteral(pos-4,pos);}
2423 jj_la1[67] = jj_gen;
2424 jj_consume_token(-1);
2425 throw new ParseException();
2427 throw new Error("Missing return statement in function");
2430 static final public FunctionCall Arguments(final Expression func) throws ParseException {
2431 Expression[] args = null;
2432 jj_consume_token(LPAREN);
2433 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2449 case INTEGER_LITERAL:
2450 case FLOATING_POINT_LITERAL:
2451 case STRING_LITERAL:
2455 args = ArgumentList();
2458 jj_la1[68] = jj_gen;
2462 jj_consume_token(RPAREN);
2463 } catch (ParseException e) {
2464 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2466 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2467 errorEnd = SimpleCharStream.getPosition() + 1;
2468 {if (true) throw e;}
2470 {if (true) return new FunctionCall(func,args,SimpleCharStream.getPosition());}
2471 throw new Error("Missing return statement in function");
2475 * An argument list is a list of arguments separated by comma :
2476 * argumentDeclaration() (, argumentDeclaration)*
2477 * @return an array of arguments
2479 static final public Expression[] ArgumentList() throws ParseException {
2481 final ArrayList list = new ArrayList();
2486 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2491 jj_la1[69] = jj_gen;
2494 jj_consume_token(COMMA);
2498 } catch (ParseException e) {
2499 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2501 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2502 errorEnd = SimpleCharStream.getPosition() + 1;
2503 {if (true) throw e;}
2506 final Expression[] arguments = new Expression[list.size()];
2507 list.toArray(arguments);
2508 {if (true) return arguments;}
2509 throw new Error("Missing return statement in function");
2513 * A Statement without break.
2515 static final public Statement StatementNoBreak() throws ParseException {
2516 final Statement statement;
2519 statement = Expression();
2521 jj_consume_token(SEMICOLON);
2522 } catch (ParseException e) {
2523 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2524 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2526 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2527 errorEnd = SimpleCharStream.getPosition() + 1;
2528 {if (true) throw e;}
2531 {if (true) return statement;}
2532 } else if (jj_2_6(2)) {
2533 statement = LabeledStatement();
2534 {if (true) return statement;}
2536 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2538 statement = Block();
2539 {if (true) return statement;}
2542 statement = EmptyStatement();
2543 {if (true) return statement;}
2552 statement = StatementExpression();
2554 jj_consume_token(SEMICOLON);
2555 } catch (ParseException e) {
2556 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2558 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2559 errorEnd = SimpleCharStream.getPosition() + 1;
2560 {if (true) throw e;}
2562 {if (true) return statement;}
2565 statement = SwitchStatement();
2566 {if (true) return statement;}
2569 statement = IfStatement();
2570 {if (true) return statement;}
2573 statement = WhileStatement();
2574 {if (true) return statement;}
2577 statement = DoStatement();
2578 {if (true) return statement;}
2581 statement = ForStatement();
2582 {if (true) return statement;}
2585 statement = ForeachStatement();
2586 {if (true) return statement;}
2589 statement = ContinueStatement();
2590 {if (true) return statement;}
2593 statement = ReturnStatement();
2594 {if (true) return statement;}
2597 statement = EchoStatement();
2598 {if (true) return statement;}
2605 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2607 token = jj_consume_token(AT);
2610 jj_la1[70] = jj_gen;
2613 statement = IncludeStatement();
2614 if (token != null) {
2615 ((InclusionStatement)statement).silent = true;
2617 {if (true) return statement;}
2620 statement = StaticStatement();
2621 {if (true) return statement;}
2624 statement = GlobalStatement();
2625 {if (true) return statement;}
2628 statement = defineStatement();
2629 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2632 jj_la1[71] = jj_gen;
2633 jj_consume_token(-1);
2634 throw new ParseException();
2637 throw new Error("Missing return statement in function");
2640 static final public Define defineStatement() throws ParseException {
2641 final int start = SimpleCharStream.getPosition();
2642 Expression defineName,defineValue;
2643 jj_consume_token(DEFINE);
2645 jj_consume_token(LPAREN);
2646 } catch (ParseException e) {
2647 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2649 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2650 errorEnd = SimpleCharStream.getPosition() + 1;
2651 processParseException(e);
2654 defineName = Expression();
2655 } catch (ParseException e) {
2656 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2658 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2659 errorEnd = SimpleCharStream.getPosition() + 1;
2660 {if (true) throw e;}
2663 jj_consume_token(COMMA);
2664 } catch (ParseException e) {
2665 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2667 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2668 errorEnd = SimpleCharStream.getPosition() + 1;
2669 processParseException(e);
2672 defineValue = Expression();
2673 } catch (ParseException e) {
2674 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2676 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2677 errorEnd = SimpleCharStream.getPosition() + 1;
2678 {if (true) throw e;}
2681 jj_consume_token(RPAREN);
2682 } catch (ParseException e) {
2683 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2685 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2686 errorEnd = SimpleCharStream.getPosition() + 1;
2687 processParseException(e);
2689 {if (true) return new Define(currentSegment,
2693 SimpleCharStream.getPosition());}
2694 throw new Error("Missing return statement in function");
2698 * A Normal statement.
2700 static final public Statement Statement() throws ParseException {
2701 final Statement statement;
2702 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2734 case INTEGER_LITERAL:
2735 case FLOATING_POINT_LITERAL:
2736 case STRING_LITERAL:
2742 statement = StatementNoBreak();
2743 {if (true) return statement;}
2746 statement = BreakStatement();
2747 {if (true) return statement;}
2750 jj_la1[72] = jj_gen;
2751 jj_consume_token(-1);
2752 throw new ParseException();
2754 throw new Error("Missing return statement in function");
2758 * An html block inside a php syntax.
2760 static final public HTMLBlock htmlBlock() throws ParseException {
2761 final int startIndex = nodePtr;
2762 final AstNode[] blockNodes;
2764 jj_consume_token(PHPEND);
2767 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2772 jj_la1[73] = jj_gen;
2778 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2780 jj_consume_token(PHPSTARTLONG);
2783 jj_consume_token(PHPSTARTSHORT);
2786 jj_la1[74] = jj_gen;
2787 jj_consume_token(-1);
2788 throw new ParseException();
2790 } catch (ParseException e) {
2791 errorMessage = "unexpected end of file , '<?php' expected";
2793 errorStart = SimpleCharStream.getPosition();
2794 errorEnd = SimpleCharStream.getPosition();
2795 {if (true) throw e;}
2797 nbNodes = nodePtr - startIndex;
2798 blockNodes = new AstNode[nbNodes];
2799 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2800 nodePtr = startIndex;
2801 {if (true) return new HTMLBlock(blockNodes);}
2802 throw new Error("Missing return statement in function");
2806 * An include statement. It's "include" an expression;
2808 static final public InclusionStatement IncludeStatement() throws ParseException {
2809 final Expression expr;
2811 final int pos = SimpleCharStream.getPosition();
2812 final InclusionStatement inclusionStatement;
2813 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2815 jj_consume_token(REQUIRE);
2816 keyword = InclusionStatement.REQUIRE;
2819 jj_consume_token(REQUIRE_ONCE);
2820 keyword = InclusionStatement.REQUIRE_ONCE;
2823 jj_consume_token(INCLUDE);
2824 keyword = InclusionStatement.INCLUDE;
2827 jj_consume_token(INCLUDE_ONCE);
2828 keyword = InclusionStatement.INCLUDE_ONCE;
2831 jj_la1[75] = jj_gen;
2832 jj_consume_token(-1);
2833 throw new ParseException();
2836 expr = Expression();
2837 } catch (ParseException e) {
2838 if (errorMessage != null) {
2839 {if (true) throw e;}
2841 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
2843 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2844 errorEnd = SimpleCharStream.getPosition() + 1;
2845 {if (true) throw e;}
2847 inclusionStatement = new InclusionStatement(currentSegment,
2851 currentSegment.add(inclusionStatement);
2853 jj_consume_token(SEMICOLON);
2854 } catch (ParseException e) {
2855 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2857 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2858 errorEnd = SimpleCharStream.getPosition() + 1;
2859 {if (true) throw e;}
2861 {if (true) return inclusionStatement;}
2862 throw new Error("Missing return statement in function");
2865 static final public PrintExpression PrintExpression() throws ParseException {
2866 final Expression expr;
2867 final int pos = SimpleCharStream.getPosition();
2868 jj_consume_token(PRINT);
2869 expr = Expression();
2870 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
2871 throw new Error("Missing return statement in function");
2874 static final public ListExpression ListExpression() throws ParseException {
2876 final Expression expression;
2877 final ArrayList list = new ArrayList();
2878 final int pos = SimpleCharStream.getPosition();
2879 jj_consume_token(LIST);
2881 jj_consume_token(LPAREN);
2882 } catch (ParseException e) {
2883 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2885 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2886 errorEnd = SimpleCharStream.getPosition() + 1;
2887 {if (true) throw e;}
2889 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2892 expr = VariableDeclaratorId();
2896 jj_la1[76] = jj_gen;
2899 if (expr == null) list.add(null);
2902 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2907 jj_la1[77] = jj_gen;
2911 jj_consume_token(COMMA);
2912 } catch (ParseException e) {
2913 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2915 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2916 errorEnd = SimpleCharStream.getPosition() + 1;
2917 {if (true) throw e;}
2919 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2922 expr = VariableDeclaratorId();
2926 jj_la1[78] = jj_gen;
2931 jj_consume_token(RPAREN);
2932 } catch (ParseException e) {
2933 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2935 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2936 errorEnd = SimpleCharStream.getPosition() + 1;
2937 {if (true) throw e;}
2939 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2941 jj_consume_token(ASSIGN);
2942 expression = Expression();
2943 final String[] strings = new String[list.size()];
2944 list.toArray(strings);
2945 {if (true) return new ListExpression(strings,
2948 SimpleCharStream.getPosition());}
2951 jj_la1[79] = jj_gen;
2954 final String[] strings = new String[list.size()];
2955 list.toArray(strings);
2956 {if (true) return new ListExpression(strings,pos,SimpleCharStream.getPosition());}
2957 throw new Error("Missing return statement in function");
2961 * An echo statement.
2962 * echo anyexpression (, otherexpression)*
2964 static final public EchoStatement EchoStatement() throws ParseException {
2965 final ArrayList expressions = new ArrayList();
2967 final int pos = SimpleCharStream.getPosition();
2968 jj_consume_token(ECHO);
2969 expr = Expression();
2970 expressions.add(expr);
2973 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2978 jj_la1[80] = jj_gen;
2981 jj_consume_token(COMMA);
2982 expr = Expression();
2983 expressions.add(expr);
2986 jj_consume_token(SEMICOLON);
2987 } catch (ParseException e) {
2988 if (e.currentToken.next.kind != 4) {
2989 errorMessage = "';' expected after 'echo' statement";
2991 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2992 errorEnd = SimpleCharStream.getPosition() + 1;
2993 {if (true) throw e;}
2996 final Expression[] exprs = new Expression[expressions.size()];
2997 expressions.toArray(exprs);
2998 {if (true) return new EchoStatement(exprs,pos);}
2999 throw new Error("Missing return statement in function");
3002 static final public GlobalStatement GlobalStatement() throws ParseException {
3003 final int pos = SimpleCharStream.getPosition();
3005 final ArrayList vars = new ArrayList();
3006 final GlobalStatement global;
3007 jj_consume_token(GLOBAL);
3008 expr = VariableDeclaratorId();
3012 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3017 jj_la1[81] = jj_gen;
3020 jj_consume_token(COMMA);
3021 expr = VariableDeclaratorId();
3025 jj_consume_token(SEMICOLON);
3026 final String[] strings = new String[vars.size()];
3027 vars.toArray(strings);
3028 global = new GlobalStatement(currentSegment,
3031 SimpleCharStream.getPosition());
3032 currentSegment.add(global);
3033 {if (true) return global;}
3034 } catch (ParseException e) {
3035 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3037 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3038 errorEnd = SimpleCharStream.getPosition() + 1;
3039 {if (true) throw e;}
3041 throw new Error("Missing return statement in function");
3044 static final public StaticStatement StaticStatement() throws ParseException {
3045 final int pos = SimpleCharStream.getPosition();
3046 final ArrayList vars = new ArrayList();
3047 VariableDeclaration expr;
3048 jj_consume_token(STATIC);
3049 expr = VariableDeclarator();
3050 vars.add(new String(expr.name));
3053 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3058 jj_la1[82] = jj_gen;
3061 jj_consume_token(COMMA);
3062 expr = VariableDeclarator();
3063 vars.add(new String(expr.name));
3066 jj_consume_token(SEMICOLON);
3067 final String[] strings = new String[vars.size()];
3068 vars.toArray(strings);
3069 {if (true) return new StaticStatement(strings,
3071 SimpleCharStream.getPosition());}
3072 } catch (ParseException e) {
3073 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3075 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3076 errorEnd = SimpleCharStream.getPosition() + 1;
3077 {if (true) throw e;}
3079 throw new Error("Missing return statement in function");
3082 static final public LabeledStatement LabeledStatement() throws ParseException {
3083 final int pos = SimpleCharStream.getPosition();
3085 final Statement statement;
3086 label = jj_consume_token(IDENTIFIER);
3087 jj_consume_token(COLON);
3088 statement = Statement();
3089 {if (true) return new LabeledStatement(label.image.toCharArray(),statement,pos,SimpleCharStream.getPosition());}
3090 throw new Error("Missing return statement in function");
3100 static final public Block Block() throws ParseException {
3101 final int pos = SimpleCharStream.getPosition();
3102 final ArrayList list = new ArrayList();
3103 Statement statement;
3105 jj_consume_token(LBRACE);
3106 } catch (ParseException e) {
3107 errorMessage = "'{' expected";
3109 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3110 errorEnd = SimpleCharStream.getPosition() + 1;
3111 {if (true) throw e;}
3115 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3151 case INTEGER_LITERAL:
3152 case FLOATING_POINT_LITERAL:
3153 case STRING_LITERAL:
3162 jj_la1[83] = jj_gen;
3165 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3200 case INTEGER_LITERAL:
3201 case FLOATING_POINT_LITERAL:
3202 case STRING_LITERAL:
3208 statement = BlockStatement();
3209 list.add(statement);
3212 statement = htmlBlock();
3213 list.add(statement);
3216 jj_la1[84] = jj_gen;
3217 jj_consume_token(-1);
3218 throw new ParseException();
3222 jj_consume_token(RBRACE);
3223 } catch (ParseException e) {
3224 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3226 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3227 errorEnd = SimpleCharStream.getPosition() + 1;
3228 {if (true) throw e;}
3230 final Statement[] statements = new Statement[list.size()];
3231 list.toArray(statements);
3232 {if (true) return new Block(statements,pos,SimpleCharStream.getPosition());}
3233 throw new Error("Missing return statement in function");
3236 static final public Statement BlockStatement() throws ParseException {
3237 final Statement statement;
3238 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3271 case INTEGER_LITERAL:
3272 case FLOATING_POINT_LITERAL:
3273 case STRING_LITERAL:
3279 statement = Statement();
3280 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3281 {if (true) return statement;}
3284 statement = ClassDeclaration();
3285 {if (true) return statement;}
3288 statement = MethodDeclaration();
3289 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3290 currentSegment.add((MethodDeclaration) statement);
3291 {if (true) return statement;}
3294 jj_la1[85] = jj_gen;
3295 jj_consume_token(-1);
3296 throw new ParseException();
3298 throw new Error("Missing return statement in function");
3302 * A Block statement that will not contain any 'break'
3304 static final public Statement BlockStatementNoBreak() throws ParseException {
3305 final Statement statement;
3306 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3338 case INTEGER_LITERAL:
3339 case FLOATING_POINT_LITERAL:
3340 case STRING_LITERAL:
3346 statement = StatementNoBreak();
3347 {if (true) return statement;}
3350 statement = ClassDeclaration();
3351 {if (true) return statement;}
3354 statement = MethodDeclaration();
3355 currentSegment.add((MethodDeclaration) statement);
3356 {if (true) return statement;}
3359 jj_la1[86] = jj_gen;
3360 jj_consume_token(-1);
3361 throw new ParseException();
3363 throw new Error("Missing return statement in function");
3366 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3367 final ArrayList list = new ArrayList();
3368 VariableDeclaration var;
3369 var = LocalVariableDeclarator();
3373 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3378 jj_la1[87] = jj_gen;
3381 jj_consume_token(COMMA);
3382 var = LocalVariableDeclarator();
3385 final VariableDeclaration[] vars = new VariableDeclaration[list.size()];
3387 {if (true) return vars;}
3388 throw new Error("Missing return statement in function");
3391 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3392 final String varName;
3393 Expression initializer = null;
3394 final int pos = SimpleCharStream.getPosition();
3395 varName = VariableDeclaratorId();
3396 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3398 jj_consume_token(ASSIGN);
3399 initializer = Expression();
3402 jj_la1[88] = jj_gen;
3405 if (initializer == null) {
3406 {if (true) return new VariableDeclaration(currentSegment,
3407 varName.toCharArray(),
3409 SimpleCharStream.getPosition());}
3411 {if (true) return new VariableDeclaration(currentSegment,
3412 varName.toCharArray(),
3415 throw new Error("Missing return statement in function");
3418 static final public EmptyStatement EmptyStatement() throws ParseException {
3420 jj_consume_token(SEMICOLON);
3421 pos = SimpleCharStream.getPosition();
3422 {if (true) return new EmptyStatement(pos-1,pos);}
3423 throw new Error("Missing return statement in function");
3426 static final public Expression StatementExpression() throws ParseException {
3427 final Expression expr,expr2;
3429 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3432 expr = PreIncDecExpression();
3433 {if (true) return expr;}
3440 expr = PrimaryExpression();
3441 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3456 case RSIGNEDSHIFTASSIGN:
3457 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3459 jj_consume_token(PLUS_PLUS);
3460 {if (true) return new PostfixedUnaryExpression(expr,
3461 OperatorIds.PLUS_PLUS,
3462 SimpleCharStream.getPosition());}
3465 jj_consume_token(MINUS_MINUS);
3466 {if (true) return new PostfixedUnaryExpression(expr,
3467 OperatorIds.MINUS_MINUS,
3468 SimpleCharStream.getPosition());}
3482 case RSIGNEDSHIFTASSIGN:
3483 operator = AssignmentOperator();
3484 expr2 = Expression();
3485 {if (true) return new BinaryExpression(expr,expr2,operator);}
3488 jj_la1[89] = jj_gen;
3489 jj_consume_token(-1);
3490 throw new ParseException();
3494 jj_la1[90] = jj_gen;
3497 {if (true) return expr;}
3500 jj_la1[91] = jj_gen;
3501 jj_consume_token(-1);
3502 throw new ParseException();
3504 throw new Error("Missing return statement in function");
3507 static final public SwitchStatement SwitchStatement() throws ParseException {
3508 final Expression variable;
3509 final AbstractCase[] cases;
3510 final int pos = SimpleCharStream.getPosition();
3511 jj_consume_token(SWITCH);
3513 jj_consume_token(LPAREN);
3514 } catch (ParseException e) {
3515 errorMessage = "'(' expected after 'switch'";
3517 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3518 errorEnd = SimpleCharStream.getPosition() + 1;
3519 {if (true) throw e;}
3522 variable = Expression();
3523 } catch (ParseException e) {
3524 if (errorMessage != null) {
3525 {if (true) throw e;}
3527 errorMessage = "expression expected";
3529 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3530 errorEnd = SimpleCharStream.getPosition() + 1;
3531 {if (true) throw e;}
3534 jj_consume_token(RPAREN);
3535 } catch (ParseException e) {
3536 errorMessage = "')' expected";
3538 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3539 errorEnd = SimpleCharStream.getPosition() + 1;
3540 {if (true) throw e;}
3542 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3544 cases = switchStatementBrace();
3547 cases = switchStatementColon(pos, pos + 6);
3550 jj_la1[92] = jj_gen;
3551 jj_consume_token(-1);
3552 throw new ParseException();
3554 {if (true) return new SwitchStatement(variable,cases,pos,SimpleCharStream.getPosition());}
3555 throw new Error("Missing return statement in function");
3558 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3560 final ArrayList cases = new ArrayList();
3561 jj_consume_token(LBRACE);
3564 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3570 jj_la1[93] = jj_gen;
3573 cas = switchLabel0();
3577 jj_consume_token(RBRACE);
3578 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3579 cases.toArray(abcase);
3580 {if (true) return abcase;}
3581 } catch (ParseException e) {
3582 errorMessage = "'}' expected";
3584 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3585 errorEnd = SimpleCharStream.getPosition() + 1;
3586 {if (true) throw e;}
3588 throw new Error("Missing return statement in function");
3592 * A Switch statement with : ... endswitch;
3593 * @param start the begin offset of the switch
3594 * @param end the end offset of the switch
3596 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3598 final ArrayList cases = new ArrayList();
3599 jj_consume_token(COLON);
3601 setMarker(fileToParse,
3602 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3606 "Line " + token.beginLine);
3607 } catch (CoreException e) {
3608 PHPeclipsePlugin.log(e);
3612 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3618 jj_la1[94] = jj_gen;
3621 cas = switchLabel0();
3625 jj_consume_token(ENDSWITCH);
3626 } catch (ParseException e) {
3627 errorMessage = "'endswitch' expected";
3629 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3630 errorEnd = SimpleCharStream.getPosition() + 1;
3631 {if (true) throw e;}
3634 jj_consume_token(SEMICOLON);
3635 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3636 cases.toArray(abcase);
3637 {if (true) return abcase;}
3638 } catch (ParseException e) {
3639 errorMessage = "';' expected after 'endswitch' keyword";
3641 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3642 errorEnd = SimpleCharStream.getPosition() + 1;
3643 {if (true) throw e;}
3645 throw new Error("Missing return statement in function");
3648 static final public AbstractCase switchLabel0() throws ParseException {
3649 final Expression expr;
3650 Statement statement;
3651 final ArrayList stmts = new ArrayList();
3652 final int pos = SimpleCharStream.getPosition();
3653 expr = SwitchLabel();
3656 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3691 case INTEGER_LITERAL:
3692 case FLOATING_POINT_LITERAL:
3693 case STRING_LITERAL:
3702 jj_la1[95] = jj_gen;
3705 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3739 case INTEGER_LITERAL:
3740 case FLOATING_POINT_LITERAL:
3741 case STRING_LITERAL:
3747 statement = BlockStatementNoBreak();
3748 stmts.add(statement);
3751 statement = htmlBlock();
3752 stmts.add(statement);
3755 jj_la1[96] = jj_gen;
3756 jj_consume_token(-1);
3757 throw new ParseException();
3760 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3762 statement = BreakStatement();
3763 stmts.add(statement);
3766 jj_la1[97] = jj_gen;
3769 final Statement[] stmtsArray = new Statement[stmts.size()];
3770 stmts.toArray(stmtsArray);
3771 if (expr == null) {//it's a default
3772 {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3774 {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3775 throw new Error("Missing return statement in function");
3780 * case Expression() :
3782 * @return the if it was a case and null if not
3784 static final public Expression SwitchLabel() throws ParseException {
3785 final Expression expr;
3786 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3788 token = jj_consume_token(CASE);
3790 expr = Expression();
3791 } catch (ParseException e) {
3792 if (errorMessage != null) {if (true) throw e;}
3793 errorMessage = "expression expected after 'case' keyword";
3795 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3796 errorEnd = SimpleCharStream.getPosition() + 1;
3797 {if (true) throw e;}
3800 jj_consume_token(COLON);
3801 {if (true) return expr;}
3802 } catch (ParseException e) {
3803 errorMessage = "':' expected after case expression";
3805 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3806 errorEnd = SimpleCharStream.getPosition() + 1;
3807 {if (true) throw e;}
3811 token = jj_consume_token(_DEFAULT);
3813 jj_consume_token(COLON);
3814 {if (true) return null;}
3815 } catch (ParseException e) {
3816 errorMessage = "':' expected after 'default' keyword";
3818 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3819 errorEnd = SimpleCharStream.getPosition() + 1;
3820 {if (true) throw e;}
3824 jj_la1[98] = jj_gen;
3825 jj_consume_token(-1);
3826 throw new ParseException();
3828 throw new Error("Missing return statement in function");
3831 static final public Break BreakStatement() throws ParseException {
3832 Expression expression = null;
3833 final int start = SimpleCharStream.getPosition();
3834 jj_consume_token(BREAK);
3835 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3851 case INTEGER_LITERAL:
3852 case FLOATING_POINT_LITERAL:
3853 case STRING_LITERAL:
3857 expression = Expression();
3860 jj_la1[99] = jj_gen;
3864 jj_consume_token(SEMICOLON);
3865 } catch (ParseException e) {
3866 errorMessage = "';' expected after 'break' keyword";
3868 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3869 errorEnd = SimpleCharStream.getPosition() + 1;
3870 {if (true) throw e;}
3872 {if (true) return new Break(expression, start, SimpleCharStream.getPosition());}
3873 throw new Error("Missing return statement in function");
3876 static final public IfStatement IfStatement() throws ParseException {
3877 final int pos = SimpleCharStream.getPosition();
3878 final Expression condition;
3879 final IfStatement ifStatement;
3880 jj_consume_token(IF);
3881 condition = Condition("if");
3882 ifStatement = IfStatement0(condition, pos,pos+2);
3883 {if (true) return ifStatement;}
3884 throw new Error("Missing return statement in function");
3887 static final public Expression Condition(final String keyword) throws ParseException {
3888 final Expression condition;
3890 jj_consume_token(LPAREN);
3891 } catch (ParseException e) {
3892 errorMessage = "'(' expected after " + keyword + " keyword";
3894 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length();
3895 errorEnd = errorStart +1;
3896 processParseException(e);
3898 condition = Expression();
3900 jj_consume_token(RPAREN);
3901 } catch (ParseException e) {
3902 errorMessage = "')' expected after " + keyword + " keyword";
3904 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3905 errorEnd = SimpleCharStream.getPosition() + 1;
3906 processParseException(e);
3908 {if (true) return condition;}
3909 throw new Error("Missing return statement in function");
3912 static final public IfStatement IfStatement0(final Expression condition, final int start,final int end) throws ParseException {
3913 Statement statement;
3914 final Statement stmt;
3915 final Statement[] statementsArray;
3916 ElseIf elseifStatement;
3917 Else elseStatement = null;
3918 final ArrayList stmts;
3919 final ArrayList elseIfList = new ArrayList();
3920 final ElseIf[] elseIfs;
3921 int pos = SimpleCharStream.getPosition();
3922 final int endStatements;
3923 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3925 jj_consume_token(COLON);
3926 stmts = new ArrayList();
3929 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3963 case INTEGER_LITERAL:
3964 case FLOATING_POINT_LITERAL:
3965 case STRING_LITERAL:
3974 jj_la1[100] = jj_gen;
3977 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4010 case INTEGER_LITERAL:
4011 case FLOATING_POINT_LITERAL:
4012 case STRING_LITERAL:
4018 statement = Statement();
4019 stmts.add(statement);
4022 statement = htmlBlock();
4023 stmts.add(statement);
4026 jj_la1[101] = jj_gen;
4027 jj_consume_token(-1);
4028 throw new ParseException();
4031 endStatements = SimpleCharStream.getPosition();
4034 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4039 jj_la1[102] = jj_gen;
4042 elseifStatement = ElseIfStatementColon();
4043 elseIfList.add(elseifStatement);
4045 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4047 elseStatement = ElseStatementColon();
4050 jj_la1[103] = jj_gen;
4054 setMarker(fileToParse,
4055 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4059 "Line " + token.beginLine);
4060 } catch (CoreException e) {
4061 PHPeclipsePlugin.log(e);
4064 jj_consume_token(ENDIF);
4065 } catch (ParseException e) {
4066 errorMessage = "'endif' expected";
4068 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4069 errorEnd = SimpleCharStream.getPosition() + 1;
4070 {if (true) throw e;}
4073 jj_consume_token(SEMICOLON);
4074 } catch (ParseException e) {
4075 errorMessage = "';' expected after 'endif' keyword";
4077 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4078 errorEnd = SimpleCharStream.getPosition() + 1;
4079 {if (true) throw e;}
4081 elseIfs = new ElseIf[elseIfList.size()];
4082 elseIfList.toArray(elseIfs);
4083 if (stmts.size() == 1) {
4084 {if (true) return new IfStatement(condition,
4085 (Statement) stmts.get(0),
4089 SimpleCharStream.getPosition());}
4091 statementsArray = new Statement[stmts.size()];
4092 stmts.toArray(statementsArray);
4093 {if (true) return new IfStatement(condition,
4094 new Block(statementsArray,pos,endStatements),
4098 SimpleCharStream.getPosition());}
4134 case INTEGER_LITERAL:
4135 case FLOATING_POINT_LITERAL:
4136 case STRING_LITERAL:
4142 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4175 case INTEGER_LITERAL:
4176 case FLOATING_POINT_LITERAL:
4177 case STRING_LITERAL:
4189 jj_la1[104] = jj_gen;
4190 jj_consume_token(-1);
4191 throw new ParseException();
4195 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4200 jj_la1[105] = jj_gen;
4203 elseifStatement = ElseIfStatement();
4204 elseIfList.add(elseifStatement);
4206 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4208 jj_consume_token(ELSE);
4210 pos = SimpleCharStream.getPosition();
4211 statement = Statement();
4212 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4213 } catch (ParseException e) {
4214 if (errorMessage != null) {
4215 {if (true) throw e;}
4217 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4219 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4220 errorEnd = SimpleCharStream.getPosition() + 1;
4221 {if (true) throw e;}
4225 jj_la1[106] = jj_gen;
4228 elseIfs = new ElseIf[elseIfList.size()];
4229 elseIfList.toArray(elseIfs);
4230 {if (true) return new IfStatement(condition,
4235 SimpleCharStream.getPosition());}
4238 jj_la1[107] = jj_gen;
4239 jj_consume_token(-1);
4240 throw new ParseException();
4242 throw new Error("Missing return statement in function");
4245 static final public ElseIf ElseIfStatementColon() throws ParseException {
4246 final Expression condition;
4247 Statement statement;
4248 final ArrayList list = new ArrayList();
4249 final int pos = SimpleCharStream.getPosition();
4250 jj_consume_token(ELSEIF);
4251 condition = Condition("elseif");
4252 jj_consume_token(COLON);
4255 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4289 case INTEGER_LITERAL:
4290 case FLOATING_POINT_LITERAL:
4291 case STRING_LITERAL:
4300 jj_la1[108] = jj_gen;
4303 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4336 case INTEGER_LITERAL:
4337 case FLOATING_POINT_LITERAL:
4338 case STRING_LITERAL:
4344 statement = Statement();
4345 list.add(statement);
4348 statement = htmlBlock();
4349 list.add(statement);
4352 jj_la1[109] = jj_gen;
4353 jj_consume_token(-1);
4354 throw new ParseException();
4357 final Statement[] stmtsArray = new Statement[list.size()];
4358 list.toArray(stmtsArray);
4359 {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4360 throw new Error("Missing return statement in function");
4363 static final public Else ElseStatementColon() throws ParseException {
4364 Statement statement;
4365 final ArrayList list = new ArrayList();
4366 final int pos = SimpleCharStream.getPosition();
4367 jj_consume_token(ELSE);
4368 jj_consume_token(COLON);
4371 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4405 case INTEGER_LITERAL:
4406 case FLOATING_POINT_LITERAL:
4407 case STRING_LITERAL:
4416 jj_la1[110] = jj_gen;
4419 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4452 case INTEGER_LITERAL:
4453 case FLOATING_POINT_LITERAL:
4454 case STRING_LITERAL:
4460 statement = Statement();
4461 list.add(statement);
4464 statement = htmlBlock();
4465 list.add(statement);
4468 jj_la1[111] = jj_gen;
4469 jj_consume_token(-1);
4470 throw new ParseException();
4473 final Statement[] stmtsArray = new Statement[list.size()];
4474 list.toArray(stmtsArray);
4475 {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4476 throw new Error("Missing return statement in function");
4479 static final public ElseIf ElseIfStatement() throws ParseException {
4480 final Expression condition;
4481 final Statement statement;
4482 final ArrayList list = new ArrayList();
4483 final int pos = SimpleCharStream.getPosition();
4484 jj_consume_token(ELSEIF);
4485 condition = Condition("elseif");
4486 statement = Statement();
4487 list.add(statement);/*todo:do better*/
4488 final Statement[] stmtsArray = new Statement[list.size()];
4489 list.toArray(stmtsArray);
4490 {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4491 throw new Error("Missing return statement in function");
4494 static final public WhileStatement WhileStatement() throws ParseException {
4495 final Expression condition;
4496 final Statement action;
4497 final int pos = SimpleCharStream.getPosition();
4498 jj_consume_token(WHILE);
4499 condition = Condition("while");
4500 action = WhileStatement0(pos,pos + 5);
4501 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4502 throw new Error("Missing return statement in function");
4505 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4506 Statement statement;
4507 final ArrayList stmts = new ArrayList();
4508 final int pos = SimpleCharStream.getPosition();
4509 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4511 jj_consume_token(COLON);
4514 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4547 case INTEGER_LITERAL:
4548 case FLOATING_POINT_LITERAL:
4549 case STRING_LITERAL:
4558 jj_la1[112] = jj_gen;
4561 statement = Statement();
4562 stmts.add(statement);
4565 setMarker(fileToParse,
4566 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4570 "Line " + token.beginLine);
4571 } catch (CoreException e) {
4572 PHPeclipsePlugin.log(e);
4575 jj_consume_token(ENDWHILE);
4576 } catch (ParseException e) {
4577 errorMessage = "'endwhile' expected";
4579 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4580 errorEnd = SimpleCharStream.getPosition() + 1;
4581 {if (true) throw e;}
4584 jj_consume_token(SEMICOLON);
4585 final Statement[] stmtsArray = new Statement[stmts.size()];
4586 stmts.toArray(stmtsArray);
4587 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4588 } catch (ParseException e) {
4589 errorMessage = "';' expected after 'endwhile' keyword";
4591 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4592 errorEnd = SimpleCharStream.getPosition() + 1;
4593 {if (true) throw e;}
4628 case INTEGER_LITERAL:
4629 case FLOATING_POINT_LITERAL:
4630 case STRING_LITERAL:
4636 statement = Statement();
4637 {if (true) return statement;}
4640 jj_la1[113] = jj_gen;
4641 jj_consume_token(-1);
4642 throw new ParseException();
4644 throw new Error("Missing return statement in function");
4647 static final public DoStatement DoStatement() throws ParseException {
4648 final Statement action;
4649 final Expression condition;
4650 final int pos = SimpleCharStream.getPosition();
4651 jj_consume_token(DO);
4652 action = Statement();
4653 jj_consume_token(WHILE);
4654 condition = Condition("while");
4656 jj_consume_token(SEMICOLON);
4657 {if (true) return new DoStatement(condition,action,pos,SimpleCharStream.getPosition());}
4658 } catch (ParseException e) {
4659 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4661 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4662 errorEnd = SimpleCharStream.getPosition() + 1;
4663 {if (true) throw e;}
4665 throw new Error("Missing return statement in function");
4668 static final public ForeachStatement ForeachStatement() throws ParseException {
4669 Statement statement;
4670 Expression expression;
4671 final int pos = SimpleCharStream.getPosition();
4672 ArrayVariableDeclaration variable;
4673 jj_consume_token(FOREACH);
4675 jj_consume_token(LPAREN);
4676 } catch (ParseException e) {
4677 errorMessage = "'(' expected after 'foreach' keyword";
4679 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4680 errorEnd = SimpleCharStream.getPosition() + 1;
4681 {if (true) throw e;}
4684 expression = Expression();
4685 } catch (ParseException e) {
4686 errorMessage = "variable expected";
4688 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4689 errorEnd = SimpleCharStream.getPosition() + 1;
4690 {if (true) throw e;}
4693 jj_consume_token(AS);
4694 } catch (ParseException e) {
4695 errorMessage = "'as' expected";
4697 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4698 errorEnd = SimpleCharStream.getPosition() + 1;
4699 {if (true) throw e;}
4702 variable = ArrayVariable();
4703 } catch (ParseException e) {
4704 errorMessage = "variable expected";
4706 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4707 errorEnd = SimpleCharStream.getPosition() + 1;
4708 {if (true) throw e;}
4711 jj_consume_token(RPAREN);
4712 } catch (ParseException e) {
4713 errorMessage = "')' expected after 'foreach' keyword";
4715 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4716 errorEnd = SimpleCharStream.getPosition() + 1;
4717 {if (true) throw e;}
4720 statement = Statement();
4721 } catch (ParseException e) {
4722 if (errorMessage != null) {if (true) throw e;}
4723 errorMessage = "statement expected";
4725 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4726 errorEnd = SimpleCharStream.getPosition() + 1;
4727 {if (true) throw e;}
4729 {if (true) return new ForeachStatement(expression,
4733 SimpleCharStream.getPosition());}
4734 throw new Error("Missing return statement in function");
4737 static final public ForStatement ForStatement() throws ParseException {
4739 final int pos = SimpleCharStream.getPosition();
4740 Expression[] initializations = null;
4741 Expression condition = null;
4742 Expression[] increments = null;
4744 final ArrayList list = new ArrayList();
4745 final int startBlock, endBlock;
4746 token = jj_consume_token(FOR);
4748 jj_consume_token(LPAREN);
4749 } catch (ParseException e) {
4750 errorMessage = "'(' expected after 'for' keyword";
4752 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4753 errorEnd = SimpleCharStream.getPosition() + 1;
4754 {if (true) throw e;}
4756 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4764 initializations = ForInit();
4767 jj_la1[114] = jj_gen;
4770 jj_consume_token(SEMICOLON);
4771 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4787 case INTEGER_LITERAL:
4788 case FLOATING_POINT_LITERAL:
4789 case STRING_LITERAL:
4793 condition = Expression();
4796 jj_la1[115] = jj_gen;
4799 jj_consume_token(SEMICOLON);
4800 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4808 increments = StatementExpressionList();
4811 jj_la1[116] = jj_gen;
4814 jj_consume_token(RPAREN);
4815 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4848 case INTEGER_LITERAL:
4849 case FLOATING_POINT_LITERAL:
4850 case STRING_LITERAL:
4856 action = Statement();
4857 {if (true) return new ForStatement(initializations,condition,increments,action,pos,SimpleCharStream.getPosition());}
4860 jj_consume_token(COLON);
4861 startBlock = SimpleCharStream.getPosition();
4864 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4897 case INTEGER_LITERAL:
4898 case FLOATING_POINT_LITERAL:
4899 case STRING_LITERAL:
4908 jj_la1[117] = jj_gen;
4911 action = Statement();
4915 setMarker(fileToParse,
4916 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
4918 pos+token.image.length(),
4920 "Line " + token.beginLine);
4921 } catch (CoreException e) {
4922 PHPeclipsePlugin.log(e);
4924 endBlock = SimpleCharStream.getPosition();
4926 jj_consume_token(ENDFOR);
4927 } catch (ParseException e) {
4928 errorMessage = "'endfor' expected";
4930 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4931 errorEnd = SimpleCharStream.getPosition() + 1;
4932 {if (true) throw e;}
4935 jj_consume_token(SEMICOLON);
4936 final Statement[] stmtsArray = new Statement[list.size()];
4937 list.toArray(stmtsArray);
4938 {if (true) return new ForStatement(initializations,condition,increments,new Block(stmtsArray,startBlock,endBlock),pos,SimpleCharStream.getPosition());}
4939 } catch (ParseException e) {
4940 errorMessage = "';' expected after 'endfor' keyword";
4942 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4943 errorEnd = SimpleCharStream.getPosition() + 1;
4944 {if (true) throw e;}
4948 jj_la1[118] = jj_gen;
4949 jj_consume_token(-1);
4950 throw new ParseException();
4952 throw new Error("Missing return statement in function");
4955 static final public Expression[] ForInit() throws ParseException {
4956 final Expression[] exprs;
4957 if (jj_2_7(2147483647)) {
4958 exprs = LocalVariableDeclaration();
4959 {if (true) return exprs;}
4961 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4969 exprs = StatementExpressionList();
4970 {if (true) return exprs;}
4973 jj_la1[119] = jj_gen;
4974 jj_consume_token(-1);
4975 throw new ParseException();
4978 throw new Error("Missing return statement in function");
4981 static final public Expression[] StatementExpressionList() throws ParseException {
4982 final ArrayList list = new ArrayList();
4983 final Expression expr;
4984 expr = StatementExpression();
4988 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4993 jj_la1[120] = jj_gen;
4996 jj_consume_token(COMMA);
4997 StatementExpression();
5000 final Expression[] exprsArray = new Expression[list.size()];
5001 list.toArray(exprsArray);
5002 {if (true) return exprsArray;}
5003 throw new Error("Missing return statement in function");
5006 static final public Continue ContinueStatement() throws ParseException {
5007 Expression expr = null;
5008 final int pos = SimpleCharStream.getPosition();
5009 jj_consume_token(CONTINUE);
5010 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5026 case INTEGER_LITERAL:
5027 case FLOATING_POINT_LITERAL:
5028 case STRING_LITERAL:
5032 expr = Expression();
5035 jj_la1[121] = jj_gen;
5039 jj_consume_token(SEMICOLON);
5040 {if (true) return new Continue(expr,pos,SimpleCharStream.getPosition());}
5041 } catch (ParseException e) {
5042 errorMessage = "';' expected after 'continue' statement";
5044 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5045 errorEnd = SimpleCharStream.getPosition() + 1;
5046 {if (true) throw e;}
5048 throw new Error("Missing return statement in function");
5051 static final public ReturnStatement ReturnStatement() throws ParseException {
5052 Expression expr = null;
5053 final int pos = SimpleCharStream.getPosition();
5054 jj_consume_token(RETURN);
5055 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5071 case INTEGER_LITERAL:
5072 case FLOATING_POINT_LITERAL:
5073 case STRING_LITERAL:
5077 expr = Expression();
5080 jj_la1[122] = jj_gen;
5084 jj_consume_token(SEMICOLON);
5085 {if (true) return new ReturnStatement(expr,pos,SimpleCharStream.getPosition());}
5086 } catch (ParseException e) {
5087 errorMessage = "';' expected after 'return' statement";
5089 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5090 errorEnd = SimpleCharStream.getPosition() + 1;
5091 {if (true) throw e;}
5093 throw new Error("Missing return statement in function");
5096 static final private boolean jj_2_1(int xla) {
5097 jj_la = xla; jj_lastpos = jj_scanpos = token;
5098 boolean retval = !jj_3_1();
5103 static final private boolean jj_2_2(int xla) {
5104 jj_la = xla; jj_lastpos = jj_scanpos = token;
5105 boolean retval = !jj_3_2();
5110 static final private boolean jj_2_3(int xla) {
5111 jj_la = xla; jj_lastpos = jj_scanpos = token;
5112 boolean retval = !jj_3_3();
5117 static final private boolean jj_2_4(int xla) {
5118 jj_la = xla; jj_lastpos = jj_scanpos = token;
5119 boolean retval = !jj_3_4();
5124 static final private boolean jj_2_5(int xla) {
5125 jj_la = xla; jj_lastpos = jj_scanpos = token;
5126 boolean retval = !jj_3_5();
5131 static final private boolean jj_2_6(int xla) {
5132 jj_la = xla; jj_lastpos = jj_scanpos = token;
5133 boolean retval = !jj_3_6();
5138 static final private boolean jj_2_7(int xla) {
5139 jj_la = xla; jj_lastpos = jj_scanpos = token;
5140 boolean retval = !jj_3_7();
5145 static final private boolean jj_3R_183() {
5146 if (jj_3R_185()) return true;
5147 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5150 if (jj_3R_198()) jj_scanpos = xsp;
5151 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5155 static final private boolean jj_3R_71() {
5156 if (jj_3R_87()) return true;
5157 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5158 if (jj_3R_44()) return true;
5159 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5163 static final private boolean jj_3R_44() {
5168 if (jj_3R_54()) return true;
5169 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5170 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5174 static final private boolean jj_3R_53() {
5175 if (jj_3R_70()) return true;
5176 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5179 if (jj_3R_71()) jj_scanpos = xsp;
5180 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5184 static final private boolean jj_3R_42() {
5185 if (jj_scan_token(ARRAY)) return true;
5186 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5190 static final private boolean jj_3R_197() {
5191 if (jj_scan_token(ARRAY)) return true;
5192 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5196 static final private boolean jj_3R_196() {
5197 if (jj_3R_49()) return true;
5198 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5202 static final private boolean jj_3R_182() {
5203 if (jj_scan_token(LPAREN)) return true;
5204 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5209 if (jj_3R_197()) return true;
5210 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5211 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5212 if (jj_scan_token(RPAREN)) return true;
5213 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5214 if (jj_3R_155()) return true;
5215 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5219 static final private boolean jj_3R_67() {
5220 if (jj_scan_token(OBJECT)) return true;
5221 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5225 static final private boolean jj_3R_66() {
5226 if (jj_scan_token(INTEGER)) return true;
5227 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5231 static final private boolean jj_3R_41() {
5232 if (jj_3R_49()) return true;
5233 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5237 static final private boolean jj_3R_65() {
5238 if (jj_scan_token(INT)) return true;
5239 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5243 static final private boolean jj_3R_64() {
5244 if (jj_scan_token(FLOAT)) return true;
5245 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5249 static final private boolean jj_3R_63() {
5250 if (jj_scan_token(DOUBLE)) return true;
5251 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5255 static final private boolean jj_3R_62() {
5256 if (jj_scan_token(REAL)) return true;
5257 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5261 static final private boolean jj_3R_61() {
5262 if (jj_scan_token(BOOLEAN)) return true;
5263 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5267 static final private boolean jj_3_3() {
5268 if (jj_scan_token(LPAREN)) return true;
5269 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5274 if (jj_3R_42()) return true;
5275 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5276 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5277 if (jj_scan_token(RPAREN)) return true;
5278 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5282 static final private boolean jj_3R_60() {
5283 if (jj_scan_token(BOOL)) return true;
5284 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5288 static final private boolean jj_3R_49() {
5307 if (jj_3R_67()) return true;
5308 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5309 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5310 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5311 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5312 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5313 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5314 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5315 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5316 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5320 static final private boolean jj_3R_59() {
5321 if (jj_scan_token(STRING)) return true;
5322 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5326 static final private boolean jj_3R_181() {
5327 if (jj_scan_token(LPAREN)) return true;
5328 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5329 if (jj_3R_44()) return true;
5330 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5331 if (jj_scan_token(RPAREN)) return true;
5332 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5336 static final private boolean jj_3R_180() {
5337 if (jj_3R_184()) return true;
5338 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5342 static final private boolean jj_3R_179() {
5343 if (jj_3R_183()) return true;
5344 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5348 static final private boolean jj_3R_178() {
5349 if (jj_scan_token(BANG)) return true;
5350 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5351 if (jj_3R_155()) return true;
5352 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5356 static final private boolean jj_3R_177() {
5357 if (jj_3R_182()) return true;
5358 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5362 static final private boolean jj_3R_174() {
5373 if (jj_3R_181()) return true;
5374 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5375 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5376 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5377 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5378 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5382 static final private boolean jj_3R_176() {
5383 if (jj_scan_token(MINUS_MINUS)) return true;
5384 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5388 static final private boolean jj_3R_175() {
5389 if (jj_scan_token(PLUS_PLUS)) return true;
5390 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5394 static final private boolean jj_3R_74() {
5395 if (jj_scan_token(ASSIGN)) return true;
5396 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5397 if (jj_3R_44()) return true;
5398 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5402 static final private boolean jj_3R_173() {
5407 if (jj_3R_176()) return true;
5408 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5409 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5410 if (jj_3R_185()) return true;
5411 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5415 static final private boolean jj_3R_168() {
5416 if (jj_3R_174()) return true;
5417 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5421 static final private boolean jj_3R_167() {
5422 if (jj_3R_173()) return true;
5423 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5427 static final private boolean jj_3R_172() {
5428 if (jj_scan_token(MINUS)) return true;
5429 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5433 static final private boolean jj_3R_171() {
5434 if (jj_scan_token(PLUS)) return true;
5435 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5439 static final private boolean jj_3R_164() {
5446 if (jj_3R_168()) return true;
5447 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5448 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5449 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5453 static final private boolean jj_3R_166() {
5458 if (jj_3R_172()) return true;
5459 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5460 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5461 if (jj_3R_155()) return true;
5462 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5466 static final private boolean jj_3R_170() {
5467 if (jj_3R_164()) return true;
5468 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5472 static final private boolean jj_3R_55() {
5473 if (jj_3R_73()) return true;
5474 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5477 if (jj_3R_74()) jj_scanpos = xsp;
5478 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5482 static final private boolean jj_3R_165() {
5487 if (jj_3R_170()) return true;
5488 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5489 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5493 static final private boolean jj_3R_169() {
5494 if (jj_scan_token(AT)) return true;
5495 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5496 if (jj_3R_165()) return true;
5497 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5501 static final private boolean jj_3R_160() {
5502 if (jj_3R_165()) return true;
5503 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5507 static final private boolean jj_3R_56() {
5508 if (jj_scan_token(COMMA)) return true;
5509 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5510 if (jj_3R_55()) return true;
5511 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5515 static final private boolean jj_3R_155() {
5520 if (jj_3R_160()) return true;
5521 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5522 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5526 static final private boolean jj_3R_159() {
5527 if (jj_scan_token(BIT_AND)) return true;
5528 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5529 if (jj_3R_164()) return true;
5530 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5534 static final private boolean jj_3R_46() {
5535 if (jj_3R_55()) return true;
5536 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5540 if (jj_3R_56()) { jj_scanpos = xsp; break; }
5541 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5546 static final private boolean jj_3R_163() {
5547 if (jj_scan_token(REMAINDER)) return true;
5548 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5552 static final private boolean jj_3R_162() {
5553 if (jj_scan_token(SLASH)) return true;
5554 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5558 static final private boolean jj_3R_161() {
5559 if (jj_scan_token(STAR)) return true;
5560 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5564 static final private boolean jj_3R_156() {
5571 if (jj_3R_163()) return true;
5572 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5573 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5574 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5575 if (jj_3R_155()) return true;
5576 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5580 static final private boolean jj_3R_150() {
5581 if (jj_3R_155()) return true;
5582 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5586 if (jj_3R_156()) { jj_scanpos = xsp; break; }
5587 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5592 static final private boolean jj_3R_158() {
5593 if (jj_scan_token(MINUS)) return true;
5594 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5598 static final private boolean jj_3R_157() {
5599 if (jj_scan_token(PLUS)) return true;
5600 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5604 static final private boolean jj_3R_151() {
5609 if (jj_3R_158()) return true;
5610 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5611 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5612 if (jj_3R_150()) return true;
5613 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5617 static final private boolean jj_3_6() {
5618 if (jj_3R_45()) return true;
5619 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5623 static final private boolean jj_3R_144() {
5624 if (jj_3R_150()) return true;
5625 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5629 if (jj_3R_151()) { jj_scanpos = xsp; break; }
5630 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5635 static final private boolean jj_3R_207() {
5636 if (jj_scan_token(COMMA)) return true;
5637 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5641 static final private boolean jj_3_2() {
5642 if (jj_scan_token(COMMA)) return true;
5643 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5644 if (jj_3R_40()) return true;
5645 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5649 static final private boolean jj_3R_154() {
5650 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
5651 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5655 static final private boolean jj_3_5() {
5656 if (jj_3R_44()) return true;
5657 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5658 if (jj_scan_token(SEMICOLON)) return true;
5659 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5663 static final private boolean jj_3R_153() {
5664 if (jj_scan_token(RSIGNEDSHIFT)) return true;
5665 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5669 static final private boolean jj_3R_152() {
5670 if (jj_scan_token(LSHIFT)) return true;
5671 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5675 static final private boolean jj_3R_206() {
5676 if (jj_3R_40()) return true;
5677 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5681 if (jj_3_2()) { jj_scanpos = xsp; break; }
5682 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5687 static final private boolean jj_3R_145() {
5694 if (jj_3R_154()) return true;
5695 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5696 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5697 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5698 if (jj_3R_144()) return true;
5699 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5703 static final private boolean jj_3R_136() {
5704 if (jj_3R_144()) return true;
5705 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5709 if (jj_3R_145()) { jj_scanpos = xsp; break; }
5710 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5715 static final private boolean jj_3R_205() {
5716 if (jj_scan_token(LPAREN)) return true;
5717 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5720 if (jj_3R_206()) jj_scanpos = xsp;
5721 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5723 if (jj_3R_207()) jj_scanpos = xsp;
5724 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5725 if (jj_scan_token(RPAREN)) return true;
5726 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5730 static final private boolean jj_3R_149() {
5731 if (jj_scan_token(GE)) return true;
5732 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5736 static final private boolean jj_3R_148() {
5737 if (jj_scan_token(LE)) return true;
5738 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5742 static final private boolean jj_3R_147() {
5743 if (jj_scan_token(GT)) return true;
5744 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5748 static final private boolean jj_3R_146() {
5749 if (jj_scan_token(LT)) return true;
5750 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5754 static final private boolean jj_3R_137() {
5763 if (jj_3R_149()) return true;
5764 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5765 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5766 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5767 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5768 if (jj_3R_136()) return true;
5769 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5773 static final private boolean jj_3R_45() {
5774 if (jj_scan_token(IDENTIFIER)) return true;
5775 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5776 if (jj_scan_token(COLON)) return true;
5777 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5781 static final private boolean jj_3R_131() {
5782 if (jj_3R_136()) return true;
5783 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5787 if (jj_3R_137()) { jj_scanpos = xsp; break; }
5788 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5793 static final private boolean jj_3R_208() {
5794 if (jj_scan_token(ARRAYASSIGN)) return true;
5795 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5796 if (jj_3R_44()) return true;
5797 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5801 static final private boolean jj_3R_110() {
5802 if (jj_scan_token(COMMA)) return true;
5803 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5804 if (jj_3R_44()) return true;
5805 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5809 static final private boolean jj_3R_40() {
5810 if (jj_3R_44()) return true;
5811 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5814 if (jj_3R_208()) jj_scanpos = xsp;
5815 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5819 static final private boolean jj_3_7() {
5820 if (jj_3R_46()) return true;
5821 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5825 static final private boolean jj_3R_91() {
5826 if (jj_3R_44()) return true;
5827 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5831 if (jj_3R_110()) { jj_scanpos = xsp; break; }
5832 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5837 static final private boolean jj_3R_81() {
5838 if (jj_3R_91()) return true;
5839 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5843 static final private boolean jj_3R_142() {
5844 if (jj_scan_token(TRIPLEEQUAL)) return true;
5845 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5849 static final private boolean jj_3R_141() {
5850 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5851 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5855 static final private boolean jj_3R_140() {
5856 if (jj_scan_token(NOT_EQUAL)) return true;
5857 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5861 static final private boolean jj_3R_139() {
5862 if (jj_scan_token(DIF)) return true;
5863 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5867 static final private boolean jj_3R_80() {
5868 if (jj_3R_49()) return true;
5869 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5873 static final private boolean jj_3R_138() {
5874 if (jj_scan_token(EQUAL_EQUAL)) return true;
5875 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5879 static final private boolean jj_3R_68() {
5880 if (jj_scan_token(LPAREN)) return true;
5881 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5884 if (jj_3R_81()) jj_scanpos = xsp;
5885 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5886 if (jj_scan_token(RPAREN)) return true;
5887 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5891 static final private boolean jj_3R_132() {
5902 if (jj_3R_142()) return true;
5903 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5904 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5905 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5906 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5907 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5908 if (jj_3R_131()) return true;
5909 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5913 static final private boolean jj_3R_129() {
5914 if (jj_3R_131()) return true;
5915 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5919 if (jj_3R_132()) { jj_scanpos = xsp; break; }
5920 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5925 static final private boolean jj_3R_191() {
5926 if (jj_scan_token(NULL)) return true;
5927 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5931 static final private boolean jj_3R_118() {
5932 if (jj_scan_token(LBRACE)) return true;
5933 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5934 if (jj_3R_44()) return true;
5935 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5936 if (jj_scan_token(RBRACE)) return true;
5937 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5941 static final private boolean jj_3R_190() {
5942 if (jj_scan_token(FALSE)) return true;
5943 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5947 static final private boolean jj_3R_189() {
5948 if (jj_scan_token(TRUE)) return true;
5949 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5953 static final private boolean jj_3R_78() {
5954 if (jj_scan_token(DOLLAR_ID)) return true;
5955 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5959 static final private boolean jj_3R_130() {
5960 if (jj_scan_token(BIT_AND)) return true;
5961 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5962 if (jj_3R_129()) return true;
5963 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5967 static final private boolean jj_3R_188() {
5968 if (jj_scan_token(STRING_LITERAL)) return true;
5969 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5973 static final private boolean jj_3R_187() {
5974 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
5975 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5979 static final private boolean jj_3R_127() {
5980 if (jj_3R_129()) return true;
5981 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5985 if (jj_3R_130()) { jj_scanpos = xsp; break; }
5986 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5991 static final private boolean jj_3R_186() {
5992 if (jj_scan_token(INTEGER_LITERAL)) return true;
5993 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5997 static final private boolean jj_3R_184() {
6010 if (jj_3R_191()) return true;
6011 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6012 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6013 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6014 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6015 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6016 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6020 static final private boolean jj_3R_77() {
6021 if (jj_scan_token(DOLLAR)) return true;
6022 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6023 if (jj_3R_57()) return true;
6024 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6028 static final private boolean jj_3R_79() {
6029 if (jj_3R_44()) return true;
6030 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6034 static final private boolean jj_3R_58() {
6039 if (jj_3R_80()) return true;
6040 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6041 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6045 static final private boolean jj_3R_128() {
6046 if (jj_scan_token(XOR)) return true;
6047 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6048 if (jj_3R_127()) return true;
6049 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6053 static final private boolean jj_3R_125() {
6054 if (jj_3R_127()) return true;
6055 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6059 if (jj_3R_128()) { jj_scanpos = xsp; break; }
6060 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6065 static final private boolean jj_3R_76() {
6066 if (jj_scan_token(IDENTIFIER)) return true;
6067 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6070 if (jj_3R_118()) jj_scanpos = xsp;
6071 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6075 static final private boolean jj_3R_75() {
6076 if (jj_scan_token(LBRACE)) return true;
6077 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6078 if (jj_3R_44()) return true;
6079 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6080 if (jj_scan_token(RBRACE)) return true;
6081 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6085 static final private boolean jj_3R_57() {
6094 if (jj_3R_78()) return true;
6095 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_48() {
6103 if (jj_scan_token(LBRACKET)) return true;
6104 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6107 if (jj_3R_58()) jj_scanpos = xsp;
6108 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6109 if (jj_scan_token(RBRACKET)) return true;
6110 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6114 static final private boolean jj_3R_126() {
6115 if (jj_scan_token(BIT_OR)) return true;
6116 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6117 if (jj_3R_125()) return true;
6118 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6122 static final private boolean jj_3R_119() {
6123 if (jj_3R_125()) return true;
6124 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6128 if (jj_3R_126()) { jj_scanpos = xsp; break; }
6129 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6134 static final private boolean jj_3R_117() {
6135 if (jj_scan_token(LBRACE)) return true;
6136 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6137 if (jj_3R_44()) return true;
6138 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6139 if (jj_scan_token(RBRACE)) return true;
6140 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6144 static final private boolean jj_3R_120() {
6145 if (jj_scan_token(DOT)) return true;
6146 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6147 if (jj_3R_119()) return true;
6148 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6152 static final private boolean jj_3R_47() {
6153 if (jj_scan_token(CLASSACCESS)) return true;
6154 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6155 if (jj_3R_57()) return true;
6156 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6160 static final private boolean jj_3R_39() {
6165 if (jj_3R_48()) return true;
6166 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6167 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6171 static final private boolean jj_3R_109() {
6172 if (jj_scan_token(DOLLAR)) return true;
6173 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6174 if (jj_3R_57()) return true;
6175 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6179 static final private boolean jj_3R_111() {
6180 if (jj_3R_119()) return true;
6181 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6185 if (jj_3R_120()) { jj_scanpos = xsp; break; }
6186 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6191 static final private boolean jj_3R_122() {
6192 if (jj_scan_token(_ANDL)) return true;
6193 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6197 static final private boolean jj_3R_84() {
6198 if (jj_3R_73()) return true;
6199 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6203 static final private boolean jj_3R_121() {
6204 if (jj_scan_token(AND_AND)) return true;
6205 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6209 static final private boolean jj_3R_83() {
6210 if (jj_3R_49()) return true;
6211 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6215 static final private boolean jj_3R_90() {
6220 if (jj_3R_109()) return true;
6221 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6222 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6226 static final private boolean jj_3R_108() {
6227 if (jj_scan_token(DOLLAR_ID)) return true;
6228 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6231 if (jj_3R_117()) jj_scanpos = xsp;
6232 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6236 static final private boolean jj_3R_112() {
6241 if (jj_3R_122()) 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;
6244 if (jj_3R_111()) return true;
6245 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6249 static final private boolean jj_3R_82() {
6250 if (jj_scan_token(IDENTIFIER)) return true;
6251 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6255 static final private boolean jj_3R_69() {
6262 if (jj_3R_84()) return true;
6263 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6264 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6265 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6269 static final private boolean jj_3R_86() {
6270 if (jj_scan_token(HOOK)) return true;
6271 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6272 if (jj_3R_44()) return true;
6273 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6274 if (jj_scan_token(COLON)) return true;
6275 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6276 if (jj_3R_70()) return true;
6277 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6281 static final private boolean jj_3R_92() {
6282 if (jj_3R_111()) return true;
6283 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6287 if (jj_3R_112()) { jj_scanpos = xsp; break; }
6288 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6293 static final private boolean jj_3R_114() {
6294 if (jj_scan_token(_ORL)) return true;
6295 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6299 static final private boolean jj_3R_113() {
6300 if (jj_scan_token(OR_OR)) return true;
6301 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6305 static final private boolean jj_3R_135() {
6306 if (jj_scan_token(ASSIGN)) return true;
6307 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6308 if (jj_3R_44()) return true;
6309 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6313 static final private boolean jj_3R_93() {
6318 if (jj_3R_114()) return true;
6319 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6320 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6321 if (jj_3R_92()) return true;
6322 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6326 static final private boolean jj_3R_85() {
6327 if (jj_3R_92()) return true;
6328 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6332 if (jj_3R_93()) { jj_scanpos = xsp; break; }
6333 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6338 static final private boolean jj_3R_143() {
6339 if (jj_3R_73()) return true;
6340 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6344 static final private boolean jj_3_1() {
6345 if (jj_3R_39()) return true;
6346 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6350 static final private boolean jj_3R_195() {
6351 if (jj_scan_token(ARRAY)) return true;
6352 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6353 if (jj_3R_205()) return true;
6354 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6358 static final private boolean jj_3R_73() {
6359 if (jj_3R_90()) return true;
6360 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6364 if (jj_3_1()) { jj_scanpos = xsp; break; }
6365 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6370 static final private boolean jj_3R_134() {
6371 if (jj_scan_token(COMMA)) return true;
6372 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6375 if (jj_3R_143()) jj_scanpos = xsp;
6376 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6380 static final private boolean jj_3R_70() {
6381 if (jj_3R_85()) return true;
6382 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6385 if (jj_3R_86()) jj_scanpos = xsp;
6386 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6390 static final private boolean jj_3R_133() {
6391 if (jj_3R_73()) return true;
6392 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6396 static final private boolean jj_3R_106() {
6397 if (jj_scan_token(TILDEEQUAL)) return true;
6398 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6402 static final private boolean jj_3R_105() {
6403 if (jj_scan_token(DOTASSIGN)) return true;
6404 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6408 static final private boolean jj_3R_104() {
6409 if (jj_scan_token(ORASSIGN)) return true;
6410 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6414 static final private boolean jj_3R_103() {
6415 if (jj_scan_token(XORASSIGN)) return true;
6416 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6420 static final private boolean jj_3R_102() {
6421 if (jj_scan_token(ANDASSIGN)) return true;
6422 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6426 static final private boolean jj_3R_101() {
6427 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6428 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6432 static final private boolean jj_3R_52() {
6433 if (jj_scan_token(STATICCLASSACCESS)) return true;
6434 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6435 if (jj_3R_69()) return true;
6436 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6440 static final private boolean jj_3R_100() {
6441 if (jj_scan_token(LSHIFTASSIGN)) return true;
6442 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6446 static final private boolean jj_3R_51() {
6447 if (jj_3R_39()) return true;
6448 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6452 static final private boolean jj_3R_99() {
6453 if (jj_scan_token(MINUSASSIGN)) return true;
6454 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6458 static final private boolean jj_3R_43() {
6465 if (jj_3R_52()) return true;
6466 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6467 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6468 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6472 static final private boolean jj_3R_50() {
6473 if (jj_3R_68()) return true;
6474 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6478 static final private boolean jj_3R_124() {
6479 if (jj_scan_token(LIST)) return true;
6480 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6481 if (jj_scan_token(LPAREN)) return true;
6482 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6485 if (jj_3R_133()) jj_scanpos = xsp;
6486 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6489 if (jj_3R_134()) { jj_scanpos = xsp; break; }
6490 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6492 if (jj_scan_token(RPAREN)) return true;
6493 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6495 if (jj_3R_135()) jj_scanpos = xsp;
6496 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6500 static final private boolean jj_3R_98() {
6501 if (jj_scan_token(PLUSASSIGN)) return true;
6502 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6506 static final private boolean jj_3R_97() {
6507 if (jj_scan_token(REMASSIGN)) return true;
6508 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6512 static final private boolean jj_3R_96() {
6513 if (jj_scan_token(SLASHASSIGN)) return true;
6514 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6518 static final private boolean jj_3R_95() {
6519 if (jj_scan_token(STARASSIGN)) return true;
6520 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6524 static final private boolean jj_3R_94() {
6525 if (jj_scan_token(ASSIGN)) return true;
6526 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6530 static final private boolean jj_3R_87() {
6557 if (jj_3R_106()) return true;
6558 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6559 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6560 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6561 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6562 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6563 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6564 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6565 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6566 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6567 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6568 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6569 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6570 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6574 static final private boolean jj_3R_123() {
6575 if (jj_scan_token(PRINT)) return true;
6576 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6577 if (jj_3R_44()) return true;
6578 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6582 static final private boolean jj_3R_201() {
6583 if (jj_3R_73()) return true;
6584 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6588 static final private boolean jj_3R_200() {
6589 if (jj_scan_token(NEW)) return true;
6590 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6591 if (jj_3R_69()) return true;
6592 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6596 static final private boolean jj_3R_116() {
6597 if (jj_3R_124()) return true;
6598 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6602 static final private boolean jj_3R_107() {
6607 if (jj_3R_116()) return true;
6608 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6609 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6613 static final private boolean jj_3R_115() {
6614 if (jj_3R_123()) return true;
6615 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6619 static final private boolean jj_3R_199() {
6620 if (jj_scan_token(IDENTIFIER)) return true;
6621 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6625 static final private boolean jj_3R_194() {
6632 if (jj_3R_201()) return true;
6633 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6634 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6635 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6639 static final private boolean jj_3R_89() {
6640 if (jj_3R_107()) return true;
6641 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6645 static final private boolean jj_3_4() {
6646 if (jj_3R_43()) return true;
6647 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6651 static final private boolean jj_3R_88() {
6652 if (jj_scan_token(BANG)) return true;
6653 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6654 if (jj_3R_72()) return true;
6655 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6659 static final private boolean jj_3R_72() {
6664 if (jj_3R_89()) return true;
6665 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6666 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6670 static final private boolean jj_3R_193() {
6671 if (jj_3R_195()) return true;
6672 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6676 static final private boolean jj_3R_204() {
6677 if (jj_3R_43()) return true;
6678 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6682 static final private boolean jj_3R_54() {
6683 if (jj_3R_72()) return true;
6684 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6688 static final private boolean jj_3R_192() {
6689 if (jj_3R_194()) return true;
6690 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6694 if (jj_3R_204()) { jj_scanpos = xsp; break; }
6695 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6700 static final private boolean jj_3R_185() {
6705 if (jj_3R_193()) return true;
6706 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6707 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6711 static final private boolean jj_3R_203() {
6712 if (jj_scan_token(MINUS_MINUS)) return true;
6713 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6717 static final private boolean jj_3R_202() {
6718 if (jj_scan_token(PLUS_PLUS)) return true;
6719 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6723 static final private boolean jj_3R_198() {
6728 if (jj_3R_203()) return true;
6729 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6730 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6734 static private boolean jj_initialized_once = false;
6735 static public PHPParserTokenManager token_source;
6736 static SimpleCharStream jj_input_stream;
6737 static public Token token, jj_nt;
6738 static private int jj_ntk;
6739 static private Token jj_scanpos, jj_lastpos;
6740 static private int jj_la;
6741 static public boolean lookingAhead = false;
6742 static private boolean jj_semLA;
6743 static private int jj_gen;
6744 static final private int[] jj_la1 = new int[123];
6745 static private int[] jj_la1_0;
6746 static private int[] jj_la1_1;
6747 static private int[] jj_la1_2;
6748 static private int[] jj_la1_3;
6749 static private int[] jj_la1_4;
6757 private static void jj_la1_0() {
6758 jj_la1_0 = new int[] {0xf960001e,0x6,0x6,0xf960001e,0x0,0xf9600000,0x0,0xc00000,0xc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x68000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x68000000,0x60000000,0x60000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x8000000,0x0,0x8000000,0x0,0x8000000,0x8000000,0x0,0x0,0x8000000,0x0,0x0,0x8000000,0x0,0x68000000,0x68000000,0x0,0x0,0x68000000,0x0,0x0,0x89000000,0xf9000000,0x8,0x6,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf9600010,0xf9600010,0xf9600000,0xe9600000,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x0,0xe9600010,0xe9600010,0x10000000,0x0,0x68000000,0xf9000010,0xf9000010,0x2000000,0x4000000,0xf9000010,0x2000000,0x4000000,0xf9000010,0xf9000010,0xf9000010,0xf9000010,0xf9000010,0xf9000000,0xf9000000,0x8000000,0x68000000,0x8000000,0xf9000000,0xf9000000,0x8000000,0x0,0x68000000,0x68000000,};
6760 private static void jj_la1_1() {
6761 jj_la1_1 = new int[] {0x875d507f,0x0,0x0,0x875d507f,0x0,0x875d507f,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3080000,0x200,0x30c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30c0000,0x30c0000,0x0,0x30c0000,0x0,0x30c0000,0x0,0x0,0x0,0x40000,0x40000,0x180,0x40000,0x0,0x30c0000,0x30c0000,0x80,0x3080000,0x30c0000,0x0,0x0,0x8455507f,0x875d507f,0x0,0x0,0xf,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x0,0x0,0x0,0x0,0x40000,0x0,0x2400,0x2400,0x875d507f,0x875d507f,0x0,0x2400,0x30c0000,0x875d507f,0x875d507f,0x0,0x0,0x875d507f,0x0,0x0,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x40000,0x30c0000,0x40000,0x875d507f,0x875d507f,0x40000,0x0,0x30c0000,0x30c0000,};
6763 private static void jj_la1_2() {
6764 jj_la1_2 = new int[] {0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x13c1c00,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x800,0x0,0x0,0x300000,0x0,0x13c1c00,0x0,0x1000000,0x0,0x1000800,0x1000000,0x3fe,0x0,0x13c1c00,0x1000,0x0,0x0,0x4000,0x80010000,0x80010000,0x20000,0x20000,0x0,0x2000000,0x4000000,0x1000000,0x0,0x0,0x0,0x0,0x70000000,0x70000000,0x300000,0x300000,0x8c00000,0x8c00000,0x13c1c00,0x3c1c00,0x300000,0x3c1800,0xc0000,0x1800,0x3fe,0xc0000,0xc0000,0x800,0x800,0x0,0x800,0xbfe,0x13c1ffe,0x13c1ffe,0x0,0x0,0x13c1c00,0x0,0x400,0xc0c00,0x13c1c00,0x0,0x0,0x0,0x800,0x0,0x800,0x0,0x0,0x0,0x0,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x0,0x0,0xc0000,0xc0000,0xc0800,0x8000,0x0,0x0,0x13c1c00,0x13c1c00,0x0,0x0,0x13c1c00,0x13c1c00,0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x0,0x13c9c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c9c00,0xc0800,0x13c1c00,0xc0800,0x13c1c00,0x13c9c00,0xc0800,0x0,0x13c1c00,0x13c1c00,};
6766 private static void jj_la1_3() {
6767 jj_la1_3 = new int[] {0x2288a2,0x0,0x0,0x2288a2,0x200000,0x2288a2,0x0,0x0,0x0,0x400000,0x0,0x20000,0x0,0x20000,0x20800,0x22,0x22,0x8a2,0x0,0x88a2,0x400000,0x0,0x400000,0x0,0x0,0x0,0x0,0x88a2,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x800000,0x0,0x0,0x0,0xe4000000,0xe4000000,0x1b000000,0x1b000000,0x0,0x0,0x0,0x0,0x0,0x0,0x88a2,0x88a2,0x0,0x88a2,0x0,0x88a2,0x0,0x0,0x0,0x800,0x800,0x88000,0x800,0x800,0x88a2,0x88a2,0x80000,0xa2,0x88a2,0x400000,0x0,0x220800,0x2288a2,0x0,0x0,0x0,0x0,0x400000,0x0,0x0,0x400000,0x400000,0x400000,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x400000,0x0,0x0,0x0,0x800,0x20000,0x0,0x0,0x2288a2,0x2288a2,0x0,0x0,0x88a2,0x2288a2,0x2288a2,0x0,0x0,0x2288a2,0x0,0x0,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x800,0x88a2,0x800,0x2288a2,0x2288a2,0x800,0x400000,0x88a2,0x88a2,};
6769 private static void jj_la1_4() {
6770 jj_la1_4 = new int[] {0x4000,0x0,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x2,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x0,0x3ffe,0x4000,0x0,0x0,0x3ffe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x4000,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x4000,0x4000,0x0,0x4000,0x4000,0x4000,0x4000,0x0,0x0,0x4000,0x0,0x0,0x4000,0x4000,0x0,0x0,0x0,0x4000,0x0,0x4000,0x2,0x0,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x0,0x2,0x3ffe,0x3ffe,0x4000,0x0,0x0,0x0,0x4000,0x4000,0x0,0x0,0x4000,0x4000,0x4000,0x0,0x0,0x4000,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x0,0x4000,0x4000,};
6772 static final private JJCalls[] jj_2_rtns = new JJCalls[7];
6773 static private boolean jj_rescan = false;
6774 static private int jj_gc = 0;
6776 public PHPParser(java.io.InputStream stream) {
6777 if (jj_initialized_once) {
6778 System.out.println("ERROR: Second call to constructor of static parser. You must");
6779 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6780 System.out.println(" during parser generation.");
6783 jj_initialized_once = true;
6784 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6785 token_source = new PHPParserTokenManager(jj_input_stream);
6786 token = new Token();
6789 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6790 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6793 static public void ReInit(java.io.InputStream stream) {
6794 jj_input_stream.ReInit(stream, 1, 1);
6795 token_source.ReInit(jj_input_stream);
6796 token = new Token();
6799 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6800 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6803 public PHPParser(java.io.Reader stream) {
6804 if (jj_initialized_once) {
6805 System.out.println("ERROR: Second call to constructor of static parser. You must");
6806 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6807 System.out.println(" during parser generation.");
6810 jj_initialized_once = true;
6811 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6812 token_source = new PHPParserTokenManager(jj_input_stream);
6813 token = new Token();
6816 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6817 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6820 static public void ReInit(java.io.Reader stream) {
6821 jj_input_stream.ReInit(stream, 1, 1);
6822 token_source.ReInit(jj_input_stream);
6823 token = new Token();
6826 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6827 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6830 public PHPParser(PHPParserTokenManager tm) {
6831 if (jj_initialized_once) {
6832 System.out.println("ERROR: Second call to constructor of static parser. You must");
6833 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6834 System.out.println(" during parser generation.");
6837 jj_initialized_once = true;
6839 token = new Token();
6842 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6843 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6846 public void ReInit(PHPParserTokenManager tm) {
6848 token = new Token();
6851 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6852 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6855 static final private Token jj_consume_token(int kind) throws ParseException {
6857 if ((oldToken = token).next != null) token = token.next;
6858 else token = token.next = token_source.getNextToken();
6860 if (token.kind == kind) {
6862 if (++jj_gc > 100) {
6864 for (int i = 0; i < jj_2_rtns.length; i++) {
6865 JJCalls c = jj_2_rtns[i];
6867 if (c.gen < jj_gen) c.first = null;
6876 throw generateParseException();
6879 static final private boolean jj_scan_token(int kind) {
6880 if (jj_scanpos == jj_lastpos) {
6882 if (jj_scanpos.next == null) {
6883 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
6885 jj_lastpos = jj_scanpos = jj_scanpos.next;
6888 jj_scanpos = jj_scanpos.next;
6891 int i = 0; Token tok = token;
6892 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
6893 if (tok != null) jj_add_error_token(kind, i);
6895 return (jj_scanpos.kind != kind);
6898 static final public Token getNextToken() {
6899 if (token.next != null) token = token.next;
6900 else token = token.next = token_source.getNextToken();
6906 static final public Token getToken(int index) {
6907 Token t = lookingAhead ? jj_scanpos : token;
6908 for (int i = 0; i < index; i++) {
6909 if (t.next != null) t = t.next;
6910 else t = t.next = token_source.getNextToken();
6915 static final private int jj_ntk() {
6916 if ((jj_nt=token.next) == null)
6917 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
6919 return (jj_ntk = jj_nt.kind);
6922 static private java.util.Vector jj_expentries = new java.util.Vector();
6923 static private int[] jj_expentry;
6924 static private int jj_kind = -1;
6925 static private int[] jj_lasttokens = new int[100];
6926 static private int jj_endpos;
6928 static private void jj_add_error_token(int kind, int pos) {
6929 if (pos >= 100) return;
6930 if (pos == jj_endpos + 1) {
6931 jj_lasttokens[jj_endpos++] = kind;
6932 } else if (jj_endpos != 0) {
6933 jj_expentry = new int[jj_endpos];
6934 for (int i = 0; i < jj_endpos; i++) {
6935 jj_expentry[i] = jj_lasttokens[i];
6937 boolean exists = false;
6938 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
6939 int[] oldentry = (int[])(enum.nextElement());
6940 if (oldentry.length == jj_expentry.length) {
6942 for (int i = 0; i < jj_expentry.length; i++) {
6943 if (oldentry[i] != jj_expentry[i]) {
6951 if (!exists) jj_expentries.addElement(jj_expentry);
6952 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
6956 static public ParseException generateParseException() {
6957 jj_expentries.removeAllElements();
6958 boolean[] la1tokens = new boolean[143];
6959 for (int i = 0; i < 143; i++) {
6960 la1tokens[i] = false;
6963 la1tokens[jj_kind] = true;
6966 for (int i = 0; i < 123; i++) {
6967 if (jj_la1[i] == jj_gen) {
6968 for (int j = 0; j < 32; j++) {
6969 if ((jj_la1_0[i] & (1<<j)) != 0) {
6970 la1tokens[j] = true;
6972 if ((jj_la1_1[i] & (1<<j)) != 0) {
6973 la1tokens[32+j] = true;
6975 if ((jj_la1_2[i] & (1<<j)) != 0) {
6976 la1tokens[64+j] = true;
6978 if ((jj_la1_3[i] & (1<<j)) != 0) {
6979 la1tokens[96+j] = true;
6981 if ((jj_la1_4[i] & (1<<j)) != 0) {
6982 la1tokens[128+j] = true;
6987 for (int i = 0; i < 143; i++) {
6989 jj_expentry = new int[1];
6991 jj_expentries.addElement(jj_expentry);
6996 jj_add_error_token(0, 0);
6997 int[][] exptokseq = new int[jj_expentries.size()][];
6998 for (int i = 0; i < jj_expentries.size(); i++) {
6999 exptokseq[i] = (int[])jj_expentries.elementAt(i);
7001 return new ParseException(token, exptokseq, tokenImage);
7004 static final public void enable_tracing() {
7007 static final public void disable_tracing() {
7010 static final private void jj_rescan_token() {
7012 for (int i = 0; i < 7; i++) {
7013 JJCalls p = jj_2_rtns[i];
7015 if (p.gen > jj_gen) {
7016 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7018 case 0: jj_3_1(); break;
7019 case 1: jj_3_2(); break;
7020 case 2: jj_3_3(); break;
7021 case 3: jj_3_4(); break;
7022 case 4: jj_3_5(); break;
7023 case 5: jj_3_6(); break;
7024 case 6: jj_3_7(); break;
7028 } while (p != null);
7033 static final private void jj_save(int index, int xla) {
7034 JJCalls p = jj_2_rtns[index];
7035 while (p.gen > jj_gen) {
7036 if (p.next == null) { p = p.next = new JJCalls(); break; }
7039 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7042 static final class JJCalls {