1 /* Generated By:JavaCC: Do not edit this line. PHPParser.java */
4 import org.eclipse.core.resources.IFile;
5 import org.eclipse.core.resources.IMarker;
6 import org.eclipse.core.runtime.CoreException;
7 import org.eclipse.ui.texteditor.MarkerUtilities;
8 import org.eclipse.jface.preference.IPreferenceStore;
10 import java.util.Hashtable;
11 import java.util.ArrayList;
12 import java.io.StringReader;
14 import java.text.MessageFormat;
16 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
17 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
18 import net.sourceforge.phpdt.internal.compiler.ast.*;
19 import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
20 import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
21 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
22 import net.sourceforge.phpdt.internal.corext.Assert;
26 * This php parser is inspired by the Java 1.2 grammar example
27 * given with JavaCC. You can get JavaCC at http://www.webgain.com
28 * You can test the parser with the PHPParserTestCase2.java
29 * @author Matthieu Casanova
31 public final class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
33 /** The current segment. */
34 private static OutlineableWithChildren currentSegment;
36 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
37 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
38 static PHPOutlineInfo outlineInfo;
40 /** The error level of the current ParseException. */
41 private static int errorLevel = ERROR;
42 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
43 private static String errorMessage;
45 private static int errorStart = -1;
46 private static int errorEnd = -1;
47 private static PHPDocument phpDocument;
49 private static final char[] SYNTAX_ERROR_CHAR = {'s','y','n','t','a','x',' ','e','r','r','o','r'};
51 * The point where html starts.
52 * It will be used by the token manager to create HTMLCode objects
54 public static int htmlStart;
57 private final static int AstStackIncrement = 100;
58 /** The stack of node. */
59 private static AstNode[] nodes;
60 /** The cursor in expression stack. */
61 private static int nodePtr;
63 private static final boolean PARSER_DEBUG = false;
65 public final void setFileToParse(final IFile fileToParse) {
66 PHPParser.fileToParse = fileToParse;
72 public PHPParser(final IFile fileToParse) {
73 this(new StringReader(""));
74 PHPParser.fileToParse = fileToParse;
77 public static final void phpParserTester(final String strEval) throws ParseException {
78 final StringReader stream = new StringReader(strEval);
79 if (jj_input_stream == null) {
80 jj_input_stream = new SimpleCharStream(stream, 1, 1);
82 ReInit(new StringReader(strEval));
84 phpDocument = new PHPDocument(null,"_root".toCharArray());
85 currentSegment = phpDocument;
86 outlineInfo = new PHPOutlineInfo(null, currentSegment);
87 PHPParserTokenManager.SwitchTo(PHPParserTokenManager.PHPPARSING);
91 public static final void htmlParserTester(final File fileName) throws FileNotFoundException, ParseException {
92 final Reader stream = new FileReader(fileName);
93 if (jj_input_stream == null) {
94 jj_input_stream = new SimpleCharStream(stream, 1, 1);
98 phpDocument = new PHPDocument(null,"_root".toCharArray());
99 currentSegment = phpDocument;
100 outlineInfo = new PHPOutlineInfo(null, currentSegment);
104 public static final void htmlParserTester(final String strEval) throws ParseException {
105 final StringReader stream = new StringReader(strEval);
106 if (jj_input_stream == null) {
107 jj_input_stream = new SimpleCharStream(stream, 1, 1);
111 phpDocument = new PHPDocument(null,"_root".toCharArray());
112 currentSegment = phpDocument;
113 outlineInfo = new PHPOutlineInfo(null, currentSegment);
118 * Reinitialize the parser.
120 private static final void init() {
121 nodes = new AstNode[AstStackIncrement];
127 * Add an php node on the stack.
128 * @param node the node that will be added to the stack
130 private static final void pushOnAstNodes(final AstNode node) {
132 nodes[++nodePtr] = node;
133 } catch (IndexOutOfBoundsException e) {
134 final int oldStackLength = nodes.length;
135 final AstNode[] oldStack = nodes;
136 nodes = new AstNode[oldStackLength + AstStackIncrement];
137 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
138 nodePtr = oldStackLength;
139 nodes[nodePtr] = node;
143 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
144 phpDocument = new PHPDocument(parent,"_root".toCharArray());
145 currentSegment = phpDocument;
146 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
147 final StringReader stream = new StringReader(s);
148 if (jj_input_stream == null) {
149 jj_input_stream = new SimpleCharStream(stream, 1, 1);
155 phpDocument.nodes = new AstNode[nodes.length];
156 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
157 if (PHPeclipsePlugin.DEBUG) {
158 PHPeclipsePlugin.log(1,phpDocument.toString());
160 } catch (ParseException e) {
161 processParseException(e);
166 private static void processParseExceptionDebug(final ParseException e) throws ParseException {
170 processParseException(e);
173 * This method will process the parse exception.
174 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
175 * @param e the ParseException
177 private static void processParseException(final ParseException e) {
178 if (errorMessage == null) {
179 PHPeclipsePlugin.log(e);
180 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
181 errorStart = e.currentToken.sourceStart;
182 errorEnd = e.currentToken.sourceEnd;
186 // if (PHPeclipsePlugin.DEBUG) PHPeclipsePlugin.log(e);
190 * Create marker for the parse error.
191 * @param e the ParseException
193 private static void setMarker(final ParseException e) {
195 if (errorStart == -1) {
196 setMarker(fileToParse,
198 SimpleCharStream.tokenBegin,
199 SimpleCharStream.tokenBegin + e.currentToken.image.length(),
201 "Line " + e.currentToken.beginLine);
203 setMarker(fileToParse,
208 "Line " + e.currentToken.beginLine);
212 } catch (CoreException e2) {
213 PHPeclipsePlugin.log(e2);
217 private static void scanLine(final String output,
220 final int brIndx) throws CoreException {
222 final StringBuffer lineNumberBuffer = new StringBuffer(10);
224 current = output.substring(indx, brIndx);
226 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
227 final int onLine = current.indexOf("on line <b>");
229 lineNumberBuffer.delete(0, lineNumberBuffer.length());
230 for (int i = onLine; i < current.length(); i++) {
231 ch = current.charAt(i);
232 if ('0' <= ch && '9' >= ch) {
233 lineNumberBuffer.append(ch);
237 final int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
239 final Hashtable attributes = new Hashtable();
241 current = current.replaceAll("\n", "");
242 current = current.replaceAll("<b>", "");
243 current = current.replaceAll("</b>", "");
244 MarkerUtilities.setMessage(attributes, current);
246 if (current.indexOf(PARSE_ERROR_STRING) != -1)
247 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
248 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
249 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
251 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
252 MarkerUtilities.setLineNumber(attributes, lineNumber);
253 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
258 public final void parse(final String s) {
259 final StringReader stream = new StringReader(s);
260 if (jj_input_stream == null) {
261 jj_input_stream = new SimpleCharStream(stream, 1, 1);
267 } catch (ParseException e) {
268 processParseException(e);
273 * Call the php parse command ( php -l -f <filename> )
274 * and create markers according to the external parser output
276 public static void phpExternalParse(final IFile file) {
277 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
278 final String filename = file.getLocation().toString();
280 final String[] arguments = { filename };
281 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
282 final String command = form.format(arguments);
284 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
287 // parse the buffer to find the errors and warnings
288 createMarkers(parserResult, file);
289 } catch (CoreException e) {
290 PHPeclipsePlugin.log(e);
295 * Put a new html block in the stack.
297 public static final void createNewHTMLCode() {
298 final int currentPosition = SimpleCharStream.getPosition();
299 if (currentPosition == htmlStart || currentPosition > SimpleCharStream.currentBuffer.length()) {
302 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray();
303 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
306 /** Create a new task. */
307 public static final void createNewTask() {
308 final int currentPosition = SimpleCharStream.getPosition();
309 final String todo = SimpleCharStream.currentBuffer.substring(currentPosition-3,
310 SimpleCharStream.currentBuffer.indexOf("\n",
312 PHPeclipsePlugin.log(1,SimpleCharStream.currentBuffer.toString());
314 setMarker(fileToParse,
316 SimpleCharStream.getBeginLine(),
318 "Line "+SimpleCharStream.getBeginLine());
319 } catch (CoreException e) {
320 PHPeclipsePlugin.log(e);
324 private static final void parse() throws ParseException {
328 static final public void phpTest() throws ParseException {
333 static final public void phpFile() throws ParseException {
337 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
375 case INTEGER_LITERAL:
376 case FLOATING_POINT_LITERAL:
391 PHPParser.createNewHTMLCode();
392 } catch (TokenMgrError e) {
393 PHPeclipsePlugin.log(e);
394 errorStart = SimpleCharStream.getPosition();
395 errorEnd = errorStart + 1;
396 errorMessage = e.getMessage();
398 {if (true) throw generateParseException();}
403 * A php block is a <?= expression [;]?>
404 * or <?php somephpcode ?>
405 * or <? somephpcode ?>
407 static final public void PhpBlock() throws ParseException {
408 final int start = SimpleCharStream.getPosition();
409 final PHPEchoBlock phpEchoBlock;
410 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
412 phpEchoBlock = phpEchoBlock();
413 pushOnAstNodes(phpEchoBlock);
451 case INTEGER_LITERAL:
452 case FLOATING_POINT_LITERAL:
459 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
462 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
464 jj_consume_token(PHPSTARTLONG);
467 jj_consume_token(PHPSTARTSHORT);
469 setMarker(fileToParse,
470 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
472 SimpleCharStream.getPosition(),
474 "Line " + token.beginLine);
475 } catch (CoreException e) {
476 PHPeclipsePlugin.log(e);
481 jj_consume_token(-1);
482 throw new ParseException();
491 jj_consume_token(PHPEND);
492 } catch (ParseException e) {
493 errorMessage = "'?>' expected";
495 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
496 errorEnd = SimpleCharStream.getPosition() + 1;
497 processParseExceptionDebug(e);
502 jj_consume_token(-1);
503 throw new ParseException();
507 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
508 final Expression expr;
509 final int pos = SimpleCharStream.getPosition();
510 final PHPEchoBlock echoBlock;
511 jj_consume_token(PHPECHOSTART);
513 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
515 jj_consume_token(SEMICOLON);
521 jj_consume_token(PHPEND);
522 echoBlock = new PHPEchoBlock(expr,pos,SimpleCharStream.getPosition());
523 pushOnAstNodes(echoBlock);
524 {if (true) return echoBlock;}
525 throw new Error("Missing return statement in function");
528 static final public void Php() throws ParseException {
531 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
565 case INTEGER_LITERAL:
566 case FLOATING_POINT_LITERAL:
583 static final public ClassDeclaration ClassDeclaration() throws ParseException {
584 final ClassDeclaration classDeclaration;
585 final Token className,superclassName;
587 char[] classNameImage = SYNTAX_ERROR_CHAR;
588 char[] superclassNameImage = null;
589 jj_consume_token(CLASS);
590 pos = SimpleCharStream.getPosition();
592 className = jj_consume_token(IDENTIFIER);
593 classNameImage = className.image.toCharArray();
594 } catch (ParseException e) {
595 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
597 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
598 errorEnd = SimpleCharStream.getPosition() + 1;
599 processParseExceptionDebug(e);
601 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
603 jj_consume_token(EXTENDS);
605 superclassName = jj_consume_token(IDENTIFIER);
606 superclassNameImage = superclassName.image.toCharArray();
607 } catch (ParseException e) {
608 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
610 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
611 errorEnd = SimpleCharStream.getPosition() + 1;
612 processParseExceptionDebug(e);
613 superclassNameImage = SYNTAX_ERROR_CHAR;
620 if (superclassNameImage == null) {
621 classDeclaration = new ClassDeclaration(currentSegment,
626 classDeclaration = new ClassDeclaration(currentSegment,
632 currentSegment.add(classDeclaration);
633 currentSegment = classDeclaration;
634 ClassBody(classDeclaration);
635 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
636 classDeclaration.sourceEnd = SimpleCharStream.getPosition();
637 pushOnAstNodes(classDeclaration);
638 {if (true) return classDeclaration;}
639 throw new Error("Missing return statement in function");
642 static final public void ClassBody(final ClassDeclaration classDeclaration) throws ParseException {
644 jj_consume_token(LBRACE);
645 } catch (ParseException e) {
646 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "'. '{' expected";
648 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
649 errorEnd = SimpleCharStream.getPosition() + 1;
650 processParseExceptionDebug(e);
654 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
663 ClassBodyDeclaration(classDeclaration);
666 jj_consume_token(RBRACE);
667 } catch (ParseException e) {
668 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. 'var', 'function' or '}' expected";
670 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
671 errorEnd = SimpleCharStream.getPosition() + 1;
672 processParseExceptionDebug(e);
677 * A class can contain only methods and fields.
679 static final public void ClassBodyDeclaration(final ClassDeclaration classDeclaration) throws ParseException {
680 final MethodDeclaration method;
681 final FieldDeclaration field;
682 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
684 method = MethodDeclaration();
685 method.analyzeCode();
686 classDeclaration.addMethod(method);
689 field = FieldDeclaration();
690 classDeclaration.addField(field);
694 jj_consume_token(-1);
695 throw new ParseException();
700 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
701 * it is only used by ClassBodyDeclaration()
703 static final public FieldDeclaration FieldDeclaration() throws ParseException {
704 VariableDeclaration variableDeclaration;
705 final VariableDeclaration[] list;
706 final ArrayList arrayList = new ArrayList();
707 final int pos = SimpleCharStream.getPosition();
708 jj_consume_token(VAR);
709 variableDeclaration = VariableDeclaratorNoSuffix();
710 arrayList.add(variableDeclaration);
711 outlineInfo.addVariable(new String(variableDeclaration.name()));
714 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
722 jj_consume_token(COMMA);
723 variableDeclaration = VariableDeclaratorNoSuffix();
724 arrayList.add(variableDeclaration);
725 outlineInfo.addVariable(new String(variableDeclaration.name()));
728 jj_consume_token(SEMICOLON);
729 } catch (ParseException e) {
730 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
732 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
733 errorEnd = SimpleCharStream.getPosition() + 1;
734 processParseExceptionDebug(e);
736 list = new VariableDeclaration[arrayList.size()];
737 arrayList.toArray(list);
738 {if (true) return new FieldDeclaration(list,
740 SimpleCharStream.getPosition(),
742 throw new Error("Missing return statement in function");
746 * a strict variable declarator : there cannot be a suffix here.
747 * It will be used by fields and formal parameters
749 static final public VariableDeclaration VariableDeclaratorNoSuffix() throws ParseException {
751 Expression initializer = null;
752 varName = jj_consume_token(DOLLAR_ID);
753 final int pos = SimpleCharStream.getPosition()-varName.image.length();
754 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
756 jj_consume_token(ASSIGN);
758 initializer = VariableInitializer();
759 } catch (ParseException e) {
760 errorMessage = "Literal expression expected in variable initializer";
762 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
763 errorEnd = SimpleCharStream.getPosition() + 1;
764 processParseExceptionDebug(e);
771 if (initializer == null) {
772 {if (true) return new VariableDeclaration(currentSegment,
773 new Variable(varName.image.substring(1),
777 SimpleCharStream.getPosition());}
779 {if (true) return new VariableDeclaration(currentSegment,
780 new Variable(varName.image.substring(1),
784 VariableDeclaration.EQUAL,
786 throw new Error("Missing return statement in function");
790 * this will be used by static statement
792 static final public VariableDeclaration VariableDeclarator() throws ParseException {
793 final AbstractVariable variable;
794 Expression initializer = null;
795 final int pos = SimpleCharStream.getPosition();
796 variable = VariableDeclaratorId();
797 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
799 jj_consume_token(ASSIGN);
801 initializer = VariableInitializer();
802 } catch (ParseException e) {
803 errorMessage = "Literal expression expected in variable initializer";
805 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
806 errorEnd = SimpleCharStream.getPosition() + 1;
807 processParseExceptionDebug(e);
814 if (initializer == null) {
815 {if (true) return new VariableDeclaration(currentSegment,
818 SimpleCharStream.getPosition());}
820 {if (true) return new VariableDeclaration(currentSegment,
823 VariableDeclaration.EQUAL,
825 throw new Error("Missing return statement in function");
830 * @return the variable name (with suffix)
832 static final public AbstractVariable VariableDeclaratorId() throws ParseException {
834 AbstractVariable expression = null;
835 final int pos = SimpleCharStream.getPosition();
845 expression = VariableSuffix(var);
847 if (expression == null) {
848 {if (true) return var;}
850 {if (true) return expression;}
851 } catch (ParseException e) {
852 errorMessage = "'$' expected for variable identifier";
854 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
855 errorEnd = SimpleCharStream.getPosition() + 1;
858 throw new Error("Missing return statement in function");
862 * Return a variablename without the $.
863 * @return a variable name
865 static final public Variable Variable() throws ParseException {
866 final StringBuffer buff;
867 Expression expression = null;
871 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
873 token = jj_consume_token(DOLLAR_ID);
874 pos = SimpleCharStream.getPosition()-token.image.length();
875 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
877 jj_consume_token(LBRACE);
878 expression = Expression();
879 jj_consume_token(RBRACE);
885 if (expression == null) {
886 {if (true) return new Variable(token.image.substring(1),token.sourceStart,token.sourceEnd);}
888 String s = expression.toStringExpression();
889 buff = new StringBuffer(token.image.length()+s.length()+2);
890 buff.append(token.image);
895 {if (true) return new Variable(s,token.sourceStart,token.sourceEnd);}
898 token = jj_consume_token(DOLLAR);
899 expr = VariableName();
900 {if (true) return new Variable(expr,token.sourceStart,expr.sourceEnd);}
904 jj_consume_token(-1);
905 throw new ParseException();
907 throw new Error("Missing return statement in function");
911 * A Variable name (without the $)
912 * @return a variable name String
914 static final public Variable VariableName() throws ParseException {
915 final StringBuffer buff;
918 Expression expression = null;
922 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
924 token = jj_consume_token(LBRACE);
925 pos = SimpleCharStream.getPosition()-1;
926 expression = Expression();
927 token2 = jj_consume_token(RBRACE);
928 expr = expression.toStringExpression();
929 buff = new StringBuffer(expr.length()+2);
933 pos = SimpleCharStream.getPosition();
934 expr = buff.toString();
935 {if (true) return new Variable(expr,
940 token = jj_consume_token(IDENTIFIER);
941 pos = SimpleCharStream.getPosition() - token.image.length();
942 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
944 jj_consume_token(LBRACE);
945 expression = Expression();
946 token2 = jj_consume_token(RBRACE);
952 if (expression == null) {
953 {if (true) return new Variable(token.image,
957 expr = expression.toStringExpression();
958 buff = new StringBuffer(token.image.length()+expr.length()+2);
959 buff.append(token.image);
963 expr = buff.toString();
964 {if (true) return new Variable(expr,
969 jj_consume_token(DOLLAR);
970 var = VariableName();
971 {if (true) return new Variable(var,
976 token = jj_consume_token(DOLLAR_ID);
977 {if (true) return new Variable(token.image,
983 jj_consume_token(-1);
984 throw new ParseException();
986 throw new Error("Missing return statement in function");
989 static final public Expression VariableInitializer() throws ParseException {
990 final Expression expr;
991 final Token token, token2;
992 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
996 case INTEGER_LITERAL:
997 case FLOATING_POINT_LITERAL:
1000 {if (true) return expr;}
1003 token2 = jj_consume_token(MINUS);
1004 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1005 case INTEGER_LITERAL:
1006 token = jj_consume_token(INTEGER_LITERAL);
1008 case FLOATING_POINT_LITERAL:
1009 token = jj_consume_token(FLOATING_POINT_LITERAL);
1012 jj_la1[16] = jj_gen;
1013 jj_consume_token(-1);
1014 throw new ParseException();
1016 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
1018 token2.sourceStart);}
1021 token2 = jj_consume_token(PLUS);
1022 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1023 case INTEGER_LITERAL:
1024 token = jj_consume_token(INTEGER_LITERAL);
1026 case FLOATING_POINT_LITERAL:
1027 token = jj_consume_token(FLOATING_POINT_LITERAL);
1030 jj_la1[17] = jj_gen;
1031 jj_consume_token(-1);
1032 throw new ParseException();
1034 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
1036 token2.sourceStart);}
1039 expr = ArrayDeclarator();
1040 {if (true) return expr;}
1043 token = jj_consume_token(IDENTIFIER);
1044 {if (true) return new ConstantIdentifier(token);}
1047 jj_la1[18] = jj_gen;
1048 jj_consume_token(-1);
1049 throw new ParseException();
1051 throw new Error("Missing return statement in function");
1054 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
1055 final Expression expr,expr2;
1056 expr = Expression();
1057 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1059 jj_consume_token(ARRAYASSIGN);
1060 expr2 = Expression();
1061 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
1064 jj_la1[19] = jj_gen;
1067 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
1068 throw new Error("Missing return statement in function");
1071 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
1072 ArrayVariableDeclaration expr;
1073 final ArrayList list = new ArrayList();
1074 jj_consume_token(LPAREN);
1075 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1090 case INTEGER_LITERAL:
1091 case FLOATING_POINT_LITERAL:
1092 case STRING_LITERAL:
1096 expr = ArrayVariable();
1105 jj_consume_token(COMMA);
1106 expr = ArrayVariable();
1111 jj_la1[20] = jj_gen;
1114 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1116 jj_consume_token(COMMA);
1120 jj_la1[21] = jj_gen;
1123 jj_consume_token(RPAREN);
1124 final ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1126 {if (true) return vars;}
1127 throw new Error("Missing return statement in function");
1131 * A Method Declaration.
1132 * <b>function</b> MetodDeclarator() Block()
1134 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1135 final MethodDeclaration functionDeclaration;
1137 final OutlineableWithChildren seg = currentSegment;
1138 jj_consume_token(FUNCTION);
1140 functionDeclaration = MethodDeclarator();
1141 outlineInfo.addVariable(new String(functionDeclaration.name));
1142 } catch (ParseException e) {
1143 if (errorMessage != null) {if (true) throw e;}
1144 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1146 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1147 errorEnd = SimpleCharStream.getPosition() + 1;
1148 {if (true) throw e;}
1150 currentSegment = functionDeclaration;
1152 functionDeclaration.statements = block.statements;
1153 currentSegment = seg;
1154 {if (true) return functionDeclaration;}
1155 throw new Error("Missing return statement in function");
1159 * A MethodDeclarator.
1160 * [&] IDENTIFIER(parameters ...).
1161 * @return a function description for the outline
1163 static final public MethodDeclaration MethodDeclarator() throws ParseException {
1164 final Token identifier;
1165 Token reference = null;
1166 final Hashtable formalParameters;
1167 final int pos = SimpleCharStream.getPosition();
1168 char[] identifierChar = SYNTAX_ERROR_CHAR;
1169 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1171 reference = jj_consume_token(BIT_AND);
1174 jj_la1[22] = jj_gen;
1178 identifier = jj_consume_token(IDENTIFIER);
1179 identifierChar = identifier.image.toCharArray();
1180 } catch (ParseException e) {
1181 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1183 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1184 errorEnd = SimpleCharStream.getPosition() + 1;
1185 processParseExceptionDebug(e);
1187 formalParameters = FormalParameters();
1188 MethodDeclaration method = new MethodDeclaration(currentSegment,
1193 SimpleCharStream.getPosition());
1194 {if (true) return method;}
1195 throw new Error("Missing return statement in function");
1199 * FormalParameters follows method identifier.
1200 * (FormalParameter())
1202 static final public Hashtable FormalParameters() throws ParseException {
1203 VariableDeclaration var;
1204 final Hashtable parameters = new Hashtable();
1206 jj_consume_token(LPAREN);
1207 } catch (ParseException e) {
1208 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1210 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1211 errorEnd = SimpleCharStream.getPosition() + 1;
1212 processParseExceptionDebug(e);
1214 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1217 var = FormalParameter();
1218 parameters.put(new String(var.name()),var);
1221 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1226 jj_la1[23] = jj_gen;
1229 jj_consume_token(COMMA);
1230 var = FormalParameter();
1231 parameters.put(new String(var.name()),var);
1235 jj_la1[24] = jj_gen;
1239 jj_consume_token(RPAREN);
1240 } catch (ParseException e) {
1241 errorMessage = "')' expected";
1243 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1244 errorEnd = SimpleCharStream.getPosition() + 1;
1245 processParseExceptionDebug(e);
1247 {if (true) return parameters;}
1248 throw new Error("Missing return statement in function");
1252 * A formal parameter.
1253 * $varname[=value] (,$varname[=value])
1255 static final public VariableDeclaration FormalParameter() throws ParseException {
1256 final VariableDeclaration variableDeclaration;
1258 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1260 token = jj_consume_token(BIT_AND);
1263 jj_la1[25] = jj_gen;
1266 variableDeclaration = VariableDeclaratorNoSuffix();
1267 if (token != null) {
1268 variableDeclaration.setReference(true);
1270 {if (true) return variableDeclaration;}
1271 throw new Error("Missing return statement in function");
1274 static final public ConstantIdentifier Type() throws ParseException {
1276 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1278 token = jj_consume_token(STRING);
1279 {if (true) return new ConstantIdentifier(token);}
1282 token = jj_consume_token(BOOL);
1283 {if (true) return new ConstantIdentifier(token);}
1286 token = jj_consume_token(BOOLEAN);
1287 {if (true) return new ConstantIdentifier(token);}
1290 token = jj_consume_token(REAL);
1291 {if (true) return new ConstantIdentifier(token);}
1294 token = jj_consume_token(DOUBLE);
1295 {if (true) return new ConstantIdentifier(token);}
1298 token = jj_consume_token(FLOAT);
1299 {if (true) return new ConstantIdentifier(token);}
1302 token = jj_consume_token(INT);
1303 {if (true) return new ConstantIdentifier(token);}
1306 token = jj_consume_token(INTEGER);
1307 {if (true) return new ConstantIdentifier(token);}
1310 token = jj_consume_token(OBJECT);
1311 {if (true) return new ConstantIdentifier(token);}
1314 jj_la1[26] = jj_gen;
1315 jj_consume_token(-1);
1316 throw new ParseException();
1318 throw new Error("Missing return statement in function");
1321 static final public Expression Expression() throws ParseException {
1322 final Expression expr;
1323 Expression initializer = null;
1324 final int pos = SimpleCharStream.getPosition();
1325 int assignOperator = -1;
1326 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1339 case INTEGER_LITERAL:
1340 case FLOATING_POINT_LITERAL:
1341 case STRING_LITERAL:
1345 expr = ConditionalExpression();
1346 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1359 case RSIGNEDSHIFTASSIGN:
1360 assignOperator = AssignmentOperator();
1362 initializer = Expression();
1363 } catch (ParseException e) {
1364 if (errorMessage != null) {
1365 {if (true) throw e;}
1367 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1369 errorEnd = SimpleCharStream.getPosition();
1370 {if (true) throw e;}
1374 jj_la1[27] = jj_gen;
1377 if (assignOperator != -1) {// todo : change this, very very bad :(
1378 if (expr instanceof AbstractVariable) {
1379 {if (true) return new VariableDeclaration(currentSegment,
1380 (AbstractVariable) expr,
1383 initializer.sourceEnd);}
1385 String varName = expr.toStringExpression().substring(1);
1386 {if (true) return new VariableDeclaration(currentSegment,
1387 new Variable(varName,
1391 initializer.sourceEnd);}
1393 {if (true) return expr;}
1397 expr = ExpressionWBang();
1398 {if (true) return expr;}
1401 jj_la1[28] = jj_gen;
1402 jj_consume_token(-1);
1403 throw new ParseException();
1405 throw new Error("Missing return statement in function");
1408 static final public Expression ExpressionWBang() throws ParseException {
1409 final Expression expr;
1410 final int pos = SimpleCharStream.getPosition();
1411 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1413 jj_consume_token(BANG);
1414 expr = ExpressionWBang();
1415 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1419 expr = ExpressionNoBang();
1420 {if (true) return expr;}
1423 jj_la1[29] = jj_gen;
1424 jj_consume_token(-1);
1425 throw new ParseException();
1427 throw new Error("Missing return statement in function");
1430 static final public Expression ExpressionNoBang() throws ParseException {
1432 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1434 expr = ListExpression();
1435 {if (true) return expr;}
1438 expr = PrintExpression();
1439 {if (true) return expr;}
1442 jj_la1[30] = jj_gen;
1443 jj_consume_token(-1);
1444 throw new ParseException();
1446 throw new Error("Missing return statement in function");
1450 * Any assignement operator.
1451 * @return the assignement operator id
1453 static final public int AssignmentOperator() throws ParseException {
1454 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1456 jj_consume_token(ASSIGN);
1457 {if (true) return VariableDeclaration.EQUAL;}
1460 jj_consume_token(STARASSIGN);
1461 {if (true) return VariableDeclaration.STAR_EQUAL;}
1464 jj_consume_token(SLASHASSIGN);
1465 {if (true) return VariableDeclaration.SLASH_EQUAL;}
1468 jj_consume_token(REMASSIGN);
1469 {if (true) return VariableDeclaration.REM_EQUAL;}
1472 jj_consume_token(PLUSASSIGN);
1473 {if (true) return VariableDeclaration.PLUS_EQUAL;}
1476 jj_consume_token(MINUSASSIGN);
1477 {if (true) return VariableDeclaration.MINUS_EQUAL;}
1480 jj_consume_token(LSHIFTASSIGN);
1481 {if (true) return VariableDeclaration.LSHIFT_EQUAL;}
1483 case RSIGNEDSHIFTASSIGN:
1484 jj_consume_token(RSIGNEDSHIFTASSIGN);
1485 {if (true) return VariableDeclaration.RSIGNEDSHIFT_EQUAL;}
1488 jj_consume_token(ANDASSIGN);
1489 {if (true) return VariableDeclaration.AND_EQUAL;}
1492 jj_consume_token(XORASSIGN);
1493 {if (true) return VariableDeclaration.XOR_EQUAL;}
1496 jj_consume_token(ORASSIGN);
1497 {if (true) return VariableDeclaration.OR_EQUAL;}
1500 jj_consume_token(DOTASSIGN);
1501 {if (true) return VariableDeclaration.DOT_EQUAL;}
1504 jj_consume_token(TILDEEQUAL);
1505 {if (true) return VariableDeclaration.TILDE_EQUAL;}
1508 jj_la1[31] = jj_gen;
1509 jj_consume_token(-1);
1510 throw new ParseException();
1512 throw new Error("Missing return statement in function");
1515 static final public Expression ConditionalExpression() throws ParseException {
1516 final Expression expr;
1517 Expression expr2 = null;
1518 Expression expr3 = null;
1519 expr = ConditionalOrExpression();
1520 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1522 jj_consume_token(HOOK);
1523 expr2 = Expression();
1524 jj_consume_token(COLON);
1525 expr3 = ConditionalExpression();
1528 jj_la1[32] = jj_gen;
1531 if (expr3 == null) {
1532 {if (true) return expr;}
1534 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1535 throw new Error("Missing return statement in function");
1538 static final public Expression ConditionalOrExpression() throws ParseException {
1539 Expression expr,expr2;
1541 expr = ConditionalAndExpression();
1544 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1550 jj_la1[33] = jj_gen;
1553 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1555 jj_consume_token(OR_OR);
1556 operator = OperatorIds.OR_OR;
1559 jj_consume_token(_ORL);
1560 operator = OperatorIds.ORL;
1563 jj_la1[34] = jj_gen;
1564 jj_consume_token(-1);
1565 throw new ParseException();
1567 expr2 = ConditionalAndExpression();
1568 expr = new BinaryExpression(expr,expr2,operator);
1570 {if (true) return expr;}
1571 throw new Error("Missing return statement in function");
1574 static final public Expression ConditionalAndExpression() throws ParseException {
1575 Expression expr,expr2;
1577 expr = ConcatExpression();
1580 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1586 jj_la1[35] = jj_gen;
1589 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1591 jj_consume_token(AND_AND);
1592 operator = OperatorIds.AND_AND;
1595 jj_consume_token(_ANDL);
1596 operator = OperatorIds.ANDL;
1599 jj_la1[36] = jj_gen;
1600 jj_consume_token(-1);
1601 throw new ParseException();
1603 expr2 = ConcatExpression();
1604 expr = new BinaryExpression(expr,expr2,operator);
1606 {if (true) return expr;}
1607 throw new Error("Missing return statement in function");
1610 static final public Expression ConcatExpression() throws ParseException {
1611 Expression expr,expr2;
1612 expr = InclusiveOrExpression();
1615 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1620 jj_la1[37] = jj_gen;
1623 jj_consume_token(DOT);
1624 expr2 = InclusiveOrExpression();
1625 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1627 {if (true) return expr;}
1628 throw new Error("Missing return statement in function");
1631 static final public Expression InclusiveOrExpression() throws ParseException {
1632 Expression expr,expr2;
1633 expr = ExclusiveOrExpression();
1636 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1641 jj_la1[38] = jj_gen;
1644 jj_consume_token(BIT_OR);
1645 expr2 = ExclusiveOrExpression();
1646 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1648 {if (true) return expr;}
1649 throw new Error("Missing return statement in function");
1652 static final public Expression ExclusiveOrExpression() throws ParseException {
1653 Expression expr,expr2;
1654 expr = AndExpression();
1657 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1662 jj_la1[39] = jj_gen;
1665 jj_consume_token(XOR);
1666 expr2 = AndExpression();
1667 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1669 {if (true) return expr;}
1670 throw new Error("Missing return statement in function");
1673 static final public Expression AndExpression() throws ParseException {
1674 Expression expr,expr2;
1675 expr = EqualityExpression();
1678 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1683 jj_la1[40] = jj_gen;
1686 jj_consume_token(BIT_AND);
1687 expr2 = EqualityExpression();
1688 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1690 {if (true) return expr;}
1691 throw new Error("Missing return statement in function");
1694 static final public Expression EqualityExpression() throws ParseException {
1695 Expression expr,expr2;
1697 expr = RelationalExpression();
1700 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1704 case BANGDOUBLEEQUAL:
1709 jj_la1[41] = jj_gen;
1712 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1714 jj_consume_token(EQUAL_EQUAL);
1715 operator = OperatorIds.EQUAL_EQUAL;
1718 jj_consume_token(DIF);
1719 operator = OperatorIds.DIF;
1722 jj_consume_token(NOT_EQUAL);
1723 operator = OperatorIds.DIF;
1725 case BANGDOUBLEEQUAL:
1726 jj_consume_token(BANGDOUBLEEQUAL);
1727 operator = OperatorIds.BANG_EQUAL_EQUAL;
1730 jj_consume_token(TRIPLEEQUAL);
1731 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1734 jj_la1[42] = jj_gen;
1735 jj_consume_token(-1);
1736 throw new ParseException();
1739 expr2 = RelationalExpression();
1740 } catch (ParseException e) {
1741 if (errorMessage != null) {
1742 {if (true) throw e;}
1744 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1746 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1747 errorEnd = SimpleCharStream.getPosition() + 1;
1748 {if (true) throw e;}
1750 expr = new BinaryExpression(expr,expr2,operator);
1752 {if (true) return expr;}
1753 throw new Error("Missing return statement in function");
1756 static final public Expression RelationalExpression() throws ParseException {
1757 Expression expr,expr2;
1759 expr = ShiftExpression();
1762 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1770 jj_la1[43] = jj_gen;
1773 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1775 jj_consume_token(LT);
1776 operator = OperatorIds.LESS;
1779 jj_consume_token(GT);
1780 operator = OperatorIds.GREATER;
1783 jj_consume_token(LE);
1784 operator = OperatorIds.LESS_EQUAL;
1787 jj_consume_token(GE);
1788 operator = OperatorIds.GREATER_EQUAL;
1791 jj_la1[44] = jj_gen;
1792 jj_consume_token(-1);
1793 throw new ParseException();
1795 expr2 = ShiftExpression();
1796 expr = new BinaryExpression(expr,expr2,operator);
1798 {if (true) return expr;}
1799 throw new Error("Missing return statement in function");
1802 static final public Expression ShiftExpression() throws ParseException {
1803 Expression expr,expr2;
1805 expr = AdditiveExpression();
1808 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1811 case RUNSIGNEDSHIFT:
1815 jj_la1[45] = jj_gen;
1818 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1820 jj_consume_token(LSHIFT);
1821 operator = OperatorIds.LEFT_SHIFT;
1824 jj_consume_token(RSIGNEDSHIFT);
1825 operator = OperatorIds.RIGHT_SHIFT;
1827 case RUNSIGNEDSHIFT:
1828 jj_consume_token(RUNSIGNEDSHIFT);
1829 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1832 jj_la1[46] = jj_gen;
1833 jj_consume_token(-1);
1834 throw new ParseException();
1836 expr2 = AdditiveExpression();
1837 expr = new BinaryExpression(expr,expr2,operator);
1839 {if (true) return expr;}
1840 throw new Error("Missing return statement in function");
1843 static final public Expression AdditiveExpression() throws ParseException {
1844 Expression expr,expr2;
1846 expr = MultiplicativeExpression();
1849 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1855 jj_la1[47] = jj_gen;
1858 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1860 jj_consume_token(PLUS);
1861 operator = OperatorIds.PLUS;
1864 jj_consume_token(MINUS);
1865 operator = OperatorIds.MINUS;
1868 jj_la1[48] = jj_gen;
1869 jj_consume_token(-1);
1870 throw new ParseException();
1872 expr2 = MultiplicativeExpression();
1873 expr = new BinaryExpression(expr,expr2,operator);
1875 {if (true) return expr;}
1876 throw new Error("Missing return statement in function");
1879 static final public Expression MultiplicativeExpression() throws ParseException {
1880 Expression expr,expr2;
1883 expr = UnaryExpression();
1884 } catch (ParseException e) {
1885 if (errorMessage != null) {if (true) throw e;}
1886 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1888 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1889 errorEnd = SimpleCharStream.getPosition() + 1;
1890 {if (true) throw e;}
1894 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1901 jj_la1[49] = jj_gen;
1904 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1906 jj_consume_token(STAR);
1907 operator = OperatorIds.MULTIPLY;
1910 jj_consume_token(SLASH);
1911 operator = OperatorIds.DIVIDE;
1914 jj_consume_token(REMAINDER);
1915 operator = OperatorIds.REMAINDER;
1918 jj_la1[50] = jj_gen;
1919 jj_consume_token(-1);
1920 throw new ParseException();
1922 expr2 = UnaryExpression();
1923 expr = new BinaryExpression(expr,expr2,operator);
1925 {if (true) return expr;}
1926 throw new Error("Missing return statement in function");
1930 * An unary expression starting with @, & or nothing
1932 static final public Expression UnaryExpression() throws ParseException {
1933 final Expression expr;
1934 final int pos = SimpleCharStream.getPosition();
1935 /* <BIT_AND> expr = UnaryExpressionNoPrefix() //why did I had that ?
1936 {return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1938 expr = AtNotUnaryExpression();
1939 {if (true) return expr;}
1940 throw new Error("Missing return statement in function");
1944 * An expression prefixed (or not) by one or more @ and !.
1945 * @return the expression
1947 static final public Expression AtNotUnaryExpression() throws ParseException {
1948 final Expression expr;
1949 final int pos = SimpleCharStream.getPosition();
1950 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1952 jj_consume_token(AT);
1953 expr = AtNotUnaryExpression();
1954 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,pos);}
1957 jj_consume_token(BANG);
1958 expr = AtNotUnaryExpression();
1959 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1971 case INTEGER_LITERAL:
1972 case FLOATING_POINT_LITERAL:
1973 case STRING_LITERAL:
1977 expr = UnaryExpressionNoPrefix();
1978 {if (true) return expr;}
1981 jj_la1[51] = jj_gen;
1982 jj_consume_token(-1);
1983 throw new ParseException();
1985 throw new Error("Missing return statement in function");
1988 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
1989 final Expression expr;
1990 final int pos = SimpleCharStream.getPosition();
1991 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1993 jj_consume_token(PLUS);
1994 expr = AtNotUnaryExpression();
1995 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.PLUS,pos);}
1998 jj_consume_token(MINUS);
1999 expr = AtNotUnaryExpression();
2000 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.MINUS,pos);}
2004 expr = PreIncDecExpression();
2005 {if (true) return expr;}
2013 case INTEGER_LITERAL:
2014 case FLOATING_POINT_LITERAL:
2015 case STRING_LITERAL:
2019 expr = UnaryExpressionNotPlusMinus();
2020 {if (true) return expr;}
2023 jj_la1[52] = jj_gen;
2024 jj_consume_token(-1);
2025 throw new ParseException();
2027 throw new Error("Missing return statement in function");
2030 static final public Expression PreIncDecExpression() throws ParseException {
2031 final Expression expr;
2033 final int pos = SimpleCharStream.getPosition();
2034 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2036 jj_consume_token(PLUS_PLUS);
2037 operator = OperatorIds.PLUS_PLUS;
2040 jj_consume_token(MINUS_MINUS);
2041 operator = OperatorIds.MINUS_MINUS;
2044 jj_la1[53] = jj_gen;
2045 jj_consume_token(-1);
2046 throw new ParseException();
2048 expr = PrimaryExpression();
2049 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
2050 throw new Error("Missing return statement in function");
2053 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
2054 final Expression expr;
2055 final int pos = SimpleCharStream.getPosition();
2056 if (jj_2_3(2147483647)) {
2057 expr = CastExpression();
2058 {if (true) return expr;}
2060 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2066 expr = PostfixExpression();
2067 {if (true) return expr;}
2072 case INTEGER_LITERAL:
2073 case FLOATING_POINT_LITERAL:
2074 case STRING_LITERAL:
2076 {if (true) return expr;}
2079 jj_consume_token(LPAREN);
2080 expr = Expression();
2082 jj_consume_token(RPAREN);
2083 } catch (ParseException e) {
2084 errorMessage = "')' expected";
2086 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2087 errorEnd = SimpleCharStream.getPosition() + 1;
2088 {if (true) throw e;}
2090 {if (true) return expr;}
2093 jj_la1[54] = jj_gen;
2094 jj_consume_token(-1);
2095 throw new ParseException();
2098 throw new Error("Missing return statement in function");
2101 static final public CastExpression CastExpression() throws ParseException {
2102 final ConstantIdentifier type;
2103 final Expression expr;
2104 final Token token,token1;
2105 token1 = jj_consume_token(LPAREN);
2106 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2119 token = jj_consume_token(ARRAY);
2120 type = new ConstantIdentifier(token);
2123 jj_la1[55] = jj_gen;
2124 jj_consume_token(-1);
2125 throw new ParseException();
2127 jj_consume_token(RPAREN);
2128 expr = UnaryExpression();
2129 {if (true) return new CastExpression(type,expr,token1.sourceStart,expr.sourceEnd);}
2130 throw new Error("Missing return statement in function");
2133 static final public Expression PostfixExpression() throws ParseException {
2134 final Expression expr;
2137 expr = PrimaryExpression();
2138 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2141 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2143 token = jj_consume_token(PLUS_PLUS);
2144 operator = OperatorIds.PLUS_PLUS;
2147 token = jj_consume_token(MINUS_MINUS);
2148 operator = OperatorIds.MINUS_MINUS;
2151 jj_la1[56] = jj_gen;
2152 jj_consume_token(-1);
2153 throw new ParseException();
2157 jj_la1[57] = jj_gen;
2160 if (operator == -1) {
2161 {if (true) return expr;}
2163 {if (true) return new PostfixedUnaryExpression(expr,operator,token.sourceEnd);}
2164 throw new Error("Missing return statement in function");
2167 static final public Expression PrimaryExpression() throws ParseException {
2168 Expression expr = null;
2170 int assignOperator = -1;
2171 final Token identifier;
2174 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2176 token = jj_consume_token(IDENTIFIER);
2177 expr = new ConstantIdentifier(token);
2180 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2181 case STATICCLASSACCESS:
2185 jj_la1[58] = jj_gen;
2188 jj_consume_token(STATICCLASSACCESS);
2189 expr2 = ClassIdentifier();
2190 expr = new ClassAccess(expr,
2192 ClassAccess.STATIC);
2194 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2196 expr = Arguments(expr);
2199 jj_la1[59] = jj_gen;
2202 {if (true) return expr;}
2206 expr = VariableDeclaratorId();
2207 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2209 expr = Arguments(expr);
2212 jj_la1[60] = jj_gen;
2215 {if (true) return expr;}
2218 token = jj_consume_token(NEW);
2219 expr = ClassIdentifier();
2220 expr = new PrefixedUnaryExpression(expr,
2223 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2225 expr = Arguments(expr);
2228 jj_la1[61] = jj_gen;
2231 {if (true) return expr;}
2234 expr = ArrayDeclarator();
2235 {if (true) return expr;}
2238 jj_la1[62] = jj_gen;
2239 jj_consume_token(-1);
2240 throw new ParseException();
2242 throw new Error("Missing return statement in function");
2246 * An array declarator.
2250 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2251 final ArrayVariableDeclaration[] vars;
2252 final int pos = SimpleCharStream.getPosition();
2253 jj_consume_token(ARRAY);
2254 vars = ArrayInitializer();
2255 {if (true) return new ArrayInitializer(vars,pos,SimpleCharStream.getPosition());}
2256 throw new Error("Missing return statement in function");
2259 static final public PrefixedUnaryExpression classInstantiation() throws ParseException {
2261 final StringBuffer buff;
2264 token = jj_consume_token(NEW);
2265 expr = ClassIdentifier();
2266 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2272 pos = expr.sourceStart;
2273 buff = new StringBuffer(expr.toStringExpression());
2274 expr = PrimaryExpression();
2275 buff.append(expr.toStringExpression());
2276 expr = new ConstantIdentifier(buff.toString(),
2281 jj_la1[63] = jj_gen;
2284 {if (true) return new PrefixedUnaryExpression(expr,
2286 token.sourceStart);}
2287 throw new Error("Missing return statement in function");
2290 static final public Expression ClassIdentifier() throws ParseException {
2291 final Expression expr;
2293 final ConstantIdentifier type;
2294 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2296 token = jj_consume_token(IDENTIFIER);
2297 {if (true) return new ConstantIdentifier(token);}
2309 {if (true) return expr;}
2313 expr = VariableDeclaratorId();
2314 {if (true) return expr;}
2317 jj_la1[64] = jj_gen;
2318 jj_consume_token(-1);
2319 throw new ParseException();
2321 throw new Error("Missing return statement in function");
2325 * Used by Variabledeclaratorid and primarysuffix
2327 static final public AbstractVariable VariableSuffix(final AbstractVariable prefix) throws ParseException {
2328 Variable expr = null;
2329 final int pos = SimpleCharStream.getPosition();
2330 Expression expression = null;
2331 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2333 jj_consume_token(CLASSACCESS);
2335 expr = VariableName();
2336 } catch (ParseException e) {
2337 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2339 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2340 errorEnd = SimpleCharStream.getPosition() + 1;
2341 {if (true) throw e;}
2343 {if (true) return new ClassAccess(prefix,
2345 ClassAccess.NORMAL);}
2348 jj_consume_token(LBRACKET);
2349 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2373 case INTEGER_LITERAL:
2374 case FLOATING_POINT_LITERAL:
2375 case STRING_LITERAL:
2379 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2394 case INTEGER_LITERAL:
2395 case FLOATING_POINT_LITERAL:
2396 case STRING_LITERAL:
2400 expression = Expression();
2411 expression = Type();
2414 jj_la1[65] = jj_gen;
2415 jj_consume_token(-1);
2416 throw new ParseException();
2420 jj_la1[66] = jj_gen;
2424 jj_consume_token(RBRACKET);
2425 } catch (ParseException e) {
2426 errorMessage = "']' expected";
2428 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2429 errorEnd = SimpleCharStream.getPosition() + 1;
2430 {if (true) throw e;}
2432 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2435 jj_la1[67] = jj_gen;
2436 jj_consume_token(-1);
2437 throw new ParseException();
2439 throw new Error("Missing return statement in function");
2442 static final public Literal Literal() throws ParseException {
2444 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2445 case INTEGER_LITERAL:
2446 token = jj_consume_token(INTEGER_LITERAL);
2447 {if (true) return new NumberLiteral(token);}
2449 case FLOATING_POINT_LITERAL:
2450 token = jj_consume_token(FLOATING_POINT_LITERAL);
2451 {if (true) return new NumberLiteral(token);}
2453 case STRING_LITERAL:
2454 token = jj_consume_token(STRING_LITERAL);
2455 {if (true) return new StringLiteral(token);}
2458 token = jj_consume_token(TRUE);
2459 {if (true) return new TrueLiteral(token);}
2462 token = jj_consume_token(FALSE);
2463 {if (true) return new FalseLiteral(token);}
2466 token = jj_consume_token(NULL);
2467 {if (true) return new NullLiteral(token);}
2470 jj_la1[68] = jj_gen;
2471 jj_consume_token(-1);
2472 throw new ParseException();
2474 throw new Error("Missing return statement in function");
2477 static final public FunctionCall Arguments(final Expression func) throws ParseException {
2478 Expression[] args = null;
2479 jj_consume_token(LPAREN);
2480 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2495 case INTEGER_LITERAL:
2496 case FLOATING_POINT_LITERAL:
2497 case STRING_LITERAL:
2501 args = ArgumentList();
2504 jj_la1[69] = jj_gen;
2508 jj_consume_token(RPAREN);
2509 } catch (ParseException e) {
2510 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2512 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2513 errorEnd = SimpleCharStream.getPosition() + 1;
2514 {if (true) throw e;}
2516 {if (true) return new FunctionCall(func,args,SimpleCharStream.getPosition());}
2517 throw new Error("Missing return statement in function");
2521 * An argument list is a list of arguments separated by comma :
2522 * argumentDeclaration() (, argumentDeclaration)*
2523 * @return an array of arguments
2525 static final public Expression[] ArgumentList() throws ParseException {
2527 final ArrayList list = new ArrayList();
2532 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2537 jj_la1[70] = jj_gen;
2540 jj_consume_token(COMMA);
2544 } catch (ParseException e) {
2545 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2547 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2548 errorEnd = SimpleCharStream.getPosition() + 1;
2549 {if (true) throw e;}
2552 final Expression[] arguments = new Expression[list.size()];
2553 list.toArray(arguments);
2554 {if (true) return arguments;}
2555 throw new Error("Missing return statement in function");
2559 * A Statement without break.
2560 * @return a statement
2562 static final public Statement StatementNoBreak() throws ParseException {
2563 final Statement statement;
2566 statement = expressionStatement();
2567 {if (true) return statement;}
2569 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2571 statement = LabeledStatement();
2572 {if (true) return statement;}
2575 statement = Block();
2576 {if (true) return statement;}
2579 statement = EmptyStatement();
2580 {if (true) return statement;}
2583 statement = SwitchStatement();
2584 {if (true) return statement;}
2587 statement = IfStatement();
2588 {if (true) return statement;}
2591 statement = WhileStatement();
2592 {if (true) return statement;}
2595 statement = DoStatement();
2596 {if (true) return statement;}
2599 statement = ForStatement();
2600 {if (true) return statement;}
2603 statement = ForeachStatement();
2604 {if (true) return statement;}
2607 statement = ContinueStatement();
2608 {if (true) return statement;}
2611 statement = ReturnStatement();
2612 {if (true) return statement;}
2615 statement = EchoStatement();
2616 {if (true) return statement;}
2623 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2625 token = jj_consume_token(AT);
2628 jj_la1[71] = jj_gen;
2631 statement = IncludeStatement();
2632 if (token != null) {
2633 ((InclusionStatement)statement).silent = true;
2635 {if (true) return statement;}
2638 statement = StaticStatement();
2639 {if (true) return statement;}
2642 statement = GlobalStatement();
2643 {if (true) return statement;}
2646 statement = defineStatement();
2647 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2650 jj_la1[72] = jj_gen;
2651 jj_consume_token(-1);
2652 throw new ParseException();
2655 throw new Error("Missing return statement in function");
2659 * A statement expression.
2661 * @return an expression
2663 static final public Statement expressionStatement() throws ParseException {
2664 final Statement statement;
2665 statement = Expression();
2667 jj_consume_token(SEMICOLON);
2668 } catch (ParseException e) {
2669 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2670 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2672 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2673 errorEnd = SimpleCharStream.getPosition() + 1;
2674 {if (true) throw e;}
2677 {if (true) return statement;}
2678 throw new Error("Missing return statement in function");
2681 static final public Define defineStatement() throws ParseException {
2682 final int start = SimpleCharStream.getPosition();
2683 Expression defineName,defineValue;
2684 jj_consume_token(DEFINE);
2686 jj_consume_token(LPAREN);
2687 } catch (ParseException e) {
2688 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2690 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2691 errorEnd = SimpleCharStream.getPosition() + 1;
2692 processParseExceptionDebug(e);
2695 defineName = Expression();
2696 } catch (ParseException e) {
2697 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2699 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2700 errorEnd = SimpleCharStream.getPosition() + 1;
2701 {if (true) throw e;}
2704 jj_consume_token(COMMA);
2705 } catch (ParseException e) {
2706 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2708 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2709 errorEnd = SimpleCharStream.getPosition() + 1;
2710 processParseExceptionDebug(e);
2713 defineValue = Expression();
2714 } catch (ParseException e) {
2715 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2717 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2718 errorEnd = SimpleCharStream.getPosition() + 1;
2719 {if (true) throw e;}
2722 jj_consume_token(RPAREN);
2723 } catch (ParseException e) {
2724 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2726 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2727 errorEnd = SimpleCharStream.getPosition() + 1;
2728 processParseExceptionDebug(e);
2730 {if (true) return new Define(currentSegment,
2734 SimpleCharStream.getPosition());}
2735 throw new Error("Missing return statement in function");
2739 * A Normal statement.
2741 static final public Statement Statement() throws ParseException {
2742 final Statement statement;
2743 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2774 case INTEGER_LITERAL:
2775 case FLOATING_POINT_LITERAL:
2776 case STRING_LITERAL:
2782 statement = StatementNoBreak();
2783 {if (true) return statement;}
2786 statement = BreakStatement();
2787 {if (true) return statement;}
2790 jj_la1[73] = jj_gen;
2791 jj_consume_token(-1);
2792 throw new ParseException();
2794 throw new Error("Missing return statement in function");
2798 * An html block inside a php syntax.
2800 static final public HTMLBlock htmlBlock() throws ParseException {
2801 final int startIndex = nodePtr;
2802 final AstNode[] blockNodes;
2804 jj_consume_token(PHPEND);
2807 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2812 jj_la1[74] = jj_gen;
2818 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2820 jj_consume_token(PHPSTARTLONG);
2823 jj_consume_token(PHPSTARTSHORT);
2826 jj_la1[75] = jj_gen;
2827 jj_consume_token(-1);
2828 throw new ParseException();
2830 } catch (ParseException e) {
2831 errorMessage = "unexpected end of file , '<?php' expected";
2833 errorStart = SimpleCharStream.getPosition();
2834 errorEnd = SimpleCharStream.getPosition();
2835 {if (true) throw e;}
2837 nbNodes = nodePtr - startIndex;
2838 blockNodes = new AstNode[nbNodes];
2839 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2840 nodePtr = startIndex;
2841 {if (true) return new HTMLBlock(blockNodes);}
2842 throw new Error("Missing return statement in function");
2846 * An include statement. It's "include" an expression;
2848 static final public InclusionStatement IncludeStatement() throws ParseException {
2849 final Expression expr;
2851 final int pos = SimpleCharStream.getPosition();
2852 final InclusionStatement inclusionStatement;
2853 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2855 jj_consume_token(REQUIRE);
2856 keyword = InclusionStatement.REQUIRE;
2859 jj_consume_token(REQUIRE_ONCE);
2860 keyword = InclusionStatement.REQUIRE_ONCE;
2863 jj_consume_token(INCLUDE);
2864 keyword = InclusionStatement.INCLUDE;
2867 jj_consume_token(INCLUDE_ONCE);
2868 keyword = InclusionStatement.INCLUDE_ONCE;
2871 jj_la1[76] = jj_gen;
2872 jj_consume_token(-1);
2873 throw new ParseException();
2876 expr = Expression();
2877 } catch (ParseException e) {
2878 if (errorMessage != null) {
2879 {if (true) throw e;}
2881 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
2883 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2884 errorEnd = SimpleCharStream.getPosition() + 1;
2885 {if (true) throw e;}
2887 inclusionStatement = new InclusionStatement(currentSegment,
2891 currentSegment.add(inclusionStatement);
2893 jj_consume_token(SEMICOLON);
2894 } catch (ParseException e) {
2895 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2897 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2898 errorEnd = SimpleCharStream.getPosition() + 1;
2899 {if (true) throw e;}
2901 {if (true) return inclusionStatement;}
2902 throw new Error("Missing return statement in function");
2905 static final public PrintExpression PrintExpression() throws ParseException {
2906 final Expression expr;
2907 final int pos = SimpleCharStream.getPosition();
2908 jj_consume_token(PRINT);
2909 expr = Expression();
2910 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
2911 throw new Error("Missing return statement in function");
2914 static final public ListExpression ListExpression() throws ParseException {
2915 Expression expr = null;
2916 final Expression expression;
2917 final ArrayList list = new ArrayList();
2918 final int pos = SimpleCharStream.getPosition();
2919 jj_consume_token(LIST);
2921 jj_consume_token(LPAREN);
2922 } catch (ParseException e) {
2923 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2925 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2926 errorEnd = SimpleCharStream.getPosition() + 1;
2927 {if (true) throw e;}
2929 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2932 expr = VariableDeclaratorId();
2936 jj_la1[77] = jj_gen;
2939 if (expr == null) list.add(null);
2942 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2947 jj_la1[78] = jj_gen;
2951 jj_consume_token(COMMA);
2952 } catch (ParseException e) {
2953 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2955 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2956 errorEnd = SimpleCharStream.getPosition() + 1;
2957 {if (true) throw e;}
2959 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2962 expr = VariableDeclaratorId();
2966 jj_la1[79] = jj_gen;
2971 jj_consume_token(RPAREN);
2972 } catch (ParseException e) {
2973 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2975 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2976 errorEnd = SimpleCharStream.getPosition() + 1;
2977 {if (true) throw e;}
2979 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2981 jj_consume_token(ASSIGN);
2982 expression = Expression();
2983 final Variable[] vars = new Variable[list.size()];
2985 {if (true) return new ListExpression(vars,
2988 SimpleCharStream.getPosition());}
2991 jj_la1[80] = jj_gen;
2994 final Variable[] vars = new Variable[list.size()];
2996 {if (true) return new ListExpression(vars,pos,SimpleCharStream.getPosition());}
2997 throw new Error("Missing return statement in function");
3001 * An echo statement.
3002 * echo anyexpression (, otherexpression)*
3004 static final public EchoStatement EchoStatement() throws ParseException {
3005 final ArrayList expressions = new ArrayList();
3007 final int pos = SimpleCharStream.getPosition();
3008 jj_consume_token(ECHO);
3009 expr = Expression();
3010 expressions.add(expr);
3013 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3018 jj_la1[81] = jj_gen;
3021 jj_consume_token(COMMA);
3022 expr = Expression();
3023 expressions.add(expr);
3026 jj_consume_token(SEMICOLON);
3027 } catch (ParseException e) {
3028 if (e.currentToken.next.kind != 4) {
3029 errorMessage = "';' expected after 'echo' statement";
3031 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3032 errorEnd = SimpleCharStream.getPosition() + 1;
3033 {if (true) throw e;}
3036 final Expression[] exprs = new Expression[expressions.size()];
3037 expressions.toArray(exprs);
3038 {if (true) return new EchoStatement(exprs,pos);}
3039 throw new Error("Missing return statement in function");
3042 static final public GlobalStatement GlobalStatement() throws ParseException {
3043 final int pos = SimpleCharStream.getPosition();
3045 final ArrayList vars = new ArrayList();
3046 final GlobalStatement global;
3047 jj_consume_token(GLOBAL);
3052 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3057 jj_la1[82] = jj_gen;
3060 jj_consume_token(COMMA);
3065 jj_consume_token(SEMICOLON);
3066 final Variable[] variables = new Variable[vars.size()];
3067 vars.toArray(variables);
3068 global = new GlobalStatement(currentSegment,
3071 SimpleCharStream.getPosition());
3072 currentSegment.add(global);
3073 {if (true) return global;}
3074 } catch (ParseException e) {
3075 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3077 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3078 errorEnd = SimpleCharStream.getPosition() + 1;
3079 {if (true) throw e;}
3081 throw new Error("Missing return statement in function");
3084 static final public StaticStatement StaticStatement() throws ParseException {
3085 final int pos = SimpleCharStream.getPosition();
3086 final ArrayList vars = new ArrayList();
3087 VariableDeclaration expr;
3088 jj_consume_token(STATIC);
3089 expr = VariableDeclarator();
3093 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3098 jj_la1[83] = jj_gen;
3101 jj_consume_token(COMMA);
3102 expr = VariableDeclarator();
3106 jj_consume_token(SEMICOLON);
3107 final VariableDeclaration[] variables = new VariableDeclaration[vars.size()];
3108 vars.toArray(variables);
3109 {if (true) return new StaticStatement(variables,
3111 SimpleCharStream.getPosition());}
3112 } catch (ParseException e) {
3113 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3115 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3116 errorEnd = SimpleCharStream.getPosition() + 1;
3117 {if (true) throw e;}
3119 throw new Error("Missing return statement in function");
3122 static final public LabeledStatement LabeledStatement() throws ParseException {
3123 final int pos = SimpleCharStream.getPosition();
3125 final Statement statement;
3126 label = jj_consume_token(IDENTIFIER);
3127 jj_consume_token(COLON);
3128 statement = Statement();
3129 {if (true) return new LabeledStatement(label.image.toCharArray(),statement,pos,SimpleCharStream.getPosition());}
3130 throw new Error("Missing return statement in function");
3140 static final public Block Block() throws ParseException {
3141 final int pos = SimpleCharStream.getPosition();
3142 final ArrayList list = new ArrayList();
3143 Statement statement;
3145 jj_consume_token(LBRACE);
3146 } catch (ParseException e) {
3147 errorMessage = "'{' expected";
3149 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3150 errorEnd = SimpleCharStream.getPosition() + 1;
3151 {if (true) throw e;}
3155 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3190 case INTEGER_LITERAL:
3191 case FLOATING_POINT_LITERAL:
3192 case STRING_LITERAL:
3201 jj_la1[84] = jj_gen;
3204 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3238 case INTEGER_LITERAL:
3239 case FLOATING_POINT_LITERAL:
3240 case STRING_LITERAL:
3246 statement = BlockStatement();
3247 list.add(statement);
3250 statement = htmlBlock();
3251 list.add(statement);
3254 jj_la1[85] = jj_gen;
3255 jj_consume_token(-1);
3256 throw new ParseException();
3260 jj_consume_token(RBRACE);
3261 } catch (ParseException e) {
3262 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3264 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3265 errorEnd = SimpleCharStream.getPosition() + 1;
3266 {if (true) throw e;}
3268 final Statement[] statements = new Statement[list.size()];
3269 list.toArray(statements);
3270 {if (true) return new Block(statements,pos,SimpleCharStream.getPosition());}
3271 throw new Error("Missing return statement in function");
3274 static final public Statement BlockStatement() throws ParseException {
3275 final Statement statement;
3276 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3308 case INTEGER_LITERAL:
3309 case FLOATING_POINT_LITERAL:
3310 case STRING_LITERAL:
3316 statement = Statement();
3317 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3318 {if (true) return statement;}
3321 statement = ClassDeclaration();
3322 {if (true) return statement;}
3325 statement = MethodDeclaration();
3326 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3327 currentSegment.add((MethodDeclaration) statement);
3328 ((MethodDeclaration) statement).analyzeCode();
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");
3340 * A Block statement that will not contain any 'break'
3342 static final public Statement BlockStatementNoBreak() throws ParseException {
3343 final Statement statement;
3344 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3375 case INTEGER_LITERAL:
3376 case FLOATING_POINT_LITERAL:
3377 case STRING_LITERAL:
3383 statement = StatementNoBreak();
3384 {if (true) return statement;}
3387 statement = ClassDeclaration();
3388 {if (true) return statement;}
3391 statement = MethodDeclaration();
3392 currentSegment.add((MethodDeclaration) statement);
3393 ((MethodDeclaration) statement).analyzeCode();
3394 {if (true) return statement;}
3397 jj_la1[87] = jj_gen;
3398 jj_consume_token(-1);
3399 throw new ParseException();
3401 throw new Error("Missing return statement in function");
3405 * used only by ForInit()
3407 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3408 final ArrayList list = new ArrayList();
3409 VariableDeclaration var;
3410 var = LocalVariableDeclarator();
3414 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3419 jj_la1[88] = jj_gen;
3422 jj_consume_token(COMMA);
3423 var = LocalVariableDeclarator();
3426 final VariableDeclaration[] vars = new VariableDeclaration[list.size()];
3428 {if (true) return vars;}
3429 throw new Error("Missing return statement in function");
3433 * used only by LocalVariableDeclaration().
3435 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3436 final Variable varName;
3437 Expression initializer = null;
3438 final int pos = SimpleCharStream.getPosition();
3439 varName = Variable();
3440 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3442 jj_consume_token(ASSIGN);
3443 initializer = Expression();
3446 jj_la1[89] = jj_gen;
3449 if (initializer == null) {
3450 {if (true) return new VariableDeclaration(currentSegment,
3453 SimpleCharStream.getPosition());}
3455 {if (true) return new VariableDeclaration(currentSegment,
3458 VariableDeclaration.EQUAL,
3460 throw new Error("Missing return statement in function");
3463 static final public EmptyStatement EmptyStatement() throws ParseException {
3465 jj_consume_token(SEMICOLON);
3466 pos = SimpleCharStream.getPosition();
3467 {if (true) return new EmptyStatement(pos-1,pos);}
3468 throw new Error("Missing return statement in function");
3472 * used only by StatementExpressionList() which is used only by ForInit() and ForStatement()
3474 static final public Expression StatementExpression() throws ParseException {
3475 final Expression expr,expr2;
3477 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3480 expr = PreIncDecExpression();
3481 {if (true) return expr;}
3488 expr = PrimaryExpression();
3489 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3492 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3494 jj_consume_token(PLUS_PLUS);
3495 {if (true) return new PostfixedUnaryExpression(expr,
3496 OperatorIds.PLUS_PLUS,
3497 SimpleCharStream.getPosition());}
3500 jj_consume_token(MINUS_MINUS);
3501 {if (true) return new PostfixedUnaryExpression(expr,
3502 OperatorIds.MINUS_MINUS,
3503 SimpleCharStream.getPosition());}
3506 jj_la1[90] = jj_gen;
3507 jj_consume_token(-1);
3508 throw new ParseException();
3512 jj_la1[91] = jj_gen;
3515 {if (true) return expr;}
3518 jj_la1[92] = jj_gen;
3519 jj_consume_token(-1);
3520 throw new ParseException();
3522 throw new Error("Missing return statement in function");
3525 static final public SwitchStatement SwitchStatement() throws ParseException {
3526 final Expression variable;
3527 final AbstractCase[] cases;
3528 final int pos = SimpleCharStream.getPosition();
3529 jj_consume_token(SWITCH);
3531 jj_consume_token(LPAREN);
3532 } catch (ParseException e) {
3533 errorMessage = "'(' expected after 'switch'";
3535 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3536 errorEnd = SimpleCharStream.getPosition() + 1;
3537 {if (true) throw e;}
3540 variable = Expression();
3541 } catch (ParseException e) {
3542 if (errorMessage != null) {
3543 {if (true) throw e;}
3545 errorMessage = "expression expected";
3547 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3548 errorEnd = SimpleCharStream.getPosition() + 1;
3549 {if (true) throw e;}
3552 jj_consume_token(RPAREN);
3553 } catch (ParseException e) {
3554 errorMessage = "')' expected";
3556 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3557 errorEnd = SimpleCharStream.getPosition() + 1;
3558 {if (true) throw e;}
3560 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3562 cases = switchStatementBrace();
3565 cases = switchStatementColon(pos, pos + 6);
3568 jj_la1[93] = jj_gen;
3569 jj_consume_token(-1);
3570 throw new ParseException();
3572 {if (true) return new SwitchStatement(variable,cases,pos,SimpleCharStream.getPosition());}
3573 throw new Error("Missing return statement in function");
3576 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3578 final ArrayList cases = new ArrayList();
3579 jj_consume_token(LBRACE);
3582 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3588 jj_la1[94] = jj_gen;
3591 cas = switchLabel0();
3595 jj_consume_token(RBRACE);
3596 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3597 cases.toArray(abcase);
3598 {if (true) return abcase;}
3599 } catch (ParseException e) {
3600 errorMessage = "'}' expected";
3602 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3603 errorEnd = SimpleCharStream.getPosition() + 1;
3604 {if (true) throw e;}
3606 throw new Error("Missing return statement in function");
3610 * A Switch statement with : ... endswitch;
3611 * @param start the begin offset of the switch
3612 * @param end the end offset of the switch
3614 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3616 final ArrayList cases = new ArrayList();
3617 jj_consume_token(COLON);
3619 setMarker(fileToParse,
3620 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3624 "Line " + token.beginLine);
3625 } catch (CoreException e) {
3626 PHPeclipsePlugin.log(e);
3630 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3636 jj_la1[95] = jj_gen;
3639 cas = switchLabel0();
3643 jj_consume_token(ENDSWITCH);
3644 } catch (ParseException e) {
3645 errorMessage = "'endswitch' expected";
3647 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3648 errorEnd = SimpleCharStream.getPosition() + 1;
3649 {if (true) throw e;}
3652 jj_consume_token(SEMICOLON);
3653 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3654 cases.toArray(abcase);
3655 {if (true) return abcase;}
3656 } catch (ParseException e) {
3657 errorMessage = "';' expected after 'endswitch' keyword";
3659 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3660 errorEnd = SimpleCharStream.getPosition() + 1;
3661 {if (true) throw e;}
3663 throw new Error("Missing return statement in function");
3666 static final public AbstractCase switchLabel0() throws ParseException {
3667 final Expression expr;
3668 Statement statement;
3669 final ArrayList stmts = new ArrayList();
3670 final int pos = SimpleCharStream.getPosition();
3671 expr = SwitchLabel();
3674 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3708 case INTEGER_LITERAL:
3709 case FLOATING_POINT_LITERAL:
3710 case STRING_LITERAL:
3719 jj_la1[96] = jj_gen;
3722 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3755 case INTEGER_LITERAL:
3756 case FLOATING_POINT_LITERAL:
3757 case STRING_LITERAL:
3763 statement = BlockStatementNoBreak();
3764 stmts.add(statement);
3767 statement = htmlBlock();
3768 stmts.add(statement);
3771 jj_la1[97] = jj_gen;
3772 jj_consume_token(-1);
3773 throw new ParseException();
3776 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3778 statement = BreakStatement();
3779 stmts.add(statement);
3782 jj_la1[98] = jj_gen;
3785 final Statement[] stmtsArray = new Statement[stmts.size()];
3786 stmts.toArray(stmtsArray);
3787 if (expr == null) {//it's a default
3788 {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3790 {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3791 throw new Error("Missing return statement in function");
3796 * case Expression() :
3798 * @return the if it was a case and null if not
3800 static final public Expression SwitchLabel() throws ParseException {
3801 final Expression expr;
3802 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3804 token = jj_consume_token(CASE);
3806 expr = Expression();
3807 } catch (ParseException e) {
3808 if (errorMessage != null) {if (true) throw e;}
3809 errorMessage = "expression expected after 'case' keyword";
3811 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3812 errorEnd = SimpleCharStream.getPosition() + 1;
3813 {if (true) throw e;}
3816 jj_consume_token(COLON);
3817 {if (true) return expr;}
3818 } catch (ParseException e) {
3819 errorMessage = "':' expected after case expression";
3821 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3822 errorEnd = SimpleCharStream.getPosition() + 1;
3823 {if (true) throw e;}
3827 token = jj_consume_token(_DEFAULT);
3829 jj_consume_token(COLON);
3830 {if (true) return null;}
3831 } catch (ParseException e) {
3832 errorMessage = "':' expected after 'default' keyword";
3834 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3835 errorEnd = SimpleCharStream.getPosition() + 1;
3836 {if (true) throw e;}
3840 jj_la1[99] = jj_gen;
3841 jj_consume_token(-1);
3842 throw new ParseException();
3844 throw new Error("Missing return statement in function");
3847 static final public Break BreakStatement() throws ParseException {
3848 Expression expression = null;
3849 final int start = SimpleCharStream.getPosition();
3850 jj_consume_token(BREAK);
3851 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3866 case INTEGER_LITERAL:
3867 case FLOATING_POINT_LITERAL:
3868 case STRING_LITERAL:
3872 expression = Expression();
3875 jj_la1[100] = jj_gen;
3879 jj_consume_token(SEMICOLON);
3880 } catch (ParseException e) {
3881 errorMessage = "';' expected after 'break' keyword";
3883 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3884 errorEnd = SimpleCharStream.getPosition() + 1;
3885 {if (true) throw e;}
3887 {if (true) return new Break(expression, start, SimpleCharStream.getPosition());}
3888 throw new Error("Missing return statement in function");
3891 static final public IfStatement IfStatement() throws ParseException {
3892 final int pos = SimpleCharStream.getPosition();
3893 final Expression condition;
3894 final IfStatement ifStatement;
3895 jj_consume_token(IF);
3896 condition = Condition("if");
3897 ifStatement = IfStatement0(condition, pos,pos+2);
3898 {if (true) return ifStatement;}
3899 throw new Error("Missing return statement in function");
3902 static final public Expression Condition(final String keyword) throws ParseException {
3903 final Expression condition;
3905 jj_consume_token(LPAREN);
3906 } catch (ParseException e) {
3907 errorMessage = "'(' expected after " + keyword + " keyword";
3909 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length();
3910 errorEnd = errorStart +1;
3911 processParseExceptionDebug(e);
3913 condition = Expression();
3915 jj_consume_token(RPAREN);
3916 } catch (ParseException e) {
3917 errorMessage = "')' expected after " + keyword + " keyword";
3919 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3920 errorEnd = SimpleCharStream.getPosition() + 1;
3921 processParseExceptionDebug(e);
3923 {if (true) return condition;}
3924 throw new Error("Missing return statement in function");
3927 static final public IfStatement IfStatement0(final Expression condition, final int start,final int end) throws ParseException {
3928 Statement statement;
3929 final Statement stmt;
3930 final Statement[] statementsArray;
3931 ElseIf elseifStatement;
3932 Else elseStatement = null;
3933 final ArrayList stmts;
3934 final ArrayList elseIfList = new ArrayList();
3935 final ElseIf[] elseIfs;
3936 int pos = SimpleCharStream.getPosition();
3937 final int endStatements;
3938 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3940 jj_consume_token(COLON);
3941 stmts = new ArrayList();
3944 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3977 case INTEGER_LITERAL:
3978 case FLOATING_POINT_LITERAL:
3979 case STRING_LITERAL:
3988 jj_la1[101] = jj_gen;
3991 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4023 case INTEGER_LITERAL:
4024 case FLOATING_POINT_LITERAL:
4025 case STRING_LITERAL:
4031 statement = Statement();
4032 stmts.add(statement);
4035 statement = htmlBlock();
4036 stmts.add(statement);
4039 jj_la1[102] = jj_gen;
4040 jj_consume_token(-1);
4041 throw new ParseException();
4044 endStatements = SimpleCharStream.getPosition();
4047 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4052 jj_la1[103] = jj_gen;
4055 elseifStatement = ElseIfStatementColon();
4056 elseIfList.add(elseifStatement);
4058 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4060 elseStatement = ElseStatementColon();
4063 jj_la1[104] = jj_gen;
4067 setMarker(fileToParse,
4068 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4072 "Line " + token.beginLine);
4073 } catch (CoreException e) {
4074 PHPeclipsePlugin.log(e);
4077 jj_consume_token(ENDIF);
4078 } catch (ParseException e) {
4079 errorMessage = "'endif' expected";
4081 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4082 errorEnd = SimpleCharStream.getPosition() + 1;
4083 {if (true) throw e;}
4086 jj_consume_token(SEMICOLON);
4087 } catch (ParseException e) {
4088 errorMessage = "';' expected after 'endif' keyword";
4090 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4091 errorEnd = SimpleCharStream.getPosition() + 1;
4092 {if (true) throw e;}
4094 elseIfs = new ElseIf[elseIfList.size()];
4095 elseIfList.toArray(elseIfs);
4096 if (stmts.size() == 1) {
4097 {if (true) return new IfStatement(condition,
4098 (Statement) stmts.get(0),
4102 SimpleCharStream.getPosition());}
4104 statementsArray = new Statement[stmts.size()];
4105 stmts.toArray(statementsArray);
4106 {if (true) return new IfStatement(condition,
4107 new Block(statementsArray,pos,endStatements),
4111 SimpleCharStream.getPosition());}
4146 case INTEGER_LITERAL:
4147 case FLOATING_POINT_LITERAL:
4148 case STRING_LITERAL:
4154 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4186 case INTEGER_LITERAL:
4187 case FLOATING_POINT_LITERAL:
4188 case STRING_LITERAL:
4200 jj_la1[105] = jj_gen;
4201 jj_consume_token(-1);
4202 throw new ParseException();
4206 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4211 jj_la1[106] = jj_gen;
4214 elseifStatement = ElseIfStatement();
4215 elseIfList.add(elseifStatement);
4217 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4219 jj_consume_token(ELSE);
4221 pos = SimpleCharStream.getPosition();
4222 statement = Statement();
4223 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4224 } catch (ParseException e) {
4225 if (errorMessage != null) {
4226 {if (true) throw e;}
4228 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4230 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4231 errorEnd = SimpleCharStream.getPosition() + 1;
4232 {if (true) throw e;}
4236 jj_la1[107] = jj_gen;
4239 elseIfs = new ElseIf[elseIfList.size()];
4240 elseIfList.toArray(elseIfs);
4241 {if (true) return new IfStatement(condition,
4246 SimpleCharStream.getPosition());}
4249 jj_la1[108] = jj_gen;
4250 jj_consume_token(-1);
4251 throw new ParseException();
4253 throw new Error("Missing return statement in function");
4256 static final public ElseIf ElseIfStatementColon() throws ParseException {
4257 final Expression condition;
4258 Statement statement;
4259 final ArrayList list = new ArrayList();
4260 final int pos = SimpleCharStream.getPosition();
4261 jj_consume_token(ELSEIF);
4262 condition = Condition("elseif");
4263 jj_consume_token(COLON);
4266 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4299 case INTEGER_LITERAL:
4300 case FLOATING_POINT_LITERAL:
4301 case STRING_LITERAL:
4310 jj_la1[109] = jj_gen;
4313 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4345 case INTEGER_LITERAL:
4346 case FLOATING_POINT_LITERAL:
4347 case STRING_LITERAL:
4353 statement = Statement();
4354 list.add(statement);
4357 statement = htmlBlock();
4358 list.add(statement);
4361 jj_la1[110] = jj_gen;
4362 jj_consume_token(-1);
4363 throw new ParseException();
4366 final Statement[] stmtsArray = new Statement[list.size()];
4367 list.toArray(stmtsArray);
4368 {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4369 throw new Error("Missing return statement in function");
4372 static final public Else ElseStatementColon() throws ParseException {
4373 Statement statement;
4374 final ArrayList list = new ArrayList();
4375 final int pos = SimpleCharStream.getPosition();
4376 jj_consume_token(ELSE);
4377 jj_consume_token(COLON);
4380 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4413 case INTEGER_LITERAL:
4414 case FLOATING_POINT_LITERAL:
4415 case STRING_LITERAL:
4424 jj_la1[111] = jj_gen;
4427 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4459 case INTEGER_LITERAL:
4460 case FLOATING_POINT_LITERAL:
4461 case STRING_LITERAL:
4467 statement = Statement();
4468 list.add(statement);
4471 statement = htmlBlock();
4472 list.add(statement);
4475 jj_la1[112] = jj_gen;
4476 jj_consume_token(-1);
4477 throw new ParseException();
4480 final Statement[] stmtsArray = new Statement[list.size()];
4481 list.toArray(stmtsArray);
4482 {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4483 throw new Error("Missing return statement in function");
4486 static final public ElseIf ElseIfStatement() throws ParseException {
4487 final Expression condition;
4488 final Statement statement;
4489 final ArrayList list = new ArrayList();
4490 final int pos = SimpleCharStream.getPosition();
4491 jj_consume_token(ELSEIF);
4492 condition = Condition("elseif");
4493 statement = Statement();
4494 list.add(statement);/*todo:do better*/
4495 final Statement[] stmtsArray = new Statement[list.size()];
4496 list.toArray(stmtsArray);
4497 {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4498 throw new Error("Missing return statement in function");
4501 static final public WhileStatement WhileStatement() throws ParseException {
4502 final Expression condition;
4503 final Statement action;
4504 final int pos = SimpleCharStream.getPosition();
4505 jj_consume_token(WHILE);
4506 condition = Condition("while");
4507 action = WhileStatement0(pos,pos + 5);
4508 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4509 throw new Error("Missing return statement in function");
4512 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4513 Statement statement;
4514 final ArrayList stmts = new ArrayList();
4515 final int pos = SimpleCharStream.getPosition();
4516 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4518 jj_consume_token(COLON);
4521 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4553 case INTEGER_LITERAL:
4554 case FLOATING_POINT_LITERAL:
4555 case STRING_LITERAL:
4564 jj_la1[113] = jj_gen;
4567 statement = Statement();
4568 stmts.add(statement);
4571 setMarker(fileToParse,
4572 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4576 "Line " + token.beginLine);
4577 } catch (CoreException e) {
4578 PHPeclipsePlugin.log(e);
4581 jj_consume_token(ENDWHILE);
4582 } catch (ParseException e) {
4583 errorMessage = "'endwhile' expected";
4585 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4586 errorEnd = SimpleCharStream.getPosition() + 1;
4587 {if (true) throw e;}
4590 jj_consume_token(SEMICOLON);
4591 final Statement[] stmtsArray = new Statement[stmts.size()];
4592 stmts.toArray(stmtsArray);
4593 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4594 } catch (ParseException e) {
4595 errorMessage = "';' expected after 'endwhile' keyword";
4597 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4598 errorEnd = SimpleCharStream.getPosition() + 1;
4599 {if (true) throw e;}
4633 case INTEGER_LITERAL:
4634 case FLOATING_POINT_LITERAL:
4635 case STRING_LITERAL:
4641 statement = Statement();
4642 {if (true) return statement;}
4645 jj_la1[114] = jj_gen;
4646 jj_consume_token(-1);
4647 throw new ParseException();
4649 throw new Error("Missing return statement in function");
4652 static final public DoStatement DoStatement() throws ParseException {
4653 final Statement action;
4654 final Expression condition;
4655 final int pos = SimpleCharStream.getPosition();
4656 jj_consume_token(DO);
4657 action = Statement();
4658 jj_consume_token(WHILE);
4659 condition = Condition("while");
4661 jj_consume_token(SEMICOLON);
4662 {if (true) return new DoStatement(condition,action,pos,SimpleCharStream.getPosition());}
4663 } catch (ParseException e) {
4664 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4666 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4667 errorEnd = SimpleCharStream.getPosition() + 1;
4668 {if (true) throw e;}
4670 throw new Error("Missing return statement in function");
4673 static final public ForeachStatement ForeachStatement() throws ParseException {
4674 Statement statement;
4675 Expression expression;
4676 final int pos = SimpleCharStream.getPosition();
4677 ArrayVariableDeclaration variable;
4678 jj_consume_token(FOREACH);
4680 jj_consume_token(LPAREN);
4681 } catch (ParseException e) {
4682 errorMessage = "'(' expected after 'foreach' keyword";
4684 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4685 errorEnd = SimpleCharStream.getPosition() + 1;
4686 {if (true) throw e;}
4689 expression = Expression();
4690 } catch (ParseException e) {
4691 errorMessage = "variable expected";
4693 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4694 errorEnd = SimpleCharStream.getPosition() + 1;
4695 {if (true) throw e;}
4698 jj_consume_token(AS);
4699 } catch (ParseException e) {
4700 errorMessage = "'as' expected";
4702 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4703 errorEnd = SimpleCharStream.getPosition() + 1;
4704 {if (true) throw e;}
4707 variable = ArrayVariable();
4708 } catch (ParseException e) {
4709 errorMessage = "variable expected";
4711 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4712 errorEnd = SimpleCharStream.getPosition() + 1;
4713 {if (true) throw e;}
4716 jj_consume_token(RPAREN);
4717 } catch (ParseException e) {
4718 errorMessage = "')' expected after 'foreach' keyword";
4720 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4721 errorEnd = SimpleCharStream.getPosition() + 1;
4722 {if (true) throw e;}
4725 statement = Statement();
4726 } catch (ParseException e) {
4727 if (errorMessage != null) {if (true) throw e;}
4728 errorMessage = "statement expected";
4730 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4731 errorEnd = SimpleCharStream.getPosition() + 1;
4732 {if (true) throw e;}
4734 {if (true) return new ForeachStatement(expression,
4738 SimpleCharStream.getPosition());}
4739 throw new Error("Missing return statement in function");
4742 static final public ForStatement ForStatement() throws ParseException {
4744 final int pos = SimpleCharStream.getPosition();
4745 Expression[] initializations = null;
4746 Expression condition = null;
4747 Expression[] increments = null;
4749 final ArrayList list = new ArrayList();
4750 final int startBlock, endBlock;
4751 token = jj_consume_token(FOR);
4753 jj_consume_token(LPAREN);
4754 } catch (ParseException e) {
4755 errorMessage = "'(' expected after 'for' keyword";
4757 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4758 errorEnd = SimpleCharStream.getPosition() + 1;
4759 {if (true) throw e;}
4761 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4769 initializations = ForInit();
4772 jj_la1[115] = jj_gen;
4775 jj_consume_token(SEMICOLON);
4776 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4791 case INTEGER_LITERAL:
4792 case FLOATING_POINT_LITERAL:
4793 case STRING_LITERAL:
4797 condition = Expression();
4800 jj_la1[116] = jj_gen;
4803 jj_consume_token(SEMICOLON);
4804 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4812 increments = StatementExpressionList();
4815 jj_la1[117] = jj_gen;
4818 jj_consume_token(RPAREN);
4819 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4851 case INTEGER_LITERAL:
4852 case FLOATING_POINT_LITERAL:
4853 case STRING_LITERAL:
4859 action = Statement();
4860 {if (true) return new ForStatement(initializations,condition,increments,action,pos,SimpleCharStream.getPosition());}
4863 jj_consume_token(COLON);
4864 startBlock = SimpleCharStream.getPosition();
4867 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4899 case INTEGER_LITERAL:
4900 case FLOATING_POINT_LITERAL:
4901 case STRING_LITERAL:
4910 jj_la1[118] = jj_gen;
4913 action = Statement();
4917 setMarker(fileToParse,
4918 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
4920 pos+token.image.length(),
4922 "Line " + token.beginLine);
4923 } catch (CoreException e) {
4924 PHPeclipsePlugin.log(e);
4926 endBlock = SimpleCharStream.getPosition();
4928 jj_consume_token(ENDFOR);
4929 } catch (ParseException e) {
4930 errorMessage = "'endfor' expected";
4932 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4933 errorEnd = SimpleCharStream.getPosition() + 1;
4934 {if (true) throw e;}
4937 jj_consume_token(SEMICOLON);
4938 final Statement[] stmtsArray = new Statement[list.size()];
4939 list.toArray(stmtsArray);
4940 {if (true) return new ForStatement(initializations,condition,increments,new Block(stmtsArray,startBlock,endBlock),pos,SimpleCharStream.getPosition());}
4941 } catch (ParseException e) {
4942 errorMessage = "';' expected after 'endfor' keyword";
4944 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4945 errorEnd = SimpleCharStream.getPosition() + 1;
4946 {if (true) throw e;}
4950 jj_la1[119] = jj_gen;
4951 jj_consume_token(-1);
4952 throw new ParseException();
4954 throw new Error("Missing return statement in function");
4957 static final public Expression[] ForInit() throws ParseException {
4958 final Expression[] exprs;
4959 if (jj_2_5(2147483647)) {
4960 exprs = LocalVariableDeclaration();
4961 {if (true) return exprs;}
4963 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4971 exprs = StatementExpressionList();
4972 {if (true) return exprs;}
4975 jj_la1[120] = jj_gen;
4976 jj_consume_token(-1);
4977 throw new ParseException();
4980 throw new Error("Missing return statement in function");
4983 static final public Expression[] StatementExpressionList() throws ParseException {
4984 final ArrayList list = new ArrayList();
4985 final Expression expr;
4986 expr = StatementExpression();
4990 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4995 jj_la1[121] = jj_gen;
4998 jj_consume_token(COMMA);
4999 StatementExpression();
5002 final Expression[] exprsArray = new Expression[list.size()];
5003 list.toArray(exprsArray);
5004 {if (true) return exprsArray;}
5005 throw new Error("Missing return statement in function");
5008 static final public Continue ContinueStatement() throws ParseException {
5009 Expression expr = null;
5010 final int pos = SimpleCharStream.getPosition();
5011 jj_consume_token(CONTINUE);
5012 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5027 case INTEGER_LITERAL:
5028 case FLOATING_POINT_LITERAL:
5029 case STRING_LITERAL:
5033 expr = Expression();
5036 jj_la1[122] = jj_gen;
5040 jj_consume_token(SEMICOLON);
5041 {if (true) return new Continue(expr,pos,SimpleCharStream.getPosition());}
5042 } catch (ParseException e) {
5043 errorMessage = "';' expected after 'continue' statement";
5045 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5046 errorEnd = SimpleCharStream.getPosition() + 1;
5047 {if (true) throw e;}
5049 throw new Error("Missing return statement in function");
5052 static final public ReturnStatement ReturnStatement() throws ParseException {
5053 Expression expr = null;
5054 final int pos = SimpleCharStream.getPosition();
5055 jj_consume_token(RETURN);
5056 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5071 case INTEGER_LITERAL:
5072 case FLOATING_POINT_LITERAL:
5073 case STRING_LITERAL:
5077 expr = Expression();
5080 jj_la1[123] = jj_gen;
5084 jj_consume_token(SEMICOLON);
5085 {if (true) return new ReturnStatement(expr,pos,SimpleCharStream.getPosition());}
5086 } catch (ParseException e) {
5087 errorMessage = "';' expected after 'return' statement";
5089 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5090 errorEnd = SimpleCharStream.getPosition() + 1;
5091 {if (true) throw e;}
5093 throw new Error("Missing return statement in function");
5096 static final private boolean jj_2_1(int xla) {
5097 jj_la = xla; jj_lastpos = jj_scanpos = token;
5098 boolean retval = !jj_3_1();
5103 static final private boolean jj_2_2(int xla) {
5104 jj_la = xla; jj_lastpos = jj_scanpos = token;
5105 boolean retval = !jj_3_2();
5110 static final private boolean jj_2_3(int xla) {
5111 jj_la = xla; jj_lastpos = jj_scanpos = token;
5112 boolean retval = !jj_3_3();
5117 static final private boolean jj_2_4(int xla) {
5118 jj_la = xla; jj_lastpos = jj_scanpos = token;
5119 boolean retval = !jj_3_4();
5124 static final private boolean jj_2_5(int xla) {
5125 jj_la = xla; jj_lastpos = jj_scanpos = token;
5126 boolean retval = !jj_3_5();
5131 static final private boolean jj_3R_142() {
5132 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
5133 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5137 static final private boolean jj_3R_141() {
5138 if (jj_scan_token(RSIGNEDSHIFT)) return true;
5139 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5143 static final private boolean jj_3R_140() {
5144 if (jj_scan_token(LSHIFT)) return true;
5145 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5149 static final private boolean jj_3_4() {
5150 if (jj_3R_43()) return true;
5151 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5155 static final private boolean jj_3R_133() {
5162 if (jj_3R_142()) return true;
5163 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5164 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5165 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5166 if (jj_3R_132()) return true;
5167 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5171 static final private boolean jj_3R_125() {
5172 if (jj_3R_132()) return true;
5173 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5177 if (jj_3R_133()) { jj_scanpos = xsp; break; }
5178 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5183 static final private boolean jj_3R_199() {
5184 if (jj_scan_token(COMMA)) return true;
5185 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5189 static final private boolean jj_3_2() {
5190 if (jj_scan_token(COMMA)) return true;
5191 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5192 if (jj_3R_40()) return true;
5193 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5197 static final private boolean jj_3_5() {
5198 if (jj_3R_44()) return true;
5199 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5203 static final private boolean jj_3R_137() {
5204 if (jj_scan_token(GE)) return true;
5205 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5209 static final private boolean jj_3R_136() {
5210 if (jj_scan_token(LE)) return true;
5211 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5215 static final private boolean jj_3R_198() {
5216 if (jj_3R_40()) return true;
5217 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5221 if (jj_3_2()) { jj_scanpos = xsp; break; }
5222 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5227 static final private boolean jj_3R_135() {
5228 if (jj_scan_token(GT)) return true;
5229 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5233 static final private boolean jj_3R_134() {
5234 if (jj_scan_token(LT)) return true;
5235 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5239 static final private boolean jj_3R_126() {
5248 if (jj_3R_137()) return true;
5249 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5250 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5251 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5252 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5253 if (jj_3R_125()) return true;
5254 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5258 static final private boolean jj_3R_121() {
5259 if (jj_3R_125()) return true;
5260 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5264 if (jj_3R_126()) { jj_scanpos = xsp; break; }
5265 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5270 static final private boolean jj_3R_196() {
5271 if (jj_scan_token(LPAREN)) return true;
5272 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5275 if (jj_3R_198()) jj_scanpos = xsp;
5276 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5278 if (jj_3R_199()) jj_scanpos = xsp;
5279 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5280 if (jj_scan_token(RPAREN)) return true;
5281 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5285 static final private boolean jj_3R_201() {
5286 if (jj_scan_token(COMMA)) return true;
5287 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5288 if (jj_3R_47()) return true;
5289 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5293 static final private boolean jj_3R_200() {
5294 if (jj_3R_47()) return true;
5295 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5299 if (jj_3R_201()) { jj_scanpos = xsp; break; }
5300 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5305 static final private boolean jj_3R_202() {
5306 if (jj_scan_token(ARRAYASSIGN)) return true;
5307 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5308 if (jj_3R_47()) return true;
5309 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5313 static final private boolean jj_3R_40() {
5314 if (jj_3R_47()) return true;
5315 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5318 if (jj_3R_202()) jj_scanpos = xsp;
5319 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5323 static final private boolean jj_3R_197() {
5324 if (jj_3R_200()) return true;
5325 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5329 static final private boolean jj_3R_71() {
5330 if (jj_3R_48()) return true;
5331 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5335 static final private boolean jj_3R_131() {
5336 if (jj_scan_token(TRIPLEEQUAL)) return true;
5337 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5341 static final private boolean jj_3R_130() {
5342 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5343 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5347 static final private boolean jj_3R_129() {
5348 if (jj_scan_token(NOT_EQUAL)) return true;
5349 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5353 static final private boolean jj_3R_128() {
5354 if (jj_scan_token(DIF)) return true;
5355 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5359 static final private boolean jj_3R_127() {
5360 if (jj_scan_token(EQUAL_EQUAL)) return true;
5361 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5365 static final private boolean jj_3R_122() {
5376 if (jj_3R_131()) return true;
5377 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5378 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5379 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5380 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5381 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5382 if (jj_3R_121()) return true;
5383 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5387 static final private boolean jj_3R_192() {
5388 if (jj_scan_token(LPAREN)) return true;
5389 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5392 if (jj_3R_197()) jj_scanpos = xsp;
5393 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5394 if (jj_scan_token(RPAREN)) return true;
5395 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5399 static final private boolean jj_3R_116() {
5400 if (jj_3R_121()) return true;
5401 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5405 if (jj_3R_122()) { jj_scanpos = xsp; break; }
5406 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5411 static final private boolean jj_3R_180() {
5412 if (jj_scan_token(NULL)) return true;
5413 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5417 static final private boolean jj_3R_179() {
5418 if (jj_scan_token(FALSE)) return true;
5419 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5423 static final private boolean jj_3R_178() {
5424 if (jj_scan_token(TRUE)) return true;
5425 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5429 static final private boolean jj_3R_177() {
5430 if (jj_scan_token(STRING_LITERAL)) return true;
5431 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5435 static final private boolean jj_3R_117() {
5436 if (jj_scan_token(BIT_AND)) return true;
5437 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5438 if (jj_3R_116()) return true;
5439 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5443 static final private boolean jj_3R_176() {
5444 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
5445 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5449 static final private boolean jj_3R_170() {
5462 if (jj_3R_180()) return true;
5463 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5464 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5465 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5466 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5467 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5468 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5472 static final private boolean jj_3R_175() {
5473 if (jj_scan_token(INTEGER_LITERAL)) return true;
5474 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5478 static final private boolean jj_3R_114() {
5479 if (jj_3R_116()) return true;
5480 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5484 if (jj_3R_117()) { jj_scanpos = xsp; break; }
5485 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5490 static final private boolean jj_3R_70() {
5491 if (jj_3R_47()) return true;
5492 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5496 static final private boolean jj_3R_52() {
5501 if (jj_3R_71()) return true;
5502 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5503 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5507 static final private boolean jj_3R_69() {
5508 if (jj_scan_token(DOLLAR_ID)) return true;
5509 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5513 static final private boolean jj_3R_115() {
5514 if (jj_scan_token(XOR)) return true;
5515 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5516 if (jj_3R_114()) return true;
5517 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5521 static final private boolean jj_3R_112() {
5522 if (jj_3R_114()) return true;
5523 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5527 if (jj_3R_115()) { jj_scanpos = xsp; break; }
5528 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5533 static final private boolean jj_3R_68() {
5534 if (jj_scan_token(DOLLAR)) return true;
5535 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5536 if (jj_3R_51()) return true;
5537 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5541 static final private boolean jj_3R_46() {
5542 if (jj_scan_token(LBRACKET)) return true;
5543 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5546 if (jj_3R_52()) jj_scanpos = xsp;
5547 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5548 if (jj_scan_token(RBRACKET)) return true;
5549 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5553 static final private boolean jj_3R_113() {
5554 if (jj_scan_token(BIT_OR)) return true;
5555 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5556 if (jj_3R_112()) return true;
5557 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5561 static final private boolean jj_3R_106() {
5562 if (jj_3R_112()) return true;
5563 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5567 if (jj_3R_113()) { jj_scanpos = xsp; break; }
5568 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5573 static final private boolean jj_3R_45() {
5574 if (jj_scan_token(CLASSACCESS)) return true;
5575 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5576 if (jj_3R_51()) return true;
5577 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5581 static final private boolean jj_3R_39() {
5586 if (jj_3R_46()) return true;
5587 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5588 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5592 static final private boolean jj_3R_105() {
5593 if (jj_scan_token(LBRACE)) return true;
5594 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5595 if (jj_3R_47()) return true;
5596 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5597 if (jj_scan_token(RBRACE)) return true;
5598 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5602 static final private boolean jj_3R_109() {
5603 if (jj_scan_token(DOT)) return true;
5604 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5605 if (jj_3R_106()) return true;
5606 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5610 static final private boolean jj_3R_67() {
5611 if (jj_scan_token(IDENTIFIER)) return true;
5612 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5615 if (jj_3R_105()) jj_scanpos = xsp;
5616 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5620 static final private boolean jj_3R_99() {
5621 if (jj_3R_106()) return true;
5622 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5626 if (jj_3R_109()) { jj_scanpos = xsp; break; }
5627 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5632 static final private boolean jj_3R_195() {
5633 if (jj_3R_123()) return true;
5634 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5638 static final private boolean jj_3R_194() {
5639 if (jj_3R_48()) return true;
5640 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5644 static final private boolean jj_3R_193() {
5645 if (jj_scan_token(IDENTIFIER)) return true;
5646 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5650 static final private boolean jj_3R_190() {
5657 if (jj_3R_195()) return true;
5658 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5659 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5660 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5664 static final private boolean jj_3R_111() {
5665 if (jj_scan_token(_ANDL)) return true;
5666 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5670 static final private boolean jj_3R_110() {
5671 if (jj_scan_token(AND_AND)) return true;
5672 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5676 static final private boolean jj_3R_102() {
5681 if (jj_3R_111()) return true;
5682 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5683 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5684 if (jj_3R_99()) return true;
5685 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5689 static final private boolean jj_3R_51() {
5698 if (jj_3R_69()) return true;
5699 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5700 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5701 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5702 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5706 static final private boolean jj_3R_66() {
5707 if (jj_scan_token(LBRACE)) return true;
5708 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5709 if (jj_3R_47()) return true;
5710 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5711 if (jj_scan_token(RBRACE)) return true;
5712 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5716 static final private boolean jj_3R_83() {
5717 if (jj_3R_99()) return true;
5718 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5722 if (jj_3R_102()) { jj_scanpos = xsp; break; }
5723 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5728 static final private boolean jj_3R_80() {
5729 if (jj_scan_token(HOOK)) return true;
5730 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5731 if (jj_3R_47()) return true;
5732 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5733 if (jj_scan_token(COLON)) return true;
5734 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5735 if (jj_3R_72()) return true;
5736 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5740 static final private boolean jj_3R_104() {
5741 if (jj_scan_token(_ORL)) return true;
5742 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5746 static final private boolean jj_3R_103() {
5747 if (jj_scan_token(OR_OR)) return true;
5748 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5752 static final private boolean jj_3R_120() {
5753 if (jj_scan_token(ASSIGN)) return true;
5754 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5755 if (jj_3R_47()) return true;
5756 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5760 static final private boolean jj_3R_85() {
5765 if (jj_3R_104()) return true;
5766 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5767 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5768 if (jj_3R_83()) return true;
5769 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5773 static final private boolean jj_3R_76() {
5774 if (jj_scan_token(DOLLAR)) return true;
5775 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5776 if (jj_3R_51()) return true;
5777 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5781 static final private boolean jj_3R_77() {
5782 if (jj_3R_83()) return true;
5783 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5787 if (jj_3R_85()) { jj_scanpos = xsp; break; }
5788 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5793 static final private boolean jj_3R_124() {
5794 if (jj_3R_123()) return true;
5795 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5799 static final private boolean jj_3R_181() {
5800 if (jj_scan_token(ARRAY)) return true;
5801 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5802 if (jj_3R_196()) return true;
5803 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5807 static final private boolean jj_3R_119() {
5808 if (jj_scan_token(COMMA)) return true;
5809 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5812 if (jj_3R_124()) jj_scanpos = xsp;
5813 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5817 static final private boolean jj_3R_82() {
5818 if (jj_scan_token(LBRACE)) return true;
5819 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5820 if (jj_3R_47()) return true;
5821 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5822 if (jj_scan_token(RBRACE)) return true;
5823 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5827 static final private boolean jj_3R_75() {
5828 if (jj_scan_token(DOLLAR_ID)) return true;
5829 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5832 if (jj_3R_82()) jj_scanpos = xsp;
5833 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5837 static final private boolean jj_3R_64() {
5842 if (jj_3R_76()) return true;
5843 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5844 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5848 static final private boolean jj_3R_72() {
5849 if (jj_3R_77()) return true;
5850 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5853 if (jj_3R_80()) jj_scanpos = xsp;
5854 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5858 static final private boolean jj_3R_118() {
5859 if (jj_3R_123()) return true;
5860 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5864 static final private boolean jj_3R_174() {
5865 if (jj_3R_181()) return true;
5866 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5870 static final private boolean jj_3R_191() {
5871 if (jj_3R_192()) return true;
5872 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5876 static final private boolean jj_3R_98() {
5877 if (jj_scan_token(TILDEEQUAL)) return true;
5878 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5882 static final private boolean jj_3R_97() {
5883 if (jj_scan_token(DOTASSIGN)) return true;
5884 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5888 static final private boolean jj_3R_96() {
5889 if (jj_scan_token(ORASSIGN)) return true;
5890 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5894 static final private boolean jj_3R_95() {
5895 if (jj_scan_token(XORASSIGN)) return true;
5896 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5900 static final private boolean jj_3R_94() {
5901 if (jj_scan_token(ANDASSIGN)) return true;
5902 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5906 static final private boolean jj_3R_93() {
5907 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
5908 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5912 static final private boolean jj_3R_173() {
5913 if (jj_scan_token(NEW)) return true;
5914 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5915 if (jj_3R_190()) return true;
5916 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5919 if (jj_3R_191()) jj_scanpos = xsp;
5920 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5924 static final private boolean jj_3R_107() {
5925 if (jj_scan_token(LIST)) return true;
5926 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5927 if (jj_scan_token(LPAREN)) return true;
5928 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5931 if (jj_3R_118()) jj_scanpos = xsp;
5932 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5935 if (jj_3R_119()) { jj_scanpos = xsp; break; }
5936 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5938 if (jj_scan_token(RPAREN)) return true;
5939 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5941 if (jj_3R_120()) jj_scanpos = xsp;
5942 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5946 static final private boolean jj_3R_189() {
5947 if (jj_3R_192()) return true;
5948 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5952 static final private boolean jj_3R_92() {
5953 if (jj_scan_token(LSHIFTASSIGN)) return true;
5954 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5958 static final private boolean jj_3R_91() {
5959 if (jj_scan_token(MINUSASSIGN)) return true;
5960 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5964 static final private boolean jj_3R_90() {
5965 if (jj_scan_token(PLUSASSIGN)) return true;
5966 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5970 static final private boolean jj_3R_89() {
5971 if (jj_scan_token(REMASSIGN)) return true;
5972 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5976 static final private boolean jj_3R_172() {
5977 if (jj_3R_123()) return true;
5978 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5981 if (jj_3R_189()) jj_scanpos = xsp;
5982 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5986 static final private boolean jj_3R_188() {
5987 if (jj_3R_192()) return true;
5988 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5992 static final private boolean jj_3R_88() {
5993 if (jj_scan_token(SLASHASSIGN)) return true;
5994 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5998 static final private boolean jj_3R_87() {
5999 if (jj_scan_token(STARASSIGN)) return true;
6000 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6004 static final private boolean jj_3R_86() {
6005 if (jj_scan_token(ASSIGN)) return true;
6006 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6010 static final private boolean jj_3R_81() {
6037 if (jj_3R_98()) return true;
6038 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6039 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6040 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6041 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6042 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6043 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6044 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6045 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6046 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6047 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6048 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6049 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6050 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6054 static final private boolean jj_3R_187() {
6055 if (jj_scan_token(STATICCLASSACCESS)) return true;
6056 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6057 if (jj_3R_190()) return true;
6058 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6062 static final private boolean jj_3R_108() {
6063 if (jj_scan_token(PRINT)) return true;
6064 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6065 if (jj_3R_47()) return true;
6066 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6070 static final private boolean jj_3_1() {
6071 if (jj_3R_39()) return true;
6072 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6076 static final private boolean jj_3R_101() {
6077 if (jj_3R_108()) return true;
6078 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6082 static final private boolean jj_3R_167() {
6091 if (jj_3R_174()) return true;
6092 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6093 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6094 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6095 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6099 static final private boolean jj_3R_171() {
6100 if (jj_scan_token(IDENTIFIER)) return true;
6101 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6105 if (jj_3R_187()) { jj_scanpos = xsp; break; }
6106 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6109 if (jj_3R_188()) jj_scanpos = xsp;
6110 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6114 static final private boolean jj_3R_123() {
6115 if (jj_3R_64()) return true;
6116 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6120 if (jj_3_1()) { jj_scanpos = xsp; break; }
6121 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6126 static final private boolean jj_3R_100() {
6127 if (jj_3R_107()) return true;
6128 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6132 static final private boolean jj_3R_84() {
6137 if (jj_3R_101()) return true;
6138 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6139 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6143 static final private boolean jj_3R_79() {
6144 if (jj_3R_84()) return true;
6145 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6149 static final private boolean jj_3R_78() {
6150 if (jj_scan_token(BANG)) return true;
6151 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6152 if (jj_3R_73()) return true;
6153 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6157 static final private boolean jj_3R_73() {
6162 if (jj_3R_79()) return true;
6163 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6164 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6168 static final private boolean jj_3R_186() {
6169 if (jj_scan_token(MINUS_MINUS)) return true;
6170 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6174 static final private boolean jj_3R_185() {
6175 if (jj_scan_token(PLUS_PLUS)) return true;
6176 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6180 static final private boolean jj_3R_184() {
6185 if (jj_3R_186()) return true;
6186 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6187 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6191 static final private boolean jj_3R_54() {
6192 if (jj_3R_73()) return true;
6193 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6197 static final private boolean jj_3R_169() {
6198 if (jj_3R_167()) return true;
6199 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6202 if (jj_3R_184()) jj_scanpos = xsp;
6203 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6207 static final private boolean jj_3R_183() {
6208 if (jj_scan_token(ARRAY)) return true;
6209 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6213 static final private boolean jj_3R_182() {
6214 if (jj_3R_48()) return true;
6215 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6219 static final private boolean jj_3R_42() {
6220 if (jj_scan_token(ARRAY)) return true;
6221 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6225 static final private boolean jj_3R_168() {
6226 if (jj_scan_token(LPAREN)) return true;
6227 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6232 if (jj_3R_183()) return true;
6233 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6234 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6235 if (jj_scan_token(RPAREN)) return true;
6236 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6237 if (jj_3R_143()) return true;
6238 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6242 static final private boolean jj_3R_41() {
6243 if (jj_3R_48()) return true;
6244 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6248 static final private boolean jj_3R_74() {
6249 if (jj_3R_81()) return true;
6250 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6251 if (jj_3R_47()) return true;
6252 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6256 static final private boolean jj_3_3() {
6257 if (jj_scan_token(LPAREN)) return true;
6258 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6263 if (jj_3R_42()) return true;
6264 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6265 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6266 if (jj_scan_token(RPAREN)) return true;
6267 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6271 static final private boolean jj_3R_47() {
6276 if (jj_3R_54()) return true;
6277 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6278 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6282 static final private boolean jj_3R_53() {
6283 if (jj_3R_72()) return true;
6284 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6287 if (jj_3R_74()) jj_scanpos = xsp;
6288 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6292 static final private boolean jj_3R_166() {
6293 if (jj_scan_token(LPAREN)) return true;
6294 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6295 if (jj_3R_47()) return true;
6296 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6297 if (jj_scan_token(RPAREN)) return true;
6298 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6302 static final private boolean jj_3R_165() {
6303 if (jj_3R_170()) return true;
6304 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6308 static final private boolean jj_3R_164() {
6309 if (jj_3R_169()) return true;
6310 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6314 static final private boolean jj_3R_160() {
6323 if (jj_3R_166()) return true;
6324 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6325 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6326 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6327 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6331 static final private boolean jj_3R_163() {
6332 if (jj_3R_168()) return true;
6333 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6337 static final private boolean jj_3R_63() {
6338 if (jj_scan_token(OBJECT)) return true;
6339 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6343 static final private boolean jj_3R_62() {
6344 if (jj_scan_token(INTEGER)) return true;
6345 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6349 static final private boolean jj_3R_61() {
6350 if (jj_scan_token(INT)) return true;
6351 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6355 static final private boolean jj_3R_60() {
6356 if (jj_scan_token(FLOAT)) return true;
6357 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6361 static final private boolean jj_3R_59() {
6362 if (jj_scan_token(DOUBLE)) return true;
6363 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6367 static final private boolean jj_3R_58() {
6368 if (jj_scan_token(REAL)) return true;
6369 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6373 static final private boolean jj_3R_57() {
6374 if (jj_scan_token(BOOLEAN)) return true;
6375 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6379 static final private boolean jj_3R_56() {
6380 if (jj_scan_token(BOOL)) return true;
6381 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6385 static final private boolean jj_3R_162() {
6386 if (jj_scan_token(MINUS_MINUS)) return true;
6387 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6391 static final private boolean jj_3R_48() {
6410 if (jj_3R_63()) return true;
6411 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6412 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6413 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6414 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6415 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6416 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6417 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6418 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6419 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6423 static final private boolean jj_3R_55() {
6424 if (jj_scan_token(STRING)) return true;
6425 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6429 static final private boolean jj_3R_161() {
6430 if (jj_scan_token(PLUS_PLUS)) return true;
6431 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6435 static final private boolean jj_3R_159() {
6440 if (jj_3R_162()) return true;
6441 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6442 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6443 if (jj_3R_167()) return true;
6444 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6448 static final private boolean jj_3R_65() {
6449 if (jj_scan_token(ASSIGN)) return true;
6450 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6451 if (jj_3R_47()) return true;
6452 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6456 static final private boolean jj_3R_158() {
6457 if (jj_3R_160()) return true;
6458 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6462 static final private boolean jj_3R_157() {
6463 if (jj_3R_159()) return true;
6464 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6468 static final private boolean jj_3R_156() {
6469 if (jj_scan_token(MINUS)) return true;
6470 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6471 if (jj_3R_147()) return true;
6472 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6476 static final private boolean jj_3R_154() {
6485 if (jj_3R_158()) return true;
6486 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6487 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6488 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6489 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6493 static final private boolean jj_3R_155() {
6494 if (jj_scan_token(PLUS)) return true;
6495 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6496 if (jj_3R_147()) return true;
6497 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6501 static final private boolean jj_3R_153() {
6502 if (jj_3R_154()) return true;
6503 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6507 static final private boolean jj_3R_49() {
6508 if (jj_3R_64()) return true;
6509 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6512 if (jj_3R_65()) jj_scanpos = xsp;
6513 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6517 static final private boolean jj_3R_152() {
6518 if (jj_scan_token(BANG)) return true;
6519 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6520 if (jj_3R_147()) return true;
6521 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6525 static final private boolean jj_3R_147() {
6532 if (jj_3R_153()) return true;
6533 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6534 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6535 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6539 static final private boolean jj_3R_151() {
6540 if (jj_scan_token(AT)) return true;
6541 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6542 if (jj_3R_147()) return true;
6543 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6547 static final private boolean jj_3R_50() {
6548 if (jj_scan_token(COMMA)) return true;
6549 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6550 if (jj_3R_49()) return true;
6551 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6555 static final private boolean jj_3R_44() {
6556 if (jj_3R_49()) return true;
6557 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6561 if (jj_3R_50()) { jj_scanpos = xsp; break; }
6562 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6567 static final private boolean jj_3R_143() {
6568 if (jj_3R_147()) return true;
6569 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6573 static final private boolean jj_3R_150() {
6574 if (jj_scan_token(REMAINDER)) return true;
6575 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6579 static final private boolean jj_3R_149() {
6580 if (jj_scan_token(SLASH)) return true;
6581 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6585 static final private boolean jj_3R_148() {
6586 if (jj_scan_token(STAR)) return true;
6587 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6591 static final private boolean jj_3R_144() {
6598 if (jj_3R_150()) return true;
6599 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6600 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6601 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6602 if (jj_3R_143()) return true;
6603 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6607 static final private boolean jj_3R_43() {
6608 if (jj_3R_47()) return true;
6609 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6610 if (jj_scan_token(SEMICOLON)) return true;
6611 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6615 static final private boolean jj_3R_138() {
6616 if (jj_3R_143()) return true;
6617 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6621 if (jj_3R_144()) { jj_scanpos = xsp; break; }
6622 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6627 static final private boolean jj_3R_146() {
6628 if (jj_scan_token(MINUS)) return true;
6629 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6633 static final private boolean jj_3R_145() {
6634 if (jj_scan_token(PLUS)) return true;
6635 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6639 static final private boolean jj_3R_139() {
6644 if (jj_3R_146()) return true;
6645 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6646 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6647 if (jj_3R_138()) return true;
6648 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6652 static final private boolean jj_3R_132() {
6653 if (jj_3R_138()) return true;
6654 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6658 if (jj_3R_139()) { jj_scanpos = xsp; break; }
6659 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6664 static private boolean jj_initialized_once = false;
6665 static public PHPParserTokenManager token_source;
6666 static SimpleCharStream jj_input_stream;
6667 static public Token token, jj_nt;
6668 static private int jj_ntk;
6669 static private Token jj_scanpos, jj_lastpos;
6670 static private int jj_la;
6671 static public boolean lookingAhead = false;
6672 static private boolean jj_semLA;
6673 static private int jj_gen;
6674 static final private int[] jj_la1 = new int[124];
6675 static private int[] jj_la1_0;
6676 static private int[] jj_la1_1;
6677 static private int[] jj_la1_2;
6678 static private int[] jj_la1_3;
6679 static private int[] jj_la1_4;
6687 private static void jj_la1_0() {
6688 jj_la1_0 = new int[] {0xf960001e,0x6,0x6,0xf960001e,0x0,0xf9600000,0x0,0xc00000,0xc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x68000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x68000000,0x60000000,0x60000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x8000000,0x0,0x8000000,0x8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x8000000,0x0,0x68000000,0x68000000,0x0,0x0,0x68000000,0x0,0x0,0x81000000,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,};
6690 private static void jj_la1_1() {
6691 jj_la1_1 = new int[] {0x875d507f,0x0,0x0,0x875d507f,0x0,0x875d507f,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3080000,0x200,0x30c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30c0000,0x30c0000,0x0,0x30c0000,0x0,0x0,0x0,0x100,0x0,0x0,0x0,0x40000,0x40000,0x0,0x30c0000,0x30c0000,0x80,0x3080000,0x30c0000,0x0,0x0,0x8451507f,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,};
6693 private static void jj_la1_2() {
6694 jj_la1_2 = new int[] {0x3c1c00,0x0,0x0,0x3c1c00,0x0,0x3c1c00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x800,0x0,0x0,0x300000,0x0,0x3c1c00,0x0,0x1000000,0x0,0x1000000,0x1000000,0x3fe,0x0,0x3c1c00,0x1000,0x0,0x0,0x4000,0x80010000,0x80010000,0x20000,0x20000,0x0,0x2000000,0x4000000,0x1000000,0x0,0x0,0x0,0x0,0x70000000,0x70000000,0x300000,0x300000,0x8c00000,0x8c00000,0x3c1c00,0x3c0800,0xc0000,0x800,0x3fe,0xc0000,0xc0000,0x0,0x0,0x0,0x0,0x800,0x800,0xbfe,0x3c1ffe,0x3c1ffe,0x0,0x0,0x3c1c00,0x0,0x400,0x400,0x3c1c00,0x0,0x0,0x0,0x800,0x0,0x800,0x0,0x0,0x0,0x0,0x3c1c00,0x3c1c00,0x3c1c00,0x3c1c00,0x0,0x0,0xc0000,0xc0000,0xc0800,0x8000,0x0,0x0,0x3c1c00,0x3c1c00,0x0,0x0,0x3c1c00,0x3c1c00,0x3c1c00,0x0,0x0,0x3c1c00,0x0,0x0,0x3c9c00,0x3c1c00,0x3c1c00,0x3c1c00,0x3c1c00,0x3c1c00,0x3c9c00,0xc0800,0x3c1c00,0xc0800,0x3c1c00,0x3c9c00,0xc0800,0x0,0x3c1c00,0x3c1c00,};
6696 private static void jj_la1_3() {
6697 jj_la1_3 = new int[] {0x2288a2,0x0,0x0,0x2288a2,0x200000,0x2288a2,0x0,0x0,0x0,0x400000,0x0,0x0,0x20000,0x0,0x20000,0x20800,0x22,0x22,0x8a2,0x0,0x88a2,0x400000,0x0,0x400000,0x0,0x0,0x0,0x0,0x88a2,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x800000,0x0,0x0,0x0,0xe4000000,0xe4000000,0x1b000000,0x1b000000,0x0,0x0,0x0,0x0,0x0,0x0,0x88a2,0x88a2,0x0,0x88a2,0x0,0x0,0x0,0x0,0x8000,0x8000,0x8000,0x800,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,};
6699 private static void jj_la1_4() {
6700 jj_la1_4 = new int[] {0x4000,0x0,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x2,0x2,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x0,0x3ffe,0x4000,0x0,0x0,0x3ffe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x4000,0x0,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x4000,0x2,0x0,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x0,0x2,0x0,0x0,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,};
6702 static final private JJCalls[] jj_2_rtns = new JJCalls[5];
6703 static private boolean jj_rescan = false;
6704 static private int jj_gc = 0;
6706 public PHPParser(java.io.InputStream stream) {
6707 if (jj_initialized_once) {
6708 System.out.println("ERROR: Second call to constructor of static parser. You must");
6709 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6710 System.out.println(" during parser generation.");
6713 jj_initialized_once = true;
6714 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6715 token_source = new PHPParserTokenManager(jj_input_stream);
6716 token = new Token();
6719 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6720 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6723 static public void ReInit(java.io.InputStream stream) {
6724 jj_input_stream.ReInit(stream, 1, 1);
6725 token_source.ReInit(jj_input_stream);
6726 token = new Token();
6729 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6730 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6733 public PHPParser(java.io.Reader stream) {
6734 if (jj_initialized_once) {
6735 System.out.println("ERROR: Second call to constructor of static parser. You must");
6736 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6737 System.out.println(" during parser generation.");
6740 jj_initialized_once = true;
6741 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6742 token_source = new PHPParserTokenManager(jj_input_stream);
6743 token = new Token();
6746 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6747 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6750 static public void ReInit(java.io.Reader stream) {
6751 jj_input_stream.ReInit(stream, 1, 1);
6752 token_source.ReInit(jj_input_stream);
6753 token = new Token();
6756 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6757 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6760 public PHPParser(PHPParserTokenManager tm) {
6761 if (jj_initialized_once) {
6762 System.out.println("ERROR: Second call to constructor of static parser. You must");
6763 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6764 System.out.println(" during parser generation.");
6767 jj_initialized_once = true;
6769 token = new Token();
6772 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6773 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6776 public void ReInit(PHPParserTokenManager tm) {
6778 token = new Token();
6781 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6782 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6785 static final private Token jj_consume_token(int kind) throws ParseException {
6787 if ((oldToken = token).next != null) token = token.next;
6788 else token = token.next = token_source.getNextToken();
6790 if (token.kind == kind) {
6792 if (++jj_gc > 100) {
6794 for (int i = 0; i < jj_2_rtns.length; i++) {
6795 JJCalls c = jj_2_rtns[i];
6797 if (c.gen < jj_gen) c.first = null;
6806 throw generateParseException();
6809 static final private boolean jj_scan_token(int kind) {
6810 if (jj_scanpos == jj_lastpos) {
6812 if (jj_scanpos.next == null) {
6813 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
6815 jj_lastpos = jj_scanpos = jj_scanpos.next;
6818 jj_scanpos = jj_scanpos.next;
6821 int i = 0; Token tok = token;
6822 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
6823 if (tok != null) jj_add_error_token(kind, i);
6825 return (jj_scanpos.kind != kind);
6828 static final public Token getNextToken() {
6829 if (token.next != null) token = token.next;
6830 else token = token.next = token_source.getNextToken();
6836 static final public Token getToken(int index) {
6837 Token t = lookingAhead ? jj_scanpos : token;
6838 for (int i = 0; i < index; i++) {
6839 if (t.next != null) t = t.next;
6840 else t = t.next = token_source.getNextToken();
6845 static final private int jj_ntk() {
6846 if ((jj_nt=token.next) == null)
6847 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
6849 return (jj_ntk = jj_nt.kind);
6852 static private java.util.Vector jj_expentries = new java.util.Vector();
6853 static private int[] jj_expentry;
6854 static private int jj_kind = -1;
6855 static private int[] jj_lasttokens = new int[100];
6856 static private int jj_endpos;
6858 static private void jj_add_error_token(int kind, int pos) {
6859 if (pos >= 100) return;
6860 if (pos == jj_endpos + 1) {
6861 jj_lasttokens[jj_endpos++] = kind;
6862 } else if (jj_endpos != 0) {
6863 jj_expentry = new int[jj_endpos];
6864 for (int i = 0; i < jj_endpos; i++) {
6865 jj_expentry[i] = jj_lasttokens[i];
6867 boolean exists = false;
6868 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
6869 int[] oldentry = (int[])(enum.nextElement());
6870 if (oldentry.length == jj_expentry.length) {
6872 for (int i = 0; i < jj_expentry.length; i++) {
6873 if (oldentry[i] != jj_expentry[i]) {
6881 if (!exists) jj_expentries.addElement(jj_expentry);
6882 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
6886 static public ParseException generateParseException() {
6887 jj_expentries.removeAllElements();
6888 boolean[] la1tokens = new boolean[143];
6889 for (int i = 0; i < 143; i++) {
6890 la1tokens[i] = false;
6893 la1tokens[jj_kind] = true;
6896 for (int i = 0; i < 124; i++) {
6897 if (jj_la1[i] == jj_gen) {
6898 for (int j = 0; j < 32; j++) {
6899 if ((jj_la1_0[i] & (1<<j)) != 0) {
6900 la1tokens[j] = true;
6902 if ((jj_la1_1[i] & (1<<j)) != 0) {
6903 la1tokens[32+j] = true;
6905 if ((jj_la1_2[i] & (1<<j)) != 0) {
6906 la1tokens[64+j] = true;
6908 if ((jj_la1_3[i] & (1<<j)) != 0) {
6909 la1tokens[96+j] = true;
6911 if ((jj_la1_4[i] & (1<<j)) != 0) {
6912 la1tokens[128+j] = true;
6917 for (int i = 0; i < 143; i++) {
6919 jj_expentry = new int[1];
6921 jj_expentries.addElement(jj_expentry);
6926 jj_add_error_token(0, 0);
6927 int[][] exptokseq = new int[jj_expentries.size()][];
6928 for (int i = 0; i < jj_expentries.size(); i++) {
6929 exptokseq[i] = (int[])jj_expentries.elementAt(i);
6931 return new ParseException(token, exptokseq, tokenImage);
6934 static final public void enable_tracing() {
6937 static final public void disable_tracing() {
6940 static final private void jj_rescan_token() {
6942 for (int i = 0; i < 5; i++) {
6943 JJCalls p = jj_2_rtns[i];
6945 if (p.gen > jj_gen) {
6946 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
6948 case 0: jj_3_1(); break;
6949 case 1: jj_3_2(); break;
6950 case 2: jj_3_3(); break;
6951 case 3: jj_3_4(); break;
6952 case 4: jj_3_5(); break;
6956 } while (p != null);
6961 static final private void jj_save(int index, int xla) {
6962 JJCalls p = jj_2_rtns[index];
6963 while (p.gen > jj_gen) {
6964 if (p.next == null) { p = p.next = new JJCalls(); break; }
6967 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
6970 static final class JJCalls {