1 /* Generated By:JavaCC: Do not edit this line. PHPParser.java */
4 import org.eclipse.core.resources.IFile;
5 import org.eclipse.core.resources.IMarker;
6 import org.eclipse.core.runtime.CoreException;
7 import org.eclipse.ui.texteditor.MarkerUtilities;
8 import org.eclipse.jface.preference.IPreferenceStore;
10 import java.util.Hashtable;
11 import java.util.ArrayList;
12 import java.io.StringReader;
14 import java.text.MessageFormat;
16 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
17 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
18 import net.sourceforge.phpdt.internal.compiler.ast.*;
19 import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
20 import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
21 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
25 * This php parser is inspired by the Java 1.2 grammar example
26 * given with JavaCC. You can get JavaCC at http://www.webgain.com
27 * You can test the parser with the PHPParserTestCase2.java
28 * @author Matthieu Casanova
29 * @version $Reference: 1.0$
31 public final class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
33 /** The file that is parsed. */
34 private static IFile fileToParse;
36 /** The current segment. */
37 private static OutlineableWithChildren currentSegment;
39 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
40 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
41 static PHPOutlineInfo outlineInfo;
43 /** The error level of the current ParseException. */
44 private static int errorLevel = ERROR;
45 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
46 private static String errorMessage;
48 private static int errorStart = -1;
49 private static int errorEnd = -1;
50 private static PHPDocument phpDocument;
52 private static final char[] SYNTAX_ERROR_CHAR = {'s','y','n','t','a','x',' ','e','r','r','o','r'};
54 * The point where html starts.
55 * It will be used by the token manager to create HTMLCode objects
57 public static int htmlStart;
60 private final static int AstStackIncrement = 100;
61 /** The stack of node. */
62 private static AstNode[] nodes;
63 /** The cursor in expression stack. */
64 private static int nodePtr;
66 public final void setFileToParse(final IFile fileToParse) {
67 this.fileToParse = fileToParse;
73 public PHPParser(final IFile fileToParse) {
74 this(new StringReader(""));
75 this.fileToParse = fileToParse;
79 * Reinitialize the parser.
81 private static final void init() {
82 nodes = new AstNode[AstStackIncrement];
88 * Add an php node on the stack.
89 * @param node the node that will be added to the stack
91 private static final void pushOnAstNodes(final AstNode node) {
93 nodes[++nodePtr] = node;
94 } catch (IndexOutOfBoundsException e) {
95 final int oldStackLength = nodes.length;
96 final AstNode[] oldStack = nodes;
97 nodes = new AstNode[oldStackLength + AstStackIncrement];
98 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
99 nodePtr = oldStackLength;
100 nodes[nodePtr] = node;
104 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
105 phpDocument = new PHPDocument(parent,"_root".toCharArray());
106 currentSegment = phpDocument;
107 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
108 final StringReader stream = new StringReader(s);
109 if (jj_input_stream == null) {
110 jj_input_stream = new SimpleCharStream(stream, 1, 1);
116 phpDocument.nodes = new AstNode[nodes.length];
117 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
118 if (PHPeclipsePlugin.DEBUG) {
119 PHPeclipsePlugin.log(1,phpDocument.toString());
121 } catch (ParseException e) {
122 processParseException(e);
128 * This method will process the parse exception.
129 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
130 * @param e the ParseException
132 private static void processParseException(final ParseException e) {
133 if (errorMessage == null) {
134 PHPeclipsePlugin.log(e);
135 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
136 errorStart = SimpleCharStream.getPosition();
137 errorEnd = errorStart + 1;
144 * Create marker for the parse error
145 * @param e the ParseException
147 private static void setMarker(final ParseException e) {
149 if (errorStart == -1) {
150 setMarker(fileToParse,
152 SimpleCharStream.tokenBegin,
153 SimpleCharStream.tokenBegin + e.currentToken.image.length(),
155 "Line " + e.currentToken.beginLine);
157 setMarker(fileToParse,
162 "Line " + e.currentToken.beginLine);
166 } catch (CoreException e2) {
167 PHPeclipsePlugin.log(e2);
171 private static void scanLine(final String output,
174 final int brIndx) throws CoreException {
176 StringBuffer lineNumberBuffer = new StringBuffer(10);
178 current = output.substring(indx, brIndx);
180 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
181 int onLine = current.indexOf("on line <b>");
183 lineNumberBuffer.delete(0, lineNumberBuffer.length());
184 for (int i = onLine; i < current.length(); i++) {
185 ch = current.charAt(i);
186 if ('0' <= ch && '9' >= ch) {
187 lineNumberBuffer.append(ch);
191 int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
193 Hashtable attributes = new Hashtable();
195 current = current.replaceAll("\n", "");
196 current = current.replaceAll("<b>", "");
197 current = current.replaceAll("</b>", "");
198 MarkerUtilities.setMessage(attributes, current);
200 if (current.indexOf(PARSE_ERROR_STRING) != -1)
201 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
202 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
203 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
205 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
206 MarkerUtilities.setLineNumber(attributes, lineNumber);
207 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
212 public final void parse(final String s) throws CoreException {
213 final StringReader stream = new StringReader(s);
214 if (jj_input_stream == null) {
215 jj_input_stream = new SimpleCharStream(stream, 1, 1);
221 } catch (ParseException e) {
222 processParseException(e);
227 * Call the php parse command ( php -l -f <filename> )
228 * and create markers according to the external parser output
230 public static void phpExternalParse(final IFile file) {
231 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
232 final String filename = file.getLocation().toString();
234 final String[] arguments = { filename };
235 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
236 final String command = form.format(arguments);
238 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
241 // parse the buffer to find the errors and warnings
242 createMarkers(parserResult, file);
243 } catch (CoreException e) {
244 PHPeclipsePlugin.log(e);
249 * Put a new html block in the stack.
251 public static final void createNewHTMLCode() {
252 final int currentPosition = SimpleCharStream.getPosition();
253 if (currentPosition == htmlStart || currentPosition > SimpleCharStream.currentBuffer.length()) {
256 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray();
257 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
263 public static final void createNewTask() {
264 final int currentPosition = SimpleCharStream.getPosition();
265 final String todo = SimpleCharStream.currentBuffer.substring(currentPosition+1,
266 SimpleCharStream.currentBuffer.indexOf("\n",
269 setMarker(fileToParse,
271 SimpleCharStream.getBeginLine(),
273 "Line "+SimpleCharStream.getBeginLine());
274 } catch (CoreException e) {
275 PHPeclipsePlugin.log(e);
279 private static final void parse() throws ParseException {
283 static final public void phpFile() throws ParseException {
287 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
326 case INTEGER_LITERAL:
327 case FLOATING_POINT_LITERAL:
342 PHPParser.createNewHTMLCode();
343 } catch (TokenMgrError e) {
344 PHPeclipsePlugin.log(e);
345 errorStart = SimpleCharStream.getPosition();
346 errorEnd = errorStart + 1;
347 errorMessage = e.getMessage();
349 {if (true) throw generateParseException();}
354 * A php block is a <?= expression [;]?>
355 * or <?php somephpcode ?>
356 * or <? somephpcode ?>
358 static final public void PhpBlock() throws ParseException {
359 final int start = SimpleCharStream.getPosition();
360 final PHPEchoBlock phpEchoBlock;
361 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
363 phpEchoBlock = phpEchoBlock();
364 pushOnAstNodes(phpEchoBlock);
403 case INTEGER_LITERAL:
404 case FLOATING_POINT_LITERAL:
411 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
414 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
416 jj_consume_token(PHPSTARTLONG);
419 jj_consume_token(PHPSTARTSHORT);
421 setMarker(fileToParse,
422 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
424 SimpleCharStream.getPosition(),
426 "Line " + token.beginLine);
427 } catch (CoreException e) {
428 PHPeclipsePlugin.log(e);
433 jj_consume_token(-1);
434 throw new ParseException();
443 jj_consume_token(PHPEND);
444 } catch (ParseException e) {
445 errorMessage = "'?>' expected";
447 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
448 errorEnd = SimpleCharStream.getPosition() + 1;
449 processParseException(e);
454 jj_consume_token(-1);
455 throw new ParseException();
459 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
460 final Expression expr;
461 final int pos = SimpleCharStream.getPosition();
462 final PHPEchoBlock echoBlock;
463 jj_consume_token(PHPECHOSTART);
465 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
467 jj_consume_token(SEMICOLON);
473 jj_consume_token(PHPEND);
474 echoBlock = new PHPEchoBlock(expr,pos,SimpleCharStream.getPosition());
475 pushOnAstNodes(echoBlock);
476 {if (true) return echoBlock;}
477 throw new Error("Missing return statement in function");
480 static final public void Php() throws ParseException {
483 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
518 case INTEGER_LITERAL:
519 case FLOATING_POINT_LITERAL:
536 static final public ClassDeclaration ClassDeclaration() throws ParseException {
537 final ClassDeclaration classDeclaration;
538 final Token className,superclassName;
540 char[] classNameImage = SYNTAX_ERROR_CHAR;
541 char[] superclassNameImage = null;
542 jj_consume_token(CLASS);
543 pos = SimpleCharStream.getPosition();
545 className = jj_consume_token(IDENTIFIER);
546 classNameImage = className.image.toCharArray();
547 } catch (ParseException e) {
548 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
550 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
551 errorEnd = SimpleCharStream.getPosition() + 1;
552 processParseException(e);
554 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
556 jj_consume_token(EXTENDS);
558 superclassName = jj_consume_token(IDENTIFIER);
559 superclassNameImage = superclassName.image.toCharArray();
560 } catch (ParseException e) {
561 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
563 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
564 errorEnd = SimpleCharStream.getPosition() + 1;
565 processParseException(e);
566 superclassNameImage = SYNTAX_ERROR_CHAR;
573 if (superclassNameImage == null) {
574 classDeclaration = new ClassDeclaration(currentSegment,
579 classDeclaration = new ClassDeclaration(currentSegment,
585 currentSegment.add(classDeclaration);
586 currentSegment = classDeclaration;
587 ClassBody(classDeclaration);
588 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
589 classDeclaration.sourceEnd = SimpleCharStream.getPosition();
590 pushOnAstNodes(classDeclaration);
591 {if (true) return classDeclaration;}
592 throw new Error("Missing return statement in function");
595 static final public void ClassBody(final ClassDeclaration classDeclaration) throws ParseException {
597 jj_consume_token(LBRACE);
598 } catch (ParseException e) {
599 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "', '{' expected";
601 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
602 errorEnd = SimpleCharStream.getPosition() + 1;
607 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
616 ClassBodyDeclaration(classDeclaration);
619 jj_consume_token(RBRACE);
620 } catch (ParseException e) {
621 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', 'var', 'function' or '}' expected";
623 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
624 errorEnd = SimpleCharStream.getPosition() + 1;
630 * A class can contain only methods and fields.
632 static final public void ClassBodyDeclaration(final ClassDeclaration classDeclaration) throws ParseException {
633 final MethodDeclaration method;
634 final FieldDeclaration field;
635 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
637 method = MethodDeclaration();
638 classDeclaration.addMethod(method);
641 field = FieldDeclaration();
642 classDeclaration.addField(field);
646 jj_consume_token(-1);
647 throw new ParseException();
652 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
654 static final public FieldDeclaration FieldDeclaration() throws ParseException {
655 VariableDeclaration variableDeclaration;
656 final VariableDeclaration[] list;
657 final ArrayList arrayList = new ArrayList();
658 final int pos = SimpleCharStream.getPosition();
659 jj_consume_token(VAR);
660 variableDeclaration = VariableDeclarator();
661 arrayList.add(variableDeclaration);
662 outlineInfo.addVariable(new String(variableDeclaration.name));
665 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
673 jj_consume_token(COMMA);
674 variableDeclaration = VariableDeclarator();
675 arrayList.add(variableDeclaration);
676 outlineInfo.addVariable(new String(variableDeclaration.name));
679 jj_consume_token(SEMICOLON);
680 } catch (ParseException e) {
681 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
683 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
684 errorEnd = SimpleCharStream.getPosition() + 1;
685 processParseException(e);
687 list = new VariableDeclaration[arrayList.size()];
688 arrayList.toArray(list);
689 {if (true) return new FieldDeclaration(list,
691 SimpleCharStream.getPosition(),
693 throw new Error("Missing return statement in function");
696 static final public VariableDeclaration VariableDeclarator() throws ParseException {
697 final String varName;
698 Expression initializer = null;
699 final int pos = SimpleCharStream.getPosition();
700 varName = VariableDeclaratorId();
701 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
703 jj_consume_token(ASSIGN);
705 initializer = VariableInitializer();
706 } catch (ParseException e) {
707 errorMessage = "Literal expression expected in variable initializer";
709 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
710 errorEnd = SimpleCharStream.getPosition() + 1;
718 if (initializer == null) {
719 {if (true) return new VariableDeclaration(currentSegment,
720 varName.toCharArray(),
722 SimpleCharStream.getPosition());}
724 {if (true) return new VariableDeclaration(currentSegment,
725 varName.toCharArray(),
728 throw new Error("Missing return statement in function");
733 * @return the variable name (with suffix)
735 static final public String VariableDeclaratorId() throws ParseException {
737 Expression expression = null;
738 final int pos = SimpleCharStream.getPosition();
739 ConstantIdentifier ex;
749 ex = new ConstantIdentifier(expr.toCharArray(),
751 SimpleCharStream.getPosition());
752 expression = VariableSuffix(ex);
754 if (expression == null) {
755 {if (true) return expr;}
757 {if (true) return expression.toStringExpression();}
758 } catch (ParseException e) {
759 errorMessage = "'$' expected for variable identifier";
761 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
762 errorEnd = SimpleCharStream.getPosition() + 1;
765 throw new Error("Missing return statement in function");
769 * Return a variablename without the $.
770 * @return a variable name
772 static final public String Variable() throws ParseException {
773 final StringBuffer buff;
774 Expression expression = null;
777 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
779 token = jj_consume_token(DOLLAR_ID);
780 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
782 jj_consume_token(LBRACE);
783 expression = Expression();
784 jj_consume_token(RBRACE);
790 if (expression == null) {
791 {if (true) return token.image.substring(1);}
793 buff = new StringBuffer(token.image);
795 buff.append(expression.toStringExpression());
797 {if (true) return buff.toString();}
800 jj_consume_token(DOLLAR);
801 expr = VariableName();
802 {if (true) return expr;}
806 jj_consume_token(-1);
807 throw new ParseException();
809 throw new Error("Missing return statement in function");
813 * A Variable name (without the $)
814 * @return a variable name String
816 static final public String VariableName() throws ParseException {
817 final StringBuffer buff;
819 Expression expression = null;
821 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
823 jj_consume_token(LBRACE);
824 expression = Expression();
825 jj_consume_token(RBRACE);
826 buff = new StringBuffer("{");
827 buff.append(expression.toStringExpression());
829 {if (true) return buff.toString();}
832 token = jj_consume_token(IDENTIFIER);
833 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
835 jj_consume_token(LBRACE);
836 expression = Expression();
837 jj_consume_token(RBRACE);
843 if (expression == null) {
844 {if (true) return token.image;}
846 buff = new StringBuffer(token.image);
848 buff.append(expression.toStringExpression());
850 {if (true) return buff.toString();}
853 jj_consume_token(DOLLAR);
854 expr = VariableName();
855 buff = new StringBuffer("$");
857 {if (true) return buff.toString();}
860 token = jj_consume_token(DOLLAR_ID);
861 {if (true) return token.image;}
865 jj_consume_token(-1);
866 throw new ParseException();
868 throw new Error("Missing return statement in function");
871 static final public Expression VariableInitializer() throws ParseException {
872 final Expression expr;
874 final int pos = SimpleCharStream.getPosition();
875 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
879 case INTEGER_LITERAL:
880 case FLOATING_POINT_LITERAL:
883 {if (true) return expr;}
886 jj_consume_token(MINUS);
887 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
888 case INTEGER_LITERAL:
889 token = jj_consume_token(INTEGER_LITERAL);
891 case FLOATING_POINT_LITERAL:
892 token = jj_consume_token(FLOATING_POINT_LITERAL);
896 jj_consume_token(-1);
897 throw new ParseException();
899 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
901 SimpleCharStream.getPosition()),
906 jj_consume_token(PLUS);
907 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
908 case INTEGER_LITERAL:
909 token = jj_consume_token(INTEGER_LITERAL);
911 case FLOATING_POINT_LITERAL:
912 token = jj_consume_token(FLOATING_POINT_LITERAL);
916 jj_consume_token(-1);
917 throw new ParseException();
919 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
921 SimpleCharStream.getPosition()),
926 expr = ArrayDeclarator();
927 {if (true) return expr;}
930 token = jj_consume_token(IDENTIFIER);
931 {if (true) return new ConstantIdentifier(token.image.toCharArray(),pos,SimpleCharStream.getPosition());}
935 jj_consume_token(-1);
936 throw new ParseException();
938 throw new Error("Missing return statement in function");
941 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
942 final Expression expr,expr2;
944 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
946 jj_consume_token(ARRAYASSIGN);
947 expr2 = Expression();
948 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
954 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
955 throw new Error("Missing return statement in function");
958 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
959 ArrayVariableDeclaration expr;
960 final ArrayList list = new ArrayList();
961 jj_consume_token(LPAREN);
962 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
978 case INTEGER_LITERAL:
979 case FLOATING_POINT_LITERAL:
984 expr = ArrayVariable();
993 jj_consume_token(COMMA);
994 expr = ArrayVariable();
1002 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1004 jj_consume_token(COMMA);
1008 jj_la1[20] = jj_gen;
1011 jj_consume_token(RPAREN);
1012 final ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1014 {if (true) return vars;}
1015 throw new Error("Missing return statement in function");
1019 * A Method Declaration.
1020 * <b>function</b> MetodDeclarator() Block()
1022 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1023 final MethodDeclaration functionDeclaration;
1025 final OutlineableWithChildren seg = currentSegment;
1026 jj_consume_token(FUNCTION);
1028 functionDeclaration = MethodDeclarator();
1029 outlineInfo.addVariable(new String(functionDeclaration.name));
1030 } catch (ParseException e) {
1031 if (errorMessage != null) {if (true) throw e;}
1032 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1034 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1035 errorEnd = SimpleCharStream.getPosition() + 1;
1036 {if (true) throw e;}
1038 currentSegment = functionDeclaration;
1040 functionDeclaration.statements = block.statements;
1041 currentSegment = seg;
1042 {if (true) return functionDeclaration;}
1043 throw new Error("Missing return statement in function");
1047 * A MethodDeclarator.
1048 * [&] IDENTIFIER(parameters ...).
1049 * @return a function description for the outline
1051 static final public MethodDeclaration MethodDeclarator() throws ParseException {
1052 final Token identifier;
1053 Token reference = null;
1054 final Hashtable formalParameters;
1055 final int pos = SimpleCharStream.getPosition();
1056 char[] identifierChar = SYNTAX_ERROR_CHAR;
1057 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1059 reference = jj_consume_token(BIT_AND);
1062 jj_la1[21] = jj_gen;
1066 identifier = jj_consume_token(IDENTIFIER);
1067 identifierChar = identifier.image.toCharArray();
1068 } catch (ParseException e) {
1069 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1071 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1072 errorEnd = SimpleCharStream.getPosition() + 1;
1073 processParseException(e);
1075 formalParameters = FormalParameters();
1076 {if (true) return new MethodDeclaration(currentSegment,
1081 SimpleCharStream.getPosition());}
1082 throw new Error("Missing return statement in function");
1086 * FormalParameters follows method identifier.
1087 * (FormalParameter())
1089 static final public Hashtable FormalParameters() throws ParseException {
1090 VariableDeclaration var;
1091 final Hashtable parameters = new Hashtable();
1093 jj_consume_token(LPAREN);
1094 } catch (ParseException e) {
1095 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1097 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1098 errorEnd = SimpleCharStream.getPosition() + 1;
1099 processParseException(e);
1101 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1105 var = FormalParameter();
1106 parameters.put(new String(var.name),var);
1109 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1114 jj_la1[22] = jj_gen;
1117 jj_consume_token(COMMA);
1118 var = FormalParameter();
1119 parameters.put(new String(var.name),var);
1123 jj_la1[23] = jj_gen;
1127 jj_consume_token(RPAREN);
1128 } catch (ParseException e) {
1129 errorMessage = "')' expected";
1131 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1132 errorEnd = SimpleCharStream.getPosition() + 1;
1133 processParseException(e);
1135 {if (true) return parameters;}
1136 throw new Error("Missing return statement in function");
1140 * A formal parameter.
1141 * $varname[=value] (,$varname[=value])
1143 static final public VariableDeclaration FormalParameter() throws ParseException {
1144 final VariableDeclaration variableDeclaration;
1146 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1148 token = jj_consume_token(BIT_AND);
1151 jj_la1[24] = jj_gen;
1154 variableDeclaration = VariableDeclarator();
1155 if (token != null) {
1156 variableDeclaration.setReference(true);
1158 {if (true) return variableDeclaration;}
1159 throw new Error("Missing return statement in function");
1162 static final public ConstantIdentifier Type() throws ParseException {
1164 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1166 jj_consume_token(STRING);
1167 pos = SimpleCharStream.getPosition();
1168 {if (true) return new ConstantIdentifier(Types.STRING,pos,pos-6);}
1171 jj_consume_token(BOOL);
1172 pos = SimpleCharStream.getPosition();
1173 {if (true) return new ConstantIdentifier(Types.BOOL,pos,pos-4);}
1176 jj_consume_token(BOOLEAN);
1177 pos = SimpleCharStream.getPosition();
1178 {if (true) return new ConstantIdentifier(Types.BOOLEAN,pos,pos-7);}
1181 jj_consume_token(REAL);
1182 pos = SimpleCharStream.getPosition();
1183 {if (true) return new ConstantIdentifier(Types.REAL,pos,pos-4);}
1186 jj_consume_token(DOUBLE);
1187 pos = SimpleCharStream.getPosition();
1188 {if (true) return new ConstantIdentifier(Types.DOUBLE,pos,pos-5);}
1191 jj_consume_token(FLOAT);
1192 pos = SimpleCharStream.getPosition();
1193 {if (true) return new ConstantIdentifier(Types.FLOAT,pos,pos-5);}
1196 jj_consume_token(INT);
1197 pos = SimpleCharStream.getPosition();
1198 {if (true) return new ConstantIdentifier(Types.INT,pos,pos-3);}
1201 jj_consume_token(INTEGER);
1202 pos = SimpleCharStream.getPosition();
1203 {if (true) return new ConstantIdentifier(Types.INTEGER,pos,pos-7);}
1206 jj_consume_token(OBJECT);
1207 pos = SimpleCharStream.getPosition();
1208 {if (true) return new ConstantIdentifier(Types.OBJECT,pos,pos-6);}
1211 jj_la1[25] = jj_gen;
1212 jj_consume_token(-1);
1213 throw new ParseException();
1215 throw new Error("Missing return statement in function");
1218 static final public Expression Expression() throws ParseException {
1219 final Expression expr;
1220 final int pos = SimpleCharStream.getPosition();
1221 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1223 jj_consume_token(BANG);
1224 expr = Expression();
1225 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1241 case INTEGER_LITERAL:
1242 case FLOATING_POINT_LITERAL:
1243 case STRING_LITERAL:
1247 expr = ExpressionNoBang();
1248 {if (true) return expr;}
1251 jj_la1[26] = jj_gen;
1252 jj_consume_token(-1);
1253 throw new ParseException();
1255 throw new Error("Missing return statement in function");
1258 static final public Expression ExpressionNoBang() throws ParseException {
1259 final Expression expr;
1260 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1262 expr = PrintExpression();
1263 {if (true) return expr;}
1266 expr = ListExpression();
1267 {if (true) return expr;}
1270 jj_la1[27] = jj_gen;
1271 if (jj_2_3(2147483647)) {
1272 expr = varAssignation();
1273 {if (true) return expr;}
1275 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1288 case INTEGER_LITERAL:
1289 case FLOATING_POINT_LITERAL:
1290 case STRING_LITERAL:
1294 expr = ConditionalExpression();
1295 {if (true) return expr;}
1298 jj_la1[28] = jj_gen;
1299 jj_consume_token(-1);
1300 throw new ParseException();
1304 throw new Error("Missing return statement in function");
1308 * A Variable assignation.
1309 * varName (an assign operator) any expression
1311 static final public VarAssignation varAssignation() throws ParseException {
1312 final String varName;
1313 final Expression initializer;
1314 final int assignOperator;
1315 final int pos = SimpleCharStream.getPosition();
1316 varName = VariableDeclaratorId();
1317 assignOperator = AssignmentOperator();
1319 initializer = Expression();
1320 } catch (ParseException e) {
1321 if (errorMessage != null) {
1322 {if (true) throw e;}
1324 errorMessage = "expression expected";
1326 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1327 errorEnd = SimpleCharStream.getPosition() + 1;
1328 {if (true) throw e;}
1330 {if (true) return new VarAssignation(varName.toCharArray(),
1334 SimpleCharStream.getPosition());}
1335 throw new Error("Missing return statement in function");
1338 static final public int AssignmentOperator() throws ParseException {
1339 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1341 jj_consume_token(ASSIGN);
1342 {if (true) return VarAssignation.EQUAL;}
1345 jj_consume_token(STARASSIGN);
1346 {if (true) return VarAssignation.STAR_EQUAL;}
1349 jj_consume_token(SLASHASSIGN);
1350 {if (true) return VarAssignation.SLASH_EQUAL;}
1353 jj_consume_token(REMASSIGN);
1354 {if (true) return VarAssignation.REM_EQUAL;}
1357 jj_consume_token(PLUSASSIGN);
1358 {if (true) return VarAssignation.PLUS_EQUAL;}
1361 jj_consume_token(MINUSASSIGN);
1362 {if (true) return VarAssignation.MINUS_EQUAL;}
1365 jj_consume_token(LSHIFTASSIGN);
1366 {if (true) return VarAssignation.LSHIFT_EQUAL;}
1368 case RSIGNEDSHIFTASSIGN:
1369 jj_consume_token(RSIGNEDSHIFTASSIGN);
1370 {if (true) return VarAssignation.RSIGNEDSHIFT_EQUAL;}
1373 jj_consume_token(ANDASSIGN);
1374 {if (true) return VarAssignation.AND_EQUAL;}
1377 jj_consume_token(XORASSIGN);
1378 {if (true) return VarAssignation.XOR_EQUAL;}
1381 jj_consume_token(ORASSIGN);
1382 {if (true) return VarAssignation.OR_EQUAL;}
1385 jj_consume_token(DOTASSIGN);
1386 {if (true) return VarAssignation.DOT_EQUAL;}
1389 jj_consume_token(TILDEEQUAL);
1390 {if (true) return VarAssignation.TILDE_EQUAL;}
1393 jj_la1[29] = jj_gen;
1394 jj_consume_token(-1);
1395 throw new ParseException();
1397 throw new Error("Missing return statement in function");
1400 static final public Expression ConditionalExpression() throws ParseException {
1401 final Expression expr;
1402 Expression expr2 = null;
1403 Expression expr3 = null;
1404 expr = ConditionalOrExpression();
1405 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1407 jj_consume_token(HOOK);
1408 expr2 = Expression();
1409 jj_consume_token(COLON);
1410 expr3 = ConditionalExpression();
1413 jj_la1[30] = jj_gen;
1416 if (expr3 == null) {
1417 {if (true) return expr;}
1419 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1420 throw new Error("Missing return statement in function");
1423 static final public Expression ConditionalOrExpression() throws ParseException {
1424 Expression expr,expr2;
1426 expr = ConditionalAndExpression();
1429 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1435 jj_la1[31] = jj_gen;
1438 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1440 jj_consume_token(OR_OR);
1441 operator = OperatorIds.OR_OR;
1444 jj_consume_token(_ORL);
1445 operator = OperatorIds.ORL;
1448 jj_la1[32] = jj_gen;
1449 jj_consume_token(-1);
1450 throw new ParseException();
1452 expr2 = ConditionalAndExpression();
1453 expr = new BinaryExpression(expr,expr2,operator);
1455 {if (true) return expr;}
1456 throw new Error("Missing return statement in function");
1459 static final public Expression ConditionalAndExpression() throws ParseException {
1460 Expression expr,expr2;
1462 expr = ConcatExpression();
1465 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1471 jj_la1[33] = jj_gen;
1474 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1476 jj_consume_token(AND_AND);
1477 operator = OperatorIds.AND_AND;
1480 jj_consume_token(_ANDL);
1481 operator = OperatorIds.ANDL;
1484 jj_la1[34] = jj_gen;
1485 jj_consume_token(-1);
1486 throw new ParseException();
1488 expr2 = ConcatExpression();
1489 expr = new BinaryExpression(expr,expr2,operator);
1491 {if (true) return expr;}
1492 throw new Error("Missing return statement in function");
1495 static final public Expression ConcatExpression() throws ParseException {
1496 Expression expr,expr2;
1497 expr = InclusiveOrExpression();
1500 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1505 jj_la1[35] = jj_gen;
1508 jj_consume_token(DOT);
1509 expr2 = InclusiveOrExpression();
1510 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1512 {if (true) return expr;}
1513 throw new Error("Missing return statement in function");
1516 static final public Expression InclusiveOrExpression() throws ParseException {
1517 Expression expr,expr2;
1518 expr = ExclusiveOrExpression();
1521 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1526 jj_la1[36] = jj_gen;
1529 jj_consume_token(BIT_OR);
1530 expr2 = ExclusiveOrExpression();
1531 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1533 {if (true) return expr;}
1534 throw new Error("Missing return statement in function");
1537 static final public Expression ExclusiveOrExpression() throws ParseException {
1538 Expression expr,expr2;
1539 expr = AndExpression();
1542 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1547 jj_la1[37] = jj_gen;
1550 jj_consume_token(XOR);
1551 expr2 = AndExpression();
1552 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1554 {if (true) return expr;}
1555 throw new Error("Missing return statement in function");
1558 static final public Expression AndExpression() throws ParseException {
1559 Expression expr,expr2;
1560 expr = EqualityExpression();
1563 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1568 jj_la1[38] = jj_gen;
1571 jj_consume_token(BIT_AND);
1572 expr2 = EqualityExpression();
1573 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1575 {if (true) return expr;}
1576 throw new Error("Missing return statement in function");
1579 static final public Expression EqualityExpression() throws ParseException {
1580 Expression expr,expr2;
1582 expr = RelationalExpression();
1585 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1589 case BANGDOUBLEEQUAL:
1594 jj_la1[39] = jj_gen;
1597 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1599 jj_consume_token(EQUAL_EQUAL);
1600 operator = OperatorIds.EQUAL_EQUAL;
1603 jj_consume_token(DIF);
1604 operator = OperatorIds.DIF;
1607 jj_consume_token(NOT_EQUAL);
1608 operator = OperatorIds.DIF;
1610 case BANGDOUBLEEQUAL:
1611 jj_consume_token(BANGDOUBLEEQUAL);
1612 operator = OperatorIds.BANG_EQUAL_EQUAL;
1615 jj_consume_token(TRIPLEEQUAL);
1616 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1619 jj_la1[40] = jj_gen;
1620 jj_consume_token(-1);
1621 throw new ParseException();
1624 expr2 = RelationalExpression();
1625 } catch (ParseException e) {
1626 if (errorMessage != null) {
1627 {if (true) throw e;}
1629 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1631 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1632 errorEnd = SimpleCharStream.getPosition() + 1;
1633 {if (true) throw e;}
1635 expr = new BinaryExpression(expr,expr2,operator);
1637 {if (true) return expr;}
1638 throw new Error("Missing return statement in function");
1641 static final public Expression RelationalExpression() throws ParseException {
1642 Expression expr,expr2;
1644 expr = ShiftExpression();
1647 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1655 jj_la1[41] = jj_gen;
1658 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1660 jj_consume_token(LT);
1661 operator = OperatorIds.LESS;
1664 jj_consume_token(GT);
1665 operator = OperatorIds.GREATER;
1668 jj_consume_token(LE);
1669 operator = OperatorIds.LESS_EQUAL;
1672 jj_consume_token(GE);
1673 operator = OperatorIds.GREATER_EQUAL;
1676 jj_la1[42] = jj_gen;
1677 jj_consume_token(-1);
1678 throw new ParseException();
1680 expr2 = ShiftExpression();
1681 expr = new BinaryExpression(expr,expr2,operator);
1683 {if (true) return expr;}
1684 throw new Error("Missing return statement in function");
1687 static final public Expression ShiftExpression() throws ParseException {
1688 Expression expr,expr2;
1690 expr = AdditiveExpression();
1693 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1696 case RUNSIGNEDSHIFT:
1700 jj_la1[43] = jj_gen;
1703 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1705 jj_consume_token(LSHIFT);
1706 operator = OperatorIds.LEFT_SHIFT;
1709 jj_consume_token(RSIGNEDSHIFT);
1710 operator = OperatorIds.RIGHT_SHIFT;
1712 case RUNSIGNEDSHIFT:
1713 jj_consume_token(RUNSIGNEDSHIFT);
1714 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1717 jj_la1[44] = jj_gen;
1718 jj_consume_token(-1);
1719 throw new ParseException();
1721 expr2 = AdditiveExpression();
1722 expr = new BinaryExpression(expr,expr2,operator);
1724 {if (true) return expr;}
1725 throw new Error("Missing return statement in function");
1728 static final public Expression AdditiveExpression() throws ParseException {
1729 Expression expr,expr2;
1731 expr = MultiplicativeExpression();
1734 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1740 jj_la1[45] = jj_gen;
1743 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1745 jj_consume_token(PLUS);
1746 operator = OperatorIds.PLUS;
1749 jj_consume_token(MINUS);
1750 operator = OperatorIds.MINUS;
1753 jj_la1[46] = jj_gen;
1754 jj_consume_token(-1);
1755 throw new ParseException();
1757 expr2 = MultiplicativeExpression();
1758 expr = new BinaryExpression(expr,expr2,operator);
1760 {if (true) return expr;}
1761 throw new Error("Missing return statement in function");
1764 static final public Expression MultiplicativeExpression() throws ParseException {
1765 Expression expr,expr2;
1768 expr = UnaryExpression();
1769 } catch (ParseException e) {
1770 if (errorMessage != null) {if (true) throw e;}
1771 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1773 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1774 errorEnd = SimpleCharStream.getPosition() + 1;
1775 {if (true) throw e;}
1779 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1786 jj_la1[47] = jj_gen;
1789 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1791 jj_consume_token(STAR);
1792 operator = OperatorIds.MULTIPLY;
1795 jj_consume_token(SLASH);
1796 operator = OperatorIds.DIVIDE;
1799 jj_consume_token(REMAINDER);
1800 operator = OperatorIds.REMAINDER;
1803 jj_la1[48] = jj_gen;
1804 jj_consume_token(-1);
1805 throw new ParseException();
1807 expr2 = UnaryExpression();
1808 expr = new BinaryExpression(expr,expr2,operator);
1810 {if (true) return expr;}
1811 throw new Error("Missing return statement in function");
1815 * An unary expression starting with @, & or nothing
1817 static final public Expression UnaryExpression() throws ParseException {
1818 final Expression expr;
1819 final int pos = SimpleCharStream.getPosition();
1820 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1822 jj_consume_token(BIT_AND);
1823 expr = UnaryExpressionNoPrefix();
1824 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1837 case INTEGER_LITERAL:
1838 case FLOATING_POINT_LITERAL:
1839 case STRING_LITERAL:
1843 expr = AtUnaryExpression();
1844 {if (true) return expr;}
1847 jj_la1[49] = jj_gen;
1848 jj_consume_token(-1);
1849 throw new ParseException();
1851 throw new Error("Missing return statement in function");
1854 static final public Expression AtUnaryExpression() throws ParseException {
1855 final Expression expr;
1856 final int pos = SimpleCharStream.getPosition();
1857 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1859 jj_consume_token(AT);
1860 expr = AtUnaryExpression();
1861 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,pos);}
1873 case INTEGER_LITERAL:
1874 case FLOATING_POINT_LITERAL:
1875 case STRING_LITERAL:
1879 expr = UnaryExpressionNoPrefix();
1880 {if (true) return expr;}
1883 jj_la1[50] = jj_gen;
1884 jj_consume_token(-1);
1885 throw new ParseException();
1887 throw new Error("Missing return statement in function");
1890 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
1891 final Expression expr;
1893 final int pos = SimpleCharStream.getPosition();
1894 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1897 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1899 jj_consume_token(PLUS);
1900 operator = OperatorIds.PLUS;
1903 jj_consume_token(MINUS);
1904 operator = OperatorIds.MINUS;
1907 jj_la1[51] = jj_gen;
1908 jj_consume_token(-1);
1909 throw new ParseException();
1911 expr = UnaryExpression();
1912 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1916 expr = PreIncDecExpression();
1917 {if (true) return expr;}
1925 case INTEGER_LITERAL:
1926 case FLOATING_POINT_LITERAL:
1927 case STRING_LITERAL:
1931 expr = UnaryExpressionNotPlusMinus();
1932 {if (true) return expr;}
1935 jj_la1[52] = jj_gen;
1936 jj_consume_token(-1);
1937 throw new ParseException();
1939 throw new Error("Missing return statement in function");
1942 static final public Expression PreIncDecExpression() throws ParseException {
1943 final Expression expr;
1945 final int pos = SimpleCharStream.getPosition();
1946 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1948 jj_consume_token(PLUS_PLUS);
1949 operator = OperatorIds.PLUS_PLUS;
1952 jj_consume_token(MINUS_MINUS);
1953 operator = OperatorIds.MINUS_MINUS;
1956 jj_la1[53] = jj_gen;
1957 jj_consume_token(-1);
1958 throw new ParseException();
1960 expr = PrimaryExpression();
1961 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1962 throw new Error("Missing return statement in function");
1965 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
1966 final Expression expr;
1967 if (jj_2_4(2147483647)) {
1968 expr = CastExpression();
1969 {if (true) return expr;}
1971 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1977 expr = PostfixExpression();
1978 {if (true) return expr;}
1983 case INTEGER_LITERAL:
1984 case FLOATING_POINT_LITERAL:
1985 case STRING_LITERAL:
1987 {if (true) return expr;}
1990 jj_consume_token(LPAREN);
1991 expr = Expression();
1993 jj_consume_token(RPAREN);
1994 } catch (ParseException e) {
1995 errorMessage = "')' expected";
1997 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1998 errorEnd = SimpleCharStream.getPosition() + 1;
1999 {if (true) throw e;}
2001 {if (true) return expr;}
2004 jj_la1[54] = jj_gen;
2005 jj_consume_token(-1);
2006 throw new ParseException();
2009 throw new Error("Missing return statement in function");
2012 static final public CastExpression CastExpression() throws ParseException {
2013 final ConstantIdentifier type;
2014 final Expression expr;
2015 final int pos = SimpleCharStream.getPosition();
2016 jj_consume_token(LPAREN);
2017 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2030 jj_consume_token(ARRAY);
2031 type = new ConstantIdentifier(Types.ARRAY,pos,SimpleCharStream.getPosition());
2034 jj_la1[55] = jj_gen;
2035 jj_consume_token(-1);
2036 throw new ParseException();
2038 jj_consume_token(RPAREN);
2039 expr = UnaryExpression();
2040 {if (true) return new CastExpression(type,expr,pos,SimpleCharStream.getPosition());}
2041 throw new Error("Missing return statement in function");
2044 static final public Expression PostfixExpression() throws ParseException {
2045 final Expression expr;
2047 final int pos = SimpleCharStream.getPosition();
2048 expr = PrimaryExpression();
2049 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2052 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2054 jj_consume_token(PLUS_PLUS);
2055 operator = OperatorIds.PLUS_PLUS;
2058 jj_consume_token(MINUS_MINUS);
2059 operator = OperatorIds.MINUS_MINUS;
2062 jj_la1[56] = jj_gen;
2063 jj_consume_token(-1);
2064 throw new ParseException();
2068 jj_la1[57] = jj_gen;
2071 if (operator == -1) {
2072 {if (true) return expr;}
2074 {if (true) return new PostfixedUnaryExpression(expr,operator,pos);}
2075 throw new Error("Missing return statement in function");
2078 static final public Expression PrimaryExpression() throws ParseException {
2079 final Token identifier;
2081 final int pos = SimpleCharStream.getPosition();
2083 identifier = jj_consume_token(IDENTIFIER);
2084 jj_consume_token(STATICCLASSACCESS);
2085 expr = ClassIdentifier();
2086 expr = new ClassAccess(new ConstantIdentifier(identifier.image.toCharArray(),
2088 SimpleCharStream.getPosition()),
2090 ClassAccess.STATIC);
2093 if (jj_2_5(2147483647)) {
2098 expr = PrimarySuffix(expr);
2100 {if (true) return expr;}
2102 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2107 expr = PrimaryPrefix();
2110 if (jj_2_6(2147483647)) {
2115 expr = PrimarySuffix(expr);
2117 {if (true) return expr;}
2120 expr = ArrayDeclarator();
2121 {if (true) return expr;}
2124 jj_la1[58] = jj_gen;
2125 jj_consume_token(-1);
2126 throw new ParseException();
2129 throw new Error("Missing return statement in function");
2133 * An array declarator.
2137 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2138 final ArrayVariableDeclaration[] vars;
2139 final int pos = SimpleCharStream.getPosition();
2140 jj_consume_token(ARRAY);
2141 vars = ArrayInitializer();
2142 {if (true) return new ArrayInitializer(vars,pos,SimpleCharStream.getPosition());}
2143 throw new Error("Missing return statement in function");
2146 static final public Expression PrimaryPrefix() throws ParseException {
2147 final Expression expr;
2150 final int pos = SimpleCharStream.getPosition();
2151 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2153 token = jj_consume_token(IDENTIFIER);
2154 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2156 SimpleCharStream.getPosition());}
2159 jj_consume_token(NEW);
2160 expr = ClassIdentifier();
2161 {if (true) return new PrefixedUnaryExpression(expr,
2167 var = VariableDeclaratorId();
2168 {if (true) return new VariableDeclaration(currentSegment,
2171 SimpleCharStream.getPosition());}
2174 jj_la1[59] = jj_gen;
2175 jj_consume_token(-1);
2176 throw new ParseException();
2178 throw new Error("Missing return statement in function");
2181 static final public PrefixedUnaryExpression classInstantiation() throws ParseException {
2183 final StringBuffer buff;
2184 final int pos = SimpleCharStream.getPosition();
2185 jj_consume_token(NEW);
2186 expr = ClassIdentifier();
2187 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2193 buff = new StringBuffer(expr.toStringExpression());
2194 expr = PrimaryExpression();
2195 buff.append(expr.toStringExpression());
2196 expr = new ConstantIdentifier(buff.toString().toCharArray(),
2198 SimpleCharStream.getPosition());
2201 jj_la1[60] = jj_gen;
2204 {if (true) return new PrefixedUnaryExpression(expr,
2207 throw new Error("Missing return statement in function");
2210 static final public ConstantIdentifier ClassIdentifier() throws ParseException {
2213 final int pos = SimpleCharStream.getPosition();
2214 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2216 token = jj_consume_token(IDENTIFIER);
2217 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2219 SimpleCharStream.getPosition());}
2223 expr = VariableDeclaratorId();
2224 {if (true) return new ConstantIdentifier(expr.toCharArray(),
2226 SimpleCharStream.getPosition());}
2229 jj_la1[61] = jj_gen;
2230 jj_consume_token(-1);
2231 throw new ParseException();
2233 throw new Error("Missing return statement in function");
2236 static final public AbstractSuffixExpression PrimarySuffix(final Expression prefix) throws ParseException {
2237 final AbstractSuffixExpression expr;
2238 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2240 expr = Arguments(prefix);
2241 {if (true) return expr;}
2245 expr = VariableSuffix(prefix);
2246 {if (true) return expr;}
2249 jj_la1[62] = jj_gen;
2250 jj_consume_token(-1);
2251 throw new ParseException();
2253 throw new Error("Missing return statement in function");
2256 static final public AbstractSuffixExpression VariableSuffix(final Expression prefix) throws ParseException {
2258 final int pos = SimpleCharStream.getPosition();
2259 Expression expression = null;
2260 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2262 jj_consume_token(CLASSACCESS);
2264 expr = VariableName();
2265 } catch (ParseException e) {
2266 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2268 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2269 errorEnd = SimpleCharStream.getPosition() + 1;
2270 {if (true) throw e;}
2272 {if (true) return new ClassAccess(prefix,
2273 new ConstantIdentifier(expr.toCharArray(),pos,SimpleCharStream.getPosition()),
2274 ClassAccess.NORMAL);}
2277 jj_consume_token(LBRACKET);
2278 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2303 case INTEGER_LITERAL:
2304 case FLOATING_POINT_LITERAL:
2305 case STRING_LITERAL:
2309 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2325 case INTEGER_LITERAL:
2326 case FLOATING_POINT_LITERAL:
2327 case STRING_LITERAL:
2331 expression = Expression();
2342 expression = Type();
2345 jj_la1[63] = jj_gen;
2346 jj_consume_token(-1);
2347 throw new ParseException();
2351 jj_la1[64] = jj_gen;
2355 jj_consume_token(RBRACKET);
2356 } catch (ParseException e) {
2357 errorMessage = "']' expected";
2359 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2360 errorEnd = SimpleCharStream.getPosition() + 1;
2361 {if (true) throw e;}
2363 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2366 jj_la1[65] = jj_gen;
2367 jj_consume_token(-1);
2368 throw new ParseException();
2370 throw new Error("Missing return statement in function");
2373 static final public Literal Literal() throws ParseException {
2376 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2377 case INTEGER_LITERAL:
2378 token = jj_consume_token(INTEGER_LITERAL);
2379 pos = SimpleCharStream.getPosition();
2380 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2382 case FLOATING_POINT_LITERAL:
2383 token = jj_consume_token(FLOATING_POINT_LITERAL);
2384 pos = SimpleCharStream.getPosition();
2385 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2387 case STRING_LITERAL:
2388 token = jj_consume_token(STRING_LITERAL);
2389 pos = SimpleCharStream.getPosition();
2390 {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length());}
2393 jj_consume_token(TRUE);
2394 pos = SimpleCharStream.getPosition();
2395 {if (true) return new TrueLiteral(pos-4,pos);}
2398 jj_consume_token(FALSE);
2399 pos = SimpleCharStream.getPosition();
2400 {if (true) return new FalseLiteral(pos-4,pos);}
2403 jj_consume_token(NULL);
2404 pos = SimpleCharStream.getPosition();
2405 {if (true) return new NullLiteral(pos-4,pos);}
2408 jj_la1[66] = jj_gen;
2409 jj_consume_token(-1);
2410 throw new ParseException();
2412 throw new Error("Missing return statement in function");
2415 static final public FunctionCall Arguments(final Expression func) throws ParseException {
2416 Expression[] args = null;
2417 jj_consume_token(LPAREN);
2418 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2434 case INTEGER_LITERAL:
2435 case FLOATING_POINT_LITERAL:
2436 case STRING_LITERAL:
2440 args = ArgumentList();
2443 jj_la1[67] = jj_gen;
2447 jj_consume_token(RPAREN);
2448 } catch (ParseException e) {
2449 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2451 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2452 errorEnd = SimpleCharStream.getPosition() + 1;
2453 {if (true) throw e;}
2455 {if (true) return new FunctionCall(func,args,SimpleCharStream.getPosition());}
2456 throw new Error("Missing return statement in function");
2460 * An argument list is a list of arguments separated by comma :
2461 * argumentDeclaration() (, argumentDeclaration)*
2462 * @return an array of arguments
2464 static final public Expression[] ArgumentList() throws ParseException {
2466 final ArrayList list = new ArrayList();
2471 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2476 jj_la1[68] = jj_gen;
2479 jj_consume_token(COMMA);
2483 } catch (ParseException e) {
2484 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2486 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2487 errorEnd = SimpleCharStream.getPosition() + 1;
2488 {if (true) throw e;}
2491 final Expression[] arguments = new Expression[list.size()];
2492 list.toArray(arguments);
2493 {if (true) return arguments;}
2494 throw new Error("Missing return statement in function");
2498 * A Statement without break.
2500 static final public Statement StatementNoBreak() throws ParseException {
2501 final Statement statement;
2504 statement = Expression();
2506 jj_consume_token(SEMICOLON);
2507 } catch (ParseException e) {
2508 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2509 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2511 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2512 errorEnd = SimpleCharStream.getPosition() + 1;
2513 {if (true) throw e;}
2516 {if (true) return statement;}
2517 } else if (jj_2_9(2)) {
2518 statement = LabeledStatement();
2519 {if (true) return statement;}
2521 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2523 statement = Block();
2524 {if (true) return statement;}
2527 statement = EmptyStatement();
2528 {if (true) return statement;}
2537 statement = StatementExpression();
2539 jj_consume_token(SEMICOLON);
2540 } catch (ParseException e) {
2541 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2543 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2544 errorEnd = SimpleCharStream.getPosition() + 1;
2545 {if (true) throw e;}
2547 {if (true) return statement;}
2550 statement = SwitchStatement();
2551 {if (true) return statement;}
2554 statement = IfStatement();
2555 {if (true) return statement;}
2558 statement = WhileStatement();
2559 {if (true) return statement;}
2562 statement = DoStatement();
2563 {if (true) return statement;}
2566 statement = ForStatement();
2567 {if (true) return statement;}
2570 statement = ForeachStatement();
2571 {if (true) return statement;}
2574 statement = ContinueStatement();
2575 {if (true) return statement;}
2578 statement = ReturnStatement();
2579 {if (true) return statement;}
2582 statement = EchoStatement();
2583 {if (true) return statement;}
2590 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2592 token = jj_consume_token(AT);
2595 jj_la1[69] = jj_gen;
2598 statement = IncludeStatement();
2599 if (token != null) {
2600 ((InclusionStatement)statement).silent = true;
2602 {if (true) return statement;}
2605 statement = StaticStatement();
2606 {if (true) return statement;}
2609 statement = GlobalStatement();
2610 {if (true) return statement;}
2613 statement = defineStatement();
2614 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2617 jj_la1[70] = jj_gen;
2618 jj_consume_token(-1);
2619 throw new ParseException();
2622 throw new Error("Missing return statement in function");
2625 static final public Define defineStatement() throws ParseException {
2626 final int start = SimpleCharStream.getPosition();
2627 Expression defineName,defineValue;
2628 jj_consume_token(DEFINE);
2630 jj_consume_token(LPAREN);
2631 } catch (ParseException e) {
2632 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2634 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2635 errorEnd = SimpleCharStream.getPosition() + 1;
2636 processParseException(e);
2639 defineName = Expression();
2640 } catch (ParseException e) {
2641 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2643 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2644 errorEnd = SimpleCharStream.getPosition() + 1;
2645 {if (true) throw e;}
2648 jj_consume_token(COMMA);
2649 } catch (ParseException e) {
2650 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2652 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2653 errorEnd = SimpleCharStream.getPosition() + 1;
2654 processParseException(e);
2657 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2659 defineValue = PrintExpression();
2662 jj_la1[71] = jj_gen;
2663 if (jj_2_10(2147483647)) {
2664 defineValue = varAssignation();
2666 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2679 case INTEGER_LITERAL:
2680 case FLOATING_POINT_LITERAL:
2681 case STRING_LITERAL:
2685 defineValue = ConditionalExpression();
2688 jj_la1[72] = jj_gen;
2689 jj_consume_token(-1);
2690 throw new ParseException();
2694 } catch (ParseException e) {
2695 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2697 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2698 errorEnd = SimpleCharStream.getPosition() + 1;
2699 {if (true) throw e;}
2702 jj_consume_token(RPAREN);
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);
2710 {if (true) return new Define(currentSegment,
2714 SimpleCharStream.getPosition());}
2715 throw new Error("Missing return statement in function");
2719 * A Normal statement.
2721 static final public Statement Statement() throws ParseException {
2722 final Statement statement;
2723 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2755 case INTEGER_LITERAL:
2756 case FLOATING_POINT_LITERAL:
2757 case STRING_LITERAL:
2763 statement = StatementNoBreak();
2764 {if (true) return statement;}
2767 statement = BreakStatement();
2768 {if (true) return statement;}
2771 jj_la1[73] = jj_gen;
2772 jj_consume_token(-1);
2773 throw new ParseException();
2775 throw new Error("Missing return statement in function");
2779 * An html block inside a php syntax.
2781 static final public HTMLBlock htmlBlock() throws ParseException {
2782 final int startIndex = nodePtr;
2783 final AstNode[] blockNodes;
2785 jj_consume_token(PHPEND);
2788 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2793 jj_la1[74] = jj_gen;
2799 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2801 jj_consume_token(PHPSTARTLONG);
2804 jj_consume_token(PHPSTARTSHORT);
2807 jj_la1[75] = jj_gen;
2808 jj_consume_token(-1);
2809 throw new ParseException();
2811 } catch (ParseException e) {
2812 errorMessage = "unexpected end of file , '<?php' expected";
2814 errorStart = SimpleCharStream.getPosition();
2815 errorEnd = SimpleCharStream.getPosition();
2816 {if (true) throw e;}
2818 nbNodes = nodePtr - startIndex;
2819 blockNodes = new AstNode[nbNodes];
2820 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2821 nodePtr = startIndex;
2822 {if (true) return new HTMLBlock(blockNodes);}
2823 throw new Error("Missing return statement in function");
2827 * An include statement. It's "include" an expression;
2829 static final public InclusionStatement IncludeStatement() throws ParseException {
2830 final Expression expr;
2832 final int pos = SimpleCharStream.getPosition();
2833 final InclusionStatement inclusionStatement;
2834 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2836 jj_consume_token(REQUIRE);
2837 keyword = InclusionStatement.REQUIRE;
2840 jj_consume_token(REQUIRE_ONCE);
2841 keyword = InclusionStatement.REQUIRE_ONCE;
2844 jj_consume_token(INCLUDE);
2845 keyword = InclusionStatement.INCLUDE;
2848 jj_consume_token(INCLUDE_ONCE);
2849 keyword = InclusionStatement.INCLUDE_ONCE;
2852 jj_la1[76] = jj_gen;
2853 jj_consume_token(-1);
2854 throw new ParseException();
2857 expr = Expression();
2858 } catch (ParseException e) {
2859 if (errorMessage != null) {
2860 {if (true) throw e;}
2862 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
2864 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2865 errorEnd = SimpleCharStream.getPosition() + 1;
2866 {if (true) throw e;}
2868 inclusionStatement = new InclusionStatement(currentSegment,
2872 currentSegment.add(inclusionStatement);
2874 jj_consume_token(SEMICOLON);
2875 } catch (ParseException e) {
2876 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2878 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2879 errorEnd = SimpleCharStream.getPosition() + 1;
2880 {if (true) throw e;}
2882 {if (true) return inclusionStatement;}
2883 throw new Error("Missing return statement in function");
2886 static final public PrintExpression PrintExpression() throws ParseException {
2887 final Expression expr;
2888 final int pos = SimpleCharStream.getPosition();
2889 jj_consume_token(PRINT);
2890 expr = Expression();
2891 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
2892 throw new Error("Missing return statement in function");
2895 static final public ListExpression ListExpression() throws ParseException {
2897 final Expression expression;
2898 final ArrayList list = new ArrayList();
2899 final int pos = SimpleCharStream.getPosition();
2900 jj_consume_token(LIST);
2902 jj_consume_token(LPAREN);
2903 } catch (ParseException e) {
2904 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2906 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2907 errorEnd = SimpleCharStream.getPosition() + 1;
2908 {if (true) throw e;}
2910 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2913 expr = VariableDeclaratorId();
2917 jj_la1[77] = jj_gen;
2920 if (expr == null) list.add(null);
2923 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2928 jj_la1[78] = jj_gen;
2932 jj_consume_token(COMMA);
2933 } catch (ParseException e) {
2934 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2936 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2937 errorEnd = SimpleCharStream.getPosition() + 1;
2938 {if (true) throw e;}
2940 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2943 expr = VariableDeclaratorId();
2947 jj_la1[79] = jj_gen;
2952 jj_consume_token(RPAREN);
2953 } catch (ParseException e) {
2954 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2956 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2957 errorEnd = SimpleCharStream.getPosition() + 1;
2958 {if (true) throw e;}
2960 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2962 jj_consume_token(ASSIGN);
2963 expression = Expression();
2964 final String[] strings = new String[list.size()];
2965 list.toArray(strings);
2966 {if (true) return new ListExpression(strings,
2969 SimpleCharStream.getPosition());}
2972 jj_la1[80] = jj_gen;
2975 final String[] strings = new String[list.size()];
2976 list.toArray(strings);
2977 {if (true) return new ListExpression(strings,pos,SimpleCharStream.getPosition());}
2978 throw new Error("Missing return statement in function");
2982 * An echo statement.
2983 * echo anyexpression (, otherexpression)*
2985 static final public EchoStatement EchoStatement() throws ParseException {
2986 final ArrayList expressions = new ArrayList();
2988 final int pos = SimpleCharStream.getPosition();
2989 jj_consume_token(ECHO);
2990 expr = Expression();
2991 expressions.add(expr);
2994 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2999 jj_la1[81] = jj_gen;
3002 jj_consume_token(COMMA);
3003 expr = Expression();
3004 expressions.add(expr);
3007 jj_consume_token(SEMICOLON);
3008 } catch (ParseException e) {
3009 if (e.currentToken.next.kind != 4) {
3010 errorMessage = "';' expected after 'echo' statement";
3012 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3013 errorEnd = SimpleCharStream.getPosition() + 1;
3014 {if (true) throw e;}
3017 final Expression[] exprs = new Expression[expressions.size()];
3018 expressions.toArray(exprs);
3019 {if (true) return new EchoStatement(exprs,pos);}
3020 throw new Error("Missing return statement in function");
3023 static final public GlobalStatement GlobalStatement() throws ParseException {
3024 final int pos = SimpleCharStream.getPosition();
3026 final ArrayList vars = new ArrayList();
3027 final GlobalStatement global;
3028 jj_consume_token(GLOBAL);
3029 expr = VariableDeclaratorId();
3033 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3038 jj_la1[82] = jj_gen;
3041 jj_consume_token(COMMA);
3042 expr = VariableDeclaratorId();
3046 jj_consume_token(SEMICOLON);
3047 final String[] strings = new String[vars.size()];
3048 vars.toArray(strings);
3049 global = new GlobalStatement(currentSegment,
3052 SimpleCharStream.getPosition());
3053 currentSegment.add(global);
3054 {if (true) return global;}
3055 } catch (ParseException e) {
3056 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3058 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3059 errorEnd = SimpleCharStream.getPosition() + 1;
3060 {if (true) throw e;}
3062 throw new Error("Missing return statement in function");
3065 static final public StaticStatement StaticStatement() throws ParseException {
3066 final int pos = SimpleCharStream.getPosition();
3067 final ArrayList vars = new ArrayList();
3068 VariableDeclaration expr;
3069 jj_consume_token(STATIC);
3070 expr = VariableDeclarator();
3071 vars.add(new String(expr.name));
3074 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3079 jj_la1[83] = jj_gen;
3082 jj_consume_token(COMMA);
3083 expr = VariableDeclarator();
3084 vars.add(new String(expr.name));
3087 jj_consume_token(SEMICOLON);
3088 final String[] strings = new String[vars.size()];
3089 vars.toArray(strings);
3090 {if (true) return new StaticStatement(strings,
3092 SimpleCharStream.getPosition());}
3093 } catch (ParseException e) {
3094 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3096 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3097 errorEnd = SimpleCharStream.getPosition() + 1;
3098 {if (true) throw e;}
3100 throw new Error("Missing return statement in function");
3103 static final public LabeledStatement LabeledStatement() throws ParseException {
3104 final int pos = SimpleCharStream.getPosition();
3106 final Statement statement;
3107 label = jj_consume_token(IDENTIFIER);
3108 jj_consume_token(COLON);
3109 statement = Statement();
3110 {if (true) return new LabeledStatement(label.image.toCharArray(),statement,pos,SimpleCharStream.getPosition());}
3111 throw new Error("Missing return statement in function");
3121 static final public Block Block() throws ParseException {
3122 final int pos = SimpleCharStream.getPosition();
3123 final ArrayList list = new ArrayList();
3124 Statement statement;
3126 jj_consume_token(LBRACE);
3127 } catch (ParseException e) {
3128 errorMessage = "'{' expected";
3130 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3131 errorEnd = SimpleCharStream.getPosition() + 1;
3132 {if (true) throw e;}
3136 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3172 case INTEGER_LITERAL:
3173 case FLOATING_POINT_LITERAL:
3174 case STRING_LITERAL:
3183 jj_la1[84] = jj_gen;
3186 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3221 case INTEGER_LITERAL:
3222 case FLOATING_POINT_LITERAL:
3223 case STRING_LITERAL:
3229 statement = BlockStatement();
3230 list.add(statement);
3233 statement = htmlBlock();
3234 list.add(statement);
3237 jj_la1[85] = jj_gen;
3238 jj_consume_token(-1);
3239 throw new ParseException();
3243 jj_consume_token(RBRACE);
3244 } catch (ParseException e) {
3245 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3247 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3248 errorEnd = SimpleCharStream.getPosition() + 1;
3249 {if (true) throw e;}
3251 final Statement[] statements = new Statement[list.size()];
3252 list.toArray(statements);
3253 {if (true) return new Block(statements,pos,SimpleCharStream.getPosition());}
3254 throw new Error("Missing return statement in function");
3257 static final public Statement BlockStatement() throws ParseException {
3258 final Statement statement;
3259 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3292 case INTEGER_LITERAL:
3293 case FLOATING_POINT_LITERAL:
3294 case STRING_LITERAL:
3301 statement = Statement();
3302 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3303 {if (true) return statement;}
3304 } catch (ParseException e) {
3305 if (errorMessage != null) {if (true) throw e;}
3306 errorMessage = "statement expected";
3308 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3309 errorEnd = SimpleCharStream.getPosition() + 1;
3310 {if (true) throw e;}
3314 statement = ClassDeclaration();
3315 {if (true) return statement;}
3318 statement = MethodDeclaration();
3319 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3320 currentSegment.add((MethodDeclaration) statement);
3321 {if (true) return statement;}
3324 jj_la1[86] = jj_gen;
3325 jj_consume_token(-1);
3326 throw new ParseException();
3328 throw new Error("Missing return statement in function");
3332 * A Block statement that will not contain any 'break'
3334 static final public Statement BlockStatementNoBreak() throws ParseException {
3335 final Statement statement;
3336 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3368 case INTEGER_LITERAL:
3369 case FLOATING_POINT_LITERAL:
3370 case STRING_LITERAL:
3376 statement = StatementNoBreak();
3377 {if (true) return statement;}
3380 statement = ClassDeclaration();
3381 {if (true) return statement;}
3384 statement = MethodDeclaration();
3385 currentSegment.add((MethodDeclaration) statement);
3386 {if (true) return statement;}
3389 jj_la1[87] = jj_gen;
3390 jj_consume_token(-1);
3391 throw new ParseException();
3393 throw new Error("Missing return statement in function");
3396 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3397 final ArrayList list = new ArrayList();
3398 VariableDeclaration var;
3399 var = LocalVariableDeclarator();
3403 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3408 jj_la1[88] = jj_gen;
3411 jj_consume_token(COMMA);
3412 var = LocalVariableDeclarator();
3415 final VariableDeclaration[] vars = new VariableDeclaration[list.size()];
3417 {if (true) return vars;}
3418 throw new Error("Missing return statement in function");
3421 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3422 final String varName;
3423 Expression initializer = null;
3424 final int pos = SimpleCharStream.getPosition();
3425 varName = VariableDeclaratorId();
3426 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3428 jj_consume_token(ASSIGN);
3429 initializer = Expression();
3432 jj_la1[89] = jj_gen;
3435 if (initializer == null) {
3436 {if (true) return new VariableDeclaration(currentSegment,
3437 varName.toCharArray(),
3439 SimpleCharStream.getPosition());}
3441 {if (true) return new VariableDeclaration(currentSegment,
3442 varName.toCharArray(),
3445 throw new Error("Missing return statement in function");
3448 static final public EmptyStatement EmptyStatement() throws ParseException {
3450 jj_consume_token(SEMICOLON);
3451 pos = SimpleCharStream.getPosition();
3452 {if (true) return new EmptyStatement(pos-1,pos);}
3453 throw new Error("Missing return statement in function");
3456 static final public Expression StatementExpression() throws ParseException {
3457 final Expression expr,expr2;
3459 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3462 expr = PreIncDecExpression();
3463 {if (true) return expr;}
3470 expr = PrimaryExpression();
3471 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3486 case RSIGNEDSHIFTASSIGN:
3487 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3489 jj_consume_token(PLUS_PLUS);
3490 {if (true) return new PostfixedUnaryExpression(expr,
3491 OperatorIds.PLUS_PLUS,
3492 SimpleCharStream.getPosition());}
3495 jj_consume_token(MINUS_MINUS);
3496 {if (true) return new PostfixedUnaryExpression(expr,
3497 OperatorIds.MINUS_MINUS,
3498 SimpleCharStream.getPosition());}
3512 case RSIGNEDSHIFTASSIGN:
3513 operator = AssignmentOperator();
3514 expr2 = Expression();
3515 {if (true) return new BinaryExpression(expr,expr2,operator);}
3518 jj_la1[90] = jj_gen;
3519 jj_consume_token(-1);
3520 throw new ParseException();
3524 jj_la1[91] = jj_gen;
3527 {if (true) return expr;}
3530 jj_la1[92] = 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[93] = 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[94] = 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[95] = 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[96] = 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[97] = 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[98] = 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[99] = 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[100] = 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[101] = 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[102] = 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[103] = jj_gen;
4072 elseifStatement = ElseIfStatementColon();
4073 elseIfList.add(elseifStatement);
4075 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4077 elseStatement = ElseStatementColon();
4080 jj_la1[104] = 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[105] = jj_gen;
4220 jj_consume_token(-1);
4221 throw new ParseException();
4225 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4230 jj_la1[106] = 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[107] = 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[108] = 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[109] = 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[110] = 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[111] = 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[112] = 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[113] = 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[114] = 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[115] = 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[116] = jj_gen;
4829 jj_consume_token(SEMICOLON);
4830 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4838 increments = StatementExpressionList();
4841 jj_la1[117] = 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[118] = 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[119] = 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_11(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[120] = 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[121] = 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[122] = 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[123] = 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_2_6(int xla) {
5162 jj_la = xla; jj_lastpos = jj_scanpos = token;
5163 boolean retval = !jj_3_6();
5168 static final private boolean jj_2_7(int xla) {
5169 jj_la = xla; jj_lastpos = jj_scanpos = token;
5170 boolean retval = !jj_3_7();
5175 static final private boolean jj_2_8(int xla) {
5176 jj_la = xla; jj_lastpos = jj_scanpos = token;
5177 boolean retval = !jj_3_8();
5182 static final private boolean jj_2_9(int xla) {
5183 jj_la = xla; jj_lastpos = jj_scanpos = token;
5184 boolean retval = !jj_3_9();
5189 static final private boolean jj_2_10(int xla) {
5190 jj_la = xla; jj_lastpos = jj_scanpos = token;
5191 boolean retval = !jj_3_10();
5196 static final private boolean jj_2_11(int xla) {
5197 jj_la = xla; jj_lastpos = jj_scanpos = token;
5198 boolean retval = !jj_3_11();
5203 static final private boolean jj_3R_97() {
5204 if (jj_3R_103()) return true;
5205 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5209 static final private boolean jj_3R_86() {
5218 if (jj_3R_100()) return true;
5219 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5220 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5221 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5222 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5226 static final private boolean jj_3R_203() {
5227 if (jj_scan_token(MINUS_MINUS)) return true;
5228 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5232 static final private boolean jj_3R_202() {
5233 if (jj_scan_token(PLUS_PLUS)) return true;
5234 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5238 static final private boolean jj_3R_195() {
5243 if (jj_3R_203()) return true;
5244 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5245 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5249 static final private boolean jj_3R_178() {
5250 if (jj_3R_176()) return true;
5251 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5254 if (jj_3R_195()) jj_scanpos = xsp;
5255 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5259 static final private boolean jj_3R_57() {
5260 if (jj_3R_86()) return true;
5261 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5265 static final private boolean jj_3R_46() {
5270 if (jj_3R_57()) return true;
5271 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5272 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5276 static final private boolean jj_3R_56() {
5277 if (jj_scan_token(BANG)) return true;
5278 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5279 if (jj_3R_46()) return true;
5280 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5284 static final private boolean jj_3R_44() {
5285 if (jj_scan_token(ARRAY)) return true;
5286 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5290 static final private boolean jj_3R_194() {
5291 if (jj_scan_token(ARRAY)) return true;
5292 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5296 static final private boolean jj_3R_193() {
5297 if (jj_3R_53()) return true;
5298 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5302 static final private boolean jj_3R_84() {
5303 if (jj_scan_token(OBJECT)) return true;
5304 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5308 static final private boolean jj_3R_177() {
5309 if (jj_scan_token(LPAREN)) return true;
5310 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5315 if (jj_3R_194()) return true;
5316 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5317 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5318 if (jj_scan_token(RPAREN)) return true;
5319 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5320 if (jj_3R_150()) return true;
5321 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5325 static final private boolean jj_3R_83() {
5326 if (jj_scan_token(INTEGER)) return true;
5327 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5331 static final private boolean jj_3R_82() {
5332 if (jj_scan_token(INT)) return true;
5333 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5337 static final private boolean jj_3R_43() {
5338 if (jj_3R_53()) return true;
5339 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5343 static final private boolean jj_3R_81() {
5344 if (jj_scan_token(FLOAT)) return true;
5345 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5349 static final private boolean jj_3R_80() {
5350 if (jj_scan_token(DOUBLE)) return true;
5351 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5355 static final private boolean jj_3R_79() {
5356 if (jj_scan_token(REAL)) return true;
5357 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5361 static final private boolean jj_3R_78() {
5362 if (jj_scan_token(BOOLEAN)) return true;
5363 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5367 static final private boolean jj_3R_77() {
5368 if (jj_scan_token(BOOL)) return true;
5369 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5373 static final private boolean jj_3_4() {
5374 if (jj_scan_token(LPAREN)) return true;
5375 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5380 if (jj_3R_44()) return true;
5381 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5382 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5383 if (jj_scan_token(RPAREN)) return true;
5384 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5388 static final private boolean jj_3R_76() {
5389 if (jj_scan_token(STRING)) return true;
5390 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5394 static final private boolean jj_3R_53() {
5413 if (jj_3R_84()) return true;
5414 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5415 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5416 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5417 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5418 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5419 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5420 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5421 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5422 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5426 static final private boolean jj_3R_87() {
5427 if (jj_scan_token(ASSIGN)) return true;
5428 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5429 if (jj_3R_46()) return true;
5430 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5434 static final private boolean jj_3R_175() {
5435 if (jj_scan_token(LPAREN)) return true;
5436 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5437 if (jj_3R_46()) return true;
5438 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5439 if (jj_scan_token(RPAREN)) return true;
5440 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5444 static final private boolean jj_3R_174() {
5445 if (jj_3R_179()) return true;
5446 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5450 static final private boolean jj_3R_173() {
5451 if (jj_3R_178()) return true;
5452 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5456 static final private boolean jj_3R_172() {
5457 if (jj_3R_177()) return true;
5458 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5462 static final private boolean jj_3R_169() {
5471 if (jj_3R_175()) return true;
5472 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5473 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5474 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5475 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5479 static final private boolean jj_3R_171() {
5480 if (jj_scan_token(MINUS_MINUS)) return true;
5481 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5485 static final private boolean jj_3R_170() {
5486 if (jj_scan_token(PLUS_PLUS)) return true;
5487 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5491 static final private boolean jj_3R_168() {
5496 if (jj_3R_171()) return true;
5497 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_176()) return true;
5500 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5504 static final private boolean jj_3_10() {
5505 if (jj_3R_42()) return true;
5506 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5510 static final private boolean jj_3R_163() {
5511 if (jj_3R_169()) return true;
5512 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5516 static final private boolean jj_3R_162() {
5517 if (jj_3R_168()) return true;
5518 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5522 static final private boolean jj_3R_167() {
5523 if (jj_scan_token(MINUS)) return true;
5524 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5528 static final private boolean jj_3R_166() {
5529 if (jj_scan_token(PLUS)) return true;
5530 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5534 static final private boolean jj_3R_58() {
5535 if (jj_3R_51()) return true;
5536 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5539 if (jj_3R_87()) jj_scanpos = xsp;
5540 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5544 static final private boolean jj_3R_159() {
5551 if (jj_3R_163()) return true;
5552 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5553 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5554 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5558 static final private boolean jj_3R_161() {
5563 if (jj_3R_167()) return true;
5564 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5565 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5566 if (jj_3R_150()) return true;
5567 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5571 static final private boolean jj_3R_59() {
5572 if (jj_scan_token(COMMA)) return true;
5573 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5574 if (jj_3R_58()) return true;
5575 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5579 static final private boolean jj_3R_165() {
5580 if (jj_3R_159()) return true;
5581 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5585 static final private boolean jj_3R_48() {
5586 if (jj_3R_58()) return true;
5587 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5591 if (jj_3R_59()) { jj_scanpos = xsp; break; }
5592 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5597 static final private boolean jj_3R_160() {
5602 if (jj_3R_165()) return true;
5603 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5604 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5608 static final private boolean jj_3R_164() {
5609 if (jj_scan_token(AT)) return true;
5610 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5611 if (jj_3R_160()) return true;
5612 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5616 static final private boolean jj_3R_155() {
5617 if (jj_3R_160()) return true;
5618 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5622 static final private boolean jj_3R_150() {
5627 if (jj_3R_155()) return true;
5628 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5629 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5633 static final private boolean jj_3R_154() {
5634 if (jj_scan_token(BIT_AND)) return true;
5635 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5636 if (jj_3R_159()) return true;
5637 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5641 static final private boolean jj_3R_158() {
5642 if (jj_scan_token(REMAINDER)) return true;
5643 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5647 static final private boolean jj_3R_157() {
5648 if (jj_scan_token(SLASH)) return true;
5649 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5653 static final private boolean jj_3R_156() {
5654 if (jj_scan_token(STAR)) return true;
5655 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5659 static final private boolean jj_3R_151() {
5666 if (jj_3R_158()) return true;
5667 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_150()) return true;
5671 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5675 static final private boolean jj_3R_145() {
5676 if (jj_3R_150()) return true;
5677 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5681 if (jj_3R_151()) { jj_scanpos = xsp; break; }
5682 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5687 static final private boolean jj_3R_153() {
5688 if (jj_scan_token(MINUS)) return true;
5689 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5693 static final private boolean jj_3_9() {
5694 if (jj_3R_47()) return true;
5695 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5699 static final private boolean jj_3R_152() {
5700 if (jj_scan_token(PLUS)) return true;
5701 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5705 static final private boolean jj_3R_146() {
5710 if (jj_3R_153()) return true;
5711 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5712 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5713 if (jj_3R_145()) return true;
5714 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5718 static final private boolean jj_3R_139() {
5719 if (jj_3R_145()) return true;
5720 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5724 if (jj_3R_146()) { jj_scanpos = xsp; break; }
5725 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5730 static final private boolean jj_3R_205() {
5731 if (jj_scan_token(COMMA)) return true;
5732 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5736 static final private boolean jj_3_2() {
5737 if (jj_scan_token(COMMA)) return true;
5738 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5739 if (jj_3R_41()) return true;
5740 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5744 static final private boolean jj_3_8() {
5745 if (jj_3R_46()) return true;
5746 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5747 if (jj_scan_token(SEMICOLON)) return true;
5748 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5752 static final private boolean jj_3R_204() {
5753 if (jj_3R_41()) return true;
5754 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5758 if (jj_3_2()) { jj_scanpos = xsp; break; }
5759 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5764 static final private boolean jj_3R_149() {
5765 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
5766 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5770 static final private boolean jj_3R_148() {
5771 if (jj_scan_token(RSIGNEDSHIFT)) return true;
5772 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5776 static final private boolean jj_3R_147() {
5777 if (jj_scan_token(LSHIFT)) return true;
5778 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5782 static final private boolean jj_3R_140() {
5789 if (jj_3R_149()) return true;
5790 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5791 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5792 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5793 if (jj_3R_139()) return true;
5794 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5798 static final private boolean jj_3R_132() {
5799 if (jj_3R_139()) return true;
5800 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5804 if (jj_3R_140()) { jj_scanpos = xsp; break; }
5805 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5810 static final private boolean jj_3R_201() {
5811 if (jj_scan_token(LPAREN)) return true;
5812 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5815 if (jj_3R_204()) jj_scanpos = xsp;
5816 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5818 if (jj_3R_205()) jj_scanpos = xsp;
5819 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5820 if (jj_scan_token(RPAREN)) return true;
5821 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5825 static final private boolean jj_3_11() {
5826 if (jj_3R_48()) return true;
5827 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5831 static final private boolean jj_3R_47() {
5832 if (jj_scan_token(IDENTIFIER)) return true;
5833 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5834 if (jj_scan_token(COLON)) return true;
5835 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5839 static final private boolean jj_3R_144() {
5840 if (jj_scan_token(GE)) return true;
5841 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5845 static final private boolean jj_3R_143() {
5846 if (jj_scan_token(LE)) return true;
5847 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5851 static final private boolean jj_3R_142() {
5852 if (jj_scan_token(GT)) return true;
5853 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5857 static final private boolean jj_3R_141() {
5858 if (jj_scan_token(LT)) return true;
5859 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5863 static final private boolean jj_3R_206() {
5864 if (jj_scan_token(ARRAYASSIGN)) return true;
5865 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5866 if (jj_3R_46()) return true;
5867 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5871 static final private boolean jj_3R_133() {
5880 if (jj_3R_144()) return true;
5881 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5882 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5883 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5884 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5885 if (jj_3R_132()) return true;
5886 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5890 static final private boolean jj_3R_106() {
5891 if (jj_scan_token(COMMA)) return true;
5892 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5893 if (jj_3R_46()) return true;
5894 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5898 static final private boolean jj_3R_41() {
5899 if (jj_3R_46()) return true;
5900 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5903 if (jj_3R_206()) jj_scanpos = xsp;
5904 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5908 static final private boolean jj_3R_130() {
5909 if (jj_3R_132()) return true;
5910 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5914 if (jj_3R_133()) { jj_scanpos = xsp; break; }
5915 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5920 static final private boolean jj_3R_102() {
5921 if (jj_3R_46()) return true;
5922 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5926 if (jj_3R_106()) { jj_scanpos = xsp; break; }
5927 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5932 static final private boolean jj_3R_96() {
5933 if (jj_3R_102()) return true;
5934 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5938 static final private boolean jj_3R_138() {
5939 if (jj_scan_token(TRIPLEEQUAL)) return true;
5940 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5944 static final private boolean jj_3R_93() {
5945 if (jj_3R_53()) return true;
5946 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5950 static final private boolean jj_3R_137() {
5951 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5952 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5956 static final private boolean jj_3R_136() {
5957 if (jj_scan_token(NOT_EQUAL)) return true;
5958 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5962 static final private boolean jj_3R_135() {
5963 if (jj_scan_token(DIF)) return true;
5964 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5968 static final private boolean jj_3R_85() {
5969 if (jj_scan_token(LPAREN)) return true;
5970 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5973 if (jj_3R_96()) jj_scanpos = xsp;
5974 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5975 if (jj_scan_token(RPAREN)) return true;
5976 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5980 static final private boolean jj_3R_134() {
5981 if (jj_scan_token(EQUAL_EQUAL)) return true;
5982 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5986 static final private boolean jj_3R_131() {
5997 if (jj_3R_138()) return true;
5998 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5999 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6000 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6001 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6002 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6003 if (jj_3R_130()) return true;
6004 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6008 static final private boolean jj_3R_128() {
6009 if (jj_3R_130()) return true;
6010 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6014 if (jj_3R_131()) { jj_scanpos = xsp; break; }
6015 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6020 static final private boolean jj_3R_187() {
6021 if (jj_scan_token(NULL)) return true;
6022 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6026 static final private boolean jj_3R_109() {
6027 if (jj_scan_token(LBRACE)) return true;
6028 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6029 if (jj_3R_46()) return true;
6030 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6031 if (jj_scan_token(RBRACE)) return true;
6032 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6036 static final private boolean jj_3R_186() {
6037 if (jj_scan_token(FALSE)) return true;
6038 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6042 static final private boolean jj_3R_185() {
6043 if (jj_scan_token(TRUE)) return true;
6044 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6048 static final private boolean jj_3R_91() {
6049 if (jj_scan_token(DOLLAR_ID)) return true;
6050 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6054 static final private boolean jj_3R_184() {
6055 if (jj_scan_token(STRING_LITERAL)) return true;
6056 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6060 static final private boolean jj_3R_183() {
6061 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
6062 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6066 static final private boolean jj_3R_129() {
6067 if (jj_scan_token(BIT_AND)) return true;
6068 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6069 if (jj_3R_128()) return true;
6070 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6074 static final private boolean jj_3R_182() {
6075 if (jj_scan_token(INTEGER_LITERAL)) return true;
6076 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6080 static final private boolean jj_3R_179() {
6093 if (jj_3R_187()) return true;
6094 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6095 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6096 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6097 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6098 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6099 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6103 static final private boolean jj_3R_90() {
6104 if (jj_scan_token(DOLLAR)) return true;
6105 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6106 if (jj_3R_60()) return true;
6107 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6111 static final private boolean jj_3R_126() {
6112 if (jj_3R_128()) return true;
6113 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6117 if (jj_3R_129()) { jj_scanpos = xsp; break; }
6118 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6123 static final private boolean jj_3R_92() {
6124 if (jj_3R_46()) return true;
6125 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6129 static final private boolean jj_3R_61() {
6134 if (jj_3R_93()) return true;
6135 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6136 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6140 static final private boolean jj_3R_127() {
6141 if (jj_scan_token(XOR)) return true;
6142 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6143 if (jj_3R_126()) return true;
6144 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6148 static final private boolean jj_3R_89() {
6149 if (jj_scan_token(IDENTIFIER)) return true;
6150 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6153 if (jj_3R_109()) jj_scanpos = xsp;
6154 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6158 static final private boolean jj_3R_124() {
6159 if (jj_3R_126()) return true;
6160 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6164 if (jj_3R_127()) { jj_scanpos = xsp; break; }
6165 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6170 static final private boolean jj_3R_88() {
6171 if (jj_scan_token(LBRACE)) return true;
6172 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6173 if (jj_3R_46()) return true;
6174 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6175 if (jj_scan_token(RBRACE)) return true;
6176 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6180 static final private boolean jj_3R_60() {
6189 if (jj_3R_91()) return true;
6190 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6191 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6192 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6193 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6197 static final private boolean jj_3R_50() {
6198 if (jj_scan_token(LBRACKET)) return true;
6199 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6202 if (jj_3R_61()) jj_scanpos = xsp;
6203 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6204 if (jj_scan_token(RBRACKET)) return true;
6205 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6209 static final private boolean jj_3R_125() {
6210 if (jj_scan_token(BIT_OR)) return true;
6211 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6212 if (jj_3R_124()) return true;
6213 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6217 static final private boolean jj_3R_101() {
6218 if (jj_scan_token(LBRACE)) return true;
6219 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6220 if (jj_3R_46()) return true;
6221 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6222 if (jj_scan_token(RBRACE)) return true;
6223 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6227 static final private boolean jj_3R_120() {
6228 if (jj_3R_124()) return true;
6229 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6233 if (jj_3R_125()) { jj_scanpos = xsp; break; }
6234 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6239 static final private boolean jj_3R_40() {
6244 if (jj_3R_50()) return true;
6245 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6246 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6250 static final private boolean jj_3R_49() {
6251 if (jj_scan_token(CLASSACCESS)) return true;
6252 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6253 if (jj_3R_60()) return true;
6254 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6258 static final private boolean jj_3R_95() {
6259 if (jj_scan_token(DOLLAR)) return true;
6260 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6261 if (jj_3R_60()) return true;
6262 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6266 static final private boolean jj_3R_121() {
6267 if (jj_scan_token(DOT)) return true;
6268 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6269 if (jj_3R_120()) return true;
6270 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6274 static final private boolean jj_3R_116() {
6275 if (jj_3R_120()) return true;
6276 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6280 if (jj_3R_121()) { jj_scanpos = xsp; break; }
6281 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6286 static final private boolean jj_3R_55() {
6287 if (jj_3R_40()) return true;
6288 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6292 static final private boolean jj_3R_45() {
6297 if (jj_3R_55()) return true;
6298 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6299 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6303 static final private boolean jj_3R_54() {
6304 if (jj_3R_85()) return true;
6305 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6309 static final private boolean jj_3R_94() {
6310 if (jj_scan_token(DOLLAR_ID)) return true;
6311 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6314 if (jj_3R_101()) jj_scanpos = xsp;
6315 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6319 static final private boolean jj_3R_62() {
6324 if (jj_3R_95()) return true;
6325 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6326 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6330 static final private boolean jj_3R_123() {
6331 if (jj_scan_token(_ANDL)) return true;
6332 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6336 static final private boolean jj_3R_122() {
6337 if (jj_scan_token(AND_AND)) return true;
6338 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6342 static final private boolean jj_3R_117() {
6347 if (jj_3R_123()) return true;
6348 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6349 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6350 if (jj_3R_116()) return true;
6351 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6355 static final private boolean jj_3R_108() {
6356 if (jj_scan_token(HOOK)) return true;
6357 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6358 if (jj_3R_46()) return true;
6359 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6360 if (jj_scan_token(COLON)) return true;
6361 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6362 if (jj_3R_105()) return true;
6363 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6367 static final private boolean jj_3R_197() {
6368 if (jj_3R_51()) return true;
6369 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6373 static final private boolean jj_3R_113() {
6374 if (jj_3R_116()) return true;
6375 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6379 if (jj_3R_117()) { jj_scanpos = xsp; break; }
6380 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6385 static final private boolean jj_3R_196() {
6386 if (jj_scan_token(IDENTIFIER)) return true;
6387 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6391 static final private boolean jj_3R_188() {
6396 if (jj_3R_197()) return true;
6397 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6398 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6402 static final private boolean jj_3R_112() {
6403 if (jj_scan_token(ASSIGN)) return true;
6404 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6405 if (jj_3R_46()) return true;
6406 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6410 static final private boolean jj_3R_119() {
6411 if (jj_scan_token(_ORL)) return true;
6412 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6416 static final private boolean jj_3R_118() {
6417 if (jj_scan_token(OR_OR)) return true;
6418 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6422 static final private boolean jj_3R_114() {
6427 if (jj_3R_119()) return true;
6428 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6429 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6430 if (jj_3R_113()) return true;
6431 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6435 static final private boolean jj_3R_115() {
6436 if (jj_3R_51()) return true;
6437 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6441 static final private boolean jj_3R_107() {
6442 if (jj_3R_113()) return true;
6443 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6447 if (jj_3R_114()) { jj_scanpos = xsp; break; }
6448 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6453 static final private boolean jj_3_1() {
6454 if (jj_3R_40()) return true;
6455 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6459 static final private boolean jj_3R_111() {
6460 if (jj_scan_token(COMMA)) return true;
6461 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6464 if (jj_3R_115()) jj_scanpos = xsp;
6465 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6469 static final private boolean jj_3R_51() {
6470 if (jj_3R_62()) return true;
6471 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6475 if (jj_3_1()) { jj_scanpos = xsp; break; }
6476 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6481 static final private boolean jj_3R_110() {
6482 if (jj_3R_51()) return true;
6483 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6487 static final private boolean jj_3R_105() {
6488 if (jj_3R_107()) return true;
6489 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6492 if (jj_3R_108()) jj_scanpos = xsp;
6493 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6497 static final private boolean jj_3R_200() {
6498 if (jj_3R_51()) return true;
6499 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6503 static final private boolean jj_3R_199() {
6504 if (jj_scan_token(NEW)) return true;
6505 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6506 if (jj_3R_188()) return true;
6507 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6511 static final private boolean jj_3R_198() {
6512 if (jj_scan_token(IDENTIFIER)) return true;
6513 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6517 static final private boolean jj_3R_190() {
6524 if (jj_3R_200()) return true;
6525 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6526 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6527 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6531 static final private boolean jj_3R_75() {
6532 if (jj_scan_token(TILDEEQUAL)) return true;
6533 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6537 static final private boolean jj_3R_74() {
6538 if (jj_scan_token(DOTASSIGN)) return true;
6539 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6543 static final private boolean jj_3R_104() {
6544 if (jj_scan_token(LIST)) return true;
6545 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6546 if (jj_scan_token(LPAREN)) return true;
6547 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6550 if (jj_3R_110()) jj_scanpos = xsp;
6551 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6554 if (jj_3R_111()) { jj_scanpos = xsp; break; }
6555 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6557 if (jj_scan_token(RPAREN)) return true;
6558 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6560 if (jj_3R_112()) jj_scanpos = xsp;
6561 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6565 static final private boolean jj_3R_73() {
6566 if (jj_scan_token(ORASSIGN)) return true;
6567 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6571 static final private boolean jj_3R_72() {
6572 if (jj_scan_token(XORASSIGN)) return true;
6573 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6577 static final private boolean jj_3R_71() {
6578 if (jj_scan_token(ANDASSIGN)) return true;
6579 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6583 static final private boolean jj_3R_70() {
6584 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6585 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6589 static final private boolean jj_3R_69() {
6590 if (jj_scan_token(LSHIFTASSIGN)) return true;
6591 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6595 static final private boolean jj_3R_68() {
6596 if (jj_scan_token(MINUSASSIGN)) return true;
6597 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6601 static final private boolean jj_3R_67() {
6602 if (jj_scan_token(PLUSASSIGN)) return true;
6603 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6607 static final private boolean jj_3R_66() {
6608 if (jj_scan_token(REMASSIGN)) return true;
6609 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6613 static final private boolean jj_3R_65() {
6614 if (jj_scan_token(SLASHASSIGN)) return true;
6615 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6619 static final private boolean jj_3R_192() {
6620 if (jj_scan_token(ARRAY)) return true;
6621 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6622 if (jj_3R_201()) return true;
6623 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6627 static final private boolean jj_3R_64() {
6628 if (jj_scan_token(STARASSIGN)) return true;
6629 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6633 static final private boolean jj_3R_52() {
6660 if (jj_3R_75()) return true;
6661 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6662 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6663 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6664 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6665 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6666 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6667 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6668 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6669 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6670 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6671 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6672 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6673 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6677 static final private boolean jj_3R_63() {
6678 if (jj_scan_token(ASSIGN)) return true;
6679 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6683 static final private boolean jj_3R_103() {
6684 if (jj_scan_token(PRINT)) return true;
6685 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6686 if (jj_3R_46()) return true;
6687 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6691 static final private boolean jj_3_6() {
6692 if (jj_3R_45()) return true;
6693 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6697 static final private boolean jj_3R_181() {
6698 if (jj_3R_192()) return true;
6699 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6703 static final private boolean jj_3_5() {
6704 if (jj_3R_45()) return true;
6705 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6709 static final private boolean jj_3R_191() {
6710 if (jj_3R_45()) return true;
6711 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6715 static final private boolean jj_3R_180() {
6716 if (jj_3R_190()) return true;
6717 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6721 if (jj_3R_191()) { jj_scanpos = xsp; break; }
6722 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6727 static final private boolean jj_3R_189() {
6728 if (jj_3R_45()) return true;
6729 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6733 static final private boolean jj_3R_42() {
6734 if (jj_3R_51()) return true;
6735 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6736 if (jj_3R_52()) return true;
6737 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6738 if (jj_3R_46()) return true;
6739 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6743 static final private boolean jj_3_3() {
6744 if (jj_3R_42()) return true;
6745 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6749 static final private boolean jj_3R_176() {
6756 if (jj_3R_181()) return true;
6757 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6758 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6759 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6763 static final private boolean jj_3_7() {
6764 if (jj_scan_token(IDENTIFIER)) return true;
6765 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6766 if (jj_scan_token(STATICCLASSACCESS)) return true;
6767 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6768 if (jj_3R_188()) return true;
6769 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6773 if (jj_3R_189()) { jj_scanpos = xsp; break; }
6774 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6779 static final private boolean jj_3R_100() {
6780 if (jj_3R_105()) return true;
6781 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6785 static final private boolean jj_3R_99() {
6786 if (jj_3R_42()) return true;
6787 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6791 static final private boolean jj_3R_98() {
6792 if (jj_3R_104()) return true;
6793 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6797 static private boolean jj_initialized_once = false;
6798 static public PHPParserTokenManager token_source;
6799 static SimpleCharStream jj_input_stream;
6800 static public Token token, jj_nt;
6801 static private int jj_ntk;
6802 static private Token jj_scanpos, jj_lastpos;
6803 static private int jj_la;
6804 static public boolean lookingAhead = false;
6805 static private boolean jj_semLA;
6806 static private int jj_gen;
6807 static final private int[] jj_la1 = new int[124];
6808 static private int[] jj_la1_0;
6809 static private int[] jj_la1_1;
6810 static private int[] jj_la1_2;
6811 static private int[] jj_la1_3;
6812 static private int[] jj_la1_4;
6820 private static void jj_la1_0() {
6821 jj_la1_0 = new int[] {0xf960001e,0x6,0x6,0xf960001e,0x0,0xf9600000,0x0,0xc00000,0xc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x68000000,0x0,0x0,0x0,0x0,0x0,0x0,0x68000000,0x60000000,0x8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x8000000,0x0,0x8000000,0x0,0x8000000,0x8000000,0x0,0x0,0x8000000,0x0,0x8000000,0x0,0x0,0x68000000,0x68000000,0x0,0x0,0x68000000,0x0,0x0,0x89000000,0x40000000,0x8000000,0xf9000000,0x8,0x6,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf9600010,0xf9600010,0xf9600000,0xe9600000,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x0,0xe9600010,0xe9600010,0x10000000,0x0,0x68000000,0xf9000010,0xf9000010,0x2000000,0x4000000,0xf9000010,0x2000000,0x4000000,0xf9000010,0xf9000010,0xf9000010,0xf9000010,0xf9000010,0xf9000000,0xf9000000,0x8000000,0x68000000,0x8000000,0xf9000000,0xf9000000,0x8000000,0x0,0x68000000,0x68000000,};
6823 private static void jj_la1_1() {
6824 jj_la1_1 = new int[] {0x875d507f,0x0,0x0,0x875d507f,0x0,0x875d507f,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3080000,0x200,0x30c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x30c0000,0x0,0x30c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30c0000,0x30c0000,0x0,0x30c0000,0x0,0x30c0000,0x0,0x0,0x0,0x40000,0x40000,0x40000,0x0,0x80,0x30c0000,0x30c0000,0x80,0x3080000,0x30c0000,0x0,0x0,0x8455507f,0x0,0x30c0000,0x875d507f,0x0,0x0,0xf,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x0,0x0,0x0,0x0,0x40000,0x0,0x2400,0x2400,0x875d507f,0x875d507f,0x0,0x2400,0x30c0000,0x875d507f,0x875d507f,0x0,0x0,0x875d507f,0x0,0x0,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x40000,0x30c0000,0x40000,0x875d507f,0x875d507f,0x40000,0x0,0x30c0000,0x30c0000,};
6826 private static void jj_la1_2() {
6827 jj_la1_2 = new int[] {0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x13c1c00,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x800,0x0,0x0,0x300000,0x0,0x13c1c00,0x0,0x1000000,0x0,0x1000800,0x1000000,0x3fe,0x13c1c00,0x0,0x13c0c00,0x0,0x4000,0x80010000,0x80010000,0x20000,0x20000,0x0,0x2000000,0x4000000,0x1000000,0x0,0x0,0x0,0x0,0x70000000,0x70000000,0x300000,0x300000,0x8c00000,0x8c00000,0x13c0c00,0x3c0c00,0x300000,0x3c0800,0xc0000,0x800,0x3fe,0xc0000,0xc0000,0x800,0x800,0x800,0x800,0x0,0x13c1ffe,0x13c1ffe,0x0,0x0,0x13c1c00,0x0,0x400,0xc0c00,0x0,0x13c0c00,0x13c1c00,0x0,0x0,0x0,0x800,0x0,0x800,0x0,0x0,0x0,0x0,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x0,0x0,0xc0000,0xc0000,0xc0800,0x8000,0x0,0x0,0x13c1c00,0x13c1c00,0x0,0x0,0x13c1c00,0x13c1c00,0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x0,0x13c9c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c9c00,0xc0800,0x13c1c00,0xc0800,0x13c1c00,0x13c9c00,0xc0800,0x0,0x13c1c00,0x13c1c00,};
6829 private static void jj_la1_3() {
6830 jj_la1_3 = new int[] {0x2288a2,0x0,0x0,0x2288a2,0x200000,0x2288a2,0x0,0x0,0x0,0x400000,0x0,0x20000,0x0,0x20000,0x20800,0x22,0x22,0x8a2,0x0,0x88a2,0x400000,0x0,0x400000,0x0,0x0,0x0,0x88a2,0x0,0x88a2,0x0,0x0,0x0,0x0,0x1,0x1,0x800000,0x0,0x0,0x0,0xe4000000,0xe4000000,0x1b000000,0x1b000000,0x0,0x0,0x0,0x0,0x0,0x0,0x88a2,0x88a2,0x0,0x88a2,0x0,0x88a2,0x0,0x0,0x0,0x800,0x800,0x800,0x800,0x88000,0x88a2,0x88a2,0x80000,0xa2,0x88a2,0x400000,0x0,0x220800,0x0,0x88a2,0x2288a2,0x0,0x0,0x0,0x0,0x400000,0x0,0x0,0x400000,0x400000,0x400000,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x400000,0x0,0x0,0x0,0x800,0x20000,0x0,0x0,0x2288a2,0x2288a2,0x0,0x0,0x88a2,0x2288a2,0x2288a2,0x0,0x0,0x2288a2,0x0,0x0,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x800,0x88a2,0x800,0x2288a2,0x2288a2,0x800,0x400000,0x88a2,0x88a2,};
6832 private static void jj_la1_4() {
6833 jj_la1_4 = new int[] {0x4000,0x0,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x2,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x0,0x4000,0x0,0x4000,0x3ffe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x4000,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x0,0x4000,0x4000,0x0,0x0,0x4000,0x0,0x0,0x4000,0x0,0x4000,0x4000,0x0,0x0,0x0,0x4000,0x0,0x4000,0x2,0x0,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x0,0x2,0x3ffe,0x3ffe,0x4000,0x0,0x0,0x0,0x4000,0x4000,0x0,0x0,0x4000,0x4000,0x4000,0x0,0x0,0x4000,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x0,0x4000,0x4000,};
6835 static final private JJCalls[] jj_2_rtns = new JJCalls[11];
6836 static private boolean jj_rescan = false;
6837 static private int jj_gc = 0;
6839 public PHPParser(java.io.InputStream stream) {
6840 if (jj_initialized_once) {
6841 System.out.println("ERROR: Second call to constructor of static parser. You must");
6842 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6843 System.out.println(" during parser generation.");
6846 jj_initialized_once = true;
6847 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6848 token_source = new PHPParserTokenManager(jj_input_stream);
6849 token = new Token();
6852 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6853 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6856 static public void ReInit(java.io.InputStream stream) {
6857 jj_input_stream.ReInit(stream, 1, 1);
6858 token_source.ReInit(jj_input_stream);
6859 token = new Token();
6862 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6863 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6866 public PHPParser(java.io.Reader stream) {
6867 if (jj_initialized_once) {
6868 System.out.println("ERROR: Second call to constructor of static parser. You must");
6869 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6870 System.out.println(" during parser generation.");
6873 jj_initialized_once = true;
6874 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6875 token_source = new PHPParserTokenManager(jj_input_stream);
6876 token = new Token();
6879 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6880 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6883 static public void ReInit(java.io.Reader stream) {
6884 jj_input_stream.ReInit(stream, 1, 1);
6885 token_source.ReInit(jj_input_stream);
6886 token = new Token();
6889 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6890 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6893 public PHPParser(PHPParserTokenManager tm) {
6894 if (jj_initialized_once) {
6895 System.out.println("ERROR: Second call to constructor of static parser. You must");
6896 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6897 System.out.println(" during parser generation.");
6900 jj_initialized_once = true;
6902 token = new Token();
6905 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6906 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6909 public void ReInit(PHPParserTokenManager tm) {
6911 token = new Token();
6914 for (int i = 0; i < 124; i++) jj_la1[i] = -1;
6915 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6918 static final private Token jj_consume_token(int kind) throws ParseException {
6920 if ((oldToken = token).next != null) token = token.next;
6921 else token = token.next = token_source.getNextToken();
6923 if (token.kind == kind) {
6925 if (++jj_gc > 100) {
6927 for (int i = 0; i < jj_2_rtns.length; i++) {
6928 JJCalls c = jj_2_rtns[i];
6930 if (c.gen < jj_gen) c.first = null;
6939 throw generateParseException();
6942 static final private boolean jj_scan_token(int kind) {
6943 if (jj_scanpos == jj_lastpos) {
6945 if (jj_scanpos.next == null) {
6946 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
6948 jj_lastpos = jj_scanpos = jj_scanpos.next;
6951 jj_scanpos = jj_scanpos.next;
6954 int i = 0; Token tok = token;
6955 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
6956 if (tok != null) jj_add_error_token(kind, i);
6958 return (jj_scanpos.kind != kind);
6961 static final public Token getNextToken() {
6962 if (token.next != null) token = token.next;
6963 else token = token.next = token_source.getNextToken();
6969 static final public Token getToken(int index) {
6970 Token t = lookingAhead ? jj_scanpos : token;
6971 for (int i = 0; i < index; i++) {
6972 if (t.next != null) t = t.next;
6973 else t = t.next = token_source.getNextToken();
6978 static final private int jj_ntk() {
6979 if ((jj_nt=token.next) == null)
6980 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
6982 return (jj_ntk = jj_nt.kind);
6985 static private java.util.Vector jj_expentries = new java.util.Vector();
6986 static private int[] jj_expentry;
6987 static private int jj_kind = -1;
6988 static private int[] jj_lasttokens = new int[100];
6989 static private int jj_endpos;
6991 static private void jj_add_error_token(int kind, int pos) {
6992 if (pos >= 100) return;
6993 if (pos == jj_endpos + 1) {
6994 jj_lasttokens[jj_endpos++] = kind;
6995 } else if (jj_endpos != 0) {
6996 jj_expentry = new int[jj_endpos];
6997 for (int i = 0; i < jj_endpos; i++) {
6998 jj_expentry[i] = jj_lasttokens[i];
7000 boolean exists = false;
7001 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
7002 int[] oldentry = (int[])(enum.nextElement());
7003 if (oldentry.length == jj_expentry.length) {
7005 for (int i = 0; i < jj_expentry.length; i++) {
7006 if (oldentry[i] != jj_expentry[i]) {
7014 if (!exists) jj_expentries.addElement(jj_expentry);
7015 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
7019 static public ParseException generateParseException() {
7020 jj_expentries.removeAllElements();
7021 boolean[] la1tokens = new boolean[143];
7022 for (int i = 0; i < 143; i++) {
7023 la1tokens[i] = false;
7026 la1tokens[jj_kind] = true;
7029 for (int i = 0; i < 124; i++) {
7030 if (jj_la1[i] == jj_gen) {
7031 for (int j = 0; j < 32; j++) {
7032 if ((jj_la1_0[i] & (1<<j)) != 0) {
7033 la1tokens[j] = true;
7035 if ((jj_la1_1[i] & (1<<j)) != 0) {
7036 la1tokens[32+j] = true;
7038 if ((jj_la1_2[i] & (1<<j)) != 0) {
7039 la1tokens[64+j] = true;
7041 if ((jj_la1_3[i] & (1<<j)) != 0) {
7042 la1tokens[96+j] = true;
7044 if ((jj_la1_4[i] & (1<<j)) != 0) {
7045 la1tokens[128+j] = true;
7050 for (int i = 0; i < 143; i++) {
7052 jj_expentry = new int[1];
7054 jj_expentries.addElement(jj_expentry);
7059 jj_add_error_token(0, 0);
7060 int[][] exptokseq = new int[jj_expentries.size()][];
7061 for (int i = 0; i < jj_expentries.size(); i++) {
7062 exptokseq[i] = (int[])jj_expentries.elementAt(i);
7064 return new ParseException(token, exptokseq, tokenImage);
7067 static final public void enable_tracing() {
7070 static final public void disable_tracing() {
7073 static final private void jj_rescan_token() {
7075 for (int i = 0; i < 11; i++) {
7076 JJCalls p = jj_2_rtns[i];
7078 if (p.gen > jj_gen) {
7079 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7081 case 0: jj_3_1(); break;
7082 case 1: jj_3_2(); break;
7083 case 2: jj_3_3(); break;
7084 case 3: jj_3_4(); break;
7085 case 4: jj_3_5(); break;
7086 case 5: jj_3_6(); break;
7087 case 6: jj_3_7(); break;
7088 case 7: jj_3_8(); break;
7089 case 8: jj_3_9(); break;
7090 case 9: jj_3_10(); break;
7091 case 10: jj_3_11(); break;
7095 } while (p != null);
7100 static final private void jj_save(int index, int xla) {
7101 JJCalls p = jj_2_rtns[index];
7102 while (p.gen > jj_gen) {
7103 if (p.next == null) { p = p.next = new JJCalls(); break; }
7106 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7109 static final class JJCalls {