1 /* Generated By:JavaCC: Do not edit this line. PHPParser.java */
4 import org.eclipse.core.resources.IFile;
5 import org.eclipse.core.resources.IMarker;
6 import org.eclipse.core.runtime.CoreException;
7 import org.eclipse.ui.texteditor.MarkerUtilities;
8 import org.eclipse.jface.preference.IPreferenceStore;
10 import java.util.Hashtable;
11 import java.util.ArrayList;
12 import java.io.StringReader;
14 import java.text.MessageFormat;
16 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
17 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
18 import net.sourceforge.phpdt.internal.compiler.ast.*;
19 import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
20 import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
21 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
22 import net.sourceforge.phpdt.internal.ui.util.StringUtil;
26 * This php parser is inspired by the Java 1.2 grammar example
27 * given with JavaCC. You can get JavaCC at http://www.webgain.com
28 * You can test the parser with the PHPParserTestCase2.java
29 * @author Matthieu Casanova
30 * @version $Reference: 1.0$
32 public final class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
34 /** The file that is parsed. */
35 private static IFile fileToParse;
37 /** The current segment. */
38 private static OutlineableWithChildren currentSegment;
40 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
41 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
42 static PHPOutlineInfo outlineInfo;
44 /** The error level of the current ParseException. */
45 private static int errorLevel = ERROR;
46 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
47 private static String errorMessage;
49 private static int errorStart = -1;
50 private static int errorEnd = -1;
51 private static PHPDocument phpDocument;
53 private static final char[] SYNTAX_ERROR_CHAR = {'s','y','n','t','a','x',' ','e','r','r','o','r'};
55 * The point where html starts.
56 * It will be used by the token manager to create HTMLCode objects
58 public static int htmlStart;
61 private final static int AstStackIncrement = 100;
62 /** The stack of node. */
63 private static AstNode[] nodes;
64 /** The cursor in expression stack. */
65 private static int nodePtr;
67 public final void setFileToParse(final IFile fileToParse) {
68 this.fileToParse = fileToParse;
74 public PHPParser(final IFile fileToParse) {
75 this(new StringReader(""));
76 this.fileToParse = fileToParse;
80 * Reinitialize the parser.
82 private static final void init() {
83 nodes = new AstNode[AstStackIncrement];
89 * Add an php node on the stack.
90 * @param node the node that will be added to the stack
92 private static final void pushOnAstNodes(final AstNode node) {
94 nodes[++nodePtr] = node;
95 } catch (IndexOutOfBoundsException e) {
96 final int oldStackLength = nodes.length;
97 final AstNode[] oldStack = nodes;
98 nodes = new AstNode[oldStackLength + AstStackIncrement];
99 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
100 nodePtr = oldStackLength;
101 nodes[nodePtr] = node;
105 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
106 phpDocument = new PHPDocument(parent,"_root".toCharArray());
107 currentSegment = phpDocument;
108 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
109 final StringReader stream = new StringReader(s);
110 if (jj_input_stream == null) {
111 jj_input_stream = new SimpleCharStream(stream, 1, 1);
117 phpDocument.nodes = new AstNode[nodes.length];
118 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
119 if (PHPeclipsePlugin.DEBUG) {
120 PHPeclipsePlugin.log(1,phpDocument.toString());
122 } catch (ParseException e) {
123 processParseException(e);
129 * This method will process the parse exception.
130 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
131 * @param e the ParseException
133 private static void processParseException(final ParseException e) {
134 if (errorMessage == null) {
135 PHPeclipsePlugin.log(e);
136 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
137 errorStart = SimpleCharStream.getPosition();
138 errorEnd = errorStart + 1;
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 = StringUtil.replaceAll(current, "\n", "");
197 current = StringUtil.replaceAll(current, "<b>", "");
198 current = StringUtil.replaceAll(current, "</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 final int pos = SimpleCharStream.getPosition();
1222 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1224 jj_consume_token(BANG);
1225 expr = Expression();
1226 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1242 case INTEGER_LITERAL:
1243 case FLOATING_POINT_LITERAL:
1244 case STRING_LITERAL:
1248 expr = ExpressionNoBang();
1249 {if (true) return expr;}
1252 jj_la1[26] = jj_gen;
1253 jj_consume_token(-1);
1254 throw new ParseException();
1256 throw new Error("Missing return statement in function");
1259 static final public Expression ExpressionNoBang() throws ParseException {
1260 final Expression expr;
1261 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1263 expr = PrintExpression();
1264 {if (true) return expr;}
1267 expr = ListExpression();
1268 {if (true) return expr;}
1271 jj_la1[27] = jj_gen;
1272 if (jj_2_3(2147483647)) {
1273 expr = varAssignation();
1274 {if (true) return expr;}
1276 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1289 case INTEGER_LITERAL:
1290 case FLOATING_POINT_LITERAL:
1291 case STRING_LITERAL:
1295 expr = ConditionalExpression();
1296 {if (true) return expr;}
1299 jj_la1[28] = jj_gen;
1300 jj_consume_token(-1);
1301 throw new ParseException();
1305 throw new Error("Missing return statement in function");
1309 * A Variable assignation.
1310 * varName (an assign operator) any expression
1312 static final public VarAssignation varAssignation() throws ParseException {
1313 final String varName;
1314 final Expression initializer;
1315 final int assignOperator;
1316 final int pos = SimpleCharStream.getPosition();
1317 varName = VariableDeclaratorId();
1318 assignOperator = AssignmentOperator();
1320 initializer = Expression();
1321 } catch (ParseException e) {
1322 if (errorMessage != null) {
1323 {if (true) throw e;}
1325 errorMessage = "expression expected";
1327 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1328 errorEnd = SimpleCharStream.getPosition() + 1;
1329 {if (true) throw e;}
1331 {if (true) return new VarAssignation(varName.toCharArray(),
1335 SimpleCharStream.getPosition());}
1336 throw new Error("Missing return statement in function");
1339 static final public int AssignmentOperator() throws ParseException {
1340 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1342 jj_consume_token(ASSIGN);
1343 {if (true) return VarAssignation.EQUAL;}
1346 jj_consume_token(STARASSIGN);
1347 {if (true) return VarAssignation.STAR_EQUAL;}
1350 jj_consume_token(SLASHASSIGN);
1351 {if (true) return VarAssignation.SLASH_EQUAL;}
1354 jj_consume_token(REMASSIGN);
1355 {if (true) return VarAssignation.REM_EQUAL;}
1358 jj_consume_token(PLUSASSIGN);
1359 {if (true) return VarAssignation.PLUS_EQUAL;}
1362 jj_consume_token(MINUSASSIGN);
1363 {if (true) return VarAssignation.MINUS_EQUAL;}
1366 jj_consume_token(LSHIFTASSIGN);
1367 {if (true) return VarAssignation.LSHIFT_EQUAL;}
1369 case RSIGNEDSHIFTASSIGN:
1370 jj_consume_token(RSIGNEDSHIFTASSIGN);
1371 {if (true) return VarAssignation.RSIGNEDSHIFT_EQUAL;}
1374 jj_consume_token(ANDASSIGN);
1375 {if (true) return VarAssignation.AND_EQUAL;}
1378 jj_consume_token(XORASSIGN);
1379 {if (true) return VarAssignation.XOR_EQUAL;}
1382 jj_consume_token(ORASSIGN);
1383 {if (true) return VarAssignation.OR_EQUAL;}
1386 jj_consume_token(DOTASSIGN);
1387 {if (true) return VarAssignation.DOT_EQUAL;}
1390 jj_consume_token(TILDEEQUAL);
1391 {if (true) return VarAssignation.TILDE_EQUAL;}
1394 jj_la1[29] = jj_gen;
1395 jj_consume_token(-1);
1396 throw new ParseException();
1398 throw new Error("Missing return statement in function");
1401 static final public Expression ConditionalExpression() throws ParseException {
1402 final Expression expr;
1403 Expression expr2 = null;
1404 Expression expr3 = null;
1405 expr = ConditionalOrExpression();
1406 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1408 jj_consume_token(HOOK);
1409 expr2 = Expression();
1410 jj_consume_token(COLON);
1411 expr3 = ConditionalExpression();
1414 jj_la1[30] = jj_gen;
1417 if (expr3 == null) {
1418 {if (true) return expr;}
1420 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1421 throw new Error("Missing return statement in function");
1424 static final public Expression ConditionalOrExpression() throws ParseException {
1425 Expression expr,expr2;
1427 expr = ConditionalAndExpression();
1430 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1436 jj_la1[31] = jj_gen;
1439 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1441 jj_consume_token(OR_OR);
1442 operator = OperatorIds.OR_OR;
1445 jj_consume_token(_ORL);
1446 operator = OperatorIds.ORL;
1449 jj_la1[32] = jj_gen;
1450 jj_consume_token(-1);
1451 throw new ParseException();
1453 expr2 = ConditionalAndExpression();
1454 expr = new BinaryExpression(expr,expr2,operator);
1456 {if (true) return expr;}
1457 throw new Error("Missing return statement in function");
1460 static final public Expression ConditionalAndExpression() throws ParseException {
1461 Expression expr,expr2;
1463 expr = ConcatExpression();
1466 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1472 jj_la1[33] = jj_gen;
1475 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1477 jj_consume_token(AND_AND);
1478 operator = OperatorIds.AND_AND;
1481 jj_consume_token(_ANDL);
1482 operator = OperatorIds.ANDL;
1485 jj_la1[34] = jj_gen;
1486 jj_consume_token(-1);
1487 throw new ParseException();
1489 expr2 = ConcatExpression();
1490 expr = new BinaryExpression(expr,expr2,operator);
1492 {if (true) return expr;}
1493 throw new Error("Missing return statement in function");
1496 static final public Expression ConcatExpression() throws ParseException {
1497 Expression expr,expr2;
1498 expr = InclusiveOrExpression();
1501 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1506 jj_la1[35] = jj_gen;
1509 jj_consume_token(DOT);
1510 expr2 = InclusiveOrExpression();
1511 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1513 {if (true) return expr;}
1514 throw new Error("Missing return statement in function");
1517 static final public Expression InclusiveOrExpression() throws ParseException {
1518 Expression expr,expr2;
1519 expr = ExclusiveOrExpression();
1522 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1527 jj_la1[36] = jj_gen;
1530 jj_consume_token(BIT_OR);
1531 expr2 = ExclusiveOrExpression();
1532 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1534 {if (true) return expr;}
1535 throw new Error("Missing return statement in function");
1538 static final public Expression ExclusiveOrExpression() throws ParseException {
1539 Expression expr,expr2;
1540 expr = AndExpression();
1543 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1548 jj_la1[37] = jj_gen;
1551 jj_consume_token(XOR);
1552 expr2 = AndExpression();
1553 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1555 {if (true) return expr;}
1556 throw new Error("Missing return statement in function");
1559 static final public Expression AndExpression() throws ParseException {
1560 Expression expr,expr2;
1561 expr = EqualityExpression();
1564 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1569 jj_la1[38] = jj_gen;
1572 jj_consume_token(BIT_AND);
1573 expr2 = EqualityExpression();
1574 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1576 {if (true) return expr;}
1577 throw new Error("Missing return statement in function");
1580 static final public Expression EqualityExpression() throws ParseException {
1581 Expression expr,expr2;
1583 expr = RelationalExpression();
1586 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1590 case BANGDOUBLEEQUAL:
1595 jj_la1[39] = jj_gen;
1598 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1600 jj_consume_token(EQUAL_EQUAL);
1601 operator = OperatorIds.EQUAL_EQUAL;
1604 jj_consume_token(DIF);
1605 operator = OperatorIds.DIF;
1608 jj_consume_token(NOT_EQUAL);
1609 operator = OperatorIds.DIF;
1611 case BANGDOUBLEEQUAL:
1612 jj_consume_token(BANGDOUBLEEQUAL);
1613 operator = OperatorIds.BANG_EQUAL_EQUAL;
1616 jj_consume_token(TRIPLEEQUAL);
1617 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1620 jj_la1[40] = jj_gen;
1621 jj_consume_token(-1);
1622 throw new ParseException();
1625 expr2 = RelationalExpression();
1626 } catch (ParseException e) {
1627 if (errorMessage != null) {
1628 {if (true) throw e;}
1630 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1632 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1633 errorEnd = SimpleCharStream.getPosition() + 1;
1634 {if (true) throw e;}
1636 expr = new BinaryExpression(expr,expr2,operator);
1638 {if (true) return expr;}
1639 throw new Error("Missing return statement in function");
1642 static final public Expression RelationalExpression() throws ParseException {
1643 Expression expr,expr2;
1645 expr = ShiftExpression();
1648 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1656 jj_la1[41] = jj_gen;
1659 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1661 jj_consume_token(LT);
1662 operator = OperatorIds.LESS;
1665 jj_consume_token(GT);
1666 operator = OperatorIds.GREATER;
1669 jj_consume_token(LE);
1670 operator = OperatorIds.LESS_EQUAL;
1673 jj_consume_token(GE);
1674 operator = OperatorIds.GREATER_EQUAL;
1677 jj_la1[42] = jj_gen;
1678 jj_consume_token(-1);
1679 throw new ParseException();
1681 expr2 = ShiftExpression();
1682 expr = new BinaryExpression(expr,expr2,operator);
1684 {if (true) return expr;}
1685 throw new Error("Missing return statement in function");
1688 static final public Expression ShiftExpression() throws ParseException {
1689 Expression expr,expr2;
1691 expr = AdditiveExpression();
1694 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1697 case RUNSIGNEDSHIFT:
1701 jj_la1[43] = jj_gen;
1704 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1706 jj_consume_token(LSHIFT);
1707 operator = OperatorIds.LEFT_SHIFT;
1710 jj_consume_token(RSIGNEDSHIFT);
1711 operator = OperatorIds.RIGHT_SHIFT;
1713 case RUNSIGNEDSHIFT:
1714 jj_consume_token(RUNSIGNEDSHIFT);
1715 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1718 jj_la1[44] = jj_gen;
1719 jj_consume_token(-1);
1720 throw new ParseException();
1722 expr2 = AdditiveExpression();
1723 expr = new BinaryExpression(expr,expr2,operator);
1725 {if (true) return expr;}
1726 throw new Error("Missing return statement in function");
1729 static final public Expression AdditiveExpression() throws ParseException {
1730 Expression expr,expr2;
1732 expr = MultiplicativeExpression();
1735 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1741 jj_la1[45] = jj_gen;
1744 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1746 jj_consume_token(PLUS);
1747 operator = OperatorIds.PLUS;
1750 jj_consume_token(MINUS);
1751 operator = OperatorIds.MINUS;
1754 jj_la1[46] = jj_gen;
1755 jj_consume_token(-1);
1756 throw new ParseException();
1758 expr2 = MultiplicativeExpression();
1759 expr = new BinaryExpression(expr,expr2,operator);
1761 {if (true) return expr;}
1762 throw new Error("Missing return statement in function");
1765 static final public Expression MultiplicativeExpression() throws ParseException {
1766 Expression expr,expr2;
1769 expr = UnaryExpression();
1770 } catch (ParseException e) {
1771 if (errorMessage != null) {if (true) throw e;}
1772 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1774 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1775 errorEnd = SimpleCharStream.getPosition() + 1;
1776 {if (true) throw e;}
1780 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1787 jj_la1[47] = jj_gen;
1790 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1792 jj_consume_token(STAR);
1793 operator = OperatorIds.MULTIPLY;
1796 jj_consume_token(SLASH);
1797 operator = OperatorIds.DIVIDE;
1800 jj_consume_token(REMAINDER);
1801 operator = OperatorIds.REMAINDER;
1804 jj_la1[48] = jj_gen;
1805 jj_consume_token(-1);
1806 throw new ParseException();
1808 expr2 = UnaryExpression();
1809 expr = new BinaryExpression(expr,expr2,operator);
1811 {if (true) return expr;}
1812 throw new Error("Missing return statement in function");
1816 * An unary expression starting with @, & or nothing
1818 static final public Expression UnaryExpression() throws ParseException {
1819 final Expression expr;
1820 final int pos = SimpleCharStream.getPosition();
1821 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1823 jj_consume_token(BIT_AND);
1824 expr = UnaryExpressionNoPrefix();
1825 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1838 case INTEGER_LITERAL:
1839 case FLOATING_POINT_LITERAL:
1840 case STRING_LITERAL:
1844 expr = AtUnaryExpression();
1845 {if (true) return expr;}
1848 jj_la1[49] = jj_gen;
1849 jj_consume_token(-1);
1850 throw new ParseException();
1852 throw new Error("Missing return statement in function");
1855 static final public Expression AtUnaryExpression() throws ParseException {
1856 final Expression expr;
1857 final int pos = SimpleCharStream.getPosition();
1858 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1860 jj_consume_token(AT);
1861 expr = AtUnaryExpression();
1862 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,pos);}
1874 case INTEGER_LITERAL:
1875 case FLOATING_POINT_LITERAL:
1876 case STRING_LITERAL:
1880 expr = UnaryExpressionNoPrefix();
1881 {if (true) return expr;}
1884 jj_la1[50] = jj_gen;
1885 jj_consume_token(-1);
1886 throw new ParseException();
1888 throw new Error("Missing return statement in function");
1891 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
1892 final Expression expr;
1894 final int pos = SimpleCharStream.getPosition();
1895 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1898 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1900 jj_consume_token(PLUS);
1901 operator = OperatorIds.PLUS;
1904 jj_consume_token(MINUS);
1905 operator = OperatorIds.MINUS;
1908 jj_la1[51] = jj_gen;
1909 jj_consume_token(-1);
1910 throw new ParseException();
1912 expr = UnaryExpression();
1913 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1917 expr = PreIncDecExpression();
1918 {if (true) return expr;}
1926 case INTEGER_LITERAL:
1927 case FLOATING_POINT_LITERAL:
1928 case STRING_LITERAL:
1932 expr = UnaryExpressionNotPlusMinus();
1933 {if (true) return expr;}
1936 jj_la1[52] = jj_gen;
1937 jj_consume_token(-1);
1938 throw new ParseException();
1940 throw new Error("Missing return statement in function");
1943 static final public Expression PreIncDecExpression() throws ParseException {
1944 final Expression expr;
1946 final int pos = SimpleCharStream.getPosition();
1947 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1949 jj_consume_token(PLUS_PLUS);
1950 operator = OperatorIds.PLUS_PLUS;
1953 jj_consume_token(MINUS_MINUS);
1954 operator = OperatorIds.MINUS_MINUS;
1957 jj_la1[53] = jj_gen;
1958 jj_consume_token(-1);
1959 throw new ParseException();
1961 expr = PrimaryExpression();
1962 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1963 throw new Error("Missing return statement in function");
1966 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
1967 final Expression expr;
1968 if (jj_2_4(2147483647)) {
1969 expr = CastExpression();
1970 {if (true) return expr;}
1972 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1978 expr = PostfixExpression();
1979 {if (true) return expr;}
1984 case INTEGER_LITERAL:
1985 case FLOATING_POINT_LITERAL:
1986 case STRING_LITERAL:
1988 {if (true) return expr;}
1991 jj_consume_token(LPAREN);
1992 expr = Expression();
1994 jj_consume_token(RPAREN);
1995 } catch (ParseException e) {
1996 errorMessage = "')' expected";
1998 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1999 errorEnd = SimpleCharStream.getPosition() + 1;
2000 {if (true) throw e;}
2002 {if (true) return expr;}
2005 jj_la1[54] = jj_gen;
2006 jj_consume_token(-1);
2007 throw new ParseException();
2010 throw new Error("Missing return statement in function");
2013 static final public CastExpression CastExpression() throws ParseException {
2014 final ConstantIdentifier type;
2015 final Expression expr;
2016 final int pos = SimpleCharStream.getPosition();
2017 jj_consume_token(LPAREN);
2018 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2031 jj_consume_token(ARRAY);
2032 type = new ConstantIdentifier(Types.ARRAY,pos,SimpleCharStream.getPosition());
2035 jj_la1[55] = jj_gen;
2036 jj_consume_token(-1);
2037 throw new ParseException();
2039 jj_consume_token(RPAREN);
2040 expr = UnaryExpression();
2041 {if (true) return new CastExpression(type,expr,pos,SimpleCharStream.getPosition());}
2042 throw new Error("Missing return statement in function");
2045 static final public Expression PostfixExpression() throws ParseException {
2046 final Expression expr;
2048 final int pos = SimpleCharStream.getPosition();
2049 expr = PrimaryExpression();
2050 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2053 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2055 jj_consume_token(PLUS_PLUS);
2056 operator = OperatorIds.PLUS_PLUS;
2059 jj_consume_token(MINUS_MINUS);
2060 operator = OperatorIds.MINUS_MINUS;
2063 jj_la1[56] = jj_gen;
2064 jj_consume_token(-1);
2065 throw new ParseException();
2069 jj_la1[57] = jj_gen;
2072 if (operator == -1) {
2073 {if (true) return expr;}
2075 {if (true) return new PostfixedUnaryExpression(expr,operator,pos);}
2076 throw new Error("Missing return statement in function");
2079 static final public Expression PrimaryExpression() throws ParseException {
2080 final Token identifier;
2082 final int pos = SimpleCharStream.getPosition();
2084 identifier = jj_consume_token(IDENTIFIER);
2085 jj_consume_token(STATICCLASSACCESS);
2086 expr = ClassIdentifier();
2087 expr = new ClassAccess(new ConstantIdentifier(identifier.image.toCharArray(),
2089 SimpleCharStream.getPosition()),
2091 ClassAccess.STATIC);
2094 if (jj_2_5(2147483647)) {
2099 expr = PrimarySuffix(expr);
2101 {if (true) return expr;}
2103 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2108 expr = PrimaryPrefix();
2111 if (jj_2_6(2147483647)) {
2116 expr = PrimarySuffix(expr);
2118 {if (true) return expr;}
2121 expr = ArrayDeclarator();
2122 {if (true) return expr;}
2125 jj_la1[58] = jj_gen;
2126 jj_consume_token(-1);
2127 throw new ParseException();
2130 throw new Error("Missing return statement in function");
2134 * An array declarator.
2138 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2139 final ArrayVariableDeclaration[] vars;
2140 final int pos = SimpleCharStream.getPosition();
2141 jj_consume_token(ARRAY);
2142 vars = ArrayInitializer();
2143 {if (true) return new ArrayInitializer(vars,pos,SimpleCharStream.getPosition());}
2144 throw new Error("Missing return statement in function");
2147 static final public Expression PrimaryPrefix() throws ParseException {
2148 final Expression expr;
2151 final int pos = SimpleCharStream.getPosition();
2152 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2154 token = jj_consume_token(IDENTIFIER);
2155 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2157 SimpleCharStream.getPosition());}
2160 jj_consume_token(NEW);
2161 expr = ClassIdentifier();
2162 {if (true) return new PrefixedUnaryExpression(expr,
2168 var = VariableDeclaratorId();
2169 {if (true) return new VariableDeclaration(currentSegment,
2172 SimpleCharStream.getPosition());}
2175 jj_la1[59] = jj_gen;
2176 jj_consume_token(-1);
2177 throw new ParseException();
2179 throw new Error("Missing return statement in function");
2182 static final public PrefixedUnaryExpression classInstantiation() throws ParseException {
2184 final StringBuffer buff;
2185 final int pos = SimpleCharStream.getPosition();
2186 jj_consume_token(NEW);
2187 expr = ClassIdentifier();
2188 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2194 buff = new StringBuffer(expr.toStringExpression());
2195 expr = PrimaryExpression();
2196 buff.append(expr.toStringExpression());
2197 expr = new ConstantIdentifier(buff.toString().toCharArray(),
2199 SimpleCharStream.getPosition());
2202 jj_la1[60] = jj_gen;
2205 {if (true) return new PrefixedUnaryExpression(expr,
2208 throw new Error("Missing return statement in function");
2211 static final public ConstantIdentifier ClassIdentifier() throws ParseException {
2214 final int pos = SimpleCharStream.getPosition();
2215 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2217 token = jj_consume_token(IDENTIFIER);
2218 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2220 SimpleCharStream.getPosition());}
2224 expr = VariableDeclaratorId();
2225 {if (true) return new ConstantIdentifier(expr.toCharArray(),
2227 SimpleCharStream.getPosition());}
2230 jj_la1[61] = jj_gen;
2231 jj_consume_token(-1);
2232 throw new ParseException();
2234 throw new Error("Missing return statement in function");
2237 static final public AbstractSuffixExpression PrimarySuffix(final Expression prefix) throws ParseException {
2238 final AbstractSuffixExpression expr;
2239 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2241 expr = Arguments(prefix);
2242 {if (true) return expr;}
2246 expr = VariableSuffix(prefix);
2247 {if (true) return expr;}
2250 jj_la1[62] = jj_gen;
2251 jj_consume_token(-1);
2252 throw new ParseException();
2254 throw new Error("Missing return statement in function");
2257 static final public AbstractSuffixExpression VariableSuffix(final Expression prefix) throws ParseException {
2259 final int pos = SimpleCharStream.getPosition();
2260 Expression expression = null;
2261 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2263 jj_consume_token(CLASSACCESS);
2265 expr = VariableName();
2266 } catch (ParseException e) {
2267 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2269 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2270 errorEnd = SimpleCharStream.getPosition() + 1;
2271 {if (true) throw e;}
2273 {if (true) return new ClassAccess(prefix,
2274 new ConstantIdentifier(expr.toCharArray(),pos,SimpleCharStream.getPosition()),
2275 ClassAccess.NORMAL);}
2278 jj_consume_token(LBRACKET);
2279 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2304 case INTEGER_LITERAL:
2305 case FLOATING_POINT_LITERAL:
2306 case STRING_LITERAL:
2310 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2326 case INTEGER_LITERAL:
2327 case FLOATING_POINT_LITERAL:
2328 case STRING_LITERAL:
2332 expression = Expression();
2343 expression = Type();
2346 jj_la1[63] = jj_gen;
2347 jj_consume_token(-1);
2348 throw new ParseException();
2352 jj_la1[64] = jj_gen;
2356 jj_consume_token(RBRACKET);
2357 } catch (ParseException e) {
2358 errorMessage = "']' expected";
2360 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2361 errorEnd = SimpleCharStream.getPosition() + 1;
2362 {if (true) throw e;}
2364 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2367 jj_la1[65] = jj_gen;
2368 jj_consume_token(-1);
2369 throw new ParseException();
2371 throw new Error("Missing return statement in function");
2374 static final public Literal Literal() throws ParseException {
2377 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2378 case INTEGER_LITERAL:
2379 token = jj_consume_token(INTEGER_LITERAL);
2380 pos = SimpleCharStream.getPosition();
2381 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2383 case FLOATING_POINT_LITERAL:
2384 token = jj_consume_token(FLOATING_POINT_LITERAL);
2385 pos = SimpleCharStream.getPosition();
2386 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2388 case STRING_LITERAL:
2389 token = jj_consume_token(STRING_LITERAL);
2390 pos = SimpleCharStream.getPosition();
2391 {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length());}
2394 jj_consume_token(TRUE);
2395 pos = SimpleCharStream.getPosition();
2396 {if (true) return new TrueLiteral(pos-4,pos);}
2399 jj_consume_token(FALSE);
2400 pos = SimpleCharStream.getPosition();
2401 {if (true) return new FalseLiteral(pos-4,pos);}
2404 jj_consume_token(NULL);
2405 pos = SimpleCharStream.getPosition();
2406 {if (true) return new NullLiteral(pos-4,pos);}
2409 jj_la1[66] = jj_gen;
2410 jj_consume_token(-1);
2411 throw new ParseException();
2413 throw new Error("Missing return statement in function");
2416 static final public FunctionCall Arguments(final Expression func) throws ParseException {
2417 Expression[] args = null;
2418 jj_consume_token(LPAREN);
2419 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2435 case INTEGER_LITERAL:
2436 case FLOATING_POINT_LITERAL:
2437 case STRING_LITERAL:
2441 args = ArgumentList();
2444 jj_la1[67] = jj_gen;
2448 jj_consume_token(RPAREN);
2449 } catch (ParseException e) {
2450 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2452 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2453 errorEnd = SimpleCharStream.getPosition() + 1;
2454 {if (true) throw e;}
2456 {if (true) return new FunctionCall(func,args,SimpleCharStream.getPosition());}
2457 throw new Error("Missing return statement in function");
2461 * An argument list is a list of arguments separated by comma :
2462 * argumentDeclaration() (, argumentDeclaration)*
2463 * @return an array of arguments
2465 static final public Expression[] ArgumentList() throws ParseException {
2467 final ArrayList list = new ArrayList();
2472 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2477 jj_la1[68] = jj_gen;
2480 jj_consume_token(COMMA);
2484 } catch (ParseException e) {
2485 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2487 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2488 errorEnd = SimpleCharStream.getPosition() + 1;
2489 {if (true) throw e;}
2492 final Expression[] arguments = new Expression[list.size()];
2493 list.toArray(arguments);
2494 {if (true) return arguments;}
2495 throw new Error("Missing return statement in function");
2499 * A Statement without break.
2501 static final public Statement StatementNoBreak() throws ParseException {
2502 final Statement statement;
2505 statement = Expression();
2507 jj_consume_token(SEMICOLON);
2508 } catch (ParseException e) {
2509 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2510 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2512 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2513 errorEnd = SimpleCharStream.getPosition() + 1;
2514 {if (true) throw e;}
2517 {if (true) return statement;}
2518 } else if (jj_2_9(2)) {
2519 statement = LabeledStatement();
2520 {if (true) return statement;}
2522 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2524 statement = Block();
2525 {if (true) return statement;}
2528 statement = EmptyStatement();
2529 {if (true) return statement;}
2538 statement = StatementExpression();
2540 jj_consume_token(SEMICOLON);
2541 } catch (ParseException e) {
2542 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2544 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2545 errorEnd = SimpleCharStream.getPosition() + 1;
2546 {if (true) throw e;}
2548 {if (true) return statement;}
2551 statement = SwitchStatement();
2552 {if (true) return statement;}
2555 statement = IfStatement();
2556 {if (true) return statement;}
2559 statement = WhileStatement();
2560 {if (true) return statement;}
2563 statement = DoStatement();
2564 {if (true) return statement;}
2567 statement = ForStatement();
2568 {if (true) return statement;}
2571 statement = ForeachStatement();
2572 {if (true) return statement;}
2575 statement = ContinueStatement();
2576 {if (true) return statement;}
2579 statement = ReturnStatement();
2580 {if (true) return statement;}
2583 statement = EchoStatement();
2584 {if (true) return statement;}
2591 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2593 token = jj_consume_token(AT);
2596 jj_la1[69] = jj_gen;
2599 statement = IncludeStatement();
2600 if (token != null) {
2601 ((InclusionStatement)statement).silent = true;
2603 {if (true) return statement;}
2606 statement = StaticStatement();
2607 {if (true) return statement;}
2610 statement = GlobalStatement();
2611 {if (true) return statement;}
2614 statement = defineStatement();
2615 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2618 jj_la1[70] = jj_gen;
2619 jj_consume_token(-1);
2620 throw new ParseException();
2623 throw new Error("Missing return statement in function");
2626 static final public Define defineStatement() throws ParseException {
2627 final int start = SimpleCharStream.getPosition();
2628 Expression defineName,defineValue;
2629 jj_consume_token(DEFINE);
2631 jj_consume_token(LPAREN);
2632 } catch (ParseException e) {
2633 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2635 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2636 errorEnd = SimpleCharStream.getPosition() + 1;
2637 processParseException(e);
2640 defineName = Expression();
2641 } catch (ParseException e) {
2642 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2644 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2645 errorEnd = SimpleCharStream.getPosition() + 1;
2646 {if (true) throw e;}
2649 jj_consume_token(COMMA);
2650 } catch (ParseException e) {
2651 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2653 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2654 errorEnd = SimpleCharStream.getPosition() + 1;
2655 processParseException(e);
2658 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2660 defineValue = PrintExpression();
2663 jj_la1[71] = jj_gen;
2664 if (jj_2_10(2147483647)) {
2665 defineValue = varAssignation();
2667 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2680 case INTEGER_LITERAL:
2681 case FLOATING_POINT_LITERAL:
2682 case STRING_LITERAL:
2686 defineValue = ConditionalExpression();
2689 jj_la1[72] = jj_gen;
2690 jj_consume_token(-1);
2691 throw new ParseException();
2695 } catch (ParseException e) {
2696 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2698 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2699 errorEnd = SimpleCharStream.getPosition() + 1;
2700 {if (true) throw e;}
2703 jj_consume_token(RPAREN);
2704 } catch (ParseException e) {
2705 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2707 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2708 errorEnd = SimpleCharStream.getPosition() + 1;
2709 processParseException(e);
2711 {if (true) return new Define(currentSegment,
2715 SimpleCharStream.getPosition());}
2716 throw new Error("Missing return statement in function");
2720 * A Normal statement.
2722 static final public Statement Statement() throws ParseException {
2723 final Statement statement;
2724 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2756 case INTEGER_LITERAL:
2757 case FLOATING_POINT_LITERAL:
2758 case STRING_LITERAL:
2764 statement = StatementNoBreak();
2765 {if (true) return statement;}
2768 statement = BreakStatement();
2769 {if (true) return statement;}
2772 jj_la1[73] = jj_gen;
2773 jj_consume_token(-1);
2774 throw new ParseException();
2776 throw new Error("Missing return statement in function");
2780 * An html block inside a php syntax.
2782 static final public HTMLBlock htmlBlock() throws ParseException {
2783 final int startIndex = nodePtr;
2784 final AstNode[] blockNodes;
2786 jj_consume_token(PHPEND);
2789 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2794 jj_la1[74] = jj_gen;
2800 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2802 jj_consume_token(PHPSTARTLONG);
2805 jj_consume_token(PHPSTARTSHORT);
2808 jj_la1[75] = jj_gen;
2809 jj_consume_token(-1);
2810 throw new ParseException();
2812 } catch (ParseException e) {
2813 errorMessage = "unexpected end of file , '<?php' expected";
2815 errorStart = SimpleCharStream.getPosition();
2816 errorEnd = SimpleCharStream.getPosition();
2817 {if (true) throw e;}
2819 nbNodes = nodePtr - startIndex;
2820 blockNodes = new AstNode[nbNodes];
2821 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2822 nodePtr = startIndex;
2823 {if (true) return new HTMLBlock(blockNodes);}
2824 throw new Error("Missing return statement in function");
2828 * An include statement. It's "include" an expression;
2830 static final public InclusionStatement IncludeStatement() throws ParseException {
2831 final Expression expr;
2833 final int pos = SimpleCharStream.getPosition();
2834 final InclusionStatement inclusionStatement;
2835 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2837 jj_consume_token(REQUIRE);
2838 keyword = InclusionStatement.REQUIRE;
2841 jj_consume_token(REQUIRE_ONCE);
2842 keyword = InclusionStatement.REQUIRE_ONCE;
2845 jj_consume_token(INCLUDE);
2846 keyword = InclusionStatement.INCLUDE;
2849 jj_consume_token(INCLUDE_ONCE);
2850 keyword = InclusionStatement.INCLUDE_ONCE;
2853 jj_la1[76] = jj_gen;
2854 jj_consume_token(-1);
2855 throw new ParseException();
2858 expr = Expression();
2859 } catch (ParseException e) {
2860 if (errorMessage != null) {
2861 {if (true) throw e;}
2863 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
2865 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2866 errorEnd = SimpleCharStream.getPosition() + 1;
2867 {if (true) throw e;}
2869 inclusionStatement = new InclusionStatement(currentSegment,
2873 currentSegment.add(inclusionStatement);
2875 jj_consume_token(SEMICOLON);
2876 } catch (ParseException e) {
2877 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2879 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2880 errorEnd = SimpleCharStream.getPosition() + 1;
2881 {if (true) throw e;}
2883 {if (true) return inclusionStatement;}
2884 throw new Error("Missing return statement in function");
2887 static final public PrintExpression PrintExpression() throws ParseException {
2888 final Expression expr;
2889 final int pos = SimpleCharStream.getPosition();
2890 jj_consume_token(PRINT);
2891 expr = Expression();
2892 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
2893 throw new Error("Missing return statement in function");
2896 static final public ListExpression ListExpression() throws ParseException {
2898 final Expression expression;
2899 final ArrayList list = new ArrayList();
2900 final int pos = SimpleCharStream.getPosition();
2901 jj_consume_token(LIST);
2903 jj_consume_token(LPAREN);
2904 } catch (ParseException e) {
2905 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2907 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2908 errorEnd = SimpleCharStream.getPosition() + 1;
2909 {if (true) throw e;}
2911 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2914 expr = VariableDeclaratorId();
2918 jj_la1[77] = jj_gen;
2921 if (expr == null) list.add(null);
2924 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2929 jj_la1[78] = jj_gen;
2933 jj_consume_token(COMMA);
2934 } catch (ParseException e) {
2935 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2937 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2938 errorEnd = SimpleCharStream.getPosition() + 1;
2939 {if (true) throw e;}
2941 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2944 expr = VariableDeclaratorId();
2948 jj_la1[79] = jj_gen;
2953 jj_consume_token(RPAREN);
2954 } catch (ParseException e) {
2955 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2957 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2958 errorEnd = SimpleCharStream.getPosition() + 1;
2959 {if (true) throw e;}
2961 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2963 jj_consume_token(ASSIGN);
2964 expression = Expression();
2965 final String[] strings = new String[list.size()];
2966 list.toArray(strings);
2967 {if (true) return new ListExpression(strings,
2970 SimpleCharStream.getPosition());}
2973 jj_la1[80] = jj_gen;
2976 final String[] strings = new String[list.size()];
2977 list.toArray(strings);
2978 {if (true) return new ListExpression(strings,pos,SimpleCharStream.getPosition());}
2979 throw new Error("Missing return statement in function");
2983 * An echo statement.
2984 * echo anyexpression (, otherexpression)*
2986 static final public EchoStatement EchoStatement() throws ParseException {
2987 final ArrayList expressions = new ArrayList();
2989 final int pos = SimpleCharStream.getPosition();
2990 jj_consume_token(ECHO);
2991 expr = Expression();
2992 expressions.add(expr);
2995 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3000 jj_la1[81] = jj_gen;
3003 jj_consume_token(COMMA);
3004 expr = Expression();
3005 expressions.add(expr);
3008 jj_consume_token(SEMICOLON);
3009 } catch (ParseException e) {
3010 if (e.currentToken.next.kind != 4) {
3011 errorMessage = "';' expected after 'echo' statement";
3013 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3014 errorEnd = SimpleCharStream.getPosition() + 1;
3015 {if (true) throw e;}
3018 final Expression[] exprs = new Expression[expressions.size()];
3019 expressions.toArray(exprs);
3020 {if (true) return new EchoStatement(exprs,pos);}
3021 throw new Error("Missing return statement in function");
3024 static final public GlobalStatement GlobalStatement() throws ParseException {
3025 final int pos = SimpleCharStream.getPosition();
3027 final ArrayList vars = new ArrayList();
3028 final GlobalStatement global;
3029 jj_consume_token(GLOBAL);
3030 expr = VariableDeclaratorId();
3034 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3039 jj_la1[82] = jj_gen;
3042 jj_consume_token(COMMA);
3043 expr = VariableDeclaratorId();
3047 jj_consume_token(SEMICOLON);
3048 final String[] strings = new String[vars.size()];
3049 vars.toArray(strings);
3050 global = new GlobalStatement(currentSegment,
3053 SimpleCharStream.getPosition());
3054 currentSegment.add(global);
3055 {if (true) return global;}
3056 } catch (ParseException e) {
3057 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3059 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3060 errorEnd = SimpleCharStream.getPosition() + 1;
3061 {if (true) throw e;}
3063 throw new Error("Missing return statement in function");
3066 static final public StaticStatement StaticStatement() throws ParseException {
3067 final int pos = SimpleCharStream.getPosition();
3068 final ArrayList vars = new ArrayList();
3069 VariableDeclaration expr;
3070 jj_consume_token(STATIC);
3071 expr = VariableDeclarator();
3072 vars.add(new String(expr.name));
3075 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3080 jj_la1[83] = jj_gen;
3083 jj_consume_token(COMMA);
3084 expr = VariableDeclarator();
3085 vars.add(new String(expr.name));
3088 jj_consume_token(SEMICOLON);
3089 final String[] strings = new String[vars.size()];
3090 vars.toArray(strings);
3091 {if (true) return new StaticStatement(strings,
3093 SimpleCharStream.getPosition());}
3094 } catch (ParseException e) {
3095 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3097 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3098 errorEnd = SimpleCharStream.getPosition() + 1;
3099 {if (true) throw e;}
3101 throw new Error("Missing return statement in function");
3104 static final public LabeledStatement LabeledStatement() throws ParseException {
3105 final int pos = SimpleCharStream.getPosition();
3107 final Statement statement;
3108 label = jj_consume_token(IDENTIFIER);
3109 jj_consume_token(COLON);
3110 statement = Statement();
3111 {if (true) return new LabeledStatement(label.image.toCharArray(),statement,pos,SimpleCharStream.getPosition());}
3112 throw new Error("Missing return statement in function");
3122 static final public Block Block() throws ParseException {
3123 final int pos = SimpleCharStream.getPosition();
3124 final ArrayList list = new ArrayList();
3125 Statement statement;
3127 jj_consume_token(LBRACE);
3128 } catch (ParseException e) {
3129 errorMessage = "'{' expected";
3131 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3132 errorEnd = SimpleCharStream.getPosition() + 1;
3133 {if (true) throw e;}
3137 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3173 case INTEGER_LITERAL:
3174 case FLOATING_POINT_LITERAL:
3175 case STRING_LITERAL:
3184 jj_la1[84] = jj_gen;
3187 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3222 case INTEGER_LITERAL:
3223 case FLOATING_POINT_LITERAL:
3224 case STRING_LITERAL:
3230 statement = BlockStatement();
3231 list.add(statement);
3234 statement = htmlBlock();
3235 list.add(statement);
3238 jj_la1[85] = jj_gen;
3239 jj_consume_token(-1);
3240 throw new ParseException();
3244 jj_consume_token(RBRACE);
3245 } catch (ParseException e) {
3246 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3248 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3249 errorEnd = SimpleCharStream.getPosition() + 1;
3250 {if (true) throw e;}
3252 final Statement[] statements = new Statement[list.size()];
3253 list.toArray(statements);
3254 {if (true) return new Block(statements,pos,SimpleCharStream.getPosition());}
3255 throw new Error("Missing return statement in function");
3258 static final public Statement BlockStatement() throws ParseException {
3259 final Statement statement;
3260 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3293 case INTEGER_LITERAL:
3294 case FLOATING_POINT_LITERAL:
3295 case STRING_LITERAL:
3302 statement = Statement();
3303 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3304 {if (true) return statement;}
3305 } catch (ParseException e) {
3306 if (errorMessage != null) {if (true) throw e;}
3307 errorMessage = "statement expected";
3309 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3310 errorEnd = SimpleCharStream.getPosition() + 1;
3311 {if (true) throw e;}
3315 statement = ClassDeclaration();
3316 {if (true) return statement;}
3319 statement = MethodDeclaration();
3320 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3321 currentSegment.add((MethodDeclaration) statement);
3322 {if (true) return statement;}
3325 jj_la1[86] = jj_gen;
3326 jj_consume_token(-1);
3327 throw new ParseException();
3329 throw new Error("Missing return statement in function");
3333 * A Block statement that will not contain any 'break'
3335 static final public Statement BlockStatementNoBreak() throws ParseException {
3336 final Statement statement;
3337 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3369 case INTEGER_LITERAL:
3370 case FLOATING_POINT_LITERAL:
3371 case STRING_LITERAL:
3377 statement = StatementNoBreak();
3378 {if (true) return statement;}
3381 statement = ClassDeclaration();
3382 {if (true) return statement;}
3385 statement = MethodDeclaration();
3386 currentSegment.add((MethodDeclaration) statement);
3387 {if (true) return statement;}
3390 jj_la1[87] = jj_gen;
3391 jj_consume_token(-1);
3392 throw new ParseException();
3394 throw new Error("Missing return statement in function");
3397 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3398 final ArrayList list = new ArrayList();
3399 VariableDeclaration var;
3400 var = LocalVariableDeclarator();
3404 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3409 jj_la1[88] = jj_gen;
3412 jj_consume_token(COMMA);
3413 var = LocalVariableDeclarator();
3416 final VariableDeclaration[] vars = new VariableDeclaration[list.size()];
3418 {if (true) return vars;}
3419 throw new Error("Missing return statement in function");
3422 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3423 final String varName;
3424 Expression initializer = null;
3425 final int pos = SimpleCharStream.getPosition();
3426 varName = VariableDeclaratorId();
3427 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3429 jj_consume_token(ASSIGN);
3430 initializer = Expression();
3433 jj_la1[89] = jj_gen;
3436 if (initializer == null) {
3437 {if (true) return new VariableDeclaration(currentSegment,
3438 varName.toCharArray(),
3440 SimpleCharStream.getPosition());}
3442 {if (true) return new VariableDeclaration(currentSegment,
3443 varName.toCharArray(),
3446 throw new Error("Missing return statement in function");
3449 static final public EmptyStatement EmptyStatement() throws ParseException {
3451 jj_consume_token(SEMICOLON);
3452 pos = SimpleCharStream.getPosition();
3453 {if (true) return new EmptyStatement(pos-1,pos);}
3454 throw new Error("Missing return statement in function");
3457 static final public Expression StatementExpression() throws ParseException {
3458 final Expression expr,expr2;
3460 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3463 expr = PreIncDecExpression();
3464 {if (true) return expr;}
3471 expr = PrimaryExpression();
3472 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3487 case RSIGNEDSHIFTASSIGN:
3488 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3490 jj_consume_token(PLUS_PLUS);
3491 {if (true) return new PostfixedUnaryExpression(expr,
3492 OperatorIds.PLUS_PLUS,
3493 SimpleCharStream.getPosition());}
3496 jj_consume_token(MINUS_MINUS);
3497 {if (true) return new PostfixedUnaryExpression(expr,
3498 OperatorIds.MINUS_MINUS,
3499 SimpleCharStream.getPosition());}
3513 case RSIGNEDSHIFTASSIGN:
3514 operator = AssignmentOperator();
3515 expr2 = Expression();
3516 {if (true) return new BinaryExpression(expr,expr2,operator);}
3519 jj_la1[90] = jj_gen;
3520 jj_consume_token(-1);
3521 throw new ParseException();
3525 jj_la1[91] = jj_gen;
3528 {if (true) return expr;}
3531 jj_la1[92] = jj_gen;
3532 jj_consume_token(-1);
3533 throw new ParseException();
3535 throw new Error("Missing return statement in function");
3538 static final public SwitchStatement SwitchStatement() throws ParseException {
3539 final Expression variable;
3540 final AbstractCase[] cases;
3541 final int pos = SimpleCharStream.getPosition();
3542 jj_consume_token(SWITCH);
3544 jj_consume_token(LPAREN);
3545 } catch (ParseException e) {
3546 errorMessage = "'(' expected after 'switch'";
3548 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3549 errorEnd = SimpleCharStream.getPosition() + 1;
3550 {if (true) throw e;}
3553 variable = Expression();
3554 } catch (ParseException e) {
3555 if (errorMessage != null) {
3556 {if (true) throw e;}
3558 errorMessage = "expression expected";
3560 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3561 errorEnd = SimpleCharStream.getPosition() + 1;
3562 {if (true) throw e;}
3565 jj_consume_token(RPAREN);
3566 } catch (ParseException e) {
3567 errorMessage = "')' expected";
3569 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3570 errorEnd = SimpleCharStream.getPosition() + 1;
3571 {if (true) throw e;}
3573 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3575 cases = switchStatementBrace();
3578 cases = switchStatementColon(pos, pos + 6);
3581 jj_la1[93] = jj_gen;
3582 jj_consume_token(-1);
3583 throw new ParseException();
3585 {if (true) return new SwitchStatement(variable,cases,pos,SimpleCharStream.getPosition());}
3586 throw new Error("Missing return statement in function");
3589 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3591 final ArrayList cases = new ArrayList();
3592 jj_consume_token(LBRACE);
3595 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3601 jj_la1[94] = jj_gen;
3604 cas = switchLabel0();
3608 jj_consume_token(RBRACE);
3609 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3610 cases.toArray(abcase);
3611 {if (true) return abcase;}
3612 } catch (ParseException e) {
3613 errorMessage = "'}' expected";
3615 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3616 errorEnd = SimpleCharStream.getPosition() + 1;
3617 {if (true) throw e;}
3619 throw new Error("Missing return statement in function");
3623 * A Switch statement with : ... endswitch;
3624 * @param start the begin offset of the switch
3625 * @param end the end offset of the switch
3627 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3629 final ArrayList cases = new ArrayList();
3630 jj_consume_token(COLON);
3632 setMarker(fileToParse,
3633 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3637 "Line " + token.beginLine);
3638 } catch (CoreException e) {
3639 PHPeclipsePlugin.log(e);
3643 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3649 jj_la1[95] = jj_gen;
3652 cas = switchLabel0();
3656 jj_consume_token(ENDSWITCH);
3657 } catch (ParseException e) {
3658 errorMessage = "'endswitch' expected";
3660 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3661 errorEnd = SimpleCharStream.getPosition() + 1;
3662 {if (true) throw e;}
3665 jj_consume_token(SEMICOLON);
3666 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3667 cases.toArray(abcase);
3668 {if (true) return abcase;}
3669 } catch (ParseException e) {
3670 errorMessage = "';' expected after 'endswitch' keyword";
3672 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3673 errorEnd = SimpleCharStream.getPosition() + 1;
3674 {if (true) throw e;}
3676 throw new Error("Missing return statement in function");
3679 static final public AbstractCase switchLabel0() throws ParseException {
3680 final Expression expr;
3681 Statement statement;
3682 final ArrayList stmts = new ArrayList();
3683 final int pos = SimpleCharStream.getPosition();
3684 expr = SwitchLabel();
3687 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3722 case INTEGER_LITERAL:
3723 case FLOATING_POINT_LITERAL:
3724 case STRING_LITERAL:
3733 jj_la1[96] = jj_gen;
3736 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3770 case INTEGER_LITERAL:
3771 case FLOATING_POINT_LITERAL:
3772 case STRING_LITERAL:
3778 statement = BlockStatementNoBreak();
3779 stmts.add(statement);
3782 statement = htmlBlock();
3783 stmts.add(statement);
3786 jj_la1[97] = jj_gen;
3787 jj_consume_token(-1);
3788 throw new ParseException();
3791 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3793 statement = BreakStatement();
3794 stmts.add(statement);
3797 jj_la1[98] = jj_gen;
3800 final Statement[] stmtsArray = new Statement[stmts.size()];
3801 stmts.toArray(stmtsArray);
3802 if (expr == null) {//it's a default
3803 {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3805 {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3806 throw new Error("Missing return statement in function");
3811 * case Expression() :
3813 * @return the if it was a case and null if not
3815 static final public Expression SwitchLabel() throws ParseException {
3816 final Expression expr;
3817 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3819 token = jj_consume_token(CASE);
3821 expr = Expression();
3822 } catch (ParseException e) {
3823 if (errorMessage != null) {if (true) throw e;}
3824 errorMessage = "expression expected after 'case' keyword";
3826 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3827 errorEnd = SimpleCharStream.getPosition() + 1;
3828 {if (true) throw e;}
3831 jj_consume_token(COLON);
3832 {if (true) return expr;}
3833 } catch (ParseException e) {
3834 errorMessage = "':' expected after case expression";
3836 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3837 errorEnd = SimpleCharStream.getPosition() + 1;
3838 {if (true) throw e;}
3842 token = jj_consume_token(_DEFAULT);
3844 jj_consume_token(COLON);
3845 {if (true) return null;}
3846 } catch (ParseException e) {
3847 errorMessage = "':' expected after 'default' keyword";
3849 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3850 errorEnd = SimpleCharStream.getPosition() + 1;
3851 {if (true) throw e;}
3855 jj_la1[99] = jj_gen;
3856 jj_consume_token(-1);
3857 throw new ParseException();
3859 throw new Error("Missing return statement in function");
3862 static final public Break BreakStatement() throws ParseException {
3863 Expression expression = null;
3864 final int start = SimpleCharStream.getPosition();
3865 jj_consume_token(BREAK);
3866 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3882 case INTEGER_LITERAL:
3883 case FLOATING_POINT_LITERAL:
3884 case STRING_LITERAL:
3888 expression = Expression();
3891 jj_la1[100] = jj_gen;
3895 jj_consume_token(SEMICOLON);
3896 } catch (ParseException e) {
3897 errorMessage = "';' expected after 'break' keyword";
3899 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3900 errorEnd = SimpleCharStream.getPosition() + 1;
3901 {if (true) throw e;}
3903 {if (true) return new Break(expression, start, SimpleCharStream.getPosition());}
3904 throw new Error("Missing return statement in function");
3907 static final public IfStatement IfStatement() throws ParseException {
3908 final int pos = SimpleCharStream.getPosition();
3909 final Expression condition;
3910 final IfStatement ifStatement;
3911 jj_consume_token(IF);
3912 condition = Condition("if");
3913 ifStatement = IfStatement0(condition, pos,pos+2);
3914 {if (true) return ifStatement;}
3915 throw new Error("Missing return statement in function");
3918 static final public Expression Condition(final String keyword) throws ParseException {
3919 final Expression condition;
3921 jj_consume_token(LPAREN);
3922 } catch (ParseException e) {
3923 errorMessage = "'(' expected after " + keyword + " keyword";
3925 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length();
3926 errorEnd = errorStart +1;
3927 processParseException(e);
3929 condition = Expression();
3931 jj_consume_token(RPAREN);
3932 } catch (ParseException e) {
3933 errorMessage = "')' expected after " + keyword + " keyword";
3935 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3936 errorEnd = SimpleCharStream.getPosition() + 1;
3937 processParseException(e);
3939 {if (true) return condition;}
3940 throw new Error("Missing return statement in function");
3943 static final public IfStatement IfStatement0(final Expression condition, final int start,final int end) throws ParseException {
3944 Statement statement;
3945 final Statement stmt;
3946 final Statement[] statementsArray;
3947 ElseIf elseifStatement;
3948 Else elseStatement = null;
3949 final ArrayList stmts;
3950 final ArrayList elseIfList = new ArrayList();
3951 final ElseIf[] elseIfs;
3952 int pos = SimpleCharStream.getPosition();
3953 final int endStatements;
3954 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3956 jj_consume_token(COLON);
3957 stmts = new ArrayList();
3960 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3994 case INTEGER_LITERAL:
3995 case FLOATING_POINT_LITERAL:
3996 case STRING_LITERAL:
4005 jj_la1[101] = jj_gen;
4008 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4041 case INTEGER_LITERAL:
4042 case FLOATING_POINT_LITERAL:
4043 case STRING_LITERAL:
4049 statement = Statement();
4050 stmts.add(statement);
4053 statement = htmlBlock();
4054 stmts.add(statement);
4057 jj_la1[102] = jj_gen;
4058 jj_consume_token(-1);
4059 throw new ParseException();
4062 endStatements = SimpleCharStream.getPosition();
4065 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4070 jj_la1[103] = jj_gen;
4073 elseifStatement = ElseIfStatementColon();
4074 elseIfList.add(elseifStatement);
4076 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4078 elseStatement = ElseStatementColon();
4081 jj_la1[104] = jj_gen;
4085 setMarker(fileToParse,
4086 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4090 "Line " + token.beginLine);
4091 } catch (CoreException e) {
4092 PHPeclipsePlugin.log(e);
4095 jj_consume_token(ENDIF);
4096 } catch (ParseException e) {
4097 errorMessage = "'endif' expected";
4099 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4100 errorEnd = SimpleCharStream.getPosition() + 1;
4101 {if (true) throw e;}
4104 jj_consume_token(SEMICOLON);
4105 } catch (ParseException e) {
4106 errorMessage = "';' expected after 'endif' keyword";
4108 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4109 errorEnd = SimpleCharStream.getPosition() + 1;
4110 {if (true) throw e;}
4112 elseIfs = new ElseIf[elseIfList.size()];
4113 elseIfList.toArray(elseIfs);
4114 if (stmts.size() == 1) {
4115 {if (true) return new IfStatement(condition,
4116 (Statement) stmts.get(0),
4120 SimpleCharStream.getPosition());}
4122 statementsArray = new Statement[stmts.size()];
4123 stmts.toArray(statementsArray);
4124 {if (true) return new IfStatement(condition,
4125 new Block(statementsArray,pos,endStatements),
4129 SimpleCharStream.getPosition());}
4165 case INTEGER_LITERAL:
4166 case FLOATING_POINT_LITERAL:
4167 case STRING_LITERAL:
4173 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4206 case INTEGER_LITERAL:
4207 case FLOATING_POINT_LITERAL:
4208 case STRING_LITERAL:
4220 jj_la1[105] = jj_gen;
4221 jj_consume_token(-1);
4222 throw new ParseException();
4226 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4231 jj_la1[106] = jj_gen;
4234 elseifStatement = ElseIfStatement();
4235 elseIfList.add(elseifStatement);
4237 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4239 jj_consume_token(ELSE);
4241 pos = SimpleCharStream.getPosition();
4242 statement = Statement();
4243 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4244 } catch (ParseException e) {
4245 if (errorMessage != null) {
4246 {if (true) throw e;}
4248 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4250 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4251 errorEnd = SimpleCharStream.getPosition() + 1;
4252 {if (true) throw e;}
4256 jj_la1[107] = jj_gen;
4259 elseIfs = new ElseIf[elseIfList.size()];
4260 elseIfList.toArray(elseIfs);
4261 {if (true) return new IfStatement(condition,
4266 SimpleCharStream.getPosition());}
4269 jj_la1[108] = jj_gen;
4270 jj_consume_token(-1);
4271 throw new ParseException();
4273 throw new Error("Missing return statement in function");
4276 static final public ElseIf ElseIfStatementColon() throws ParseException {
4277 final Expression condition;
4278 Statement statement;
4279 final ArrayList list = new ArrayList();
4280 final int pos = SimpleCharStream.getPosition();
4281 jj_consume_token(ELSEIF);
4282 condition = Condition("elseif");
4283 jj_consume_token(COLON);
4286 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4320 case INTEGER_LITERAL:
4321 case FLOATING_POINT_LITERAL:
4322 case STRING_LITERAL:
4331 jj_la1[109] = jj_gen;
4334 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4367 case INTEGER_LITERAL:
4368 case FLOATING_POINT_LITERAL:
4369 case STRING_LITERAL:
4375 statement = Statement();
4376 list.add(statement);
4379 statement = htmlBlock();
4380 list.add(statement);
4383 jj_la1[110] = jj_gen;
4384 jj_consume_token(-1);
4385 throw new ParseException();
4388 final Statement[] stmtsArray = new Statement[list.size()];
4389 list.toArray(stmtsArray);
4390 {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4391 throw new Error("Missing return statement in function");
4394 static final public Else ElseStatementColon() throws ParseException {
4395 Statement statement;
4396 final ArrayList list = new ArrayList();
4397 final int pos = SimpleCharStream.getPosition();
4398 jj_consume_token(ELSE);
4399 jj_consume_token(COLON);
4402 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4436 case INTEGER_LITERAL:
4437 case FLOATING_POINT_LITERAL:
4438 case STRING_LITERAL:
4447 jj_la1[111] = jj_gen;
4450 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4483 case INTEGER_LITERAL:
4484 case FLOATING_POINT_LITERAL:
4485 case STRING_LITERAL:
4491 statement = Statement();
4492 list.add(statement);
4495 statement = htmlBlock();
4496 list.add(statement);
4499 jj_la1[112] = jj_gen;
4500 jj_consume_token(-1);
4501 throw new ParseException();
4504 final Statement[] stmtsArray = new Statement[list.size()];
4505 list.toArray(stmtsArray);
4506 {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4507 throw new Error("Missing return statement in function");
4510 static final public ElseIf ElseIfStatement() throws ParseException {
4511 final Expression condition;
4512 final Statement statement;
4513 final ArrayList list = new ArrayList();
4514 final int pos = SimpleCharStream.getPosition();
4515 jj_consume_token(ELSEIF);
4516 condition = Condition("elseif");
4517 statement = Statement();
4518 list.add(statement);/*todo:do better*/
4519 final Statement[] stmtsArray = new Statement[list.size()];
4520 list.toArray(stmtsArray);
4521 {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4522 throw new Error("Missing return statement in function");
4525 static final public WhileStatement WhileStatement() throws ParseException {
4526 final Expression condition;
4527 final Statement action;
4528 final int pos = SimpleCharStream.getPosition();
4529 jj_consume_token(WHILE);
4530 condition = Condition("while");
4531 action = WhileStatement0(pos,pos + 5);
4532 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4533 throw new Error("Missing return statement in function");
4536 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4537 Statement statement;
4538 final ArrayList stmts = new ArrayList();
4539 final int pos = SimpleCharStream.getPosition();
4540 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4542 jj_consume_token(COLON);
4545 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4578 case INTEGER_LITERAL:
4579 case FLOATING_POINT_LITERAL:
4580 case STRING_LITERAL:
4589 jj_la1[113] = jj_gen;
4592 statement = Statement();
4593 stmts.add(statement);
4596 setMarker(fileToParse,
4597 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4601 "Line " + token.beginLine);
4602 } catch (CoreException e) {
4603 PHPeclipsePlugin.log(e);
4606 jj_consume_token(ENDWHILE);
4607 } catch (ParseException e) {
4608 errorMessage = "'endwhile' expected";
4610 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4611 errorEnd = SimpleCharStream.getPosition() + 1;
4612 {if (true) throw e;}
4615 jj_consume_token(SEMICOLON);
4616 final Statement[] stmtsArray = new Statement[stmts.size()];
4617 stmts.toArray(stmtsArray);
4618 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4619 } catch (ParseException e) {
4620 errorMessage = "';' expected after 'endwhile' keyword";
4622 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4623 errorEnd = SimpleCharStream.getPosition() + 1;
4624 {if (true) throw e;}
4659 case INTEGER_LITERAL:
4660 case FLOATING_POINT_LITERAL:
4661 case STRING_LITERAL:
4667 statement = Statement();
4668 {if (true) return statement;}
4671 jj_la1[114] = jj_gen;
4672 jj_consume_token(-1);
4673 throw new ParseException();
4675 throw new Error("Missing return statement in function");
4678 static final public DoStatement DoStatement() throws ParseException {
4679 final Statement action;
4680 final Expression condition;
4681 final int pos = SimpleCharStream.getPosition();
4682 jj_consume_token(DO);
4683 action = Statement();
4684 jj_consume_token(WHILE);
4685 condition = Condition("while");
4687 jj_consume_token(SEMICOLON);
4688 {if (true) return new DoStatement(condition,action,pos,SimpleCharStream.getPosition());}
4689 } catch (ParseException e) {
4690 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4692 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4693 errorEnd = SimpleCharStream.getPosition() + 1;
4694 {if (true) throw e;}
4696 throw new Error("Missing return statement in function");
4699 static final public ForeachStatement ForeachStatement() throws ParseException {
4700 Statement statement;
4701 Expression expression;
4702 final int pos = SimpleCharStream.getPosition();
4703 ArrayVariableDeclaration variable;
4704 jj_consume_token(FOREACH);
4706 jj_consume_token(LPAREN);
4707 } catch (ParseException e) {
4708 errorMessage = "'(' expected after 'foreach' keyword";
4710 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4711 errorEnd = SimpleCharStream.getPosition() + 1;
4712 {if (true) throw e;}
4715 expression = Expression();
4716 } catch (ParseException e) {
4717 errorMessage = "variable expected";
4719 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4720 errorEnd = SimpleCharStream.getPosition() + 1;
4721 {if (true) throw e;}
4724 jj_consume_token(AS);
4725 } catch (ParseException e) {
4726 errorMessage = "'as' expected";
4728 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4729 errorEnd = SimpleCharStream.getPosition() + 1;
4730 {if (true) throw e;}
4733 variable = ArrayVariable();
4734 } catch (ParseException e) {
4735 errorMessage = "variable expected";
4737 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4738 errorEnd = SimpleCharStream.getPosition() + 1;
4739 {if (true) throw e;}
4742 jj_consume_token(RPAREN);
4743 } catch (ParseException e) {
4744 errorMessage = "')' expected after 'foreach' keyword";
4746 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4747 errorEnd = SimpleCharStream.getPosition() + 1;
4748 {if (true) throw e;}
4751 statement = Statement();
4752 } catch (ParseException e) {
4753 if (errorMessage != null) {if (true) throw e;}
4754 errorMessage = "statement expected";
4756 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4757 errorEnd = SimpleCharStream.getPosition() + 1;
4758 {if (true) throw e;}
4760 {if (true) return new ForeachStatement(expression,
4764 SimpleCharStream.getPosition());}
4765 throw new Error("Missing return statement in function");
4768 static final public ForStatement ForStatement() throws ParseException {
4770 final int pos = SimpleCharStream.getPosition();
4771 Expression[] initializations = null;
4772 Expression condition = null;
4773 Expression[] increments = null;
4775 final ArrayList list = new ArrayList();
4776 final int startBlock, endBlock;
4777 token = jj_consume_token(FOR);
4779 jj_consume_token(LPAREN);
4780 } catch (ParseException e) {
4781 errorMessage = "'(' expected after 'for' keyword";
4783 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4784 errorEnd = SimpleCharStream.getPosition() + 1;
4785 {if (true) throw e;}
4787 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4795 initializations = ForInit();
4798 jj_la1[115] = jj_gen;
4801 jj_consume_token(SEMICOLON);
4802 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4818 case INTEGER_LITERAL:
4819 case FLOATING_POINT_LITERAL:
4820 case STRING_LITERAL:
4824 condition = Expression();
4827 jj_la1[116] = jj_gen;
4830 jj_consume_token(SEMICOLON);
4831 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4839 increments = StatementExpressionList();
4842 jj_la1[117] = jj_gen;
4845 jj_consume_token(RPAREN);
4846 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4879 case INTEGER_LITERAL:
4880 case FLOATING_POINT_LITERAL:
4881 case STRING_LITERAL:
4887 action = Statement();
4888 {if (true) return new ForStatement(initializations,condition,increments,action,pos,SimpleCharStream.getPosition());}
4891 jj_consume_token(COLON);
4892 startBlock = SimpleCharStream.getPosition();
4895 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4928 case INTEGER_LITERAL:
4929 case FLOATING_POINT_LITERAL:
4930 case STRING_LITERAL:
4939 jj_la1[118] = jj_gen;
4942 action = Statement();
4946 setMarker(fileToParse,
4947 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
4949 pos+token.image.length(),
4951 "Line " + token.beginLine);
4952 } catch (CoreException e) {
4953 PHPeclipsePlugin.log(e);
4955 endBlock = SimpleCharStream.getPosition();
4957 jj_consume_token(ENDFOR);
4958 } catch (ParseException e) {
4959 errorMessage = "'endfor' expected";
4961 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4962 errorEnd = SimpleCharStream.getPosition() + 1;
4963 {if (true) throw e;}
4966 jj_consume_token(SEMICOLON);
4967 final Statement[] stmtsArray = new Statement[list.size()];
4968 list.toArray(stmtsArray);
4969 {if (true) return new ForStatement(initializations,condition,increments,new Block(stmtsArray,startBlock,endBlock),pos,SimpleCharStream.getPosition());}
4970 } catch (ParseException e) {
4971 errorMessage = "';' expected after 'endfor' keyword";
4973 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4974 errorEnd = SimpleCharStream.getPosition() + 1;
4975 {if (true) throw e;}
4979 jj_la1[119] = jj_gen;
4980 jj_consume_token(-1);
4981 throw new ParseException();
4983 throw new Error("Missing return statement in function");
4986 static final public Expression[] ForInit() throws ParseException {
4987 final Expression[] exprs;
4988 if (jj_2_11(2147483647)) {
4989 exprs = LocalVariableDeclaration();
4990 {if (true) return exprs;}
4992 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5000 exprs = StatementExpressionList();
5001 {if (true) return exprs;}
5004 jj_la1[120] = jj_gen;
5005 jj_consume_token(-1);
5006 throw new ParseException();
5009 throw new Error("Missing return statement in function");
5012 static final public Expression[] StatementExpressionList() throws ParseException {
5013 final ArrayList list = new ArrayList();
5014 final Expression expr;
5015 expr = StatementExpression();
5019 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5024 jj_la1[121] = jj_gen;
5027 jj_consume_token(COMMA);
5028 StatementExpression();
5031 final Expression[] exprsArray = new Expression[list.size()];
5032 list.toArray(exprsArray);
5033 {if (true) return exprsArray;}
5034 throw new Error("Missing return statement in function");
5037 static final public Continue ContinueStatement() throws ParseException {
5038 Expression expr = null;
5039 final int pos = SimpleCharStream.getPosition();
5040 jj_consume_token(CONTINUE);
5041 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5057 case INTEGER_LITERAL:
5058 case FLOATING_POINT_LITERAL:
5059 case STRING_LITERAL:
5063 expr = Expression();
5066 jj_la1[122] = jj_gen;
5070 jj_consume_token(SEMICOLON);
5071 {if (true) return new Continue(expr,pos,SimpleCharStream.getPosition());}
5072 } catch (ParseException e) {
5073 errorMessage = "';' expected after 'continue' statement";
5075 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5076 errorEnd = SimpleCharStream.getPosition() + 1;
5077 {if (true) throw e;}
5079 throw new Error("Missing return statement in function");
5082 static final public ReturnStatement ReturnStatement() throws ParseException {
5083 Expression expr = null;
5084 final int pos = SimpleCharStream.getPosition();
5085 jj_consume_token(RETURN);
5086 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5102 case INTEGER_LITERAL:
5103 case FLOATING_POINT_LITERAL:
5104 case STRING_LITERAL:
5108 expr = Expression();
5111 jj_la1[123] = jj_gen;
5115 jj_consume_token(SEMICOLON);
5116 {if (true) return new ReturnStatement(expr,pos,SimpleCharStream.getPosition());}
5117 } catch (ParseException e) {
5118 errorMessage = "';' expected after 'return' statement";
5120 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5121 errorEnd = SimpleCharStream.getPosition() + 1;
5122 {if (true) throw e;}
5124 throw new Error("Missing return statement in function");
5127 static final private boolean jj_2_1(int xla) {
5128 jj_la = xla; jj_lastpos = jj_scanpos = token;
5129 boolean retval = !jj_3_1();
5134 static final private boolean jj_2_2(int xla) {
5135 jj_la = xla; jj_lastpos = jj_scanpos = token;
5136 boolean retval = !jj_3_2();
5141 static final private boolean jj_2_3(int xla) {
5142 jj_la = xla; jj_lastpos = jj_scanpos = token;
5143 boolean retval = !jj_3_3();
5148 static final private boolean jj_2_4(int xla) {
5149 jj_la = xla; jj_lastpos = jj_scanpos = token;
5150 boolean retval = !jj_3_4();
5155 static final private boolean jj_2_5(int xla) {
5156 jj_la = xla; jj_lastpos = jj_scanpos = token;
5157 boolean retval = !jj_3_5();
5162 static final private boolean jj_2_6(int xla) {
5163 jj_la = xla; jj_lastpos = jj_scanpos = token;
5164 boolean retval = !jj_3_6();
5169 static final private boolean jj_2_7(int xla) {
5170 jj_la = xla; jj_lastpos = jj_scanpos = token;
5171 boolean retval = !jj_3_7();
5176 static final private boolean jj_2_8(int xla) {
5177 jj_la = xla; jj_lastpos = jj_scanpos = token;
5178 boolean retval = !jj_3_8();
5183 static final private boolean jj_2_9(int xla) {
5184 jj_la = xla; jj_lastpos = jj_scanpos = token;
5185 boolean retval = !jj_3_9();
5190 static final private boolean jj_2_10(int xla) {
5191 jj_la = xla; jj_lastpos = jj_scanpos = token;
5192 boolean retval = !jj_3_10();
5197 static final private boolean jj_2_11(int xla) {
5198 jj_la = xla; jj_lastpos = jj_scanpos = token;
5199 boolean retval = !jj_3_11();
5204 static final private boolean jj_3R_97() {
5205 if (jj_3R_103()) return true;
5206 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5210 static final private boolean jj_3R_86() {
5219 if (jj_3R_100()) return true;
5220 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5221 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5222 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5223 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5227 static final private boolean jj_3R_203() {
5228 if (jj_scan_token(MINUS_MINUS)) return true;
5229 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5233 static final private boolean jj_3R_202() {
5234 if (jj_scan_token(PLUS_PLUS)) return true;
5235 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5239 static final private boolean jj_3R_195() {
5244 if (jj_3R_203()) return true;
5245 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5246 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5250 static final private boolean jj_3R_178() {
5251 if (jj_3R_176()) return true;
5252 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5255 if (jj_3R_195()) jj_scanpos = xsp;
5256 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5260 static final private boolean jj_3R_57() {
5261 if (jj_3R_86()) return true;
5262 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5266 static final private boolean jj_3R_46() {
5271 if (jj_3R_57()) return true;
5272 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5273 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5277 static final private boolean jj_3R_56() {
5278 if (jj_scan_token(BANG)) return true;
5279 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5280 if (jj_3R_46()) return true;
5281 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5285 static final private boolean jj_3R_44() {
5286 if (jj_scan_token(ARRAY)) return true;
5287 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5291 static final private boolean jj_3R_194() {
5292 if (jj_scan_token(ARRAY)) return true;
5293 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5297 static final private boolean jj_3R_193() {
5298 if (jj_3R_53()) return true;
5299 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5303 static final private boolean jj_3R_84() {
5304 if (jj_scan_token(OBJECT)) return true;
5305 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5309 static final private boolean jj_3R_177() {
5310 if (jj_scan_token(LPAREN)) return true;
5311 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5316 if (jj_3R_194()) return true;
5317 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5318 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5319 if (jj_scan_token(RPAREN)) return true;
5320 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5321 if (jj_3R_150()) return true;
5322 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5326 static final private boolean jj_3R_83() {
5327 if (jj_scan_token(INTEGER)) return true;
5328 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5332 static final private boolean jj_3R_82() {
5333 if (jj_scan_token(INT)) return true;
5334 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5338 static final private boolean jj_3R_43() {
5339 if (jj_3R_53()) return true;
5340 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5344 static final private boolean jj_3R_81() {
5345 if (jj_scan_token(FLOAT)) return true;
5346 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5350 static final private boolean jj_3R_80() {
5351 if (jj_scan_token(DOUBLE)) return true;
5352 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5356 static final private boolean jj_3R_79() {
5357 if (jj_scan_token(REAL)) return true;
5358 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5362 static final private boolean jj_3R_78() {
5363 if (jj_scan_token(BOOLEAN)) return true;
5364 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5368 static final private boolean jj_3R_77() {
5369 if (jj_scan_token(BOOL)) return true;
5370 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5374 static final private boolean jj_3_4() {
5375 if (jj_scan_token(LPAREN)) return true;
5376 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5381 if (jj_3R_44()) return true;
5382 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5383 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5384 if (jj_scan_token(RPAREN)) return true;
5385 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5389 static final private boolean jj_3R_76() {
5390 if (jj_scan_token(STRING)) return true;
5391 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5395 static final private boolean jj_3R_53() {
5414 if (jj_3R_84()) return true;
5415 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5416 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5417 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5418 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5419 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5420 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5421 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5422 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5423 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5427 static final private boolean jj_3R_87() {
5428 if (jj_scan_token(ASSIGN)) return true;
5429 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5430 if (jj_3R_46()) return true;
5431 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5435 static final private boolean jj_3R_175() {
5436 if (jj_scan_token(LPAREN)) return true;
5437 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5438 if (jj_3R_46()) return true;
5439 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5440 if (jj_scan_token(RPAREN)) return true;
5441 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5445 static final private boolean jj_3R_174() {
5446 if (jj_3R_179()) return true;
5447 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5451 static final private boolean jj_3R_173() {
5452 if (jj_3R_178()) return true;
5453 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5457 static final private boolean jj_3R_172() {
5458 if (jj_3R_177()) return true;
5459 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5463 static final private boolean jj_3R_169() {
5472 if (jj_3R_175()) return true;
5473 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5474 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5475 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5476 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5480 static final private boolean jj_3R_171() {
5481 if (jj_scan_token(MINUS_MINUS)) return true;
5482 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5486 static final private boolean jj_3R_170() {
5487 if (jj_scan_token(PLUS_PLUS)) return true;
5488 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5492 static final private boolean jj_3R_168() {
5497 if (jj_3R_171()) return true;
5498 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5499 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5500 if (jj_3R_176()) return true;
5501 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5505 static final private boolean jj_3_10() {
5506 if (jj_3R_42()) return true;
5507 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5511 static final private boolean jj_3R_163() {
5512 if (jj_3R_169()) return true;
5513 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5517 static final private boolean jj_3R_162() {
5518 if (jj_3R_168()) return true;
5519 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5523 static final private boolean jj_3R_167() {
5524 if (jj_scan_token(MINUS)) return true;
5525 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5529 static final private boolean jj_3R_166() {
5530 if (jj_scan_token(PLUS)) return true;
5531 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5535 static final private boolean jj_3R_58() {
5536 if (jj_3R_51()) return true;
5537 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5540 if (jj_3R_87()) jj_scanpos = xsp;
5541 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5545 static final private boolean jj_3R_159() {
5552 if (jj_3R_163()) return true;
5553 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5554 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5555 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5559 static final private boolean jj_3R_161() {
5564 if (jj_3R_167()) return true;
5565 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5566 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5567 if (jj_3R_150()) return true;
5568 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5572 static final private boolean jj_3R_59() {
5573 if (jj_scan_token(COMMA)) return true;
5574 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5575 if (jj_3R_58()) return true;
5576 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5580 static final private boolean jj_3R_165() {
5581 if (jj_3R_159()) return true;
5582 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5586 static final private boolean jj_3R_48() {
5587 if (jj_3R_58()) return true;
5588 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5592 if (jj_3R_59()) { jj_scanpos = xsp; break; }
5593 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5598 static final private boolean jj_3R_160() {
5603 if (jj_3R_165()) return true;
5604 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5605 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5609 static final private boolean jj_3R_164() {
5610 if (jj_scan_token(AT)) return true;
5611 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5612 if (jj_3R_160()) return true;
5613 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5617 static final private boolean jj_3R_155() {
5618 if (jj_3R_160()) return true;
5619 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5623 static final private boolean jj_3R_150() {
5628 if (jj_3R_155()) return true;
5629 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5630 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5634 static final private boolean jj_3R_154() {
5635 if (jj_scan_token(BIT_AND)) return true;
5636 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5637 if (jj_3R_159()) return true;
5638 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5642 static final private boolean jj_3R_158() {
5643 if (jj_scan_token(REMAINDER)) return true;
5644 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5648 static final private boolean jj_3R_157() {
5649 if (jj_scan_token(SLASH)) return true;
5650 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5654 static final private boolean jj_3R_156() {
5655 if (jj_scan_token(STAR)) return true;
5656 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5660 static final private boolean jj_3R_151() {
5667 if (jj_3R_158()) return true;
5668 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5669 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5670 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5671 if (jj_3R_150()) return true;
5672 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5676 static final private boolean jj_3R_145() {
5677 if (jj_3R_150()) return true;
5678 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5682 if (jj_3R_151()) { jj_scanpos = xsp; break; }
5683 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5688 static final private boolean jj_3R_153() {
5689 if (jj_scan_token(MINUS)) return true;
5690 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5694 static final private boolean jj_3_9() {
5695 if (jj_3R_47()) return true;
5696 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5700 static final private boolean jj_3R_152() {
5701 if (jj_scan_token(PLUS)) return true;
5702 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5706 static final private boolean jj_3R_146() {
5711 if (jj_3R_153()) return true;
5712 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5713 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5714 if (jj_3R_145()) return true;
5715 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5719 static final private boolean jj_3R_139() {
5720 if (jj_3R_145()) return true;
5721 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5725 if (jj_3R_146()) { jj_scanpos = xsp; break; }
5726 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5731 static final private boolean jj_3R_205() {
5732 if (jj_scan_token(COMMA)) return true;
5733 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5737 static final private boolean jj_3_2() {
5738 if (jj_scan_token(COMMA)) return true;
5739 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5740 if (jj_3R_41()) return true;
5741 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5745 static final private boolean jj_3_8() {
5746 if (jj_3R_46()) return true;
5747 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5748 if (jj_scan_token(SEMICOLON)) return true;
5749 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5753 static final private boolean jj_3R_204() {
5754 if (jj_3R_41()) return true;
5755 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5759 if (jj_3_2()) { jj_scanpos = xsp; break; }
5760 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5765 static final private boolean jj_3R_149() {
5766 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
5767 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5771 static final private boolean jj_3R_148() {
5772 if (jj_scan_token(RSIGNEDSHIFT)) return true;
5773 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5777 static final private boolean jj_3R_147() {
5778 if (jj_scan_token(LSHIFT)) return true;
5779 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5783 static final private boolean jj_3R_140() {
5790 if (jj_3R_149()) return true;
5791 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5792 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5793 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5794 if (jj_3R_139()) return true;
5795 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5799 static final private boolean jj_3R_132() {
5800 if (jj_3R_139()) return true;
5801 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5805 if (jj_3R_140()) { jj_scanpos = xsp; break; }
5806 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5811 static final private boolean jj_3R_201() {
5812 if (jj_scan_token(LPAREN)) return true;
5813 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5816 if (jj_3R_204()) jj_scanpos = xsp;
5817 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5819 if (jj_3R_205()) jj_scanpos = xsp;
5820 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5821 if (jj_scan_token(RPAREN)) return true;
5822 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5826 static final private boolean jj_3_11() {
5827 if (jj_3R_48()) return true;
5828 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5832 static final private boolean jj_3R_47() {
5833 if (jj_scan_token(IDENTIFIER)) return true;
5834 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5835 if (jj_scan_token(COLON)) return true;
5836 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5840 static final private boolean jj_3R_144() {
5841 if (jj_scan_token(GE)) return true;
5842 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5846 static final private boolean jj_3R_143() {
5847 if (jj_scan_token(LE)) return true;
5848 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5852 static final private boolean jj_3R_142() {
5853 if (jj_scan_token(GT)) return true;
5854 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5858 static final private boolean jj_3R_141() {
5859 if (jj_scan_token(LT)) return true;
5860 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5864 static final private boolean jj_3R_206() {
5865 if (jj_scan_token(ARRAYASSIGN)) return true;
5866 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5867 if (jj_3R_46()) return true;
5868 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5872 static final private boolean jj_3R_133() {
5881 if (jj_3R_144()) return true;
5882 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5883 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5884 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5885 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5886 if (jj_3R_132()) return true;
5887 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5891 static final private boolean jj_3R_106() {
5892 if (jj_scan_token(COMMA)) return true;
5893 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5894 if (jj_3R_46()) return true;
5895 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5899 static final private boolean jj_3R_41() {
5900 if (jj_3R_46()) return true;
5901 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5904 if (jj_3R_206()) jj_scanpos = xsp;
5905 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5909 static final private boolean jj_3R_130() {
5910 if (jj_3R_132()) return true;
5911 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5915 if (jj_3R_133()) { jj_scanpos = xsp; break; }
5916 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5921 static final private boolean jj_3R_102() {
5922 if (jj_3R_46()) return true;
5923 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5927 if (jj_3R_106()) { jj_scanpos = xsp; break; }
5928 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5933 static final private boolean jj_3R_96() {
5934 if (jj_3R_102()) return true;
5935 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5939 static final private boolean jj_3R_138() {
5940 if (jj_scan_token(TRIPLEEQUAL)) return true;
5941 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5945 static final private boolean jj_3R_93() {
5946 if (jj_3R_53()) return true;
5947 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5951 static final private boolean jj_3R_137() {
5952 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5953 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5957 static final private boolean jj_3R_136() {
5958 if (jj_scan_token(NOT_EQUAL)) return true;
5959 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5963 static final private boolean jj_3R_135() {
5964 if (jj_scan_token(DIF)) return true;
5965 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5969 static final private boolean jj_3R_85() {
5970 if (jj_scan_token(LPAREN)) return true;
5971 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5974 if (jj_3R_96()) jj_scanpos = xsp;
5975 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5976 if (jj_scan_token(RPAREN)) return true;
5977 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5981 static final private boolean jj_3R_134() {
5982 if (jj_scan_token(EQUAL_EQUAL)) return true;
5983 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5987 static final private boolean jj_3R_131() {
5998 if (jj_3R_138()) return true;
5999 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6000 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6001 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6002 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6003 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6004 if (jj_3R_130()) return true;
6005 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6009 static final private boolean jj_3R_128() {
6010 if (jj_3R_130()) return true;
6011 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6015 if (jj_3R_131()) { jj_scanpos = xsp; break; }
6016 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6021 static final private boolean jj_3R_187() {
6022 if (jj_scan_token(NULL)) return true;
6023 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6027 static final private boolean jj_3R_109() {
6028 if (jj_scan_token(LBRACE)) return true;
6029 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6030 if (jj_3R_46()) return true;
6031 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6032 if (jj_scan_token(RBRACE)) return true;
6033 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6037 static final private boolean jj_3R_186() {
6038 if (jj_scan_token(FALSE)) return true;
6039 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6043 static final private boolean jj_3R_185() {
6044 if (jj_scan_token(TRUE)) return true;
6045 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6049 static final private boolean jj_3R_91() {
6050 if (jj_scan_token(DOLLAR_ID)) return true;
6051 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6055 static final private boolean jj_3R_184() {
6056 if (jj_scan_token(STRING_LITERAL)) return true;
6057 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6061 static final private boolean jj_3R_183() {
6062 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
6063 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6067 static final private boolean jj_3R_129() {
6068 if (jj_scan_token(BIT_AND)) return true;
6069 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6070 if (jj_3R_128()) return true;
6071 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6075 static final private boolean jj_3R_182() {
6076 if (jj_scan_token(INTEGER_LITERAL)) return true;
6077 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6081 static final private boolean jj_3R_179() {
6094 if (jj_3R_187()) 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;
6099 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6100 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6104 static final private boolean jj_3R_90() {
6105 if (jj_scan_token(DOLLAR)) return true;
6106 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6107 if (jj_3R_60()) return true;
6108 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6112 static final private boolean jj_3R_126() {
6113 if (jj_3R_128()) return true;
6114 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6118 if (jj_3R_129()) { jj_scanpos = xsp; break; }
6119 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6124 static final private boolean jj_3R_92() {
6125 if (jj_3R_46()) return true;
6126 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6130 static final private boolean jj_3R_61() {
6135 if (jj_3R_93()) return true;
6136 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6137 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6141 static final private boolean jj_3R_127() {
6142 if (jj_scan_token(XOR)) return true;
6143 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6144 if (jj_3R_126()) return true;
6145 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6149 static final private boolean jj_3R_89() {
6150 if (jj_scan_token(IDENTIFIER)) return true;
6151 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6154 if (jj_3R_109()) jj_scanpos = xsp;
6155 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6159 static final private boolean jj_3R_124() {
6160 if (jj_3R_126()) return true;
6161 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6165 if (jj_3R_127()) { jj_scanpos = xsp; break; }
6166 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6171 static final private boolean jj_3R_88() {
6172 if (jj_scan_token(LBRACE)) return true;
6173 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6174 if (jj_3R_46()) return true;
6175 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6176 if (jj_scan_token(RBRACE)) return true;
6177 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6181 static final private boolean jj_3R_60() {
6190 if (jj_3R_91()) return true;
6191 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6192 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6193 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6194 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6198 static final private boolean jj_3R_50() {
6199 if (jj_scan_token(LBRACKET)) return true;
6200 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6203 if (jj_3R_61()) jj_scanpos = xsp;
6204 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6205 if (jj_scan_token(RBRACKET)) return true;
6206 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6210 static final private boolean jj_3R_125() {
6211 if (jj_scan_token(BIT_OR)) return true;
6212 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6213 if (jj_3R_124()) return true;
6214 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6218 static final private boolean jj_3R_101() {
6219 if (jj_scan_token(LBRACE)) return true;
6220 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6221 if (jj_3R_46()) return true;
6222 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6223 if (jj_scan_token(RBRACE)) return true;
6224 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6228 static final private boolean jj_3R_120() {
6229 if (jj_3R_124()) return true;
6230 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6234 if (jj_3R_125()) { jj_scanpos = xsp; break; }
6235 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6240 static final private boolean jj_3R_40() {
6245 if (jj_3R_50()) return true;
6246 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6247 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6251 static final private boolean jj_3R_49() {
6252 if (jj_scan_token(CLASSACCESS)) return true;
6253 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6254 if (jj_3R_60()) return true;
6255 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6259 static final private boolean jj_3R_95() {
6260 if (jj_scan_token(DOLLAR)) return true;
6261 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6262 if (jj_3R_60()) return true;
6263 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6267 static final private boolean jj_3R_121() {
6268 if (jj_scan_token(DOT)) return true;
6269 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6270 if (jj_3R_120()) return true;
6271 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6275 static final private boolean jj_3R_116() {
6276 if (jj_3R_120()) return true;
6277 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6281 if (jj_3R_121()) { jj_scanpos = xsp; break; }
6282 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6287 static final private boolean jj_3R_55() {
6288 if (jj_3R_40()) return true;
6289 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6293 static final private boolean jj_3R_45() {
6298 if (jj_3R_55()) return true;
6299 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6300 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6304 static final private boolean jj_3R_54() {
6305 if (jj_3R_85()) return true;
6306 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6310 static final private boolean jj_3R_94() {
6311 if (jj_scan_token(DOLLAR_ID)) return true;
6312 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6315 if (jj_3R_101()) jj_scanpos = xsp;
6316 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6320 static final private boolean jj_3R_62() {
6325 if (jj_3R_95()) return true;
6326 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6327 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6331 static final private boolean jj_3R_123() {
6332 if (jj_scan_token(_ANDL)) return true;
6333 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6337 static final private boolean jj_3R_122() {
6338 if (jj_scan_token(AND_AND)) return true;
6339 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6343 static final private boolean jj_3R_117() {
6348 if (jj_3R_123()) return true;
6349 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6350 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6351 if (jj_3R_116()) return true;
6352 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6356 static final private boolean jj_3R_108() {
6357 if (jj_scan_token(HOOK)) return true;
6358 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6359 if (jj_3R_46()) return true;
6360 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6361 if (jj_scan_token(COLON)) return true;
6362 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6363 if (jj_3R_105()) return true;
6364 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6368 static final private boolean jj_3R_197() {
6369 if (jj_3R_51()) return true;
6370 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6374 static final private boolean jj_3R_113() {
6375 if (jj_3R_116()) return true;
6376 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6380 if (jj_3R_117()) { jj_scanpos = xsp; break; }
6381 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6386 static final private boolean jj_3R_196() {
6387 if (jj_scan_token(IDENTIFIER)) return true;
6388 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6392 static final private boolean jj_3R_188() {
6397 if (jj_3R_197()) return true;
6398 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6399 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6403 static final private boolean jj_3R_112() {
6404 if (jj_scan_token(ASSIGN)) return true;
6405 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6406 if (jj_3R_46()) return true;
6407 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6411 static final private boolean jj_3R_119() {
6412 if (jj_scan_token(_ORL)) return true;
6413 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6417 static final private boolean jj_3R_118() {
6418 if (jj_scan_token(OR_OR)) return true;
6419 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6423 static final private boolean jj_3R_114() {
6428 if (jj_3R_119()) return true;
6429 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6430 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6431 if (jj_3R_113()) return true;
6432 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6436 static final private boolean jj_3R_115() {
6437 if (jj_3R_51()) return true;
6438 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6442 static final private boolean jj_3R_107() {
6443 if (jj_3R_113()) return true;
6444 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6448 if (jj_3R_114()) { jj_scanpos = xsp; break; }
6449 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6454 static final private boolean jj_3_1() {
6455 if (jj_3R_40()) return true;
6456 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6460 static final private boolean jj_3R_111() {
6461 if (jj_scan_token(COMMA)) return true;
6462 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6465 if (jj_3R_115()) jj_scanpos = xsp;
6466 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6470 static final private boolean jj_3R_51() {
6471 if (jj_3R_62()) return true;
6472 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6476 if (jj_3_1()) { jj_scanpos = xsp; break; }
6477 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6482 static final private boolean jj_3R_110() {
6483 if (jj_3R_51()) return true;
6484 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6488 static final private boolean jj_3R_105() {
6489 if (jj_3R_107()) return true;
6490 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6493 if (jj_3R_108()) jj_scanpos = xsp;
6494 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6498 static final private boolean jj_3R_200() {
6499 if (jj_3R_51()) return true;
6500 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6504 static final private boolean jj_3R_199() {
6505 if (jj_scan_token(NEW)) return true;
6506 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6507 if (jj_3R_188()) return true;
6508 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6512 static final private boolean jj_3R_198() {
6513 if (jj_scan_token(IDENTIFIER)) return true;
6514 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6518 static final private boolean jj_3R_190() {
6525 if (jj_3R_200()) return true;
6526 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6527 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6528 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6532 static final private boolean jj_3R_75() {
6533 if (jj_scan_token(TILDEEQUAL)) return true;
6534 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6538 static final private boolean jj_3R_74() {
6539 if (jj_scan_token(DOTASSIGN)) return true;
6540 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6544 static final private boolean jj_3R_104() {
6545 if (jj_scan_token(LIST)) return true;
6546 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6547 if (jj_scan_token(LPAREN)) return true;
6548 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6551 if (jj_3R_110()) jj_scanpos = xsp;
6552 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6555 if (jj_3R_111()) { jj_scanpos = xsp; break; }
6556 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6558 if (jj_scan_token(RPAREN)) return true;
6559 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6561 if (jj_3R_112()) jj_scanpos = xsp;
6562 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6566 static final private boolean jj_3R_73() {
6567 if (jj_scan_token(ORASSIGN)) return true;
6568 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6572 static final private boolean jj_3R_72() {
6573 if (jj_scan_token(XORASSIGN)) return true;
6574 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6578 static final private boolean jj_3R_71() {
6579 if (jj_scan_token(ANDASSIGN)) return true;
6580 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6584 static final private boolean jj_3R_70() {
6585 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6586 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6590 static final private boolean jj_3R_69() {
6591 if (jj_scan_token(LSHIFTASSIGN)) return true;
6592 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6596 static final private boolean jj_3R_68() {
6597 if (jj_scan_token(MINUSASSIGN)) return true;
6598 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6602 static final private boolean jj_3R_67() {
6603 if (jj_scan_token(PLUSASSIGN)) return true;
6604 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6608 static final private boolean jj_3R_66() {
6609 if (jj_scan_token(REMASSIGN)) return true;
6610 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6614 static final private boolean jj_3R_65() {
6615 if (jj_scan_token(SLASHASSIGN)) return true;
6616 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6620 static final private boolean jj_3R_192() {
6621 if (jj_scan_token(ARRAY)) return true;
6622 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6623 if (jj_3R_201()) return true;
6624 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6628 static final private boolean jj_3R_64() {
6629 if (jj_scan_token(STARASSIGN)) return true;
6630 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6634 static final private boolean jj_3R_52() {
6661 if (jj_3R_75()) return true;
6662 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6663 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6664 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6665 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6666 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6667 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6668 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6669 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6670 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6671 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6672 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6673 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6674 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6678 static final private boolean jj_3R_63() {
6679 if (jj_scan_token(ASSIGN)) return true;
6680 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6684 static final private boolean jj_3R_103() {
6685 if (jj_scan_token(PRINT)) return true;
6686 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6687 if (jj_3R_46()) return true;
6688 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6692 static final private boolean jj_3_6() {
6693 if (jj_3R_45()) return true;
6694 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6698 static final private boolean jj_3R_181() {
6699 if (jj_3R_192()) return true;
6700 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6704 static final private boolean jj_3_5() {
6705 if (jj_3R_45()) return true;
6706 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6710 static final private boolean jj_3R_191() {
6711 if (jj_3R_45()) return true;
6712 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6716 static final private boolean jj_3R_180() {
6717 if (jj_3R_190()) return true;
6718 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6722 if (jj_3R_191()) { jj_scanpos = xsp; break; }
6723 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6728 static final private boolean jj_3R_189() {
6729 if (jj_3R_45()) return true;
6730 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6734 static final private boolean jj_3R_42() {
6735 if (jj_3R_51()) return true;
6736 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6737 if (jj_3R_52()) return true;
6738 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6739 if (jj_3R_46()) return true;
6740 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6744 static final private boolean jj_3_3() {
6745 if (jj_3R_42()) return true;
6746 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6750 static final private boolean jj_3R_176() {
6757 if (jj_3R_181()) return true;
6758 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6759 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6760 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6764 static final private boolean jj_3_7() {
6765 if (jj_scan_token(IDENTIFIER)) return true;
6766 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6767 if (jj_scan_token(STATICCLASSACCESS)) return true;
6768 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6769 if (jj_3R_188()) return true;
6770 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6774 if (jj_3R_189()) { jj_scanpos = xsp; break; }
6775 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6780 static final private boolean jj_3R_100() {
6781 if (jj_3R_105()) return true;
6782 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6786 static final private boolean jj_3R_99() {
6787 if (jj_3R_42()) return true;
6788 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6792 static final private boolean jj_3R_98() {
6793 if (jj_3R_104()) return true;
6794 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6798 static private boolean jj_initialized_once = false;
6799 static public PHPParserTokenManager token_source;
6800 static SimpleCharStream jj_input_stream;
6801 static public Token token, jj_nt;
6802 static private int jj_ntk;
6803 static private Token jj_scanpos, jj_lastpos;
6804 static private int jj_la;
6805 static public boolean lookingAhead = false;
6806 static private boolean jj_semLA;
6807 static private int jj_gen;
6808 static final private int[] jj_la1 = new int[124];
6809 static private int[] jj_la1_0;
6810 static private int[] jj_la1_1;
6811 static private int[] jj_la1_2;
6812 static private int[] jj_la1_3;
6813 static private int[] jj_la1_4;
6821 private static void jj_la1_0() {
6822 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,0x68000000,0x60000000,0x8000000,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,0x8000000,0x0,0x0,0x68000000,0x68000000,0x0,0x0,0x68000000,0x0,0x0,0x89000000,0x40000000,0x8000000,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,};
6824 private static void jj_la1_1() {
6825 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,0x30c0000,0x0,0x30c0000,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,0x40000,0x0,0x80,0x30c0000,0x30c0000,0x80,0x3080000,0x30c0000,0x0,0x0,0x8455507f,0x0,0x30c0000,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,};
6827 private static void jj_la1_2() {
6828 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,0x13c1c00,0x0,0x13c0c00,0x0,0x4000,0x80010000,0x80010000,0x20000,0x20000,0x0,0x2000000,0x4000000,0x1000000,0x0,0x0,0x0,0x0,0x70000000,0x70000000,0x300000,0x300000,0x8c00000,0x8c00000,0x13c0c00,0x3c0c00,0x300000,0x3c0800,0xc0000,0x800,0x3fe,0xc0000,0xc0000,0x800,0x800,0x800,0x800,0x0,0x13c1ffe,0x13c1ffe,0x0,0x0,0x13c1c00,0x0,0x400,0xc0c00,0x0,0x13c0c00,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,};
6830 private static void jj_la1_3() {
6831 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,0x88a2,0x0,0x88a2,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,0x800,0x800,0x88000,0x88a2,0x88a2,0x80000,0xa2,0x88a2,0x400000,0x0,0x220800,0x0,0x88a2,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,};
6833 private static void jj_la1_4() {
6834 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,0x4000,0x0,0x4000,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,0x4000,0x4000,0x0,0x4000,0x4000,0x0,0x0,0x4000,0x0,0x0,0x4000,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,};
6836 static final private JJCalls[] jj_2_rtns = new JJCalls[11];
6837 static private boolean jj_rescan = false;
6838 static private int jj_gc = 0;
6840 public PHPParser(java.io.InputStream stream) {
6841 if (jj_initialized_once) {
6842 System.out.println("ERROR: Second call to constructor of static parser. You must");
6843 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6844 System.out.println(" during parser generation.");
6847 jj_initialized_once = true;
6848 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6849 token_source = new PHPParserTokenManager(jj_input_stream);
6850 token = new Token();
6853 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6854 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6857 static public void ReInit(java.io.InputStream stream) {
6858 jj_input_stream.ReInit(stream, 1, 1);
6859 token_source.ReInit(jj_input_stream);
6860 token = new Token();
6863 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6864 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6867 public PHPParser(java.io.Reader stream) {
6868 if (jj_initialized_once) {
6869 System.out.println("ERROR: Second call to constructor of static parser. You must");
6870 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6871 System.out.println(" during parser generation.");
6874 jj_initialized_once = true;
6875 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6876 token_source = new PHPParserTokenManager(jj_input_stream);
6877 token = new Token();
6880 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6881 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6884 static public void ReInit(java.io.Reader stream) {
6885 jj_input_stream.ReInit(stream, 1, 1);
6886 token_source.ReInit(jj_input_stream);
6887 token = new Token();
6890 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6891 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6894 public PHPParser(PHPParserTokenManager tm) {
6895 if (jj_initialized_once) {
6896 System.out.println("ERROR: Second call to constructor of static parser. You must");
6897 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6898 System.out.println(" during parser generation.");
6901 jj_initialized_once = true;
6903 token = new Token();
6906 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6907 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6910 public void ReInit(PHPParserTokenManager tm) {
6912 token = new Token();
6915 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6916 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6919 static final private Token jj_consume_token(int kind) throws ParseException {
6921 if ((oldToken = token).next != null) token = token.next;
6922 else token = token.next = token_source.getNextToken();
6924 if (token.kind == kind) {
6926 if (++jj_gc > 100) {
6928 for (int i = 0; i < jj_2_rtns.length; i++) {
6929 JJCalls c = jj_2_rtns[i];
6931 if (c.gen < jj_gen) c.first = null;
6940 throw generateParseException();
6943 static final private boolean jj_scan_token(int kind) {
6944 if (jj_scanpos == jj_lastpos) {
6946 if (jj_scanpos.next == null) {
6947 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
6949 jj_lastpos = jj_scanpos = jj_scanpos.next;
6952 jj_scanpos = jj_scanpos.next;
6955 int i = 0; Token tok = token;
6956 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
6957 if (tok != null) jj_add_error_token(kind, i);
6959 return (jj_scanpos.kind != kind);
6962 static final public Token getNextToken() {
6963 if (token.next != null) token = token.next;
6964 else token = token.next = token_source.getNextToken();
6970 static final public Token getToken(int index) {
6971 Token t = lookingAhead ? jj_scanpos : token;
6972 for (int i = 0; i < index; i++) {
6973 if (t.next != null) t = t.next;
6974 else t = t.next = token_source.getNextToken();
6979 static final private int jj_ntk() {
6980 if ((jj_nt=token.next) == null)
6981 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
6983 return (jj_ntk = jj_nt.kind);
6986 static private java.util.Vector jj_expentries = new java.util.Vector();
6987 static private int[] jj_expentry;
6988 static private int jj_kind = -1;
6989 static private int[] jj_lasttokens = new int[100];
6990 static private int jj_endpos;
6992 static private void jj_add_error_token(int kind, int pos) {
6993 if (pos >= 100) return;
6994 if (pos == jj_endpos + 1) {
6995 jj_lasttokens[jj_endpos++] = kind;
6996 } else if (jj_endpos != 0) {
6997 jj_expentry = new int[jj_endpos];
6998 for (int i = 0; i < jj_endpos; i++) {
6999 jj_expentry[i] = jj_lasttokens[i];
7001 boolean exists = false;
7002 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
7003 int[] oldentry = (int[])(enum.nextElement());
7004 if (oldentry.length == jj_expentry.length) {
7006 for (int i = 0; i < jj_expentry.length; i++) {
7007 if (oldentry[i] != jj_expentry[i]) {
7015 if (!exists) jj_expentries.addElement(jj_expentry);
7016 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
7020 static public ParseException generateParseException() {
7021 jj_expentries.removeAllElements();
7022 boolean[] la1tokens = new boolean[143];
7023 for (int i = 0; i < 143; i++) {
7024 la1tokens[i] = false;
7027 la1tokens[jj_kind] = true;
7030 for (int i = 0; i < 124; i++) {
7031 if (jj_la1[i] == jj_gen) {
7032 for (int j = 0; j < 32; j++) {
7033 if ((jj_la1_0[i] & (1<<j)) != 0) {
7034 la1tokens[j] = true;
7036 if ((jj_la1_1[i] & (1<<j)) != 0) {
7037 la1tokens[32+j] = true;
7039 if ((jj_la1_2[i] & (1<<j)) != 0) {
7040 la1tokens[64+j] = true;
7042 if ((jj_la1_3[i] & (1<<j)) != 0) {
7043 la1tokens[96+j] = true;
7045 if ((jj_la1_4[i] & (1<<j)) != 0) {
7046 la1tokens[128+j] = true;
7051 for (int i = 0; i < 143; i++) {
7053 jj_expentry = new int[1];
7055 jj_expentries.addElement(jj_expentry);
7060 jj_add_error_token(0, 0);
7061 int[][] exptokseq = new int[jj_expentries.size()][];
7062 for (int i = 0; i < jj_expentries.size(); i++) {
7063 exptokseq[i] = (int[])jj_expentries.elementAt(i);
7065 return new ParseException(token, exptokseq, tokenImage);
7068 static final public void enable_tracing() {
7071 static final public void disable_tracing() {
7074 static final private void jj_rescan_token() {
7076 for (int i = 0; i < 11; i++) {
7077 JJCalls p = jj_2_rtns[i];
7079 if (p.gen > jj_gen) {
7080 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7082 case 0: jj_3_1(); break;
7083 case 1: jj_3_2(); break;
7084 case 2: jj_3_3(); break;
7085 case 3: jj_3_4(); break;
7086 case 4: jj_3_5(); break;
7087 case 5: jj_3_6(); break;
7088 case 6: jj_3_7(); break;
7089 case 7: jj_3_8(); break;
7090 case 8: jj_3_9(); break;
7091 case 9: jj_3_10(); break;
7092 case 10: jj_3_11(); break;
7096 } while (p != null);
7101 static final private void jj_save(int index, int xla) {
7102 JJCalls p = jj_2_rtns[index];
7103 while (p.gen > jj_gen) {
7104 if (p.next == null) { p = p.next = new JJCalls(); break; }
7107 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7110 static final class JJCalls {