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 //todo : fix the variables names bug
34 //todo : handle tilde operator
37 /** The current segment. */
38 private static OutlineableWithChildren currentSegment;
40 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
41 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
42 static PHPOutlineInfo outlineInfo;
44 /** The error level of the current ParseException. */
45 private static int errorLevel = ERROR;
46 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
47 private static String errorMessage;
49 private static int errorStart = -1;
50 private static int errorEnd = -1;
51 private static PHPDocument phpDocument;
53 private static final String SYNTAX_ERROR_CHAR = "syntax error";
55 * The point where html starts.
56 * It will be used by the token manager to create HTMLCode objects
58 public static int htmlStart;
61 private final static int AstStackIncrement = 100;
62 /** The stack of node. */
63 private static AstNode[] nodes;
64 /** The cursor in expression stack. */
65 private static int nodePtr;
67 private static final boolean PARSER_DEBUG = true;
69 public final void setFileToParse(final IFile fileToParse) {
70 PHPParser.fileToParse = fileToParse;
76 public PHPParser(final IFile fileToParse) {
77 this(new StringReader(""));
78 PHPParser.fileToParse = fileToParse;
81 public static final void phpParserTester(final String strEval) throws ParseException {
82 final StringReader stream = new StringReader(strEval);
83 if (jj_input_stream == null) {
84 jj_input_stream = new SimpleCharStream(stream, 1, 1);
86 ReInit(new StringReader(strEval));
88 phpDocument = new PHPDocument(null,"_root".toCharArray());
89 currentSegment = phpDocument;
90 outlineInfo = new PHPOutlineInfo(null, currentSegment);
91 PHPParserTokenManager.SwitchTo(PHPParserTokenManager.PHPPARSING);
95 public static final void htmlParserTester(final File fileName) throws FileNotFoundException, ParseException {
96 final Reader stream = new FileReader(fileName);
97 if (jj_input_stream == null) {
98 jj_input_stream = new SimpleCharStream(stream, 1, 1);
102 phpDocument = new PHPDocument(null,"_root".toCharArray());
103 currentSegment = phpDocument;
104 outlineInfo = new PHPOutlineInfo(null, currentSegment);
108 public static final void htmlParserTester(final String strEval) throws ParseException {
109 final StringReader stream = new StringReader(strEval);
110 if (jj_input_stream == null) {
111 jj_input_stream = new SimpleCharStream(stream, 1, 1);
115 phpDocument = new PHPDocument(null,"_root".toCharArray());
116 currentSegment = phpDocument;
117 outlineInfo = new PHPOutlineInfo(null, currentSegment);
122 * Reinitialize the parser.
124 private static final void init() {
125 nodes = new AstNode[AstStackIncrement];
131 * Add an php node on the stack.
132 * @param node the node that will be added to the stack
134 private static final void pushOnAstNodes(final AstNode node) {
136 nodes[++nodePtr] = node;
137 } catch (IndexOutOfBoundsException e) {
138 final int oldStackLength = nodes.length;
139 final AstNode[] oldStack = nodes;
140 nodes = new AstNode[oldStackLength + AstStackIncrement];
141 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
142 nodePtr = oldStackLength;
143 nodes[nodePtr] = node;
147 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
148 phpDocument = new PHPDocument(parent,"_root".toCharArray());
149 currentSegment = phpDocument;
150 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
151 final StringReader stream = new StringReader(s);
152 if (jj_input_stream == null) {
153 jj_input_stream = new SimpleCharStream(stream, 1, 1);
159 phpDocument.nodes = new AstNode[nodes.length];
160 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
161 if (PHPeclipsePlugin.DEBUG) {
162 PHPeclipsePlugin.log(1,phpDocument.toString());
164 } catch (ParseException e) {
165 processParseException(e);
170 private static void processParseExceptionDebug(final ParseException e) throws ParseException {
174 processParseException(e);
177 * This method will process the parse exception.
178 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
179 * @param e the ParseException
181 private static void processParseException(final ParseException e) {
182 if (errorMessage == null) {
183 PHPeclipsePlugin.log(e);
184 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
185 errorStart = e.currentToken.sourceStart;
186 errorEnd = e.currentToken.sourceEnd;
190 // if (PHPeclipsePlugin.DEBUG) PHPeclipsePlugin.log(e);
194 * Create marker for the parse error.
195 * @param e the ParseException
197 private static void setMarker(final ParseException e) {
199 if (errorStart == -1) {
200 setMarker(fileToParse,
202 e.currentToken.sourceStart,
203 e.currentToken.sourceEnd,
205 "Line " + e.currentToken.beginLine);
207 setMarker(fileToParse,
212 "Line " + e.currentToken.beginLine);
216 } catch (CoreException e2) {
217 PHPeclipsePlugin.log(e2);
221 private static void scanLine(final String output,
224 final int brIndx) throws CoreException {
226 final StringBuffer lineNumberBuffer = new StringBuffer(10);
228 current = output.substring(indx, brIndx);
230 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
231 final int onLine = current.indexOf("on line <b>");
233 lineNumberBuffer.delete(0, lineNumberBuffer.length());
234 for (int i = onLine; i < current.length(); i++) {
235 ch = current.charAt(i);
236 if ('0' <= ch && '9' >= ch) {
237 lineNumberBuffer.append(ch);
241 final int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
243 final Hashtable attributes = new Hashtable();
245 current = current.replaceAll("\n", "");
246 current = current.replaceAll("<b>", "");
247 current = current.replaceAll("</b>", "");
248 MarkerUtilities.setMessage(attributes, current);
250 if (current.indexOf(PARSE_ERROR_STRING) != -1)
251 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
252 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
253 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
255 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
256 MarkerUtilities.setLineNumber(attributes, lineNumber);
257 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
262 public final void parse(final String s) {
263 final StringReader stream = new StringReader(s);
264 if (jj_input_stream == null) {
265 jj_input_stream = new SimpleCharStream(stream, 1, 1);
271 } catch (ParseException e) {
272 processParseException(e);
277 * Call the php parse command ( php -l -f <filename> )
278 * and create markers according to the external parser output
280 public static void phpExternalParse(final IFile file) {
281 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
282 final String filename = file.getLocation().toString();
284 final String[] arguments = { filename };
285 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
286 final String command = form.format(arguments);
288 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
291 // parse the buffer to find the errors and warnings
292 createMarkers(parserResult, file);
293 } catch (CoreException e) {
294 PHPeclipsePlugin.log(e);
299 * Put a new html block in the stack.
301 public static final void createNewHTMLCode() {
302 final int currentPosition = token.sourceStart;
303 if (currentPosition == htmlStart ||
304 currentPosition > SimpleCharStream.currentBuffer.length()) {
307 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray();
308 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
311 /** Create a new task. */
312 public static final void createNewTask() {
313 final int currentPosition = token.sourceStart;
314 final String todo = SimpleCharStream.currentBuffer.substring(currentPosition-3,
315 SimpleCharStream.currentBuffer.indexOf("\n",
319 setMarker(fileToParse,
321 SimpleCharStream.getBeginLine(),
323 "Line "+SimpleCharStream.getBeginLine());
324 } catch (CoreException e) {
325 PHPeclipsePlugin.log(e);
330 private static final void parse() throws ParseException {
334 static final public void phpTest() throws ParseException {
339 static final public void phpFile() throws ParseException {
343 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
382 case INTEGER_LITERAL:
383 case FLOATING_POINT_LITERAL:
398 PHPParser.createNewHTMLCode();
399 } catch (TokenMgrError e) {
400 PHPeclipsePlugin.log(e);
401 errorStart = SimpleCharStream.getPosition();
402 errorEnd = errorStart + 1;
403 errorMessage = e.getMessage();
405 {if (true) throw generateParseException();}
410 * A php block is a <?= expression [;]?>
411 * or <?php somephpcode ?>
412 * or <? somephpcode ?>
414 static final public void PhpBlock() throws ParseException {
415 final PHPEchoBlock phpEchoBlock;
417 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
419 phpEchoBlock = phpEchoBlock();
420 pushOnAstNodes(phpEchoBlock);
459 case INTEGER_LITERAL:
460 case FLOATING_POINT_LITERAL:
467 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
470 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
472 jj_consume_token(PHPSTARTLONG);
475 token = jj_consume_token(PHPSTARTSHORT);
477 setMarker(fileToParse,
478 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
482 "Line " + token.beginLine);
483 } catch (CoreException e) {
484 PHPeclipsePlugin.log(e);
489 jj_consume_token(-1);
490 throw new ParseException();
499 jj_consume_token(PHPEND);
500 } catch (ParseException e) {
501 errorMessage = "'?>' expected";
503 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
504 errorEnd = SimpleCharStream.getPosition() + 1;
505 processParseExceptionDebug(e);
510 jj_consume_token(-1);
511 throw new ParseException();
515 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
516 final Expression expr;
517 final PHPEchoBlock echoBlock;
518 final Token token, token2;
519 token = jj_consume_token(PHPECHOSTART);
521 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
523 jj_consume_token(SEMICOLON);
529 token2 = jj_consume_token(PHPEND);
530 echoBlock = new PHPEchoBlock(expr,token.sourceStart,token2.sourceEnd);
531 pushOnAstNodes(echoBlock);
532 {if (true) return echoBlock;}
533 throw new Error("Missing return statement in function");
536 static final public void Php() throws ParseException {
539 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
574 case INTEGER_LITERAL:
575 case FLOATING_POINT_LITERAL:
592 static final public ClassDeclaration ClassDeclaration() throws ParseException {
593 final ClassDeclaration classDeclaration;
594 Token className = null;
595 final Token superclassName, token;
596 String classNameImage = SYNTAX_ERROR_CHAR;
597 String superclassNameImage = null;
598 token = jj_consume_token(CLASS);
600 className = jj_consume_token(IDENTIFIER);
601 classNameImage = className.image;
602 } catch (ParseException e) {
603 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
605 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
606 errorEnd = SimpleCharStream.getPosition() + 1;
607 processParseExceptionDebug(e);
609 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
611 jj_consume_token(EXTENDS);
613 superclassName = jj_consume_token(IDENTIFIER);
614 superclassNameImage = superclassName.image;
615 } catch (ParseException e) {
616 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
618 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
619 errorEnd = SimpleCharStream.getPosition() + 1;
620 processParseExceptionDebug(e);
621 superclassNameImage = SYNTAX_ERROR_CHAR;
629 if (className == null) {
630 start = token.sourceStart;
631 end = token.sourceEnd;
633 start = className.sourceStart;
634 end = className.sourceEnd;
636 if (superclassNameImage == null) {
638 classDeclaration = new ClassDeclaration(currentSegment,
643 classDeclaration = new ClassDeclaration(currentSegment,
649 currentSegment.add(classDeclaration);
650 currentSegment = classDeclaration;
651 ClassBody(classDeclaration);
652 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
653 classDeclaration.sourceEnd = SimpleCharStream.getPosition();
654 pushOnAstNodes(classDeclaration);
655 {if (true) return classDeclaration;}
656 throw new Error("Missing return statement in function");
659 static final public void ClassBody(final ClassDeclaration classDeclaration) throws ParseException {
661 jj_consume_token(LBRACE);
662 } catch (ParseException e) {
663 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "'. '{' expected";
665 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
666 errorEnd = SimpleCharStream.getPosition() + 1;
667 processParseExceptionDebug(e);
671 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
680 ClassBodyDeclaration(classDeclaration);
683 jj_consume_token(RBRACE);
684 } catch (ParseException e) {
685 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. 'var', 'function' or '}' expected";
687 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
688 errorEnd = SimpleCharStream.getPosition() + 1;
689 processParseExceptionDebug(e);
694 * A class can contain only methods and fields.
696 static final public void ClassBodyDeclaration(final ClassDeclaration classDeclaration) throws ParseException {
697 final MethodDeclaration method;
698 final FieldDeclaration field;
699 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
701 method = MethodDeclaration();
702 method.analyzeCode();
703 classDeclaration.addMethod(method);
706 field = FieldDeclaration();
707 classDeclaration.addField(field);
711 jj_consume_token(-1);
712 throw new ParseException();
717 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
718 * it is only used by ClassBodyDeclaration()
720 static final public FieldDeclaration FieldDeclaration() throws ParseException {
721 VariableDeclaration variableDeclaration;
722 final VariableDeclaration[] list;
723 final ArrayList arrayList = new ArrayList();
726 token = jj_consume_token(VAR);
727 variableDeclaration = VariableDeclaratorNoSuffix();
728 arrayList.add(variableDeclaration);
729 outlineInfo.addVariable(variableDeclaration.name());
732 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
740 jj_consume_token(COMMA);
741 variableDeclaration = VariableDeclaratorNoSuffix();
742 arrayList.add(variableDeclaration);
743 outlineInfo.addVariable(variableDeclaration.name());
746 token2 = jj_consume_token(SEMICOLON);
747 } catch (ParseException e) {
748 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
750 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
751 errorEnd = SimpleCharStream.getPosition() + 1;
752 processParseExceptionDebug(e);
754 list = new VariableDeclaration[arrayList.size()];
755 arrayList.toArray(list);
757 if (token2 == null) {
758 end = list[list.length-1].sourceEnd;
760 end = token2.sourceEnd;
762 {if (true) return new FieldDeclaration(list,
766 throw new Error("Missing return statement in function");
770 * a strict variable declarator : there cannot be a suffix here.
771 * It will be used by fields and formal parameters
773 static final public VariableDeclaration VariableDeclaratorNoSuffix() throws ParseException {
775 Expression initializer = null;
777 varName = jj_consume_token(DOLLAR_ID);
778 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
780 assignToken = jj_consume_token(ASSIGN);
782 initializer = VariableInitializer();
783 } catch (ParseException e) {
784 errorMessage = "Literal expression expected in variable initializer";
786 errorStart = assignToken.sourceEnd +1;
787 errorEnd = assignToken.sourceEnd +1;
788 processParseExceptionDebug(e);
795 if (initializer == null) {
796 {if (true) return new VariableDeclaration(currentSegment,
797 new Variable(varName.image.substring(1),
798 varName.sourceStart+1,
799 varName.sourceEnd+1),
800 varName.sourceStart+1,
801 varName.sourceEnd+1);}
803 {if (true) return new VariableDeclaration(currentSegment,
804 new Variable(varName.image.substring(1),
805 varName.sourceStart+1,
806 varName.sourceEnd+1),
808 VariableDeclaration.EQUAL,
809 varName.sourceStart+1);}
810 throw new Error("Missing return statement in function");
814 * this will be used by static statement
816 static final public VariableDeclaration VariableDeclarator() throws ParseException {
817 final AbstractVariable variable;
818 Expression initializer = null;
819 variable = VariableDeclaratorId();
820 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
822 jj_consume_token(ASSIGN);
824 initializer = VariableInitializer();
825 } catch (ParseException e) {
826 errorMessage = "Literal expression expected in variable initializer";
828 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
829 errorEnd = SimpleCharStream.getPosition() + 1;
830 processParseExceptionDebug(e);
837 if (initializer == null) {
838 {if (true) return new VariableDeclaration(currentSegment,
840 variable.sourceStart,
841 variable.sourceEnd);}
843 {if (true) return new VariableDeclaration(currentSegment,
846 VariableDeclaration.EQUAL,
847 variable.sourceStart);}
848 throw new Error("Missing return statement in function");
853 * @return the variable name (with suffix)
855 static final public AbstractVariable VariableDeclaratorId() throws ParseException {
857 AbstractVariable expression = null;
867 expression = VariableSuffix(var);
869 if (expression == null) {
870 {if (true) return var;}
872 {if (true) return expression;}
873 } catch (ParseException e) {
874 errorMessage = "'$' expected for variable identifier";
876 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
877 errorEnd = SimpleCharStream.getPosition() + 1;
880 throw new Error("Missing return statement in function");
884 * Return a variablename without the $.
885 * @return a variable name
889 final StringBuffer buff;
890 Expression expression = null;
897 [<LBRACE> expression = Expression() <RBRACE>]
899 if (expression == null) {
900 return new Variable(token.image.substring(1),
904 String s = expression.toStringExpression();
905 buff = new StringBuffer(token.image.length()+s.length()+2);
906 buff.append(token.image);
911 return new Variable(s,token.sourceStart+1,token.sourceEnd+1);
915 expr = VariableName()
916 {return new Variable(expr,token.sourceStart,expr.sourceEnd);}
918 static final public Variable Variable() throws ParseException {
919 Variable variable = null;
921 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
923 token = jj_consume_token(DOLLAR_ID);
924 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
929 variable = Var(token);
935 if (variable == null) {
936 {if (true) return new Variable(token.image.substring(1),token.sourceStart+1,token.sourceEnd+1);}
938 final StringBuffer buff = new StringBuffer();
939 buff.append(token.image.substring(1));
940 buff.append(variable.toStringExpression());
941 {if (true) return new Variable(buff.toString(),token.sourceStart+1,variable.sourceEnd+1);}
944 token = jj_consume_token(DOLLAR);
945 variable = Var(token);
946 {if (true) return new Variable(variable,token.sourceStart,variable.sourceEnd);}
950 jj_consume_token(-1);
951 throw new ParseException();
953 throw new Error("Missing return statement in function");
956 static final public Variable Var(final Token dollar) throws ParseException {
957 Variable variable = null;
959 ConstantIdentifier constant;
960 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
962 token = jj_consume_token(DOLLAR_ID);
963 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
968 variable = Var(token);
974 if (variable == null) {
975 {if (true) return new Variable(token.image.substring(1),token.sourceStart+1,token.sourceEnd+1);}
977 final StringBuffer buff = new StringBuffer();
978 buff.append(token.image.substring(1));
979 buff.append(variable.toStringExpression());
980 {if (true) return new Variable(buff.toString(),dollar.sourceStart,variable.sourceEnd);}
984 if (jj_2_2(2147483647)) {
985 token = jj_consume_token(DOLLAR);
986 variable = Var(token);
987 {if (true) return new Variable(variable,dollar.sourceStart,variable.sourceEnd);}
989 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
992 constant = VariableName();
993 {if (true) return new Variable(constant.name,dollar.sourceStart,constant.sourceEnd);}
997 jj_consume_token(-1);
998 throw new ParseException();
1002 throw new Error("Missing return statement in function");
1006 * A Variable name (without the $)
1007 * @return a variable name String
1009 static final public ConstantIdentifier VariableName() throws ParseException {
1010 final StringBuffer buff;
1012 Expression expression = null;
1014 Token token2 = null;
1015 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1017 token = jj_consume_token(LBRACE);
1018 expression = Expression();
1019 token2 = jj_consume_token(RBRACE);
1020 expr = expression.toStringExpression();
1021 buff = new StringBuffer(expr.length()+2);
1025 expr = buff.toString();
1026 {if (true) return new ConstantIdentifier(expr,
1031 token = jj_consume_token(IDENTIFIER);
1032 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1034 jj_consume_token(LBRACE);
1035 expression = Expression();
1036 token2 = jj_consume_token(RBRACE);
1039 jj_la1[17] = jj_gen;
1042 if (expression == null) {
1043 {if (true) return new ConstantIdentifier(token.image,
1047 expr = expression.toStringExpression();
1048 buff = new StringBuffer(token.image.length()+expr.length()+2);
1049 buff.append(token.image);
1053 expr = buff.toString();
1054 {if (true) return new ConstantIdentifier(expr,
1059 jj_la1[18] = jj_gen;
1060 jj_consume_token(-1);
1061 throw new ParseException();
1063 throw new Error("Missing return statement in function");
1066 static final public Expression VariableInitializer() throws ParseException {
1067 final Expression expr;
1068 final Token token, token2;
1069 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1073 case INTEGER_LITERAL:
1074 case FLOATING_POINT_LITERAL:
1075 case STRING_LITERAL:
1077 {if (true) return expr;}
1080 token2 = jj_consume_token(MINUS);
1081 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1082 case INTEGER_LITERAL:
1083 token = jj_consume_token(INTEGER_LITERAL);
1085 case FLOATING_POINT_LITERAL:
1086 token = jj_consume_token(FLOATING_POINT_LITERAL);
1089 jj_la1[19] = jj_gen;
1090 jj_consume_token(-1);
1091 throw new ParseException();
1093 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
1095 token2.sourceStart);}
1098 token2 = jj_consume_token(PLUS);
1099 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1100 case INTEGER_LITERAL:
1101 token = jj_consume_token(INTEGER_LITERAL);
1103 case FLOATING_POINT_LITERAL:
1104 token = jj_consume_token(FLOATING_POINT_LITERAL);
1107 jj_la1[20] = jj_gen;
1108 jj_consume_token(-1);
1109 throw new ParseException();
1111 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
1113 token2.sourceStart);}
1116 expr = ArrayDeclarator();
1117 {if (true) return expr;}
1120 token = jj_consume_token(IDENTIFIER);
1121 {if (true) return new ConstantIdentifier(token);}
1124 jj_la1[21] = jj_gen;
1125 jj_consume_token(-1);
1126 throw new ParseException();
1128 throw new Error("Missing return statement in function");
1131 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
1132 final Expression expr,expr2;
1133 expr = Expression();
1134 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1136 jj_consume_token(ARRAYASSIGN);
1137 expr2 = Expression();
1138 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
1141 jj_la1[22] = jj_gen;
1144 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
1145 throw new Error("Missing return statement in function");
1148 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
1149 ArrayVariableDeclaration expr;
1150 final ArrayList list = new ArrayList();
1151 jj_consume_token(LPAREN);
1152 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1168 case INTEGER_LITERAL:
1169 case FLOATING_POINT_LITERAL:
1170 case STRING_LITERAL:
1174 expr = ArrayVariable();
1183 jj_consume_token(COMMA);
1184 expr = ArrayVariable();
1189 jj_la1[23] = jj_gen;
1192 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1194 jj_consume_token(COMMA);
1198 jj_la1[24] = jj_gen;
1201 jj_consume_token(RPAREN);
1202 final ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1204 {if (true) return vars;}
1205 throw new Error("Missing return statement in function");
1209 * A Method Declaration.
1210 * <b>function</b> MetodDeclarator() Block()
1212 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1213 final MethodDeclaration functionDeclaration;
1215 final OutlineableWithChildren seg = currentSegment;
1217 token = jj_consume_token(FUNCTION);
1219 functionDeclaration = MethodDeclarator(token.sourceStart);
1220 outlineInfo.addVariable(new String(functionDeclaration.name));
1221 } catch (ParseException e) {
1222 if (errorMessage != null) {if (true) throw e;}
1223 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1225 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1226 errorEnd = SimpleCharStream.getPosition() + 1;
1227 {if (true) throw e;}
1229 currentSegment = functionDeclaration;
1231 functionDeclaration.statements = block.statements;
1232 currentSegment = seg;
1233 {if (true) return functionDeclaration;}
1234 throw new Error("Missing return statement in function");
1238 * A MethodDeclarator.
1239 * [&] IDENTIFIER(parameters ...).
1240 * @return a function description for the outline
1242 static final public MethodDeclaration MethodDeclarator(final int start) throws ParseException {
1243 Token identifier = null;
1244 Token reference = null;
1245 final Hashtable formalParameters = new Hashtable();
1246 String identifierChar = SYNTAX_ERROR_CHAR;
1248 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1250 reference = jj_consume_token(BIT_AND);
1253 jj_la1[25] = jj_gen;
1257 identifier = jj_consume_token(IDENTIFIER);
1258 identifierChar = identifier.image;
1259 } catch (ParseException e) {
1260 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1262 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1263 errorEnd = SimpleCharStream.getPosition() + 1;
1264 processParseExceptionDebug(e);
1266 end = FormalParameters(formalParameters);
1267 int nameStart, nameEnd;
1268 if (identifier == null) {
1269 if (reference == null) {
1270 nameStart = start + 9;
1271 nameEnd = start + 10;
1273 nameStart = reference.sourceEnd + 1;
1274 nameEnd = reference.sourceEnd + 2;
1277 nameStart = identifier.sourceStart;
1278 nameEnd = identifier.sourceEnd;
1280 {if (true) return new MethodDeclaration(currentSegment,
1288 throw new Error("Missing return statement in function");
1292 * FormalParameters follows method identifier.
1293 * (FormalParameter())
1295 static final public int FormalParameters(final Hashtable parameters) throws ParseException {
1296 VariableDeclaration var;
1300 jj_consume_token(LPAREN);
1301 } catch (ParseException e) {
1302 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1304 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1305 errorEnd = SimpleCharStream.getPosition() + 1;
1306 processParseExceptionDebug(e);
1308 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1311 var = FormalParameter();
1312 parameters.put(new String(var.name()),var);
1315 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1320 jj_la1[26] = jj_gen;
1323 jj_consume_token(COMMA);
1324 var = FormalParameter();
1325 parameters.put(new String(var.name()),var);
1329 jj_la1[27] = jj_gen;
1333 token = jj_consume_token(RPAREN);
1334 end = token.sourceEnd;
1335 } catch (ParseException e) {
1336 errorMessage = "')' expected";
1338 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1339 errorEnd = SimpleCharStream.getPosition() + 1;
1340 processParseExceptionDebug(e);
1341 end = e.currentToken.sourceStart;
1343 {if (true) return end;}
1344 throw new Error("Missing return statement in function");
1348 * A formal parameter.
1349 * $varname[=value] (,$varname[=value])
1351 static final public VariableDeclaration FormalParameter() throws ParseException {
1352 final VariableDeclaration variableDeclaration;
1354 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1356 token = jj_consume_token(BIT_AND);
1359 jj_la1[28] = jj_gen;
1362 variableDeclaration = VariableDeclaratorNoSuffix();
1363 if (token != null) {
1364 variableDeclaration.setReference(true);
1366 {if (true) return variableDeclaration;}
1367 throw new Error("Missing return statement in function");
1370 static final public ConstantIdentifier Type() throws ParseException {
1372 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1374 token = jj_consume_token(STRING);
1375 {if (true) return new ConstantIdentifier(token);}
1378 token = jj_consume_token(BOOL);
1379 {if (true) return new ConstantIdentifier(token);}
1382 token = jj_consume_token(BOOLEAN);
1383 {if (true) return new ConstantIdentifier(token);}
1386 token = jj_consume_token(REAL);
1387 {if (true) return new ConstantIdentifier(token);}
1390 token = jj_consume_token(DOUBLE);
1391 {if (true) return new ConstantIdentifier(token);}
1394 token = jj_consume_token(FLOAT);
1395 {if (true) return new ConstantIdentifier(token);}
1398 token = jj_consume_token(INT);
1399 {if (true) return new ConstantIdentifier(token);}
1402 token = jj_consume_token(INTEGER);
1403 {if (true) return new ConstantIdentifier(token);}
1406 token = jj_consume_token(OBJECT);
1407 {if (true) return new ConstantIdentifier(token);}
1410 jj_la1[29] = jj_gen;
1411 jj_consume_token(-1);
1412 throw new ParseException();
1414 throw new Error("Missing return statement in function");
1417 static final public Expression Expression() throws ParseException {
1418 final Expression expr;
1419 Expression initializer = null;
1420 int assignOperator = -1;
1421 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1435 case INTEGER_LITERAL:
1436 case FLOATING_POINT_LITERAL:
1437 case STRING_LITERAL:
1441 expr = ConditionalExpression();
1442 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1455 case RSIGNEDSHIFTASSIGN:
1456 assignOperator = AssignmentOperator();
1458 initializer = Expression();
1459 } catch (ParseException e) {
1460 if (errorMessage != null) {
1461 {if (true) throw e;}
1463 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1465 errorEnd = SimpleCharStream.getPosition();
1466 {if (true) throw e;}
1470 jj_la1[30] = jj_gen;
1473 if (assignOperator != -1) {// todo : change this, very very bad :(
1474 if (expr instanceof AbstractVariable) {
1475 {if (true) return new VariableDeclaration(currentSegment,
1476 (AbstractVariable) expr,
1479 initializer.sourceEnd);}
1481 String varName = expr.toStringExpression().substring(1);
1482 {if (true) return new VariableDeclaration(currentSegment,
1483 new Variable(varName,
1487 initializer.sourceEnd);}
1489 {if (true) return expr;}
1493 expr = ExpressionWBang();
1494 {if (true) return expr;}
1497 jj_la1[31] = jj_gen;
1498 jj_consume_token(-1);
1499 throw new ParseException();
1501 throw new Error("Missing return statement in function");
1504 static final public Expression ExpressionWBang() throws ParseException {
1505 final Expression expr;
1507 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1509 token = jj_consume_token(BANG);
1510 expr = ExpressionWBang();
1511 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
1515 expr = ExpressionNoBang();
1516 {if (true) return expr;}
1519 jj_la1[32] = jj_gen;
1520 jj_consume_token(-1);
1521 throw new ParseException();
1523 throw new Error("Missing return statement in function");
1526 static final public Expression ExpressionNoBang() throws ParseException {
1528 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1530 expr = ListExpression();
1531 {if (true) return expr;}
1534 expr = PrintExpression();
1535 {if (true) return expr;}
1538 jj_la1[33] = jj_gen;
1539 jj_consume_token(-1);
1540 throw new ParseException();
1542 throw new Error("Missing return statement in function");
1546 * Any assignement operator.
1547 * @return the assignement operator id
1549 static final public int AssignmentOperator() throws ParseException {
1550 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1552 jj_consume_token(ASSIGN);
1553 {if (true) return VariableDeclaration.EQUAL;}
1556 jj_consume_token(STARASSIGN);
1557 {if (true) return VariableDeclaration.STAR_EQUAL;}
1560 jj_consume_token(SLASHASSIGN);
1561 {if (true) return VariableDeclaration.SLASH_EQUAL;}
1564 jj_consume_token(REMASSIGN);
1565 {if (true) return VariableDeclaration.REM_EQUAL;}
1568 jj_consume_token(PLUSASSIGN);
1569 {if (true) return VariableDeclaration.PLUS_EQUAL;}
1572 jj_consume_token(MINUSASSIGN);
1573 {if (true) return VariableDeclaration.MINUS_EQUAL;}
1576 jj_consume_token(LSHIFTASSIGN);
1577 {if (true) return VariableDeclaration.LSHIFT_EQUAL;}
1579 case RSIGNEDSHIFTASSIGN:
1580 jj_consume_token(RSIGNEDSHIFTASSIGN);
1581 {if (true) return VariableDeclaration.RSIGNEDSHIFT_EQUAL;}
1584 jj_consume_token(ANDASSIGN);
1585 {if (true) return VariableDeclaration.AND_EQUAL;}
1588 jj_consume_token(XORASSIGN);
1589 {if (true) return VariableDeclaration.XOR_EQUAL;}
1592 jj_consume_token(ORASSIGN);
1593 {if (true) return VariableDeclaration.OR_EQUAL;}
1596 jj_consume_token(DOTASSIGN);
1597 {if (true) return VariableDeclaration.DOT_EQUAL;}
1600 jj_consume_token(TILDEEQUAL);
1601 {if (true) return VariableDeclaration.TILDE_EQUAL;}
1604 jj_la1[34] = jj_gen;
1605 jj_consume_token(-1);
1606 throw new ParseException();
1608 throw new Error("Missing return statement in function");
1611 static final public Expression ConditionalExpression() throws ParseException {
1612 final Expression expr;
1613 Expression expr2 = null;
1614 Expression expr3 = null;
1615 expr = ConditionalOrExpression();
1616 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1618 jj_consume_token(HOOK);
1619 expr2 = Expression();
1620 jj_consume_token(COLON);
1621 expr3 = ConditionalExpression();
1624 jj_la1[35] = jj_gen;
1627 if (expr3 == null) {
1628 {if (true) return expr;}
1630 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1631 throw new Error("Missing return statement in function");
1634 static final public Expression ConditionalOrExpression() throws ParseException {
1635 Expression expr,expr2;
1637 expr = ConditionalAndExpression();
1640 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1646 jj_la1[36] = jj_gen;
1649 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1651 jj_consume_token(OR_OR);
1652 operator = OperatorIds.OR_OR;
1655 jj_consume_token(_ORL);
1656 operator = OperatorIds.ORL;
1659 jj_la1[37] = jj_gen;
1660 jj_consume_token(-1);
1661 throw new ParseException();
1663 expr2 = ConditionalAndExpression();
1664 expr = new BinaryExpression(expr,expr2,operator);
1666 {if (true) return expr;}
1667 throw new Error("Missing return statement in function");
1670 static final public Expression ConditionalAndExpression() throws ParseException {
1671 Expression expr,expr2;
1673 expr = ConcatExpression();
1676 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1682 jj_la1[38] = jj_gen;
1685 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1687 jj_consume_token(AND_AND);
1688 operator = OperatorIds.AND_AND;
1691 jj_consume_token(_ANDL);
1692 operator = OperatorIds.ANDL;
1695 jj_la1[39] = jj_gen;
1696 jj_consume_token(-1);
1697 throw new ParseException();
1699 expr2 = ConcatExpression();
1700 expr = new BinaryExpression(expr,expr2,operator);
1702 {if (true) return expr;}
1703 throw new Error("Missing return statement in function");
1706 static final public Expression ConcatExpression() throws ParseException {
1707 Expression expr,expr2;
1708 expr = InclusiveOrExpression();
1711 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1716 jj_la1[40] = jj_gen;
1719 jj_consume_token(DOT);
1720 expr2 = InclusiveOrExpression();
1721 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1723 {if (true) return expr;}
1724 throw new Error("Missing return statement in function");
1727 static final public Expression InclusiveOrExpression() throws ParseException {
1728 Expression expr,expr2;
1729 expr = ExclusiveOrExpression();
1732 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1737 jj_la1[41] = jj_gen;
1740 jj_consume_token(BIT_OR);
1741 expr2 = ExclusiveOrExpression();
1742 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1744 {if (true) return expr;}
1745 throw new Error("Missing return statement in function");
1748 static final public Expression ExclusiveOrExpression() throws ParseException {
1749 Expression expr,expr2;
1750 expr = AndExpression();
1753 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1758 jj_la1[42] = jj_gen;
1761 jj_consume_token(XOR);
1762 expr2 = AndExpression();
1763 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1765 {if (true) return expr;}
1766 throw new Error("Missing return statement in function");
1769 static final public Expression AndExpression() throws ParseException {
1770 Expression expr,expr2;
1771 expr = EqualityExpression();
1774 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1779 jj_la1[43] = jj_gen;
1782 jj_consume_token(BIT_AND);
1783 expr2 = EqualityExpression();
1784 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1786 {if (true) return expr;}
1787 throw new Error("Missing return statement in function");
1790 static final public Expression EqualityExpression() throws ParseException {
1791 Expression expr,expr2;
1793 expr = RelationalExpression();
1796 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1800 case BANGDOUBLEEQUAL:
1805 jj_la1[44] = jj_gen;
1808 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1810 jj_consume_token(EQUAL_EQUAL);
1811 operator = OperatorIds.EQUAL_EQUAL;
1814 jj_consume_token(DIF);
1815 operator = OperatorIds.DIF;
1818 jj_consume_token(NOT_EQUAL);
1819 operator = OperatorIds.DIF;
1821 case BANGDOUBLEEQUAL:
1822 jj_consume_token(BANGDOUBLEEQUAL);
1823 operator = OperatorIds.BANG_EQUAL_EQUAL;
1826 jj_consume_token(TRIPLEEQUAL);
1827 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1830 jj_la1[45] = jj_gen;
1831 jj_consume_token(-1);
1832 throw new ParseException();
1835 expr2 = RelationalExpression();
1836 } catch (ParseException e) {
1837 if (errorMessage != null) {
1838 {if (true) throw e;}
1840 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1842 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1843 errorEnd = SimpleCharStream.getPosition() + 1;
1844 {if (true) throw e;}
1846 expr = new BinaryExpression(expr,expr2,operator);
1848 {if (true) return expr;}
1849 throw new Error("Missing return statement in function");
1852 static final public Expression RelationalExpression() throws ParseException {
1853 Expression expr,expr2;
1855 expr = ShiftExpression();
1858 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1866 jj_la1[46] = jj_gen;
1869 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1871 jj_consume_token(LT);
1872 operator = OperatorIds.LESS;
1875 jj_consume_token(GT);
1876 operator = OperatorIds.GREATER;
1879 jj_consume_token(LE);
1880 operator = OperatorIds.LESS_EQUAL;
1883 jj_consume_token(GE);
1884 operator = OperatorIds.GREATER_EQUAL;
1887 jj_la1[47] = jj_gen;
1888 jj_consume_token(-1);
1889 throw new ParseException();
1891 expr2 = ShiftExpression();
1892 expr = new BinaryExpression(expr,expr2,operator);
1894 {if (true) return expr;}
1895 throw new Error("Missing return statement in function");
1898 static final public Expression ShiftExpression() throws ParseException {
1899 Expression expr,expr2;
1901 expr = AdditiveExpression();
1904 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1907 case RUNSIGNEDSHIFT:
1911 jj_la1[48] = jj_gen;
1914 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1916 jj_consume_token(LSHIFT);
1917 operator = OperatorIds.LEFT_SHIFT;
1920 jj_consume_token(RSIGNEDSHIFT);
1921 operator = OperatorIds.RIGHT_SHIFT;
1923 case RUNSIGNEDSHIFT:
1924 jj_consume_token(RUNSIGNEDSHIFT);
1925 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1928 jj_la1[49] = jj_gen;
1929 jj_consume_token(-1);
1930 throw new ParseException();
1932 expr2 = AdditiveExpression();
1933 expr = new BinaryExpression(expr,expr2,operator);
1935 {if (true) return expr;}
1936 throw new Error("Missing return statement in function");
1939 static final public Expression AdditiveExpression() throws ParseException {
1940 Expression expr,expr2;
1942 expr = MultiplicativeExpression();
1945 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1951 jj_la1[50] = jj_gen;
1954 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1956 jj_consume_token(PLUS);
1957 operator = OperatorIds.PLUS;
1960 jj_consume_token(MINUS);
1961 operator = OperatorIds.MINUS;
1964 jj_la1[51] = jj_gen;
1965 jj_consume_token(-1);
1966 throw new ParseException();
1968 expr2 = MultiplicativeExpression();
1969 expr = new BinaryExpression(expr,expr2,operator);
1971 {if (true) return expr;}
1972 throw new Error("Missing return statement in function");
1975 static final public Expression MultiplicativeExpression() throws ParseException {
1976 Expression expr,expr2;
1979 expr = UnaryExpression();
1980 } catch (ParseException e) {
1981 if (errorMessage != null) {if (true) throw e;}
1982 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1984 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1985 errorEnd = SimpleCharStream.getPosition() + 1;
1986 {if (true) throw e;}
1990 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1997 jj_la1[52] = jj_gen;
2000 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2002 jj_consume_token(STAR);
2003 operator = OperatorIds.MULTIPLY;
2006 jj_consume_token(SLASH);
2007 operator = OperatorIds.DIVIDE;
2010 jj_consume_token(REMAINDER);
2011 operator = OperatorIds.REMAINDER;
2014 jj_la1[53] = jj_gen;
2015 jj_consume_token(-1);
2016 throw new ParseException();
2018 expr2 = UnaryExpression();
2019 expr = new BinaryExpression(expr,expr2,operator);
2021 {if (true) return expr;}
2022 throw new Error("Missing return statement in function");
2026 * An unary expression starting with @, & or nothing
2028 static final public Expression UnaryExpression() throws ParseException {
2029 final Expression expr;
2030 /* <BIT_AND> expr = UnaryExpressionNoPrefix() //why did I had that ?
2031 {return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
2033 expr = AtNotUnaryExpression();
2034 {if (true) return expr;}
2035 throw new Error("Missing return statement in function");
2039 * An expression prefixed (or not) by one or more @ and !.
2040 * @return the expression
2042 static final public Expression AtNotUnaryExpression() throws ParseException {
2043 final Expression expr;
2045 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2047 token = jj_consume_token(AT);
2048 expr = AtNotUnaryExpression();
2049 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,token.sourceStart);}
2052 token = jj_consume_token(BANG);
2053 expr = AtNotUnaryExpression();
2054 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
2067 case INTEGER_LITERAL:
2068 case FLOATING_POINT_LITERAL:
2069 case STRING_LITERAL:
2073 expr = UnaryExpressionNoPrefix();
2074 {if (true) return expr;}
2077 jj_la1[54] = jj_gen;
2078 jj_consume_token(-1);
2079 throw new ParseException();
2081 throw new Error("Missing return statement in function");
2084 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
2085 final Expression expr;
2087 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2089 token = jj_consume_token(PLUS);
2090 expr = AtNotUnaryExpression();
2091 {if (true) return new PrefixedUnaryExpression(expr,
2093 token.sourceStart);}
2096 token = jj_consume_token(MINUS);
2097 expr = AtNotUnaryExpression();
2098 {if (true) return new PrefixedUnaryExpression(expr,
2100 token.sourceStart);}
2104 expr = PreIncDecExpression();
2105 {if (true) return expr;}
2114 case INTEGER_LITERAL:
2115 case FLOATING_POINT_LITERAL:
2116 case STRING_LITERAL:
2120 expr = UnaryExpressionNotPlusMinus();
2121 {if (true) return expr;}
2124 jj_la1[55] = jj_gen;
2125 jj_consume_token(-1);
2126 throw new ParseException();
2128 throw new Error("Missing return statement in function");
2131 static final public Expression PreIncDecExpression() throws ParseException {
2132 final Expression expr;
2135 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2137 token = jj_consume_token(PLUS_PLUS);
2138 operator = OperatorIds.PLUS_PLUS;
2141 token = jj_consume_token(MINUS_MINUS);
2142 operator = OperatorIds.MINUS_MINUS;
2145 jj_la1[56] = jj_gen;
2146 jj_consume_token(-1);
2147 throw new ParseException();
2149 expr = PrimaryExpression();
2150 {if (true) return new PrefixedUnaryExpression(expr,operator,token.sourceStart);}
2151 throw new Error("Missing return statement in function");
2154 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
2155 final Expression expr;
2156 if (jj_2_4(2147483647)) {
2157 expr = CastExpression();
2158 {if (true) return expr;}
2160 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2167 expr = PostfixExpression();
2168 {if (true) return expr;}
2173 case INTEGER_LITERAL:
2174 case FLOATING_POINT_LITERAL:
2175 case STRING_LITERAL:
2177 {if (true) return expr;}
2180 jj_consume_token(LPAREN);
2181 expr = Expression();
2183 jj_consume_token(RPAREN);
2184 } catch (ParseException e) {
2185 errorMessage = "')' expected";
2187 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2188 errorEnd = SimpleCharStream.getPosition() + 1;
2189 {if (true) throw e;}
2191 {if (true) return expr;}
2194 jj_la1[57] = jj_gen;
2195 jj_consume_token(-1);
2196 throw new ParseException();
2199 throw new Error("Missing return statement in function");
2202 static final public CastExpression CastExpression() throws ParseException {
2203 final ConstantIdentifier type;
2204 final Expression expr;
2205 final Token token,token1;
2206 token1 = jj_consume_token(LPAREN);
2207 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2220 token = jj_consume_token(ARRAY);
2221 type = new ConstantIdentifier(token);
2224 jj_la1[58] = jj_gen;
2225 jj_consume_token(-1);
2226 throw new ParseException();
2228 jj_consume_token(RPAREN);
2229 expr = UnaryExpression();
2230 {if (true) return new CastExpression(type,expr,token1.sourceStart,expr.sourceEnd);}
2231 throw new Error("Missing return statement in function");
2234 static final public Expression PostfixExpression() throws ParseException {
2235 final Expression expr;
2238 expr = PrimaryExpression();
2239 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2242 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2244 token = jj_consume_token(PLUS_PLUS);
2245 operator = OperatorIds.PLUS_PLUS;
2248 token = jj_consume_token(MINUS_MINUS);
2249 operator = OperatorIds.MINUS_MINUS;
2252 jj_la1[59] = jj_gen;
2253 jj_consume_token(-1);
2254 throw new ParseException();
2258 jj_la1[60] = jj_gen;
2261 if (operator == -1) {
2262 {if (true) return expr;}
2264 {if (true) return new PostfixedUnaryExpression(expr,operator,token.sourceEnd);}
2265 throw new Error("Missing return statement in function");
2268 static final public Expression PrimaryExpression() throws ParseException {
2271 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2277 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2279 token = jj_consume_token(BIT_AND);
2282 jj_la1[61] = jj_gen;
2285 expr = refPrimaryExpression(token);
2286 {if (true) return expr;}
2289 expr = ArrayDeclarator();
2290 {if (true) return expr;}
2293 jj_la1[62] = jj_gen;
2294 jj_consume_token(-1);
2295 throw new ParseException();
2297 throw new Error("Missing return statement in function");
2300 static final public Expression refPrimaryExpression(final Token reference) throws ParseException {
2302 Expression expr2 = null;
2303 final Token identifier;
2304 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2306 identifier = jj_consume_token(IDENTIFIER);
2307 expr = new ConstantIdentifier(identifier);
2310 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2311 case STATICCLASSACCESS:
2315 jj_la1[63] = jj_gen;
2318 jj_consume_token(STATICCLASSACCESS);
2319 expr2 = ClassIdentifier();
2320 expr = new ClassAccess(expr,
2322 ClassAccess.STATIC);
2324 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2326 expr2 = Arguments(expr);
2329 jj_la1[64] = jj_gen;
2332 if (expr2 == null) {
2333 if (reference != null) {
2334 ParseException e = generateParseException();
2335 errorMessage = "you cannot use a constant by reference";
2337 errorStart = reference.sourceStart;
2338 errorEnd = reference.sourceEnd;
2339 processParseExceptionDebug(e);
2341 {if (true) return expr;}
2343 {if (true) return expr2;}
2347 expr = VariableDeclaratorId();
2348 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2350 expr = Arguments(expr);
2353 jj_la1[65] = jj_gen;
2356 {if (true) return expr;}
2359 token = jj_consume_token(NEW);
2360 expr = ClassIdentifier();
2362 if (reference == null) {
2363 start = token.sourceStart;
2365 start = reference.sourceStart;
2367 expr = new ClassInstantiation(expr,
2370 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2372 expr = Arguments(expr);
2375 jj_la1[66] = jj_gen;
2378 {if (true) return expr;}
2381 jj_la1[67] = jj_gen;
2382 jj_consume_token(-1);
2383 throw new ParseException();
2385 throw new Error("Missing return statement in function");
2389 * An array declarator.
2393 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2394 final ArrayVariableDeclaration[] vars;
2396 token = jj_consume_token(ARRAY);
2397 vars = ArrayInitializer();
2398 {if (true) return new ArrayInitializer(vars,token.sourceStart,SimpleCharStream.getPosition());}
2399 throw new Error("Missing return statement in function");
2402 static final public Expression ClassIdentifier() throws ParseException {
2403 final Expression expr;
2405 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2407 token = jj_consume_token(IDENTIFIER);
2408 {if (true) return new ConstantIdentifier(token);}
2420 {if (true) return expr;}
2424 expr = VariableDeclaratorId();
2425 {if (true) return expr;}
2428 jj_la1[68] = jj_gen;
2429 jj_consume_token(-1);
2430 throw new ParseException();
2432 throw new Error("Missing return statement in function");
2436 * Used by Variabledeclaratorid and primarysuffix
2438 static final public AbstractVariable VariableSuffix(final AbstractVariable prefix) throws ParseException {
2439 Expression expression = null;
2440 final Token classAccessToken;
2441 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2443 classAccessToken = jj_consume_token(CLASSACCESS);
2445 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2448 expression = VariableName();
2452 expression = Variable();
2455 jj_la1[69] = jj_gen;
2456 jj_consume_token(-1);
2457 throw new ParseException();
2459 } catch (ParseException e) {
2460 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2462 errorStart = classAccessToken.sourceEnd +1;
2463 errorEnd = classAccessToken.sourceEnd +1;
2464 processParseExceptionDebug(e);
2466 {if (true) return new ClassAccess(prefix,
2468 ClassAccess.NORMAL);}
2471 jj_consume_token(LBRACKET);
2472 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2497 case INTEGER_LITERAL:
2498 case FLOATING_POINT_LITERAL:
2499 case STRING_LITERAL:
2503 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2519 case INTEGER_LITERAL:
2520 case FLOATING_POINT_LITERAL:
2521 case STRING_LITERAL:
2525 expression = Expression();
2536 expression = Type();
2539 jj_la1[70] = jj_gen;
2540 jj_consume_token(-1);
2541 throw new ParseException();
2545 jj_la1[71] = jj_gen;
2549 jj_consume_token(RBRACKET);
2550 } catch (ParseException e) {
2551 errorMessage = "']' expected";
2553 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2554 errorEnd = SimpleCharStream.getPosition() + 1;
2555 {if (true) throw e;}
2557 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2560 jj_la1[72] = jj_gen;
2561 jj_consume_token(-1);
2562 throw new ParseException();
2564 throw new Error("Missing return statement in function");
2567 static final public Literal Literal() throws ParseException {
2569 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2570 case INTEGER_LITERAL:
2571 token = jj_consume_token(INTEGER_LITERAL);
2572 {if (true) return new NumberLiteral(token);}
2574 case FLOATING_POINT_LITERAL:
2575 token = jj_consume_token(FLOATING_POINT_LITERAL);
2576 {if (true) return new NumberLiteral(token);}
2578 case STRING_LITERAL:
2579 token = jj_consume_token(STRING_LITERAL);
2580 {if (true) return new StringLiteral(token);}
2583 token = jj_consume_token(TRUE);
2584 {if (true) return new TrueLiteral(token);}
2587 token = jj_consume_token(FALSE);
2588 {if (true) return new FalseLiteral(token);}
2591 token = jj_consume_token(NULL);
2592 {if (true) return new NullLiteral(token);}
2595 jj_la1[73] = jj_gen;
2596 jj_consume_token(-1);
2597 throw new ParseException();
2599 throw new Error("Missing return statement in function");
2602 static final public FunctionCall Arguments(final Expression func) throws ParseException {
2603 Expression[] args = null;
2605 jj_consume_token(LPAREN);
2606 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2622 case INTEGER_LITERAL:
2623 case FLOATING_POINT_LITERAL:
2624 case STRING_LITERAL:
2628 args = ArgumentList();
2631 jj_la1[74] = jj_gen;
2635 token = jj_consume_token(RPAREN);
2636 } catch (ParseException e) {
2637 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2639 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2640 errorEnd = SimpleCharStream.getPosition() + 1;
2641 {if (true) throw e;}
2643 {if (true) return new FunctionCall(func,args,token.sourceEnd);}
2644 throw new Error("Missing return statement in function");
2648 * An argument list is a list of arguments separated by comma :
2649 * argumentDeclaration() (, argumentDeclaration)*
2650 * @return an array of arguments
2652 static final public Expression[] ArgumentList() throws ParseException {
2654 final ArrayList list = new ArrayList();
2659 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2664 jj_la1[75] = jj_gen;
2667 jj_consume_token(COMMA);
2671 } catch (ParseException e) {
2672 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2674 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2675 errorEnd = SimpleCharStream.getPosition() + 1;
2676 {if (true) throw e;}
2679 final Expression[] arguments = new Expression[list.size()];
2680 list.toArray(arguments);
2681 {if (true) return arguments;}
2682 throw new Error("Missing return statement in function");
2686 * A Statement without break.
2687 * @return a statement
2689 static final public Statement StatementNoBreak() throws ParseException {
2690 final Statement statement;
2693 statement = expressionStatement();
2694 {if (true) return statement;}
2696 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2698 statement = LabeledStatement();
2699 {if (true) return statement;}
2702 statement = Block();
2703 {if (true) return statement;}
2706 statement = EmptyStatement();
2707 {if (true) return statement;}
2710 statement = SwitchStatement();
2711 {if (true) return statement;}
2714 statement = IfStatement();
2715 {if (true) return statement;}
2718 statement = WhileStatement();
2719 {if (true) return statement;}
2722 statement = DoStatement();
2723 {if (true) return statement;}
2726 statement = ForStatement();
2727 {if (true) return statement;}
2730 statement = ForeachStatement();
2731 {if (true) return statement;}
2734 statement = ContinueStatement();
2735 {if (true) return statement;}
2738 statement = ReturnStatement();
2739 {if (true) return statement;}
2742 statement = EchoStatement();
2743 {if (true) return statement;}
2750 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2752 token = jj_consume_token(AT);
2755 jj_la1[76] = jj_gen;
2758 statement = IncludeStatement();
2759 if (token != null) {
2760 ((InclusionStatement)statement).silent = true;
2761 statement.sourceStart = token.sourceStart;
2763 {if (true) return statement;}
2766 statement = StaticStatement();
2767 {if (true) return statement;}
2770 statement = GlobalStatement();
2771 {if (true) return statement;}
2774 statement = defineStatement();
2775 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2778 jj_la1[77] = jj_gen;
2779 jj_consume_token(-1);
2780 throw new ParseException();
2783 throw new Error("Missing return statement in function");
2787 * A statement expression.
2789 * @return an expression
2791 static final public Statement expressionStatement() throws ParseException {
2792 final Statement statement;
2794 statement = Expression();
2796 token = jj_consume_token(SEMICOLON);
2797 statement.sourceEnd = token.sourceEnd;
2798 } catch (ParseException e) {
2799 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2800 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2802 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2803 errorEnd = SimpleCharStream.getPosition() + 1;
2804 {if (true) throw e;}
2807 {if (true) return statement;}
2808 throw new Error("Missing return statement in function");
2811 static final public Define defineStatement() throws ParseException {
2812 final int start = SimpleCharStream.getPosition();
2813 Expression defineName,defineValue;
2814 jj_consume_token(DEFINE);
2816 jj_consume_token(LPAREN);
2817 } catch (ParseException e) {
2818 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2820 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2821 errorEnd = SimpleCharStream.getPosition() + 1;
2822 processParseExceptionDebug(e);
2825 defineName = Expression();
2826 } catch (ParseException e) {
2827 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2829 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2830 errorEnd = SimpleCharStream.getPosition() + 1;
2831 {if (true) throw e;}
2834 jj_consume_token(COMMA);
2835 } catch (ParseException e) {
2836 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2838 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2839 errorEnd = SimpleCharStream.getPosition() + 1;
2840 processParseExceptionDebug(e);
2843 defineValue = Expression();
2844 } catch (ParseException e) {
2845 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2847 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2848 errorEnd = SimpleCharStream.getPosition() + 1;
2849 {if (true) throw e;}
2852 jj_consume_token(RPAREN);
2853 } catch (ParseException e) {
2854 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2856 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2857 errorEnd = SimpleCharStream.getPosition() + 1;
2858 processParseExceptionDebug(e);
2860 {if (true) return new Define(currentSegment,
2864 SimpleCharStream.getPosition());}
2865 throw new Error("Missing return statement in function");
2869 * A Normal statement.
2871 static final public Statement Statement() throws ParseException {
2872 final Statement statement;
2873 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2905 case INTEGER_LITERAL:
2906 case FLOATING_POINT_LITERAL:
2907 case STRING_LITERAL:
2913 statement = StatementNoBreak();
2914 {if (true) return statement;}
2917 statement = BreakStatement();
2918 {if (true) return statement;}
2921 jj_la1[78] = jj_gen;
2922 jj_consume_token(-1);
2923 throw new ParseException();
2925 throw new Error("Missing return statement in function");
2929 * An html block inside a php syntax.
2931 static final public HTMLBlock htmlBlock() throws ParseException {
2932 final int startIndex = nodePtr;
2933 final AstNode[] blockNodes;
2935 jj_consume_token(PHPEND);
2938 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2943 jj_la1[79] = jj_gen;
2949 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2951 jj_consume_token(PHPSTARTLONG);
2954 jj_consume_token(PHPSTARTSHORT);
2957 jj_la1[80] = jj_gen;
2958 jj_consume_token(-1);
2959 throw new ParseException();
2961 } catch (ParseException e) {
2962 errorMessage = "unexpected end of file , '<?php' expected";
2964 errorStart = SimpleCharStream.getPosition();
2965 errorEnd = SimpleCharStream.getPosition();
2966 {if (true) throw e;}
2968 nbNodes = nodePtr - startIndex;
2969 blockNodes = new AstNode[nbNodes];
2970 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2971 nodePtr = startIndex;
2972 {if (true) return new HTMLBlock(blockNodes);}
2973 throw new Error("Missing return statement in function");
2977 * An include statement. It's "include" an expression;
2979 static final public InclusionStatement IncludeStatement() throws ParseException {
2980 final Expression expr;
2982 final InclusionStatement inclusionStatement;
2983 final Token token, token2;
2984 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2986 token = jj_consume_token(REQUIRE);
2987 keyword = InclusionStatement.REQUIRE;
2990 token = jj_consume_token(REQUIRE_ONCE);
2991 keyword = InclusionStatement.REQUIRE_ONCE;
2994 token = jj_consume_token(INCLUDE);
2995 keyword = InclusionStatement.INCLUDE;
2998 token = jj_consume_token(INCLUDE_ONCE);
2999 keyword = InclusionStatement.INCLUDE_ONCE;
3002 jj_la1[81] = jj_gen;
3003 jj_consume_token(-1);
3004 throw new ParseException();
3007 expr = Expression();
3008 } catch (ParseException e) {
3009 if (errorMessage != null) {
3010 {if (true) throw e;}
3012 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
3014 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3015 errorEnd = SimpleCharStream.getPosition() + 1;
3016 {if (true) throw e;}
3018 inclusionStatement = new InclusionStatement(currentSegment,
3022 currentSegment.add(inclusionStatement);
3024 token2 = jj_consume_token(SEMICOLON);
3025 } catch (ParseException e) {
3026 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
3028 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3029 errorEnd = SimpleCharStream.getPosition() + 1;
3030 {if (true) throw e;}
3032 inclusionStatement.sourceEnd = token2.sourceEnd;
3033 {if (true) return inclusionStatement;}
3034 throw new Error("Missing return statement in function");
3037 static final public PrintExpression PrintExpression() throws ParseException {
3038 final Expression expr;
3039 final int pos = SimpleCharStream.getPosition();
3040 jj_consume_token(PRINT);
3041 expr = Expression();
3042 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
3043 throw new Error("Missing return statement in function");
3046 static final public ListExpression ListExpression() throws ParseException {
3047 Expression expr = null;
3048 final Expression expression;
3049 final ArrayList list = new ArrayList();
3050 final int pos = SimpleCharStream.getPosition();
3051 final Token listToken;
3052 listToken = jj_consume_token(LIST);
3054 jj_consume_token(LPAREN);
3055 } catch (ParseException e) {
3056 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
3058 errorStart = listToken.sourceEnd+1;
3059 errorEnd = listToken.sourceEnd+1;
3060 processParseExceptionDebug(e);
3062 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3065 expr = VariableDeclaratorId();
3069 jj_la1[82] = jj_gen;
3072 if (expr == null) list.add(null);
3075 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3080 jj_la1[83] = jj_gen;
3084 jj_consume_token(COMMA);
3085 } catch (ParseException e) {
3086 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
3088 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3089 errorEnd = SimpleCharStream.getPosition() + 1;
3090 {if (true) throw e;}
3092 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3095 expr = VariableDeclaratorId();
3099 jj_la1[84] = jj_gen;
3104 jj_consume_token(RPAREN);
3105 } catch (ParseException e) {
3106 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
3108 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3109 errorEnd = SimpleCharStream.getPosition() + 1;
3110 {if (true) throw e;}
3112 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3114 jj_consume_token(ASSIGN);
3115 expression = Expression();
3116 final AbstractVariable[] vars = new AbstractVariable[list.size()];
3118 {if (true) return new ListExpression(vars,
3121 SimpleCharStream.getPosition());}
3124 jj_la1[85] = jj_gen;
3127 final Variable[] vars = new Variable[list.size()];
3129 {if (true) return new ListExpression(vars,pos,SimpleCharStream.getPosition());}
3130 throw new Error("Missing return statement in function");
3134 * An echo statement.
3135 * echo anyexpression (, otherexpression)*
3137 static final public EchoStatement EchoStatement() throws ParseException {
3138 final ArrayList expressions = new ArrayList();
3141 Token token2 = null;
3142 token = jj_consume_token(ECHO);
3143 expr = Expression();
3144 expressions.add(expr);
3147 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3152 jj_la1[86] = jj_gen;
3155 jj_consume_token(COMMA);
3156 expr = Expression();
3157 expressions.add(expr);
3160 token2 = jj_consume_token(SEMICOLON);
3161 } catch (ParseException e) {
3162 if (e.currentToken.next.kind != 4) {
3163 errorMessage = "';' expected after 'echo' statement";
3165 errorStart = e.currentToken.sourceEnd;
3166 errorEnd = e.currentToken.sourceEnd;
3167 processParseExceptionDebug(e);
3170 final Expression[] exprs = new Expression[expressions.size()];
3171 expressions.toArray(exprs);
3172 if (token2 == null) {
3173 {if (true) return new EchoStatement(exprs,token.sourceStart, exprs[exprs.length-1].sourceEnd);}
3175 {if (true) return new EchoStatement(exprs,token.sourceStart, token2.sourceEnd);}
3176 throw new Error("Missing return statement in function");
3179 static final public GlobalStatement GlobalStatement() throws ParseException {
3181 final ArrayList vars = new ArrayList();
3182 final GlobalStatement global;
3183 final Token token, token2;
3184 token = jj_consume_token(GLOBAL);
3189 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3194 jj_la1[87] = jj_gen;
3197 jj_consume_token(COMMA);
3202 token2 = jj_consume_token(SEMICOLON);
3203 final Variable[] variables = new Variable[vars.size()];
3204 vars.toArray(variables);
3205 global = new GlobalStatement(currentSegment,
3209 currentSegment.add(global);
3210 {if (true) return global;}
3211 } catch (ParseException e) {
3212 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3214 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3215 errorEnd = SimpleCharStream.getPosition() + 1;
3216 {if (true) throw e;}
3218 throw new Error("Missing return statement in function");
3221 static final public StaticStatement StaticStatement() throws ParseException {
3222 final ArrayList vars = new ArrayList();
3223 VariableDeclaration expr;
3224 final Token token, token2;
3225 token = jj_consume_token(STATIC);
3226 expr = VariableDeclarator();
3230 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3235 jj_la1[88] = jj_gen;
3238 jj_consume_token(COMMA);
3239 expr = VariableDeclarator();
3243 token2 = jj_consume_token(SEMICOLON);
3244 final VariableDeclaration[] variables = new VariableDeclaration[vars.size()];
3245 vars.toArray(variables);
3246 {if (true) return new StaticStatement(variables,
3249 } catch (ParseException e) {
3250 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3252 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3253 errorEnd = SimpleCharStream.getPosition() + 1;
3254 {if (true) throw e;}
3256 throw new Error("Missing return statement in function");
3259 static final public LabeledStatement LabeledStatement() throws ParseException {
3261 final Statement statement;
3262 label = jj_consume_token(IDENTIFIER);
3263 jj_consume_token(COLON);
3264 statement = Statement();
3265 {if (true) return new LabeledStatement(label.image,statement,label.sourceStart,statement.sourceEnd);}
3266 throw new Error("Missing return statement in function");
3276 static final public Block Block() throws ParseException {
3277 final ArrayList list = new ArrayList();
3278 Statement statement;
3279 final Token token, token2;
3281 token = jj_consume_token(LBRACE);
3282 } catch (ParseException e) {
3283 errorMessage = "'{' expected";
3285 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3286 errorEnd = SimpleCharStream.getPosition() + 1;
3287 {if (true) throw e;}
3291 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3327 case INTEGER_LITERAL:
3328 case FLOATING_POINT_LITERAL:
3329 case STRING_LITERAL:
3338 jj_la1[89] = jj_gen;
3341 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3376 case INTEGER_LITERAL:
3377 case FLOATING_POINT_LITERAL:
3378 case STRING_LITERAL:
3384 statement = BlockStatement();
3385 list.add(statement);
3388 statement = htmlBlock();
3389 list.add(statement);
3392 jj_la1[90] = jj_gen;
3393 jj_consume_token(-1);
3394 throw new ParseException();
3398 token2 = jj_consume_token(RBRACE);
3399 } catch (ParseException e) {
3400 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3402 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3403 errorEnd = SimpleCharStream.getPosition() + 1;
3404 {if (true) throw e;}
3406 final Statement[] statements = new Statement[list.size()];
3407 list.toArray(statements);
3408 {if (true) return new Block(statements,token.sourceStart,token2.sourceEnd);}
3409 throw new Error("Missing return statement in function");
3412 static final public Statement BlockStatement() throws ParseException {
3413 final Statement statement;
3414 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3447 case INTEGER_LITERAL:
3448 case FLOATING_POINT_LITERAL:
3449 case STRING_LITERAL:
3456 statement = Statement();
3457 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3458 {if (true) return statement;}
3459 } catch (ParseException e) {
3460 errorMessage = "unexpected token : '"+ e.currentToken.image +"', a statement was expected";
3462 errorStart = e.currentToken.sourceStart;
3463 errorEnd = e.currentToken.sourceEnd;
3464 {if (true) throw e;}
3468 statement = ClassDeclaration();
3469 {if (true) return statement;}
3472 statement = MethodDeclaration();
3473 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3474 currentSegment.add((MethodDeclaration) statement);
3475 ((MethodDeclaration) statement).analyzeCode();
3476 {if (true) return statement;}
3479 jj_la1[91] = jj_gen;
3480 jj_consume_token(-1);
3481 throw new ParseException();
3483 throw new Error("Missing return statement in function");
3487 * A Block statement that will not contain any 'break'
3489 static final public Statement BlockStatementNoBreak() throws ParseException {
3490 final Statement statement;
3491 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3523 case INTEGER_LITERAL:
3524 case FLOATING_POINT_LITERAL:
3525 case STRING_LITERAL:
3531 statement = StatementNoBreak();
3532 {if (true) return statement;}
3535 statement = ClassDeclaration();
3536 {if (true) return statement;}
3539 statement = MethodDeclaration();
3540 currentSegment.add((MethodDeclaration) statement);
3541 ((MethodDeclaration) statement).analyzeCode();
3542 {if (true) return statement;}
3545 jj_la1[92] = jj_gen;
3546 jj_consume_token(-1);
3547 throw new ParseException();
3549 throw new Error("Missing return statement in function");
3553 * used only by ForInit()
3555 static final public Expression[] LocalVariableDeclaration() throws ParseException {
3556 final ArrayList list = new ArrayList();
3562 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3567 jj_la1[93] = jj_gen;
3570 jj_consume_token(COMMA);
3574 final Expression[] vars = new Expression[list.size()];
3576 {if (true) return vars;}
3577 throw new Error("Missing return statement in function");
3581 * used only by LocalVariableDeclaration().
3583 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3584 final Variable varName;
3585 Expression initializer = null;
3586 varName = Variable();
3587 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3589 jj_consume_token(ASSIGN);
3590 initializer = Expression();
3593 jj_la1[94] = jj_gen;
3596 if (initializer == null) {
3597 {if (true) return new VariableDeclaration(currentSegment,
3599 varName.sourceStart,
3600 varName.sourceEnd);}
3602 {if (true) return new VariableDeclaration(currentSegment,
3605 VariableDeclaration.EQUAL,
3606 varName.sourceStart);}
3607 throw new Error("Missing return statement in function");
3610 static final public EmptyStatement EmptyStatement() throws ParseException {
3612 token = jj_consume_token(SEMICOLON);
3613 {if (true) return new EmptyStatement(token.sourceStart,token.sourceEnd);}
3614 throw new Error("Missing return statement in function");
3618 * used only by StatementExpressionList() which is used only by ForInit() and ForStatement()
3620 static final public Expression StatementExpression() throws ParseException {
3621 final Expression expr;
3622 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3625 expr = PreIncDecExpression();
3626 {if (true) return expr;}
3634 expr = PrimaryExpression();
3635 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3638 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3640 jj_consume_token(PLUS_PLUS);
3641 {if (true) return new PostfixedUnaryExpression(expr,
3642 OperatorIds.PLUS_PLUS,
3643 SimpleCharStream.getPosition());}
3646 jj_consume_token(MINUS_MINUS);
3647 {if (true) return new PostfixedUnaryExpression(expr,
3648 OperatorIds.MINUS_MINUS,
3649 SimpleCharStream.getPosition());}
3652 jj_la1[95] = jj_gen;
3653 jj_consume_token(-1);
3654 throw new ParseException();
3658 jj_la1[96] = jj_gen;
3661 {if (true) return expr;}
3664 jj_la1[97] = jj_gen;
3665 jj_consume_token(-1);
3666 throw new ParseException();
3668 throw new Error("Missing return statement in function");
3671 static final public SwitchStatement SwitchStatement() throws ParseException {
3672 final Expression variable;
3673 final AbstractCase[] cases;
3674 final int pos = SimpleCharStream.getPosition();
3675 final Token switchToken;
3676 switchToken = jj_consume_token(SWITCH);
3678 jj_consume_token(LPAREN);
3679 } catch (ParseException e) {
3680 errorMessage = "'(' expected after 'switch'";
3682 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3683 errorEnd = SimpleCharStream.getPosition() + 1;
3684 {if (true) throw e;}
3687 variable = Expression();
3688 } catch (ParseException e) {
3689 if (errorMessage != null) {
3690 {if (true) throw e;}
3692 errorMessage = "expression expected";
3694 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3695 errorEnd = SimpleCharStream.getPosition() + 1;
3696 {if (true) throw e;}
3699 jj_consume_token(RPAREN);
3700 } catch (ParseException e) {
3701 errorMessage = "')' expected";
3703 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3704 errorEnd = SimpleCharStream.getPosition() + 1;
3705 {if (true) throw e;}
3707 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3709 cases = switchStatementBrace();
3712 cases = switchStatementColon(switchToken.sourceStart, switchToken.sourceEnd);
3715 jj_la1[98] = jj_gen;
3716 jj_consume_token(-1);
3717 throw new ParseException();
3719 {if (true) return new SwitchStatement(variable,cases,switchToken.sourceStart,SimpleCharStream.getPosition());}
3720 throw new Error("Missing return statement in function");
3723 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3725 final ArrayList cases = new ArrayList();
3726 jj_consume_token(LBRACE);
3729 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3735 jj_la1[99] = jj_gen;
3738 cas = switchLabel0();
3742 jj_consume_token(RBRACE);
3743 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3744 cases.toArray(abcase);
3745 {if (true) return abcase;}
3746 } catch (ParseException e) {
3747 errorMessage = "'}' expected";
3749 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3750 errorEnd = SimpleCharStream.getPosition() + 1;
3751 {if (true) throw e;}
3753 throw new Error("Missing return statement in function");
3757 * A Switch statement with : ... endswitch;
3758 * @param start the begin offset of the switch
3759 * @param end the end offset of the switch
3761 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3763 final ArrayList cases = new ArrayList();
3764 jj_consume_token(COLON);
3766 setMarker(fileToParse,
3767 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3771 "Line " + token.beginLine);
3772 } catch (CoreException e) {
3773 PHPeclipsePlugin.log(e);
3777 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3783 jj_la1[100] = jj_gen;
3786 cas = switchLabel0();
3790 jj_consume_token(ENDSWITCH);
3791 } catch (ParseException e) {
3792 errorMessage = "'endswitch' expected";
3794 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3795 errorEnd = SimpleCharStream.getPosition() + 1;
3796 {if (true) throw e;}
3799 jj_consume_token(SEMICOLON);
3800 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3801 cases.toArray(abcase);
3802 {if (true) return abcase;}
3803 } catch (ParseException e) {
3804 errorMessage = "';' expected after 'endswitch' keyword";
3806 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3807 errorEnd = SimpleCharStream.getPosition() + 1;
3808 {if (true) throw e;}
3810 throw new Error("Missing return statement in function");
3813 static final public AbstractCase switchLabel0() throws ParseException {
3814 final Expression expr;
3815 Statement statement;
3816 final ArrayList stmts = new ArrayList();
3817 final int pos = SimpleCharStream.getPosition();
3818 expr = SwitchLabel();
3821 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3856 case INTEGER_LITERAL:
3857 case FLOATING_POINT_LITERAL:
3858 case STRING_LITERAL:
3867 jj_la1[101] = jj_gen;
3870 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3904 case INTEGER_LITERAL:
3905 case FLOATING_POINT_LITERAL:
3906 case STRING_LITERAL:
3912 statement = BlockStatementNoBreak();
3913 stmts.add(statement);
3916 statement = htmlBlock();
3917 stmts.add(statement);
3920 jj_la1[102] = jj_gen;
3921 jj_consume_token(-1);
3922 throw new ParseException();
3925 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3927 statement = BreakStatement();
3928 stmts.add(statement);
3931 jj_la1[103] = jj_gen;
3934 final Statement[] stmtsArray = new Statement[stmts.size()];
3935 stmts.toArray(stmtsArray);
3936 if (expr == null) {//it's a default
3937 {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3939 {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3940 throw new Error("Missing return statement in function");
3945 * case Expression() :
3947 * @return the if it was a case and null if not
3949 static final public Expression SwitchLabel() throws ParseException {
3950 final Expression expr;
3951 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3953 token = jj_consume_token(CASE);
3955 expr = Expression();
3956 } catch (ParseException e) {
3957 if (errorMessage != null) {if (true) throw e;}
3958 errorMessage = "expression expected after 'case' keyword";
3960 errorStart = token.sourceEnd +1;
3961 errorEnd = token.sourceEnd +1;
3962 {if (true) throw e;}
3965 token = jj_consume_token(COLON);
3966 {if (true) return expr;}
3967 } catch (ParseException e) {
3968 errorMessage = "':' expected after case expression";
3970 errorStart = expr.sourceEnd+1;
3971 errorEnd = expr.sourceEnd+1;
3972 processParseExceptionDebug(e);
3976 token = jj_consume_token(_DEFAULT);
3978 jj_consume_token(COLON);
3979 {if (true) return null;}
3980 } catch (ParseException e) {
3981 errorMessage = "':' expected after 'default' keyword";
3983 errorStart = token.sourceEnd+1;
3984 errorEnd = token.sourceEnd+1;
3985 processParseExceptionDebug(e);
3989 jj_la1[104] = jj_gen;
3990 jj_consume_token(-1);
3991 throw new ParseException();
3993 throw new Error("Missing return statement in function");
3996 static final public Break BreakStatement() throws ParseException {
3997 Expression expression = null;
3998 final Token token, token2;
3999 token = jj_consume_token(BREAK);
4000 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4016 case INTEGER_LITERAL:
4017 case FLOATING_POINT_LITERAL:
4018 case STRING_LITERAL:
4022 expression = Expression();
4025 jj_la1[105] = jj_gen;
4029 token2 = jj_consume_token(SEMICOLON);
4030 } catch (ParseException e) {
4031 errorMessage = "';' expected after 'break' keyword";
4033 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4034 errorEnd = SimpleCharStream.getPosition() + 1;
4035 {if (true) throw e;}
4037 {if (true) return new Break(expression, token.sourceStart, token2.sourceEnd);}
4038 throw new Error("Missing return statement in function");
4041 static final public IfStatement IfStatement() throws ParseException {
4042 final Expression condition;
4043 final IfStatement ifStatement;
4045 token = jj_consume_token(IF);
4046 condition = Condition("if");
4047 ifStatement = IfStatement0(condition,token.sourceStart,token.sourceEnd);
4048 {if (true) return ifStatement;}
4049 throw new Error("Missing return statement in function");
4052 static final public Expression Condition(final String keyword) throws ParseException {
4053 final Expression condition;
4055 jj_consume_token(LPAREN);
4056 } catch (ParseException e) {
4057 errorMessage = "'(' expected after " + keyword + " keyword";
4059 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length();
4060 errorEnd = errorStart +1;
4061 processParseExceptionDebug(e);
4063 condition = Expression();
4065 jj_consume_token(RPAREN);
4066 } catch (ParseException e) {
4067 errorMessage = "')' expected after " + keyword + " keyword";
4069 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4070 errorEnd = SimpleCharStream.getPosition() + 1;
4071 processParseExceptionDebug(e);
4073 {if (true) return condition;}
4074 throw new Error("Missing return statement in function");
4077 static final public IfStatement IfStatement0(final Expression condition, final int start,final int end) throws ParseException {
4078 Statement statement;
4079 final Statement stmt;
4080 final Statement[] statementsArray;
4081 ElseIf elseifStatement;
4082 Else elseStatement = null;
4083 final ArrayList stmts;
4084 final ArrayList elseIfList = new ArrayList();
4085 final ElseIf[] elseIfs;
4086 int pos = SimpleCharStream.getPosition();
4087 final int endStatements;
4088 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4090 jj_consume_token(COLON);
4091 stmts = new ArrayList();
4094 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4128 case INTEGER_LITERAL:
4129 case FLOATING_POINT_LITERAL:
4130 case STRING_LITERAL:
4139 jj_la1[106] = jj_gen;
4142 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4175 case INTEGER_LITERAL:
4176 case FLOATING_POINT_LITERAL:
4177 case STRING_LITERAL:
4183 statement = Statement();
4184 stmts.add(statement);
4187 statement = htmlBlock();
4188 stmts.add(statement);
4191 jj_la1[107] = jj_gen;
4192 jj_consume_token(-1);
4193 throw new ParseException();
4196 endStatements = SimpleCharStream.getPosition();
4199 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4204 jj_la1[108] = jj_gen;
4207 elseifStatement = ElseIfStatementColon();
4208 elseIfList.add(elseifStatement);
4210 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4212 elseStatement = ElseStatementColon();
4215 jj_la1[109] = jj_gen;
4219 setMarker(fileToParse,
4220 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4224 "Line " + token.beginLine);
4225 } catch (CoreException e) {
4226 PHPeclipsePlugin.log(e);
4229 jj_consume_token(ENDIF);
4230 } catch (ParseException e) {
4231 errorMessage = "'endif' expected";
4233 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4234 errorEnd = SimpleCharStream.getPosition() + 1;
4235 {if (true) throw e;}
4238 jj_consume_token(SEMICOLON);
4239 } catch (ParseException e) {
4240 errorMessage = "';' expected after 'endif' keyword";
4242 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4243 errorEnd = SimpleCharStream.getPosition() + 1;
4244 {if (true) throw e;}
4246 elseIfs = new ElseIf[elseIfList.size()];
4247 elseIfList.toArray(elseIfs);
4248 if (stmts.size() == 1) {
4249 {if (true) return new IfStatement(condition,
4250 (Statement) stmts.get(0),
4254 SimpleCharStream.getPosition());}
4256 statementsArray = new Statement[stmts.size()];
4257 stmts.toArray(statementsArray);
4258 {if (true) return new IfStatement(condition,
4259 new Block(statementsArray,pos,endStatements),
4263 SimpleCharStream.getPosition());}
4299 case INTEGER_LITERAL:
4300 case FLOATING_POINT_LITERAL:
4301 case STRING_LITERAL:
4307 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4340 case INTEGER_LITERAL:
4341 case FLOATING_POINT_LITERAL:
4342 case STRING_LITERAL:
4354 jj_la1[110] = jj_gen;
4355 jj_consume_token(-1);
4356 throw new ParseException();
4360 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4365 jj_la1[111] = jj_gen;
4368 elseifStatement = ElseIfStatement();
4369 elseIfList.add(elseifStatement);
4371 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4373 jj_consume_token(ELSE);
4375 pos = SimpleCharStream.getPosition();
4376 statement = Statement();
4377 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4378 } catch (ParseException e) {
4379 if (errorMessage != null) {
4380 {if (true) throw e;}
4382 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4384 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4385 errorEnd = SimpleCharStream.getPosition() + 1;
4386 {if (true) throw e;}
4390 jj_la1[112] = jj_gen;
4393 elseIfs = new ElseIf[elseIfList.size()];
4394 elseIfList.toArray(elseIfs);
4395 {if (true) return new IfStatement(condition,
4400 SimpleCharStream.getPosition());}
4403 jj_la1[113] = jj_gen;
4404 jj_consume_token(-1);
4405 throw new ParseException();
4407 throw new Error("Missing return statement in function");
4410 static final public ElseIf ElseIfStatementColon() throws ParseException {
4411 final Expression condition;
4412 Statement statement;
4413 final ArrayList list = new ArrayList();
4414 final int pos = SimpleCharStream.getPosition();
4415 jj_consume_token(ELSEIF);
4416 condition = Condition("elseif");
4417 jj_consume_token(COLON);
4420 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4454 case INTEGER_LITERAL:
4455 case FLOATING_POINT_LITERAL:
4456 case STRING_LITERAL:
4465 jj_la1[114] = jj_gen;
4468 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4501 case INTEGER_LITERAL:
4502 case FLOATING_POINT_LITERAL:
4503 case STRING_LITERAL:
4509 statement = Statement();
4510 list.add(statement);
4513 statement = htmlBlock();
4514 list.add(statement);
4517 jj_la1[115] = jj_gen;
4518 jj_consume_token(-1);
4519 throw new ParseException();
4522 final Statement[] stmtsArray = new Statement[list.size()];
4523 list.toArray(stmtsArray);
4524 {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4525 throw new Error("Missing return statement in function");
4528 static final public Else ElseStatementColon() throws ParseException {
4529 Statement statement;
4530 final ArrayList list = new ArrayList();
4531 final int pos = SimpleCharStream.getPosition();
4532 jj_consume_token(ELSE);
4533 jj_consume_token(COLON);
4536 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4570 case INTEGER_LITERAL:
4571 case FLOATING_POINT_LITERAL:
4572 case STRING_LITERAL:
4581 jj_la1[116] = jj_gen;
4584 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4617 case INTEGER_LITERAL:
4618 case FLOATING_POINT_LITERAL:
4619 case STRING_LITERAL:
4625 statement = Statement();
4626 list.add(statement);
4629 statement = htmlBlock();
4630 list.add(statement);
4633 jj_la1[117] = jj_gen;
4634 jj_consume_token(-1);
4635 throw new ParseException();
4638 final Statement[] stmtsArray = new Statement[list.size()];
4639 list.toArray(stmtsArray);
4640 {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4641 throw new Error("Missing return statement in function");
4644 static final public ElseIf ElseIfStatement() throws ParseException {
4645 final Expression condition;
4646 final Statement statement;
4647 final ArrayList list = new ArrayList();
4648 final int pos = SimpleCharStream.getPosition();
4649 jj_consume_token(ELSEIF);
4650 condition = Condition("elseif");
4651 statement = Statement();
4652 list.add(statement);/*todo:do better*/
4653 final Statement[] stmtsArray = new Statement[list.size()];
4654 list.toArray(stmtsArray);
4655 {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4656 throw new Error("Missing return statement in function");
4659 static final public WhileStatement WhileStatement() throws ParseException {
4660 final Expression condition;
4661 final Statement action;
4662 final int pos = SimpleCharStream.getPosition();
4663 jj_consume_token(WHILE);
4664 condition = Condition("while");
4665 action = WhileStatement0(pos,pos + 5);
4666 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4667 throw new Error("Missing return statement in function");
4670 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4671 Statement statement;
4672 final ArrayList stmts = new ArrayList();
4673 final int pos = SimpleCharStream.getPosition();
4674 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4676 jj_consume_token(COLON);
4679 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4712 case INTEGER_LITERAL:
4713 case FLOATING_POINT_LITERAL:
4714 case STRING_LITERAL:
4723 jj_la1[118] = jj_gen;
4726 statement = Statement();
4727 stmts.add(statement);
4730 setMarker(fileToParse,
4731 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4735 "Line " + token.beginLine);
4736 } catch (CoreException e) {
4737 PHPeclipsePlugin.log(e);
4740 jj_consume_token(ENDWHILE);
4741 } catch (ParseException e) {
4742 errorMessage = "'endwhile' expected";
4744 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4745 errorEnd = SimpleCharStream.getPosition() + 1;
4746 {if (true) throw e;}
4749 jj_consume_token(SEMICOLON);
4750 final Statement[] stmtsArray = new Statement[stmts.size()];
4751 stmts.toArray(stmtsArray);
4752 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4753 } catch (ParseException e) {
4754 errorMessage = "';' expected after 'endwhile' keyword";
4756 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4757 errorEnd = SimpleCharStream.getPosition() + 1;
4758 {if (true) throw e;}
4793 case INTEGER_LITERAL:
4794 case FLOATING_POINT_LITERAL:
4795 case STRING_LITERAL:
4801 statement = Statement();
4802 {if (true) return statement;}
4805 jj_la1[119] = jj_gen;
4806 jj_consume_token(-1);
4807 throw new ParseException();
4809 throw new Error("Missing return statement in function");
4812 static final public DoStatement DoStatement() throws ParseException {
4813 final Statement action;
4814 final Expression condition;
4815 final Token token, token2;
4816 token = jj_consume_token(DO);
4817 action = Statement();
4818 jj_consume_token(WHILE);
4819 condition = Condition("while");
4821 token2 = jj_consume_token(SEMICOLON);
4822 {if (true) return new DoStatement(condition,action,token.sourceStart,token2.sourceEnd);}
4823 } catch (ParseException e) {
4824 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4826 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4827 errorEnd = SimpleCharStream.getPosition() + 1;
4828 {if (true) throw e;}
4830 throw new Error("Missing return statement in function");
4833 static final public ForeachStatement ForeachStatement() throws ParseException {
4834 Statement statement;
4835 Expression expression;
4836 ArrayVariableDeclaration variable;
4838 token = jj_consume_token(FOREACH);
4840 jj_consume_token(LPAREN);
4841 } catch (ParseException e) {
4842 errorMessage = "'(' expected after 'foreach' keyword";
4844 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4845 errorEnd = SimpleCharStream.getPosition() + 1;
4846 {if (true) throw e;}
4849 expression = Expression();
4850 } catch (ParseException e) {
4851 errorMessage = "variable expected";
4853 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4854 errorEnd = SimpleCharStream.getPosition() + 1;
4855 {if (true) throw e;}
4858 jj_consume_token(AS);
4859 } catch (ParseException e) {
4860 errorMessage = "'as' expected";
4862 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4863 errorEnd = SimpleCharStream.getPosition() + 1;
4864 {if (true) throw e;}
4867 variable = ArrayVariable();
4868 } catch (ParseException e) {
4869 errorMessage = "variable expected";
4871 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4872 errorEnd = SimpleCharStream.getPosition() + 1;
4873 {if (true) throw e;}
4876 jj_consume_token(RPAREN);
4877 } catch (ParseException e) {
4878 errorMessage = "')' expected after 'foreach' keyword";
4880 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4881 errorEnd = SimpleCharStream.getPosition() + 1;
4882 {if (true) throw e;}
4885 statement = Statement();
4886 } catch (ParseException e) {
4887 if (errorMessage != null) {if (true) throw e;}
4888 errorMessage = "statement expected";
4890 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4891 errorEnd = SimpleCharStream.getPosition() + 1;
4892 {if (true) throw e;}
4894 {if (true) return new ForeachStatement(expression,
4898 statement.sourceEnd);}
4899 throw new Error("Missing return statement in function");
4903 * a for declaration.
4904 * @return a node representing the for statement
4906 static final public ForStatement ForStatement() throws ParseException {
4907 final Token token,token2;
4908 final int pos = SimpleCharStream.getPosition();
4909 Expression[] initializations = null;
4910 Expression condition = null;
4911 Expression[] increments = null;
4913 final ArrayList list = new ArrayList();
4914 token = jj_consume_token(FOR);
4916 jj_consume_token(LPAREN);
4917 } catch (ParseException e) {
4918 errorMessage = "'(' expected after 'for' keyword";
4920 errorStart = token.sourceEnd;
4921 errorEnd = token.sourceEnd +1;
4922 processParseExceptionDebug(e);
4924 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4940 case INTEGER_LITERAL:
4941 case FLOATING_POINT_LITERAL:
4942 case STRING_LITERAL:
4946 initializations = ForInit();
4949 jj_la1[120] = jj_gen;
4952 jj_consume_token(SEMICOLON);
4953 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4969 case INTEGER_LITERAL:
4970 case FLOATING_POINT_LITERAL:
4971 case STRING_LITERAL:
4975 condition = Expression();
4978 jj_la1[121] = jj_gen;
4981 jj_consume_token(SEMICOLON);
4982 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4998 case INTEGER_LITERAL:
4999 case FLOATING_POINT_LITERAL:
5000 case STRING_LITERAL:
5004 increments = StatementExpressionList();
5007 jj_la1[122] = jj_gen;
5010 jj_consume_token(RPAREN);
5011 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5044 case INTEGER_LITERAL:
5045 case FLOATING_POINT_LITERAL:
5046 case STRING_LITERAL:
5052 action = Statement();
5053 {if (true) return new ForStatement(initializations,
5061 jj_consume_token(COLON);
5064 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5097 case INTEGER_LITERAL:
5098 case FLOATING_POINT_LITERAL:
5099 case STRING_LITERAL:
5108 jj_la1[123] = jj_gen;
5111 action = Statement();
5115 setMarker(fileToParse,
5116 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
5120 "Line " + token.beginLine);
5121 } catch (CoreException e) {
5122 PHPeclipsePlugin.log(e);
5125 jj_consume_token(ENDFOR);
5126 } catch (ParseException e) {
5127 errorMessage = "'endfor' expected";
5129 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5130 errorEnd = SimpleCharStream.getPosition() + 1;
5131 {if (true) throw e;}
5134 token2 = jj_consume_token(SEMICOLON);
5135 final Statement[] stmtsArray = new Statement[list.size()];
5136 list.toArray(stmtsArray);
5137 {if (true) return new ForStatement(initializations,
5140 new Block(stmtsArray,
5141 stmtsArray[0].sourceStart,
5142 stmtsArray[stmtsArray.length-1].sourceEnd),
5145 } catch (ParseException e) {
5146 errorMessage = "';' expected after 'endfor' keyword";
5148 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5149 errorEnd = SimpleCharStream.getPosition() + 1;
5150 {if (true) throw e;}
5154 jj_la1[124] = jj_gen;
5155 jj_consume_token(-1);
5156 throw new ParseException();
5158 throw new Error("Missing return statement in function");
5161 static final public Expression[] ForInit() throws ParseException {
5162 final Expression[] exprs;
5163 if (jj_2_6(2147483647)) {
5164 exprs = LocalVariableDeclaration();
5165 {if (true) return exprs;}
5167 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5183 case INTEGER_LITERAL:
5184 case FLOATING_POINT_LITERAL:
5185 case STRING_LITERAL:
5189 exprs = StatementExpressionList();
5190 {if (true) return exprs;}
5193 jj_la1[125] = jj_gen;
5194 jj_consume_token(-1);
5195 throw new ParseException();
5198 throw new Error("Missing return statement in function");
5201 static final public Expression[] StatementExpressionList() throws ParseException {
5202 final ArrayList list = new ArrayList();
5203 final Expression expr;
5204 expr = Expression();
5208 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5213 jj_la1[126] = jj_gen;
5216 jj_consume_token(COMMA);
5220 final Expression[] exprsArray = new Expression[list.size()];
5221 list.toArray(exprsArray);
5222 {if (true) return exprsArray;}
5223 throw new Error("Missing return statement in function");
5226 static final public Continue ContinueStatement() throws ParseException {
5227 Expression expr = null;
5228 final Token token,token2;
5229 token = jj_consume_token(CONTINUE);
5230 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5246 case INTEGER_LITERAL:
5247 case FLOATING_POINT_LITERAL:
5248 case STRING_LITERAL:
5252 expr = Expression();
5255 jj_la1[127] = jj_gen;
5259 token2 = jj_consume_token(SEMICOLON);
5260 {if (true) return new Continue(expr,token.sourceStart,token2.sourceEnd);}
5261 } catch (ParseException e) {
5262 errorMessage = "';' expected after 'continue' statement";
5264 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5265 errorEnd = SimpleCharStream.getPosition() + 1;
5266 {if (true) throw e;}
5268 throw new Error("Missing return statement in function");
5271 static final public ReturnStatement ReturnStatement() throws ParseException {
5272 Expression expr = null;
5273 final Token token,token2;
5274 token = jj_consume_token(RETURN);
5275 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5291 case INTEGER_LITERAL:
5292 case FLOATING_POINT_LITERAL:
5293 case STRING_LITERAL:
5297 expr = Expression();
5300 jj_la1[128] = jj_gen;
5304 token2 = jj_consume_token(SEMICOLON);
5305 {if (true) return new ReturnStatement(expr,token.sourceStart,token2.sourceEnd);}
5306 } catch (ParseException e) {
5307 errorMessage = "';' expected after 'return' statement";
5309 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5310 errorEnd = SimpleCharStream.getPosition() + 1;
5311 {if (true) throw e;}
5313 throw new Error("Missing return statement in function");
5316 static final private boolean jj_2_1(int xla) {
5317 jj_la = xla; jj_lastpos = jj_scanpos = token;
5318 boolean retval = !jj_3_1();
5323 static final private boolean jj_2_2(int xla) {
5324 jj_la = xla; jj_lastpos = jj_scanpos = token;
5325 boolean retval = !jj_3_2();
5330 static final private boolean jj_2_3(int xla) {
5331 jj_la = xla; jj_lastpos = jj_scanpos = token;
5332 boolean retval = !jj_3_3();
5337 static final private boolean jj_2_4(int xla) {
5338 jj_la = xla; jj_lastpos = jj_scanpos = token;
5339 boolean retval = !jj_3_4();
5344 static final private boolean jj_2_5(int xla) {
5345 jj_la = xla; jj_lastpos = jj_scanpos = token;
5346 boolean retval = !jj_3_5();
5351 static final private boolean jj_2_6(int xla) {
5352 jj_la = xla; jj_lastpos = jj_scanpos = token;
5353 boolean retval = !jj_3_6();
5358 static final private boolean jj_3R_114() {
5359 if (jj_scan_token(XOR)) return true;
5360 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5361 if (jj_3R_113()) return true;
5362 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5366 static final private boolean jj_3R_46() {
5367 if (jj_scan_token(LBRACKET)) return true;
5368 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5371 if (jj_3R_52()) jj_scanpos = xsp;
5372 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5373 if (jj_scan_token(RBRACKET)) return true;
5374 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5378 static final private boolean jj_3R_108() {
5379 if (jj_3R_113()) return true;
5380 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5384 if (jj_3R_114()) { jj_scanpos = xsp; break; }
5385 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5390 static final private boolean jj_3R_50() {
5391 if (jj_3R_64()) return true;
5392 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5396 static final private boolean jj_3R_109() {
5397 if (jj_scan_token(BIT_OR)) return true;
5398 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5399 if (jj_3R_108()) return true;
5400 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5404 static final private boolean jj_3R_102() {
5405 if (jj_3R_108()) return true;
5406 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5410 if (jj_3R_109()) { jj_scanpos = xsp; break; }
5411 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5416 static final private boolean jj_3R_45() {
5417 if (jj_scan_token(CLASSACCESS)) return true;
5418 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5423 if (jj_3R_51()) return true;
5424 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5425 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5429 static final private boolean jj_3R_39() {
5434 if (jj_3R_46()) return true;
5435 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5436 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5440 static final private boolean jj_3R_105() {
5441 if (jj_scan_token(DOT)) return true;
5442 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5443 if (jj_3R_102()) return true;
5444 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5448 static final private boolean jj_3R_204() {
5449 if (jj_3R_115()) return true;
5450 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5454 static final private boolean jj_3R_96() {
5455 if (jj_3R_102()) return true;
5456 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5460 if (jj_3R_105()) { jj_scanpos = xsp; break; }
5461 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5466 static final private boolean jj_3R_203() {
5467 if (jj_3R_48()) return true;
5468 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5472 static final private boolean jj_3R_202() {
5473 if (jj_scan_token(IDENTIFIER)) return true;
5474 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5478 static final private boolean jj_3R_197() {
5485 if (jj_3R_204()) return true;
5486 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5487 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5488 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5492 static final private boolean jj_3R_107() {
5493 if (jj_scan_token(_ANDL)) return true;
5494 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5498 static final private boolean jj_3R_106() {
5499 if (jj_scan_token(AND_AND)) return true;
5500 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5504 static final private boolean jj_3R_184() {
5505 if (jj_scan_token(ARRAY)) return true;
5506 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5507 if (jj_3R_193()) return true;
5508 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5512 static final private boolean jj_3R_99() {
5517 if (jj_3R_107()) return true;
5518 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5519 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5520 if (jj_3R_96()) return true;
5521 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5525 static final private boolean jj_3R_153() {
5526 if (jj_scan_token(LBRACE)) return true;
5527 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5528 if (jj_3R_47()) return true;
5529 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5530 if (jj_scan_token(RBRACE)) return true;
5531 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5535 static final private boolean jj_3R_80() {
5536 if (jj_3R_96()) return true;
5537 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5541 if (jj_3R_99()) { jj_scanpos = xsp; break; }
5542 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5547 static final private boolean jj_3R_78() {
5548 if (jj_scan_token(HOOK)) return true;
5549 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5550 if (jj_3R_47()) return true;
5551 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5552 if (jj_scan_token(COLON)) return true;
5553 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5554 if (jj_3R_68()) return true;
5555 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5559 static final private boolean jj_3R_72() {
5560 if (jj_scan_token(IDENTIFIER)) return true;
5561 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5564 if (jj_3R_153()) jj_scanpos = xsp;
5565 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5569 static final private boolean jj_3R_112() {
5570 if (jj_scan_token(ASSIGN)) return true;
5571 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5572 if (jj_3R_47()) return true;
5573 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5577 static final private boolean jj_3R_101() {
5578 if (jj_scan_token(_ORL)) return true;
5579 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5583 static final private boolean jj_3R_198() {
5584 if (jj_3R_201()) return true;
5585 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5589 static final private boolean jj_3R_100() {
5590 if (jj_scan_token(OR_OR)) return true;
5591 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5595 static final private boolean jj_3R_116() {
5596 if (jj_3R_115()) return true;
5597 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5601 static final private boolean jj_3R_71() {
5602 if (jj_scan_token(LBRACE)) return true;
5603 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5604 if (jj_3R_47()) return true;
5605 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5606 if (jj_scan_token(RBRACE)) return true;
5607 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5611 static final private boolean jj_3R_64() {
5616 if (jj_3R_72()) return true;
5617 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5618 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5622 static final private boolean jj_3R_82() {
5627 if (jj_3R_101()) return true;
5628 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5629 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5630 if (jj_3R_80()) return true;
5631 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5635 static final private boolean jj_3R_75() {
5636 if (jj_3R_80()) return true;
5637 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5641 if (jj_3R_82()) { jj_scanpos = xsp; break; }
5642 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5647 static final private boolean jj_3R_111() {
5648 if (jj_scan_token(COMMA)) return true;
5649 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5652 if (jj_3R_116()) jj_scanpos = xsp;
5653 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5657 static final private boolean jj_3R_144() {
5658 if (jj_3R_129()) return true;
5659 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5663 static final private boolean jj_3R_190() {
5664 if (jj_scan_token(NEW)) return true;
5665 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5666 if (jj_3R_197()) return true;
5667 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5670 if (jj_3R_198()) jj_scanpos = xsp;
5671 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5675 static final private boolean jj_3_2() {
5676 if (jj_scan_token(DOLLAR)) return true;
5677 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5678 if (jj_scan_token(DOLLAR)) return true;
5679 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5683 static final private boolean jj_3R_196() {
5684 if (jj_3R_201()) return true;
5685 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5689 static final private boolean jj_3R_110() {
5690 if (jj_3R_115()) return true;
5691 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5695 static final private boolean jj_3R_189() {
5696 if (jj_3R_115()) return true;
5697 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5700 if (jj_3R_196()) jj_scanpos = xsp;
5701 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5705 static final private boolean jj_3R_138() {
5706 if (jj_3R_64()) return true;
5707 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5711 static final private boolean jj_3R_68() {
5712 if (jj_3R_75()) return true;
5713 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5716 if (jj_3R_78()) jj_scanpos = xsp;
5717 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5721 static final private boolean jj_3R_137() {
5722 if (jj_scan_token(DOLLAR)) return true;
5723 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5724 if (jj_3R_129()) return true;
5725 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5729 static final private boolean jj_3R_103() {
5730 if (jj_scan_token(LIST)) return true;
5731 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5732 if (jj_scan_token(LPAREN)) return true;
5733 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5736 if (jj_3R_110()) jj_scanpos = xsp;
5737 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5740 if (jj_3R_111()) { jj_scanpos = xsp; break; }
5741 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5743 if (jj_scan_token(RPAREN)) return true;
5744 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5746 if (jj_3R_112()) jj_scanpos = xsp;
5747 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5751 static final private boolean jj_3R_195() {
5752 if (jj_3R_201()) return true;
5753 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5757 static final private boolean jj_3R_95() {
5758 if (jj_scan_token(TILDEEQUAL)) return true;
5759 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5763 static final private boolean jj_3R_129() {
5770 if (jj_3R_138()) return true;
5771 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5772 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5773 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5777 static final private boolean jj_3R_136() {
5778 if (jj_scan_token(DOLLAR_ID)) return true;
5779 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5782 if (jj_3R_144()) jj_scanpos = xsp;
5783 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5787 static final private boolean jj_3R_94() {
5788 if (jj_scan_token(DOTASSIGN)) return true;
5789 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5793 static final private boolean jj_3R_93() {
5794 if (jj_scan_token(ORASSIGN)) return true;
5795 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5799 static final private boolean jj_3R_92() {
5800 if (jj_scan_token(XORASSIGN)) return true;
5801 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5805 static final private boolean jj_3R_194() {
5806 if (jj_scan_token(STATICCLASSACCESS)) return true;
5807 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5808 if (jj_3R_197()) return true;
5809 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5813 static final private boolean jj_3R_91() {
5814 if (jj_scan_token(ANDASSIGN)) return true;
5815 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5819 static final private boolean jj_3R_128() {
5820 if (jj_3R_129()) return true;
5821 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5825 static final private boolean jj_3R_90() {
5826 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
5827 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5831 static final private boolean jj_3R_89() {
5832 if (jj_scan_token(LSHIFTASSIGN)) return true;
5833 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5837 static final private boolean jj_3R_88() {
5838 if (jj_scan_token(MINUSASSIGN)) return true;
5839 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5843 static final private boolean jj_3R_87() {
5844 if (jj_scan_token(PLUSASSIGN)) return true;
5845 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5849 static final private boolean jj_3R_104() {
5850 if (jj_scan_token(PRINT)) return true;
5851 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5852 if (jj_3R_47()) return true;
5853 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5857 static final private boolean jj_3R_86() {
5858 if (jj_scan_token(REMASSIGN)) return true;
5859 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5863 static final private boolean jj_3R_85() {
5864 if (jj_scan_token(SLASHASSIGN)) return true;
5865 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5869 static final private boolean jj_3R_188() {
5870 if (jj_scan_token(IDENTIFIER)) return true;
5871 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5875 if (jj_3R_194()) { jj_scanpos = xsp; break; }
5876 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5879 if (jj_3R_195()) jj_scanpos = xsp;
5880 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5884 static final private boolean jj_3R_183() {
5891 if (jj_3R_190()) return true;
5892 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5893 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5894 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5898 static final private boolean jj_3R_84() {
5899 if (jj_scan_token(STARASSIGN)) return true;
5900 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5904 static final private boolean jj_3R_83() {
5905 if (jj_scan_token(ASSIGN)) return true;
5906 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5910 static final private boolean jj_3R_79() {
5937 if (jj_3R_95()) return true;
5938 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5939 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5940 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5941 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5942 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5943 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5944 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5945 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5946 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5947 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5948 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5949 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5950 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5954 static final private boolean jj_3R_74() {
5955 if (jj_scan_token(DOLLAR)) return true;
5956 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5957 if (jj_3R_129()) return true;
5958 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5962 static final private boolean jj_3R_98() {
5963 if (jj_3R_104()) return true;
5964 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5968 static final private boolean jj_3R_175() {
5969 if (jj_3R_184()) return true;
5970 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5974 static final private boolean jj_3R_182() {
5975 if (jj_scan_token(BIT_AND)) return true;
5976 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5980 static final private boolean jj_3R_97() {
5981 if (jj_3R_103()) return true;
5982 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5986 static final private boolean jj_3R_81() {
5991 if (jj_3R_98()) return true;
5992 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5993 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5997 static final private boolean jj_3R_170() {
6002 if (jj_3R_175()) return true;
6003 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6004 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6008 static final private boolean jj_3R_174() {
6011 if (jj_3R_182()) jj_scanpos = xsp;
6012 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6013 if (jj_3R_183()) return true;
6014 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6018 static final private boolean jj_3R_73() {
6019 if (jj_scan_token(DOLLAR_ID)) return true;
6020 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6023 if (jj_3R_128()) jj_scanpos = xsp;
6024 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6028 static final private boolean jj_3R_65() {
6033 if (jj_3R_74()) return true;
6034 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6035 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6039 static final private boolean jj_3R_77() {
6040 if (jj_3R_81()) return true;
6041 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6045 static final private boolean jj_3R_76() {
6046 if (jj_scan_token(BANG)) return true;
6047 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6048 if (jj_3R_69()) return true;
6049 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6053 static final private boolean jj_3R_69() {
6058 if (jj_3R_77()) return true;
6059 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6060 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6064 static final private boolean jj_3R_192() {
6065 if (jj_scan_token(MINUS_MINUS)) return true;
6066 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6070 static final private boolean jj_3R_191() {
6071 if (jj_scan_token(PLUS_PLUS)) return true;
6072 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6076 static final private boolean jj_3R_187() {
6081 if (jj_3R_192()) return true;
6082 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6083 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6087 static final private boolean jj_3R_54() {
6088 if (jj_3R_69()) return true;
6089 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6093 static final private boolean jj_3R_172() {
6094 if (jj_3R_170()) return true;
6095 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6098 if (jj_3R_187()) jj_scanpos = xsp;
6099 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6103 static final private boolean jj_3R_186() {
6104 if (jj_scan_token(ARRAY)) return true;
6105 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6109 static final private boolean jj_3R_185() {
6110 if (jj_3R_48()) return true;
6111 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6115 static final private boolean jj_3R_42() {
6116 if (jj_scan_token(ARRAY)) return true;
6117 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6121 static final private boolean jj_3R_171() {
6122 if (jj_scan_token(LPAREN)) return true;
6123 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6128 if (jj_3R_186()) return true;
6129 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6130 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6131 if (jj_scan_token(RPAREN)) return true;
6132 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6133 if (jj_3R_145()) return true;
6134 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6138 static final private boolean jj_3R_41() {
6139 if (jj_3R_48()) return true;
6140 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6144 static final private boolean jj_3R_70() {
6145 if (jj_3R_79()) return true;
6146 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6147 if (jj_3R_47()) return true;
6148 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6152 static final private boolean jj_3_4() {
6153 if (jj_scan_token(LPAREN)) return true;
6154 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6159 if (jj_3R_42()) return true;
6160 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6161 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6162 if (jj_scan_token(RPAREN)) return true;
6163 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6167 static final private boolean jj_3R_47() {
6172 if (jj_3R_54()) return true;
6173 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6174 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6178 static final private boolean jj_3R_53() {
6179 if (jj_3R_68()) return true;
6180 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6183 if (jj_3R_70()) jj_scanpos = xsp;
6184 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6188 static final private boolean jj_3_1() {
6189 if (jj_3R_39()) return true;
6190 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6194 static final private boolean jj_3R_169() {
6195 if (jj_scan_token(LPAREN)) return true;
6196 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6197 if (jj_3R_47()) return true;
6198 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6199 if (jj_scan_token(RPAREN)) return true;
6200 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6204 static final private boolean jj_3R_168() {
6205 if (jj_3R_173()) return true;
6206 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6210 static final private boolean jj_3R_167() {
6211 if (jj_3R_172()) return true;
6212 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6216 static final private boolean jj_3R_163() {
6225 if (jj_3R_169()) return true;
6226 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6227 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6228 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6229 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6233 static final private boolean jj_3R_166() {
6234 if (jj_3R_171()) return true;
6235 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6239 static final private boolean jj_3R_115() {
6240 if (jj_3R_65()) return true;
6241 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6245 if (jj_3_1()) { jj_scanpos = xsp; break; }
6246 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6251 static final private boolean jj_3R_63() {
6252 if (jj_scan_token(OBJECT)) return true;
6253 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6257 static final private boolean jj_3R_62() {
6258 if (jj_scan_token(INTEGER)) return true;
6259 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6263 static final private boolean jj_3R_61() {
6264 if (jj_scan_token(INT)) return true;
6265 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6269 static final private boolean jj_3R_60() {
6270 if (jj_scan_token(FLOAT)) return true;
6271 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6275 static final private boolean jj_3R_59() {
6276 if (jj_scan_token(DOUBLE)) return true;
6277 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6281 static final private boolean jj_3R_58() {
6282 if (jj_scan_token(REAL)) return true;
6283 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6287 static final private boolean jj_3R_165() {
6288 if (jj_scan_token(MINUS_MINUS)) return true;
6289 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6293 static final private boolean jj_3R_57() {
6294 if (jj_scan_token(BOOLEAN)) return true;
6295 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6299 static final private boolean jj_3R_56() {
6300 if (jj_scan_token(BOOL)) return true;
6301 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6305 static final private boolean jj_3R_164() {
6306 if (jj_scan_token(PLUS_PLUS)) return true;
6307 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6311 static final private boolean jj_3R_48() {
6330 if (jj_3R_63()) return true;
6331 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6332 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6333 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6334 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6335 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6336 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6337 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6338 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6339 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6343 static final private boolean jj_3R_55() {
6344 if (jj_scan_token(STRING)) return true;
6345 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6349 static final private boolean jj_3R_162() {
6354 if (jj_3R_165()) return true;
6355 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6356 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6357 if (jj_3R_170()) return true;
6358 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6362 static final private boolean jj_3R_161() {
6363 if (jj_3R_163()) return true;
6364 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6368 static final private boolean jj_3R_160() {
6369 if (jj_3R_162()) return true;
6370 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6374 static final private boolean jj_3R_159() {
6375 if (jj_scan_token(MINUS)) return true;
6376 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6377 if (jj_3R_149()) return true;
6378 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6382 static final private boolean jj_3R_157() {
6391 if (jj_3R_161()) return true;
6392 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6393 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6394 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6395 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6399 static final private boolean jj_3R_158() {
6400 if (jj_scan_token(PLUS)) return true;
6401 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6402 if (jj_3R_149()) return true;
6403 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6407 static final private boolean jj_3R_49() {
6408 if (jj_scan_token(COMMA)) return true;
6409 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6410 if (jj_3R_47()) return true;
6411 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6415 static final private boolean jj_3R_44() {
6416 if (jj_3R_47()) return true;
6417 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6421 if (jj_3R_49()) { jj_scanpos = xsp; break; }
6422 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6427 static final private boolean jj_3R_156() {
6428 if (jj_3R_157()) return true;
6429 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6433 static final private boolean jj_3R_155() {
6434 if (jj_scan_token(BANG)) return true;
6435 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6436 if (jj_3R_149()) return true;
6437 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6441 static final private boolean jj_3R_149() {
6448 if (jj_3R_156()) return true;
6449 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6450 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6451 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6455 static final private boolean jj_3R_154() {
6456 if (jj_scan_token(AT)) return true;
6457 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6458 if (jj_3R_149()) return true;
6459 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6463 static final private boolean jj_3R_145() {
6464 if (jj_3R_149()) return true;
6465 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6469 static final private boolean jj_3R_152() {
6470 if (jj_scan_token(REMAINDER)) return true;
6471 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6475 static final private boolean jj_3R_151() {
6476 if (jj_scan_token(SLASH)) return true;
6477 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6481 static final private boolean jj_3R_150() {
6482 if (jj_scan_token(STAR)) return true;
6483 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6487 static final private boolean jj_3R_146() {
6494 if (jj_3R_152()) return true;
6495 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6496 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6497 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6498 if (jj_3R_145()) return true;
6499 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6503 static final private boolean jj_3R_43() {
6504 if (jj_3R_47()) return true;
6505 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6506 if (jj_scan_token(SEMICOLON)) return true;
6507 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6511 static final private boolean jj_3R_139() {
6512 if (jj_3R_145()) return true;
6513 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6517 if (jj_3R_146()) { jj_scanpos = xsp; break; }
6518 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6523 static final private boolean jj_3R_148() {
6524 if (jj_scan_token(MINUS)) return true;
6525 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6529 static final private boolean jj_3R_147() {
6530 if (jj_scan_token(PLUS)) return true;
6531 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6535 static final private boolean jj_3_6() {
6536 if (jj_3R_44()) return true;
6537 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6541 static final private boolean jj_3R_140() {
6546 if (jj_3R_148()) return true;
6547 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6548 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6549 if (jj_3R_139()) return true;
6550 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6554 static final private boolean jj_3R_130() {
6555 if (jj_3R_139()) return true;
6556 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6560 if (jj_3R_140()) { jj_scanpos = xsp; break; }
6561 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6566 static final private boolean jj_3_5() {
6567 if (jj_3R_43()) return true;
6568 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6572 static final private boolean jj_3R_143() {
6573 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
6574 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6578 static final private boolean jj_3R_142() {
6579 if (jj_scan_token(RSIGNEDSHIFT)) return true;
6580 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6584 static final private boolean jj_3R_141() {
6585 if (jj_scan_token(LSHIFT)) return true;
6586 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6590 static final private boolean jj_3R_131() {
6597 if (jj_3R_143()) return true;
6598 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6599 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6600 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6601 if (jj_3R_130()) return true;
6602 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6606 static final private boolean jj_3R_121() {
6607 if (jj_3R_130()) return true;
6608 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6612 if (jj_3R_131()) { jj_scanpos = xsp; break; }
6613 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6618 static final private boolean jj_3R_135() {
6619 if (jj_scan_token(GE)) return true;
6620 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6624 static final private boolean jj_3R_134() {
6625 if (jj_scan_token(LE)) return true;
6626 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6630 static final private boolean jj_3R_133() {
6631 if (jj_scan_token(GT)) return true;
6632 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6636 static final private boolean jj_3R_132() {
6637 if (jj_scan_token(LT)) return true;
6638 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6642 static final private boolean jj_3R_122() {
6651 if (jj_3R_135()) return true;
6652 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6653 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6654 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6655 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6656 if (jj_3R_121()) return true;
6657 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6661 static final private boolean jj_3R_208() {
6662 if (jj_scan_token(COMMA)) return true;
6663 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6664 if (jj_3R_47()) return true;
6665 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6669 static final private boolean jj_3R_119() {
6670 if (jj_3R_121()) return true;
6671 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6675 if (jj_3R_122()) { jj_scanpos = xsp; break; }
6676 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6681 static final private boolean jj_3R_207() {
6682 if (jj_3R_47()) return true;
6683 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6687 if (jj_3R_208()) { jj_scanpos = xsp; break; }
6688 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6693 static final private boolean jj_3R_200() {
6694 if (jj_scan_token(COMMA)) return true;
6695 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6699 static final private boolean jj_3_3() {
6700 if (jj_scan_token(COMMA)) return true;
6701 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6702 if (jj_3R_40()) return true;
6703 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6707 static final private boolean jj_3R_199() {
6708 if (jj_3R_40()) return true;
6709 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6713 if (jj_3_3()) { jj_scanpos = xsp; break; }
6714 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6719 static final private boolean jj_3R_205() {
6720 if (jj_3R_207()) return true;
6721 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6725 static final private boolean jj_3R_67() {
6726 if (jj_3R_48()) return true;
6727 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6731 static final private boolean jj_3R_193() {
6732 if (jj_scan_token(LPAREN)) return true;
6733 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6736 if (jj_3R_199()) jj_scanpos = xsp;
6737 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6739 if (jj_3R_200()) jj_scanpos = xsp;
6740 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6741 if (jj_scan_token(RPAREN)) return true;
6742 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6746 static final private boolean jj_3R_127() {
6747 if (jj_scan_token(TRIPLEEQUAL)) return true;
6748 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6752 static final private boolean jj_3R_126() {
6753 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
6754 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6758 static final private boolean jj_3R_125() {
6759 if (jj_scan_token(NOT_EQUAL)) return true;
6760 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6764 static final private boolean jj_3R_124() {
6765 if (jj_scan_token(DIF)) return true;
6766 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6770 static final private boolean jj_3R_123() {
6771 if (jj_scan_token(EQUAL_EQUAL)) return true;
6772 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6776 static final private boolean jj_3R_201() {
6777 if (jj_scan_token(LPAREN)) return true;
6778 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6781 if (jj_3R_205()) jj_scanpos = xsp;
6782 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6783 if (jj_scan_token(RPAREN)) return true;
6784 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6788 static final private boolean jj_3R_206() {
6789 if (jj_scan_token(ARRAYASSIGN)) return true;
6790 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6791 if (jj_3R_47()) return true;
6792 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6796 static final private boolean jj_3R_120() {
6807 if (jj_3R_127()) return true;
6808 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6809 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6810 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6811 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6812 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6813 if (jj_3R_119()) return true;
6814 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6818 static final private boolean jj_3R_117() {
6819 if (jj_3R_119()) return true;
6820 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6824 if (jj_3R_120()) { jj_scanpos = xsp; break; }
6825 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6830 static final private boolean jj_3R_40() {
6831 if (jj_3R_47()) return true;
6832 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6835 if (jj_3R_206()) jj_scanpos = xsp;
6836 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6840 static final private boolean jj_3R_181() {
6841 if (jj_scan_token(NULL)) return true;
6842 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6846 static final private boolean jj_3R_180() {
6847 if (jj_scan_token(FALSE)) return true;
6848 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6852 static final private boolean jj_3R_51() {
6853 if (jj_3R_65()) return true;
6854 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6858 static final private boolean jj_3R_179() {
6859 if (jj_scan_token(TRUE)) return true;
6860 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6864 static final private boolean jj_3R_178() {
6865 if (jj_scan_token(STRING_LITERAL)) return true;
6866 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6870 static final private boolean jj_3R_177() {
6871 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
6872 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6876 static final private boolean jj_3R_176() {
6877 if (jj_scan_token(INTEGER_LITERAL)) return true;
6878 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6882 static final private boolean jj_3R_173() {
6895 if (jj_3R_181()) return true;
6896 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6897 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6898 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6899 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6900 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6901 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6905 static final private boolean jj_3R_118() {
6906 if (jj_scan_token(BIT_AND)) return true;
6907 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6908 if (jj_3R_117()) return true;
6909 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6913 static final private boolean jj_3R_52() {
6918 if (jj_3R_67()) return true;
6919 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6920 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6924 static final private boolean jj_3R_66() {
6925 if (jj_3R_47()) return true;
6926 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6930 static final private boolean jj_3R_113() {
6931 if (jj_3R_117()) return true;
6932 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6936 if (jj_3R_118()) { jj_scanpos = xsp; break; }
6937 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6942 static private boolean jj_initialized_once = false;
6943 static public PHPParserTokenManager token_source;
6944 static SimpleCharStream jj_input_stream;
6945 static public Token token, jj_nt;
6946 static private int jj_ntk;
6947 static private Token jj_scanpos, jj_lastpos;
6948 static private int jj_la;
6949 static public boolean lookingAhead = false;
6950 static private boolean jj_semLA;
6951 static private int jj_gen;
6952 static final private int[] jj_la1 = new int[129];
6953 static private int[] jj_la1_0;
6954 static private int[] jj_la1_1;
6955 static private int[] jj_la1_2;
6956 static private int[] jj_la1_3;
6957 static private int[] jj_la1_4;
6965 private static void jj_la1_0() {
6966 jj_la1_0 = new int[] {0xf960001e,0x6,0x6,0xf960001e,0x0,0xf9600000,0x0,0xc00000,0xc00000,0x0,0x0,0x0,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,0x8000000,0x0,0x0,0x0,0x0,0x0,0x0,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,0x68000000,0x68000000,0x68000000,0xf9000000,0xf9000000,0x68000000,0x0,0x68000000,0x68000000,};
6968 private static void jj_la1_1() {
6969 jj_la1_1 = new int[] {0x875d507f,0x0,0x0,0x875d507f,0x0,0x875d507f,0x8000,0x0,0x0,0x0,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,0x0,0x40000,0x100,0x0,0x0,0x0,0x40000,0x0,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,0x30c0000,0x30c0000,0x30c0000,0x875d507f,0x875d507f,0x30c0000,0x0,0x30c0000,0x30c0000,};
6971 private static void jj_la1_2() {
6972 jj_la1_2 = new int[] {0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x13c1c00,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x800,0x800,0x0,0x0,0x0,0x0,0x0,0x0,0x300000,0x0,0x13c1c00,0x0,0x1000000,0x0,0x1000000,0x1000000,0x3fe,0x0,0x13c1c00,0x1000,0x0,0x0,0x4000,0x80010000,0x80010000,0x20000,0x20000,0x0,0x2000000,0x4000000,0x1000000,0x0,0x0,0x0,0x0,0x70000000,0x70000000,0x300000,0x300000,0x8c00000,0x8c00000,0x13c1c00,0x13c0800,0xc0000,0x1000800,0x3fe,0xc0000,0xc0000,0x1000000,0x1000800,0x0,0x0,0x0,0x0,0x800,0xbfe,0x800,0x13c1ffe,0x13c1ffe,0x0,0x0,0x13c1c00,0x0,0x400,0x400,0x13c1c00,0x0,0x0,0x0,0x800,0x0,0x800,0x0,0x0,0x0,0x0,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x0,0x0,0xc0000,0xc0000,0x10c0800,0x8000,0x0,0x0,0x13c1c00,0x13c1c00,0x0,0x0,0x13c1c00,0x13c1c00,0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x0,0x13c9c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c9c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c9c00,0x13c1c00,0x0,0x13c1c00,0x13c1c00,};
6974 private static void jj_la1_3() {
6975 jj_la1_3 = new int[] {0x2288a2,0x0,0x0,0x2288a2,0x200000,0x2288a2,0x0,0x0,0x0,0x400000,0x0,0x0,0x20800,0x0,0x20800,0x0,0x20800,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,0x800,0x0,0x8000,0x8000,0x8000,0x800,0x800,0x20800,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,0x88a2,0x88a2,0x88a2,0x2288a2,0x2288a2,0x88a2,0x400000,0x88a2,0x88a2,};
6977 private static void jj_la1_4() {
6978 jj_la1_4 = new int[] {0x4000,0x0,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x2,0x2,0x4000,0x4000,0x4000,0x4000,0x0,0x0,0x0,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,0x4000,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,};
6980 static final private JJCalls[] jj_2_rtns = new JJCalls[6];
6981 static private boolean jj_rescan = false;
6982 static private int jj_gc = 0;
6984 public PHPParser(java.io.InputStream stream) {
6985 if (jj_initialized_once) {
6986 System.out.println("ERROR: Second call to constructor of static parser. You must");
6987 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6988 System.out.println(" during parser generation.");
6991 jj_initialized_once = true;
6992 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6993 token_source = new PHPParserTokenManager(jj_input_stream);
6994 token = new Token();
6997 for (int i = 0; i < 129; i++) jj_la1[i] = -1;
6998 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7001 static public void ReInit(java.io.InputStream stream) {
7002 jj_input_stream.ReInit(stream, 1, 1);
7003 token_source.ReInit(jj_input_stream);
7004 token = new Token();
7007 for (int i = 0; i < 129; i++) jj_la1[i] = -1;
7008 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7011 public PHPParser(java.io.Reader stream) {
7012 if (jj_initialized_once) {
7013 System.out.println("ERROR: Second call to constructor of static parser. You must");
7014 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7015 System.out.println(" during parser generation.");
7018 jj_initialized_once = true;
7019 jj_input_stream = new SimpleCharStream(stream, 1, 1);
7020 token_source = new PHPParserTokenManager(jj_input_stream);
7021 token = new Token();
7024 for (int i = 0; i < 129; i++) jj_la1[i] = -1;
7025 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7028 static public void ReInit(java.io.Reader stream) {
7029 jj_input_stream.ReInit(stream, 1, 1);
7030 token_source.ReInit(jj_input_stream);
7031 token = new Token();
7034 for (int i = 0; i < 129; i++) jj_la1[i] = -1;
7035 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7038 public PHPParser(PHPParserTokenManager tm) {
7039 if (jj_initialized_once) {
7040 System.out.println("ERROR: Second call to constructor of static parser. You must");
7041 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
7042 System.out.println(" during parser generation.");
7045 jj_initialized_once = true;
7047 token = new Token();
7050 for (int i = 0; i < 129; i++) jj_la1[i] = -1;
7051 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7054 public void ReInit(PHPParserTokenManager tm) {
7056 token = new Token();
7059 for (int i = 0; i < 129; i++) jj_la1[i] = -1;
7060 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7063 static final private Token jj_consume_token(int kind) throws ParseException {
7065 if ((oldToken = token).next != null) token = token.next;
7066 else token = token.next = token_source.getNextToken();
7068 if (token.kind == kind) {
7070 if (++jj_gc > 100) {
7072 for (int i = 0; i < jj_2_rtns.length; i++) {
7073 JJCalls c = jj_2_rtns[i];
7075 if (c.gen < jj_gen) c.first = null;
7084 throw generateParseException();
7087 static final private boolean jj_scan_token(int kind) {
7088 if (jj_scanpos == jj_lastpos) {
7090 if (jj_scanpos.next == null) {
7091 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
7093 jj_lastpos = jj_scanpos = jj_scanpos.next;
7096 jj_scanpos = jj_scanpos.next;
7099 int i = 0; Token tok = token;
7100 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
7101 if (tok != null) jj_add_error_token(kind, i);
7103 return (jj_scanpos.kind != kind);
7106 static final public Token getNextToken() {
7107 if (token.next != null) token = token.next;
7108 else token = token.next = token_source.getNextToken();
7114 static final public Token getToken(int index) {
7115 Token t = lookingAhead ? jj_scanpos : token;
7116 for (int i = 0; i < index; i++) {
7117 if (t.next != null) t = t.next;
7118 else t = t.next = token_source.getNextToken();
7123 static final private int jj_ntk() {
7124 if ((jj_nt=token.next) == null)
7125 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
7127 return (jj_ntk = jj_nt.kind);
7130 static private java.util.Vector jj_expentries = new java.util.Vector();
7131 static private int[] jj_expentry;
7132 static private int jj_kind = -1;
7133 static private int[] jj_lasttokens = new int[100];
7134 static private int jj_endpos;
7136 static private void jj_add_error_token(int kind, int pos) {
7137 if (pos >= 100) return;
7138 if (pos == jj_endpos + 1) {
7139 jj_lasttokens[jj_endpos++] = kind;
7140 } else if (jj_endpos != 0) {
7141 jj_expentry = new int[jj_endpos];
7142 for (int i = 0; i < jj_endpos; i++) {
7143 jj_expentry[i] = jj_lasttokens[i];
7145 boolean exists = false;
7146 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
7147 int[] oldentry = (int[])(enum.nextElement());
7148 if (oldentry.length == jj_expentry.length) {
7150 for (int i = 0; i < jj_expentry.length; i++) {
7151 if (oldentry[i] != jj_expentry[i]) {
7159 if (!exists) jj_expentries.addElement(jj_expentry);
7160 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
7164 static public ParseException generateParseException() {
7165 jj_expentries.removeAllElements();
7166 boolean[] la1tokens = new boolean[143];
7167 for (int i = 0; i < 143; i++) {
7168 la1tokens[i] = false;
7171 la1tokens[jj_kind] = true;
7174 for (int i = 0; i < 129; i++) {
7175 if (jj_la1[i] == jj_gen) {
7176 for (int j = 0; j < 32; j++) {
7177 if ((jj_la1_0[i] & (1<<j)) != 0) {
7178 la1tokens[j] = true;
7180 if ((jj_la1_1[i] & (1<<j)) != 0) {
7181 la1tokens[32+j] = true;
7183 if ((jj_la1_2[i] & (1<<j)) != 0) {
7184 la1tokens[64+j] = true;
7186 if ((jj_la1_3[i] & (1<<j)) != 0) {
7187 la1tokens[96+j] = true;
7189 if ((jj_la1_4[i] & (1<<j)) != 0) {
7190 la1tokens[128+j] = true;
7195 for (int i = 0; i < 143; i++) {
7197 jj_expentry = new int[1];
7199 jj_expentries.addElement(jj_expentry);
7204 jj_add_error_token(0, 0);
7205 int[][] exptokseq = new int[jj_expentries.size()][];
7206 for (int i = 0; i < jj_expentries.size(); i++) {
7207 exptokseq[i] = (int[])jj_expentries.elementAt(i);
7209 return new ParseException(token, exptokseq, tokenImage);
7212 static final public void enable_tracing() {
7215 static final public void disable_tracing() {
7218 static final private void jj_rescan_token() {
7220 for (int i = 0; i < 6; i++) {
7221 JJCalls p = jj_2_rtns[i];
7223 if (p.gen > jj_gen) {
7224 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7226 case 0: jj_3_1(); break;
7227 case 1: jj_3_2(); break;
7228 case 2: jj_3_3(); break;
7229 case 3: jj_3_4(); break;
7230 case 4: jj_3_5(); break;
7231 case 5: jj_3_6(); break;
7235 } while (p != null);
7240 static final private void jj_save(int index, int xla) {
7241 JJCalls p = jj_2_rtns[index];
7242 while (p.gen > jj_gen) {
7243 if (p.next == null) { p = p.next = new JJCalls(); break; }
7246 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7249 static final class JJCalls {