1 /* Generated By:JavaCC: Do not edit this line. PHPParser.java */
4 import org.eclipse.core.resources.IFile;
5 import org.eclipse.core.resources.IMarker;
6 import org.eclipse.core.runtime.CoreException;
7 import org.eclipse.ui.texteditor.MarkerUtilities;
8 import org.eclipse.jface.preference.IPreferenceStore;
10 import java.util.Hashtable;
11 import java.util.ArrayList;
12 import java.io.StringReader;
14 import java.text.MessageFormat;
16 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
17 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
18 import net.sourceforge.phpdt.internal.compiler.ast.*;
19 import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
20 import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
21 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
25 * This php parser is inspired by the Java 1.2 grammar example
26 * given with JavaCC. You can get JavaCC at http://www.webgain.com
27 * You can test the parser with the PHPParserTestCase2.java
28 * @author Matthieu Casanova
30 public final class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
32 /** The current segment. */
33 private static OutlineableWithChildren currentSegment;
35 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
36 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
37 static PHPOutlineInfo outlineInfo;
39 /** The error level of the current ParseException. */
40 private static int errorLevel = ERROR;
41 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
42 private static String errorMessage;
44 private static int errorStart = -1;
45 private static int errorEnd = -1;
46 private static PHPDocument phpDocument;
48 private static final char[] SYNTAX_ERROR_CHAR = {'s','y','n','t','a','x',' ','e','r','r','o','r'};
50 * The point where html starts.
51 * It will be used by the token manager to create HTMLCode objects
53 public static int htmlStart;
56 private final static int AstStackIncrement = 100;
57 /** The stack of node. */
58 private static AstNode[] nodes;
59 /** The cursor in expression stack. */
60 private static int nodePtr;
62 private static final boolean PARSER_DEBUG = false;
64 public final void setFileToParse(final IFile fileToParse) {
65 PHPParser.fileToParse = fileToParse;
71 public PHPParser(final IFile fileToParse) {
72 this(new StringReader(""));
73 PHPParser.fileToParse = fileToParse;
77 * Reinitialize the parser.
79 private static final void init() {
80 nodes = new AstNode[AstStackIncrement];
86 * Add an php node on the stack.
87 * @param node the node that will be added to the stack
89 private static final void pushOnAstNodes(final AstNode node) {
91 nodes[++nodePtr] = node;
92 } catch (IndexOutOfBoundsException e) {
93 final int oldStackLength = nodes.length;
94 final AstNode[] oldStack = nodes;
95 nodes = new AstNode[oldStackLength + AstStackIncrement];
96 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
97 nodePtr = oldStackLength;
98 nodes[nodePtr] = node;
102 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
103 phpDocument = new PHPDocument(parent,"_root".toCharArray());
104 currentSegment = phpDocument;
105 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
106 final StringReader stream = new StringReader(s);
107 if (jj_input_stream == null) {
108 jj_input_stream = new SimpleCharStream(stream, 1, 1);
114 phpDocument.nodes = new AstNode[nodes.length];
115 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
116 if (PHPeclipsePlugin.DEBUG) {
117 PHPeclipsePlugin.log(1,phpDocument.toString());
119 } catch (ParseException e) {
120 processParseException(e);
126 * This method will process the parse exception.
127 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
128 * @param e the ParseException
130 private static void processParseException(final ParseException e) {
135 if (errorMessage == null) {
136 PHPeclipsePlugin.log(e);
137 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
138 errorStart = SimpleCharStream.getPosition();
139 errorEnd = errorStart + 1;
143 // if (PHPeclipsePlugin.DEBUG) PHPeclipsePlugin.log(e);
147 * Create marker for the parse error.
148 * @param e the ParseException
150 private static void setMarker(final ParseException e) {
152 if (errorStart == -1) {
153 setMarker(fileToParse,
155 SimpleCharStream.tokenBegin,
156 SimpleCharStream.tokenBegin + e.currentToken.image.length(),
158 "Line " + e.currentToken.beginLine);
160 setMarker(fileToParse,
165 "Line " + e.currentToken.beginLine);
169 } catch (CoreException e2) {
170 PHPeclipsePlugin.log(e2);
174 private static void scanLine(final String output,
177 final int brIndx) throws CoreException {
179 final StringBuffer lineNumberBuffer = new StringBuffer(10);
181 current = output.substring(indx, brIndx);
183 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
184 final int onLine = current.indexOf("on line <b>");
186 lineNumberBuffer.delete(0, lineNumberBuffer.length());
187 for (int i = onLine; i < current.length(); i++) {
188 ch = current.charAt(i);
189 if ('0' <= ch && '9' >= ch) {
190 lineNumberBuffer.append(ch);
194 final int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
196 final Hashtable attributes = new Hashtable();
198 current = current.replaceAll("\n", "");
199 current = current.replaceAll("<b>", "");
200 current = current.replaceAll("</b>", "");
201 MarkerUtilities.setMessage(attributes, current);
203 if (current.indexOf(PARSE_ERROR_STRING) != -1)
204 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
205 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
206 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
208 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
209 MarkerUtilities.setLineNumber(attributes, lineNumber);
210 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
215 public final void parse(final String s) throws CoreException {
216 final StringReader stream = new StringReader(s);
217 if (jj_input_stream == null) {
218 jj_input_stream = new SimpleCharStream(stream, 1, 1);
224 } catch (ParseException e) {
225 processParseException(e);
230 * Call the php parse command ( php -l -f <filename> )
231 * and create markers according to the external parser output
233 public static void phpExternalParse(final IFile file) {
234 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
235 final String filename = file.getLocation().toString();
237 final String[] arguments = { filename };
238 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
239 final String command = form.format(arguments);
241 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
244 // parse the buffer to find the errors and warnings
245 createMarkers(parserResult, file);
246 } catch (CoreException e) {
247 PHPeclipsePlugin.log(e);
252 * Put a new html block in the stack.
254 public static final void createNewHTMLCode() {
255 final int currentPosition = SimpleCharStream.getPosition();
256 if (currentPosition == htmlStart || currentPosition > SimpleCharStream.currentBuffer.length()) {
259 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray();
260 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
263 /** Create a new task. */
264 public static final void createNewTask() {
265 final int currentPosition = SimpleCharStream.getPosition();
266 final String todo = SimpleCharStream.currentBuffer.substring(currentPosition-3,
267 SimpleCharStream.currentBuffer.indexOf("\n",
269 PHPeclipsePlugin.log(1,SimpleCharStream.currentBuffer.toString());
271 setMarker(fileToParse,
273 SimpleCharStream.getBeginLine(),
275 "Line "+SimpleCharStream.getBeginLine());
276 } catch (CoreException e) {
277 PHPeclipsePlugin.log(e);
281 private static final void parse() throws ParseException {
285 static final public void phpFile() throws ParseException {
289 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
328 case INTEGER_LITERAL:
329 case FLOATING_POINT_LITERAL:
344 PHPParser.createNewHTMLCode();
345 } catch (TokenMgrError e) {
346 PHPeclipsePlugin.log(e);
347 errorStart = SimpleCharStream.getPosition();
348 errorEnd = errorStart + 1;
349 errorMessage = e.getMessage();
351 {if (true) throw generateParseException();}
356 * A php block is a <?= expression [;]?>
357 * or <?php somephpcode ?>
358 * or <? somephpcode ?>
360 static final public void PhpBlock() throws ParseException {
361 final int start = SimpleCharStream.getPosition();
362 final PHPEchoBlock phpEchoBlock;
363 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
365 phpEchoBlock = phpEchoBlock();
366 pushOnAstNodes(phpEchoBlock);
405 case INTEGER_LITERAL:
406 case FLOATING_POINT_LITERAL:
413 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
416 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
418 jj_consume_token(PHPSTARTLONG);
421 jj_consume_token(PHPSTARTSHORT);
423 setMarker(fileToParse,
424 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
426 SimpleCharStream.getPosition(),
428 "Line " + token.beginLine);
429 } catch (CoreException e) {
430 PHPeclipsePlugin.log(e);
435 jj_consume_token(-1);
436 throw new ParseException();
445 jj_consume_token(PHPEND);
446 } catch (ParseException e) {
447 errorMessage = "'?>' expected";
449 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
450 errorEnd = SimpleCharStream.getPosition() + 1;
451 processParseException(e);
456 jj_consume_token(-1);
457 throw new ParseException();
461 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
462 final Expression expr;
463 final int pos = SimpleCharStream.getPosition();
464 final PHPEchoBlock echoBlock;
465 jj_consume_token(PHPECHOSTART);
467 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
469 jj_consume_token(SEMICOLON);
475 jj_consume_token(PHPEND);
476 echoBlock = new PHPEchoBlock(expr,pos,SimpleCharStream.getPosition());
477 pushOnAstNodes(echoBlock);
478 {if (true) return echoBlock;}
479 throw new Error("Missing return statement in function");
482 static final public void Php() throws ParseException {
485 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
520 case INTEGER_LITERAL:
521 case FLOATING_POINT_LITERAL:
538 static final public ClassDeclaration ClassDeclaration() throws ParseException {
539 final ClassDeclaration classDeclaration;
540 final Token className,superclassName;
542 char[] classNameImage = SYNTAX_ERROR_CHAR;
543 char[] superclassNameImage = null;
544 jj_consume_token(CLASS);
545 pos = SimpleCharStream.getPosition();
547 className = jj_consume_token(IDENTIFIER);
548 classNameImage = className.image.toCharArray();
549 } catch (ParseException e) {
550 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
552 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
553 errorEnd = SimpleCharStream.getPosition() + 1;
554 processParseException(e);
556 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
558 jj_consume_token(EXTENDS);
560 superclassName = jj_consume_token(IDENTIFIER);
561 superclassNameImage = superclassName.image.toCharArray();
562 } catch (ParseException e) {
563 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
565 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
566 errorEnd = SimpleCharStream.getPosition() + 1;
567 processParseException(e);
568 superclassNameImage = SYNTAX_ERROR_CHAR;
575 if (superclassNameImage == null) {
576 classDeclaration = new ClassDeclaration(currentSegment,
581 classDeclaration = new ClassDeclaration(currentSegment,
587 currentSegment.add(classDeclaration);
588 currentSegment = classDeclaration;
589 ClassBody(classDeclaration);
590 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
591 classDeclaration.sourceEnd = SimpleCharStream.getPosition();
592 pushOnAstNodes(classDeclaration);
593 {if (true) return classDeclaration;}
594 throw new Error("Missing return statement in function");
597 static final public void ClassBody(final ClassDeclaration classDeclaration) throws ParseException {
599 jj_consume_token(LBRACE);
600 } catch (ParseException e) {
601 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "'. '{' expected";
603 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
604 errorEnd = SimpleCharStream.getPosition() + 1;
605 processParseException(e);
609 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
618 ClassBodyDeclaration(classDeclaration);
621 jj_consume_token(RBRACE);
622 } catch (ParseException e) {
623 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. 'var', 'function' or '}' expected";
625 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
626 errorEnd = SimpleCharStream.getPosition() + 1;
627 processParseException(e);
632 * A class can contain only methods and fields.
634 static final public void ClassBodyDeclaration(final ClassDeclaration classDeclaration) throws ParseException {
635 final MethodDeclaration method;
636 final FieldDeclaration field;
637 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
639 method = MethodDeclaration();
640 method.analyzeCode();
641 classDeclaration.addMethod(method);
644 field = FieldDeclaration();
645 classDeclaration.addField(field);
649 jj_consume_token(-1);
650 throw new ParseException();
655 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
656 * it is only used by ClassBodyDeclaration()
658 static final public FieldDeclaration FieldDeclaration() throws ParseException {
659 VariableDeclaration variableDeclaration;
660 final VariableDeclaration[] list;
661 final ArrayList arrayList = new ArrayList();
662 final int pos = SimpleCharStream.getPosition();
663 jj_consume_token(VAR);
664 variableDeclaration = VariableDeclaratorNoSuffix();
665 arrayList.add(variableDeclaration);
666 outlineInfo.addVariable(new String(variableDeclaration.name()));
669 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
677 jj_consume_token(COMMA);
678 variableDeclaration = VariableDeclaratorNoSuffix();
679 arrayList.add(variableDeclaration);
680 outlineInfo.addVariable(new String(variableDeclaration.name()));
683 jj_consume_token(SEMICOLON);
684 } catch (ParseException e) {
685 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
687 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
688 errorEnd = SimpleCharStream.getPosition() + 1;
689 processParseException(e);
691 list = new VariableDeclaration[arrayList.size()];
692 arrayList.toArray(list);
693 {if (true) return new FieldDeclaration(list,
695 SimpleCharStream.getPosition(),
697 throw new Error("Missing return statement in function");
701 * a strict variable declarator : there cannot be a suffix here.
703 static final public VariableDeclaration VariableDeclaratorNoSuffix() throws ParseException {
705 Expression initializer = null;
706 final int pos = SimpleCharStream.getPosition();
707 varName = jj_consume_token(DOLLAR_ID);
708 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
710 jj_consume_token(ASSIGN);
712 initializer = VariableInitializer();
713 } catch (ParseException e) {
714 errorMessage = "Literal expression expected in variable initializer";
716 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
717 errorEnd = SimpleCharStream.getPosition() + 1;
718 processParseException(e);
725 if (initializer == null) {
726 {if (true) return new VariableDeclaration(currentSegment,
727 new Variable(varName.image.substring(1).toCharArray(),SimpleCharStream.getPosition()-varName.image.length()-1,SimpleCharStream.getPosition()),
729 SimpleCharStream.getPosition());}
731 {if (true) return new VariableDeclaration(currentSegment,
732 new Variable(varName.image.substring(1).toCharArray(),SimpleCharStream.getPosition()-varName.image.length()-1,SimpleCharStream.getPosition()),
734 VariableDeclaration.EQUAL,
736 throw new Error("Missing return statement in function");
739 static final public VariableDeclaration VariableDeclarator() throws ParseException {
740 final String varName;
741 Expression initializer = null;
742 final int pos = SimpleCharStream.getPosition();
743 varName = VariableDeclaratorId();
744 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
746 jj_consume_token(ASSIGN);
748 initializer = VariableInitializer();
749 } catch (ParseException e) {
750 errorMessage = "Literal expression expected in variable initializer";
752 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
753 errorEnd = SimpleCharStream.getPosition() + 1;
754 processParseException(e);
761 if (initializer == null) {
762 {if (true) return new VariableDeclaration(currentSegment,
763 new Variable(varName.substring(1).toCharArray(),SimpleCharStream.getPosition()-varName.length()-1,SimpleCharStream.getPosition()),
765 SimpleCharStream.getPosition());}
767 {if (true) return new VariableDeclaration(currentSegment,
768 new Variable(varName.substring(1).toCharArray(),SimpleCharStream.getPosition()-varName.length()-1,SimpleCharStream.getPosition()),
770 VariableDeclaration.EQUAL,
772 throw new Error("Missing return statement in function");
777 * @return the variable name (with suffix)
779 static final public String VariableDeclaratorId() throws ParseException {
781 Expression expression = null;
782 final int pos = SimpleCharStream.getPosition();
783 ConstantIdentifier ex;
793 ex = new ConstantIdentifier(var.toCharArray(),
795 SimpleCharStream.getPosition());
796 expression = VariableSuffix(ex);
798 if (expression == null) {
799 {if (true) return var;}
801 {if (true) return expression.toStringExpression();}
802 } catch (ParseException e) {
803 errorMessage = "'$' expected for variable identifier";
805 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
806 errorEnd = SimpleCharStream.getPosition() + 1;
809 throw new Error("Missing return statement in function");
813 * Return a variablename without the $.
814 * @return a variable name
816 static final public String Variable() throws ParseException {
817 final StringBuffer buff;
818 Expression expression = null;
821 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
823 token = jj_consume_token(DOLLAR_ID);
824 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
826 jj_consume_token(LBRACE);
827 expression = Expression();
828 jj_consume_token(RBRACE);
834 if (expression == null) {
835 {if (true) return token.image.substring(1);}
837 buff = new StringBuffer(token.image);
839 buff.append(expression.toStringExpression());
841 {if (true) return buff.toString();}
844 jj_consume_token(DOLLAR);
845 expr = VariableName();
846 {if (true) return expr;}
850 jj_consume_token(-1);
851 throw new ParseException();
853 throw new Error("Missing return statement in function");
857 * A Variable name (without the $)
858 * @return a variable name String
860 static final public String VariableName() throws ParseException {
861 final StringBuffer buff;
863 Expression expression = null;
865 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
867 jj_consume_token(LBRACE);
868 expression = Expression();
869 jj_consume_token(RBRACE);
870 buff = new StringBuffer("{");
871 buff.append(expression.toStringExpression());
873 {if (true) return buff.toString();}
876 token = jj_consume_token(IDENTIFIER);
877 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
879 jj_consume_token(LBRACE);
880 expression = Expression();
881 jj_consume_token(RBRACE);
887 if (expression == null) {
888 {if (true) return token.image;}
890 buff = new StringBuffer(token.image);
892 buff.append(expression.toStringExpression());
894 {if (true) return buff.toString();}
897 jj_consume_token(DOLLAR);
898 expr = VariableName();
899 buff = new StringBuffer("$");
901 {if (true) return buff.toString();}
904 token = jj_consume_token(DOLLAR_ID);
905 {if (true) return token.image;}
909 jj_consume_token(-1);
910 throw new ParseException();
912 throw new Error("Missing return statement in function");
915 static final public Expression VariableInitializer() throws ParseException {
916 final Expression expr;
918 final int pos = SimpleCharStream.getPosition();
919 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
923 case INTEGER_LITERAL:
924 case FLOATING_POINT_LITERAL:
927 {if (true) return expr;}
930 jj_consume_token(MINUS);
931 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
932 case INTEGER_LITERAL:
933 token = jj_consume_token(INTEGER_LITERAL);
935 case FLOATING_POINT_LITERAL:
936 token = jj_consume_token(FLOATING_POINT_LITERAL);
940 jj_consume_token(-1);
941 throw new ParseException();
943 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
945 SimpleCharStream.getPosition()),
950 jj_consume_token(PLUS);
951 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
952 case INTEGER_LITERAL:
953 token = jj_consume_token(INTEGER_LITERAL);
955 case FLOATING_POINT_LITERAL:
956 token = jj_consume_token(FLOATING_POINT_LITERAL);
960 jj_consume_token(-1);
961 throw new ParseException();
963 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
965 SimpleCharStream.getPosition()),
970 expr = ArrayDeclarator();
971 {if (true) return expr;}
974 token = jj_consume_token(IDENTIFIER);
975 {if (true) return new ConstantIdentifier(token.image.toCharArray(),pos,SimpleCharStream.getPosition());}
979 jj_consume_token(-1);
980 throw new ParseException();
982 throw new Error("Missing return statement in function");
985 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
986 final Expression expr,expr2;
988 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
990 jj_consume_token(ARRAYASSIGN);
991 expr2 = Expression();
992 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
998 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
999 throw new Error("Missing return statement in function");
1002 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
1003 ArrayVariableDeclaration expr;
1004 final ArrayList list = new ArrayList();
1005 jj_consume_token(LPAREN);
1006 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1022 case INTEGER_LITERAL:
1023 case FLOATING_POINT_LITERAL:
1024 case STRING_LITERAL:
1028 expr = ArrayVariable();
1037 jj_consume_token(COMMA);
1038 expr = ArrayVariable();
1043 jj_la1[20] = jj_gen;
1046 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1048 jj_consume_token(COMMA);
1052 jj_la1[21] = jj_gen;
1055 jj_consume_token(RPAREN);
1056 final ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1058 {if (true) return vars;}
1059 throw new Error("Missing return statement in function");
1063 * A Method Declaration.
1064 * <b>function</b> MetodDeclarator() Block()
1066 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1067 final MethodDeclaration functionDeclaration;
1069 final OutlineableWithChildren seg = currentSegment;
1070 jj_consume_token(FUNCTION);
1072 functionDeclaration = MethodDeclarator();
1073 outlineInfo.addVariable(new String(functionDeclaration.name));
1074 } catch (ParseException e) {
1075 if (errorMessage != null) {if (true) throw e;}
1076 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1078 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1079 errorEnd = SimpleCharStream.getPosition() + 1;
1080 {if (true) throw e;}
1082 currentSegment = functionDeclaration;
1084 functionDeclaration.statements = block.statements;
1085 currentSegment = seg;
1086 {if (true) return functionDeclaration;}
1087 throw new Error("Missing return statement in function");
1091 * A MethodDeclarator.
1092 * [&] IDENTIFIER(parameters ...).
1093 * @return a function description for the outline
1095 static final public MethodDeclaration MethodDeclarator() throws ParseException {
1096 final Token identifier;
1097 Token reference = null;
1098 final Hashtable formalParameters;
1099 final int pos = SimpleCharStream.getPosition();
1100 char[] identifierChar = SYNTAX_ERROR_CHAR;
1101 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1103 reference = jj_consume_token(BIT_AND);
1106 jj_la1[22] = jj_gen;
1110 identifier = jj_consume_token(IDENTIFIER);
1111 identifierChar = identifier.image.toCharArray();
1112 } catch (ParseException e) {
1113 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1115 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1116 errorEnd = SimpleCharStream.getPosition() + 1;
1117 processParseException(e);
1119 formalParameters = FormalParameters();
1120 MethodDeclaration method = new MethodDeclaration(currentSegment,
1125 SimpleCharStream.getPosition());
1126 {if (true) return method;}
1127 throw new Error("Missing return statement in function");
1131 * FormalParameters follows method identifier.
1132 * (FormalParameter())
1134 static final public Hashtable FormalParameters() throws ParseException {
1135 VariableDeclaration var;
1136 final Hashtable parameters = new Hashtable();
1138 jj_consume_token(LPAREN);
1139 } catch (ParseException e) {
1140 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1142 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1143 errorEnd = SimpleCharStream.getPosition() + 1;
1144 processParseException(e);
1146 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1149 var = FormalParameter();
1150 parameters.put(new String(var.name()),var);
1153 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1158 jj_la1[23] = jj_gen;
1161 jj_consume_token(COMMA);
1162 var = FormalParameter();
1163 parameters.put(new String(var.name()),var);
1167 jj_la1[24] = jj_gen;
1171 jj_consume_token(RPAREN);
1172 } catch (ParseException e) {
1173 errorMessage = "')' expected";
1175 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1176 errorEnd = SimpleCharStream.getPosition() + 1;
1177 processParseException(e);
1179 {if (true) return parameters;}
1180 throw new Error("Missing return statement in function");
1184 * A formal parameter.
1185 * $varname[=value] (,$varname[=value])
1187 static final public VariableDeclaration FormalParameter() throws ParseException {
1188 final VariableDeclaration variableDeclaration;
1190 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1192 token = jj_consume_token(BIT_AND);
1195 jj_la1[25] = jj_gen;
1198 variableDeclaration = VariableDeclaratorNoSuffix();
1199 if (token != null) {
1200 variableDeclaration.setReference(true);
1202 {if (true) return variableDeclaration;}
1203 throw new Error("Missing return statement in function");
1206 static final public ConstantIdentifier Type() throws ParseException {
1208 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1210 jj_consume_token(STRING);
1211 pos = SimpleCharStream.getPosition();
1212 {if (true) return new ConstantIdentifier(Types.STRING,pos,pos-6);}
1215 jj_consume_token(BOOL);
1216 pos = SimpleCharStream.getPosition();
1217 {if (true) return new ConstantIdentifier(Types.BOOL,pos,pos-4);}
1220 jj_consume_token(BOOLEAN);
1221 pos = SimpleCharStream.getPosition();
1222 {if (true) return new ConstantIdentifier(Types.BOOLEAN,pos,pos-7);}
1225 jj_consume_token(REAL);
1226 pos = SimpleCharStream.getPosition();
1227 {if (true) return new ConstantIdentifier(Types.REAL,pos,pos-4);}
1230 jj_consume_token(DOUBLE);
1231 pos = SimpleCharStream.getPosition();
1232 {if (true) return new ConstantIdentifier(Types.DOUBLE,pos,pos-5);}
1235 jj_consume_token(FLOAT);
1236 pos = SimpleCharStream.getPosition();
1237 {if (true) return new ConstantIdentifier(Types.FLOAT,pos,pos-5);}
1240 jj_consume_token(INT);
1241 pos = SimpleCharStream.getPosition();
1242 {if (true) return new ConstantIdentifier(Types.INT,pos,pos-3);}
1245 jj_consume_token(INTEGER);
1246 pos = SimpleCharStream.getPosition();
1247 {if (true) return new ConstantIdentifier(Types.INTEGER,pos,pos-7);}
1250 jj_consume_token(OBJECT);
1251 pos = SimpleCharStream.getPosition();
1252 {if (true) return new ConstantIdentifier(Types.OBJECT,pos,pos-6);}
1255 jj_la1[26] = jj_gen;
1256 jj_consume_token(-1);
1257 throw new ParseException();
1259 throw new Error("Missing return statement in function");
1262 static final public Expression Expression() throws ParseException {
1263 final Expression expr;
1264 Expression initializer = null;
1265 final int pos = SimpleCharStream.getPosition();
1266 int assignOperator = -1;
1267 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1280 case INTEGER_LITERAL:
1281 case FLOATING_POINT_LITERAL:
1282 case STRING_LITERAL:
1286 expr = ConditionalExpression();
1287 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1300 case RSIGNEDSHIFTASSIGN:
1301 assignOperator = AssignmentOperator();
1303 initializer = ConditionalExpression();
1304 } catch (ParseException e) {
1305 if (errorMessage != null) {
1306 {if (true) throw e;}
1308 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1310 errorEnd = SimpleCharStream.getPosition();
1311 {if (true) throw e;}
1315 jj_la1[27] = jj_gen;
1318 char[] varName = expr.toStringExpression().substring(1).toCharArray();
1319 if (assignOperator == -1) {
1320 {if (true) return new VariableDeclaration(currentSegment,
1321 new Variable(varName,SimpleCharStream.getPosition()-varName.length-1,SimpleCharStream.getPosition()),
1323 SimpleCharStream.getPosition());}
1324 {if (true) return expr;}
1326 {if (true) return new VariableDeclaration(currentSegment,
1327 new Variable(varName,SimpleCharStream.getPosition()-varName.length-1,SimpleCharStream.getPosition()),
1331 {if (true) return expr;}
1336 expr = ExpressionWBang();
1337 {if (true) return expr;}
1340 jj_la1[28] = jj_gen;
1341 jj_consume_token(-1);
1342 throw new ParseException();
1344 throw new Error("Missing return statement in function");
1347 static final public Expression ExpressionWBang() throws ParseException {
1348 final Expression expr;
1349 final int pos = SimpleCharStream.getPosition();
1350 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1352 jj_consume_token(BANG);
1353 expr = ExpressionWBang();
1354 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1358 expr = ExpressionNoBang();
1359 {if (true) return expr;}
1362 jj_la1[29] = jj_gen;
1363 jj_consume_token(-1);
1364 throw new ParseException();
1366 throw new Error("Missing return statement in function");
1369 static final public Expression ExpressionNoBang() throws ParseException {
1370 Expression expr = null;
1371 int assignOperator = -1;
1373 final int pos = SimpleCharStream.getPosition();
1374 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1376 expr = PrintExpression();
1377 {if (true) return expr;}
1380 expr = ListExpression();
1381 {if (true) return expr;}
1384 jj_la1[30] = jj_gen;
1385 jj_consume_token(-1);
1386 throw new ParseException();
1388 throw new Error("Missing return statement in function");
1392 * Any assignement operator.
1393 * @return the assignement operator id
1395 static final public int AssignmentOperator() throws ParseException {
1396 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1398 jj_consume_token(ASSIGN);
1399 {if (true) return VariableDeclaration.EQUAL;}
1402 jj_consume_token(STARASSIGN);
1403 {if (true) return VariableDeclaration.STAR_EQUAL;}
1406 jj_consume_token(SLASHASSIGN);
1407 {if (true) return VariableDeclaration.SLASH_EQUAL;}
1410 jj_consume_token(REMASSIGN);
1411 {if (true) return VariableDeclaration.REM_EQUAL;}
1414 jj_consume_token(PLUSASSIGN);
1415 {if (true) return VariableDeclaration.PLUS_EQUAL;}
1418 jj_consume_token(MINUSASSIGN);
1419 {if (true) return VariableDeclaration.MINUS_EQUAL;}
1422 jj_consume_token(LSHIFTASSIGN);
1423 {if (true) return VariableDeclaration.LSHIFT_EQUAL;}
1425 case RSIGNEDSHIFTASSIGN:
1426 jj_consume_token(RSIGNEDSHIFTASSIGN);
1427 {if (true) return VariableDeclaration.RSIGNEDSHIFT_EQUAL;}
1430 jj_consume_token(ANDASSIGN);
1431 {if (true) return VariableDeclaration.AND_EQUAL;}
1434 jj_consume_token(XORASSIGN);
1435 {if (true) return VariableDeclaration.XOR_EQUAL;}
1438 jj_consume_token(ORASSIGN);
1439 {if (true) return VariableDeclaration.OR_EQUAL;}
1442 jj_consume_token(DOTASSIGN);
1443 {if (true) return VariableDeclaration.DOT_EQUAL;}
1446 jj_consume_token(TILDEEQUAL);
1447 {if (true) return VariableDeclaration.TILDE_EQUAL;}
1450 jj_la1[31] = jj_gen;
1451 jj_consume_token(-1);
1452 throw new ParseException();
1454 throw new Error("Missing return statement in function");
1457 static final public Expression ConditionalExpression() throws ParseException {
1458 final Expression expr;
1459 Expression expr2 = null;
1460 Expression expr3 = null;
1461 expr = ConditionalOrExpression();
1462 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1464 jj_consume_token(HOOK);
1465 expr2 = Expression();
1466 jj_consume_token(COLON);
1467 expr3 = ConditionalExpression();
1470 jj_la1[32] = jj_gen;
1473 if (expr3 == null) {
1474 {if (true) return expr;}
1476 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1477 throw new Error("Missing return statement in function");
1480 static final public Expression ConditionalOrExpression() throws ParseException {
1481 Expression expr,expr2;
1483 expr = ConditionalAndExpression();
1486 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1492 jj_la1[33] = jj_gen;
1495 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1497 jj_consume_token(OR_OR);
1498 operator = OperatorIds.OR_OR;
1501 jj_consume_token(_ORL);
1502 operator = OperatorIds.ORL;
1505 jj_la1[34] = jj_gen;
1506 jj_consume_token(-1);
1507 throw new ParseException();
1509 expr2 = ConditionalAndExpression();
1510 expr = new BinaryExpression(expr,expr2,operator);
1512 {if (true) return expr;}
1513 throw new Error("Missing return statement in function");
1516 static final public Expression ConditionalAndExpression() throws ParseException {
1517 Expression expr,expr2;
1519 expr = ConcatExpression();
1522 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1528 jj_la1[35] = jj_gen;
1531 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1533 jj_consume_token(AND_AND);
1534 operator = OperatorIds.AND_AND;
1537 jj_consume_token(_ANDL);
1538 operator = OperatorIds.ANDL;
1541 jj_la1[36] = jj_gen;
1542 jj_consume_token(-1);
1543 throw new ParseException();
1545 expr2 = ConcatExpression();
1546 expr = new BinaryExpression(expr,expr2,operator);
1548 {if (true) return expr;}
1549 throw new Error("Missing return statement in function");
1552 static final public Expression ConcatExpression() throws ParseException {
1553 Expression expr,expr2;
1554 expr = InclusiveOrExpression();
1557 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1562 jj_la1[37] = jj_gen;
1565 jj_consume_token(DOT);
1566 expr2 = InclusiveOrExpression();
1567 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1569 {if (true) return expr;}
1570 throw new Error("Missing return statement in function");
1573 static final public Expression InclusiveOrExpression() throws ParseException {
1574 Expression expr,expr2;
1575 expr = ExclusiveOrExpression();
1578 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1583 jj_la1[38] = jj_gen;
1586 jj_consume_token(BIT_OR);
1587 expr2 = ExclusiveOrExpression();
1588 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1590 {if (true) return expr;}
1591 throw new Error("Missing return statement in function");
1594 static final public Expression ExclusiveOrExpression() throws ParseException {
1595 Expression expr,expr2;
1596 expr = AndExpression();
1599 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1604 jj_la1[39] = jj_gen;
1607 jj_consume_token(XOR);
1608 expr2 = AndExpression();
1609 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1611 {if (true) return expr;}
1612 throw new Error("Missing return statement in function");
1615 static final public Expression AndExpression() throws ParseException {
1616 Expression expr,expr2;
1617 expr = EqualityExpression();
1620 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1625 jj_la1[40] = jj_gen;
1628 jj_consume_token(BIT_AND);
1629 expr2 = EqualityExpression();
1630 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1632 {if (true) return expr;}
1633 throw new Error("Missing return statement in function");
1636 static final public Expression EqualityExpression() throws ParseException {
1637 Expression expr,expr2;
1639 expr = RelationalExpression();
1642 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1646 case BANGDOUBLEEQUAL:
1651 jj_la1[41] = jj_gen;
1654 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1656 jj_consume_token(EQUAL_EQUAL);
1657 operator = OperatorIds.EQUAL_EQUAL;
1660 jj_consume_token(DIF);
1661 operator = OperatorIds.DIF;
1664 jj_consume_token(NOT_EQUAL);
1665 operator = OperatorIds.DIF;
1667 case BANGDOUBLEEQUAL:
1668 jj_consume_token(BANGDOUBLEEQUAL);
1669 operator = OperatorIds.BANG_EQUAL_EQUAL;
1672 jj_consume_token(TRIPLEEQUAL);
1673 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1676 jj_la1[42] = jj_gen;
1677 jj_consume_token(-1);
1678 throw new ParseException();
1681 expr2 = RelationalExpression();
1682 } catch (ParseException e) {
1683 if (errorMessage != null) {
1684 {if (true) throw e;}
1686 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1688 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1689 errorEnd = SimpleCharStream.getPosition() + 1;
1690 {if (true) throw e;}
1692 expr = new BinaryExpression(expr,expr2,operator);
1694 {if (true) return expr;}
1695 throw new Error("Missing return statement in function");
1698 static final public Expression RelationalExpression() throws ParseException {
1699 Expression expr,expr2;
1701 expr = ShiftExpression();
1704 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1712 jj_la1[43] = jj_gen;
1715 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1717 jj_consume_token(LT);
1718 operator = OperatorIds.LESS;
1721 jj_consume_token(GT);
1722 operator = OperatorIds.GREATER;
1725 jj_consume_token(LE);
1726 operator = OperatorIds.LESS_EQUAL;
1729 jj_consume_token(GE);
1730 operator = OperatorIds.GREATER_EQUAL;
1733 jj_la1[44] = jj_gen;
1734 jj_consume_token(-1);
1735 throw new ParseException();
1737 expr2 = ShiftExpression();
1738 expr = new BinaryExpression(expr,expr2,operator);
1740 {if (true) return expr;}
1741 throw new Error("Missing return statement in function");
1744 static final public Expression ShiftExpression() throws ParseException {
1745 Expression expr,expr2;
1747 expr = AdditiveExpression();
1750 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1753 case RUNSIGNEDSHIFT:
1757 jj_la1[45] = jj_gen;
1760 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1762 jj_consume_token(LSHIFT);
1763 operator = OperatorIds.LEFT_SHIFT;
1766 jj_consume_token(RSIGNEDSHIFT);
1767 operator = OperatorIds.RIGHT_SHIFT;
1769 case RUNSIGNEDSHIFT:
1770 jj_consume_token(RUNSIGNEDSHIFT);
1771 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1774 jj_la1[46] = jj_gen;
1775 jj_consume_token(-1);
1776 throw new ParseException();
1778 expr2 = AdditiveExpression();
1779 expr = new BinaryExpression(expr,expr2,operator);
1781 {if (true) return expr;}
1782 throw new Error("Missing return statement in function");
1785 static final public Expression AdditiveExpression() throws ParseException {
1786 Expression expr,expr2;
1788 expr = MultiplicativeExpression();
1791 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1797 jj_la1[47] = jj_gen;
1800 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1802 jj_consume_token(PLUS);
1803 operator = OperatorIds.PLUS;
1806 jj_consume_token(MINUS);
1807 operator = OperatorIds.MINUS;
1810 jj_la1[48] = jj_gen;
1811 jj_consume_token(-1);
1812 throw new ParseException();
1814 expr2 = MultiplicativeExpression();
1815 expr = new BinaryExpression(expr,expr2,operator);
1817 {if (true) return expr;}
1818 throw new Error("Missing return statement in function");
1821 static final public Expression MultiplicativeExpression() throws ParseException {
1822 Expression expr,expr2;
1825 expr = UnaryExpression();
1826 } catch (ParseException e) {
1827 if (errorMessage != null) {if (true) throw e;}
1828 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1830 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1831 errorEnd = SimpleCharStream.getPosition() + 1;
1832 {if (true) throw e;}
1836 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1843 jj_la1[49] = jj_gen;
1846 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1848 jj_consume_token(STAR);
1849 operator = OperatorIds.MULTIPLY;
1852 jj_consume_token(SLASH);
1853 operator = OperatorIds.DIVIDE;
1856 jj_consume_token(REMAINDER);
1857 operator = OperatorIds.REMAINDER;
1860 jj_la1[50] = jj_gen;
1861 jj_consume_token(-1);
1862 throw new ParseException();
1864 expr2 = UnaryExpression();
1865 expr = new BinaryExpression(expr,expr2,operator);
1867 {if (true) return expr;}
1868 throw new Error("Missing return statement in function");
1872 * An unary expression starting with @, & or nothing
1874 static final public Expression UnaryExpression() throws ParseException {
1875 final Expression expr;
1876 final int pos = SimpleCharStream.getPosition();
1877 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1879 jj_consume_token(BIT_AND);
1880 expr = UnaryExpressionNoPrefix();
1881 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1894 case INTEGER_LITERAL:
1895 case FLOATING_POINT_LITERAL:
1896 case STRING_LITERAL:
1900 expr = AtUnaryExpression();
1901 {if (true) return expr;}
1904 jj_la1[51] = jj_gen;
1905 jj_consume_token(-1);
1906 throw new ParseException();
1908 throw new Error("Missing return statement in function");
1911 static final public Expression AtUnaryExpression() throws ParseException {
1912 final Expression expr;
1913 final int pos = SimpleCharStream.getPosition();
1914 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1916 jj_consume_token(AT);
1917 expr = AtUnaryExpression();
1918 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,pos);}
1930 case INTEGER_LITERAL:
1931 case FLOATING_POINT_LITERAL:
1932 case STRING_LITERAL:
1936 expr = UnaryExpressionNoPrefix();
1937 {if (true) return expr;}
1940 jj_la1[52] = jj_gen;
1941 jj_consume_token(-1);
1942 throw new ParseException();
1944 throw new Error("Missing return statement in function");
1947 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
1948 final Expression expr;
1950 final int pos = SimpleCharStream.getPosition();
1951 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
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[53] = jj_gen;
1965 jj_consume_token(-1);
1966 throw new ParseException();
1968 expr = UnaryExpression();
1969 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1973 expr = PreIncDecExpression();
1974 {if (true) return expr;}
1982 case INTEGER_LITERAL:
1983 case FLOATING_POINT_LITERAL:
1984 case STRING_LITERAL:
1988 expr = UnaryExpressionNotPlusMinus();
1989 {if (true) return expr;}
1992 jj_la1[54] = jj_gen;
1993 jj_consume_token(-1);
1994 throw new ParseException();
1996 throw new Error("Missing return statement in function");
1999 static final public Expression PreIncDecExpression() throws ParseException {
2000 final Expression expr;
2002 final int pos = SimpleCharStream.getPosition();
2003 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2005 jj_consume_token(PLUS_PLUS);
2006 operator = OperatorIds.PLUS_PLUS;
2009 jj_consume_token(MINUS_MINUS);
2010 operator = OperatorIds.MINUS_MINUS;
2013 jj_la1[55] = jj_gen;
2014 jj_consume_token(-1);
2015 throw new ParseException();
2017 expr = PrimaryExpression();
2018 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
2019 throw new Error("Missing return statement in function");
2022 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
2023 final Expression expr;
2024 final int pos = SimpleCharStream.getPosition();
2025 if (jj_2_3(2147483647)) {
2026 expr = CastExpression();
2027 {if (true) return expr;}
2029 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2035 expr = PostfixExpression();
2036 {if (true) return expr;}
2041 case INTEGER_LITERAL:
2042 case FLOATING_POINT_LITERAL:
2043 case STRING_LITERAL:
2045 {if (true) return expr;}
2048 jj_consume_token(LPAREN);
2049 expr = Expression();
2051 jj_consume_token(RPAREN);
2052 } catch (ParseException e) {
2053 errorMessage = "')' expected";
2055 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2056 errorEnd = SimpleCharStream.getPosition() + 1;
2057 {if (true) throw e;}
2059 {if (true) return expr;}
2062 jj_la1[56] = jj_gen;
2063 jj_consume_token(-1);
2064 throw new ParseException();
2067 throw new Error("Missing return statement in function");
2070 static final public CastExpression CastExpression() throws ParseException {
2071 final ConstantIdentifier type;
2072 final Expression expr;
2073 final int pos = SimpleCharStream.getPosition();
2074 jj_consume_token(LPAREN);
2075 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2088 jj_consume_token(ARRAY);
2089 type = new ConstantIdentifier(Types.ARRAY,pos,SimpleCharStream.getPosition());
2092 jj_la1[57] = jj_gen;
2093 jj_consume_token(-1);
2094 throw new ParseException();
2096 jj_consume_token(RPAREN);
2097 expr = UnaryExpression();
2098 {if (true) return new CastExpression(type,expr,pos,SimpleCharStream.getPosition());}
2099 throw new Error("Missing return statement in function");
2102 static final public Expression PostfixExpression() throws ParseException {
2103 final Expression expr;
2105 final int pos = SimpleCharStream.getPosition();
2106 expr = PrimaryExpression();
2107 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2110 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2112 jj_consume_token(PLUS_PLUS);
2113 operator = OperatorIds.PLUS_PLUS;
2116 jj_consume_token(MINUS_MINUS);
2117 operator = OperatorIds.MINUS_MINUS;
2120 jj_la1[58] = jj_gen;
2121 jj_consume_token(-1);
2122 throw new ParseException();
2126 jj_la1[59] = jj_gen;
2129 if (operator == -1) {
2130 {if (true) return expr;}
2132 {if (true) return new PostfixedUnaryExpression(expr,operator,pos);}
2133 throw new Error("Missing return statement in function");
2136 static final public Expression PrimaryExpression() throws ParseException {
2138 int assignOperator = -1;
2139 final Token identifier;
2141 final int pos = SimpleCharStream.getPosition();
2142 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2146 expr = PrimaryPrefix();
2149 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2151 case STATICCLASSACCESS:
2156 jj_la1[60] = jj_gen;
2159 expr = PrimarySuffix(expr);
2161 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2163 expr = Arguments(expr);
2166 jj_la1[61] = jj_gen;
2169 {if (true) return expr;}
2172 jj_consume_token(NEW);
2173 expr = ClassIdentifier();
2174 expr = new PrefixedUnaryExpression(expr,
2177 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2179 expr = Arguments(expr);
2182 jj_la1[62] = jj_gen;
2185 {if (true) return expr;}
2188 expr = ArrayDeclarator();
2189 {if (true) return expr;}
2192 jj_la1[63] = jj_gen;
2193 jj_consume_token(-1);
2194 throw new ParseException();
2196 throw new Error("Missing return statement in function");
2199 static final public Expression PrimaryPrefix() throws ParseException {
2200 final Expression expr;
2203 final int pos = SimpleCharStream.getPosition();
2204 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2206 token = jj_consume_token(IDENTIFIER);
2207 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2209 SimpleCharStream.getPosition());}
2213 var = VariableDeclaratorId();
2214 {if (true) return new Variable(var.toCharArray(),
2216 SimpleCharStream.getPosition());}
2219 jj_la1[64] = jj_gen;
2220 jj_consume_token(-1);
2221 throw new ParseException();
2223 throw new Error("Missing return statement in function");
2226 static final public AbstractSuffixExpression PrimarySuffix(final Expression prefix) throws ParseException {
2227 final AbstractSuffixExpression suffix;
2228 final Expression expr;
2229 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2232 suffix = VariableSuffix(prefix);
2233 {if (true) return suffix;}
2235 case STATICCLASSACCESS:
2236 jj_consume_token(STATICCLASSACCESS);
2237 expr = ClassIdentifier();
2238 suffix = new ClassAccess(prefix,
2240 ClassAccess.STATIC);
2241 {if (true) return suffix;}
2244 jj_la1[65] = jj_gen;
2245 jj_consume_token(-1);
2246 throw new ParseException();
2248 throw new Error("Missing return statement in function");
2252 * An array declarator.
2256 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2257 final ArrayVariableDeclaration[] vars;
2258 final int pos = SimpleCharStream.getPosition();
2259 jj_consume_token(ARRAY);
2260 vars = ArrayInitializer();
2261 {if (true) return new ArrayInitializer(vars,pos,SimpleCharStream.getPosition());}
2262 throw new Error("Missing return statement in function");
2265 static final public PrefixedUnaryExpression classInstantiation() throws ParseException {
2267 final StringBuffer buff;
2268 final int pos = SimpleCharStream.getPosition();
2269 jj_consume_token(NEW);
2270 expr = ClassIdentifier();
2271 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2277 buff = new StringBuffer(expr.toStringExpression());
2278 expr = PrimaryExpression();
2279 buff.append(expr.toStringExpression());
2280 expr = new ConstantIdentifier(buff.toString().toCharArray(),
2282 SimpleCharStream.getPosition());
2285 jj_la1[66] = jj_gen;
2288 {if (true) return new PrefixedUnaryExpression(expr,
2291 throw new Error("Missing return statement in function");
2294 static final public ConstantIdentifier ClassIdentifier() throws ParseException {
2297 final int pos = SimpleCharStream.getPosition();
2298 final ConstantIdentifier type;
2299 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2301 token = jj_consume_token(IDENTIFIER);
2302 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2304 SimpleCharStream.getPosition());}
2316 {if (true) return type;}
2320 expr = VariableDeclaratorId();
2321 {if (true) return new ConstantIdentifier(expr.toCharArray(),
2323 SimpleCharStream.getPosition());}
2326 jj_la1[67] = jj_gen;
2327 jj_consume_token(-1);
2328 throw new ParseException();
2330 throw new Error("Missing return statement in function");
2333 static final public AbstractSuffixExpression VariableSuffix(final Expression prefix) throws ParseException {
2335 final int pos = SimpleCharStream.getPosition();
2336 Expression expression = null;
2337 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2339 jj_consume_token(CLASSACCESS);
2341 expr = VariableName();
2342 } catch (ParseException e) {
2343 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2345 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2346 errorEnd = SimpleCharStream.getPosition() + 1;
2347 {if (true) throw e;}
2349 {if (true) return new ClassAccess(prefix,
2350 new ConstantIdentifier(expr.toCharArray(),pos,SimpleCharStream.getPosition()),
2351 ClassAccess.NORMAL);}
2354 jj_consume_token(LBRACKET);
2355 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2380 case INTEGER_LITERAL:
2381 case FLOATING_POINT_LITERAL:
2382 case STRING_LITERAL:
2386 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2402 case INTEGER_LITERAL:
2403 case FLOATING_POINT_LITERAL:
2404 case STRING_LITERAL:
2408 expression = Expression();
2419 expression = Type();
2422 jj_la1[68] = jj_gen;
2423 jj_consume_token(-1);
2424 throw new ParseException();
2428 jj_la1[69] = jj_gen;
2432 jj_consume_token(RBRACKET);
2433 } catch (ParseException e) {
2434 errorMessage = "']' expected";
2436 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2437 errorEnd = SimpleCharStream.getPosition() + 1;
2438 {if (true) throw e;}
2440 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2443 jj_la1[70] = jj_gen;
2444 jj_consume_token(-1);
2445 throw new ParseException();
2447 throw new Error("Missing return statement in function");
2450 static final public Literal Literal() throws ParseException {
2453 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2454 case INTEGER_LITERAL:
2455 token = jj_consume_token(INTEGER_LITERAL);
2456 pos = SimpleCharStream.getPosition();
2457 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2459 case FLOATING_POINT_LITERAL:
2460 token = jj_consume_token(FLOATING_POINT_LITERAL);
2461 pos = SimpleCharStream.getPosition();
2462 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2464 case STRING_LITERAL:
2465 token = jj_consume_token(STRING_LITERAL);
2466 pos = SimpleCharStream.getPosition();
2467 {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length());}
2470 jj_consume_token(TRUE);
2471 pos = SimpleCharStream.getPosition();
2472 {if (true) return new TrueLiteral(pos-4,pos);}
2475 jj_consume_token(FALSE);
2476 pos = SimpleCharStream.getPosition();
2477 {if (true) return new FalseLiteral(pos-4,pos);}
2480 jj_consume_token(NULL);
2481 pos = SimpleCharStream.getPosition();
2482 {if (true) return new NullLiteral(pos-4,pos);}
2485 jj_la1[71] = jj_gen;
2486 jj_consume_token(-1);
2487 throw new ParseException();
2489 throw new Error("Missing return statement in function");
2492 static final public FunctionCall Arguments(final Expression func) throws ParseException {
2493 Expression[] args = null;
2494 jj_consume_token(LPAREN);
2495 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2511 case INTEGER_LITERAL:
2512 case FLOATING_POINT_LITERAL:
2513 case STRING_LITERAL:
2517 args = ArgumentList();
2520 jj_la1[72] = jj_gen;
2524 jj_consume_token(RPAREN);
2525 } catch (ParseException e) {
2526 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2528 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2529 errorEnd = SimpleCharStream.getPosition() + 1;
2530 {if (true) throw e;}
2532 {if (true) return new FunctionCall(func,args,SimpleCharStream.getPosition());}
2533 throw new Error("Missing return statement in function");
2537 * An argument list is a list of arguments separated by comma :
2538 * argumentDeclaration() (, argumentDeclaration)*
2539 * @return an array of arguments
2541 static final public Expression[] ArgumentList() throws ParseException {
2543 final ArrayList list = new ArrayList();
2548 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2553 jj_la1[73] = jj_gen;
2556 jj_consume_token(COMMA);
2560 } catch (ParseException e) {
2561 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2563 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2564 errorEnd = SimpleCharStream.getPosition() + 1;
2565 {if (true) throw e;}
2568 final Expression[] arguments = new Expression[list.size()];
2569 list.toArray(arguments);
2570 {if (true) return arguments;}
2571 throw new Error("Missing return statement in function");
2575 * A Statement without break.
2576 * @return a statement
2578 static final public Statement StatementNoBreak() throws ParseException {
2579 final Statement statement;
2582 statement = expressionStatement();
2583 {if (true) return statement;}
2585 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2587 statement = LabeledStatement();
2588 {if (true) return statement;}
2591 statement = Block();
2592 {if (true) return statement;}
2595 statement = EmptyStatement();
2596 {if (true) return statement;}
2599 statement = SwitchStatement();
2600 {if (true) return statement;}
2603 statement = IfStatement();
2604 {if (true) return statement;}
2607 statement = WhileStatement();
2608 {if (true) return statement;}
2611 statement = DoStatement();
2612 {if (true) return statement;}
2615 statement = ForStatement();
2616 {if (true) return statement;}
2619 statement = ForeachStatement();
2620 {if (true) return statement;}
2623 statement = ContinueStatement();
2624 {if (true) return statement;}
2627 statement = ReturnStatement();
2628 {if (true) return statement;}
2631 statement = EchoStatement();
2632 {if (true) return statement;}
2639 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2641 token = jj_consume_token(AT);
2644 jj_la1[74] = jj_gen;
2647 statement = IncludeStatement();
2648 if (token != null) {
2649 ((InclusionStatement)statement).silent = true;
2651 {if (true) return statement;}
2654 statement = StaticStatement();
2655 {if (true) return statement;}
2658 statement = GlobalStatement();
2659 {if (true) return statement;}
2662 statement = defineStatement();
2663 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2666 jj_la1[75] = jj_gen;
2667 jj_consume_token(-1);
2668 throw new ParseException();
2671 throw new Error("Missing return statement in function");
2675 * A statement expression.
2677 * @return an expression
2679 static final public Statement expressionStatement() throws ParseException {
2680 final Statement statement;
2681 statement = Expression();
2683 jj_consume_token(SEMICOLON);
2684 } catch (ParseException e) {
2685 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2686 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2688 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2689 errorEnd = SimpleCharStream.getPosition() + 1;
2690 {if (true) throw e;}
2693 {if (true) return statement;}
2694 throw new Error("Missing return statement in function");
2697 static final public Define defineStatement() throws ParseException {
2698 final int start = SimpleCharStream.getPosition();
2699 Expression defineName,defineValue;
2700 jj_consume_token(DEFINE);
2702 jj_consume_token(LPAREN);
2703 } catch (ParseException e) {
2704 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2706 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2707 errorEnd = SimpleCharStream.getPosition() + 1;
2708 processParseException(e);
2711 defineName = Expression();
2712 } catch (ParseException e) {
2713 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2715 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2716 errorEnd = SimpleCharStream.getPosition() + 1;
2717 {if (true) throw e;}
2720 jj_consume_token(COMMA);
2721 } catch (ParseException e) {
2722 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2724 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2725 errorEnd = SimpleCharStream.getPosition() + 1;
2726 processParseException(e);
2729 defineValue = Expression();
2730 } catch (ParseException e) {
2731 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2733 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2734 errorEnd = SimpleCharStream.getPosition() + 1;
2735 {if (true) throw e;}
2738 jj_consume_token(RPAREN);
2739 } catch (ParseException e) {
2740 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2742 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2743 errorEnd = SimpleCharStream.getPosition() + 1;
2744 processParseException(e);
2746 {if (true) return new Define(currentSegment,
2750 SimpleCharStream.getPosition());}
2751 throw new Error("Missing return statement in function");
2755 * A Normal statement.
2757 static final public Statement Statement() throws ParseException {
2758 final Statement statement;
2759 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2791 case INTEGER_LITERAL:
2792 case FLOATING_POINT_LITERAL:
2793 case STRING_LITERAL:
2799 statement = StatementNoBreak();
2800 {if (true) return statement;}
2803 statement = BreakStatement();
2804 {if (true) return statement;}
2807 jj_la1[76] = jj_gen;
2808 jj_consume_token(-1);
2809 throw new ParseException();
2811 throw new Error("Missing return statement in function");
2815 * An html block inside a php syntax.
2817 static final public HTMLBlock htmlBlock() throws ParseException {
2818 final int startIndex = nodePtr;
2819 final AstNode[] blockNodes;
2821 jj_consume_token(PHPEND);
2824 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2829 jj_la1[77] = jj_gen;
2835 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2837 jj_consume_token(PHPSTARTLONG);
2840 jj_consume_token(PHPSTARTSHORT);
2843 jj_la1[78] = jj_gen;
2844 jj_consume_token(-1);
2845 throw new ParseException();
2847 } catch (ParseException e) {
2848 errorMessage = "unexpected end of file , '<?php' expected";
2850 errorStart = SimpleCharStream.getPosition();
2851 errorEnd = SimpleCharStream.getPosition();
2852 {if (true) throw e;}
2854 nbNodes = nodePtr - startIndex;
2855 blockNodes = new AstNode[nbNodes];
2856 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2857 nodePtr = startIndex;
2858 {if (true) return new HTMLBlock(blockNodes);}
2859 throw new Error("Missing return statement in function");
2863 * An include statement. It's "include" an expression;
2865 static final public InclusionStatement IncludeStatement() throws ParseException {
2866 final Expression expr;
2868 final int pos = SimpleCharStream.getPosition();
2869 final InclusionStatement inclusionStatement;
2870 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2872 jj_consume_token(REQUIRE);
2873 keyword = InclusionStatement.REQUIRE;
2876 jj_consume_token(REQUIRE_ONCE);
2877 keyword = InclusionStatement.REQUIRE_ONCE;
2880 jj_consume_token(INCLUDE);
2881 keyword = InclusionStatement.INCLUDE;
2884 jj_consume_token(INCLUDE_ONCE);
2885 keyword = InclusionStatement.INCLUDE_ONCE;
2888 jj_la1[79] = jj_gen;
2889 jj_consume_token(-1);
2890 throw new ParseException();
2893 expr = Expression();
2894 } catch (ParseException e) {
2895 if (errorMessage != null) {
2896 {if (true) throw e;}
2898 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
2900 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2901 errorEnd = SimpleCharStream.getPosition() + 1;
2902 {if (true) throw e;}
2904 inclusionStatement = new InclusionStatement(currentSegment,
2908 currentSegment.add(inclusionStatement);
2910 jj_consume_token(SEMICOLON);
2911 } catch (ParseException e) {
2912 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2914 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2915 errorEnd = SimpleCharStream.getPosition() + 1;
2916 {if (true) throw e;}
2918 {if (true) return inclusionStatement;}
2919 throw new Error("Missing return statement in function");
2922 static final public PrintExpression PrintExpression() throws ParseException {
2923 final Expression expr;
2924 final int pos = SimpleCharStream.getPosition();
2925 jj_consume_token(PRINT);
2926 expr = Expression();
2927 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
2928 throw new Error("Missing return statement in function");
2931 static final public ListExpression ListExpression() throws ParseException {
2933 final Expression expression;
2934 final ArrayList list = new ArrayList();
2935 final int pos = SimpleCharStream.getPosition();
2936 jj_consume_token(LIST);
2938 jj_consume_token(LPAREN);
2939 } catch (ParseException e) {
2940 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2942 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2943 errorEnd = SimpleCharStream.getPosition() + 1;
2944 {if (true) throw e;}
2946 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2949 expr = VariableDeclaratorId();
2953 jj_la1[80] = jj_gen;
2956 if (expr == null) list.add(null);
2959 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2964 jj_la1[81] = jj_gen;
2968 jj_consume_token(COMMA);
2969 } catch (ParseException e) {
2970 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2972 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2973 errorEnd = SimpleCharStream.getPosition() + 1;
2974 {if (true) throw e;}
2976 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2979 expr = VariableDeclaratorId();
2983 jj_la1[82] = jj_gen;
2988 jj_consume_token(RPAREN);
2989 } catch (ParseException e) {
2990 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2992 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2993 errorEnd = SimpleCharStream.getPosition() + 1;
2994 {if (true) throw e;}
2996 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2998 jj_consume_token(ASSIGN);
2999 expression = Expression();
3000 final String[] strings = new String[list.size()];
3001 list.toArray(strings);
3002 {if (true) return new ListExpression(strings,
3005 SimpleCharStream.getPosition());}
3008 jj_la1[83] = jj_gen;
3011 final String[] strings = new String[list.size()];
3012 list.toArray(strings);
3013 {if (true) return new ListExpression(strings,pos,SimpleCharStream.getPosition());}
3014 throw new Error("Missing return statement in function");
3018 * An echo statement.
3019 * echo anyexpression (, otherexpression)*
3021 static final public EchoStatement EchoStatement() throws ParseException {
3022 final ArrayList expressions = new ArrayList();
3024 final int pos = SimpleCharStream.getPosition();
3025 jj_consume_token(ECHO);
3026 expr = Expression();
3027 expressions.add(expr);
3030 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3035 jj_la1[84] = jj_gen;
3038 jj_consume_token(COMMA);
3039 expr = Expression();
3040 expressions.add(expr);
3043 jj_consume_token(SEMICOLON);
3044 } catch (ParseException e) {
3045 if (e.currentToken.next.kind != 4) {
3046 errorMessage = "';' expected after 'echo' statement";
3048 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3049 errorEnd = SimpleCharStream.getPosition() + 1;
3050 {if (true) throw e;}
3053 final Expression[] exprs = new Expression[expressions.size()];
3054 expressions.toArray(exprs);
3055 {if (true) return new EchoStatement(exprs,pos);}
3056 throw new Error("Missing return statement in function");
3059 static final public GlobalStatement GlobalStatement() throws ParseException {
3060 final int pos = SimpleCharStream.getPosition();
3062 final ArrayList vars = new ArrayList();
3063 final GlobalStatement global;
3064 jj_consume_token(GLOBAL);
3065 expr = VariableDeclaratorId();
3069 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3074 jj_la1[85] = jj_gen;
3077 jj_consume_token(COMMA);
3078 expr = VariableDeclaratorId();
3082 jj_consume_token(SEMICOLON);
3083 final String[] strings = new String[vars.size()];
3084 vars.toArray(strings);
3085 global = new GlobalStatement(currentSegment,
3088 SimpleCharStream.getPosition());
3089 currentSegment.add(global);
3090 {if (true) return global;}
3091 } catch (ParseException e) {
3092 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3094 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3095 errorEnd = SimpleCharStream.getPosition() + 1;
3096 {if (true) throw e;}
3098 throw new Error("Missing return statement in function");
3101 static final public StaticStatement StaticStatement() throws ParseException {
3102 final int pos = SimpleCharStream.getPosition();
3103 final ArrayList vars = new ArrayList();
3104 VariableDeclaration expr;
3105 jj_consume_token(STATIC);
3106 expr = VariableDeclarator();
3107 vars.add(new String(expr.name()));
3110 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3115 jj_la1[86] = jj_gen;
3118 jj_consume_token(COMMA);
3119 expr = VariableDeclarator();
3120 vars.add(new String(expr.name()));
3123 jj_consume_token(SEMICOLON);
3124 final String[] strings = new String[vars.size()];
3125 vars.toArray(strings);
3126 {if (true) return new StaticStatement(strings,
3128 SimpleCharStream.getPosition());}
3129 } catch (ParseException e) {
3130 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3132 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3133 errorEnd = SimpleCharStream.getPosition() + 1;
3134 {if (true) throw e;}
3136 throw new Error("Missing return statement in function");
3139 static final public LabeledStatement LabeledStatement() throws ParseException {
3140 final int pos = SimpleCharStream.getPosition();
3142 final Statement statement;
3143 label = jj_consume_token(IDENTIFIER);
3144 jj_consume_token(COLON);
3145 statement = Statement();
3146 {if (true) return new LabeledStatement(label.image.toCharArray(),statement,pos,SimpleCharStream.getPosition());}
3147 throw new Error("Missing return statement in function");
3157 static final public Block Block() throws ParseException {
3158 final int pos = SimpleCharStream.getPosition();
3159 final ArrayList list = new ArrayList();
3160 Statement statement;
3162 jj_consume_token(LBRACE);
3163 } catch (ParseException e) {
3164 errorMessage = "'{' expected";
3166 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3167 errorEnd = SimpleCharStream.getPosition() + 1;
3168 {if (true) throw e;}
3172 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3208 case INTEGER_LITERAL:
3209 case FLOATING_POINT_LITERAL:
3210 case STRING_LITERAL:
3219 jj_la1[87] = jj_gen;
3222 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3257 case INTEGER_LITERAL:
3258 case FLOATING_POINT_LITERAL:
3259 case STRING_LITERAL:
3265 statement = BlockStatement();
3266 list.add(statement);
3269 statement = htmlBlock();
3270 list.add(statement);
3273 jj_la1[88] = jj_gen;
3274 jj_consume_token(-1);
3275 throw new ParseException();
3279 jj_consume_token(RBRACE);
3280 } catch (ParseException e) {
3281 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3283 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3284 errorEnd = SimpleCharStream.getPosition() + 1;
3285 {if (true) throw e;}
3287 final Statement[] statements = new Statement[list.size()];
3288 list.toArray(statements);
3289 {if (true) return new Block(statements,pos,SimpleCharStream.getPosition());}
3290 throw new Error("Missing return statement in function");
3293 static final public Statement BlockStatement() throws ParseException {
3294 final Statement statement;
3295 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3328 case INTEGER_LITERAL:
3329 case FLOATING_POINT_LITERAL:
3330 case STRING_LITERAL:
3336 statement = Statement();
3337 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3338 {if (true) return statement;}
3341 statement = ClassDeclaration();
3342 {if (true) return statement;}
3345 statement = MethodDeclaration();
3346 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3347 currentSegment.add((MethodDeclaration) statement);
3348 ((MethodDeclaration) statement).analyzeCode();
3349 {if (true) return statement;}
3352 jj_la1[89] = jj_gen;
3353 jj_consume_token(-1);
3354 throw new ParseException();
3356 throw new Error("Missing return statement in function");
3360 * A Block statement that will not contain any 'break'
3362 static final public Statement BlockStatementNoBreak() throws ParseException {
3363 final Statement statement;
3364 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3396 case INTEGER_LITERAL:
3397 case FLOATING_POINT_LITERAL:
3398 case STRING_LITERAL:
3404 statement = StatementNoBreak();
3405 {if (true) return statement;}
3408 statement = ClassDeclaration();
3409 {if (true) return statement;}
3412 statement = MethodDeclaration();
3413 currentSegment.add((MethodDeclaration) statement);
3414 ((MethodDeclaration) statement).analyzeCode();
3415 {if (true) return statement;}
3418 jj_la1[90] = jj_gen;
3419 jj_consume_token(-1);
3420 throw new ParseException();
3422 throw new Error("Missing return statement in function");
3425 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3426 final ArrayList list = new ArrayList();
3427 VariableDeclaration var;
3428 var = LocalVariableDeclarator();
3432 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3437 jj_la1[91] = jj_gen;
3440 jj_consume_token(COMMA);
3441 var = LocalVariableDeclarator();
3444 final VariableDeclaration[] vars = new VariableDeclaration[list.size()];
3446 {if (true) return vars;}
3447 throw new Error("Missing return statement in function");
3450 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3451 final String varName;
3452 Expression initializer = null;
3453 final int pos = SimpleCharStream.getPosition();
3454 varName = VariableDeclaratorId();
3455 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3457 jj_consume_token(ASSIGN);
3458 initializer = Expression();
3461 jj_la1[92] = jj_gen;
3464 if (initializer == null) {
3465 {if (true) return new VariableDeclaration(currentSegment,
3466 new Variable(varName.toCharArray(),SimpleCharStream.getPosition()-varName.length(),SimpleCharStream.getPosition()),
3468 SimpleCharStream.getPosition());}
3470 {if (true) return new VariableDeclaration(currentSegment,
3471 new Variable(varName.toCharArray(),SimpleCharStream.getPosition()-varName.length(),SimpleCharStream.getPosition()),
3473 VariableDeclaration.EQUAL,
3475 throw new Error("Missing return statement in function");
3478 static final public EmptyStatement EmptyStatement() throws ParseException {
3480 jj_consume_token(SEMICOLON);
3481 pos = SimpleCharStream.getPosition();
3482 {if (true) return new EmptyStatement(pos-1,pos);}
3483 throw new Error("Missing return statement in function");
3486 static final public Expression StatementExpression() throws ParseException {
3487 final Expression expr,expr2;
3489 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3492 expr = PreIncDecExpression();
3493 {if (true) return expr;}
3500 expr = PrimaryExpression();
3501 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3504 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3506 jj_consume_token(PLUS_PLUS);
3507 {if (true) return new PostfixedUnaryExpression(expr,
3508 OperatorIds.PLUS_PLUS,
3509 SimpleCharStream.getPosition());}
3512 jj_consume_token(MINUS_MINUS);
3513 {if (true) return new PostfixedUnaryExpression(expr,
3514 OperatorIds.MINUS_MINUS,
3515 SimpleCharStream.getPosition());}
3518 jj_la1[93] = jj_gen;
3519 jj_consume_token(-1);
3520 throw new ParseException();
3524 jj_la1[94] = jj_gen;
3527 {if (true) return expr;}
3530 jj_la1[95] = jj_gen;
3531 jj_consume_token(-1);
3532 throw new ParseException();
3534 throw new Error("Missing return statement in function");
3537 static final public SwitchStatement SwitchStatement() throws ParseException {
3538 final Expression variable;
3539 final AbstractCase[] cases;
3540 final int pos = SimpleCharStream.getPosition();
3541 jj_consume_token(SWITCH);
3543 jj_consume_token(LPAREN);
3544 } catch (ParseException e) {
3545 errorMessage = "'(' expected after 'switch'";
3547 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3548 errorEnd = SimpleCharStream.getPosition() + 1;
3549 {if (true) throw e;}
3552 variable = Expression();
3553 } catch (ParseException e) {
3554 if (errorMessage != null) {
3555 {if (true) throw e;}
3557 errorMessage = "expression expected";
3559 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3560 errorEnd = SimpleCharStream.getPosition() + 1;
3561 {if (true) throw e;}
3564 jj_consume_token(RPAREN);
3565 } catch (ParseException e) {
3566 errorMessage = "')' expected";
3568 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3569 errorEnd = SimpleCharStream.getPosition() + 1;
3570 {if (true) throw e;}
3572 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3574 cases = switchStatementBrace();
3577 cases = switchStatementColon(pos, pos + 6);
3580 jj_la1[96] = jj_gen;
3581 jj_consume_token(-1);
3582 throw new ParseException();
3584 {if (true) return new SwitchStatement(variable,cases,pos,SimpleCharStream.getPosition());}
3585 throw new Error("Missing return statement in function");
3588 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3590 final ArrayList cases = new ArrayList();
3591 jj_consume_token(LBRACE);
3594 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3600 jj_la1[97] = jj_gen;
3603 cas = switchLabel0();
3607 jj_consume_token(RBRACE);
3608 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3609 cases.toArray(abcase);
3610 {if (true) return abcase;}
3611 } catch (ParseException e) {
3612 errorMessage = "'}' expected";
3614 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3615 errorEnd = SimpleCharStream.getPosition() + 1;
3616 {if (true) throw e;}
3618 throw new Error("Missing return statement in function");
3622 * A Switch statement with : ... endswitch;
3623 * @param start the begin offset of the switch
3624 * @param end the end offset of the switch
3626 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3628 final ArrayList cases = new ArrayList();
3629 jj_consume_token(COLON);
3631 setMarker(fileToParse,
3632 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3636 "Line " + token.beginLine);
3637 } catch (CoreException e) {
3638 PHPeclipsePlugin.log(e);
3642 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3648 jj_la1[98] = jj_gen;
3651 cas = switchLabel0();
3655 jj_consume_token(ENDSWITCH);
3656 } catch (ParseException e) {
3657 errorMessage = "'endswitch' expected";
3659 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3660 errorEnd = SimpleCharStream.getPosition() + 1;
3661 {if (true) throw e;}
3664 jj_consume_token(SEMICOLON);
3665 final AbstractCase[] abcase = new AbstractCase[cases.size()];
3666 cases.toArray(abcase);
3667 {if (true) return abcase;}
3668 } catch (ParseException e) {
3669 errorMessage = "';' expected after 'endswitch' keyword";
3671 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3672 errorEnd = SimpleCharStream.getPosition() + 1;
3673 {if (true) throw e;}
3675 throw new Error("Missing return statement in function");
3678 static final public AbstractCase switchLabel0() throws ParseException {
3679 final Expression expr;
3680 Statement statement;
3681 final ArrayList stmts = new ArrayList();
3682 final int pos = SimpleCharStream.getPosition();
3683 expr = SwitchLabel();
3686 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3721 case INTEGER_LITERAL:
3722 case FLOATING_POINT_LITERAL:
3723 case STRING_LITERAL:
3732 jj_la1[99] = jj_gen;
3735 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3769 case INTEGER_LITERAL:
3770 case FLOATING_POINT_LITERAL:
3771 case STRING_LITERAL:
3777 statement = BlockStatementNoBreak();
3778 stmts.add(statement);
3781 statement = htmlBlock();
3782 stmts.add(statement);
3785 jj_la1[100] = jj_gen;
3786 jj_consume_token(-1);
3787 throw new ParseException();
3790 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3792 statement = BreakStatement();
3793 stmts.add(statement);
3796 jj_la1[101] = jj_gen;
3799 final Statement[] stmtsArray = new Statement[stmts.size()];
3800 stmts.toArray(stmtsArray);
3801 if (expr == null) {//it's a default
3802 {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3804 {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3805 throw new Error("Missing return statement in function");
3810 * case Expression() :
3812 * @return the if it was a case and null if not
3814 static final public Expression SwitchLabel() throws ParseException {
3815 final Expression expr;
3816 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3818 token = jj_consume_token(CASE);
3820 expr = Expression();
3821 } catch (ParseException e) {
3822 if (errorMessage != null) {if (true) throw e;}
3823 errorMessage = "expression expected after 'case' keyword";
3825 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3826 errorEnd = SimpleCharStream.getPosition() + 1;
3827 {if (true) throw e;}
3830 jj_consume_token(COLON);
3831 {if (true) return expr;}
3832 } catch (ParseException e) {
3833 errorMessage = "':' expected after case expression";
3835 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3836 errorEnd = SimpleCharStream.getPosition() + 1;
3837 {if (true) throw e;}
3841 token = jj_consume_token(_DEFAULT);
3843 jj_consume_token(COLON);
3844 {if (true) return null;}
3845 } catch (ParseException e) {
3846 errorMessage = "':' expected after 'default' keyword";
3848 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3849 errorEnd = SimpleCharStream.getPosition() + 1;
3850 {if (true) throw e;}
3854 jj_la1[102] = jj_gen;
3855 jj_consume_token(-1);
3856 throw new ParseException();
3858 throw new Error("Missing return statement in function");
3861 static final public Break BreakStatement() throws ParseException {
3862 Expression expression = null;
3863 final int start = SimpleCharStream.getPosition();
3864 jj_consume_token(BREAK);
3865 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3881 case INTEGER_LITERAL:
3882 case FLOATING_POINT_LITERAL:
3883 case STRING_LITERAL:
3887 expression = Expression();
3890 jj_la1[103] = jj_gen;
3894 jj_consume_token(SEMICOLON);
3895 } catch (ParseException e) {
3896 errorMessage = "';' expected after 'break' keyword";
3898 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3899 errorEnd = SimpleCharStream.getPosition() + 1;
3900 {if (true) throw e;}
3902 {if (true) return new Break(expression, start, SimpleCharStream.getPosition());}
3903 throw new Error("Missing return statement in function");
3906 static final public IfStatement IfStatement() throws ParseException {
3907 final int pos = SimpleCharStream.getPosition();
3908 final Expression condition;
3909 final IfStatement ifStatement;
3910 jj_consume_token(IF);
3911 condition = Condition("if");
3912 ifStatement = IfStatement0(condition, pos,pos+2);
3913 {if (true) return ifStatement;}
3914 throw new Error("Missing return statement in function");
3917 static final public Expression Condition(final String keyword) throws ParseException {
3918 final Expression condition;
3920 jj_consume_token(LPAREN);
3921 } catch (ParseException e) {
3922 errorMessage = "'(' expected after " + keyword + " keyword";
3924 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length();
3925 errorEnd = errorStart +1;
3926 processParseException(e);
3928 condition = Expression();
3930 jj_consume_token(RPAREN);
3931 } catch (ParseException e) {
3932 errorMessage = "')' expected after " + keyword + " keyword";
3934 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3935 errorEnd = SimpleCharStream.getPosition() + 1;
3936 processParseException(e);
3938 {if (true) return condition;}
3939 throw new Error("Missing return statement in function");
3942 static final public IfStatement IfStatement0(final Expression condition, final int start,final int end) throws ParseException {
3943 Statement statement;
3944 final Statement stmt;
3945 final Statement[] statementsArray;
3946 ElseIf elseifStatement;
3947 Else elseStatement = null;
3948 final ArrayList stmts;
3949 final ArrayList elseIfList = new ArrayList();
3950 final ElseIf[] elseIfs;
3951 int pos = SimpleCharStream.getPosition();
3952 final int endStatements;
3953 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3955 jj_consume_token(COLON);
3956 stmts = new ArrayList();
3959 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3993 case INTEGER_LITERAL:
3994 case FLOATING_POINT_LITERAL:
3995 case STRING_LITERAL:
4004 jj_la1[104] = jj_gen;
4007 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4040 case INTEGER_LITERAL:
4041 case FLOATING_POINT_LITERAL:
4042 case STRING_LITERAL:
4048 statement = Statement();
4049 stmts.add(statement);
4052 statement = htmlBlock();
4053 stmts.add(statement);
4056 jj_la1[105] = jj_gen;
4057 jj_consume_token(-1);
4058 throw new ParseException();
4061 endStatements = SimpleCharStream.getPosition();
4064 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4069 jj_la1[106] = jj_gen;
4072 elseifStatement = ElseIfStatementColon();
4073 elseIfList.add(elseifStatement);
4075 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4077 elseStatement = ElseStatementColon();
4080 jj_la1[107] = jj_gen;
4084 setMarker(fileToParse,
4085 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4089 "Line " + token.beginLine);
4090 } catch (CoreException e) {
4091 PHPeclipsePlugin.log(e);
4094 jj_consume_token(ENDIF);
4095 } catch (ParseException e) {
4096 errorMessage = "'endif' expected";
4098 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4099 errorEnd = SimpleCharStream.getPosition() + 1;
4100 {if (true) throw e;}
4103 jj_consume_token(SEMICOLON);
4104 } catch (ParseException e) {
4105 errorMessage = "';' expected after 'endif' keyword";
4107 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4108 errorEnd = SimpleCharStream.getPosition() + 1;
4109 {if (true) throw e;}
4111 elseIfs = new ElseIf[elseIfList.size()];
4112 elseIfList.toArray(elseIfs);
4113 if (stmts.size() == 1) {
4114 {if (true) return new IfStatement(condition,
4115 (Statement) stmts.get(0),
4119 SimpleCharStream.getPosition());}
4121 statementsArray = new Statement[stmts.size()];
4122 stmts.toArray(statementsArray);
4123 {if (true) return new IfStatement(condition,
4124 new Block(statementsArray,pos,endStatements),
4128 SimpleCharStream.getPosition());}
4164 case INTEGER_LITERAL:
4165 case FLOATING_POINT_LITERAL:
4166 case STRING_LITERAL:
4172 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4205 case INTEGER_LITERAL:
4206 case FLOATING_POINT_LITERAL:
4207 case STRING_LITERAL:
4219 jj_la1[108] = jj_gen;
4220 jj_consume_token(-1);
4221 throw new ParseException();
4225 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4230 jj_la1[109] = jj_gen;
4233 elseifStatement = ElseIfStatement();
4234 elseIfList.add(elseifStatement);
4236 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4238 jj_consume_token(ELSE);
4240 pos = SimpleCharStream.getPosition();
4241 statement = Statement();
4242 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4243 } catch (ParseException e) {
4244 if (errorMessage != null) {
4245 {if (true) throw e;}
4247 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4249 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4250 errorEnd = SimpleCharStream.getPosition() + 1;
4251 {if (true) throw e;}
4255 jj_la1[110] = jj_gen;
4258 elseIfs = new ElseIf[elseIfList.size()];
4259 elseIfList.toArray(elseIfs);
4260 {if (true) return new IfStatement(condition,
4265 SimpleCharStream.getPosition());}
4268 jj_la1[111] = jj_gen;
4269 jj_consume_token(-1);
4270 throw new ParseException();
4272 throw new Error("Missing return statement in function");
4275 static final public ElseIf ElseIfStatementColon() throws ParseException {
4276 final Expression condition;
4277 Statement statement;
4278 final ArrayList list = new ArrayList();
4279 final int pos = SimpleCharStream.getPosition();
4280 jj_consume_token(ELSEIF);
4281 condition = Condition("elseif");
4282 jj_consume_token(COLON);
4285 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4319 case INTEGER_LITERAL:
4320 case FLOATING_POINT_LITERAL:
4321 case STRING_LITERAL:
4330 jj_la1[112] = jj_gen;
4333 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4366 case INTEGER_LITERAL:
4367 case FLOATING_POINT_LITERAL:
4368 case STRING_LITERAL:
4374 statement = Statement();
4375 list.add(statement);
4378 statement = htmlBlock();
4379 list.add(statement);
4382 jj_la1[113] = jj_gen;
4383 jj_consume_token(-1);
4384 throw new ParseException();
4387 final Statement[] stmtsArray = new Statement[list.size()];
4388 list.toArray(stmtsArray);
4389 {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4390 throw new Error("Missing return statement in function");
4393 static final public Else ElseStatementColon() throws ParseException {
4394 Statement statement;
4395 final ArrayList list = new ArrayList();
4396 final int pos = SimpleCharStream.getPosition();
4397 jj_consume_token(ELSE);
4398 jj_consume_token(COLON);
4401 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4435 case INTEGER_LITERAL:
4436 case FLOATING_POINT_LITERAL:
4437 case STRING_LITERAL:
4446 jj_la1[114] = jj_gen;
4449 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4482 case INTEGER_LITERAL:
4483 case FLOATING_POINT_LITERAL:
4484 case STRING_LITERAL:
4490 statement = Statement();
4491 list.add(statement);
4494 statement = htmlBlock();
4495 list.add(statement);
4498 jj_la1[115] = jj_gen;
4499 jj_consume_token(-1);
4500 throw new ParseException();
4503 final Statement[] stmtsArray = new Statement[list.size()];
4504 list.toArray(stmtsArray);
4505 {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4506 throw new Error("Missing return statement in function");
4509 static final public ElseIf ElseIfStatement() throws ParseException {
4510 final Expression condition;
4511 final Statement statement;
4512 final ArrayList list = new ArrayList();
4513 final int pos = SimpleCharStream.getPosition();
4514 jj_consume_token(ELSEIF);
4515 condition = Condition("elseif");
4516 statement = Statement();
4517 list.add(statement);/*todo:do better*/
4518 final Statement[] stmtsArray = new Statement[list.size()];
4519 list.toArray(stmtsArray);
4520 {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4521 throw new Error("Missing return statement in function");
4524 static final public WhileStatement WhileStatement() throws ParseException {
4525 final Expression condition;
4526 final Statement action;
4527 final int pos = SimpleCharStream.getPosition();
4528 jj_consume_token(WHILE);
4529 condition = Condition("while");
4530 action = WhileStatement0(pos,pos + 5);
4531 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4532 throw new Error("Missing return statement in function");
4535 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4536 Statement statement;
4537 final ArrayList stmts = new ArrayList();
4538 final int pos = SimpleCharStream.getPosition();
4539 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4541 jj_consume_token(COLON);
4544 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4577 case INTEGER_LITERAL:
4578 case FLOATING_POINT_LITERAL:
4579 case STRING_LITERAL:
4588 jj_la1[116] = jj_gen;
4591 statement = Statement();
4592 stmts.add(statement);
4595 setMarker(fileToParse,
4596 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4600 "Line " + token.beginLine);
4601 } catch (CoreException e) {
4602 PHPeclipsePlugin.log(e);
4605 jj_consume_token(ENDWHILE);
4606 } catch (ParseException e) {
4607 errorMessage = "'endwhile' expected";
4609 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4610 errorEnd = SimpleCharStream.getPosition() + 1;
4611 {if (true) throw e;}
4614 jj_consume_token(SEMICOLON);
4615 final Statement[] stmtsArray = new Statement[stmts.size()];
4616 stmts.toArray(stmtsArray);
4617 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4618 } catch (ParseException e) {
4619 errorMessage = "';' expected after 'endwhile' keyword";
4621 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4622 errorEnd = SimpleCharStream.getPosition() + 1;
4623 {if (true) throw e;}
4658 case INTEGER_LITERAL:
4659 case FLOATING_POINT_LITERAL:
4660 case STRING_LITERAL:
4666 statement = Statement();
4667 {if (true) return statement;}
4670 jj_la1[117] = jj_gen;
4671 jj_consume_token(-1);
4672 throw new ParseException();
4674 throw new Error("Missing return statement in function");
4677 static final public DoStatement DoStatement() throws ParseException {
4678 final Statement action;
4679 final Expression condition;
4680 final int pos = SimpleCharStream.getPosition();
4681 jj_consume_token(DO);
4682 action = Statement();
4683 jj_consume_token(WHILE);
4684 condition = Condition("while");
4686 jj_consume_token(SEMICOLON);
4687 {if (true) return new DoStatement(condition,action,pos,SimpleCharStream.getPosition());}
4688 } catch (ParseException e) {
4689 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4691 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4692 errorEnd = SimpleCharStream.getPosition() + 1;
4693 {if (true) throw e;}
4695 throw new Error("Missing return statement in function");
4698 static final public ForeachStatement ForeachStatement() throws ParseException {
4699 Statement statement;
4700 Expression expression;
4701 final int pos = SimpleCharStream.getPosition();
4702 ArrayVariableDeclaration variable;
4703 jj_consume_token(FOREACH);
4705 jj_consume_token(LPAREN);
4706 } catch (ParseException e) {
4707 errorMessage = "'(' expected after 'foreach' keyword";
4709 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4710 errorEnd = SimpleCharStream.getPosition() + 1;
4711 {if (true) throw e;}
4714 expression = Expression();
4715 } catch (ParseException e) {
4716 errorMessage = "variable expected";
4718 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4719 errorEnd = SimpleCharStream.getPosition() + 1;
4720 {if (true) throw e;}
4723 jj_consume_token(AS);
4724 } catch (ParseException e) {
4725 errorMessage = "'as' expected";
4727 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4728 errorEnd = SimpleCharStream.getPosition() + 1;
4729 {if (true) throw e;}
4732 variable = ArrayVariable();
4733 } catch (ParseException e) {
4734 errorMessage = "variable expected";
4736 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4737 errorEnd = SimpleCharStream.getPosition() + 1;
4738 {if (true) throw e;}
4741 jj_consume_token(RPAREN);
4742 } catch (ParseException e) {
4743 errorMessage = "')' expected after 'foreach' keyword";
4745 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4746 errorEnd = SimpleCharStream.getPosition() + 1;
4747 {if (true) throw e;}
4750 statement = Statement();
4751 } catch (ParseException e) {
4752 if (errorMessage != null) {if (true) throw e;}
4753 errorMessage = "statement expected";
4755 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4756 errorEnd = SimpleCharStream.getPosition() + 1;
4757 {if (true) throw e;}
4759 {if (true) return new ForeachStatement(expression,
4763 SimpleCharStream.getPosition());}
4764 throw new Error("Missing return statement in function");
4767 static final public ForStatement ForStatement() throws ParseException {
4769 final int pos = SimpleCharStream.getPosition();
4770 Expression[] initializations = null;
4771 Expression condition = null;
4772 Expression[] increments = null;
4774 final ArrayList list = new ArrayList();
4775 final int startBlock, endBlock;
4776 token = jj_consume_token(FOR);
4778 jj_consume_token(LPAREN);
4779 } catch (ParseException e) {
4780 errorMessage = "'(' expected after 'for' keyword";
4782 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4783 errorEnd = SimpleCharStream.getPosition() + 1;
4784 {if (true) throw e;}
4786 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4794 initializations = ForInit();
4797 jj_la1[118] = jj_gen;
4800 jj_consume_token(SEMICOLON);
4801 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4817 case INTEGER_LITERAL:
4818 case FLOATING_POINT_LITERAL:
4819 case STRING_LITERAL:
4823 condition = Expression();
4826 jj_la1[119] = jj_gen;
4829 jj_consume_token(SEMICOLON);
4830 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4838 increments = StatementExpressionList();
4841 jj_la1[120] = jj_gen;
4844 jj_consume_token(RPAREN);
4845 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4878 case INTEGER_LITERAL:
4879 case FLOATING_POINT_LITERAL:
4880 case STRING_LITERAL:
4886 action = Statement();
4887 {if (true) return new ForStatement(initializations,condition,increments,action,pos,SimpleCharStream.getPosition());}
4890 jj_consume_token(COLON);
4891 startBlock = SimpleCharStream.getPosition();
4894 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4927 case INTEGER_LITERAL:
4928 case FLOATING_POINT_LITERAL:
4929 case STRING_LITERAL:
4938 jj_la1[121] = jj_gen;
4941 action = Statement();
4945 setMarker(fileToParse,
4946 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
4948 pos+token.image.length(),
4950 "Line " + token.beginLine);
4951 } catch (CoreException e) {
4952 PHPeclipsePlugin.log(e);
4954 endBlock = SimpleCharStream.getPosition();
4956 jj_consume_token(ENDFOR);
4957 } catch (ParseException e) {
4958 errorMessage = "'endfor' expected";
4960 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4961 errorEnd = SimpleCharStream.getPosition() + 1;
4962 {if (true) throw e;}
4965 jj_consume_token(SEMICOLON);
4966 final Statement[] stmtsArray = new Statement[list.size()];
4967 list.toArray(stmtsArray);
4968 {if (true) return new ForStatement(initializations,condition,increments,new Block(stmtsArray,startBlock,endBlock),pos,SimpleCharStream.getPosition());}
4969 } catch (ParseException e) {
4970 errorMessage = "';' expected after 'endfor' keyword";
4972 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4973 errorEnd = SimpleCharStream.getPosition() + 1;
4974 {if (true) throw e;}
4978 jj_la1[122] = jj_gen;
4979 jj_consume_token(-1);
4980 throw new ParseException();
4982 throw new Error("Missing return statement in function");
4985 static final public Expression[] ForInit() throws ParseException {
4986 final Expression[] exprs;
4987 if (jj_2_5(2147483647)) {
4988 exprs = LocalVariableDeclaration();
4989 {if (true) return exprs;}
4991 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4999 exprs = StatementExpressionList();
5000 {if (true) return exprs;}
5003 jj_la1[123] = jj_gen;
5004 jj_consume_token(-1);
5005 throw new ParseException();
5008 throw new Error("Missing return statement in function");
5011 static final public Expression[] StatementExpressionList() throws ParseException {
5012 final ArrayList list = new ArrayList();
5013 final Expression expr;
5014 expr = StatementExpression();
5018 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5023 jj_la1[124] = jj_gen;
5026 jj_consume_token(COMMA);
5027 StatementExpression();
5030 final Expression[] exprsArray = new Expression[list.size()];
5031 list.toArray(exprsArray);
5032 {if (true) return exprsArray;}
5033 throw new Error("Missing return statement in function");
5036 static final public Continue ContinueStatement() throws ParseException {
5037 Expression expr = null;
5038 final int pos = SimpleCharStream.getPosition();
5039 jj_consume_token(CONTINUE);
5040 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5056 case INTEGER_LITERAL:
5057 case FLOATING_POINT_LITERAL:
5058 case STRING_LITERAL:
5062 expr = Expression();
5065 jj_la1[125] = jj_gen;
5069 jj_consume_token(SEMICOLON);
5070 {if (true) return new Continue(expr,pos,SimpleCharStream.getPosition());}
5071 } catch (ParseException e) {
5072 errorMessage = "';' expected after 'continue' statement";
5074 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5075 errorEnd = SimpleCharStream.getPosition() + 1;
5076 {if (true) throw e;}
5078 throw new Error("Missing return statement in function");
5081 static final public ReturnStatement ReturnStatement() throws ParseException {
5082 Expression expr = null;
5083 final int pos = SimpleCharStream.getPosition();
5084 jj_consume_token(RETURN);
5085 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5101 case INTEGER_LITERAL:
5102 case FLOATING_POINT_LITERAL:
5103 case STRING_LITERAL:
5107 expr = Expression();
5110 jj_la1[126] = jj_gen;
5114 jj_consume_token(SEMICOLON);
5115 {if (true) return new ReturnStatement(expr,pos,SimpleCharStream.getPosition());}
5116 } catch (ParseException e) {
5117 errorMessage = "';' expected after 'return' statement";
5119 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5120 errorEnd = SimpleCharStream.getPosition() + 1;
5121 {if (true) throw e;}
5123 throw new Error("Missing return statement in function");
5126 static final private boolean jj_2_1(int xla) {
5127 jj_la = xla; jj_lastpos = jj_scanpos = token;
5128 boolean retval = !jj_3_1();
5133 static final private boolean jj_2_2(int xla) {
5134 jj_la = xla; jj_lastpos = jj_scanpos = token;
5135 boolean retval = !jj_3_2();
5140 static final private boolean jj_2_3(int xla) {
5141 jj_la = xla; jj_lastpos = jj_scanpos = token;
5142 boolean retval = !jj_3_3();
5147 static final private boolean jj_2_4(int xla) {
5148 jj_la = xla; jj_lastpos = jj_scanpos = token;
5149 boolean retval = !jj_3_4();
5154 static final private boolean jj_2_5(int xla) {
5155 jj_la = xla; jj_lastpos = jj_scanpos = token;
5156 boolean retval = !jj_3_5();
5161 static final private boolean jj_3R_157() {
5162 if (jj_3R_161()) return true;
5163 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5167 static final private boolean jj_3R_49() {
5168 if (jj_3R_64()) return true;
5169 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5172 if (jj_3R_65()) jj_scanpos = xsp;
5173 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5177 static final private boolean jj_3R_160() {
5178 if (jj_scan_token(MINUS)) return true;
5179 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5183 static final private boolean jj_3R_159() {
5184 if (jj_scan_token(PLUS)) return true;
5185 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5189 static final private boolean jj_3R_153() {
5196 if (jj_3R_158()) return true;
5197 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5198 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5199 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5203 static final private boolean jj_3R_156() {
5208 if (jj_3R_160()) return true;
5209 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5210 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5211 if (jj_3R_143()) return true;
5212 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5216 static final private boolean jj_3R_50() {
5217 if (jj_scan_token(COMMA)) return true;
5218 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5219 if (jj_3R_49()) return true;
5220 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5224 static final private boolean jj_3R_44() {
5225 if (jj_3R_49()) return true;
5226 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5230 if (jj_3R_50()) { jj_scanpos = xsp; break; }
5231 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5236 static final private boolean jj_3R_155() {
5237 if (jj_3R_153()) return true;
5238 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5242 static final private boolean jj_3R_152() {
5247 if (jj_3R_155()) return true;
5248 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5249 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5253 static final private boolean jj_3R_154() {
5254 if (jj_scan_token(AT)) return true;
5255 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5256 if (jj_3R_152()) return true;
5257 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5261 static final private boolean jj_3R_148() {
5262 if (jj_3R_152()) return true;
5263 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5267 static final private boolean jj_3R_143() {
5272 if (jj_3R_148()) return true;
5273 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5274 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5278 static final private boolean jj_3R_147() {
5279 if (jj_scan_token(BIT_AND)) return true;
5280 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5281 if (jj_3R_153()) return true;
5282 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5286 static final private boolean jj_3R_43() {
5287 if (jj_3R_47()) return true;
5288 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5289 if (jj_scan_token(SEMICOLON)) return true;
5290 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5294 static final private boolean jj_3R_151() {
5295 if (jj_scan_token(REMAINDER)) return true;
5296 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5300 static final private boolean jj_3R_150() {
5301 if (jj_scan_token(SLASH)) return true;
5302 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5306 static final private boolean jj_3R_149() {
5307 if (jj_scan_token(STAR)) return true;
5308 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5312 static final private boolean jj_3R_144() {
5319 if (jj_3R_151()) return true;
5320 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5321 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5322 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5323 if (jj_3R_143()) return true;
5324 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5328 static final private boolean jj_3R_138() {
5329 if (jj_3R_143()) return true;
5330 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5334 if (jj_3R_144()) { jj_scanpos = xsp; break; }
5335 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5340 static final private boolean jj_3R_146() {
5341 if (jj_scan_token(MINUS)) return true;
5342 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5346 static final private boolean jj_3_4() {
5347 if (jj_3R_43()) return true;
5348 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5352 static final private boolean jj_3R_145() {
5353 if (jj_scan_token(PLUS)) return true;
5354 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5358 static final private boolean jj_3R_139() {
5363 if (jj_3R_146()) return true;
5364 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5365 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5366 if (jj_3R_138()) return true;
5367 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5371 static final private boolean jj_3R_132() {
5372 if (jj_3R_138()) return true;
5373 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5377 if (jj_3R_139()) { jj_scanpos = xsp; break; }
5378 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5383 static final private boolean jj_3R_142() {
5384 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
5385 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5389 static final private boolean jj_3R_141() {
5390 if (jj_scan_token(RSIGNEDSHIFT)) return true;
5391 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5395 static final private boolean jj_3R_140() {
5396 if (jj_scan_token(LSHIFT)) return true;
5397 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5401 static final private boolean jj_3R_133() {
5408 if (jj_3R_142()) return true;
5409 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5410 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5411 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5412 if (jj_3R_132()) return true;
5413 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5417 static final private boolean jj_3R_125() {
5418 if (jj_3R_132()) return true;
5419 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5423 if (jj_3R_133()) { jj_scanpos = xsp; break; }
5424 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5429 static final private boolean jj_3_5() {
5430 if (jj_3R_44()) return true;
5431 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5435 static final private boolean jj_3R_207() {
5436 if (jj_scan_token(COMMA)) return true;
5437 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5438 if (jj_3R_47()) return true;
5439 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5443 static final private boolean jj_3R_206() {
5444 if (jj_3R_47()) return true;
5445 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5449 if (jj_3R_207()) { jj_scanpos = xsp; break; }
5450 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5455 static final private boolean jj_3R_137() {
5456 if (jj_scan_token(GE)) return true;
5457 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5461 static final private boolean jj_3R_136() {
5462 if (jj_scan_token(LE)) return true;
5463 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5467 static final private boolean jj_3R_135() {
5468 if (jj_scan_token(GT)) return true;
5469 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5473 static final private boolean jj_3R_205() {
5474 if (jj_scan_token(COMMA)) return true;
5475 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5479 static final private boolean jj_3R_134() {
5480 if (jj_scan_token(LT)) return true;
5481 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5485 static final private boolean jj_3R_126() {
5494 if (jj_3R_137()) return true;
5495 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5496 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5497 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5498 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5499 if (jj_3R_125()) return true;
5500 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5504 static final private boolean jj_3_2() {
5505 if (jj_scan_token(COMMA)) return true;
5506 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5507 if (jj_3R_40()) return true;
5508 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5512 static final private boolean jj_3R_122() {
5513 if (jj_3R_125()) return true;
5514 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5518 if (jj_3R_126()) { jj_scanpos = xsp; break; }
5519 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5524 static final private boolean jj_3R_203() {
5525 if (jj_3R_206()) return true;
5526 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5530 static final private boolean jj_3R_204() {
5531 if (jj_3R_40()) return true;
5532 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5536 if (jj_3_2()) { jj_scanpos = xsp; break; }
5537 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5542 static final private boolean jj_3R_200() {
5543 if (jj_scan_token(LPAREN)) return true;
5544 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5547 if (jj_3R_204()) jj_scanpos = xsp;
5548 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5550 if (jj_3R_205()) jj_scanpos = xsp;
5551 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5552 if (jj_scan_token(RPAREN)) return true;
5553 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5557 static final private boolean jj_3R_71() {
5558 if (jj_3R_48()) return true;
5559 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5563 static final private boolean jj_3R_196() {
5564 if (jj_scan_token(LPAREN)) return true;
5565 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5568 if (jj_3R_203()) jj_scanpos = xsp;
5569 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5570 if (jj_scan_token(RPAREN)) return true;
5571 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5575 static final private boolean jj_3R_208() {
5576 if (jj_scan_token(ARRAYASSIGN)) return true;
5577 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5578 if (jj_3R_47()) return true;
5579 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5583 static final private boolean jj_3R_178() {
5584 if (jj_scan_token(NULL)) return true;
5585 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5589 static final private boolean jj_3R_177() {
5590 if (jj_scan_token(FALSE)) return true;
5591 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5595 static final private boolean jj_3R_40() {
5596 if (jj_3R_47()) return true;
5597 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5600 if (jj_3R_208()) jj_scanpos = xsp;
5601 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5605 static final private boolean jj_3R_131() {
5606 if (jj_scan_token(TRIPLEEQUAL)) return true;
5607 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5611 static final private boolean jj_3R_130() {
5612 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5613 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5617 static final private boolean jj_3R_129() {
5618 if (jj_scan_token(NOT_EQUAL)) return true;
5619 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5623 static final private boolean jj_3R_176() {
5624 if (jj_scan_token(TRUE)) return true;
5625 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5629 static final private boolean jj_3R_128() {
5630 if (jj_scan_token(DIF)) return true;
5631 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5635 static final private boolean jj_3R_127() {
5636 if (jj_scan_token(EQUAL_EQUAL)) return true;
5637 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5641 static final private boolean jj_3R_175() {
5642 if (jj_scan_token(STRING_LITERAL)) return true;
5643 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5647 static final private boolean jj_3R_174() {
5648 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
5649 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5653 static final private boolean jj_3R_123() {
5664 if (jj_3R_131()) return true;
5665 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5666 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5667 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5668 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5669 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5670 if (jj_3R_122()) return true;
5671 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5675 static final private boolean jj_3R_171() {
5688 if (jj_3R_178()) return true;
5689 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5690 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5691 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5692 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5693 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5694 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5698 static final private boolean jj_3R_173() {
5699 if (jj_scan_token(INTEGER_LITERAL)) return true;
5700 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5704 static final private boolean jj_3R_117() {
5705 if (jj_3R_122()) return true;
5706 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5710 if (jj_3R_123()) { jj_scanpos = xsp; break; }
5711 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5716 static final private boolean jj_3R_70() {
5717 if (jj_3R_47()) return true;
5718 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5722 static final private boolean jj_3R_52() {
5727 if (jj_3R_71()) return true;
5728 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5729 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5733 static final private boolean jj_3R_118() {
5734 if (jj_scan_token(BIT_AND)) return true;
5735 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5736 if (jj_3R_117()) return true;
5737 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5741 static final private boolean jj_3R_115() {
5742 if (jj_3R_117()) return true;
5743 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5747 if (jj_3R_118()) { jj_scanpos = xsp; break; }
5748 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5753 static final private boolean jj_3R_46() {
5754 if (jj_scan_token(LBRACKET)) return true;
5755 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5758 if (jj_3R_52()) jj_scanpos = xsp;
5759 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5760 if (jj_scan_token(RBRACKET)) return true;
5761 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5765 static final private boolean jj_3R_116() {
5766 if (jj_scan_token(XOR)) return true;
5767 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5768 if (jj_3R_115()) return true;
5769 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5773 static final private boolean jj_3R_112() {
5774 if (jj_scan_token(LBRACE)) return true;
5775 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5776 if (jj_3R_47()) return true;
5777 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5778 if (jj_scan_token(RBRACE)) return true;
5779 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5783 static final private boolean jj_3R_113() {
5784 if (jj_3R_115()) return true;
5785 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5789 if (jj_3R_116()) { jj_scanpos = xsp; break; }
5790 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5795 static final private boolean jj_3R_69() {
5796 if (jj_scan_token(DOLLAR_ID)) return true;
5797 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5801 static final private boolean jj_3R_45() {
5802 if (jj_scan_token(CLASSACCESS)) return true;
5803 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5804 if (jj_3R_51()) return true;
5805 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5809 static final private boolean jj_3R_39() {
5814 if (jj_3R_46()) return true;
5815 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5816 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5820 static final private boolean jj_3R_68() {
5821 if (jj_scan_token(DOLLAR)) return true;
5822 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5823 if (jj_3R_51()) return true;
5824 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5828 static final private boolean jj_3R_114() {
5829 if (jj_scan_token(BIT_OR)) return true;
5830 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5831 if (jj_3R_113()) return true;
5832 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5836 static final private boolean jj_3R_106() {
5837 if (jj_3R_113()) return true;
5838 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5842 if (jj_3R_114()) { jj_scanpos = xsp; break; }
5843 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5848 static final private boolean jj_3R_199() {
5849 if (jj_3R_64()) return true;
5850 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5854 static final private boolean jj_3R_198() {
5855 if (jj_3R_48()) return true;
5856 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5860 static final private boolean jj_3R_197() {
5861 if (jj_scan_token(IDENTIFIER)) return true;
5862 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5866 static final private boolean jj_3R_189() {
5873 if (jj_3R_199()) return true;
5874 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5875 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5876 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5880 static final private boolean jj_3R_67() {
5881 if (jj_scan_token(IDENTIFIER)) return true;
5882 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5885 if (jj_3R_112()) jj_scanpos = xsp;
5886 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5890 static final private boolean jj_3R_109() {
5891 if (jj_scan_token(DOT)) return true;
5892 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5893 if (jj_3R_106()) return true;
5894 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5898 static final private boolean jj_3R_100() {
5899 if (jj_3R_106()) return true;
5900 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5904 if (jj_3R_109()) { jj_scanpos = xsp; break; }
5905 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5910 static final private boolean jj_3R_51() {
5919 if (jj_3R_69()) return true;
5920 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5921 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5922 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5923 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5927 static final private boolean jj_3R_66() {
5928 if (jj_scan_token(LBRACE)) return true;
5929 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5930 if (jj_3R_47()) return true;
5931 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5932 if (jj_scan_token(RBRACE)) return true;
5933 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5937 static final private boolean jj_3R_121() {
5938 if (jj_scan_token(ASSIGN)) return true;
5939 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5940 if (jj_3R_47()) return true;
5941 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5945 static final private boolean jj_3R_99() {
5946 if (jj_scan_token(LBRACE)) return true;
5947 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5948 if (jj_3R_47()) return true;
5949 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5950 if (jj_scan_token(RBRACE)) return true;
5951 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5955 static final private boolean jj_3R_111() {
5956 if (jj_scan_token(_ANDL)) return true;
5957 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5961 static final private boolean jj_3R_110() {
5962 if (jj_scan_token(AND_AND)) return true;
5963 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5967 static final private boolean jj_3R_103() {
5972 if (jj_3R_111()) return true;
5973 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5974 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5975 if (jj_3R_100()) return true;
5976 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5980 static final private boolean jj_3R_83() {
5981 if (jj_3R_100()) return true;
5982 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5986 if (jj_3R_103()) { jj_scanpos = xsp; break; }
5987 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5992 static final private boolean jj_3R_79() {
5993 if (jj_scan_token(HOOK)) return true;
5994 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5995 if (jj_3R_47()) return true;
5996 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5997 if (jj_scan_token(COLON)) return true;
5998 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5999 if (jj_3R_72()) return true;
6000 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6004 static final private boolean jj_3R_124() {
6005 if (jj_3R_64()) return true;
6006 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6010 static final private boolean jj_3R_82() {
6011 if (jj_scan_token(DOLLAR)) return true;
6012 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6013 if (jj_3R_51()) return true;
6014 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6018 static final private boolean jj_3R_105() {
6019 if (jj_scan_token(_ORL)) return true;
6020 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6024 static final private boolean jj_3R_104() {
6025 if (jj_scan_token(OR_OR)) return true;
6026 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6030 static final private boolean jj_3R_120() {
6031 if (jj_scan_token(COMMA)) return true;
6032 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6035 if (jj_3R_124()) jj_scanpos = xsp;
6036 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6040 static final private boolean jj_3R_183() {
6041 if (jj_scan_token(ARRAY)) return true;
6042 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6043 if (jj_3R_200()) return true;
6044 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6048 static final private boolean jj_3R_81() {
6049 if (jj_scan_token(DOLLAR_ID)) return true;
6050 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6053 if (jj_3R_99()) jj_scanpos = xsp;
6054 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6058 static final private boolean jj_3R_75() {
6063 if (jj_3R_82()) return true;
6064 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6065 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6069 static final private boolean jj_3R_85() {
6074 if (jj_3R_105()) return true;
6075 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6076 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6077 if (jj_3R_83()) return true;
6078 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6082 static final private boolean jj_3R_119() {
6083 if (jj_3R_64()) return true;
6084 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6088 static final private boolean jj_3R_76() {
6089 if (jj_3R_83()) return true;
6090 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6094 if (jj_3R_85()) { jj_scanpos = xsp; break; }
6095 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6100 static final private boolean jj_3R_108() {
6101 if (jj_scan_token(LIST)) return true;
6102 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6103 if (jj_scan_token(LPAREN)) return true;
6104 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6107 if (jj_3R_119()) jj_scanpos = xsp;
6108 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6111 if (jj_3R_120()) { jj_scanpos = xsp; break; }
6112 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6114 if (jj_scan_token(RPAREN)) return true;
6115 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6117 if (jj_3R_121()) jj_scanpos = xsp;
6118 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6122 static final private boolean jj_3R_202() {
6123 if (jj_scan_token(STATICCLASSACCESS)) return true;
6124 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6125 if (jj_3R_189()) return true;
6126 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6130 static final private boolean jj_3R_201() {
6131 if (jj_3R_39()) return true;
6132 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6136 static final private boolean jj_3R_195() {
6141 if (jj_3R_202()) return true;
6142 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6143 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6147 static final private boolean jj_3R_72() {
6148 if (jj_3R_76()) return true;
6149 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6152 if (jj_3R_79()) jj_scanpos = xsp;
6153 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6157 static final private boolean jj_3R_107() {
6158 if (jj_scan_token(PRINT)) return true;
6159 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6160 if (jj_3R_47()) return true;
6161 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6165 static final private boolean jj_3R_192() {
6166 if (jj_3R_64()) return true;
6167 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6171 static final private boolean jj_3_1() {
6172 if (jj_3R_39()) return true;
6173 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6177 static final private boolean jj_3R_98() {
6178 if (jj_scan_token(TILDEEQUAL)) return true;
6179 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6183 static final private boolean jj_3R_97() {
6184 if (jj_scan_token(DOTASSIGN)) return true;
6185 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6189 static final private boolean jj_3R_191() {
6190 if (jj_scan_token(IDENTIFIER)) return true;
6191 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6195 static final private boolean jj_3R_182() {
6200 if (jj_3R_192()) return true;
6201 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6202 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6206 static final private boolean jj_3R_96() {
6207 if (jj_scan_token(ORASSIGN)) return true;
6208 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6212 static final private boolean jj_3R_95() {
6213 if (jj_scan_token(XORASSIGN)) return true;
6214 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6218 static final private boolean jj_3R_94() {
6219 if (jj_scan_token(ANDASSIGN)) return true;
6220 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6224 static final private boolean jj_3R_93() {
6225 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6226 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6230 static final private boolean jj_3R_64() {
6231 if (jj_3R_75()) return true;
6232 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6236 if (jj_3_1()) { jj_scanpos = xsp; break; }
6237 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6242 static final private boolean jj_3R_92() {
6243 if (jj_scan_token(LSHIFTASSIGN)) return true;
6244 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6248 static final private boolean jj_3R_91() {
6249 if (jj_scan_token(MINUSASSIGN)) return true;
6250 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6254 static final private boolean jj_3R_90() {
6255 if (jj_scan_token(PLUSASSIGN)) return true;
6256 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6260 static final private boolean jj_3R_89() {
6261 if (jj_scan_token(REMASSIGN)) return true;
6262 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6266 static final private boolean jj_3R_88() {
6267 if (jj_scan_token(SLASHASSIGN)) return true;
6268 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6272 static final private boolean jj_3R_87() {
6273 if (jj_scan_token(STARASSIGN)) return true;
6274 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6278 static final private boolean jj_3R_86() {
6279 if (jj_scan_token(ASSIGN)) return true;
6280 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6284 static final private boolean jj_3R_80() {
6311 if (jj_3R_98()) return true;
6312 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6313 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6314 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6315 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6316 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6317 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6318 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6319 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6320 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6321 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6322 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6323 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6324 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6328 static final private boolean jj_3R_181() {
6329 if (jj_3R_183()) return true;
6330 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6334 static final private boolean jj_3R_190() {
6335 if (jj_3R_196()) return true;
6336 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6340 static final private boolean jj_3R_180() {
6341 if (jj_scan_token(NEW)) return true;
6342 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6343 if (jj_3R_189()) return true;
6344 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6347 if (jj_3R_190()) jj_scanpos = xsp;
6348 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6352 static final private boolean jj_3R_102() {
6353 if (jj_3R_108()) return true;
6354 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6358 static final private boolean jj_3R_188() {
6359 if (jj_3R_196()) return true;
6360 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6364 static final private boolean jj_3R_101() {
6365 if (jj_3R_107()) return true;
6366 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6370 static final private boolean jj_3R_84() {
6375 if (jj_3R_102()) return true;
6376 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6377 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6381 static final private boolean jj_3R_187() {
6382 if (jj_3R_195()) return true;
6383 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6387 static final private boolean jj_3R_179() {
6388 if (jj_3R_182()) return true;
6389 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6393 if (jj_3R_187()) { jj_scanpos = xsp; break; }
6394 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6397 if (jj_3R_188()) jj_scanpos = xsp;
6398 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6402 static final private boolean jj_3R_172() {
6409 if (jj_3R_181()) return true;
6410 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6411 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6412 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6416 static final private boolean jj_3R_78() {
6417 if (jj_3R_84()) return true;
6418 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6422 static final private boolean jj_3R_77() {
6423 if (jj_scan_token(BANG)) return true;
6424 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6425 if (jj_3R_73()) return true;
6426 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6430 static final private boolean jj_3R_73() {
6435 if (jj_3R_78()) return true;
6436 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6437 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6441 static final private boolean jj_3R_194() {
6442 if (jj_scan_token(MINUS_MINUS)) return true;
6443 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6447 static final private boolean jj_3R_193() {
6448 if (jj_scan_token(PLUS_PLUS)) return true;
6449 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6453 static final private boolean jj_3R_186() {
6458 if (jj_3R_194()) return true;
6459 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6460 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6464 static final private boolean jj_3R_54() {
6465 if (jj_3R_73()) return true;
6466 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6470 static final private boolean jj_3R_170() {
6471 if (jj_3R_172()) return true;
6472 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6475 if (jj_3R_186()) jj_scanpos = xsp;
6476 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6480 static final private boolean jj_3R_185() {
6481 if (jj_scan_token(ARRAY)) return true;
6482 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6486 static final private boolean jj_3R_184() {
6487 if (jj_3R_48()) return true;
6488 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6492 static final private boolean jj_3R_42() {
6493 if (jj_scan_token(ARRAY)) return true;
6494 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6498 static final private boolean jj_3R_169() {
6499 if (jj_scan_token(LPAREN)) return true;
6500 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6505 if (jj_3R_185()) return true;
6506 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6507 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6508 if (jj_scan_token(RPAREN)) return true;
6509 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6510 if (jj_3R_143()) return true;
6511 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6515 static final private boolean jj_3R_41() {
6516 if (jj_3R_48()) return true;
6517 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6521 static final private boolean jj_3R_74() {
6522 if (jj_3R_80()) return true;
6523 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6524 if (jj_3R_72()) return true;
6525 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6529 static final private boolean jj_3R_47() {
6534 if (jj_3R_54()) return true;
6535 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6536 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6540 static final private boolean jj_3R_53() {
6541 if (jj_3R_72()) return true;
6542 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6545 if (jj_3R_74()) jj_scanpos = xsp;
6546 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6550 static final private boolean jj_3_3() {
6551 if (jj_scan_token(LPAREN)) return true;
6552 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6557 if (jj_3R_42()) return true;
6558 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6559 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6560 if (jj_scan_token(RPAREN)) return true;
6561 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6565 static final private boolean jj_3R_65() {
6566 if (jj_scan_token(ASSIGN)) return true;
6567 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6568 if (jj_3R_47()) return true;
6569 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6573 static final private boolean jj_3R_168() {
6574 if (jj_scan_token(LPAREN)) return true;
6575 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6576 if (jj_3R_47()) return true;
6577 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6578 if (jj_scan_token(RPAREN)) return true;
6579 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6583 static final private boolean jj_3R_63() {
6584 if (jj_scan_token(OBJECT)) return true;
6585 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6589 static final private boolean jj_3R_167() {
6590 if (jj_3R_171()) return true;
6591 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6595 static final private boolean jj_3R_166() {
6596 if (jj_3R_170()) return true;
6597 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6601 static final private boolean jj_3R_62() {
6602 if (jj_scan_token(INTEGER)) return true;
6603 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6607 static final private boolean jj_3R_162() {
6616 if (jj_3R_168()) return true;
6617 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6618 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6619 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6620 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6624 static final private boolean jj_3R_165() {
6625 if (jj_3R_169()) return true;
6626 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6630 static final private boolean jj_3R_61() {
6631 if (jj_scan_token(INT)) return true;
6632 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6636 static final private boolean jj_3R_60() {
6637 if (jj_scan_token(FLOAT)) return true;
6638 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6642 static final private boolean jj_3R_59() {
6643 if (jj_scan_token(DOUBLE)) return true;
6644 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6648 static final private boolean jj_3R_58() {
6649 if (jj_scan_token(REAL)) return true;
6650 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6654 static final private boolean jj_3R_164() {
6655 if (jj_scan_token(MINUS_MINUS)) return true;
6656 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6660 static final private boolean jj_3R_57() {
6661 if (jj_scan_token(BOOLEAN)) return true;
6662 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6666 static final private boolean jj_3R_163() {
6667 if (jj_scan_token(PLUS_PLUS)) return true;
6668 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6672 static final private boolean jj_3R_56() {
6673 if (jj_scan_token(BOOL)) return true;
6674 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6678 static final private boolean jj_3R_48() {
6697 if (jj_3R_63()) return true;
6698 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6699 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6700 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6701 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6702 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6703 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6704 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6705 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6706 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6710 static final private boolean jj_3R_55() {
6711 if (jj_scan_token(STRING)) return true;
6712 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6716 static final private boolean jj_3R_161() {
6721 if (jj_3R_164()) return true;
6722 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6723 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6724 if (jj_3R_172()) return true;
6725 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6729 static final private boolean jj_3R_158() {
6730 if (jj_3R_162()) return true;
6731 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6735 static private boolean jj_initialized_once = false;
6736 static public PHPParserTokenManager token_source;
6737 static SimpleCharStream jj_input_stream;
6738 static public Token token, jj_nt;
6739 static private int jj_ntk;
6740 static private Token jj_scanpos, jj_lastpos;
6741 static private int jj_la;
6742 static public boolean lookingAhead = false;
6743 static private boolean jj_semLA;
6744 static private int jj_gen;
6745 static final private int[] jj_la1 = new int[127];
6746 static private int[] jj_la1_0;
6747 static private int[] jj_la1_1;
6748 static private int[] jj_la1_2;
6749 static private int[] jj_la1_3;
6750 static private int[] jj_la1_4;
6758 private static void jj_la1_0() {
6759 jj_la1_0 = new int[] {0xf960001e,0x6,0x6,0xf960001e,0x0,0xf9600000,0x0,0xc00000,0xc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x68000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x68000000,0x60000000,0x60000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x8000000,0x0,0x8000000,0x0,0x8000000,0x8000000,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x8000000,0x0,0x68000000,0x68000000,0x0,0x0,0x68000000,0x0,0x0,0x81000000,0xf9000000,0x8,0x6,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf9600010,0xf9600010,0xf9600000,0xe9600000,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x0,0xe9600010,0xe9600010,0x10000000,0x0,0x68000000,0xf9000010,0xf9000010,0x2000000,0x4000000,0xf9000010,0x2000000,0x4000000,0xf9000010,0xf9000010,0xf9000010,0xf9000010,0xf9000010,0xf9000000,0xf9000000,0x8000000,0x68000000,0x8000000,0xf9000000,0xf9000000,0x8000000,0x0,0x68000000,0x68000000,};
6761 private static void jj_la1_1() {
6762 jj_la1_1 = new int[] {0x875d507f,0x0,0x0,0x875d507f,0x0,0x875d507f,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3080000,0x200,0x30c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30c0000,0x30c0000,0x0,0x30c0000,0x0,0x30c0000,0x0,0x0,0x0,0x180,0x0,0x0,0x40000,0x0,0x180,0x40000,0x0,0x30c0000,0x30c0000,0x80,0x3080000,0x30c0000,0x0,0x0,0x8451507f,0x875d507f,0x0,0x0,0xf,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x0,0x0,0x0,0x0,0x40000,0x0,0x2400,0x2400,0x875d507f,0x875d507f,0x0,0x2400,0x30c0000,0x875d507f,0x875d507f,0x0,0x0,0x875d507f,0x0,0x0,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x40000,0x30c0000,0x40000,0x875d507f,0x875d507f,0x40000,0x0,0x30c0000,0x30c0000,};
6764 private static void jj_la1_2() {
6765 jj_la1_2 = new int[] {0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x13c1c00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x800,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,0x13c0c00,0x3c0c00,0x300000,0x3c0800,0xc0000,0x800,0x3fe,0xc0000,0xc0000,0x0,0x0,0x0,0x800,0x800,0x0,0x800,0xbfe,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,0xc0800,0x8000,0x0,0x0,0x13c1c00,0x13c1c00,0x0,0x0,0x13c1c00,0x13c1c00,0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x0,0x13c9c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c9c00,0xc0800,0x13c1c00,0xc0800,0x13c1c00,0x13c9c00,0xc0800,0x0,0x13c1c00,0x13c1c00,};
6767 private static void jj_la1_3() {
6768 jj_la1_3 = new int[] {0x2288a2,0x0,0x0,0x2288a2,0x200000,0x2288a2,0x0,0x0,0x0,0x400000,0x0,0x0,0x20000,0x0,0x20000,0x20800,0x22,0x22,0x8a2,0x0,0x88a2,0x400000,0x0,0x400000,0x0,0x0,0x0,0x0,0x88a2,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x800000,0x0,0x0,0x0,0xe4000000,0xe4000000,0x1b000000,0x1b000000,0x0,0x0,0x0,0x0,0x0,0x0,0x88a2,0x88a2,0x0,0x88a2,0x0,0x88a2,0x0,0x0,0x0,0x80000,0x8000,0x8000,0x800,0x800,0x80000,0x800,0x800,0x88a2,0x88a2,0x80000,0xa2,0x88a2,0x400000,0x0,0x220800,0x2288a2,0x0,0x0,0x0,0x0,0x400000,0x0,0x0,0x400000,0x400000,0x400000,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x400000,0x0,0x0,0x0,0x800,0x20000,0x0,0x0,0x2288a2,0x2288a2,0x0,0x0,0x88a2,0x2288a2,0x2288a2,0x0,0x0,0x2288a2,0x0,0x0,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x800,0x88a2,0x800,0x2288a2,0x2288a2,0x800,0x400000,0x88a2,0x88a2,};
6770 private static void jj_la1_4() {
6771 jj_la1_4 = new int[] {0x4000,0x0,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x2,0x2,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x0,0x3ffe,0x4000,0x0,0x0,0x3ffe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x4000,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x4000,0x0,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,};
6773 static final private JJCalls[] jj_2_rtns = new JJCalls[5];
6774 static private boolean jj_rescan = false;
6775 static private int jj_gc = 0;
6777 public PHPParser(java.io.InputStream stream) {
6778 if (jj_initialized_once) {
6779 System.out.println("ERROR: Second call to constructor of static parser. You must");
6780 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6781 System.out.println(" during parser generation.");
6784 jj_initialized_once = true;
6785 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6786 token_source = new PHPParserTokenManager(jj_input_stream);
6787 token = new Token();
6790 for (int i = 0; i < 127; i++) jj_la1[i] = -1;
6791 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6794 static public void ReInit(java.io.InputStream stream) {
6795 jj_input_stream.ReInit(stream, 1, 1);
6796 token_source.ReInit(jj_input_stream);
6797 token = new Token();
6800 for (int i = 0; i < 127; i++) jj_la1[i] = -1;
6801 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6804 public PHPParser(java.io.Reader stream) {
6805 if (jj_initialized_once) {
6806 System.out.println("ERROR: Second call to constructor of static parser. You must");
6807 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6808 System.out.println(" during parser generation.");
6811 jj_initialized_once = true;
6812 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6813 token_source = new PHPParserTokenManager(jj_input_stream);
6814 token = new Token();
6817 for (int i = 0; i < 127; i++) jj_la1[i] = -1;
6818 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6821 static public void ReInit(java.io.Reader stream) {
6822 jj_input_stream.ReInit(stream, 1, 1);
6823 token_source.ReInit(jj_input_stream);
6824 token = new Token();
6827 for (int i = 0; i < 127; i++) jj_la1[i] = -1;
6828 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6831 public PHPParser(PHPParserTokenManager tm) {
6832 if (jj_initialized_once) {
6833 System.out.println("ERROR: Second call to constructor of static parser. You must");
6834 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6835 System.out.println(" during parser generation.");
6838 jj_initialized_once = true;
6840 token = new Token();
6843 for (int i = 0; i < 127; i++) jj_la1[i] = -1;
6844 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6847 public void ReInit(PHPParserTokenManager tm) {
6849 token = new Token();
6852 for (int i = 0; i < 127; i++) jj_la1[i] = -1;
6853 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6856 static final private Token jj_consume_token(int kind) throws ParseException {
6858 if ((oldToken = token).next != null) token = token.next;
6859 else token = token.next = token_source.getNextToken();
6861 if (token.kind == kind) {
6863 if (++jj_gc > 100) {
6865 for (int i = 0; i < jj_2_rtns.length; i++) {
6866 JJCalls c = jj_2_rtns[i];
6868 if (c.gen < jj_gen) c.first = null;
6877 throw generateParseException();
6880 static final private boolean jj_scan_token(int kind) {
6881 if (jj_scanpos == jj_lastpos) {
6883 if (jj_scanpos.next == null) {
6884 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
6886 jj_lastpos = jj_scanpos = jj_scanpos.next;
6889 jj_scanpos = jj_scanpos.next;
6892 int i = 0; Token tok = token;
6893 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
6894 if (tok != null) jj_add_error_token(kind, i);
6896 return (jj_scanpos.kind != kind);
6899 static final public Token getNextToken() {
6900 if (token.next != null) token = token.next;
6901 else token = token.next = token_source.getNextToken();
6907 static final public Token getToken(int index) {
6908 Token t = lookingAhead ? jj_scanpos : token;
6909 for (int i = 0; i < index; i++) {
6910 if (t.next != null) t = t.next;
6911 else t = t.next = token_source.getNextToken();
6916 static final private int jj_ntk() {
6917 if ((jj_nt=token.next) == null)
6918 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
6920 return (jj_ntk = jj_nt.kind);
6923 static private java.util.Vector jj_expentries = new java.util.Vector();
6924 static private int[] jj_expentry;
6925 static private int jj_kind = -1;
6926 static private int[] jj_lasttokens = new int[100];
6927 static private int jj_endpos;
6929 static private void jj_add_error_token(int kind, int pos) {
6930 if (pos >= 100) return;
6931 if (pos == jj_endpos + 1) {
6932 jj_lasttokens[jj_endpos++] = kind;
6933 } else if (jj_endpos != 0) {
6934 jj_expentry = new int[jj_endpos];
6935 for (int i = 0; i < jj_endpos; i++) {
6936 jj_expentry[i] = jj_lasttokens[i];
6938 boolean exists = false;
6939 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
6940 int[] oldentry = (int[])(enum.nextElement());
6941 if (oldentry.length == jj_expentry.length) {
6943 for (int i = 0; i < jj_expentry.length; i++) {
6944 if (oldentry[i] != jj_expentry[i]) {
6952 if (!exists) jj_expentries.addElement(jj_expentry);
6953 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
6957 static public ParseException generateParseException() {
6958 jj_expentries.removeAllElements();
6959 boolean[] la1tokens = new boolean[143];
6960 for (int i = 0; i < 143; i++) {
6961 la1tokens[i] = false;
6964 la1tokens[jj_kind] = true;
6967 for (int i = 0; i < 127; i++) {
6968 if (jj_la1[i] == jj_gen) {
6969 for (int j = 0; j < 32; j++) {
6970 if ((jj_la1_0[i] & (1<<j)) != 0) {
6971 la1tokens[j] = true;
6973 if ((jj_la1_1[i] & (1<<j)) != 0) {
6974 la1tokens[32+j] = true;
6976 if ((jj_la1_2[i] & (1<<j)) != 0) {
6977 la1tokens[64+j] = true;
6979 if ((jj_la1_3[i] & (1<<j)) != 0) {
6980 la1tokens[96+j] = true;
6982 if ((jj_la1_4[i] & (1<<j)) != 0) {
6983 la1tokens[128+j] = true;
6988 for (int i = 0; i < 143; i++) {
6990 jj_expentry = new int[1];
6992 jj_expentries.addElement(jj_expentry);
6997 jj_add_error_token(0, 0);
6998 int[][] exptokseq = new int[jj_expentries.size()][];
6999 for (int i = 0; i < jj_expentries.size(); i++) {
7000 exptokseq[i] = (int[])jj_expentries.elementAt(i);
7002 return new ParseException(token, exptokseq, tokenImage);
7005 static final public void enable_tracing() {
7008 static final public void disable_tracing() {
7011 static final private void jj_rescan_token() {
7013 for (int i = 0; i < 5; i++) {
7014 JJCalls p = jj_2_rtns[i];
7016 if (p.gen > jj_gen) {
7017 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7019 case 0: jj_3_1(); break;
7020 case 1: jj_3_2(); break;
7021 case 2: jj_3_3(); break;
7022 case 3: jj_3_4(); break;
7023 case 4: jj_3_5(); break;
7027 } while (p != null);
7032 static final private void jj_save(int index, int xla) {
7033 JJCalls p = jj_2_rtns[index];
7034 while (p.gen > jj_gen) {
7035 if (p.next == null) { p = p.next = new JJCalls(); break; }
7038 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7041 static final class JJCalls {