1 /* Generated By:JavaCC: Do not edit this line. PHPParser.java */
4 import org.eclipse.core.resources.IFile;
5 import org.eclipse.core.resources.IMarker;
6 import org.eclipse.core.runtime.CoreException;
7 import org.eclipse.ui.texteditor.MarkerUtilities;
8 import org.eclipse.jface.preference.IPreferenceStore;
10 import java.util.Hashtable;
11 import java.util.ArrayList;
12 import java.io.StringReader;
14 import java.text.MessageFormat;
16 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
17 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
18 import net.sourceforge.phpdt.internal.compiler.ast.*;
19 import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
20 import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
21 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
25 * This php parser is inspired by the Java 1.2 grammar example
26 * given with JavaCC. You can get JavaCC at http://www.webgain.com
27 * You can test the parser with the PHPParserTestCase2.java
28 * @author Matthieu Casanova
29 * @version $Reference: 1.0$
31 public final class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
33 /** The file that is parsed. */
34 private static IFile fileToParse;
36 /** The current segment. */
37 private static OutlineableWithChildren currentSegment;
39 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
40 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
41 static PHPOutlineInfo outlineInfo;
43 /** The error level of the current ParseException. */
44 private static int errorLevel = ERROR;
45 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
46 private static String errorMessage;
48 private static int errorStart = -1;
49 private static int errorEnd = -1;
50 private static PHPDocument phpDocument;
52 private static final char[] SYNTAX_ERROR_CHAR = {'s','y','n','t','a','x',' ','e','r','r','o','r'};
54 * The point where html starts.
55 * It will be used by the token manager to create HTMLCode objects
57 public static int htmlStart;
60 private final static int AstStackIncrement = 100;
61 /** The stack of node. */
62 private static AstNode[] nodes;
63 /** The cursor in expression stack. */
64 private static int nodePtr;
66 public final void setFileToParse(final IFile fileToParse) {
67 this.fileToParse = fileToParse;
73 public PHPParser(final IFile fileToParse) {
74 this(new StringReader(""));
75 this.fileToParse = fileToParse;
79 * Reinitialize the parser.
81 private static final void init() {
82 nodes = new AstNode[AstStackIncrement];
88 * Add an php node on the stack.
89 * @param node the node that will be added to the stack
91 private static final void pushOnAstNodes(final AstNode node) {
93 nodes[++nodePtr] = node;
94 } catch (IndexOutOfBoundsException e) {
95 final int oldStackLength = nodes.length;
96 final AstNode[] oldStack = nodes;
97 nodes = new AstNode[oldStackLength + AstStackIncrement];
98 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
99 nodePtr = oldStackLength;
100 nodes[nodePtr] = node;
104 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
105 phpDocument = new PHPDocument(parent,"_root".toCharArray());
106 currentSegment = phpDocument;
107 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
108 final StringReader stream = new StringReader(s);
109 if (jj_input_stream == null) {
110 jj_input_stream = new SimpleCharStream(stream, 1, 1);
116 phpDocument.nodes = new AstNode[nodes.length];
117 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
118 if (PHPeclipsePlugin.DEBUG) {
119 PHPeclipsePlugin.log(1,phpDocument.toString());
121 } catch (ParseException e) {
122 processParseException(e);
128 * This method will process the parse exception.
129 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
130 * @param e the ParseException
132 private static void processParseException(final ParseException e) {
133 if (errorMessage == null) {
134 PHPeclipsePlugin.log(e);
135 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
136 errorStart = SimpleCharStream.getPosition();
137 errorEnd = errorStart + 1;
141 if (PHPeclipsePlugin.DEBUG) PHPeclipsePlugin.log(e);
145 * Create marker for the parse error
146 * @param e the ParseException
148 private static void setMarker(final ParseException e) {
150 if (errorStart == -1) {
151 setMarker(fileToParse,
153 SimpleCharStream.tokenBegin,
154 SimpleCharStream.tokenBegin + e.currentToken.image.length(),
156 "Line " + e.currentToken.beginLine);
158 setMarker(fileToParse,
163 "Line " + e.currentToken.beginLine);
167 } catch (CoreException e2) {
168 PHPeclipsePlugin.log(e2);
172 private static void scanLine(final String output,
175 final int brIndx) throws CoreException {
177 StringBuffer lineNumberBuffer = new StringBuffer(10);
179 current = output.substring(indx, brIndx);
181 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
182 int onLine = current.indexOf("on line <b>");
184 lineNumberBuffer.delete(0, lineNumberBuffer.length());
185 for (int i = onLine; i < current.length(); i++) {
186 ch = current.charAt(i);
187 if ('0' <= ch && '9' >= ch) {
188 lineNumberBuffer.append(ch);
192 int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
194 Hashtable attributes = new Hashtable();
196 current = current.replaceAll("\n", "");
197 current = current.replaceAll("<b>", "");
198 current = current.replaceAll("</b>", "");
199 MarkerUtilities.setMessage(attributes, current);
201 if (current.indexOf(PARSE_ERROR_STRING) != -1)
202 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
203 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
204 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
206 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
207 MarkerUtilities.setLineNumber(attributes, lineNumber);
208 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
213 public final void parse(final String s) throws CoreException {
214 final StringReader stream = new StringReader(s);
215 if (jj_input_stream == null) {
216 jj_input_stream = new SimpleCharStream(stream, 1, 1);
222 } catch (ParseException e) {
223 processParseException(e);
228 * Call the php parse command ( php -l -f <filename> )
229 * and create markers according to the external parser output
231 public static void phpExternalParse(final IFile file) {
232 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
233 final String filename = file.getLocation().toString();
235 final String[] arguments = { filename };
236 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
237 final String command = form.format(arguments);
239 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
242 // parse the buffer to find the errors and warnings
243 createMarkers(parserResult, file);
244 } catch (CoreException e) {
245 PHPeclipsePlugin.log(e);
250 * Put a new html block in the stack.
252 public static final void createNewHTMLCode() {
253 final int currentPosition = SimpleCharStream.getPosition();
254 if (currentPosition == htmlStart || currentPosition > SimpleCharStream.currentBuffer.length()) {
257 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray();
258 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
264 public static final void createNewTask() {
265 final int currentPosition = SimpleCharStream.getPosition();
266 final String todo = SimpleCharStream.currentBuffer.substring(currentPosition+1,
267 SimpleCharStream.currentBuffer.indexOf("\n",
270 setMarker(fileToParse,
272 SimpleCharStream.getBeginLine(),
274 "Line "+SimpleCharStream.getBeginLine());
275 } catch (CoreException e) {
276 PHPeclipsePlugin.log(e);
280 private static final void parse() throws ParseException {
284 static final public void phpFile() throws ParseException {
288 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
327 case INTEGER_LITERAL:
328 case FLOATING_POINT_LITERAL:
343 PHPParser.createNewHTMLCode();
344 } catch (TokenMgrError e) {
345 PHPeclipsePlugin.log(e);
346 errorStart = SimpleCharStream.getPosition();
347 errorEnd = errorStart + 1;
348 errorMessage = e.getMessage();
350 {if (true) throw generateParseException();}
355 * A php block is a <?= expression [;]?>
356 * or <?php somephpcode ?>
357 * or <? somephpcode ?>
359 static final public void PhpBlock() throws ParseException {
360 final int start = SimpleCharStream.getPosition();
361 final PHPEchoBlock phpEchoBlock;
362 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
364 phpEchoBlock = phpEchoBlock();
365 pushOnAstNodes(phpEchoBlock);
404 case INTEGER_LITERAL:
405 case FLOATING_POINT_LITERAL:
412 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
415 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
417 jj_consume_token(PHPSTARTLONG);
420 jj_consume_token(PHPSTARTSHORT);
422 setMarker(fileToParse,
423 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
425 SimpleCharStream.getPosition(),
427 "Line " + token.beginLine);
428 } catch (CoreException e) {
429 PHPeclipsePlugin.log(e);
434 jj_consume_token(-1);
435 throw new ParseException();
444 jj_consume_token(PHPEND);
445 } catch (ParseException e) {
446 errorMessage = "'?>' expected";
448 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
449 errorEnd = SimpleCharStream.getPosition() + 1;
450 processParseException(e);
455 jj_consume_token(-1);
456 throw new ParseException();
460 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
461 final Expression expr;
462 final int pos = SimpleCharStream.getPosition();
463 final PHPEchoBlock echoBlock;
464 jj_consume_token(PHPECHOSTART);
466 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
468 jj_consume_token(SEMICOLON);
474 jj_consume_token(PHPEND);
475 echoBlock = new PHPEchoBlock(expr,pos,SimpleCharStream.getPosition());
476 pushOnAstNodes(echoBlock);
477 {if (true) return echoBlock;}
478 throw new Error("Missing return statement in function");
481 static final public void Php() throws ParseException {
484 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
519 case INTEGER_LITERAL:
520 case FLOATING_POINT_LITERAL:
537 static final public ClassDeclaration ClassDeclaration() throws ParseException {
538 final ClassDeclaration classDeclaration;
539 final Token className,superclassName;
541 char[] classNameImage = SYNTAX_ERROR_CHAR;
542 char[] superclassNameImage = null;
543 jj_consume_token(CLASS);
544 pos = SimpleCharStream.getPosition();
546 className = jj_consume_token(IDENTIFIER);
547 classNameImage = className.image.toCharArray();
548 } catch (ParseException e) {
549 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
551 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
552 errorEnd = SimpleCharStream.getPosition() + 1;
553 processParseException(e);
555 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
557 jj_consume_token(EXTENDS);
559 superclassName = jj_consume_token(IDENTIFIER);
560 superclassNameImage = superclassName.image.toCharArray();
561 } catch (ParseException e) {
562 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
564 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
565 errorEnd = SimpleCharStream.getPosition() + 1;
566 processParseException(e);
567 superclassNameImage = SYNTAX_ERROR_CHAR;
574 if (superclassNameImage == null) {
575 classDeclaration = new ClassDeclaration(currentSegment,
580 classDeclaration = new ClassDeclaration(currentSegment,
586 currentSegment.add(classDeclaration);
587 currentSegment = classDeclaration;
588 ClassBody(classDeclaration);
589 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
590 classDeclaration.sourceEnd = SimpleCharStream.getPosition();
591 pushOnAstNodes(classDeclaration);
592 {if (true) return classDeclaration;}
593 throw new Error("Missing return statement in function");
596 static final public void ClassBody(final ClassDeclaration classDeclaration) throws ParseException {
598 jj_consume_token(LBRACE);
599 } catch (ParseException e) {
600 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "', '{' expected";
602 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
603 errorEnd = SimpleCharStream.getPosition() + 1;
608 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
617 ClassBodyDeclaration(classDeclaration);
620 jj_consume_token(RBRACE);
621 } catch (ParseException e) {
622 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', 'var', 'function' or '}' expected";
624 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
625 errorEnd = SimpleCharStream.getPosition() + 1;
631 * A class can contain only methods and fields.
633 static final public void ClassBodyDeclaration(final ClassDeclaration classDeclaration) throws ParseException {
634 final MethodDeclaration method;
635 final FieldDeclaration field;
636 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
638 method = MethodDeclaration();
639 classDeclaration.addMethod(method);
642 field = FieldDeclaration();
643 classDeclaration.addField(field);
647 jj_consume_token(-1);
648 throw new ParseException();
653 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
655 static final public FieldDeclaration FieldDeclaration() throws ParseException {
656 VariableDeclaration variableDeclaration;
657 final VariableDeclaration[] list;
658 final ArrayList arrayList = new ArrayList();
659 final int pos = SimpleCharStream.getPosition();
660 jj_consume_token(VAR);
661 variableDeclaration = VariableDeclarator();
662 arrayList.add(variableDeclaration);
663 outlineInfo.addVariable(new String(variableDeclaration.name));
666 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
674 jj_consume_token(COMMA);
675 variableDeclaration = VariableDeclarator();
676 arrayList.add(variableDeclaration);
677 outlineInfo.addVariable(new String(variableDeclaration.name));
680 jj_consume_token(SEMICOLON);
681 } catch (ParseException e) {
682 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
684 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
685 errorEnd = SimpleCharStream.getPosition() + 1;
686 processParseException(e);
688 list = new VariableDeclaration[arrayList.size()];
689 arrayList.toArray(list);
690 {if (true) return new FieldDeclaration(list,
692 SimpleCharStream.getPosition(),
694 throw new Error("Missing return statement in function");
697 static final public VariableDeclaration VariableDeclarator() throws ParseException {
698 final String varName;
699 Expression initializer = null;
700 final int pos = SimpleCharStream.getPosition();
701 varName = VariableDeclaratorId();
702 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
704 jj_consume_token(ASSIGN);
706 initializer = VariableInitializer();
707 } catch (ParseException e) {
708 errorMessage = "Literal expression expected in variable initializer";
710 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
711 errorEnd = SimpleCharStream.getPosition() + 1;
719 if (initializer == null) {
720 {if (true) return new VariableDeclaration(currentSegment,
721 varName.toCharArray(),
723 SimpleCharStream.getPosition());}
725 {if (true) return new VariableDeclaration(currentSegment,
726 varName.toCharArray(),
729 throw new Error("Missing return statement in function");
734 * @return the variable name (with suffix)
736 static final public String VariableDeclaratorId() throws ParseException {
738 Expression expression = null;
739 final int pos = SimpleCharStream.getPosition();
740 ConstantIdentifier ex;
750 ex = new ConstantIdentifier(expr.toCharArray(),
752 SimpleCharStream.getPosition());
753 expression = VariableSuffix(ex);
755 if (expression == null) {
756 {if (true) return expr;}
758 {if (true) return expression.toStringExpression();}
759 } catch (ParseException e) {
760 errorMessage = "'$' expected for variable identifier";
762 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
763 errorEnd = SimpleCharStream.getPosition() + 1;
766 throw new Error("Missing return statement in function");
770 * Return a variablename without the $.
771 * @return a variable name
773 static final public String Variable() throws ParseException {
774 final StringBuffer buff;
775 Expression expression = null;
778 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
780 token = jj_consume_token(DOLLAR_ID);
781 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
783 jj_consume_token(LBRACE);
784 expression = Expression();
785 jj_consume_token(RBRACE);
791 if (expression == null) {
792 {if (true) return token.image.substring(1);}
794 buff = new StringBuffer(token.image);
796 buff.append(expression.toStringExpression());
798 {if (true) return buff.toString();}
801 jj_consume_token(DOLLAR);
802 expr = VariableName();
803 {if (true) return expr;}
807 jj_consume_token(-1);
808 throw new ParseException();
810 throw new Error("Missing return statement in function");
814 * A Variable name (without the $)
815 * @return a variable name String
817 static final public String VariableName() throws ParseException {
818 final StringBuffer buff;
820 Expression expression = null;
822 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
824 jj_consume_token(LBRACE);
825 expression = Expression();
826 jj_consume_token(RBRACE);
827 buff = new StringBuffer("{");
828 buff.append(expression.toStringExpression());
830 {if (true) return buff.toString();}
833 token = jj_consume_token(IDENTIFIER);
834 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
836 jj_consume_token(LBRACE);
837 expression = Expression();
838 jj_consume_token(RBRACE);
844 if (expression == null) {
845 {if (true) return token.image;}
847 buff = new StringBuffer(token.image);
849 buff.append(expression.toStringExpression());
851 {if (true) return buff.toString();}
854 jj_consume_token(DOLLAR);
855 expr = VariableName();
856 buff = new StringBuffer("$");
858 {if (true) return buff.toString();}
861 token = jj_consume_token(DOLLAR_ID);
862 {if (true) return token.image;}
866 jj_consume_token(-1);
867 throw new ParseException();
869 throw new Error("Missing return statement in function");
872 static final public Expression VariableInitializer() throws ParseException {
873 final Expression expr;
875 final int pos = SimpleCharStream.getPosition();
876 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
880 case INTEGER_LITERAL:
881 case FLOATING_POINT_LITERAL:
884 {if (true) return expr;}
887 jj_consume_token(MINUS);
888 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
889 case INTEGER_LITERAL:
890 token = jj_consume_token(INTEGER_LITERAL);
892 case FLOATING_POINT_LITERAL:
893 token = jj_consume_token(FLOATING_POINT_LITERAL);
897 jj_consume_token(-1);
898 throw new ParseException();
900 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
902 SimpleCharStream.getPosition()),
907 jj_consume_token(PLUS);
908 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
909 case INTEGER_LITERAL:
910 token = jj_consume_token(INTEGER_LITERAL);
912 case FLOATING_POINT_LITERAL:
913 token = jj_consume_token(FLOATING_POINT_LITERAL);
917 jj_consume_token(-1);
918 throw new ParseException();
920 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
922 SimpleCharStream.getPosition()),
927 expr = ArrayDeclarator();
928 {if (true) return expr;}
931 token = jj_consume_token(IDENTIFIER);
932 {if (true) return new ConstantIdentifier(token.image.toCharArray(),pos,SimpleCharStream.getPosition());}
936 jj_consume_token(-1);
937 throw new ParseException();
939 throw new Error("Missing return statement in function");
942 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
943 final Expression expr,expr2;
945 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
947 jj_consume_token(ARRAYASSIGN);
948 expr2 = Expression();
949 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
955 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
956 throw new Error("Missing return statement in function");
959 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
960 ArrayVariableDeclaration expr;
961 final ArrayList list = new ArrayList();
962 jj_consume_token(LPAREN);
963 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
979 case INTEGER_LITERAL:
980 case FLOATING_POINT_LITERAL:
985 expr = ArrayVariable();
994 jj_consume_token(COMMA);
995 expr = ArrayVariable();
1000 jj_la1[19] = jj_gen;
1003 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1005 jj_consume_token(COMMA);
1009 jj_la1[20] = jj_gen;
1012 jj_consume_token(RPAREN);
1013 final ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1015 {if (true) return vars;}
1016 throw new Error("Missing return statement in function");
1020 * A Method Declaration.
1021 * <b>function</b> MetodDeclarator() Block()
1023 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1024 final MethodDeclaration functionDeclaration;
1026 final OutlineableWithChildren seg = currentSegment;
1027 jj_consume_token(FUNCTION);
1029 functionDeclaration = MethodDeclarator();
1030 outlineInfo.addVariable(new String(functionDeclaration.name));
1031 } catch (ParseException e) {
1032 if (errorMessage != null) {if (true) throw e;}
1033 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1035 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1036 errorEnd = SimpleCharStream.getPosition() + 1;
1037 {if (true) throw e;}
1039 currentSegment = functionDeclaration;
1041 functionDeclaration.statements = block.statements;
1042 currentSegment = seg;
1043 {if (true) return functionDeclaration;}
1044 throw new Error("Missing return statement in function");
1048 * A MethodDeclarator.
1049 * [&] IDENTIFIER(parameters ...).
1050 * @return a function description for the outline
1052 static final public MethodDeclaration MethodDeclarator() throws ParseException {
1053 final Token identifier;
1054 Token reference = null;
1055 final Hashtable formalParameters;
1056 final int pos = SimpleCharStream.getPosition();
1057 char[] identifierChar = SYNTAX_ERROR_CHAR;
1058 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1060 reference = jj_consume_token(BIT_AND);
1063 jj_la1[21] = jj_gen;
1067 identifier = jj_consume_token(IDENTIFIER);
1068 identifierChar = identifier.image.toCharArray();
1069 } catch (ParseException e) {
1070 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1072 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1073 errorEnd = SimpleCharStream.getPosition() + 1;
1074 processParseException(e);
1076 formalParameters = FormalParameters();
1077 {if (true) return new MethodDeclaration(currentSegment,
1082 SimpleCharStream.getPosition());}
1083 throw new Error("Missing return statement in function");
1087 * FormalParameters follows method identifier.
1088 * (FormalParameter())
1090 static final public Hashtable FormalParameters() throws ParseException {
1091 VariableDeclaration var;
1092 final Hashtable parameters = new Hashtable();
1094 jj_consume_token(LPAREN);
1095 } catch (ParseException e) {
1096 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1098 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1099 errorEnd = SimpleCharStream.getPosition() + 1;
1100 processParseException(e);
1102 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1106 var = FormalParameter();
1107 parameters.put(new String(var.name),var);
1110 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1115 jj_la1[22] = jj_gen;
1118 jj_consume_token(COMMA);
1119 var = FormalParameter();
1120 parameters.put(new String(var.name),var);
1124 jj_la1[23] = jj_gen;
1128 jj_consume_token(RPAREN);
1129 } catch (ParseException e) {
1130 errorMessage = "')' expected";
1132 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1133 errorEnd = SimpleCharStream.getPosition() + 1;
1134 processParseException(e);
1136 {if (true) return parameters;}
1137 throw new Error("Missing return statement in function");
1141 * A formal parameter.
1142 * $varname[=value] (,$varname[=value])
1144 static final public VariableDeclaration FormalParameter() throws ParseException {
1145 final VariableDeclaration variableDeclaration;
1147 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1149 token = jj_consume_token(BIT_AND);
1152 jj_la1[24] = jj_gen;
1155 variableDeclaration = VariableDeclarator();
1156 if (token != null) {
1157 variableDeclaration.setReference(true);
1159 {if (true) return variableDeclaration;}
1160 throw new Error("Missing return statement in function");
1163 static final public ConstantIdentifier Type() throws ParseException {
1165 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1167 jj_consume_token(STRING);
1168 pos = SimpleCharStream.getPosition();
1169 {if (true) return new ConstantIdentifier(Types.STRING,pos,pos-6);}
1172 jj_consume_token(BOOL);
1173 pos = SimpleCharStream.getPosition();
1174 {if (true) return new ConstantIdentifier(Types.BOOL,pos,pos-4);}
1177 jj_consume_token(BOOLEAN);
1178 pos = SimpleCharStream.getPosition();
1179 {if (true) return new ConstantIdentifier(Types.BOOLEAN,pos,pos-7);}
1182 jj_consume_token(REAL);
1183 pos = SimpleCharStream.getPosition();
1184 {if (true) return new ConstantIdentifier(Types.REAL,pos,pos-4);}
1187 jj_consume_token(DOUBLE);
1188 pos = SimpleCharStream.getPosition();
1189 {if (true) return new ConstantIdentifier(Types.DOUBLE,pos,pos-5);}
1192 jj_consume_token(FLOAT);
1193 pos = SimpleCharStream.getPosition();
1194 {if (true) return new ConstantIdentifier(Types.FLOAT,pos,pos-5);}
1197 jj_consume_token(INT);
1198 pos = SimpleCharStream.getPosition();
1199 {if (true) return new ConstantIdentifier(Types.INT,pos,pos-3);}
1202 jj_consume_token(INTEGER);
1203 pos = SimpleCharStream.getPosition();
1204 {if (true) return new ConstantIdentifier(Types.INTEGER,pos,pos-7);}
1207 jj_consume_token(OBJECT);
1208 pos = SimpleCharStream.getPosition();
1209 {if (true) return new ConstantIdentifier(Types.OBJECT,pos,pos-6);}
1212 jj_la1[25] = jj_gen;
1213 jj_consume_token(-1);
1214 throw new ParseException();
1216 throw new Error("Missing return statement in function");
1219 static final public Expression Expression() throws ParseException {
1220 final Expression expr;
1221 Expression initializer = null;
1222 int assignOperator = -1;
1223 final int pos = SimpleCharStream.getPosition();
1225 expr = ConditionalExpression();
1226 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1239 case RSIGNEDSHIFTASSIGN:
1240 assignOperator = AssignmentOperator();
1241 initializer = Expression();
1244 jj_la1[26] = jj_gen;
1247 if (assignOperator == -1) {if (true) return expr;}
1248 {if (true) return new VarAssignation(expr,
1252 SimpleCharStream.getPosition());}
1253 {if (true) return expr;}
1255 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1259 expr = ExpressionWBang();
1260 {if (true) return expr;}
1263 jj_la1[27] = jj_gen;
1264 jj_consume_token(-1);
1265 throw new ParseException();
1268 throw new Error("Missing return statement in function");
1271 static final public Expression ExpressionWBang() throws ParseException {
1272 final Expression expr;
1273 final int pos = SimpleCharStream.getPosition();
1274 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1276 jj_consume_token(BANG);
1277 expr = ExpressionWBang();
1278 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1282 expr = ExpressionNoBang();
1283 {if (true) return expr;}
1286 jj_la1[28] = jj_gen;
1287 jj_consume_token(-1);
1288 throw new ParseException();
1290 throw new Error("Missing return statement in function");
1293 static final public Expression ExpressionNoBang() throws ParseException {
1294 final Expression expr;
1295 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1297 expr = PrintExpression();
1298 {if (true) return expr;}
1301 expr = ListExpression();
1302 {if (true) return expr;}
1305 jj_la1[29] = jj_gen;
1306 jj_consume_token(-1);
1307 throw new ParseException();
1309 throw new Error("Missing return statement in function");
1313 * Any assignement operator.
1314 * @return the assignement operator id
1316 static final public int AssignmentOperator() throws ParseException {
1317 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1319 jj_consume_token(ASSIGN);
1320 {if (true) return VarAssignation.EQUAL;}
1323 jj_consume_token(STARASSIGN);
1324 {if (true) return VarAssignation.STAR_EQUAL;}
1327 jj_consume_token(SLASHASSIGN);
1328 {if (true) return VarAssignation.SLASH_EQUAL;}
1331 jj_consume_token(REMASSIGN);
1332 {if (true) return VarAssignation.REM_EQUAL;}
1335 jj_consume_token(PLUSASSIGN);
1336 {if (true) return VarAssignation.PLUS_EQUAL;}
1339 jj_consume_token(MINUSASSIGN);
1340 {if (true) return VarAssignation.MINUS_EQUAL;}
1343 jj_consume_token(LSHIFTASSIGN);
1344 {if (true) return VarAssignation.LSHIFT_EQUAL;}
1346 case RSIGNEDSHIFTASSIGN:
1347 jj_consume_token(RSIGNEDSHIFTASSIGN);
1348 {if (true) return VarAssignation.RSIGNEDSHIFT_EQUAL;}
1351 jj_consume_token(ANDASSIGN);
1352 {if (true) return VarAssignation.AND_EQUAL;}
1355 jj_consume_token(XORASSIGN);
1356 {if (true) return VarAssignation.XOR_EQUAL;}
1359 jj_consume_token(ORASSIGN);
1360 {if (true) return VarAssignation.OR_EQUAL;}
1363 jj_consume_token(DOTASSIGN);
1364 {if (true) return VarAssignation.DOT_EQUAL;}
1367 jj_consume_token(TILDEEQUAL);
1368 {if (true) return VarAssignation.TILDE_EQUAL;}
1371 jj_la1[30] = jj_gen;
1372 jj_consume_token(-1);
1373 throw new ParseException();
1375 throw new Error("Missing return statement in function");
1378 static final public Expression ConditionalExpression() throws ParseException {
1379 final Expression expr;
1380 Expression expr2 = null;
1381 Expression expr3 = null;
1382 expr = ConditionalOrExpression();
1383 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1385 jj_consume_token(HOOK);
1386 expr2 = Expression();
1387 jj_consume_token(COLON);
1388 expr3 = ConditionalExpression();
1391 jj_la1[31] = jj_gen;
1394 if (expr3 == null) {
1395 {if (true) return expr;}
1397 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1398 throw new Error("Missing return statement in function");
1401 static final public Expression ConditionalOrExpression() throws ParseException {
1402 Expression expr,expr2;
1404 expr = ConditionalAndExpression();
1407 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1413 jj_la1[32] = jj_gen;
1416 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1418 jj_consume_token(OR_OR);
1419 operator = OperatorIds.OR_OR;
1422 jj_consume_token(_ORL);
1423 operator = OperatorIds.ORL;
1426 jj_la1[33] = jj_gen;
1427 jj_consume_token(-1);
1428 throw new ParseException();
1430 expr2 = ConditionalAndExpression();
1431 expr = new BinaryExpression(expr,expr2,operator);
1433 {if (true) return expr;}
1434 throw new Error("Missing return statement in function");
1437 static final public Expression ConditionalAndExpression() throws ParseException {
1438 Expression expr,expr2;
1440 expr = ConcatExpression();
1443 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1449 jj_la1[34] = jj_gen;
1452 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1454 jj_consume_token(AND_AND);
1455 operator = OperatorIds.AND_AND;
1458 jj_consume_token(_ANDL);
1459 operator = OperatorIds.ANDL;
1462 jj_la1[35] = jj_gen;
1463 jj_consume_token(-1);
1464 throw new ParseException();
1466 expr2 = ConcatExpression();
1467 expr = new BinaryExpression(expr,expr2,operator);
1469 {if (true) return expr;}
1470 throw new Error("Missing return statement in function");
1473 static final public Expression ConcatExpression() throws ParseException {
1474 Expression expr,expr2;
1475 expr = InclusiveOrExpression();
1478 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1483 jj_la1[36] = jj_gen;
1486 jj_consume_token(DOT);
1487 expr2 = InclusiveOrExpression();
1488 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1490 {if (true) return expr;}
1491 throw new Error("Missing return statement in function");
1494 static final public Expression InclusiveOrExpression() throws ParseException {
1495 Expression expr,expr2;
1496 expr = ExclusiveOrExpression();
1499 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1504 jj_la1[37] = jj_gen;
1507 jj_consume_token(BIT_OR);
1508 expr2 = ExclusiveOrExpression();
1509 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1511 {if (true) return expr;}
1512 throw new Error("Missing return statement in function");
1515 static final public Expression ExclusiveOrExpression() throws ParseException {
1516 Expression expr,expr2;
1517 expr = AndExpression();
1520 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1525 jj_la1[38] = jj_gen;
1528 jj_consume_token(XOR);
1529 expr2 = AndExpression();
1530 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1532 {if (true) return expr;}
1533 throw new Error("Missing return statement in function");
1536 static final public Expression AndExpression() throws ParseException {
1537 Expression expr,expr2;
1538 expr = EqualityExpression();
1541 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1546 jj_la1[39] = jj_gen;
1549 jj_consume_token(BIT_AND);
1550 expr2 = EqualityExpression();
1551 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1553 {if (true) return expr;}
1554 throw new Error("Missing return statement in function");
1557 static final public Expression EqualityExpression() throws ParseException {
1558 Expression expr,expr2;
1560 expr = RelationalExpression();
1563 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1567 case BANGDOUBLEEQUAL:
1572 jj_la1[40] = jj_gen;
1575 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1577 jj_consume_token(EQUAL_EQUAL);
1578 operator = OperatorIds.EQUAL_EQUAL;
1581 jj_consume_token(DIF);
1582 operator = OperatorIds.DIF;
1585 jj_consume_token(NOT_EQUAL);
1586 operator = OperatorIds.DIF;
1588 case BANGDOUBLEEQUAL:
1589 jj_consume_token(BANGDOUBLEEQUAL);
1590 operator = OperatorIds.BANG_EQUAL_EQUAL;
1593 jj_consume_token(TRIPLEEQUAL);
1594 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1597 jj_la1[41] = jj_gen;
1598 jj_consume_token(-1);
1599 throw new ParseException();
1602 expr2 = RelationalExpression();
1603 } catch (ParseException e) {
1604 if (errorMessage != null) {
1605 {if (true) throw e;}
1607 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1609 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1610 errorEnd = SimpleCharStream.getPosition() + 1;
1611 {if (true) throw e;}
1613 expr = new BinaryExpression(expr,expr2,operator);
1615 {if (true) return expr;}
1616 throw new Error("Missing return statement in function");
1619 static final public Expression RelationalExpression() throws ParseException {
1620 Expression expr,expr2;
1622 expr = ShiftExpression();
1625 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1633 jj_la1[42] = jj_gen;
1636 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1638 jj_consume_token(LT);
1639 operator = OperatorIds.LESS;
1642 jj_consume_token(GT);
1643 operator = OperatorIds.GREATER;
1646 jj_consume_token(LE);
1647 operator = OperatorIds.LESS_EQUAL;
1650 jj_consume_token(GE);
1651 operator = OperatorIds.GREATER_EQUAL;
1654 jj_la1[43] = jj_gen;
1655 jj_consume_token(-1);
1656 throw new ParseException();
1658 expr2 = ShiftExpression();
1659 expr = new BinaryExpression(expr,expr2,operator);
1661 {if (true) return expr;}
1662 throw new Error("Missing return statement in function");
1665 static final public Expression ShiftExpression() throws ParseException {
1666 Expression expr,expr2;
1668 expr = AdditiveExpression();
1671 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1674 case RUNSIGNEDSHIFT:
1678 jj_la1[44] = jj_gen;
1681 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1683 jj_consume_token(LSHIFT);
1684 operator = OperatorIds.LEFT_SHIFT;
1687 jj_consume_token(RSIGNEDSHIFT);
1688 operator = OperatorIds.RIGHT_SHIFT;
1690 case RUNSIGNEDSHIFT:
1691 jj_consume_token(RUNSIGNEDSHIFT);
1692 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1695 jj_la1[45] = jj_gen;
1696 jj_consume_token(-1);
1697 throw new ParseException();
1699 expr2 = AdditiveExpression();
1700 expr = new BinaryExpression(expr,expr2,operator);
1702 {if (true) return expr;}
1703 throw new Error("Missing return statement in function");
1706 static final public Expression AdditiveExpression() throws ParseException {
1707 Expression expr,expr2;
1709 expr = MultiplicativeExpression();
1712 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1718 jj_la1[46] = jj_gen;
1721 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1723 jj_consume_token(PLUS);
1724 operator = OperatorIds.PLUS;
1727 jj_consume_token(MINUS);
1728 operator = OperatorIds.MINUS;
1731 jj_la1[47] = jj_gen;
1732 jj_consume_token(-1);
1733 throw new ParseException();
1735 expr2 = MultiplicativeExpression();
1736 expr = new BinaryExpression(expr,expr2,operator);
1738 {if (true) return expr;}
1739 throw new Error("Missing return statement in function");
1742 static final public Expression MultiplicativeExpression() throws ParseException {
1743 Expression expr,expr2;
1746 expr = UnaryExpression();
1747 } catch (ParseException e) {
1748 if (errorMessage != null) {if (true) throw e;}
1749 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1751 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1752 errorEnd = SimpleCharStream.getPosition() + 1;
1753 {if (true) throw e;}
1757 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1764 jj_la1[48] = jj_gen;
1767 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1769 jj_consume_token(STAR);
1770 operator = OperatorIds.MULTIPLY;
1773 jj_consume_token(SLASH);
1774 operator = OperatorIds.DIVIDE;
1777 jj_consume_token(REMAINDER);
1778 operator = OperatorIds.REMAINDER;
1781 jj_la1[49] = jj_gen;
1782 jj_consume_token(-1);
1783 throw new ParseException();
1785 expr2 = UnaryExpression();
1786 expr = new BinaryExpression(expr,expr2,operator);
1788 {if (true) return expr;}
1789 throw new Error("Missing return statement in function");
1793 * An unary expression starting with @, & or nothing
1795 static final public Expression UnaryExpression() throws ParseException {
1796 final Expression expr;
1797 final int pos = SimpleCharStream.getPosition();
1798 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1800 jj_consume_token(BIT_AND);
1801 expr = UnaryExpressionNoPrefix();
1802 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1816 case INTEGER_LITERAL:
1817 case FLOATING_POINT_LITERAL:
1818 case STRING_LITERAL:
1822 expr = AtUnaryExpression();
1823 {if (true) return expr;}
1826 jj_la1[50] = jj_gen;
1827 jj_consume_token(-1);
1828 throw new ParseException();
1830 throw new Error("Missing return statement in function");
1833 static final public Expression AtUnaryExpression() throws ParseException {
1834 final Expression expr;
1835 final int pos = SimpleCharStream.getPosition();
1836 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1838 jj_consume_token(AT);
1839 expr = AtUnaryExpression();
1840 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,pos);}
1853 case INTEGER_LITERAL:
1854 case FLOATING_POINT_LITERAL:
1855 case STRING_LITERAL:
1859 expr = UnaryExpressionNoPrefix();
1860 {if (true) return expr;}
1863 jj_la1[51] = jj_gen;
1864 jj_consume_token(-1);
1865 throw new ParseException();
1867 throw new Error("Missing return statement in function");
1870 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
1871 final Expression expr;
1873 final int pos = SimpleCharStream.getPosition();
1874 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1877 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1879 jj_consume_token(PLUS);
1880 operator = OperatorIds.PLUS;
1883 jj_consume_token(MINUS);
1884 operator = OperatorIds.MINUS;
1887 jj_la1[52] = jj_gen;
1888 jj_consume_token(-1);
1889 throw new ParseException();
1891 expr = UnaryExpression();
1892 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1896 expr = PreIncDecExpression();
1897 {if (true) return expr;}
1906 case INTEGER_LITERAL:
1907 case FLOATING_POINT_LITERAL:
1908 case STRING_LITERAL:
1912 expr = UnaryExpressionNotPlusMinus();
1913 {if (true) return expr;}
1916 jj_la1[53] = jj_gen;
1917 jj_consume_token(-1);
1918 throw new ParseException();
1920 throw new Error("Missing return statement in function");
1923 static final public Expression PreIncDecExpression() throws ParseException {
1924 final Expression expr;
1926 final int pos = SimpleCharStream.getPosition();
1927 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1929 jj_consume_token(PLUS_PLUS);
1930 operator = OperatorIds.PLUS_PLUS;
1933 jj_consume_token(MINUS_MINUS);
1934 operator = OperatorIds.MINUS_MINUS;
1937 jj_la1[54] = jj_gen;
1938 jj_consume_token(-1);
1939 throw new ParseException();
1941 expr = PrimaryExpression();
1942 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1943 throw new Error("Missing return statement in function");
1946 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
1947 final Expression expr;
1948 final int pos = SimpleCharStream.getPosition();
1949 if (jj_2_4(2147483647)) {
1950 expr = CastExpression();
1951 {if (true) return expr;}
1953 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1955 jj_consume_token(BANG);
1956 expr = UnaryExpression();
1957 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1964 expr = PostfixExpression();
1965 {if (true) return expr;}
1970 case INTEGER_LITERAL:
1971 case FLOATING_POINT_LITERAL:
1972 case STRING_LITERAL:
1974 {if (true) return expr;}
1977 jj_consume_token(LPAREN);
1978 expr = Expression();
1980 jj_consume_token(RPAREN);
1981 } catch (ParseException e) {
1982 errorMessage = "')' expected";
1984 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1985 errorEnd = SimpleCharStream.getPosition() + 1;
1986 {if (true) throw e;}
1988 {if (true) return expr;}
1991 jj_la1[55] = jj_gen;
1992 jj_consume_token(-1);
1993 throw new ParseException();
1996 throw new Error("Missing return statement in function");
1999 static final public CastExpression CastExpression() throws ParseException {
2000 final ConstantIdentifier type;
2001 final Expression expr;
2002 final int pos = SimpleCharStream.getPosition();
2003 jj_consume_token(LPAREN);
2004 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2017 jj_consume_token(ARRAY);
2018 type = new ConstantIdentifier(Types.ARRAY,pos,SimpleCharStream.getPosition());
2021 jj_la1[56] = jj_gen;
2022 jj_consume_token(-1);
2023 throw new ParseException();
2025 jj_consume_token(RPAREN);
2026 expr = UnaryExpression();
2027 {if (true) return new CastExpression(type,expr,pos,SimpleCharStream.getPosition());}
2028 throw new Error("Missing return statement in function");
2031 static final public Expression PostfixExpression() throws ParseException {
2032 final Expression expr;
2034 final int pos = SimpleCharStream.getPosition();
2035 expr = PrimaryExpression();
2036 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2039 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2041 jj_consume_token(PLUS_PLUS);
2042 operator = OperatorIds.PLUS_PLUS;
2045 jj_consume_token(MINUS_MINUS);
2046 operator = OperatorIds.MINUS_MINUS;
2049 jj_la1[57] = jj_gen;
2050 jj_consume_token(-1);
2051 throw new ParseException();
2055 jj_la1[58] = jj_gen;
2058 if (operator == -1) {
2059 {if (true) return expr;}
2061 {if (true) return new PostfixedUnaryExpression(expr,operator,pos);}
2062 throw new Error("Missing return statement in function");
2065 static final public Expression PrimaryExpression() throws ParseException {
2066 final Token identifier;
2068 final int pos = SimpleCharStream.getPosition();
2069 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2074 expr = PrimaryPrefix();
2077 if (jj_2_5(2147483647)) {
2082 expr = PrimarySuffix(expr);
2084 {if (true) return expr;}
2087 expr = ArrayDeclarator();
2088 {if (true) return expr;}
2091 jj_la1[59] = jj_gen;
2092 jj_consume_token(-1);
2093 throw new ParseException();
2095 throw new Error("Missing return statement in function");
2098 static final public Expression PrimaryPrefix() throws ParseException {
2099 final Expression expr;
2102 final int pos = SimpleCharStream.getPosition();
2103 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2105 token = jj_consume_token(IDENTIFIER);
2106 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2108 SimpleCharStream.getPosition());}
2111 jj_consume_token(NEW);
2112 expr = ClassIdentifier();
2113 {if (true) return new PrefixedUnaryExpression(expr,
2119 var = VariableDeclaratorId();
2120 {if (true) return new VariableDeclaration(currentSegment,
2123 SimpleCharStream.getPosition());}
2126 jj_la1[60] = jj_gen;
2127 jj_consume_token(-1);
2128 throw new ParseException();
2130 throw new Error("Missing return statement in function");
2133 static final public AbstractSuffixExpression PrimarySuffix(final Expression prefix) throws ParseException {
2134 final AbstractSuffixExpression suffix;
2135 final Expression expr;
2136 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2138 suffix = Arguments(prefix);
2139 {if (true) return suffix;}
2143 suffix = VariableSuffix(prefix);
2144 {if (true) return suffix;}
2146 case STATICCLASSACCESS:
2147 jj_consume_token(STATICCLASSACCESS);
2148 expr = ClassIdentifier();
2149 suffix = new ClassAccess(prefix,
2151 ClassAccess.STATIC);
2152 {if (true) return suffix;}
2155 jj_la1[61] = jj_gen;
2156 jj_consume_token(-1);
2157 throw new ParseException();
2159 throw new Error("Missing return statement in function");
2163 * An array declarator.
2167 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2168 final ArrayVariableDeclaration[] vars;
2169 final int pos = SimpleCharStream.getPosition();
2170 jj_consume_token(ARRAY);
2171 vars = ArrayInitializer();
2172 {if (true) return new ArrayInitializer(vars,pos,SimpleCharStream.getPosition());}
2173 throw new Error("Missing return statement in function");
2176 static final public PrefixedUnaryExpression classInstantiation() throws ParseException {
2178 final StringBuffer buff;
2179 final int pos = SimpleCharStream.getPosition();
2180 jj_consume_token(NEW);
2181 expr = ClassIdentifier();
2182 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2188 buff = new StringBuffer(expr.toStringExpression());
2189 expr = PrimaryExpression();
2190 buff.append(expr.toStringExpression());
2191 expr = new ConstantIdentifier(buff.toString().toCharArray(),
2193 SimpleCharStream.getPosition());
2196 jj_la1[62] = jj_gen;
2199 {if (true) return new PrefixedUnaryExpression(expr,
2202 throw new Error("Missing return statement in function");
2205 static final public ConstantIdentifier ClassIdentifier() throws ParseException {
2208 final int pos = SimpleCharStream.getPosition();
2209 final ConstantIdentifier type;
2210 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2212 token = jj_consume_token(IDENTIFIER);
2213 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2215 SimpleCharStream.getPosition());}
2227 {if (true) return type;}
2231 expr = VariableDeclaratorId();
2232 {if (true) return new ConstantIdentifier(expr.toCharArray(),
2234 SimpleCharStream.getPosition());}
2237 jj_la1[63] = jj_gen;
2238 jj_consume_token(-1);
2239 throw new ParseException();
2241 throw new Error("Missing return statement in function");
2244 static final public AbstractSuffixExpression VariableSuffix(final Expression prefix) throws ParseException {
2246 final int pos = SimpleCharStream.getPosition();
2247 Expression expression = null;
2248 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2250 jj_consume_token(CLASSACCESS);
2252 expr = VariableName();
2253 } catch (ParseException e) {
2254 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2256 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2257 errorEnd = SimpleCharStream.getPosition() + 1;
2258 {if (true) throw e;}
2260 {if (true) return new ClassAccess(prefix,
2261 new ConstantIdentifier(expr.toCharArray(),pos,SimpleCharStream.getPosition()),
2262 ClassAccess.NORMAL);}
2265 jj_consume_token(LBRACKET);
2266 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2291 case INTEGER_LITERAL:
2292 case FLOATING_POINT_LITERAL:
2293 case STRING_LITERAL:
2297 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2313 case INTEGER_LITERAL:
2314 case FLOATING_POINT_LITERAL:
2315 case STRING_LITERAL:
2319 expression = Expression();
2330 expression = Type();
2333 jj_la1[64] = jj_gen;
2334 jj_consume_token(-1);
2335 throw new ParseException();
2339 jj_la1[65] = jj_gen;
2343 jj_consume_token(RBRACKET);
2344 } catch (ParseException e) {
2345 errorMessage = "']' expected";
2347 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2348 errorEnd = SimpleCharStream.getPosition() + 1;
2349 {if (true) throw e;}
2351 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2354 jj_la1[66] = jj_gen;
2355 jj_consume_token(-1);
2356 throw new ParseException();
2358 throw new Error("Missing return statement in function");
2361 static final public Literal Literal() throws ParseException {
2364 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2365 case INTEGER_LITERAL:
2366 token = jj_consume_token(INTEGER_LITERAL);
2367 pos = SimpleCharStream.getPosition();
2368 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2370 case FLOATING_POINT_LITERAL:
2371 token = jj_consume_token(FLOATING_POINT_LITERAL);
2372 pos = SimpleCharStream.getPosition();
2373 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2375 case STRING_LITERAL:
2376 token = jj_consume_token(STRING_LITERAL);
2377 pos = SimpleCharStream.getPosition();
2378 {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length());}
2381 jj_consume_token(TRUE);
2382 pos = SimpleCharStream.getPosition();
2383 {if (true) return new TrueLiteral(pos-4,pos);}
2386 jj_consume_token(FALSE);
2387 pos = SimpleCharStream.getPosition();
2388 {if (true) return new FalseLiteral(pos-4,pos);}
2391 jj_consume_token(NULL);
2392 pos = SimpleCharStream.getPosition();
2393 {if (true) return new NullLiteral(pos-4,pos);}
2396 jj_la1[67] = jj_gen;
2397 jj_consume_token(-1);
2398 throw new ParseException();
2400 throw new Error("Missing return statement in function");
2403 static final public FunctionCall Arguments(final Expression func) throws ParseException {
2404 Expression[] args = null;
2405 jj_consume_token(LPAREN);
2406 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2422 case INTEGER_LITERAL:
2423 case FLOATING_POINT_LITERAL:
2424 case STRING_LITERAL:
2428 args = ArgumentList();
2431 jj_la1[68] = jj_gen;
2435 jj_consume_token(RPAREN);
2436 } catch (ParseException e) {
2437 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2439 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2440 errorEnd = SimpleCharStream.getPosition() + 1;
2441 {if (true) throw e;}
2443 {if (true) return new FunctionCall(func,args,SimpleCharStream.getPosition());}
2444 throw new Error("Missing return statement in function");
2448 * An argument list is a list of arguments separated by comma :
2449 * argumentDeclaration() (, argumentDeclaration)*
2450 * @return an array of arguments
2452 static final public Expression[] ArgumentList() throws ParseException {
2454 final ArrayList list = new ArrayList();
2459 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2464 jj_la1[69] = jj_gen;
2467 jj_consume_token(COMMA);
2471 } catch (ParseException e) {
2472 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2474 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2475 errorEnd = SimpleCharStream.getPosition() + 1;
2476 {if (true) throw e;}
2479 final Expression[] arguments = new Expression[list.size()];
2480 list.toArray(arguments);
2481 {if (true) return arguments;}
2482 throw new Error("Missing return statement in function");
2486 * A Statement without break.
2488 static final public Statement StatementNoBreak() throws ParseException {
2489 final Statement statement;
2492 statement = Expression();
2494 jj_consume_token(SEMICOLON);
2495 } catch (ParseException e) {
2496 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2497 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2499 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2500 errorEnd = SimpleCharStream.getPosition() + 1;
2501 {if (true) throw e;}
2504 {if (true) return statement;}
2505 } else if (jj_2_7(2)) {
2506 statement = LabeledStatement();
2507 {if (true) return statement;}
2509 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2511 statement = Block();
2512 {if (true) return statement;}
2515 statement = EmptyStatement();
2516 {if (true) return statement;}
2525 statement = StatementExpression();
2527 jj_consume_token(SEMICOLON);
2528 } catch (ParseException e) {
2529 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2531 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2532 errorEnd = SimpleCharStream.getPosition() + 1;
2533 {if (true) throw e;}
2535 {if (true) return statement;}
2538 statement = SwitchStatement();
2539 {if (true) return statement;}
2542 statement = IfStatement();
2543 {if (true) return statement;}
2546 statement = WhileStatement();
2547 {if (true) return statement;}
2550 statement = DoStatement();
2551 {if (true) return statement;}
2554 statement = ForStatement();
2555 {if (true) return statement;}
2558 statement = ForeachStatement();
2559 {if (true) return statement;}
2562 statement = ContinueStatement();
2563 {if (true) return statement;}
2566 statement = ReturnStatement();
2567 {if (true) return statement;}
2570 statement = EchoStatement();
2571 {if (true) return statement;}
2578 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2580 token = jj_consume_token(AT);
2583 jj_la1[70] = jj_gen;
2586 statement = IncludeStatement();
2587 if (token != null) {
2588 ((InclusionStatement)statement).silent = true;
2590 {if (true) return statement;}
2593 statement = StaticStatement();
2594 {if (true) return statement;}
2597 statement = GlobalStatement();
2598 {if (true) return statement;}
2601 statement = defineStatement();
2602 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2605 jj_la1[71] = jj_gen;
2606 jj_consume_token(-1);
2607 throw new ParseException();
2610 throw new Error("Missing return statement in function");
2613 static final public Define defineStatement() throws ParseException {
2614 final int start = SimpleCharStream.getPosition();
2615 Expression defineName,defineValue;
2616 jj_consume_token(DEFINE);
2618 jj_consume_token(LPAREN);
2619 } catch (ParseException e) {
2620 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2622 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2623 errorEnd = SimpleCharStream.getPosition() + 1;
2624 processParseException(e);
2627 defineName = Expression();
2628 } catch (ParseException e) {
2629 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2631 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2632 errorEnd = SimpleCharStream.getPosition() + 1;
2633 {if (true) throw e;}
2636 jj_consume_token(COMMA);
2637 } catch (ParseException e) {
2638 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2640 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2641 errorEnd = SimpleCharStream.getPosition() + 1;
2642 processParseException(e);
2645 defineValue = Expression();
2646 } catch (ParseException e) {
2647 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2649 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2650 errorEnd = SimpleCharStream.getPosition() + 1;
2651 {if (true) throw e;}
2654 jj_consume_token(RPAREN);
2655 } catch (ParseException e) {
2656 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2658 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2659 errorEnd = SimpleCharStream.getPosition() + 1;
2660 processParseException(e);
2662 {if (true) return new Define(currentSegment,
2666 SimpleCharStream.getPosition());}
2667 throw new Error("Missing return statement in function");
2671 * A Normal statement.
2673 static final public Statement Statement() throws ParseException {
2674 final Statement statement;
2675 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2707 case INTEGER_LITERAL:
2708 case FLOATING_POINT_LITERAL:
2709 case STRING_LITERAL:
2715 statement = StatementNoBreak();
2716 {if (true) return statement;}
2719 statement = BreakStatement();
2720 {if (true) return statement;}
2723 jj_la1[72] = jj_gen;
2724 jj_consume_token(-1);
2725 throw new ParseException();
2727 throw new Error("Missing return statement in function");
2731 * An html block inside a php syntax.
2733 static final public HTMLBlock htmlBlock() throws ParseException {
2734 final int startIndex = nodePtr;
2735 final AstNode[] blockNodes;
2737 jj_consume_token(PHPEND);
2740 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2745 jj_la1[73] = jj_gen;
2751 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2753 jj_consume_token(PHPSTARTLONG);
2756 jj_consume_token(PHPSTARTSHORT);
2759 jj_la1[74] = jj_gen;
2760 jj_consume_token(-1);
2761 throw new ParseException();
2763 } catch (ParseException e) {
2764 errorMessage = "unexpected end of file , '<?php' expected";
2766 errorStart = SimpleCharStream.getPosition();
2767 errorEnd = SimpleCharStream.getPosition();
2768 {if (true) throw e;}
2770 nbNodes = nodePtr - startIndex;
2771 blockNodes = new AstNode[nbNodes];
2772 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2773 nodePtr = startIndex;
2774 {if (true) return new HTMLBlock(blockNodes);}
2775 throw new Error("Missing return statement in function");
2779 * An include statement. It's "include" an expression;
2781 static final public InclusionStatement IncludeStatement() throws ParseException {
2782 final Expression expr;
2784 final int pos = SimpleCharStream.getPosition();
2785 final InclusionStatement inclusionStatement;
2786 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2788 jj_consume_token(REQUIRE);
2789 keyword = InclusionStatement.REQUIRE;
2792 jj_consume_token(REQUIRE_ONCE);
2793 keyword = InclusionStatement.REQUIRE_ONCE;
2796 jj_consume_token(INCLUDE);
2797 keyword = InclusionStatement.INCLUDE;
2800 jj_consume_token(INCLUDE_ONCE);
2801 keyword = InclusionStatement.INCLUDE_ONCE;
2804 jj_la1[75] = jj_gen;
2805 jj_consume_token(-1);
2806 throw new ParseException();
2809 expr = Expression();
2810 } catch (ParseException e) {
2811 if (errorMessage != null) {
2812 {if (true) throw e;}
2814 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
2816 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2817 errorEnd = SimpleCharStream.getPosition() + 1;
2818 {if (true) throw e;}
2820 inclusionStatement = new InclusionStatement(currentSegment,
2824 currentSegment.add(inclusionStatement);
2826 jj_consume_token(SEMICOLON);
2827 } catch (ParseException e) {
2828 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2830 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2831 errorEnd = SimpleCharStream.getPosition() + 1;
2832 {if (true) throw e;}
2834 {if (true) return inclusionStatement;}
2835 throw new Error("Missing return statement in function");
2838 static final public PrintExpression PrintExpression() throws ParseException {
2839 final Expression expr;
2840 final int pos = SimpleCharStream.getPosition();
2841 jj_consume_token(PRINT);
2842 expr = Expression();
2843 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
2844 throw new Error("Missing return statement in function");
2847 static final public ListExpression ListExpression() throws ParseException {
2849 final Expression expression;
2850 final ArrayList list = new ArrayList();
2851 final int pos = SimpleCharStream.getPosition();
2852 jj_consume_token(LIST);
2854 jj_consume_token(LPAREN);
2855 } catch (ParseException e) {
2856 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2858 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2859 errorEnd = SimpleCharStream.getPosition() + 1;
2860 {if (true) throw e;}
2862 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2865 expr = VariableDeclaratorId();
2869 jj_la1[76] = jj_gen;
2872 if (expr == null) list.add(null);
2875 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2880 jj_la1[77] = jj_gen;
2884 jj_consume_token(COMMA);
2885 } catch (ParseException e) {
2886 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2888 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2889 errorEnd = SimpleCharStream.getPosition() + 1;
2890 {if (true) throw e;}
2892 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2895 expr = VariableDeclaratorId();
2899 jj_la1[78] = jj_gen;
2904 jj_consume_token(RPAREN);
2905 } catch (ParseException e) {
2906 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2908 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2909 errorEnd = SimpleCharStream.getPosition() + 1;
2910 {if (true) throw e;}
2912 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2914 jj_consume_token(ASSIGN);
2915 expression = Expression();
2916 final String[] strings = new String[list.size()];
2917 list.toArray(strings);
2918 {if (true) return new ListExpression(strings,
2921 SimpleCharStream.getPosition());}
2924 jj_la1[79] = jj_gen;
2927 final String[] strings = new String[list.size()];
2928 list.toArray(strings);
2929 {if (true) return new ListExpression(strings,pos,SimpleCharStream.getPosition());}
2930 throw new Error("Missing return statement in function");
2934 * An echo statement.
2935 * echo anyexpression (, otherexpression)*
2937 static final public EchoStatement EchoStatement() throws ParseException {
2938 final ArrayList expressions = new ArrayList();
2940 final int pos = SimpleCharStream.getPosition();
2941 jj_consume_token(ECHO);
2942 expr = Expression();
2943 expressions.add(expr);
2946 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2951 jj_la1[80] = jj_gen;
2954 jj_consume_token(COMMA);
2955 expr = Expression();
2956 expressions.add(expr);
2959 jj_consume_token(SEMICOLON);
2960 } catch (ParseException e) {
2961 if (e.currentToken.next.kind != 4) {
2962 errorMessage = "';' expected after 'echo' statement";
2964 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2965 errorEnd = SimpleCharStream.getPosition() + 1;
2966 {if (true) throw e;}
2969 final Expression[] exprs = new Expression[expressions.size()];
2970 expressions.toArray(exprs);
2971 {if (true) return new EchoStatement(exprs,pos);}
2972 throw new Error("Missing return statement in function");
2975 static final public GlobalStatement GlobalStatement() throws ParseException {
2976 final int pos = SimpleCharStream.getPosition();
2978 final ArrayList vars = new ArrayList();
2979 final GlobalStatement global;
2980 jj_consume_token(GLOBAL);
2981 expr = VariableDeclaratorId();
2985 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2990 jj_la1[81] = jj_gen;
2993 jj_consume_token(COMMA);
2994 expr = VariableDeclaratorId();
2998 jj_consume_token(SEMICOLON);
2999 final String[] strings = new String[vars.size()];
3000 vars.toArray(strings);
3001 global = new GlobalStatement(currentSegment,
3004 SimpleCharStream.getPosition());
3005 currentSegment.add(global);
3006 {if (true) return global;}
3007 } catch (ParseException e) {
3008 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3010 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3011 errorEnd = SimpleCharStream.getPosition() + 1;
3012 {if (true) throw e;}
3014 throw new Error("Missing return statement in function");
3017 static final public StaticStatement StaticStatement() throws ParseException {
3018 final int pos = SimpleCharStream.getPosition();
3019 final ArrayList vars = new ArrayList();
3020 VariableDeclaration expr;
3021 jj_consume_token(STATIC);
3022 expr = VariableDeclarator();
3023 vars.add(new String(expr.name));
3026 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3031 jj_la1[82] = jj_gen;
3034 jj_consume_token(COMMA);
3035 expr = VariableDeclarator();
3036 vars.add(new String(expr.name));
3039 jj_consume_token(SEMICOLON);
3040 final String[] strings = new String[vars.size()];
3041 vars.toArray(strings);
3042 {if (true) return new StaticStatement(strings,
3044 SimpleCharStream.getPosition());}
3045 } catch (ParseException e) {
3046 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3048 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3049 errorEnd = SimpleCharStream.getPosition() + 1;
3050 {if (true) throw e;}
3052 throw new Error("Missing return statement in function");
3055 static final public LabeledStatement LabeledStatement() throws ParseException {
3056 final int pos = SimpleCharStream.getPosition();
3058 final Statement statement;
3059 label = jj_consume_token(IDENTIFIER);
3060 jj_consume_token(COLON);
3061 statement = Statement();
3062 {if (true) return new LabeledStatement(label.image.toCharArray(),statement,pos,SimpleCharStream.getPosition());}
3063 throw new Error("Missing return statement in function");
3073 static final public Block Block() throws ParseException {
3074 final int pos = SimpleCharStream.getPosition();
3075 final ArrayList list = new ArrayList();
3076 Statement statement;
3078 jj_consume_token(LBRACE);
3079 } catch (ParseException e) {
3080 errorMessage = "'{' expected";
3082 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3083 errorEnd = SimpleCharStream.getPosition() + 1;
3084 {if (true) throw e;}
3088 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3124 case INTEGER_LITERAL:
3125 case FLOATING_POINT_LITERAL:
3126 case STRING_LITERAL:
3135 jj_la1[83] = jj_gen;
3138 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3173 case INTEGER_LITERAL:
3174 case FLOATING_POINT_LITERAL:
3175 case STRING_LITERAL:
3181 statement = BlockStatement();
3182 list.add(statement);
3185 statement = htmlBlock();
3186 list.add(statement);
3189 jj_la1[84] = jj_gen;
3190 jj_consume_token(-1);
3191 throw new ParseException();
3195 jj_consume_token(RBRACE);
3196 } catch (ParseException e) {
3197 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3199 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3200 errorEnd = SimpleCharStream.getPosition() + 1;
3201 {if (true) throw e;}
3203 final Statement[] statements = new Statement[list.size()];
3204 list.toArray(statements);
3205 {if (true) return new Block(statements,pos,SimpleCharStream.getPosition());}
3206 throw new Error("Missing return statement in function");
3209 static final public Statement BlockStatement() throws ParseException {
3210 final Statement statement;
3211 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3244 case INTEGER_LITERAL:
3245 case FLOATING_POINT_LITERAL:
3246 case STRING_LITERAL:
3252 statement = Statement();
3253 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3254 {if (true) return statement;}
3257 statement = ClassDeclaration();
3258 {if (true) return statement;}
3261 statement = MethodDeclaration();
3262 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3263 currentSegment.add((MethodDeclaration) statement);
3264 {if (true) return statement;}
3267 jj_la1[85] = jj_gen;
3268 jj_consume_token(-1);
3269 throw new ParseException();
3271 throw new Error("Missing return statement in function");
3275 * A Block statement that will not contain any 'break'
3277 static final public Statement BlockStatementNoBreak() throws ParseException {
3278 final Statement statement;
3279 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3311 case INTEGER_LITERAL:
3312 case FLOATING_POINT_LITERAL:
3313 case STRING_LITERAL:
3319 statement = StatementNoBreak();
3320 {if (true) return statement;}
3323 statement = ClassDeclaration();
3324 {if (true) return statement;}
3327 statement = MethodDeclaration();
3328 currentSegment.add((MethodDeclaration) statement);
3329 {if (true) return statement;}
3332 jj_la1[86] = jj_gen;
3333 jj_consume_token(-1);
3334 throw new ParseException();
3336 throw new Error("Missing return statement in function");
3339 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3340 final ArrayList list = new ArrayList();
3341 VariableDeclaration var;
3342 var = LocalVariableDeclarator();
3346 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3351 jj_la1[87] = jj_gen;
3354 jj_consume_token(COMMA);
3355 var = LocalVariableDeclarator();
3358 final VariableDeclaration[] vars = new VariableDeclaration[list.size()];
3360 {if (true) return vars;}
3361 throw new Error("Missing return statement in function");
3364 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3365 final String varName;
3366 Expression initializer = null;
3367 final int pos = SimpleCharStream.getPosition();
3368 varName = VariableDeclaratorId();
3369 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3371 jj_consume_token(ASSIGN);
3372 initializer = Expression();
3375 jj_la1[88] = jj_gen;
3378 if (initializer == null) {
3379 {if (true) return new VariableDeclaration(currentSegment,
3380 varName.toCharArray(),
3382 SimpleCharStream.getPosition());}
3384 {if (true) return new VariableDeclaration(currentSegment,
3385 varName.toCharArray(),
3388 throw new Error("Missing return statement in function");
3391 static final public EmptyStatement EmptyStatement() throws ParseException {
3393 jj_consume_token(SEMICOLON);
3394 pos = SimpleCharStream.getPosition();
3395 {if (true) return new EmptyStatement(pos-1,pos);}
3396 throw new Error("Missing return statement in function");
3399 static final public Expression StatementExpression() throws ParseException {
3400 final Expression expr,expr2;
3402 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3405 expr = PreIncDecExpression();
3406 {if (true) return expr;}
3413 expr = PrimaryExpression();
3414 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3429 case RSIGNEDSHIFTASSIGN:
3430 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3432 jj_consume_token(PLUS_PLUS);
3433 {if (true) return new PostfixedUnaryExpression(expr,
3434 OperatorIds.PLUS_PLUS,
3435 SimpleCharStream.getPosition());}
3438 jj_consume_token(MINUS_MINUS);
3439 {if (true) return new PostfixedUnaryExpression(expr,
3440 OperatorIds.MINUS_MINUS,
3441 SimpleCharStream.getPosition());}
3455 case RSIGNEDSHIFTASSIGN:
3456 operator = AssignmentOperator();
3457 expr2 = Expression();
3458 {if (true) return new BinaryExpression(expr,expr2,operator);}
3461 jj_la1[89] = jj_gen;
3462 jj_consume_token(-1);
3463 throw new ParseException();
3467 jj_la1[90] = jj_gen;
3470 {if (true) return expr;}
3473 jj_la1[91] = jj_gen;
3474 jj_consume_token(-1);
3475 throw new ParseException();
3477 throw new Error("Missing return statement in function");
3480 static final public SwitchStatement SwitchStatement() throws ParseException {
3481 final Expression variable;
3482 final AbstractCase[] cases;
3483 final int pos = SimpleCharStream.getPosition();
3484 jj_consume_token(SWITCH);
3486 jj_consume_token(LPAREN);
3487 } catch (ParseException e) {
3488 errorMessage = "'(' expected after 'switch'";
3490 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3491 errorEnd = SimpleCharStream.getPosition() + 1;
3492 {if (true) throw e;}
3495 variable = Expression();
3496 } catch (ParseException e) {
3497 if (errorMessage != null) {
3498 {if (true) throw e;}
3500 errorMessage = "expression expected";
3502 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3503 errorEnd = SimpleCharStream.getPosition() + 1;
3504 {if (true) throw e;}
3507 jj_consume_token(RPAREN);
3508 } catch (ParseException e) {
3509 errorMessage = "')' expected";
3511 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3512 errorEnd = SimpleCharStream.getPosition() + 1;
3513 {if (true) throw e;}
3515 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3517 cases = switchStatementBrace();
3520 cases = switchStatementColon(pos, pos + 6);
3523 jj_la1[92] = jj_gen;
3524 jj_consume_token(-1);
3525 throw new ParseException();
3527 {if (true) return new SwitchStatement(variable,cases,pos,SimpleCharStream.getPosition());}
3528 throw new Error("Missing return statement in function");
3531 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3533 final ArrayList cases = new ArrayList();
3534 jj_consume_token(LBRACE);
3537 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3543 jj_la1[93] = jj_gen;
3546 cas = switchLabel0();
3550 jj_consume_token(RBRACE);
3551 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3552 cases.toArray(abcase);
3553 {if (true) return abcase;}
3554 } catch (ParseException e) {
3555 errorMessage = "'}' expected";
3557 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3558 errorEnd = SimpleCharStream.getPosition() + 1;
3559 {if (true) throw e;}
3561 throw new Error("Missing return statement in function");
3565 * A Switch statement with : ... endswitch;
3566 * @param start the begin offset of the switch
3567 * @param end the end offset of the switch
3569 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3571 final ArrayList cases = new ArrayList();
3572 jj_consume_token(COLON);
3574 setMarker(fileToParse,
3575 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3579 "Line " + token.beginLine);
3580 } catch (CoreException e) {
3581 PHPeclipsePlugin.log(e);
3585 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3591 jj_la1[94] = jj_gen;
3594 cas = switchLabel0();
3598 jj_consume_token(ENDSWITCH);
3599 } catch (ParseException e) {
3600 errorMessage = "'endswitch' expected";
3602 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3603 errorEnd = SimpleCharStream.getPosition() + 1;
3604 {if (true) throw e;}
3607 jj_consume_token(SEMICOLON);
3608 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3609 cases.toArray(abcase);
3610 {if (true) return abcase;}
3611 } catch (ParseException e) {
3612 errorMessage = "';' expected after 'endswitch' keyword";
3614 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3615 errorEnd = SimpleCharStream.getPosition() + 1;
3616 {if (true) throw e;}
3618 throw new Error("Missing return statement in function");
3621 static final public AbstractCase switchLabel0() throws ParseException {
3622 final Expression expr;
3623 Statement statement;
3624 final ArrayList stmts = new ArrayList();
3625 final int pos = SimpleCharStream.getPosition();
3626 expr = SwitchLabel();
3629 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3664 case INTEGER_LITERAL:
3665 case FLOATING_POINT_LITERAL:
3666 case STRING_LITERAL:
3675 jj_la1[95] = jj_gen;
3678 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3712 case INTEGER_LITERAL:
3713 case FLOATING_POINT_LITERAL:
3714 case STRING_LITERAL:
3720 statement = BlockStatementNoBreak();
3721 stmts.add(statement);
3724 statement = htmlBlock();
3725 stmts.add(statement);
3728 jj_la1[96] = jj_gen;
3729 jj_consume_token(-1);
3730 throw new ParseException();
3733 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3735 statement = BreakStatement();
3736 stmts.add(statement);
3739 jj_la1[97] = jj_gen;
3742 final Statement[] stmtsArray = new Statement[stmts.size()];
3743 stmts.toArray(stmtsArray);
3744 if (expr == null) {//it's a default
3745 {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3747 {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3748 throw new Error("Missing return statement in function");
3753 * case Expression() :
3755 * @return the if it was a case and null if not
3757 static final public Expression SwitchLabel() throws ParseException {
3758 final Expression expr;
3759 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3761 token = jj_consume_token(CASE);
3763 expr = Expression();
3764 } catch (ParseException e) {
3765 if (errorMessage != null) {if (true) throw e;}
3766 errorMessage = "expression expected after 'case' keyword";
3768 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3769 errorEnd = SimpleCharStream.getPosition() + 1;
3770 {if (true) throw e;}
3773 jj_consume_token(COLON);
3774 {if (true) return expr;}
3775 } catch (ParseException e) {
3776 errorMessage = "':' expected after case expression";
3778 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3779 errorEnd = SimpleCharStream.getPosition() + 1;
3780 {if (true) throw e;}
3784 token = jj_consume_token(_DEFAULT);
3786 jj_consume_token(COLON);
3787 {if (true) return null;}
3788 } catch (ParseException e) {
3789 errorMessage = "':' expected after 'default' keyword";
3791 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3792 errorEnd = SimpleCharStream.getPosition() + 1;
3793 {if (true) throw e;}
3797 jj_la1[98] = jj_gen;
3798 jj_consume_token(-1);
3799 throw new ParseException();
3801 throw new Error("Missing return statement in function");
3804 static final public Break BreakStatement() throws ParseException {
3805 Expression expression = null;
3806 final int start = SimpleCharStream.getPosition();
3807 jj_consume_token(BREAK);
3808 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3824 case INTEGER_LITERAL:
3825 case FLOATING_POINT_LITERAL:
3826 case STRING_LITERAL:
3830 expression = Expression();
3833 jj_la1[99] = jj_gen;
3837 jj_consume_token(SEMICOLON);
3838 } catch (ParseException e) {
3839 errorMessage = "';' expected after 'break' keyword";
3841 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3842 errorEnd = SimpleCharStream.getPosition() + 1;
3843 {if (true) throw e;}
3845 {if (true) return new Break(expression, start, SimpleCharStream.getPosition());}
3846 throw new Error("Missing return statement in function");
3849 static final public IfStatement IfStatement() throws ParseException {
3850 final int pos = SimpleCharStream.getPosition();
3851 final Expression condition;
3852 final IfStatement ifStatement;
3853 jj_consume_token(IF);
3854 condition = Condition("if");
3855 ifStatement = IfStatement0(condition, pos,pos+2);
3856 {if (true) return ifStatement;}
3857 throw new Error("Missing return statement in function");
3860 static final public Expression Condition(final String keyword) throws ParseException {
3861 final Expression condition;
3863 jj_consume_token(LPAREN);
3864 } catch (ParseException e) {
3865 errorMessage = "'(' expected after " + keyword + " keyword";
3867 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length();
3868 errorEnd = errorStart +1;
3869 processParseException(e);
3871 condition = Expression();
3873 jj_consume_token(RPAREN);
3874 } catch (ParseException e) {
3875 errorMessage = "')' expected after " + keyword + " keyword";
3877 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3878 errorEnd = SimpleCharStream.getPosition() + 1;
3879 processParseException(e);
3881 {if (true) return condition;}
3882 throw new Error("Missing return statement in function");
3885 static final public IfStatement IfStatement0(final Expression condition, final int start,final int end) throws ParseException {
3886 Statement statement;
3887 final Statement stmt;
3888 final Statement[] statementsArray;
3889 ElseIf elseifStatement;
3890 Else elseStatement = null;
3891 final ArrayList stmts;
3892 final ArrayList elseIfList = new ArrayList();
3893 final ElseIf[] elseIfs;
3894 int pos = SimpleCharStream.getPosition();
3895 final int endStatements;
3896 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3898 jj_consume_token(COLON);
3899 stmts = new ArrayList();
3902 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3936 case INTEGER_LITERAL:
3937 case FLOATING_POINT_LITERAL:
3938 case STRING_LITERAL:
3947 jj_la1[100] = jj_gen;
3950 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3983 case INTEGER_LITERAL:
3984 case FLOATING_POINT_LITERAL:
3985 case STRING_LITERAL:
3991 statement = Statement();
3992 stmts.add(statement);
3995 statement = htmlBlock();
3996 stmts.add(statement);
3999 jj_la1[101] = jj_gen;
4000 jj_consume_token(-1);
4001 throw new ParseException();
4004 endStatements = SimpleCharStream.getPosition();
4007 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4012 jj_la1[102] = jj_gen;
4015 elseifStatement = ElseIfStatementColon();
4016 elseIfList.add(elseifStatement);
4018 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4020 elseStatement = ElseStatementColon();
4023 jj_la1[103] = jj_gen;
4027 setMarker(fileToParse,
4028 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4032 "Line " + token.beginLine);
4033 } catch (CoreException e) {
4034 PHPeclipsePlugin.log(e);
4037 jj_consume_token(ENDIF);
4038 } catch (ParseException e) {
4039 errorMessage = "'endif' expected";
4041 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4042 errorEnd = SimpleCharStream.getPosition() + 1;
4043 {if (true) throw e;}
4046 jj_consume_token(SEMICOLON);
4047 } catch (ParseException e) {
4048 errorMessage = "';' expected after 'endif' keyword";
4050 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4051 errorEnd = SimpleCharStream.getPosition() + 1;
4052 {if (true) throw e;}
4054 elseIfs = new ElseIf[elseIfList.size()];
4055 elseIfList.toArray(elseIfs);
4056 if (stmts.size() == 1) {
4057 {if (true) return new IfStatement(condition,
4058 (Statement) stmts.get(0),
4062 SimpleCharStream.getPosition());}
4064 statementsArray = new Statement[stmts.size()];
4065 stmts.toArray(statementsArray);
4066 {if (true) return new IfStatement(condition,
4067 new Block(statementsArray,pos,endStatements),
4071 SimpleCharStream.getPosition());}
4107 case INTEGER_LITERAL:
4108 case FLOATING_POINT_LITERAL:
4109 case STRING_LITERAL:
4115 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4148 case INTEGER_LITERAL:
4149 case FLOATING_POINT_LITERAL:
4150 case STRING_LITERAL:
4162 jj_la1[104] = jj_gen;
4163 jj_consume_token(-1);
4164 throw new ParseException();
4168 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4173 jj_la1[105] = jj_gen;
4176 elseifStatement = ElseIfStatement();
4177 elseIfList.add(elseifStatement);
4179 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4181 jj_consume_token(ELSE);
4183 pos = SimpleCharStream.getPosition();
4184 statement = Statement();
4185 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4186 } catch (ParseException e) {
4187 if (errorMessage != null) {
4188 {if (true) throw e;}
4190 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4192 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4193 errorEnd = SimpleCharStream.getPosition() + 1;
4194 {if (true) throw e;}
4198 jj_la1[106] = jj_gen;
4201 elseIfs = new ElseIf[elseIfList.size()];
4202 elseIfList.toArray(elseIfs);
4203 {if (true) return new IfStatement(condition,
4208 SimpleCharStream.getPosition());}
4211 jj_la1[107] = jj_gen;
4212 jj_consume_token(-1);
4213 throw new ParseException();
4215 throw new Error("Missing return statement in function");
4218 static final public ElseIf ElseIfStatementColon() throws ParseException {
4219 final Expression condition;
4220 Statement statement;
4221 final ArrayList list = new ArrayList();
4222 final int pos = SimpleCharStream.getPosition();
4223 jj_consume_token(ELSEIF);
4224 condition = Condition("elseif");
4225 jj_consume_token(COLON);
4228 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4262 case INTEGER_LITERAL:
4263 case FLOATING_POINT_LITERAL:
4264 case STRING_LITERAL:
4273 jj_la1[108] = jj_gen;
4276 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4309 case INTEGER_LITERAL:
4310 case FLOATING_POINT_LITERAL:
4311 case STRING_LITERAL:
4317 statement = Statement();
4318 list.add(statement);
4321 statement = htmlBlock();
4322 list.add(statement);
4325 jj_la1[109] = jj_gen;
4326 jj_consume_token(-1);
4327 throw new ParseException();
4330 final Statement[] stmtsArray = new Statement[list.size()];
4331 list.toArray(stmtsArray);
4332 {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4333 throw new Error("Missing return statement in function");
4336 static final public Else ElseStatementColon() throws ParseException {
4337 Statement statement;
4338 final ArrayList list = new ArrayList();
4339 final int pos = SimpleCharStream.getPosition();
4340 jj_consume_token(ELSE);
4341 jj_consume_token(COLON);
4344 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4378 case INTEGER_LITERAL:
4379 case FLOATING_POINT_LITERAL:
4380 case STRING_LITERAL:
4389 jj_la1[110] = jj_gen;
4392 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4425 case INTEGER_LITERAL:
4426 case FLOATING_POINT_LITERAL:
4427 case STRING_LITERAL:
4433 statement = Statement();
4434 list.add(statement);
4437 statement = htmlBlock();
4438 list.add(statement);
4441 jj_la1[111] = jj_gen;
4442 jj_consume_token(-1);
4443 throw new ParseException();
4446 final Statement[] stmtsArray = new Statement[list.size()];
4447 list.toArray(stmtsArray);
4448 {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4449 throw new Error("Missing return statement in function");
4452 static final public ElseIf ElseIfStatement() throws ParseException {
4453 final Expression condition;
4454 final Statement statement;
4455 final ArrayList list = new ArrayList();
4456 final int pos = SimpleCharStream.getPosition();
4457 jj_consume_token(ELSEIF);
4458 condition = Condition("elseif");
4459 statement = Statement();
4460 list.add(statement);/*todo:do better*/
4461 final Statement[] stmtsArray = new Statement[list.size()];
4462 list.toArray(stmtsArray);
4463 {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4464 throw new Error("Missing return statement in function");
4467 static final public WhileStatement WhileStatement() throws ParseException {
4468 final Expression condition;
4469 final Statement action;
4470 final int pos = SimpleCharStream.getPosition();
4471 jj_consume_token(WHILE);
4472 condition = Condition("while");
4473 action = WhileStatement0(pos,pos + 5);
4474 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4475 throw new Error("Missing return statement in function");
4478 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4479 Statement statement;
4480 final ArrayList stmts = new ArrayList();
4481 final int pos = SimpleCharStream.getPosition();
4482 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4484 jj_consume_token(COLON);
4487 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4520 case INTEGER_LITERAL:
4521 case FLOATING_POINT_LITERAL:
4522 case STRING_LITERAL:
4531 jj_la1[112] = jj_gen;
4534 statement = Statement();
4535 stmts.add(statement);
4538 setMarker(fileToParse,
4539 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4543 "Line " + token.beginLine);
4544 } catch (CoreException e) {
4545 PHPeclipsePlugin.log(e);
4548 jj_consume_token(ENDWHILE);
4549 } catch (ParseException e) {
4550 errorMessage = "'endwhile' expected";
4552 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4553 errorEnd = SimpleCharStream.getPosition() + 1;
4554 {if (true) throw e;}
4557 jj_consume_token(SEMICOLON);
4558 final Statement[] stmtsArray = new Statement[stmts.size()];
4559 stmts.toArray(stmtsArray);
4560 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4561 } catch (ParseException e) {
4562 errorMessage = "';' expected after 'endwhile' keyword";
4564 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4565 errorEnd = SimpleCharStream.getPosition() + 1;
4566 {if (true) throw e;}
4601 case INTEGER_LITERAL:
4602 case FLOATING_POINT_LITERAL:
4603 case STRING_LITERAL:
4609 statement = Statement();
4610 {if (true) return statement;}
4613 jj_la1[113] = jj_gen;
4614 jj_consume_token(-1);
4615 throw new ParseException();
4617 throw new Error("Missing return statement in function");
4620 static final public DoStatement DoStatement() throws ParseException {
4621 final Statement action;
4622 final Expression condition;
4623 final int pos = SimpleCharStream.getPosition();
4624 jj_consume_token(DO);
4625 action = Statement();
4626 jj_consume_token(WHILE);
4627 condition = Condition("while");
4629 jj_consume_token(SEMICOLON);
4630 {if (true) return new DoStatement(condition,action,pos,SimpleCharStream.getPosition());}
4631 } catch (ParseException e) {
4632 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4634 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4635 errorEnd = SimpleCharStream.getPosition() + 1;
4636 {if (true) throw e;}
4638 throw new Error("Missing return statement in function");
4641 static final public ForeachStatement ForeachStatement() throws ParseException {
4642 Statement statement;
4643 Expression expression;
4644 final int pos = SimpleCharStream.getPosition();
4645 ArrayVariableDeclaration variable;
4646 jj_consume_token(FOREACH);
4648 jj_consume_token(LPAREN);
4649 } catch (ParseException e) {
4650 errorMessage = "'(' expected after 'foreach' keyword";
4652 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4653 errorEnd = SimpleCharStream.getPosition() + 1;
4654 {if (true) throw e;}
4657 expression = Expression();
4658 } catch (ParseException e) {
4659 errorMessage = "variable expected";
4661 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4662 errorEnd = SimpleCharStream.getPosition() + 1;
4663 {if (true) throw e;}
4666 jj_consume_token(AS);
4667 } catch (ParseException e) {
4668 errorMessage = "'as' expected";
4670 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4671 errorEnd = SimpleCharStream.getPosition() + 1;
4672 {if (true) throw e;}
4675 variable = ArrayVariable();
4676 } catch (ParseException e) {
4677 errorMessage = "variable expected";
4679 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4680 errorEnd = SimpleCharStream.getPosition() + 1;
4681 {if (true) throw e;}
4684 jj_consume_token(RPAREN);
4685 } catch (ParseException e) {
4686 errorMessage = "')' expected after 'foreach' keyword";
4688 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4689 errorEnd = SimpleCharStream.getPosition() + 1;
4690 {if (true) throw e;}
4693 statement = Statement();
4694 } catch (ParseException e) {
4695 if (errorMessage != null) {if (true) throw e;}
4696 errorMessage = "statement expected";
4698 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4699 errorEnd = SimpleCharStream.getPosition() + 1;
4700 {if (true) throw e;}
4702 {if (true) return new ForeachStatement(expression,
4706 SimpleCharStream.getPosition());}
4707 throw new Error("Missing return statement in function");
4710 static final public ForStatement ForStatement() throws ParseException {
4712 final int pos = SimpleCharStream.getPosition();
4713 Expression[] initializations = null;
4714 Expression condition = null;
4715 Expression[] increments = null;
4717 final ArrayList list = new ArrayList();
4718 final int startBlock, endBlock;
4719 token = jj_consume_token(FOR);
4721 jj_consume_token(LPAREN);
4722 } catch (ParseException e) {
4723 errorMessage = "'(' expected after 'for' keyword";
4725 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4726 errorEnd = SimpleCharStream.getPosition() + 1;
4727 {if (true) throw e;}
4729 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4737 initializations = ForInit();
4740 jj_la1[114] = jj_gen;
4743 jj_consume_token(SEMICOLON);
4744 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4760 case INTEGER_LITERAL:
4761 case FLOATING_POINT_LITERAL:
4762 case STRING_LITERAL:
4766 condition = Expression();
4769 jj_la1[115] = jj_gen;
4772 jj_consume_token(SEMICOLON);
4773 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4781 increments = StatementExpressionList();
4784 jj_la1[116] = jj_gen;
4787 jj_consume_token(RPAREN);
4788 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4821 case INTEGER_LITERAL:
4822 case FLOATING_POINT_LITERAL:
4823 case STRING_LITERAL:
4829 action = Statement();
4830 {if (true) return new ForStatement(initializations,condition,increments,action,pos,SimpleCharStream.getPosition());}
4833 jj_consume_token(COLON);
4834 startBlock = SimpleCharStream.getPosition();
4837 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4870 case INTEGER_LITERAL:
4871 case FLOATING_POINT_LITERAL:
4872 case STRING_LITERAL:
4881 jj_la1[117] = jj_gen;
4884 action = Statement();
4888 setMarker(fileToParse,
4889 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
4891 pos+token.image.length(),
4893 "Line " + token.beginLine);
4894 } catch (CoreException e) {
4895 PHPeclipsePlugin.log(e);
4897 endBlock = SimpleCharStream.getPosition();
4899 jj_consume_token(ENDFOR);
4900 } catch (ParseException e) {
4901 errorMessage = "'endfor' expected";
4903 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4904 errorEnd = SimpleCharStream.getPosition() + 1;
4905 {if (true) throw e;}
4908 jj_consume_token(SEMICOLON);
4909 final Statement[] stmtsArray = new Statement[list.size()];
4910 list.toArray(stmtsArray);
4911 {if (true) return new ForStatement(initializations,condition,increments,new Block(stmtsArray,startBlock,endBlock),pos,SimpleCharStream.getPosition());}
4912 } catch (ParseException e) {
4913 errorMessage = "';' expected after 'endfor' keyword";
4915 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4916 errorEnd = SimpleCharStream.getPosition() + 1;
4917 {if (true) throw e;}
4921 jj_la1[118] = jj_gen;
4922 jj_consume_token(-1);
4923 throw new ParseException();
4925 throw new Error("Missing return statement in function");
4928 static final public Expression[] ForInit() throws ParseException {
4929 final Expression[] exprs;
4930 if (jj_2_8(2147483647)) {
4931 exprs = LocalVariableDeclaration();
4932 {if (true) return exprs;}
4934 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4942 exprs = StatementExpressionList();
4943 {if (true) return exprs;}
4946 jj_la1[119] = jj_gen;
4947 jj_consume_token(-1);
4948 throw new ParseException();
4951 throw new Error("Missing return statement in function");
4954 static final public Expression[] StatementExpressionList() throws ParseException {
4955 final ArrayList list = new ArrayList();
4956 final Expression expr;
4957 expr = StatementExpression();
4961 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4966 jj_la1[120] = jj_gen;
4969 jj_consume_token(COMMA);
4970 StatementExpression();
4973 final Expression[] exprsArray = new Expression[list.size()];
4974 list.toArray(exprsArray);
4975 {if (true) return exprsArray;}
4976 throw new Error("Missing return statement in function");
4979 static final public Continue ContinueStatement() throws ParseException {
4980 Expression expr = null;
4981 final int pos = SimpleCharStream.getPosition();
4982 jj_consume_token(CONTINUE);
4983 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4999 case INTEGER_LITERAL:
5000 case FLOATING_POINT_LITERAL:
5001 case STRING_LITERAL:
5005 expr = Expression();
5008 jj_la1[121] = jj_gen;
5012 jj_consume_token(SEMICOLON);
5013 {if (true) return new Continue(expr,pos,SimpleCharStream.getPosition());}
5014 } catch (ParseException e) {
5015 errorMessage = "';' expected after 'continue' statement";
5017 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5018 errorEnd = SimpleCharStream.getPosition() + 1;
5019 {if (true) throw e;}
5021 throw new Error("Missing return statement in function");
5024 static final public ReturnStatement ReturnStatement() throws ParseException {
5025 Expression expr = null;
5026 final int pos = SimpleCharStream.getPosition();
5027 jj_consume_token(RETURN);
5028 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5044 case INTEGER_LITERAL:
5045 case FLOATING_POINT_LITERAL:
5046 case STRING_LITERAL:
5050 expr = Expression();
5053 jj_la1[122] = jj_gen;
5057 jj_consume_token(SEMICOLON);
5058 {if (true) return new ReturnStatement(expr,pos,SimpleCharStream.getPosition());}
5059 } catch (ParseException e) {
5060 errorMessage = "';' expected after 'return' statement";
5062 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5063 errorEnd = SimpleCharStream.getPosition() + 1;
5064 {if (true) throw e;}
5066 throw new Error("Missing return statement in function");
5069 static final private boolean jj_2_1(int xla) {
5070 jj_la = xla; jj_lastpos = jj_scanpos = token;
5071 boolean retval = !jj_3_1();
5076 static final private boolean jj_2_2(int xla) {
5077 jj_la = xla; jj_lastpos = jj_scanpos = token;
5078 boolean retval = !jj_3_2();
5083 static final private boolean jj_2_3(int xla) {
5084 jj_la = xla; jj_lastpos = jj_scanpos = token;
5085 boolean retval = !jj_3_3();
5090 static final private boolean jj_2_4(int xla) {
5091 jj_la = xla; jj_lastpos = jj_scanpos = token;
5092 boolean retval = !jj_3_4();
5097 static final private boolean jj_2_5(int xla) {
5098 jj_la = xla; jj_lastpos = jj_scanpos = token;
5099 boolean retval = !jj_3_5();
5104 static final private boolean jj_2_6(int xla) {
5105 jj_la = xla; jj_lastpos = jj_scanpos = token;
5106 boolean retval = !jj_3_6();
5111 static final private boolean jj_2_7(int xla) {
5112 jj_la = xla; jj_lastpos = jj_scanpos = token;
5113 boolean retval = !jj_3_7();
5118 static final private boolean jj_2_8(int xla) {
5119 jj_la = xla; jj_lastpos = jj_scanpos = token;
5120 boolean retval = !jj_3_8();
5125 static final private boolean jj_3R_46() {
5130 if (jj_3R_58()) return true;
5131 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5132 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5136 static final private boolean jj_3_3() {
5137 if (jj_3R_41()) return true;
5138 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5141 if (jj_3R_42()) jj_scanpos = xsp;
5142 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5146 static final private boolean jj_3R_202() {
5147 if (jj_scan_token(MINUS_MINUS)) return true;
5148 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5152 static final private boolean jj_3R_201() {
5153 if (jj_scan_token(PLUS_PLUS)) return true;
5154 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5158 static final private boolean jj_3R_197() {
5163 if (jj_3R_202()) return true;
5164 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5165 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5169 static final private boolean jj_3R_182() {
5170 if (jj_3R_184()) return true;
5171 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5174 if (jj_3R_197()) jj_scanpos = xsp;
5175 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5179 static final private boolean jj_3R_86() {
5180 if (jj_scan_token(OBJECT)) return true;
5181 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5185 static final private boolean jj_3R_85() {
5186 if (jj_scan_token(INTEGER)) return true;
5187 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5191 static final private boolean jj_3R_84() {
5192 if (jj_scan_token(INT)) return true;
5193 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5197 static final private boolean jj_3R_83() {
5198 if (jj_scan_token(FLOAT)) return true;
5199 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5203 static final private boolean jj_3R_44() {
5204 if (jj_scan_token(ARRAY)) return true;
5205 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5209 static final private boolean jj_3R_196() {
5210 if (jj_scan_token(ARRAY)) return true;
5211 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5215 static final private boolean jj_3R_82() {
5216 if (jj_scan_token(DOUBLE)) return true;
5217 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5221 static final private boolean jj_3R_195() {
5222 if (jj_3R_54()) return true;
5223 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5227 static final private boolean jj_3R_81() {
5228 if (jj_scan_token(REAL)) return true;
5229 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5233 static final private boolean jj_3R_181() {
5234 if (jj_scan_token(LPAREN)) return true;
5235 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5240 if (jj_3R_196()) return true;
5241 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5242 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5243 if (jj_scan_token(RPAREN)) return true;
5244 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5245 if (jj_3R_154()) return true;
5246 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5250 static final private boolean jj_3R_80() {
5251 if (jj_scan_token(BOOLEAN)) return true;
5252 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5256 static final private boolean jj_3R_79() {
5257 if (jj_scan_token(BOOL)) return true;
5258 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5262 static final private boolean jj_3R_78() {
5263 if (jj_scan_token(STRING)) return true;
5264 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5268 static final private boolean jj_3R_54() {
5287 if (jj_3R_86()) return true;
5288 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5289 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5290 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5291 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5292 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5293 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5294 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5295 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5296 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5300 static final private boolean jj_3R_43() {
5301 if (jj_3R_54()) return true;
5302 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5306 static final private boolean jj_3_4() {
5307 if (jj_scan_token(LPAREN)) return true;
5308 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5313 if (jj_3R_44()) return true;
5314 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5315 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5316 if (jj_scan_token(RPAREN)) return true;
5317 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5321 static final private boolean jj_3R_180() {
5322 if (jj_scan_token(LPAREN)) return true;
5323 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5324 if (jj_3R_46()) return true;
5325 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5326 if (jj_scan_token(RPAREN)) return true;
5327 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5331 static final private boolean jj_3R_179() {
5332 if (jj_3R_183()) return true;
5333 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5337 static final private boolean jj_3R_178() {
5338 if (jj_3R_182()) return true;
5339 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5343 static final private boolean jj_3R_177() {
5344 if (jj_scan_token(BANG)) return true;
5345 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5346 if (jj_3R_154()) return true;
5347 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5351 static final private boolean jj_3R_176() {
5352 if (jj_3R_181()) return true;
5353 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5357 static final private boolean jj_3R_173() {
5368 if (jj_3R_180()) return true;
5369 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5370 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5371 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5372 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5373 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5377 static final private boolean jj_3R_175() {
5378 if (jj_scan_token(MINUS_MINUS)) return true;
5379 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5383 static final private boolean jj_3R_174() {
5384 if (jj_scan_token(PLUS_PLUS)) return true;
5385 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5389 static final private boolean jj_3R_91() {
5390 if (jj_scan_token(ASSIGN)) return true;
5391 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5392 if (jj_3R_46()) return true;
5393 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5397 static final private boolean jj_3R_172() {
5402 if (jj_3R_175()) return true;
5403 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5404 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5405 if (jj_3R_184()) return true;
5406 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5410 static final private boolean jj_3R_167() {
5411 if (jj_3R_173()) return true;
5412 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5416 static final private boolean jj_3R_166() {
5417 if (jj_3R_172()) return true;
5418 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5422 static final private boolean jj_3R_171() {
5423 if (jj_scan_token(MINUS)) return true;
5424 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5428 static final private boolean jj_3R_170() {
5429 if (jj_scan_token(PLUS)) return true;
5430 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5434 static final private boolean jj_3R_163() {
5441 if (jj_3R_167()) return true;
5442 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5443 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5444 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5448 static final private boolean jj_3R_165() {
5453 if (jj_3R_171()) return true;
5454 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5455 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5456 if (jj_3R_154()) return true;
5457 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5461 static final private boolean jj_3R_169() {
5462 if (jj_3R_163()) return true;
5463 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5467 static final private boolean jj_3R_59() {
5468 if (jj_3R_90()) return true;
5469 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5472 if (jj_3R_91()) jj_scanpos = xsp;
5473 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5477 static final private boolean jj_3R_164() {
5482 if (jj_3R_169()) return true;
5483 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5484 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5488 static final private boolean jj_3R_168() {
5489 if (jj_scan_token(AT)) return true;
5490 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5491 if (jj_3R_164()) return true;
5492 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5496 static final private boolean jj_3R_159() {
5497 if (jj_3R_164()) return true;
5498 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5502 static final private boolean jj_3R_60() {
5503 if (jj_scan_token(COMMA)) return true;
5504 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5505 if (jj_3R_59()) return true;
5506 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5510 static final private boolean jj_3R_154() {
5515 if (jj_3R_159()) return true;
5516 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5517 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5521 static final private boolean jj_3R_158() {
5522 if (jj_scan_token(BIT_AND)) return true;
5523 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5524 if (jj_3R_163()) return true;
5525 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5529 static final private boolean jj_3R_48() {
5530 if (jj_3R_59()) return true;
5531 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5535 if (jj_3R_60()) { jj_scanpos = xsp; break; }
5536 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5541 static final private boolean jj_3R_162() {
5542 if (jj_scan_token(REMAINDER)) return true;
5543 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5547 static final private boolean jj_3R_161() {
5548 if (jj_scan_token(SLASH)) return true;
5549 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5553 static final private boolean jj_3R_160() {
5554 if (jj_scan_token(STAR)) return true;
5555 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5559 static final private boolean jj_3R_155() {
5566 if (jj_3R_162()) return true;
5567 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5568 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5569 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5570 if (jj_3R_154()) return true;
5571 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5575 static final private boolean jj_3R_148() {
5576 if (jj_3R_154()) return true;
5577 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5581 if (jj_3R_155()) { jj_scanpos = xsp; break; }
5582 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5587 static final private boolean jj_3R_157() {
5588 if (jj_scan_token(MINUS)) return true;
5589 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5593 static final private boolean jj_3R_206() {
5594 if (jj_scan_token(COMMA)) return true;
5595 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5599 static final private boolean jj_3R_156() {
5600 if (jj_scan_token(PLUS)) return true;
5601 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5605 static final private boolean jj_3_2() {
5606 if (jj_scan_token(COMMA)) return true;
5607 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5608 if (jj_3R_40()) return true;
5609 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5613 static final private boolean jj_3R_149() {
5618 if (jj_3R_157()) return true;
5619 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5620 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5621 if (jj_3R_148()) return true;
5622 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5626 static final private boolean jj_3_7() {
5627 if (jj_3R_47()) return true;
5628 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5632 static final private boolean jj_3R_205() {
5633 if (jj_3R_40()) return true;
5634 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5638 if (jj_3_2()) { jj_scanpos = xsp; break; }
5639 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5644 static final private boolean jj_3R_139() {
5645 if (jj_3R_148()) return true;
5646 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5650 if (jj_3R_149()) { jj_scanpos = xsp; break; }
5651 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5656 static final private boolean jj_3R_204() {
5657 if (jj_scan_token(LPAREN)) return true;
5658 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5661 if (jj_3R_205()) jj_scanpos = xsp;
5662 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5664 if (jj_3R_206()) jj_scanpos = xsp;
5665 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5666 if (jj_scan_token(RPAREN)) return true;
5667 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5671 static final private boolean jj_3R_152() {
5672 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
5673 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5677 static final private boolean jj_3_6() {
5678 if (jj_3R_46()) return true;
5679 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5680 if (jj_scan_token(SEMICOLON)) return true;
5681 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5685 static final private boolean jj_3R_151() {
5686 if (jj_scan_token(RSIGNEDSHIFT)) return true;
5687 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5691 static final private boolean jj_3R_150() {
5692 if (jj_scan_token(LSHIFT)) return true;
5693 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5697 static final private boolean jj_3R_140() {
5704 if (jj_3R_152()) return true;
5705 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5706 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5707 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5708 if (jj_3R_139()) return true;
5709 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5713 static final private boolean jj_3R_132() {
5714 if (jj_3R_139()) return true;
5715 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5719 if (jj_3R_140()) { jj_scanpos = xsp; break; }
5720 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5725 static final private boolean jj_3R_207() {
5726 if (jj_scan_token(ARRAYASSIGN)) return true;
5727 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5728 if (jj_3R_46()) return true;
5729 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5733 static final private boolean jj_3R_40() {
5734 if (jj_3R_46()) return true;
5735 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5738 if (jj_3R_207()) jj_scanpos = xsp;
5739 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5743 static final private boolean jj_3R_144() {
5744 if (jj_scan_token(GE)) return true;
5745 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5749 static final private boolean jj_3R_143() {
5750 if (jj_scan_token(LE)) return true;
5751 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5755 static final private boolean jj_3R_142() {
5756 if (jj_scan_token(GT)) return true;
5757 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5761 static final private boolean jj_3R_141() {
5762 if (jj_scan_token(LT)) return true;
5763 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5767 static final private boolean jj_3R_133() {
5776 if (jj_3R_144()) return true;
5777 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5778 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5779 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5780 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5781 if (jj_3R_132()) return true;
5782 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5786 static final private boolean jj_3R_47() {
5787 if (jj_scan_token(IDENTIFIER)) return true;
5788 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5789 if (jj_scan_token(COLON)) return true;
5790 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5794 static final private boolean jj_3R_130() {
5795 if (jj_3R_132()) return true;
5796 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5800 if (jj_3R_133()) { jj_scanpos = xsp; break; }
5801 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5806 static final private boolean jj_3R_119() {
5807 if (jj_scan_token(COMMA)) return true;
5808 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5809 if (jj_3R_46()) return true;
5810 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5814 static final private boolean jj_3_8() {
5815 if (jj_3R_48()) return true;
5816 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5820 static final private boolean jj_3R_113() {
5821 if (jj_3R_46()) return true;
5822 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5826 if (jj_3R_119()) { jj_scanpos = xsp; break; }
5827 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5832 static final private boolean jj_3R_102() {
5833 if (jj_3R_113()) return true;
5834 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5838 static final private boolean jj_3R_138() {
5839 if (jj_scan_token(TRIPLEEQUAL)) return true;
5840 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5844 static final private boolean jj_3R_137() {
5845 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5846 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5850 static final private boolean jj_3R_125() {
5851 if (jj_scan_token(LBRACE)) return true;
5852 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5853 if (jj_3R_46()) return true;
5854 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5855 if (jj_scan_token(RBRACE)) return true;
5856 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5860 static final private boolean jj_3R_136() {
5861 if (jj_scan_token(NOT_EQUAL)) return true;
5862 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5866 static final private boolean jj_3R_135() {
5867 if (jj_scan_token(DIF)) return true;
5868 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5872 static final private boolean jj_3R_97() {
5873 if (jj_3R_54()) return true;
5874 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5878 static final private boolean jj_3R_134() {
5879 if (jj_scan_token(EQUAL_EQUAL)) return true;
5880 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5884 static final private boolean jj_3R_95() {
5885 if (jj_scan_token(DOLLAR_ID)) return true;
5886 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5890 static final private boolean jj_3R_87() {
5891 if (jj_scan_token(LPAREN)) return true;
5892 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5895 if (jj_3R_102()) jj_scanpos = xsp;
5896 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5897 if (jj_scan_token(RPAREN)) return true;
5898 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5902 static final private boolean jj_3R_131() {
5913 if (jj_3R_138()) return true;
5914 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5915 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5916 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5917 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5918 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5919 if (jj_3R_130()) return true;
5920 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5924 static final private boolean jj_3R_128() {
5925 if (jj_3R_130()) return true;
5926 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5930 if (jj_3R_131()) { jj_scanpos = xsp; break; }
5931 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5936 static final private boolean jj_3R_94() {
5937 if (jj_scan_token(DOLLAR)) return true;
5938 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5939 if (jj_3R_61()) return true;
5940 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5944 static final private boolean jj_3R_190() {
5945 if (jj_scan_token(NULL)) return true;
5946 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5950 static final private boolean jj_3R_189() {
5951 if (jj_scan_token(FALSE)) return true;
5952 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5956 static final private boolean jj_3R_188() {
5957 if (jj_scan_token(TRUE)) return true;
5958 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5962 static final private boolean jj_3R_129() {
5963 if (jj_scan_token(BIT_AND)) return true;
5964 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5965 if (jj_3R_128()) return true;
5966 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5970 static final private boolean jj_3R_187() {
5971 if (jj_scan_token(STRING_LITERAL)) return true;
5972 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5976 static final private boolean jj_3R_186() {
5977 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
5978 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5982 static final private boolean jj_3R_93() {
5983 if (jj_scan_token(IDENTIFIER)) return true;
5984 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5987 if (jj_3R_125()) jj_scanpos = xsp;
5988 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5992 static final private boolean jj_3R_123() {
5993 if (jj_3R_128()) return true;
5994 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5998 if (jj_3R_129()) { jj_scanpos = xsp; break; }
5999 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6004 static final private boolean jj_3R_185() {
6005 if (jj_scan_token(INTEGER_LITERAL)) return true;
6006 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6010 static final private boolean jj_3R_183() {
6023 if (jj_3R_190()) return true;
6024 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6025 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6026 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6027 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6028 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6029 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6033 static final private boolean jj_3R_92() {
6034 if (jj_scan_token(LBRACE)) return true;
6035 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6036 if (jj_3R_46()) return true;
6037 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6038 if (jj_scan_token(RBRACE)) return true;
6039 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6043 static final private boolean jj_3R_61() {
6052 if (jj_3R_95()) return true;
6053 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6054 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6055 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6056 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6060 static final private boolean jj_3R_96() {
6061 if (jj_3R_46()) return true;
6062 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6066 static final private boolean jj_3R_62() {
6071 if (jj_3R_97()) return true;
6072 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6073 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6077 static final private boolean jj_3R_124() {
6078 if (jj_scan_token(XOR)) return true;
6079 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6080 if (jj_3R_123()) return true;
6081 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6085 static final private boolean jj_3R_122() {
6086 if (jj_scan_token(LBRACE)) return true;
6087 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6088 if (jj_3R_46()) return true;
6089 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6090 if (jj_scan_token(RBRACE)) return true;
6091 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6095 static final private boolean jj_3R_117() {
6096 if (jj_3R_123()) return true;
6097 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6101 if (jj_3R_124()) { jj_scanpos = xsp; break; }
6102 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6107 static final private boolean jj_3R_50() {
6108 if (jj_scan_token(LBRACKET)) return true;
6109 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6112 if (jj_3R_62()) jj_scanpos = xsp;
6113 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6114 if (jj_scan_token(RBRACKET)) return true;
6115 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6119 static final private boolean jj_3R_116() {
6120 if (jj_scan_token(DOLLAR)) return true;
6121 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6122 if (jj_3R_61()) return true;
6123 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6127 static final private boolean jj_3R_118() {
6128 if (jj_scan_token(BIT_OR)) return true;
6129 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6130 if (jj_3R_117()) return true;
6131 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6135 static final private boolean jj_3R_109() {
6136 if (jj_3R_117()) return true;
6137 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6141 if (jj_3R_118()) { jj_scanpos = xsp; break; }
6142 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6147 static final private boolean jj_3R_108() {
6152 if (jj_3R_116()) return true;
6153 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6154 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6158 static final private boolean jj_3R_115() {
6159 if (jj_scan_token(DOLLAR_ID)) return true;
6160 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6163 if (jj_3R_122()) jj_scanpos = xsp;
6164 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6168 static final private boolean jj_3R_110() {
6169 if (jj_scan_token(DOT)) return true;
6170 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6171 if (jj_3R_109()) return true;
6172 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6176 static final private boolean jj_3R_39() {
6181 if (jj_3R_50()) return true;
6182 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6183 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6187 static final private boolean jj_3R_49() {
6188 if (jj_scan_token(CLASSACCESS)) return true;
6189 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6190 if (jj_3R_61()) return true;
6191 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6195 static final private boolean jj_3R_98() {
6196 if (jj_3R_109()) return true;
6197 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6201 if (jj_3R_110()) { jj_scanpos = xsp; break; }
6202 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6207 static final private boolean jj_3R_112() {
6208 if (jj_scan_token(_ANDL)) return true;
6209 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6213 static final private boolean jj_3R_105() {
6214 if (jj_3R_90()) return true;
6215 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6219 static final private boolean jj_3R_111() {
6220 if (jj_scan_token(AND_AND)) return true;
6221 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6225 static final private boolean jj_3R_104() {
6226 if (jj_3R_54()) return true;
6227 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6231 static final private boolean jj_3R_99() {
6236 if (jj_3R_112()) return true;
6237 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6238 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6239 if (jj_3R_98()) return true;
6240 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6244 static final private boolean jj_3R_88() {
6251 if (jj_3R_105()) return true;
6252 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6253 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6254 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6258 static final private boolean jj_3R_103() {
6259 if (jj_scan_token(IDENTIFIER)) return true;
6260 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6264 static final private boolean jj_3R_52() {
6265 if (jj_scan_token(HOOK)) return true;
6266 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6267 if (jj_3R_46()) return true;
6268 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6269 if (jj_scan_token(COLON)) return true;
6270 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6271 if (jj_3R_41()) return true;
6272 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6276 static final private boolean jj_3R_63() {
6277 if (jj_3R_98()) return true;
6278 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6282 if (jj_3R_99()) { jj_scanpos = xsp; break; }
6283 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6288 static final private boolean jj_3R_101() {
6289 if (jj_scan_token(_ORL)) return true;
6290 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6294 static final private boolean jj_3R_100() {
6295 if (jj_scan_token(OR_OR)) return true;
6296 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6300 static final private boolean jj_3_1() {
6301 if (jj_3R_39()) return true;
6302 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6306 static final private boolean jj_3R_147() {
6307 if (jj_scan_token(ASSIGN)) return true;
6308 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6309 if (jj_3R_46()) return true;
6310 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6314 static final private boolean jj_3R_64() {
6319 if (jj_3R_101()) return true;
6320 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6321 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6322 if (jj_3R_63()) return true;
6323 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6327 static final private boolean jj_3R_90() {
6328 if (jj_3R_108()) return true;
6329 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6333 if (jj_3_1()) { jj_scanpos = xsp; break; }
6334 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6339 static final private boolean jj_3R_51() {
6340 if (jj_3R_63()) return true;
6341 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6345 if (jj_3R_64()) { jj_scanpos = xsp; break; }
6346 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6351 static final private boolean jj_3R_153() {
6352 if (jj_3R_90()) return true;
6353 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6357 static final private boolean jj_3R_194() {
6358 if (jj_scan_token(ARRAY)) return true;
6359 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6360 if (jj_3R_204()) return true;
6361 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6365 static final private boolean jj_3R_146() {
6366 if (jj_scan_token(COMMA)) return true;
6367 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6370 if (jj_3R_153()) jj_scanpos = xsp;
6371 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6375 static final private boolean jj_3R_41() {
6376 if (jj_3R_51()) return true;
6377 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6380 if (jj_3R_52()) jj_scanpos = xsp;
6381 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6385 static final private boolean jj_3R_145() {
6386 if (jj_3R_90()) return true;
6387 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6391 static final private boolean jj_3R_77() {
6392 if (jj_scan_token(TILDEEQUAL)) return true;
6393 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6397 static final private boolean jj_3R_76() {
6398 if (jj_scan_token(DOTASSIGN)) return true;
6399 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6403 static final private boolean jj_3R_75() {
6404 if (jj_scan_token(ORASSIGN)) return true;
6405 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6409 static final private boolean jj_3R_74() {
6410 if (jj_scan_token(XORASSIGN)) return true;
6411 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6415 static final private boolean jj_3R_73() {
6416 if (jj_scan_token(ANDASSIGN)) return true;
6417 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6421 static final private boolean jj_3R_72() {
6422 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6423 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6427 static final private boolean jj_3R_57() {
6428 if (jj_scan_token(STATICCLASSACCESS)) return true;
6429 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6430 if (jj_3R_88()) return true;
6431 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6435 static final private boolean jj_3R_71() {
6436 if (jj_scan_token(LSHIFTASSIGN)) return true;
6437 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6441 static final private boolean jj_3R_56() {
6442 if (jj_3R_39()) return true;
6443 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6447 static final private boolean jj_3R_70() {
6448 if (jj_scan_token(MINUSASSIGN)) return true;
6449 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6453 static final private boolean jj_3R_45() {
6460 if (jj_3R_57()) return true;
6461 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6462 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6463 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6467 static final private boolean jj_3R_55() {
6468 if (jj_3R_87()) return true;
6469 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6473 static final private boolean jj_3R_127() {
6474 if (jj_scan_token(LIST)) return true;
6475 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6476 if (jj_scan_token(LPAREN)) return true;
6477 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6480 if (jj_3R_145()) jj_scanpos = xsp;
6481 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6484 if (jj_3R_146()) { jj_scanpos = xsp; break; }
6485 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6487 if (jj_scan_token(RPAREN)) return true;
6488 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6490 if (jj_3R_147()) jj_scanpos = xsp;
6491 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6495 static final private boolean jj_3R_69() {
6496 if (jj_scan_token(PLUSASSIGN)) return true;
6497 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6501 static final private boolean jj_3R_68() {
6502 if (jj_scan_token(REMASSIGN)) return true;
6503 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6507 static final private boolean jj_3R_67() {
6508 if (jj_scan_token(SLASHASSIGN)) return true;
6509 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6513 static final private boolean jj_3R_66() {
6514 if (jj_scan_token(STARASSIGN)) return true;
6515 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6519 static final private boolean jj_3R_53() {
6546 if (jj_3R_77()) return true;
6547 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6548 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6549 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6550 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6551 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6552 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6553 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6554 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6555 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6556 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6557 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6558 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6559 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6563 static final private boolean jj_3R_65() {
6564 if (jj_scan_token(ASSIGN)) return true;
6565 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6569 static final private boolean jj_3R_42() {
6570 if (jj_3R_53()) return true;
6571 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6572 if (jj_3R_46()) return true;
6573 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6577 static final private boolean jj_3R_126() {
6578 if (jj_scan_token(PRINT)) return true;
6579 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6580 if (jj_3R_46()) return true;
6581 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6585 static final private boolean jj_3R_200() {
6586 if (jj_3R_90()) return true;
6587 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6591 static final private boolean jj_3R_199() {
6592 if (jj_scan_token(NEW)) return true;
6593 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6594 if (jj_3R_88()) return true;
6595 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6599 static final private boolean jj_3R_121() {
6600 if (jj_3R_127()) return true;
6601 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6605 static final private boolean jj_3R_114() {
6610 if (jj_3R_121()) return true;
6611 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6612 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6616 static final private boolean jj_3R_120() {
6617 if (jj_3R_126()) return true;
6618 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6622 static final private boolean jj_3R_198() {
6623 if (jj_scan_token(IDENTIFIER)) return true;
6624 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6628 static final private boolean jj_3R_193() {
6635 if (jj_3R_200()) return true;
6636 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6637 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6638 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6642 static final private boolean jj_3R_107() {
6643 if (jj_3R_114()) return true;
6644 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6648 static final private boolean jj_3_5() {
6649 if (jj_3R_45()) return true;
6650 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6654 static final private boolean jj_3R_89() {
6659 if (jj_3R_107()) return true;
6660 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6661 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6665 static final private boolean jj_3R_106() {
6666 if (jj_scan_token(BANG)) return true;
6667 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6668 if (jj_3R_89()) return true;
6669 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6673 static final private boolean jj_3R_192() {
6674 if (jj_3R_194()) return true;
6675 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6679 static final private boolean jj_3R_203() {
6680 if (jj_3R_45()) return true;
6681 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6685 static final private boolean jj_3R_58() {
6686 if (jj_3R_89()) return true;
6687 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6691 static final private boolean jj_3R_191() {
6692 if (jj_3R_193()) return true;
6693 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6697 if (jj_3R_203()) { jj_scanpos = xsp; break; }
6698 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6703 static final private boolean jj_3R_184() {
6708 if (jj_3R_192()) return true;
6709 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6710 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6714 static private boolean jj_initialized_once = false;
6715 static public PHPParserTokenManager token_source;
6716 static SimpleCharStream jj_input_stream;
6717 static public Token token, jj_nt;
6718 static private int jj_ntk;
6719 static private Token jj_scanpos, jj_lastpos;
6720 static private int jj_la;
6721 static public boolean lookingAhead = false;
6722 static private boolean jj_semLA;
6723 static private int jj_gen;
6724 static final private int[] jj_la1 = new int[123];
6725 static private int[] jj_la1_0;
6726 static private int[] jj_la1_1;
6727 static private int[] jj_la1_2;
6728 static private int[] jj_la1_3;
6729 static private int[] jj_la1_4;
6737 private static void jj_la1_0() {
6738 jj_la1_0 = new int[] {0xf960001e,0x6,0x6,0xf960001e,0x0,0xf9600000,0x0,0xc00000,0xc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x68000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x60000000,0x60000000,0x60000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x8000000,0x0,0x8000000,0x0,0x8000000,0x8000000,0x0,0x0,0x8000000,0x0,0x0,0x8000000,0x0,0x68000000,0x68000000,0x0,0x0,0x68000000,0x0,0x0,0x89000000,0xf9000000,0x8,0x6,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf9600010,0xf9600010,0xf9600000,0xe9600000,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x0,0xe9600010,0xe9600010,0x10000000,0x0,0x68000000,0xf9000010,0xf9000010,0x2000000,0x4000000,0xf9000010,0x2000000,0x4000000,0xf9000010,0xf9000010,0xf9000010,0xf9000010,0xf9000010,0xf9000000,0xf9000000,0x8000000,0x68000000,0x8000000,0xf9000000,0xf9000000,0x8000000,0x0,0x68000000,0x68000000,};
6740 private static void jj_la1_1() {
6741 jj_la1_1 = new int[] {0x875d507f,0x0,0x0,0x875d507f,0x0,0x875d507f,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3080000,0x200,0x30c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30c0000,0x30c0000,0x0,0x30c0000,0x0,0x30c0000,0x0,0x0,0x0,0x40000,0x40000,0x180,0x40000,0x0,0x30c0000,0x30c0000,0x80,0x3080000,0x30c0000,0x0,0x0,0x8455507f,0x875d507f,0x0,0x0,0xf,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x0,0x0,0x0,0x0,0x40000,0x0,0x2400,0x2400,0x875d507f,0x875d507f,0x0,0x2400,0x30c0000,0x875d507f,0x875d507f,0x0,0x0,0x875d507f,0x0,0x0,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x40000,0x30c0000,0x40000,0x875d507f,0x875d507f,0x40000,0x0,0x30c0000,0x30c0000,};
6743 private static void jj_la1_2() {
6744 jj_la1_2 = new int[] {0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x13c1c00,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x800,0x0,0x0,0x300000,0x0,0x13c1c00,0x0,0x1000000,0x0,0x1000800,0x1000000,0x3fe,0x0,0x1000,0x1000,0x0,0x0,0x4000,0x80010000,0x80010000,0x20000,0x20000,0x0,0x2000000,0x4000000,0x1000000,0x0,0x0,0x0,0x0,0x70000000,0x70000000,0x300000,0x300000,0x8c00000,0x8c00000,0x13c1c00,0x3c1c00,0x300000,0x3c1800,0xc0000,0x1800,0x3fe,0xc0000,0xc0000,0x800,0x800,0x0,0x800,0xbfe,0x13c1ffe,0x13c1ffe,0x0,0x0,0x13c1c00,0x0,0x400,0xc0c00,0x13c1c00,0x0,0x0,0x0,0x800,0x0,0x800,0x0,0x0,0x0,0x0,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x0,0x0,0xc0000,0xc0000,0xc0800,0x8000,0x0,0x0,0x13c1c00,0x13c1c00,0x0,0x0,0x13c1c00,0x13c1c00,0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x0,0x13c9c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c9c00,0xc0800,0x13c1c00,0xc0800,0x13c1c00,0x13c9c00,0xc0800,0x0,0x13c1c00,0x13c1c00,};
6746 private static void jj_la1_3() {
6747 jj_la1_3 = new int[] {0x2288a2,0x0,0x0,0x2288a2,0x200000,0x2288a2,0x0,0x0,0x0,0x400000,0x0,0x20000,0x0,0x20000,0x20800,0x22,0x22,0x8a2,0x0,0x88a2,0x400000,0x0,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x800000,0x0,0x0,0x0,0xe4000000,0xe4000000,0x1b000000,0x1b000000,0x0,0x0,0x0,0x0,0x0,0x0,0x88a2,0x88a2,0x0,0x88a2,0x0,0x88a2,0x0,0x0,0x0,0x800,0x800,0x88000,0x800,0x800,0x88a2,0x88a2,0x80000,0xa2,0x88a2,0x400000,0x0,0x220800,0x2288a2,0x0,0x0,0x0,0x0,0x400000,0x0,0x0,0x400000,0x400000,0x400000,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x400000,0x0,0x0,0x0,0x800,0x20000,0x0,0x0,0x2288a2,0x2288a2,0x0,0x0,0x88a2,0x2288a2,0x2288a2,0x0,0x0,0x2288a2,0x0,0x0,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x800,0x88a2,0x800,0x2288a2,0x2288a2,0x800,0x400000,0x88a2,0x88a2,};
6749 private static void jj_la1_4() {
6750 jj_la1_4 = new int[] {0x4000,0x0,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x2,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x0,0x3ffe,0x0,0x0,0x0,0x3ffe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x4000,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x4000,0x4000,0x0,0x4000,0x4000,0x4000,0x4000,0x0,0x0,0x4000,0x0,0x0,0x4000,0x4000,0x0,0x0,0x0,0x4000,0x0,0x4000,0x2,0x0,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x0,0x2,0x3ffe,0x3ffe,0x4000,0x0,0x0,0x0,0x4000,0x4000,0x0,0x0,0x4000,0x4000,0x4000,0x0,0x0,0x4000,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x0,0x4000,0x4000,};
6752 static final private JJCalls[] jj_2_rtns = new JJCalls[8];
6753 static private boolean jj_rescan = false;
6754 static private int jj_gc = 0;
6756 public PHPParser(java.io.InputStream stream) {
6757 if (jj_initialized_once) {
6758 System.out.println("ERROR: Second call to constructor of static parser. You must");
6759 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6760 System.out.println(" during parser generation.");
6763 jj_initialized_once = true;
6764 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6765 token_source = new PHPParserTokenManager(jj_input_stream);
6766 token = new Token();
6769 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6770 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6773 static public void ReInit(java.io.InputStream stream) {
6774 jj_input_stream.ReInit(stream, 1, 1);
6775 token_source.ReInit(jj_input_stream);
6776 token = new Token();
6779 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6780 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6783 public PHPParser(java.io.Reader stream) {
6784 if (jj_initialized_once) {
6785 System.out.println("ERROR: Second call to constructor of static parser. You must");
6786 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6787 System.out.println(" during parser generation.");
6790 jj_initialized_once = true;
6791 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6792 token_source = new PHPParserTokenManager(jj_input_stream);
6793 token = new Token();
6796 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6797 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6800 static public void ReInit(java.io.Reader stream) {
6801 jj_input_stream.ReInit(stream, 1, 1);
6802 token_source.ReInit(jj_input_stream);
6803 token = new Token();
6806 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6807 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6810 public PHPParser(PHPParserTokenManager tm) {
6811 if (jj_initialized_once) {
6812 System.out.println("ERROR: Second call to constructor of static parser. You must");
6813 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6814 System.out.println(" during parser generation.");
6817 jj_initialized_once = true;
6819 token = new Token();
6822 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6823 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6826 public void ReInit(PHPParserTokenManager tm) {
6828 token = new Token();
6831 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6832 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6835 static final private Token jj_consume_token(int kind) throws ParseException {
6837 if ((oldToken = token).next != null) token = token.next;
6838 else token = token.next = token_source.getNextToken();
6840 if (token.kind == kind) {
6842 if (++jj_gc > 100) {
6844 for (int i = 0; i < jj_2_rtns.length; i++) {
6845 JJCalls c = jj_2_rtns[i];
6847 if (c.gen < jj_gen) c.first = null;
6856 throw generateParseException();
6859 static final private boolean jj_scan_token(int kind) {
6860 if (jj_scanpos == jj_lastpos) {
6862 if (jj_scanpos.next == null) {
6863 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
6865 jj_lastpos = jj_scanpos = jj_scanpos.next;
6868 jj_scanpos = jj_scanpos.next;
6871 int i = 0; Token tok = token;
6872 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
6873 if (tok != null) jj_add_error_token(kind, i);
6875 return (jj_scanpos.kind != kind);
6878 static final public Token getNextToken() {
6879 if (token.next != null) token = token.next;
6880 else token = token.next = token_source.getNextToken();
6886 static final public Token getToken(int index) {
6887 Token t = lookingAhead ? jj_scanpos : token;
6888 for (int i = 0; i < index; i++) {
6889 if (t.next != null) t = t.next;
6890 else t = t.next = token_source.getNextToken();
6895 static final private int jj_ntk() {
6896 if ((jj_nt=token.next) == null)
6897 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
6899 return (jj_ntk = jj_nt.kind);
6902 static private java.util.Vector jj_expentries = new java.util.Vector();
6903 static private int[] jj_expentry;
6904 static private int jj_kind = -1;
6905 static private int[] jj_lasttokens = new int[100];
6906 static private int jj_endpos;
6908 static private void jj_add_error_token(int kind, int pos) {
6909 if (pos >= 100) return;
6910 if (pos == jj_endpos + 1) {
6911 jj_lasttokens[jj_endpos++] = kind;
6912 } else if (jj_endpos != 0) {
6913 jj_expentry = new int[jj_endpos];
6914 for (int i = 0; i < jj_endpos; i++) {
6915 jj_expentry[i] = jj_lasttokens[i];
6917 boolean exists = false;
6918 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
6919 int[] oldentry = (int[])(enum.nextElement());
6920 if (oldentry.length == jj_expentry.length) {
6922 for (int i = 0; i < jj_expentry.length; i++) {
6923 if (oldentry[i] != jj_expentry[i]) {
6931 if (!exists) jj_expentries.addElement(jj_expentry);
6932 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
6936 static public ParseException generateParseException() {
6937 jj_expentries.removeAllElements();
6938 boolean[] la1tokens = new boolean[143];
6939 for (int i = 0; i < 143; i++) {
6940 la1tokens[i] = false;
6943 la1tokens[jj_kind] = true;
6946 for (int i = 0; i < 123; i++) {
6947 if (jj_la1[i] == jj_gen) {
6948 for (int j = 0; j < 32; j++) {
6949 if ((jj_la1_0[i] & (1<<j)) != 0) {
6950 la1tokens[j] = true;
6952 if ((jj_la1_1[i] & (1<<j)) != 0) {
6953 la1tokens[32+j] = true;
6955 if ((jj_la1_2[i] & (1<<j)) != 0) {
6956 la1tokens[64+j] = true;
6958 if ((jj_la1_3[i] & (1<<j)) != 0) {
6959 la1tokens[96+j] = true;
6961 if ((jj_la1_4[i] & (1<<j)) != 0) {
6962 la1tokens[128+j] = true;
6967 for (int i = 0; i < 143; i++) {
6969 jj_expentry = new int[1];
6971 jj_expentries.addElement(jj_expentry);
6976 jj_add_error_token(0, 0);
6977 int[][] exptokseq = new int[jj_expentries.size()][];
6978 for (int i = 0; i < jj_expentries.size(); i++) {
6979 exptokseq[i] = (int[])jj_expentries.elementAt(i);
6981 return new ParseException(token, exptokseq, tokenImage);
6984 static final public void enable_tracing() {
6987 static final public void disable_tracing() {
6990 static final private void jj_rescan_token() {
6992 for (int i = 0; i < 8; i++) {
6993 JJCalls p = jj_2_rtns[i];
6995 if (p.gen > jj_gen) {
6996 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
6998 case 0: jj_3_1(); break;
6999 case 1: jj_3_2(); break;
7000 case 2: jj_3_3(); break;
7001 case 3: jj_3_4(); break;
7002 case 4: jj_3_5(); break;
7003 case 5: jj_3_6(); break;
7004 case 6: jj_3_7(); break;
7005 case 7: jj_3_8(); break;
7009 } while (p != null);
7014 static final private void jj_save(int index, int xla) {
7015 JJCalls p = jj_2_rtns[index];
7016 while (p.gen > jj_gen) {
7017 if (p.next == null) { p = p.next = new JJCalls(); break; }
7020 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7023 static final class JJCalls {