1 /* Generated By:JavaCC: Do not edit this line. PHPParser.java */
4 import org.eclipse.core.resources.IFile;
5 import org.eclipse.core.resources.IMarker;
6 import org.eclipse.core.runtime.CoreException;
7 import org.eclipse.ui.texteditor.MarkerUtilities;
8 import org.eclipse.jface.preference.IPreferenceStore;
10 import java.util.Hashtable;
11 import java.util.ArrayList;
12 import java.io.StringReader;
14 import java.text.MessageFormat;
16 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
17 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
18 import net.sourceforge.phpdt.internal.compiler.ast.*;
19 import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
20 import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
21 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
25 * This php parser is inspired by the Java 1.2 grammar example
26 * given with JavaCC. You can get JavaCC at http://www.webgain.com
27 * You can test the parser with the PHPParserTestCase2.java
28 * @author Matthieu Casanova
30 public final class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
32 /** The file that is parsed. */
33 private static IFile fileToParse;
35 /** The current segment. */
36 private static OutlineableWithChildren currentSegment;
38 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
39 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
40 static PHPOutlineInfo outlineInfo;
42 /** The error level of the current ParseException. */
43 private static int errorLevel = ERROR;
44 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
45 private static String errorMessage;
47 private static int errorStart = -1;
48 private static int errorEnd = -1;
49 private static PHPDocument phpDocument;
51 private static final char[] SYNTAX_ERROR_CHAR = {'s','y','n','t','a','x',' ','e','r','r','o','r'};
53 * The point where html starts.
54 * It will be used by the token manager to create HTMLCode objects
56 public static int htmlStart;
59 private final static int AstStackIncrement = 100;
60 /** The stack of node. */
61 private static AstNode[] nodes;
62 /** The cursor in expression stack. */
63 private static int nodePtr;
65 public final void setFileToParse(final IFile fileToParse) {
66 this.fileToParse = fileToParse;
72 public PHPParser(final IFile fileToParse) {
73 this(new StringReader(""));
74 this.fileToParse = fileToParse;
78 * Reinitialize the parser.
80 private static final void init() {
81 nodes = new AstNode[AstStackIncrement];
87 * Add an php node on the stack.
88 * @param node the node that will be added to the stack
90 private static final void pushOnAstNodes(AstNode node) {
92 nodes[++nodePtr] = node;
93 } catch (IndexOutOfBoundsException e) {
94 int oldStackLength = nodes.length;
95 AstNode[] oldStack = nodes;
96 nodes = new AstNode[oldStackLength + AstStackIncrement];
97 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
98 nodePtr = oldStackLength;
99 nodes[nodePtr] = node;
103 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
104 phpDocument = new PHPDocument(parent,"_root".toCharArray());
105 currentSegment = phpDocument;
106 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
107 final StringReader stream = new StringReader(s);
108 if (jj_input_stream == null) {
109 jj_input_stream = new SimpleCharStream(stream, 1, 1);
115 phpDocument.nodes = new AstNode[nodes.length];
116 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
117 if (PHPeclipsePlugin.DEBUG) {
118 PHPeclipsePlugin.log(1,phpDocument.toString());
120 } catch (ParseException e) {
121 processParseException(e);
127 * This method will process the parse exception.
128 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
129 * @param e the ParseException
131 private static void processParseException(final ParseException e) {
132 if (errorMessage == null) {
133 PHPeclipsePlugin.log(e);
134 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
135 errorStart = SimpleCharStream.getPosition();
136 errorEnd = errorStart + 1;
143 * Create marker for the parse error
144 * @param e the ParseException
146 private static void setMarker(final ParseException e) {
148 if (errorStart == -1) {
149 setMarker(fileToParse,
151 SimpleCharStream.tokenBegin,
152 SimpleCharStream.tokenBegin + e.currentToken.image.length(),
154 "Line " + e.currentToken.beginLine);
156 setMarker(fileToParse,
161 "Line " + e.currentToken.beginLine);
165 } catch (CoreException e2) {
166 PHPeclipsePlugin.log(e2);
170 private static void scanLine(final String output,
173 final int brIndx) throws CoreException {
175 StringBuffer lineNumberBuffer = new StringBuffer(10);
177 current = output.substring(indx, brIndx);
179 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
180 int onLine = current.indexOf("on line <b>");
182 lineNumberBuffer.delete(0, lineNumberBuffer.length());
183 for (int i = onLine; i < current.length(); i++) {
184 ch = current.charAt(i);
185 if ('0' <= ch && '9' >= ch) {
186 lineNumberBuffer.append(ch);
190 int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
192 Hashtable attributes = new Hashtable();
194 current = current.replaceAll("\n", "");
195 current = current.replaceAll("<b>", "");
196 current = current.replaceAll("</b>", "");
197 MarkerUtilities.setMessage(attributes, current);
199 if (current.indexOf(PARSE_ERROR_STRING) != -1)
200 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
201 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
202 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
204 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
205 MarkerUtilities.setLineNumber(attributes, lineNumber);
206 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
211 public final void parse(final String s) throws CoreException {
212 final StringReader stream = new StringReader(s);
213 if (jj_input_stream == null) {
214 jj_input_stream = new SimpleCharStream(stream, 1, 1);
220 } catch (ParseException e) {
221 processParseException(e);
226 * Call the php parse command ( php -l -f <filename> )
227 * and create markers according to the external parser output
229 public static void phpExternalParse(final IFile file) {
230 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
231 final String filename = file.getLocation().toString();
233 final String[] arguments = { filename };
234 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
235 final String command = form.format(arguments);
237 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
240 // parse the buffer to find the errors and warnings
241 createMarkers(parserResult, file);
242 } catch (CoreException e) {
243 PHPeclipsePlugin.log(e);
248 * Put a new html block in the stack.
250 public static final void createNewHTMLCode() {
251 final int currentPosition = SimpleCharStream.getPosition();
252 if (currentPosition == htmlStart) {
255 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray();
256 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
262 public static final void createNewTask() {
263 final int currentPosition = SimpleCharStream.getPosition();
264 final String todo = SimpleCharStream.currentBuffer.substring(currentPosition+1,
265 SimpleCharStream.currentBuffer.indexOf("\n",
268 setMarker(fileToParse,
270 SimpleCharStream.getBeginLine(),
272 "Line "+SimpleCharStream.getBeginLine());
273 } catch (CoreException e) {
274 PHPeclipsePlugin.log(e);
278 private static final void parse() throws ParseException {
282 static final public void phpFile() throws ParseException {
286 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
325 case INTEGER_LITERAL:
326 case FLOATING_POINT_LITERAL:
341 PHPParser.createNewHTMLCode();
342 } catch (TokenMgrError e) {
343 PHPeclipsePlugin.log(e);
344 errorStart = SimpleCharStream.getPosition();
345 errorEnd = errorStart + 1;
346 errorMessage = e.getMessage();
348 {if (true) throw generateParseException();}
353 * A php block is a <?= expression [;]?>
354 * or <?php somephpcode ?>
355 * or <? somephpcode ?>
357 static final public void PhpBlock() throws ParseException {
358 final int start = SimpleCharStream.getPosition();
359 final PHPEchoBlock phpEchoBlock;
360 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
362 phpEchoBlock = phpEchoBlock();
363 pushOnAstNodes(phpEchoBlock);
402 case INTEGER_LITERAL:
403 case FLOATING_POINT_LITERAL:
410 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
413 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
415 jj_consume_token(PHPSTARTLONG);
418 jj_consume_token(PHPSTARTSHORT);
420 setMarker(fileToParse,
421 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
423 SimpleCharStream.getPosition(),
425 "Line " + token.beginLine);
426 } catch (CoreException e) {
427 PHPeclipsePlugin.log(e);
432 jj_consume_token(-1);
433 throw new ParseException();
442 jj_consume_token(PHPEND);
443 } catch (ParseException e) {
444 errorMessage = "'?>' expected";
446 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
447 errorEnd = SimpleCharStream.getPosition() + 1;
448 processParseException(e);
453 jj_consume_token(-1);
454 throw new ParseException();
458 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
459 final Expression expr;
460 final int pos = SimpleCharStream.getPosition();
461 PHPEchoBlock echoBlock;
462 jj_consume_token(PHPECHOSTART);
464 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
466 jj_consume_token(SEMICOLON);
472 jj_consume_token(PHPEND);
473 echoBlock = new PHPEchoBlock(expr,pos,SimpleCharStream.getPosition());
474 pushOnAstNodes(echoBlock);
475 {if (true) return echoBlock;}
476 throw new Error("Missing return statement in function");
479 static final public void Php() throws ParseException {
482 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
517 case INTEGER_LITERAL:
518 case FLOATING_POINT_LITERAL:
535 static final public ClassDeclaration ClassDeclaration() throws ParseException {
536 final ClassDeclaration classDeclaration;
537 final Token className;
538 Token superclassName = null;
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(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(ClassDeclaration classDeclaration) throws ParseException {
633 MethodDeclaration method;
634 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 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 StringBuffer buff = new StringBuffer();
739 final int pos = SimpleCharStream.getPosition();
740 ConstantIdentifier ex;
750 ex = new ConstantIdentifier(expr.toCharArray(),
752 SimpleCharStream.getPosition());
753 expression = VariableSuffix(ex);
755 if (expression == null) {
756 {if (true) return expr;}
758 {if (true) return expression.toStringExpression();}
759 } catch (ParseException e) {
760 errorMessage = "'$' expected for variable identifier";
762 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
763 errorEnd = SimpleCharStream.getPosition() + 1;
766 throw new Error("Missing return statement in function");
770 * Return a variablename without the $.
771 * @return a variable name
773 static final public String Variable() throws ParseException {
774 final StringBuffer buff;
775 Expression expression = null;
778 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
780 token = jj_consume_token(DOLLAR_ID);
781 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
783 jj_consume_token(LBRACE);
784 expression = Expression();
785 jj_consume_token(RBRACE);
791 if (expression == null) {
792 {if (true) return token.image.substring(1);}
794 buff = new StringBuffer(token.image);
796 buff.append(expression.toStringExpression());
798 {if (true) return buff.toString();}
801 jj_consume_token(DOLLAR);
802 expr = VariableName();
803 {if (true) return expr;}
807 jj_consume_token(-1);
808 throw new ParseException();
810 throw new Error("Missing return statement in function");
814 * A Variable name (without the $)
815 * @return a variable name String
817 static final public String VariableName() throws ParseException {
818 final StringBuffer buff;
820 Expression expression = null;
822 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
824 jj_consume_token(LBRACE);
825 expression = Expression();
826 jj_consume_token(RBRACE);
827 buff = new StringBuffer("{");
828 buff.append(expression.toStringExpression());
830 {if (true) return buff.toString();}
833 token = jj_consume_token(IDENTIFIER);
834 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
836 jj_consume_token(LBRACE);
837 expression = Expression();
838 jj_consume_token(RBRACE);
844 if (expression == null) {
845 {if (true) return token.image;}
847 buff = new StringBuffer(token.image);
849 buff.append(expression.toStringExpression());
851 {if (true) return buff.toString();}
854 jj_consume_token(DOLLAR);
855 expr = VariableName();
856 buff = new StringBuffer("$");
858 {if (true) return buff.toString();}
861 token = jj_consume_token(DOLLAR_ID);
862 {if (true) return token.image;}
866 jj_consume_token(-1);
867 throw new ParseException();
869 throw new Error("Missing return statement in function");
872 static final public Expression VariableInitializer() throws ParseException {
873 final Expression expr;
875 final int pos = SimpleCharStream.getPosition();
876 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
880 case INTEGER_LITERAL:
881 case FLOATING_POINT_LITERAL:
884 {if (true) return expr;}
887 jj_consume_token(MINUS);
888 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
889 case INTEGER_LITERAL:
890 token = jj_consume_token(INTEGER_LITERAL);
892 case FLOATING_POINT_LITERAL:
893 token = jj_consume_token(FLOATING_POINT_LITERAL);
897 jj_consume_token(-1);
898 throw new ParseException();
900 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
902 SimpleCharStream.getPosition()),
907 jj_consume_token(PLUS);
908 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
909 case INTEGER_LITERAL:
910 token = jj_consume_token(INTEGER_LITERAL);
912 case FLOATING_POINT_LITERAL:
913 token = jj_consume_token(FLOATING_POINT_LITERAL);
917 jj_consume_token(-1);
918 throw new ParseException();
920 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
922 SimpleCharStream.getPosition()),
927 expr = ArrayDeclarator();
928 {if (true) return expr;}
931 token = jj_consume_token(IDENTIFIER);
932 {if (true) return new ConstantIdentifier(token.image.toCharArray(),pos,SimpleCharStream.getPosition());}
936 jj_consume_token(-1);
937 throw new ParseException();
939 throw new Error("Missing return statement in function");
942 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
943 Expression expr,expr2;
945 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
947 jj_consume_token(ARRAYASSIGN);
948 expr2 = Expression();
949 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
955 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
956 throw new Error("Missing return statement in function");
959 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
960 ArrayVariableDeclaration expr;
961 final ArrayList list = new ArrayList();
962 jj_consume_token(LPAREN);
963 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
979 case INTEGER_LITERAL:
980 case FLOATING_POINT_LITERAL:
985 expr = ArrayVariable();
994 jj_consume_token(COMMA);
995 expr = ArrayVariable();
1000 jj_la1[19] = jj_gen;
1003 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1005 jj_consume_token(COMMA);
1009 jj_la1[20] = jj_gen;
1012 jj_consume_token(RPAREN);
1013 ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1015 {if (true) return vars;}
1016 throw new Error("Missing return statement in function");
1020 * A Method Declaration.
1021 * <b>function</b> MetodDeclarator() Block()
1023 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1024 final MethodDeclaration functionDeclaration;
1026 final OutlineableWithChildren seg = currentSegment;
1027 jj_consume_token(FUNCTION);
1029 functionDeclaration = MethodDeclarator();
1030 outlineInfo.addVariable(new String(functionDeclaration.name));
1031 } catch (ParseException e) {
1032 if (errorMessage != null) {if (true) throw e;}
1033 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1035 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1036 errorEnd = SimpleCharStream.getPosition() + 1;
1037 {if (true) throw e;}
1039 currentSegment = functionDeclaration;
1041 functionDeclaration.statements = block.statements;
1042 currentSegment = seg;
1043 {if (true) return functionDeclaration;}
1044 throw new Error("Missing return statement in function");
1048 * A MethodDeclarator.
1049 * [&] IDENTIFIER(parameters ...).
1050 * @return a function description for the outline
1052 static final public MethodDeclaration MethodDeclarator() throws ParseException {
1053 final Token identifier;
1054 Token reference = null;
1055 final Hashtable formalParameters;
1056 final int pos = SimpleCharStream.getPosition();
1057 char[] identifierChar = SYNTAX_ERROR_CHAR;
1058 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1060 reference = jj_consume_token(BIT_AND);
1063 jj_la1[21] = jj_gen;
1067 identifier = jj_consume_token(IDENTIFIER);
1068 identifierChar = identifier.image.toCharArray();
1069 } catch (ParseException e) {
1070 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1072 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1073 errorEnd = SimpleCharStream.getPosition() + 1;
1074 processParseException(e);
1076 formalParameters = FormalParameters();
1077 {if (true) return new MethodDeclaration(currentSegment,
1082 SimpleCharStream.getPosition());}
1083 throw new Error("Missing return statement in function");
1087 * FormalParameters follows method identifier.
1088 * (FormalParameter())
1090 static final public Hashtable FormalParameters() throws ParseException {
1091 VariableDeclaration var;
1092 final Hashtable parameters = new Hashtable();
1094 jj_consume_token(LPAREN);
1095 } catch (ParseException e) {
1096 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1098 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1099 errorEnd = SimpleCharStream.getPosition() + 1;
1100 processParseException(e);
1102 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1106 var = FormalParameter();
1107 parameters.put(new String(var.name),var);
1110 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1115 jj_la1[22] = jj_gen;
1118 jj_consume_token(COMMA);
1119 var = FormalParameter();
1120 parameters.put(new String(var.name),var);
1124 jj_la1[23] = jj_gen;
1128 jj_consume_token(RPAREN);
1129 } catch (ParseException e) {
1130 errorMessage = "')' expected";
1132 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1133 errorEnd = SimpleCharStream.getPosition() + 1;
1134 processParseException(e);
1136 {if (true) return parameters;}
1137 throw new Error("Missing return statement in function");
1141 * A formal parameter.
1142 * $varname[=value] (,$varname[=value])
1144 static final public VariableDeclaration FormalParameter() throws ParseException {
1145 final VariableDeclaration variableDeclaration;
1147 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1149 token = jj_consume_token(BIT_AND);
1152 jj_la1[24] = jj_gen;
1155 variableDeclaration = VariableDeclarator();
1156 if (token != null) {
1157 variableDeclaration.setReference(true);
1159 {if (true) return variableDeclaration;}
1160 throw new Error("Missing return statement in function");
1163 static final public ConstantIdentifier Type() throws ParseException {
1165 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1167 jj_consume_token(STRING);
1168 pos = SimpleCharStream.getPosition();
1169 {if (true) return new ConstantIdentifier(Types.STRING,pos,pos-6);}
1172 jj_consume_token(BOOL);
1173 pos = SimpleCharStream.getPosition();
1174 {if (true) return new ConstantIdentifier(Types.BOOL,pos,pos-4);}
1177 jj_consume_token(BOOLEAN);
1178 pos = SimpleCharStream.getPosition();
1179 {if (true) return new ConstantIdentifier(Types.BOOLEAN,pos,pos-7);}
1182 jj_consume_token(REAL);
1183 pos = SimpleCharStream.getPosition();
1184 {if (true) return new ConstantIdentifier(Types.REAL,pos,pos-4);}
1187 jj_consume_token(DOUBLE);
1188 pos = SimpleCharStream.getPosition();
1189 {if (true) return new ConstantIdentifier(Types.DOUBLE,pos,pos-5);}
1192 jj_consume_token(FLOAT);
1193 pos = SimpleCharStream.getPosition();
1194 {if (true) return new ConstantIdentifier(Types.FLOAT,pos,pos-5);}
1197 jj_consume_token(INT);
1198 pos = SimpleCharStream.getPosition();
1199 {if (true) return new ConstantIdentifier(Types.INT,pos,pos-3);}
1202 jj_consume_token(INTEGER);
1203 pos = SimpleCharStream.getPosition();
1204 {if (true) return new ConstantIdentifier(Types.INTEGER,pos,pos-7);}
1207 jj_consume_token(OBJECT);
1208 pos = SimpleCharStream.getPosition();
1209 {if (true) return new ConstantIdentifier(Types.OBJECT,pos,pos-6);}
1212 jj_la1[25] = jj_gen;
1213 jj_consume_token(-1);
1214 throw new ParseException();
1216 throw new Error("Missing return statement in function");
1219 static final public Expression Expression() throws ParseException {
1220 final Expression expr;
1221 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1223 expr = PrintExpression();
1224 {if (true) return expr;}
1227 expr = ListExpression();
1228 {if (true) return expr;}
1231 jj_la1[26] = jj_gen;
1232 if (jj_2_3(2147483647)) {
1233 expr = varAssignation();
1234 {if (true) return expr;}
1236 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1250 case INTEGER_LITERAL:
1251 case FLOATING_POINT_LITERAL:
1252 case STRING_LITERAL:
1256 expr = ConditionalExpression();
1257 {if (true) return expr;}
1260 jj_la1[27] = jj_gen;
1261 jj_consume_token(-1);
1262 throw new ParseException();
1266 throw new Error("Missing return statement in function");
1270 * A Variable assignation.
1271 * varName (an assign operator) any expression
1273 static final public VarAssignation varAssignation() throws ParseException {
1275 final Expression initializer;
1276 final int assignOperator;
1277 final int pos = SimpleCharStream.getPosition();
1278 varName = VariableDeclaratorId();
1279 assignOperator = AssignmentOperator();
1281 initializer = Expression();
1282 } catch (ParseException e) {
1283 if (errorMessage != null) {
1284 {if (true) throw e;}
1286 errorMessage = "expression expected";
1288 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1289 errorEnd = SimpleCharStream.getPosition() + 1;
1290 {if (true) throw e;}
1292 {if (true) return new VarAssignation(varName.toCharArray(),
1296 SimpleCharStream.getPosition());}
1297 throw new Error("Missing return statement in function");
1300 static final public int AssignmentOperator() throws ParseException {
1301 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1303 jj_consume_token(ASSIGN);
1304 {if (true) return VarAssignation.EQUAL;}
1307 jj_consume_token(STARASSIGN);
1308 {if (true) return VarAssignation.STAR_EQUAL;}
1311 jj_consume_token(SLASHASSIGN);
1312 {if (true) return VarAssignation.SLASH_EQUAL;}
1315 jj_consume_token(REMASSIGN);
1316 {if (true) return VarAssignation.REM_EQUAL;}
1319 jj_consume_token(PLUSASSIGN);
1320 {if (true) return VarAssignation.PLUS_EQUAL;}
1323 jj_consume_token(MINUSASSIGN);
1324 {if (true) return VarAssignation.MINUS_EQUAL;}
1327 jj_consume_token(LSHIFTASSIGN);
1328 {if (true) return VarAssignation.LSHIFT_EQUAL;}
1330 case RSIGNEDSHIFTASSIGN:
1331 jj_consume_token(RSIGNEDSHIFTASSIGN);
1332 {if (true) return VarAssignation.RSIGNEDSHIFT_EQUAL;}
1335 jj_consume_token(ANDASSIGN);
1336 {if (true) return VarAssignation.AND_EQUAL;}
1339 jj_consume_token(XORASSIGN);
1340 {if (true) return VarAssignation.XOR_EQUAL;}
1343 jj_consume_token(ORASSIGN);
1344 {if (true) return VarAssignation.OR_EQUAL;}
1347 jj_consume_token(DOTASSIGN);
1348 {if (true) return VarAssignation.DOT_EQUAL;}
1351 jj_consume_token(TILDEEQUAL);
1352 {if (true) return VarAssignation.TILDE_EQUAL;}
1355 jj_la1[28] = jj_gen;
1356 jj_consume_token(-1);
1357 throw new ParseException();
1359 throw new Error("Missing return statement in function");
1362 static final public Expression ConditionalExpression() throws ParseException {
1363 final Expression expr;
1364 Expression expr2 = null;
1365 Expression expr3 = null;
1366 expr = ConditionalOrExpression();
1367 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1369 jj_consume_token(HOOK);
1370 expr2 = Expression();
1371 jj_consume_token(COLON);
1372 expr3 = ConditionalExpression();
1375 jj_la1[29] = jj_gen;
1378 if (expr3 == null) {
1379 {if (true) return expr;}
1381 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1382 throw new Error("Missing return statement in function");
1385 static final public Expression ConditionalOrExpression() throws ParseException {
1386 Expression expr,expr2;
1388 expr = ConditionalAndExpression();
1391 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1397 jj_la1[30] = jj_gen;
1400 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1402 jj_consume_token(OR_OR);
1403 operator = OperatorIds.OR_OR;
1406 jj_consume_token(_ORL);
1407 operator = OperatorIds.ORL;
1410 jj_la1[31] = jj_gen;
1411 jj_consume_token(-1);
1412 throw new ParseException();
1414 expr2 = ConditionalAndExpression();
1415 expr = new BinaryExpression(expr,expr2,operator);
1417 {if (true) return expr;}
1418 throw new Error("Missing return statement in function");
1421 static final public Expression ConditionalAndExpression() throws ParseException {
1422 Expression expr,expr2;
1424 expr = ConcatExpression();
1427 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1433 jj_la1[32] = jj_gen;
1436 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1438 jj_consume_token(AND_AND);
1439 operator = OperatorIds.AND_AND;
1442 jj_consume_token(_ANDL);
1443 operator = OperatorIds.ANDL;
1446 jj_la1[33] = jj_gen;
1447 jj_consume_token(-1);
1448 throw new ParseException();
1450 expr2 = ConcatExpression();
1451 expr = new BinaryExpression(expr,expr2,operator);
1453 {if (true) return expr;}
1454 throw new Error("Missing return statement in function");
1457 static final public Expression ConcatExpression() throws ParseException {
1458 Expression expr,expr2;
1459 expr = InclusiveOrExpression();
1462 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1467 jj_la1[34] = jj_gen;
1470 jj_consume_token(DOT);
1471 expr2 = InclusiveOrExpression();
1472 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1474 {if (true) return expr;}
1475 throw new Error("Missing return statement in function");
1478 static final public Expression InclusiveOrExpression() throws ParseException {
1479 Expression expr,expr2;
1480 expr = ExclusiveOrExpression();
1483 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1488 jj_la1[35] = jj_gen;
1491 jj_consume_token(BIT_OR);
1492 expr2 = ExclusiveOrExpression();
1493 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1495 {if (true) return expr;}
1496 throw new Error("Missing return statement in function");
1499 static final public Expression ExclusiveOrExpression() throws ParseException {
1500 Expression expr,expr2;
1501 expr = AndExpression();
1504 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1509 jj_la1[36] = jj_gen;
1512 jj_consume_token(XOR);
1513 expr2 = AndExpression();
1514 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1516 {if (true) return expr;}
1517 throw new Error("Missing return statement in function");
1520 static final public Expression AndExpression() throws ParseException {
1521 Expression expr,expr2;
1522 expr = EqualityExpression();
1525 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1530 jj_la1[37] = jj_gen;
1533 jj_consume_token(BIT_AND);
1534 expr2 = EqualityExpression();
1535 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1537 {if (true) return expr;}
1538 throw new Error("Missing return statement in function");
1541 static final public Expression EqualityExpression() throws ParseException {
1542 Expression expr,expr2;
1544 expr = RelationalExpression();
1547 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1551 case BANGDOUBLEEQUAL:
1556 jj_la1[38] = jj_gen;
1559 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1561 jj_consume_token(EQUAL_EQUAL);
1562 operator = OperatorIds.EQUAL_EQUAL;
1565 jj_consume_token(DIF);
1566 operator = OperatorIds.DIF;
1569 jj_consume_token(NOT_EQUAL);
1570 operator = OperatorIds.DIF;
1572 case BANGDOUBLEEQUAL:
1573 jj_consume_token(BANGDOUBLEEQUAL);
1574 operator = OperatorIds.BANG_EQUAL_EQUAL;
1577 jj_consume_token(TRIPLEEQUAL);
1578 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1581 jj_la1[39] = jj_gen;
1582 jj_consume_token(-1);
1583 throw new ParseException();
1586 expr2 = RelationalExpression();
1587 } catch (ParseException e) {
1588 if (errorMessage != null) {
1589 {if (true) throw e;}
1591 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1593 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1594 errorEnd = SimpleCharStream.getPosition() + 1;
1595 {if (true) throw e;}
1597 expr = new BinaryExpression(expr,expr2,operator);
1599 {if (true) return expr;}
1600 throw new Error("Missing return statement in function");
1603 static final public Expression RelationalExpression() throws ParseException {
1604 Expression expr,expr2;
1606 expr = ShiftExpression();
1609 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1617 jj_la1[40] = jj_gen;
1620 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1622 jj_consume_token(LT);
1623 operator = OperatorIds.LESS;
1626 jj_consume_token(GT);
1627 operator = OperatorIds.GREATER;
1630 jj_consume_token(LE);
1631 operator = OperatorIds.LESS_EQUAL;
1634 jj_consume_token(GE);
1635 operator = OperatorIds.GREATER_EQUAL;
1638 jj_la1[41] = jj_gen;
1639 jj_consume_token(-1);
1640 throw new ParseException();
1642 expr2 = ShiftExpression();
1643 expr = new BinaryExpression(expr,expr2,operator);
1645 {if (true) return expr;}
1646 throw new Error("Missing return statement in function");
1649 static final public Expression ShiftExpression() throws ParseException {
1650 Expression expr,expr2;
1652 expr = AdditiveExpression();
1655 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1658 case RUNSIGNEDSHIFT:
1662 jj_la1[42] = jj_gen;
1665 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1667 jj_consume_token(LSHIFT);
1668 operator = OperatorIds.LEFT_SHIFT;
1671 jj_consume_token(RSIGNEDSHIFT);
1672 operator = OperatorIds.RIGHT_SHIFT;
1674 case RUNSIGNEDSHIFT:
1675 jj_consume_token(RUNSIGNEDSHIFT);
1676 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1679 jj_la1[43] = jj_gen;
1680 jj_consume_token(-1);
1681 throw new ParseException();
1683 expr2 = AdditiveExpression();
1684 expr = new BinaryExpression(expr,expr2,operator);
1686 {if (true) return expr;}
1687 throw new Error("Missing return statement in function");
1690 static final public Expression AdditiveExpression() throws ParseException {
1691 Expression expr,expr2;
1693 expr = MultiplicativeExpression();
1696 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1702 jj_la1[44] = jj_gen;
1705 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1707 jj_consume_token(PLUS);
1708 operator = OperatorIds.PLUS;
1711 jj_consume_token(MINUS);
1712 operator = OperatorIds.MINUS;
1715 jj_la1[45] = jj_gen;
1716 jj_consume_token(-1);
1717 throw new ParseException();
1719 expr2 = MultiplicativeExpression();
1720 expr = new BinaryExpression(expr,expr2,operator);
1722 {if (true) return expr;}
1723 throw new Error("Missing return statement in function");
1726 static final public Expression MultiplicativeExpression() throws ParseException {
1727 Expression expr,expr2;
1730 expr = UnaryExpression();
1731 } catch (ParseException e) {
1732 if (errorMessage != null) {if (true) throw e;}
1733 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1735 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1736 errorEnd = SimpleCharStream.getPosition() + 1;
1737 {if (true) throw e;}
1741 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1748 jj_la1[46] = jj_gen;
1751 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1753 jj_consume_token(STAR);
1754 operator = OperatorIds.MULTIPLY;
1757 jj_consume_token(SLASH);
1758 operator = OperatorIds.DIVIDE;
1761 jj_consume_token(REMAINDER);
1762 operator = OperatorIds.REMAINDER;
1765 jj_la1[47] = jj_gen;
1766 jj_consume_token(-1);
1767 throw new ParseException();
1769 expr2 = UnaryExpression();
1770 expr = new BinaryExpression(expr,expr2,operator);
1772 {if (true) return expr;}
1773 throw new Error("Missing return statement in function");
1777 * An unary expression starting with @, & or nothing
1779 static final public Expression UnaryExpression() throws ParseException {
1781 final int pos = SimpleCharStream.getPosition();
1782 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1784 jj_consume_token(BIT_AND);
1785 expr = UnaryExpressionNoPrefix();
1786 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1800 case INTEGER_LITERAL:
1801 case FLOATING_POINT_LITERAL:
1802 case STRING_LITERAL:
1806 expr = AtUnaryExpression();
1807 {if (true) return expr;}
1810 jj_la1[48] = jj_gen;
1811 jj_consume_token(-1);
1812 throw new ParseException();
1814 throw new Error("Missing return statement in function");
1817 static final public Expression AtUnaryExpression() throws ParseException {
1819 final int pos = SimpleCharStream.getPosition();
1820 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1822 jj_consume_token(AT);
1823 expr = AtUnaryExpression();
1824 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,pos);}
1837 case INTEGER_LITERAL:
1838 case FLOATING_POINT_LITERAL:
1839 case STRING_LITERAL:
1843 expr = UnaryExpressionNoPrefix();
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 UnaryExpressionNoPrefix() throws ParseException {
1857 final int pos = SimpleCharStream.getPosition();
1858 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1861 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1863 jj_consume_token(PLUS);
1864 operator = OperatorIds.PLUS;
1867 jj_consume_token(MINUS);
1868 operator = OperatorIds.MINUS;
1871 jj_la1[50] = jj_gen;
1872 jj_consume_token(-1);
1873 throw new ParseException();
1875 expr = UnaryExpression();
1876 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1880 expr = PreIncDecExpression();
1881 {if (true) return expr;}
1890 case INTEGER_LITERAL:
1891 case FLOATING_POINT_LITERAL:
1892 case STRING_LITERAL:
1896 expr = UnaryExpressionNotPlusMinus();
1897 {if (true) return expr;}
1900 jj_la1[51] = jj_gen;
1901 jj_consume_token(-1);
1902 throw new ParseException();
1904 throw new Error("Missing return statement in function");
1907 static final public Expression PreIncDecExpression() throws ParseException {
1908 final Expression expr;
1910 final int pos = SimpleCharStream.getPosition();
1911 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1913 jj_consume_token(PLUS_PLUS);
1914 operator = OperatorIds.PLUS_PLUS;
1917 jj_consume_token(MINUS_MINUS);
1918 operator = OperatorIds.MINUS_MINUS;
1921 jj_la1[52] = jj_gen;
1922 jj_consume_token(-1);
1923 throw new ParseException();
1925 expr = PrimaryExpression();
1926 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1927 throw new Error("Missing return statement in function");
1930 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
1932 final int pos = SimpleCharStream.getPosition();
1933 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1935 jj_consume_token(BANG);
1936 expr = UnaryExpression();
1937 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1940 jj_la1[53] = jj_gen;
1941 if (jj_2_4(2147483647)) {
1942 expr = CastExpression();
1943 {if (true) return expr;}
1945 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1951 expr = PostfixExpression();
1952 {if (true) return expr;}
1957 case INTEGER_LITERAL:
1958 case FLOATING_POINT_LITERAL:
1959 case STRING_LITERAL:
1961 {if (true) return expr;}
1964 jj_consume_token(LPAREN);
1965 expr = Expression();
1967 jj_consume_token(RPAREN);
1968 } catch (ParseException e) {
1969 errorMessage = "')' expected";
1971 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1972 errorEnd = SimpleCharStream.getPosition() + 1;
1973 {if (true) throw e;}
1975 {if (true) return expr;}
1978 jj_la1[54] = jj_gen;
1979 jj_consume_token(-1);
1980 throw new ParseException();
1984 throw new Error("Missing return statement in function");
1987 static final public CastExpression CastExpression() throws ParseException {
1988 final ConstantIdentifier type;
1989 final Expression expr;
1990 final int pos = SimpleCharStream.getPosition();
1991 jj_consume_token(LPAREN);
1992 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2005 jj_consume_token(ARRAY);
2006 type = new ConstantIdentifier(Types.ARRAY,pos,SimpleCharStream.getPosition());
2009 jj_la1[55] = jj_gen;
2010 jj_consume_token(-1);
2011 throw new ParseException();
2013 jj_consume_token(RPAREN);
2014 expr = UnaryExpression();
2015 {if (true) return new CastExpression(type,expr,pos,SimpleCharStream.getPosition());}
2016 throw new Error("Missing return statement in function");
2019 static final public Expression PostfixExpression() throws ParseException {
2022 final int pos = SimpleCharStream.getPosition();
2023 expr = PrimaryExpression();
2024 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2027 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2029 jj_consume_token(PLUS_PLUS);
2030 operator = OperatorIds.PLUS_PLUS;
2033 jj_consume_token(MINUS_MINUS);
2034 operator = OperatorIds.MINUS_MINUS;
2037 jj_la1[56] = jj_gen;
2038 jj_consume_token(-1);
2039 throw new ParseException();
2043 jj_la1[57] = jj_gen;
2046 if (operator == -1) {
2047 {if (true) return expr;}
2049 {if (true) return new PostfixedUnaryExpression(expr,operator,pos);}
2050 throw new Error("Missing return statement in function");
2053 static final public Expression PrimaryExpression() throws ParseException {
2054 final Token identifier;
2056 final int pos = SimpleCharStream.getPosition();
2058 identifier = jj_consume_token(IDENTIFIER);
2059 jj_consume_token(STATICCLASSACCESS);
2060 expr = ClassIdentifier();
2061 expr = new ClassAccess(new ConstantIdentifier(identifier.image.toCharArray(),
2063 SimpleCharStream.getPosition()),
2065 ClassAccess.STATIC);
2068 if (jj_2_5(2147483647)) {
2073 expr = PrimarySuffix(expr);
2075 {if (true) return expr;}
2077 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2082 expr = PrimaryPrefix();
2085 if (jj_2_6(2147483647)) {
2090 expr = PrimarySuffix(expr);
2092 {if (true) return expr;}
2095 expr = ArrayDeclarator();
2096 {if (true) return expr;}
2099 jj_la1[58] = jj_gen;
2100 jj_consume_token(-1);
2101 throw new ParseException();
2104 throw new Error("Missing return statement in function");
2108 * An array declarator.
2112 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2113 final ArrayVariableDeclaration[] vars;
2114 final int pos = SimpleCharStream.getPosition();
2115 jj_consume_token(ARRAY);
2116 vars = ArrayInitializer();
2117 {if (true) return new ArrayInitializer(vars,pos,SimpleCharStream.getPosition());}
2118 throw new Error("Missing return statement in function");
2121 static final public Expression PrimaryPrefix() throws ParseException {
2122 final Expression expr;
2125 final int pos = SimpleCharStream.getPosition();
2126 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2128 token = jj_consume_token(IDENTIFIER);
2129 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2131 SimpleCharStream.getPosition());}
2134 jj_consume_token(NEW);
2135 expr = ClassIdentifier();
2136 {if (true) return new PrefixedUnaryExpression(expr,
2142 var = VariableDeclaratorId();
2143 {if (true) return new VariableDeclaration(currentSegment,
2146 SimpleCharStream.getPosition());}
2149 jj_la1[59] = jj_gen;
2150 jj_consume_token(-1);
2151 throw new ParseException();
2153 throw new Error("Missing return statement in function");
2156 static final public PrefixedUnaryExpression classInstantiation() throws ParseException {
2158 final StringBuffer buff;
2159 final int pos = SimpleCharStream.getPosition();
2160 jj_consume_token(NEW);
2161 expr = ClassIdentifier();
2162 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2168 buff = new StringBuffer(expr.toStringExpression());
2169 expr = PrimaryExpression();
2170 buff.append(expr.toStringExpression());
2171 expr = new ConstantIdentifier(buff.toString().toCharArray(),
2173 SimpleCharStream.getPosition());
2176 jj_la1[60] = jj_gen;
2179 {if (true) return new PrefixedUnaryExpression(expr,
2182 throw new Error("Missing return statement in function");
2185 static final public ConstantIdentifier ClassIdentifier() throws ParseException {
2188 final int pos = SimpleCharStream.getPosition();
2189 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2191 token = jj_consume_token(IDENTIFIER);
2192 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2194 SimpleCharStream.getPosition());}
2198 expr = VariableDeclaratorId();
2199 {if (true) return new ConstantIdentifier(expr.toCharArray(),
2201 SimpleCharStream.getPosition());}
2204 jj_la1[61] = jj_gen;
2205 jj_consume_token(-1);
2206 throw new ParseException();
2208 throw new Error("Missing return statement in function");
2211 static final public AbstractSuffixExpression PrimarySuffix(Expression prefix) throws ParseException {
2212 final AbstractSuffixExpression expr;
2213 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2215 expr = Arguments(prefix);
2216 {if (true) return expr;}
2220 expr = VariableSuffix(prefix);
2221 {if (true) return expr;}
2224 jj_la1[62] = jj_gen;
2225 jj_consume_token(-1);
2226 throw new ParseException();
2228 throw new Error("Missing return statement in function");
2231 static final public AbstractSuffixExpression VariableSuffix(Expression prefix) throws ParseException {
2233 final int pos = SimpleCharStream.getPosition();
2234 Expression expression = null;
2235 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2237 jj_consume_token(CLASSACCESS);
2239 expr = VariableName();
2240 } catch (ParseException e) {
2241 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2243 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2244 errorEnd = SimpleCharStream.getPosition() + 1;
2245 {if (true) throw e;}
2247 {if (true) return new ClassAccess(prefix,
2248 new ConstantIdentifier(expr.toCharArray(),pos,SimpleCharStream.getPosition()),
2249 ClassAccess.NORMAL);}
2252 jj_consume_token(LBRACKET);
2253 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2278 case INTEGER_LITERAL:
2279 case FLOATING_POINT_LITERAL:
2280 case STRING_LITERAL:
2284 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2300 case INTEGER_LITERAL:
2301 case FLOATING_POINT_LITERAL:
2302 case STRING_LITERAL:
2306 expression = Expression();
2317 expression = Type();
2320 jj_la1[63] = jj_gen;
2321 jj_consume_token(-1);
2322 throw new ParseException();
2326 jj_la1[64] = jj_gen;
2330 jj_consume_token(RBRACKET);
2331 } catch (ParseException e) {
2332 errorMessage = "']' expected";
2334 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2335 errorEnd = SimpleCharStream.getPosition() + 1;
2336 {if (true) throw e;}
2338 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2341 jj_la1[65] = jj_gen;
2342 jj_consume_token(-1);
2343 throw new ParseException();
2345 throw new Error("Missing return statement in function");
2348 static final public Literal Literal() throws ParseException {
2351 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2352 case INTEGER_LITERAL:
2353 token = jj_consume_token(INTEGER_LITERAL);
2354 pos = SimpleCharStream.getPosition();
2355 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2357 case FLOATING_POINT_LITERAL:
2358 token = jj_consume_token(FLOATING_POINT_LITERAL);
2359 pos = SimpleCharStream.getPosition();
2360 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2362 case STRING_LITERAL:
2363 token = jj_consume_token(STRING_LITERAL);
2364 pos = SimpleCharStream.getPosition();
2365 {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length());}
2368 jj_consume_token(TRUE);
2369 pos = SimpleCharStream.getPosition();
2370 {if (true) return new TrueLiteral(pos-4,pos);}
2373 jj_consume_token(FALSE);
2374 pos = SimpleCharStream.getPosition();
2375 {if (true) return new FalseLiteral(pos-4,pos);}
2378 jj_consume_token(NULL);
2379 pos = SimpleCharStream.getPosition();
2380 {if (true) return new NullLiteral(pos-4,pos);}
2383 jj_la1[66] = jj_gen;
2384 jj_consume_token(-1);
2385 throw new ParseException();
2387 throw new Error("Missing return statement in function");
2390 static final public FunctionCall Arguments(Expression func) throws ParseException {
2391 Expression[] args = null;
2392 jj_consume_token(LPAREN);
2393 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2409 case INTEGER_LITERAL:
2410 case FLOATING_POINT_LITERAL:
2411 case STRING_LITERAL:
2415 args = ArgumentList();
2418 jj_la1[67] = jj_gen;
2422 jj_consume_token(RPAREN);
2423 } catch (ParseException e) {
2424 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2426 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2427 errorEnd = SimpleCharStream.getPosition() + 1;
2428 {if (true) throw e;}
2430 {if (true) return new FunctionCall(func,args,SimpleCharStream.getPosition());}
2431 throw new Error("Missing return statement in function");
2435 * An argument list is a list of arguments separated by comma :
2436 * argumentDeclaration() (, argumentDeclaration)*
2437 * @return an array of arguments
2439 static final public Expression[] ArgumentList() throws ParseException {
2441 final ArrayList list = new ArrayList();
2446 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2451 jj_la1[68] = jj_gen;
2454 jj_consume_token(COMMA);
2458 } catch (ParseException e) {
2459 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2461 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2462 errorEnd = SimpleCharStream.getPosition() + 1;
2463 {if (true) throw e;}
2466 Expression[] arguments = new Expression[list.size()];
2467 list.toArray(arguments);
2468 {if (true) return arguments;}
2469 throw new Error("Missing return statement in function");
2473 * A Statement without break.
2475 static final public Statement StatementNoBreak() throws ParseException {
2476 final Statement statement;
2479 statement = Expression();
2481 jj_consume_token(SEMICOLON);
2482 } catch (ParseException e) {
2483 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2484 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2486 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2487 errorEnd = SimpleCharStream.getPosition() + 1;
2488 {if (true) throw e;}
2491 {if (true) return statement;}
2492 } else if (jj_2_9(2)) {
2493 statement = LabeledStatement();
2494 {if (true) return statement;}
2496 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2498 statement = Block();
2499 {if (true) return statement;}
2502 statement = EmptyStatement();
2503 {if (true) return statement;}
2512 statement = StatementExpression();
2514 jj_consume_token(SEMICOLON);
2515 } catch (ParseException e) {
2516 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2518 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2519 errorEnd = SimpleCharStream.getPosition() + 1;
2520 {if (true) throw e;}
2522 {if (true) return statement;}
2525 statement = SwitchStatement();
2526 {if (true) return statement;}
2529 statement = IfStatement();
2530 {if (true) return statement;}
2533 statement = WhileStatement();
2534 {if (true) return statement;}
2537 statement = DoStatement();
2538 {if (true) return statement;}
2541 statement = ForStatement();
2542 {if (true) return statement;}
2545 statement = ForeachStatement();
2546 {if (true) return statement;}
2549 statement = ContinueStatement();
2550 {if (true) return statement;}
2553 statement = ReturnStatement();
2554 {if (true) return statement;}
2557 statement = EchoStatement();
2558 {if (true) return statement;}
2565 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2567 token = jj_consume_token(AT);
2570 jj_la1[69] = jj_gen;
2573 statement = IncludeStatement();
2574 if (token != null) {
2575 ((InclusionStatement)statement).silent = true;
2577 {if (true) return statement;}
2580 statement = StaticStatement();
2581 {if (true) return statement;}
2584 statement = GlobalStatement();
2585 {if (true) return statement;}
2588 statement = defineStatement();
2589 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2592 jj_la1[70] = jj_gen;
2593 jj_consume_token(-1);
2594 throw new ParseException();
2597 throw new Error("Missing return statement in function");
2600 static final public Define defineStatement() throws ParseException {
2601 final int start = SimpleCharStream.getPosition();
2602 Expression defineName,defineValue;
2603 jj_consume_token(DEFINE);
2605 jj_consume_token(LPAREN);
2606 } catch (ParseException e) {
2607 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2609 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2610 errorEnd = SimpleCharStream.getPosition() + 1;
2611 processParseException(e);
2614 defineName = Expression();
2615 } catch (ParseException e) {
2616 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2618 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2619 errorEnd = SimpleCharStream.getPosition() + 1;
2620 {if (true) throw e;}
2623 jj_consume_token(COMMA);
2624 } catch (ParseException e) {
2625 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2627 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2628 errorEnd = SimpleCharStream.getPosition() + 1;
2629 processParseException(e);
2632 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2634 defineValue = PrintExpression();
2637 jj_la1[71] = jj_gen;
2638 if (jj_2_10(2147483647)) {
2639 defineValue = varAssignation();
2641 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2655 case INTEGER_LITERAL:
2656 case FLOATING_POINT_LITERAL:
2657 case STRING_LITERAL:
2661 defineValue = ConditionalExpression();
2664 jj_la1[72] = jj_gen;
2665 jj_consume_token(-1);
2666 throw new ParseException();
2670 } catch (ParseException e) {
2671 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2673 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2674 errorEnd = SimpleCharStream.getPosition() + 1;
2675 {if (true) throw e;}
2678 jj_consume_token(RPAREN);
2679 } catch (ParseException e) {
2680 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2682 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2683 errorEnd = SimpleCharStream.getPosition() + 1;
2684 processParseException(e);
2686 {if (true) return new Define(currentSegment,
2690 SimpleCharStream.getPosition());}
2691 throw new Error("Missing return statement in function");
2695 * A Normal statement.
2697 static final public Statement Statement() throws ParseException {
2698 final Statement statement;
2699 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2731 case INTEGER_LITERAL:
2732 case FLOATING_POINT_LITERAL:
2733 case STRING_LITERAL:
2739 statement = StatementNoBreak();
2740 {if (true) return statement;}
2743 statement = BreakStatement();
2744 {if (true) return statement;}
2747 jj_la1[73] = jj_gen;
2748 jj_consume_token(-1);
2749 throw new ParseException();
2751 throw new Error("Missing return statement in function");
2755 * An html block inside a php syntax.
2757 static final public HTMLBlock htmlBlock() throws ParseException {
2758 final int startIndex = nodePtr;
2759 AstNode[] blockNodes;
2761 jj_consume_token(PHPEND);
2764 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2769 jj_la1[74] = jj_gen;
2775 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2777 jj_consume_token(PHPSTARTLONG);
2780 jj_consume_token(PHPSTARTSHORT);
2783 jj_la1[75] = jj_gen;
2784 jj_consume_token(-1);
2785 throw new ParseException();
2787 } catch (ParseException e) {
2788 errorMessage = "unexpected end of file , '<?php' expected";
2790 errorStart = SimpleCharStream.getPosition();
2791 errorEnd = SimpleCharStream.getPosition();
2792 {if (true) throw e;}
2794 nbNodes = nodePtr - startIndex;
2795 blockNodes = new AstNode[nbNodes];
2796 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2797 nodePtr = startIndex;
2798 {if (true) return new HTMLBlock(blockNodes);}
2799 throw new Error("Missing return statement in function");
2803 * An include statement. It's "include" an expression;
2805 static final public InclusionStatement IncludeStatement() throws ParseException {
2806 final Expression expr;
2808 final int pos = SimpleCharStream.getPosition();
2809 final InclusionStatement inclusionStatement;
2810 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2812 jj_consume_token(REQUIRE);
2813 keyword = InclusionStatement.REQUIRE;
2816 jj_consume_token(REQUIRE_ONCE);
2817 keyword = InclusionStatement.REQUIRE_ONCE;
2820 jj_consume_token(INCLUDE);
2821 keyword = InclusionStatement.INCLUDE;
2824 jj_consume_token(INCLUDE_ONCE);
2825 keyword = InclusionStatement.INCLUDE_ONCE;
2828 jj_la1[76] = jj_gen;
2829 jj_consume_token(-1);
2830 throw new ParseException();
2833 expr = Expression();
2834 } catch (ParseException e) {
2835 if (errorMessage != null) {
2836 {if (true) throw e;}
2838 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
2840 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2841 errorEnd = SimpleCharStream.getPosition() + 1;
2842 {if (true) throw e;}
2844 inclusionStatement = new InclusionStatement(currentSegment,
2848 currentSegment.add(inclusionStatement);
2850 jj_consume_token(SEMICOLON);
2851 } catch (ParseException e) {
2852 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2854 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2855 errorEnd = SimpleCharStream.getPosition() + 1;
2856 {if (true) throw e;}
2858 {if (true) return inclusionStatement;}
2859 throw new Error("Missing return statement in function");
2862 static final public PrintExpression PrintExpression() throws ParseException {
2863 final Expression expr;
2864 final int pos = SimpleCharStream.getPosition();
2865 jj_consume_token(PRINT);
2866 expr = Expression();
2867 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
2868 throw new Error("Missing return statement in function");
2871 static final public ListExpression ListExpression() throws ParseException {
2873 Expression expression = null;
2874 ArrayList list = new ArrayList();
2875 final int pos = SimpleCharStream.getPosition();
2876 jj_consume_token(LIST);
2878 jj_consume_token(LPAREN);
2879 } catch (ParseException e) {
2880 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2882 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2883 errorEnd = SimpleCharStream.getPosition() + 1;
2884 {if (true) throw e;}
2886 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2889 expr = VariableDeclaratorId();
2893 jj_la1[77] = jj_gen;
2896 if (expr == null) list.add(null);
2899 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2904 jj_la1[78] = jj_gen;
2908 jj_consume_token(COMMA);
2909 } catch (ParseException e) {
2910 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2912 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2913 errorEnd = SimpleCharStream.getPosition() + 1;
2914 {if (true) throw e;}
2916 expr = VariableDeclaratorId();
2920 jj_consume_token(RPAREN);
2921 } catch (ParseException e) {
2922 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2924 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2925 errorEnd = SimpleCharStream.getPosition() + 1;
2926 {if (true) throw e;}
2928 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2930 jj_consume_token(ASSIGN);
2931 expression = Expression();
2932 String[] strings = new String[list.size()];
2933 list.toArray(strings);
2934 {if (true) return new ListExpression(strings,
2937 SimpleCharStream.getPosition());}
2940 jj_la1[79] = jj_gen;
2943 String[] strings = new String[list.size()];
2944 list.toArray(strings);
2945 {if (true) return new ListExpression(strings,pos,SimpleCharStream.getPosition());}
2946 throw new Error("Missing return statement in function");
2950 * An echo statement.
2951 * echo anyexpression (, otherexpression)*
2953 static final public EchoStatement EchoStatement() throws ParseException {
2954 final ArrayList expressions = new ArrayList();
2956 final int pos = SimpleCharStream.getPosition();
2957 jj_consume_token(ECHO);
2958 expr = Expression();
2959 expressions.add(expr);
2962 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2967 jj_la1[80] = jj_gen;
2970 jj_consume_token(COMMA);
2971 expr = Expression();
2972 expressions.add(expr);
2975 jj_consume_token(SEMICOLON);
2976 } catch (ParseException e) {
2977 if (e.currentToken.next.kind != 4) {
2978 errorMessage = "';' expected after 'echo' statement";
2980 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2981 errorEnd = SimpleCharStream.getPosition() + 1;
2982 {if (true) throw e;}
2985 Expression[] exprs = new Expression[expressions.size()];
2986 expressions.toArray(exprs);
2987 {if (true) return new EchoStatement(exprs,pos);}
2988 throw new Error("Missing return statement in function");
2991 static final public GlobalStatement GlobalStatement() throws ParseException {
2992 final int pos = SimpleCharStream.getPosition();
2994 ArrayList vars = new ArrayList();
2995 GlobalStatement global;
2996 jj_consume_token(GLOBAL);
2997 expr = VariableDeclaratorId();
3001 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3006 jj_la1[81] = jj_gen;
3009 jj_consume_token(COMMA);
3010 expr = VariableDeclaratorId();
3014 jj_consume_token(SEMICOLON);
3015 String[] strings = new String[vars.size()];
3016 vars.toArray(strings);
3017 global = new GlobalStatement(currentSegment,
3020 SimpleCharStream.getPosition());
3021 currentSegment.add(global);
3022 {if (true) return global;}
3023 } catch (ParseException e) {
3024 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3026 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3027 errorEnd = SimpleCharStream.getPosition() + 1;
3028 {if (true) throw e;}
3030 throw new Error("Missing return statement in function");
3033 static final public StaticStatement StaticStatement() throws ParseException {
3034 final int pos = SimpleCharStream.getPosition();
3035 final ArrayList vars = new ArrayList();
3036 VariableDeclaration expr;
3037 jj_consume_token(STATIC);
3038 expr = VariableDeclarator();
3039 vars.add(new String(expr.name));
3042 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3047 jj_la1[82] = jj_gen;
3050 jj_consume_token(COMMA);
3051 expr = VariableDeclarator();
3052 vars.add(new String(expr.name));
3055 jj_consume_token(SEMICOLON);
3056 String[] strings = new String[vars.size()];
3057 vars.toArray(strings);
3058 {if (true) return new StaticStatement(strings,
3060 SimpleCharStream.getPosition());}
3061 } catch (ParseException e) {
3062 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3064 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3065 errorEnd = SimpleCharStream.getPosition() + 1;
3066 {if (true) throw e;}
3068 throw new Error("Missing return statement in function");
3071 static final public LabeledStatement LabeledStatement() throws ParseException {
3072 final int pos = SimpleCharStream.getPosition();
3074 final Statement statement;
3075 label = jj_consume_token(IDENTIFIER);
3076 jj_consume_token(COLON);
3077 statement = Statement();
3078 {if (true) return new LabeledStatement(label.image.toCharArray(),statement,pos,SimpleCharStream.getPosition());}
3079 throw new Error("Missing return statement in function");
3089 static final public Block Block() throws ParseException {
3090 final int pos = SimpleCharStream.getPosition();
3091 final ArrayList list = new ArrayList();
3092 Statement statement;
3094 jj_consume_token(LBRACE);
3095 } catch (ParseException e) {
3096 errorMessage = "'{' expected";
3098 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3099 errorEnd = SimpleCharStream.getPosition() + 1;
3100 {if (true) throw e;}
3104 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3140 case INTEGER_LITERAL:
3141 case FLOATING_POINT_LITERAL:
3142 case STRING_LITERAL:
3151 jj_la1[83] = jj_gen;
3154 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3189 case INTEGER_LITERAL:
3190 case FLOATING_POINT_LITERAL:
3191 case STRING_LITERAL:
3197 statement = BlockStatement();
3198 list.add(statement);
3201 statement = htmlBlock();
3202 list.add(statement);
3205 jj_la1[84] = jj_gen;
3206 jj_consume_token(-1);
3207 throw new ParseException();
3211 jj_consume_token(RBRACE);
3212 } catch (ParseException e) {
3213 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3215 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3216 errorEnd = SimpleCharStream.getPosition() + 1;
3217 {if (true) throw e;}
3219 Statement[] statements = new Statement[list.size()];
3220 list.toArray(statements);
3221 {if (true) return new Block(statements,pos,SimpleCharStream.getPosition());}
3222 throw new Error("Missing return statement in function");
3225 static final public Statement BlockStatement() throws ParseException {
3226 final Statement statement;
3227 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3260 case INTEGER_LITERAL:
3261 case FLOATING_POINT_LITERAL:
3262 case STRING_LITERAL:
3269 statement = Statement();
3270 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3271 {if (true) return statement;}
3272 } catch (ParseException e) {
3273 if (errorMessage != null) {if (true) throw e;}
3274 errorMessage = "statement expected";
3276 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3277 errorEnd = SimpleCharStream.getPosition() + 1;
3278 {if (true) throw e;}
3282 statement = ClassDeclaration();
3283 {if (true) return statement;}
3286 statement = MethodDeclaration();
3287 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3288 currentSegment.add((MethodDeclaration) statement);
3289 {if (true) return statement;}
3292 jj_la1[85] = jj_gen;
3293 jj_consume_token(-1);
3294 throw new ParseException();
3296 throw new Error("Missing return statement in function");
3300 * A Block statement that will not contain any 'break'
3302 static final public Statement BlockStatementNoBreak() throws ParseException {
3303 final Statement statement;
3304 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3336 case INTEGER_LITERAL:
3337 case FLOATING_POINT_LITERAL:
3338 case STRING_LITERAL:
3344 statement = StatementNoBreak();
3345 {if (true) return statement;}
3348 statement = ClassDeclaration();
3349 {if (true) return statement;}
3352 statement = MethodDeclaration();
3353 currentSegment.add((MethodDeclaration) statement);
3354 {if (true) return statement;}
3357 jj_la1[86] = jj_gen;
3358 jj_consume_token(-1);
3359 throw new ParseException();
3361 throw new Error("Missing return statement in function");
3364 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3365 final ArrayList list = new ArrayList();
3366 VariableDeclaration var;
3367 var = LocalVariableDeclarator();
3371 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3376 jj_la1[87] = jj_gen;
3379 jj_consume_token(COMMA);
3380 var = LocalVariableDeclarator();
3383 VariableDeclaration[] vars = new VariableDeclaration[list.size()];
3385 {if (true) return vars;}
3386 throw new Error("Missing return statement in function");
3389 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3390 final String varName;
3391 Expression initializer = null;
3392 final int pos = SimpleCharStream.getPosition();
3393 varName = VariableDeclaratorId();
3394 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3396 jj_consume_token(ASSIGN);
3397 initializer = Expression();
3400 jj_la1[88] = jj_gen;
3403 if (initializer == null) {
3404 {if (true) return new VariableDeclaration(currentSegment,
3405 varName.toCharArray(),
3407 SimpleCharStream.getPosition());}
3409 {if (true) return new VariableDeclaration(currentSegment,
3410 varName.toCharArray(),
3413 throw new Error("Missing return statement in function");
3416 static final public EmptyStatement EmptyStatement() throws ParseException {
3418 jj_consume_token(SEMICOLON);
3419 pos = SimpleCharStream.getPosition();
3420 {if (true) return new EmptyStatement(pos-1,pos);}
3421 throw new Error("Missing return statement in function");
3424 static final public Expression StatementExpression() throws ParseException {
3425 Expression expr,expr2;
3427 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3430 expr = PreIncDecExpression();
3431 {if (true) return expr;}
3438 expr = PrimaryExpression();
3439 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3454 case RSIGNEDSHIFTASSIGN:
3455 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3457 jj_consume_token(PLUS_PLUS);
3458 {if (true) return new PostfixedUnaryExpression(expr,
3459 OperatorIds.PLUS_PLUS,
3460 SimpleCharStream.getPosition());}
3463 jj_consume_token(MINUS_MINUS);
3464 {if (true) return new PostfixedUnaryExpression(expr,
3465 OperatorIds.MINUS_MINUS,
3466 SimpleCharStream.getPosition());}
3480 case RSIGNEDSHIFTASSIGN:
3481 operator = AssignmentOperator();
3482 expr2 = Expression();
3483 {if (true) return new BinaryExpression(expr,expr2,operator);}
3486 jj_la1[89] = jj_gen;
3487 jj_consume_token(-1);
3488 throw new ParseException();
3492 jj_la1[90] = jj_gen;
3495 {if (true) return expr;}
3498 jj_la1[91] = jj_gen;
3499 jj_consume_token(-1);
3500 throw new ParseException();
3502 throw new Error("Missing return statement in function");
3505 static final public SwitchStatement SwitchStatement() throws ParseException {
3506 final Expression variable;
3507 final AbstractCase[] cases;
3508 final int pos = SimpleCharStream.getPosition();
3509 jj_consume_token(SWITCH);
3511 jj_consume_token(LPAREN);
3512 } catch (ParseException e) {
3513 errorMessage = "'(' expected after 'switch'";
3515 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3516 errorEnd = SimpleCharStream.getPosition() + 1;
3517 {if (true) throw e;}
3520 variable = Expression();
3521 } catch (ParseException e) {
3522 if (errorMessage != null) {
3523 {if (true) throw e;}
3525 errorMessage = "expression expected";
3527 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3528 errorEnd = SimpleCharStream.getPosition() + 1;
3529 {if (true) throw e;}
3532 jj_consume_token(RPAREN);
3533 } catch (ParseException e) {
3534 errorMessage = "')' expected";
3536 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3537 errorEnd = SimpleCharStream.getPosition() + 1;
3538 {if (true) throw e;}
3540 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3542 cases = switchStatementBrace();
3545 cases = switchStatementColon(pos, pos + 6);
3548 jj_la1[92] = jj_gen;
3549 jj_consume_token(-1);
3550 throw new ParseException();
3552 {if (true) return new SwitchStatement(variable,cases,pos,SimpleCharStream.getPosition());}
3553 throw new Error("Missing return statement in function");
3556 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3558 final ArrayList cases = new ArrayList();
3559 jj_consume_token(LBRACE);
3562 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3568 jj_la1[93] = jj_gen;
3571 cas = switchLabel0();
3575 jj_consume_token(RBRACE);
3576 AbstractCase[] abcase = new AbstractCase[cases.size()];
3577 cases.toArray(abcase);
3578 {if (true) return abcase;}
3579 } catch (ParseException e) {
3580 errorMessage = "'}' expected";
3582 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3583 errorEnd = SimpleCharStream.getPosition() + 1;
3584 {if (true) throw e;}
3586 throw new Error("Missing return statement in function");
3590 * A Switch statement with : ... endswitch;
3591 * @param start the begin offset of the switch
3592 * @param end the end offset of the switch
3594 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3596 final ArrayList cases = new ArrayList();
3597 jj_consume_token(COLON);
3599 setMarker(fileToParse,
3600 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3604 "Line " + token.beginLine);
3605 } catch (CoreException e) {
3606 PHPeclipsePlugin.log(e);
3610 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3616 jj_la1[94] = jj_gen;
3619 cas = switchLabel0();
3623 jj_consume_token(ENDSWITCH);
3624 } catch (ParseException e) {
3625 errorMessage = "'endswitch' expected";
3627 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3628 errorEnd = SimpleCharStream.getPosition() + 1;
3629 {if (true) throw e;}
3632 jj_consume_token(SEMICOLON);
3633 AbstractCase[] abcase = new AbstractCase[cases.size()];
3634 cases.toArray(abcase);
3635 {if (true) return abcase;}
3636 } catch (ParseException e) {
3637 errorMessage = "';' expected after 'endswitch' keyword";
3639 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3640 errorEnd = SimpleCharStream.getPosition() + 1;
3641 {if (true) throw e;}
3643 throw new Error("Missing return statement in function");
3646 static final public AbstractCase switchLabel0() throws ParseException {
3647 final Expression expr;
3648 Statement statement;
3649 final ArrayList stmts = new ArrayList();
3650 final int pos = SimpleCharStream.getPosition();
3651 expr = SwitchLabel();
3654 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3689 case INTEGER_LITERAL:
3690 case FLOATING_POINT_LITERAL:
3691 case STRING_LITERAL:
3700 jj_la1[95] = jj_gen;
3703 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3737 case INTEGER_LITERAL:
3738 case FLOATING_POINT_LITERAL:
3739 case STRING_LITERAL:
3745 statement = BlockStatementNoBreak();
3746 stmts.add(statement);
3749 statement = htmlBlock();
3750 stmts.add(statement);
3753 jj_la1[96] = jj_gen;
3754 jj_consume_token(-1);
3755 throw new ParseException();
3758 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3760 statement = BreakStatement();
3761 stmts.add(statement);
3764 jj_la1[97] = jj_gen;
3767 Statement[] stmtsArray = new Statement[stmts.size()];
3768 stmts.toArray(stmtsArray);
3769 if (expr == null) {//it's a default
3770 {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3772 {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3773 throw new Error("Missing return statement in function");
3778 * case Expression() :
3780 * @return the if it was a case and null if not
3782 static final public Expression SwitchLabel() throws ParseException {
3783 final Expression expr;
3784 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3786 token = jj_consume_token(CASE);
3788 expr = Expression();
3789 } catch (ParseException e) {
3790 if (errorMessage != null) {if (true) throw e;}
3791 errorMessage = "expression expected after 'case' keyword";
3793 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3794 errorEnd = SimpleCharStream.getPosition() + 1;
3795 {if (true) throw e;}
3798 jj_consume_token(COLON);
3799 {if (true) return expr;}
3800 } catch (ParseException e) {
3801 errorMessage = "':' expected after case expression";
3803 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3804 errorEnd = SimpleCharStream.getPosition() + 1;
3805 {if (true) throw e;}
3809 token = jj_consume_token(_DEFAULT);
3811 jj_consume_token(COLON);
3812 {if (true) return null;}
3813 } catch (ParseException e) {
3814 errorMessage = "':' expected after 'default' keyword";
3816 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3817 errorEnd = SimpleCharStream.getPosition() + 1;
3818 {if (true) throw e;}
3822 jj_la1[98] = jj_gen;
3823 jj_consume_token(-1);
3824 throw new ParseException();
3826 throw new Error("Missing return statement in function");
3829 static final public Break BreakStatement() throws ParseException {
3830 Expression expression = null;
3831 final int start = SimpleCharStream.getPosition();
3832 jj_consume_token(BREAK);
3833 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3849 case INTEGER_LITERAL:
3850 case FLOATING_POINT_LITERAL:
3851 case STRING_LITERAL:
3855 expression = Expression();
3858 jj_la1[99] = jj_gen;
3862 jj_consume_token(SEMICOLON);
3863 } catch (ParseException e) {
3864 errorMessage = "';' expected after 'break' keyword";
3866 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3867 errorEnd = SimpleCharStream.getPosition() + 1;
3868 {if (true) throw e;}
3870 {if (true) return new Break(expression, start, SimpleCharStream.getPosition());}
3871 throw new Error("Missing return statement in function");
3874 static final public IfStatement IfStatement() throws ParseException {
3875 final int pos = SimpleCharStream.getPosition();
3876 Expression condition;
3877 IfStatement ifStatement;
3878 jj_consume_token(IF);
3879 condition = Condition("if");
3880 ifStatement = IfStatement0(condition, pos,pos+2);
3881 {if (true) return ifStatement;}
3882 throw new Error("Missing return statement in function");
3885 static final public Expression Condition(final String keyword) throws ParseException {
3886 final Expression condition;
3888 jj_consume_token(LPAREN);
3889 } catch (ParseException e) {
3890 errorMessage = "'(' expected after " + keyword + " keyword";
3892 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length();
3893 errorEnd = errorStart +1;
3894 processParseException(e);
3896 condition = Expression();
3898 jj_consume_token(RPAREN);
3899 } catch (ParseException e) {
3900 errorMessage = "')' expected after " + keyword + " keyword";
3902 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3903 errorEnd = SimpleCharStream.getPosition() + 1;
3904 processParseException(e);
3906 {if (true) return condition;}
3907 throw new Error("Missing return statement in function");
3910 static final public IfStatement IfStatement0(Expression condition, final int start,final int end) throws ParseException {
3911 Statement statement;
3913 final Statement[] statementsArray;
3914 ElseIf elseifStatement;
3915 Else elseStatement = null;
3917 final ArrayList elseIfList = new ArrayList();
3919 int pos = SimpleCharStream.getPosition();
3921 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3923 jj_consume_token(COLON);
3924 stmts = new ArrayList();
3927 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3961 case INTEGER_LITERAL:
3962 case FLOATING_POINT_LITERAL:
3963 case STRING_LITERAL:
3972 jj_la1[100] = jj_gen;
3975 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4008 case INTEGER_LITERAL:
4009 case FLOATING_POINT_LITERAL:
4010 case STRING_LITERAL:
4016 statement = Statement();
4017 stmts.add(statement);
4020 statement = htmlBlock();
4021 stmts.add(statement);
4024 jj_la1[101] = jj_gen;
4025 jj_consume_token(-1);
4026 throw new ParseException();
4029 endStatements = SimpleCharStream.getPosition();
4032 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4037 jj_la1[102] = jj_gen;
4040 elseifStatement = ElseIfStatementColon();
4041 elseIfList.add(elseifStatement);
4043 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4045 elseStatement = ElseStatementColon();
4048 jj_la1[103] = jj_gen;
4052 setMarker(fileToParse,
4053 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4057 "Line " + token.beginLine);
4058 } catch (CoreException e) {
4059 PHPeclipsePlugin.log(e);
4062 jj_consume_token(ENDIF);
4063 } catch (ParseException e) {
4064 errorMessage = "'endif' expected";
4066 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4067 errorEnd = SimpleCharStream.getPosition() + 1;
4068 {if (true) throw e;}
4071 jj_consume_token(SEMICOLON);
4072 } catch (ParseException e) {
4073 errorMessage = "';' expected after 'endif' keyword";
4075 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4076 errorEnd = SimpleCharStream.getPosition() + 1;
4077 {if (true) throw e;}
4079 elseIfs = new ElseIf[elseIfList.size()];
4080 elseIfList.toArray(elseIfs);
4081 if (stmts.size() == 1) {
4082 {if (true) return new IfStatement(condition,
4083 (Statement) stmts.get(0),
4087 SimpleCharStream.getPosition());}
4089 statementsArray = new Statement[stmts.size()];
4090 stmts.toArray(statementsArray);
4091 {if (true) return new IfStatement(condition,
4092 new Block(statementsArray,pos,endStatements),
4096 SimpleCharStream.getPosition());}
4132 case INTEGER_LITERAL:
4133 case FLOATING_POINT_LITERAL:
4134 case STRING_LITERAL:
4140 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4173 case INTEGER_LITERAL:
4174 case FLOATING_POINT_LITERAL:
4175 case STRING_LITERAL:
4187 jj_la1[104] = jj_gen;
4188 jj_consume_token(-1);
4189 throw new ParseException();
4193 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4198 jj_la1[105] = jj_gen;
4201 elseifStatement = ElseIfStatement();
4202 elseIfList.add(elseifStatement);
4204 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4206 jj_consume_token(ELSE);
4208 pos = SimpleCharStream.getPosition();
4209 statement = Statement();
4210 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4211 } catch (ParseException e) {
4212 if (errorMessage != null) {
4213 {if (true) throw e;}
4215 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4217 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4218 errorEnd = SimpleCharStream.getPosition() + 1;
4219 {if (true) throw e;}
4223 jj_la1[106] = jj_gen;
4226 elseIfs = new ElseIf[elseIfList.size()];
4227 elseIfList.toArray(elseIfs);
4228 {if (true) return new IfStatement(condition,
4233 SimpleCharStream.getPosition());}
4236 jj_la1[107] = jj_gen;
4237 jj_consume_token(-1);
4238 throw new ParseException();
4240 throw new Error("Missing return statement in function");
4243 static final public ElseIf ElseIfStatementColon() throws ParseException {
4244 Expression condition;
4245 Statement statement;
4246 final ArrayList list = new ArrayList();
4247 final int pos = SimpleCharStream.getPosition();
4248 jj_consume_token(ELSEIF);
4249 condition = Condition("elseif");
4250 jj_consume_token(COLON);
4253 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4287 case INTEGER_LITERAL:
4288 case FLOATING_POINT_LITERAL:
4289 case STRING_LITERAL:
4298 jj_la1[108] = jj_gen;
4301 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4334 case INTEGER_LITERAL:
4335 case FLOATING_POINT_LITERAL:
4336 case STRING_LITERAL:
4342 statement = Statement();
4343 list.add(statement);
4346 statement = htmlBlock();
4347 list.add(statement);
4350 jj_la1[109] = jj_gen;
4351 jj_consume_token(-1);
4352 throw new ParseException();
4355 Statement[] stmtsArray = new Statement[list.size()];
4356 list.toArray(stmtsArray);
4357 {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4358 throw new Error("Missing return statement in function");
4361 static final public Else ElseStatementColon() throws ParseException {
4362 Statement statement;
4363 final ArrayList list = new ArrayList();
4364 final int pos = SimpleCharStream.getPosition();
4365 jj_consume_token(ELSE);
4366 jj_consume_token(COLON);
4369 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4403 case INTEGER_LITERAL:
4404 case FLOATING_POINT_LITERAL:
4405 case STRING_LITERAL:
4414 jj_la1[110] = jj_gen;
4417 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4450 case INTEGER_LITERAL:
4451 case FLOATING_POINT_LITERAL:
4452 case STRING_LITERAL:
4458 statement = Statement();
4459 list.add(statement);
4462 statement = htmlBlock();
4463 list.add(statement);
4466 jj_la1[111] = jj_gen;
4467 jj_consume_token(-1);
4468 throw new ParseException();
4471 Statement[] stmtsArray = new Statement[list.size()];
4472 list.toArray(stmtsArray);
4473 {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4474 throw new Error("Missing return statement in function");
4477 static final public ElseIf ElseIfStatement() throws ParseException {
4478 Expression condition;
4479 Statement statement;
4480 final ArrayList list = new ArrayList();
4481 final int pos = SimpleCharStream.getPosition();
4482 jj_consume_token(ELSEIF);
4483 condition = Condition("elseif");
4484 statement = Statement();
4485 list.add(statement);/*todo:do better*/
4486 Statement[] stmtsArray = new Statement[list.size()];
4487 list.toArray(stmtsArray);
4488 {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4489 throw new Error("Missing return statement in function");
4492 static final public WhileStatement WhileStatement() throws ParseException {
4493 final Expression condition;
4494 final Statement action;
4495 final int pos = SimpleCharStream.getPosition();
4496 jj_consume_token(WHILE);
4497 condition = Condition("while");
4498 action = WhileStatement0(pos,pos + 5);
4499 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4500 throw new Error("Missing return statement in function");
4503 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4504 Statement statement;
4505 final ArrayList stmts = new ArrayList();
4506 final int pos = SimpleCharStream.getPosition();
4507 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4509 jj_consume_token(COLON);
4512 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4545 case INTEGER_LITERAL:
4546 case FLOATING_POINT_LITERAL:
4547 case STRING_LITERAL:
4556 jj_la1[112] = jj_gen;
4559 statement = Statement();
4560 stmts.add(statement);
4563 setMarker(fileToParse,
4564 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4568 "Line " + token.beginLine);
4569 } catch (CoreException e) {
4570 PHPeclipsePlugin.log(e);
4573 jj_consume_token(ENDWHILE);
4574 } catch (ParseException e) {
4575 errorMessage = "'endwhile' expected";
4577 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4578 errorEnd = SimpleCharStream.getPosition() + 1;
4579 {if (true) throw e;}
4582 jj_consume_token(SEMICOLON);
4583 Statement[] stmtsArray = new Statement[stmts.size()];
4584 stmts.toArray(stmtsArray);
4585 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4586 } catch (ParseException e) {
4587 errorMessage = "';' expected after 'endwhile' keyword";
4589 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4590 errorEnd = SimpleCharStream.getPosition() + 1;
4591 {if (true) throw e;}
4626 case INTEGER_LITERAL:
4627 case FLOATING_POINT_LITERAL:
4628 case STRING_LITERAL:
4634 statement = Statement();
4635 {if (true) return statement;}
4638 jj_la1[113] = jj_gen;
4639 jj_consume_token(-1);
4640 throw new ParseException();
4642 throw new Error("Missing return statement in function");
4645 static final public DoStatement DoStatement() throws ParseException {
4646 final Statement action;
4647 final Expression condition;
4648 final int pos = SimpleCharStream.getPosition();
4649 jj_consume_token(DO);
4650 action = Statement();
4651 jj_consume_token(WHILE);
4652 condition = Condition("while");
4654 jj_consume_token(SEMICOLON);
4655 {if (true) return new DoStatement(condition,action,pos,SimpleCharStream.getPosition());}
4656 } catch (ParseException e) {
4657 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4659 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4660 errorEnd = SimpleCharStream.getPosition() + 1;
4661 {if (true) throw e;}
4663 throw new Error("Missing return statement in function");
4666 static final public ForeachStatement ForeachStatement() throws ParseException {
4667 Statement statement;
4668 Expression expression;
4669 final int pos = SimpleCharStream.getPosition();
4670 ArrayVariableDeclaration variable;
4671 jj_consume_token(FOREACH);
4673 jj_consume_token(LPAREN);
4674 } catch (ParseException e) {
4675 errorMessage = "'(' expected after 'foreach' keyword";
4677 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4678 errorEnd = SimpleCharStream.getPosition() + 1;
4679 {if (true) throw e;}
4682 expression = Expression();
4683 } catch (ParseException e) {
4684 errorMessage = "variable expected";
4686 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4687 errorEnd = SimpleCharStream.getPosition() + 1;
4688 {if (true) throw e;}
4691 jj_consume_token(AS);
4692 } catch (ParseException e) {
4693 errorMessage = "'as' expected";
4695 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4696 errorEnd = SimpleCharStream.getPosition() + 1;
4697 {if (true) throw e;}
4700 variable = ArrayVariable();
4701 } catch (ParseException e) {
4702 errorMessage = "variable expected";
4704 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4705 errorEnd = SimpleCharStream.getPosition() + 1;
4706 {if (true) throw e;}
4709 jj_consume_token(RPAREN);
4710 } catch (ParseException e) {
4711 errorMessage = "')' expected after 'foreach' keyword";
4713 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4714 errorEnd = SimpleCharStream.getPosition() + 1;
4715 {if (true) throw e;}
4718 statement = Statement();
4719 } catch (ParseException e) {
4720 if (errorMessage != null) {if (true) throw e;}
4721 errorMessage = "statement expected";
4723 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4724 errorEnd = SimpleCharStream.getPosition() + 1;
4725 {if (true) throw e;}
4727 {if (true) return new ForeachStatement(expression,
4731 SimpleCharStream.getPosition());}
4732 throw new Error("Missing return statement in function");
4735 static final public ForStatement ForStatement() throws ParseException {
4737 final int pos = SimpleCharStream.getPosition();
4738 Expression[] initializations = null;
4739 Expression condition = null;
4740 Expression[] increments = null;
4742 final ArrayList list = new ArrayList();
4743 final int startBlock, endBlock;
4744 token = jj_consume_token(FOR);
4746 jj_consume_token(LPAREN);
4747 } catch (ParseException e) {
4748 errorMessage = "'(' expected after 'for' keyword";
4750 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4751 errorEnd = SimpleCharStream.getPosition() + 1;
4752 {if (true) throw e;}
4754 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4762 initializations = ForInit();
4765 jj_la1[114] = jj_gen;
4768 jj_consume_token(SEMICOLON);
4769 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4785 case INTEGER_LITERAL:
4786 case FLOATING_POINT_LITERAL:
4787 case STRING_LITERAL:
4791 condition = Expression();
4794 jj_la1[115] = jj_gen;
4797 jj_consume_token(SEMICOLON);
4798 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4806 increments = StatementExpressionList();
4809 jj_la1[116] = jj_gen;
4812 jj_consume_token(RPAREN);
4813 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4846 case INTEGER_LITERAL:
4847 case FLOATING_POINT_LITERAL:
4848 case STRING_LITERAL:
4854 action = Statement();
4855 {if (true) return new ForStatement(initializations,condition,increments,action,pos,SimpleCharStream.getPosition());}
4858 jj_consume_token(COLON);
4859 startBlock = SimpleCharStream.getPosition();
4862 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4895 case INTEGER_LITERAL:
4896 case FLOATING_POINT_LITERAL:
4897 case STRING_LITERAL:
4906 jj_la1[117] = jj_gen;
4909 action = Statement();
4913 setMarker(fileToParse,
4914 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
4916 pos+token.image.length(),
4918 "Line " + token.beginLine);
4919 } catch (CoreException e) {
4920 PHPeclipsePlugin.log(e);
4922 endBlock = SimpleCharStream.getPosition();
4924 jj_consume_token(ENDFOR);
4925 } catch (ParseException e) {
4926 errorMessage = "'endfor' expected";
4928 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4929 errorEnd = SimpleCharStream.getPosition() + 1;
4930 {if (true) throw e;}
4933 jj_consume_token(SEMICOLON);
4934 Statement[] stmtsArray = new Statement[list.size()];
4935 list.toArray(stmtsArray);
4936 {if (true) return new ForStatement(initializations,condition,increments,new Block(stmtsArray,startBlock,endBlock),pos,SimpleCharStream.getPosition());}
4937 } catch (ParseException e) {
4938 errorMessage = "';' expected after 'endfor' keyword";
4940 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4941 errorEnd = SimpleCharStream.getPosition() + 1;
4942 {if (true) throw e;}
4946 jj_la1[118] = jj_gen;
4947 jj_consume_token(-1);
4948 throw new ParseException();
4950 throw new Error("Missing return statement in function");
4953 static final public Expression[] ForInit() throws ParseException {
4955 if (jj_2_11(2147483647)) {
4956 exprs = LocalVariableDeclaration();
4957 {if (true) return exprs;}
4959 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4967 exprs = StatementExpressionList();
4968 {if (true) return exprs;}
4971 jj_la1[119] = jj_gen;
4972 jj_consume_token(-1);
4973 throw new ParseException();
4976 throw new Error("Missing return statement in function");
4979 static final public Expression[] StatementExpressionList() throws ParseException {
4980 final ArrayList list = new ArrayList();
4982 expr = StatementExpression();
4986 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4991 jj_la1[120] = jj_gen;
4994 jj_consume_token(COMMA);
4995 StatementExpression();
4998 Expression[] exprsArray = new Expression[list.size()];
4999 list.toArray(exprsArray);
5000 {if (true) return exprsArray;}
5001 throw new Error("Missing return statement in function");
5004 static final public Continue ContinueStatement() throws ParseException {
5005 Expression expr = null;
5006 final int pos = SimpleCharStream.getPosition();
5007 jj_consume_token(CONTINUE);
5008 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5024 case INTEGER_LITERAL:
5025 case FLOATING_POINT_LITERAL:
5026 case STRING_LITERAL:
5030 expr = Expression();
5033 jj_la1[121] = jj_gen;
5037 jj_consume_token(SEMICOLON);
5038 {if (true) return new Continue(expr,pos,SimpleCharStream.getPosition());}
5039 } catch (ParseException e) {
5040 errorMessage = "';' expected after 'continue' statement";
5042 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5043 errorEnd = SimpleCharStream.getPosition() + 1;
5044 {if (true) throw e;}
5046 throw new Error("Missing return statement in function");
5049 static final public ReturnStatement ReturnStatement() throws ParseException {
5050 Expression expr = null;
5051 final int pos = SimpleCharStream.getPosition();
5052 jj_consume_token(RETURN);
5053 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5069 case INTEGER_LITERAL:
5070 case FLOATING_POINT_LITERAL:
5071 case STRING_LITERAL:
5075 expr = Expression();
5078 jj_la1[122] = jj_gen;
5082 jj_consume_token(SEMICOLON);
5083 {if (true) return new ReturnStatement(expr,pos,SimpleCharStream.getPosition());}
5084 } catch (ParseException e) {
5085 errorMessage = "';' expected after 'return' statement";
5087 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5088 errorEnd = SimpleCharStream.getPosition() + 1;
5089 {if (true) throw e;}
5091 throw new Error("Missing return statement in function");
5094 static final private boolean jj_2_1(int xla) {
5095 jj_la = xla; jj_lastpos = jj_scanpos = token;
5096 boolean retval = !jj_3_1();
5101 static final private boolean jj_2_2(int xla) {
5102 jj_la = xla; jj_lastpos = jj_scanpos = token;
5103 boolean retval = !jj_3_2();
5108 static final private boolean jj_2_3(int xla) {
5109 jj_la = xla; jj_lastpos = jj_scanpos = token;
5110 boolean retval = !jj_3_3();
5115 static final private boolean jj_2_4(int xla) {
5116 jj_la = xla; jj_lastpos = jj_scanpos = token;
5117 boolean retval = !jj_3_4();
5122 static final private boolean jj_2_5(int xla) {
5123 jj_la = xla; jj_lastpos = jj_scanpos = token;
5124 boolean retval = !jj_3_5();
5129 static final private boolean jj_2_6(int xla) {
5130 jj_la = xla; jj_lastpos = jj_scanpos = token;
5131 boolean retval = !jj_3_6();
5136 static final private boolean jj_2_7(int xla) {
5137 jj_la = xla; jj_lastpos = jj_scanpos = token;
5138 boolean retval = !jj_3_7();
5143 static final private boolean jj_2_8(int xla) {
5144 jj_la = xla; jj_lastpos = jj_scanpos = token;
5145 boolean retval = !jj_3_8();
5150 static final private boolean jj_2_9(int xla) {
5151 jj_la = xla; jj_lastpos = jj_scanpos = token;
5152 boolean retval = !jj_3_9();
5157 static final private boolean jj_2_10(int xla) {
5158 jj_la = xla; jj_lastpos = jj_scanpos = token;
5159 boolean retval = !jj_3_10();
5164 static final private boolean jj_2_11(int xla) {
5165 jj_la = xla; jj_lastpos = jj_scanpos = token;
5166 boolean retval = !jj_3_11();
5171 static final private boolean jj_3R_59() {
5172 if (jj_3R_90()) return true;
5173 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5177 static final private boolean jj_3R_58() {
5178 if (jj_3R_42()) return true;
5179 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5183 static final private boolean jj_3R_57() {
5184 if (jj_3R_89()) return true;
5185 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5189 static final private boolean jj_3R_46() {
5198 if (jj_3R_59()) return true;
5199 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5200 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5201 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5202 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5206 static final private boolean jj_3R_56() {
5207 if (jj_3R_88()) return true;
5208 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5212 static final private boolean jj_3R_200() {
5213 if (jj_scan_token(MINUS_MINUS)) return true;
5214 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5218 static final private boolean jj_3R_199() {
5219 if (jj_scan_token(PLUS_PLUS)) return true;
5220 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5224 static final private boolean jj_3R_192() {
5229 if (jj_3R_200()) return true;
5230 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5231 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5235 static final private boolean jj_3R_175() {
5236 if (jj_3R_173()) return true;
5237 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5240 if (jj_3R_192()) jj_scanpos = xsp;
5241 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5245 static final private boolean jj_3R_86() {
5246 if (jj_scan_token(OBJECT)) return true;
5247 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5251 static final private boolean jj_3R_85() {
5252 if (jj_scan_token(INTEGER)) return true;
5253 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5257 static final private boolean jj_3R_84() {
5258 if (jj_scan_token(INT)) return true;
5259 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5263 static final private boolean jj_3R_44() {
5264 if (jj_scan_token(ARRAY)) return true;
5265 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5269 static final private boolean jj_3R_83() {
5270 if (jj_scan_token(FLOAT)) return true;
5271 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5275 static final private boolean jj_3R_191() {
5276 if (jj_scan_token(ARRAY)) return true;
5277 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5281 static final private boolean jj_3R_82() {
5282 if (jj_scan_token(DOUBLE)) return true;
5283 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5287 static final private boolean jj_3R_190() {
5288 if (jj_3R_53()) return true;
5289 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5293 static final private boolean jj_3R_81() {
5294 if (jj_scan_token(REAL)) return true;
5295 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5299 static final private boolean jj_3R_174() {
5300 if (jj_scan_token(LPAREN)) return true;
5301 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5306 if (jj_3R_191()) return true;
5307 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5308 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5309 if (jj_scan_token(RPAREN)) return true;
5310 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5311 if (jj_3R_146()) return true;
5312 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5316 static final private boolean jj_3R_80() {
5317 if (jj_scan_token(BOOLEAN)) return true;
5318 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5322 static final private boolean jj_3R_79() {
5323 if (jj_scan_token(BOOL)) return true;
5324 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5328 static final private boolean jj_3R_43() {
5329 if (jj_3R_53()) return true;
5330 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5334 static final private boolean jj_3R_78() {
5335 if (jj_scan_token(STRING)) return true;
5336 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5340 static final private boolean jj_3R_53() {
5359 if (jj_3R_86()) return true;
5360 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5361 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5362 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5363 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5364 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5365 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5366 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5367 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5368 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5372 static final private boolean jj_3_4() {
5373 if (jj_scan_token(LPAREN)) return true;
5374 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5379 if (jj_3R_44()) return true;
5380 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5381 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5382 if (jj_scan_token(RPAREN)) return true;
5383 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5387 static final private boolean jj_3R_91() {
5388 if (jj_scan_token(ASSIGN)) return true;
5389 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5390 if (jj_3R_46()) return true;
5391 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5395 static final private boolean jj_3R_172() {
5396 if (jj_scan_token(LPAREN)) return true;
5397 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5398 if (jj_3R_46()) return true;
5399 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5400 if (jj_scan_token(RPAREN)) return true;
5401 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5405 static final private boolean jj_3R_171() {
5406 if (jj_3R_176()) return true;
5407 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5411 static final private boolean jj_3R_170() {
5412 if (jj_3R_175()) return true;
5413 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5417 static final private boolean jj_3R_169() {
5418 if (jj_3R_174()) return true;
5419 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5423 static final private boolean jj_3R_165() {
5434 if (jj_3R_172()) return true;
5435 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5436 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5437 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5438 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5439 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5443 static final private boolean jj_3R_168() {
5444 if (jj_scan_token(BANG)) return true;
5445 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5446 if (jj_3R_146()) return true;
5447 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5451 static final private boolean jj_3R_167() {
5452 if (jj_scan_token(MINUS_MINUS)) return true;
5453 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5457 static final private boolean jj_3R_166() {
5458 if (jj_scan_token(PLUS_PLUS)) return true;
5459 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5463 static final private boolean jj_3R_164() {
5468 if (jj_3R_167()) return true;
5469 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5470 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5471 if (jj_3R_173()) return true;
5472 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5476 static final private boolean jj_3_10() {
5477 if (jj_3R_42()) return true;
5478 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5482 static final private boolean jj_3R_159() {
5483 if (jj_3R_165()) return true;
5484 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5488 static final private boolean jj_3R_158() {
5489 if (jj_3R_164()) return true;
5490 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5494 static final private boolean jj_3R_163() {
5495 if (jj_scan_token(MINUS)) return true;
5496 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5500 static final private boolean jj_3R_60() {
5501 if (jj_3R_51()) return true;
5502 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5505 if (jj_3R_91()) jj_scanpos = xsp;
5506 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5510 static final private boolean jj_3R_162() {
5511 if (jj_scan_token(PLUS)) return true;
5512 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5516 static final private boolean jj_3R_155() {
5523 if (jj_3R_159()) return true;
5524 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5525 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5526 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5530 static final private boolean jj_3R_157() {
5535 if (jj_3R_163()) return true;
5536 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5537 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5538 if (jj_3R_146()) return true;
5539 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5543 static final private boolean jj_3R_61() {
5544 if (jj_scan_token(COMMA)) return true;
5545 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5546 if (jj_3R_60()) return true;
5547 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5551 static final private boolean jj_3R_161() {
5552 if (jj_3R_155()) return true;
5553 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5557 static final private boolean jj_3R_48() {
5558 if (jj_3R_60()) return true;
5559 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5563 if (jj_3R_61()) { jj_scanpos = xsp; break; }
5564 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5569 static final private boolean jj_3R_156() {
5574 if (jj_3R_161()) return true;
5575 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5576 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5580 static final private boolean jj_3R_160() {
5581 if (jj_scan_token(AT)) return true;
5582 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5583 if (jj_3R_156()) return true;
5584 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5588 static final private boolean jj_3R_151() {
5589 if (jj_3R_156()) return true;
5590 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5594 static final private boolean jj_3R_146() {
5599 if (jj_3R_151()) return true;
5600 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5601 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5605 static final private boolean jj_3R_150() {
5606 if (jj_scan_token(BIT_AND)) return true;
5607 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5608 if (jj_3R_155()) return true;
5609 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5613 static final private boolean jj_3R_154() {
5614 if (jj_scan_token(REMAINDER)) return true;
5615 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5619 static final private boolean jj_3R_153() {
5620 if (jj_scan_token(SLASH)) return true;
5621 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5625 static final private boolean jj_3R_152() {
5626 if (jj_scan_token(STAR)) return true;
5627 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5631 static final private boolean jj_3R_147() {
5638 if (jj_3R_154()) return true;
5639 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5640 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5641 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5642 if (jj_3R_146()) return true;
5643 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5647 static final private boolean jj_3R_141() {
5648 if (jj_3R_146()) return true;
5649 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5653 if (jj_3R_147()) { jj_scanpos = xsp; break; }
5654 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5659 static final private boolean jj_3_9() {
5660 if (jj_3R_47()) return true;
5661 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5665 static final private boolean jj_3R_149() {
5666 if (jj_scan_token(MINUS)) return true;
5667 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5671 static final private boolean jj_3R_148() {
5672 if (jj_scan_token(PLUS)) return true;
5673 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5677 static final private boolean jj_3R_202() {
5678 if (jj_scan_token(COMMA)) return true;
5679 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5683 static final private boolean jj_3R_142() {
5688 if (jj_3R_149()) return true;
5689 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5690 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5691 if (jj_3R_141()) return true;
5692 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5696 static final private boolean jj_3_2() {
5697 if (jj_scan_token(COMMA)) return true;
5698 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5699 if (jj_3R_41()) return true;
5700 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5704 static final private boolean jj_3R_135() {
5705 if (jj_3R_141()) return true;
5706 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5710 if (jj_3R_142()) { jj_scanpos = xsp; break; }
5711 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5716 static final private boolean jj_3R_201() {
5717 if (jj_3R_41()) return true;
5718 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5722 if (jj_3_2()) { jj_scanpos = xsp; break; }
5723 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5728 static final private boolean jj_3_8() {
5729 if (jj_3R_46()) return true;
5730 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5731 if (jj_scan_token(SEMICOLON)) return true;
5732 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5736 static final private boolean jj_3R_145() {
5737 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
5738 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5742 static final private boolean jj_3R_198() {
5743 if (jj_scan_token(LPAREN)) return true;
5744 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5747 if (jj_3R_201()) jj_scanpos = xsp;
5748 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5750 if (jj_3R_202()) jj_scanpos = xsp;
5751 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5752 if (jj_scan_token(RPAREN)) return true;
5753 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5757 static final private boolean jj_3R_144() {
5758 if (jj_scan_token(RSIGNEDSHIFT)) return true;
5759 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5763 static final private boolean jj_3R_143() {
5764 if (jj_scan_token(LSHIFT)) return true;
5765 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5769 static final private boolean jj_3R_136() {
5776 if (jj_3R_145()) return true;
5777 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5778 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5779 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5780 if (jj_3R_135()) return true;
5781 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5785 static final private boolean jj_3R_128() {
5786 if (jj_3R_135()) return true;
5787 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5791 if (jj_3R_136()) { jj_scanpos = xsp; break; }
5792 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5797 static final private boolean jj_3_11() {
5798 if (jj_3R_48()) return true;
5799 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5803 static final private boolean jj_3R_203() {
5804 if (jj_scan_token(ARRAYASSIGN)) return true;
5805 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5806 if (jj_3R_46()) return true;
5807 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5811 static final private boolean jj_3R_41() {
5812 if (jj_3R_46()) return true;
5813 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5816 if (jj_3R_203()) jj_scanpos = xsp;
5817 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5821 static final private boolean jj_3R_47() {
5822 if (jj_scan_token(IDENTIFIER)) return true;
5823 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5824 if (jj_scan_token(COLON)) return true;
5825 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5829 static final private boolean jj_3R_140() {
5830 if (jj_scan_token(GE)) return true;
5831 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5835 static final private boolean jj_3R_139() {
5836 if (jj_scan_token(LE)) return true;
5837 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5841 static final private boolean jj_3R_138() {
5842 if (jj_scan_token(GT)) return true;
5843 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5847 static final private boolean jj_3R_137() {
5848 if (jj_scan_token(LT)) return true;
5849 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5853 static final private boolean jj_3R_110() {
5854 if (jj_scan_token(COMMA)) return true;
5855 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5856 if (jj_3R_46()) return true;
5857 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5861 static final private boolean jj_3R_129() {
5870 if (jj_3R_140()) return true;
5871 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5872 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5873 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5874 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5875 if (jj_3R_128()) return true;
5876 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5880 static final private boolean jj_3R_126() {
5881 if (jj_3R_128()) return true;
5882 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5886 if (jj_3R_129()) { jj_scanpos = xsp; break; }
5887 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5892 static final private boolean jj_3R_107() {
5893 if (jj_3R_46()) return true;
5894 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5898 if (jj_3R_110()) { jj_scanpos = xsp; break; }
5899 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5904 static final private boolean jj_3R_100() {
5905 if (jj_3R_107()) return true;
5906 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5910 static final private boolean jj_3R_97() {
5911 if (jj_3R_53()) return true;
5912 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5916 static final private boolean jj_3R_134() {
5917 if (jj_scan_token(TRIPLEEQUAL)) return true;
5918 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5922 static final private boolean jj_3R_133() {
5923 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5924 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5928 static final private boolean jj_3R_132() {
5929 if (jj_scan_token(NOT_EQUAL)) return true;
5930 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5934 static final private boolean jj_3R_87() {
5935 if (jj_scan_token(LPAREN)) return true;
5936 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5939 if (jj_3R_100()) jj_scanpos = xsp;
5940 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5941 if (jj_scan_token(RPAREN)) return true;
5942 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5946 static final private boolean jj_3R_115() {
5947 if (jj_scan_token(LBRACE)) return true;
5948 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5949 if (jj_3R_46()) return true;
5950 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5951 if (jj_scan_token(RBRACE)) return true;
5952 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5956 static final private boolean jj_3R_131() {
5957 if (jj_scan_token(DIF)) return true;
5958 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5962 static final private boolean jj_3R_130() {
5963 if (jj_scan_token(EQUAL_EQUAL)) return true;
5964 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5968 static final private boolean jj_3R_95() {
5969 if (jj_scan_token(DOLLAR_ID)) return true;
5970 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5974 static final private boolean jj_3R_127() {
5985 if (jj_3R_134()) return true;
5986 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5987 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5988 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5989 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5990 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5991 if (jj_3R_126()) return true;
5992 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5996 static final private boolean jj_3R_124() {
5997 if (jj_3R_126()) return true;
5998 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6002 if (jj_3R_127()) { jj_scanpos = xsp; break; }
6003 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6008 static final private boolean jj_3R_184() {
6009 if (jj_scan_token(NULL)) return true;
6010 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6014 static final private boolean jj_3R_183() {
6015 if (jj_scan_token(FALSE)) return true;
6016 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6020 static final private boolean jj_3R_94() {
6021 if (jj_scan_token(DOLLAR)) return true;
6022 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6023 if (jj_3R_62()) return true;
6024 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6028 static final private boolean jj_3R_182() {
6029 if (jj_scan_token(TRUE)) return true;
6030 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6034 static final private boolean jj_3R_181() {
6035 if (jj_scan_token(STRING_LITERAL)) return true;
6036 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6040 static final private boolean jj_3R_180() {
6041 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
6042 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6046 static final private boolean jj_3R_125() {
6047 if (jj_scan_token(BIT_AND)) return true;
6048 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6049 if (jj_3R_124()) return true;
6050 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6054 static final private boolean jj_3R_179() {
6055 if (jj_scan_token(INTEGER_LITERAL)) return true;
6056 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6060 static final private boolean jj_3R_176() {
6073 if (jj_3R_184()) return true;
6074 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6075 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6076 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6077 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6078 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6079 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6083 static final private boolean jj_3R_122() {
6084 if (jj_3R_124()) return true;
6085 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6089 if (jj_3R_125()) { jj_scanpos = xsp; break; }
6090 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6095 static final private boolean jj_3R_93() {
6096 if (jj_scan_token(IDENTIFIER)) return true;
6097 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6100 if (jj_3R_115()) jj_scanpos = xsp;
6101 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6105 static final private boolean jj_3R_96() {
6106 if (jj_3R_46()) return true;
6107 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6111 static final private boolean jj_3R_63() {
6116 if (jj_3R_97()) return true;
6117 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6118 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6122 static final private boolean jj_3R_92() {
6123 if (jj_scan_token(LBRACE)) return true;
6124 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6125 if (jj_3R_46()) return true;
6126 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6127 if (jj_scan_token(RBRACE)) return true;
6128 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6132 static final private boolean jj_3R_62() {
6141 if (jj_3R_95()) return true;
6142 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6143 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6144 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6145 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6149 static final private boolean jj_3R_123() {
6150 if (jj_scan_token(XOR)) return true;
6151 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6152 if (jj_3R_122()) return true;
6153 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6157 static final private boolean jj_3R_120() {
6158 if (jj_3R_122()) return true;
6159 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6163 if (jj_3R_123()) { jj_scanpos = xsp; break; }
6164 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6169 static final private boolean jj_3R_103() {
6170 if (jj_scan_token(LBRACE)) return true;
6171 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6172 if (jj_3R_46()) return true;
6173 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6174 if (jj_scan_token(RBRACE)) return true;
6175 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6179 static final private boolean jj_3R_50() {
6180 if (jj_scan_token(LBRACKET)) return true;
6181 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6184 if (jj_3R_63()) jj_scanpos = xsp;
6185 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6186 if (jj_scan_token(RBRACKET)) return true;
6187 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6191 static final private boolean jj_3R_99() {
6192 if (jj_scan_token(DOLLAR)) return true;
6193 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6194 if (jj_3R_62()) return true;
6195 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6199 static final private boolean jj_3R_121() {
6200 if (jj_scan_token(BIT_OR)) return true;
6201 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6202 if (jj_3R_120()) return true;
6203 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6207 static final private boolean jj_3R_116() {
6208 if (jj_3R_120()) return true;
6209 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6213 if (jj_3R_121()) { jj_scanpos = xsp; break; }
6214 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6219 static final private boolean jj_3R_40() {
6224 if (jj_3R_50()) return true;
6225 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6226 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6230 static final private boolean jj_3R_49() {
6231 if (jj_scan_token(CLASSACCESS)) return true;
6232 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6233 if (jj_3R_62()) return true;
6234 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6238 static final private boolean jj_3R_117() {
6239 if (jj_scan_token(DOT)) return true;
6240 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6241 if (jj_3R_116()) return true;
6242 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6246 static final private boolean jj_3R_98() {
6247 if (jj_scan_token(DOLLAR_ID)) return true;
6248 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6251 if (jj_3R_103()) jj_scanpos = xsp;
6252 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6256 static final private boolean jj_3R_64() {
6261 if (jj_3R_99()) return true;
6262 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6263 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6267 static final private boolean jj_3R_111() {
6268 if (jj_3R_116()) return true;
6269 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6273 if (jj_3R_117()) { jj_scanpos = xsp; break; }
6274 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6279 static final private boolean jj_3R_55() {
6280 if (jj_3R_40()) return true;
6281 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6285 static final private boolean jj_3R_45() {
6290 if (jj_3R_55()) return true;
6291 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6292 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6296 static final private boolean jj_3R_54() {
6297 if (jj_3R_87()) return true;
6298 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6302 static final private boolean jj_3R_119() {
6303 if (jj_scan_token(_ANDL)) return true;
6304 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6308 static final private boolean jj_3R_118() {
6309 if (jj_scan_token(AND_AND)) return true;
6310 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6314 static final private boolean jj_3R_112() {
6319 if (jj_3R_119()) return true;
6320 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6321 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6322 if (jj_3R_111()) return true;
6323 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6327 static final private boolean jj_3R_194() {
6328 if (jj_3R_51()) return true;
6329 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6333 static final private boolean jj_3R_102() {
6334 if (jj_scan_token(HOOK)) return true;
6335 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6336 if (jj_3R_46()) return true;
6337 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6338 if (jj_scan_token(COLON)) return true;
6339 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6340 if (jj_3R_90()) return true;
6341 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6345 static final private boolean jj_3R_108() {
6346 if (jj_3R_111()) return true;
6347 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6351 if (jj_3R_112()) { jj_scanpos = xsp; break; }
6352 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6357 static final private boolean jj_3R_193() {
6358 if (jj_scan_token(IDENTIFIER)) return true;
6359 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6363 static final private boolean jj_3R_185() {
6368 if (jj_3R_194()) return true;
6369 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6370 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6374 static final private boolean jj_3R_106() {
6375 if (jj_scan_token(ASSIGN)) return true;
6376 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6377 if (jj_3R_46()) return true;
6378 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6382 static final private boolean jj_3R_114() {
6383 if (jj_scan_token(_ORL)) return true;
6384 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6388 static final private boolean jj_3R_113() {
6389 if (jj_scan_token(OR_OR)) return true;
6390 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6394 static final private boolean jj_3_1() {
6395 if (jj_3R_40()) return true;
6396 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6400 static final private boolean jj_3R_109() {
6405 if (jj_3R_114()) return true;
6406 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6407 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6408 if (jj_3R_108()) return true;
6409 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6413 static final private boolean jj_3R_51() {
6414 if (jj_3R_64()) return true;
6415 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6419 if (jj_3_1()) { jj_scanpos = xsp; break; }
6420 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6425 static final private boolean jj_3R_101() {
6426 if (jj_3R_108()) return true;
6427 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6431 if (jj_3R_109()) { jj_scanpos = xsp; break; }
6432 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6437 static final private boolean jj_3R_105() {
6438 if (jj_scan_token(COMMA)) return true;
6439 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6440 if (jj_3R_51()) return true;
6441 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6445 static final private boolean jj_3R_104() {
6446 if (jj_3R_51()) return true;
6447 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6451 static final private boolean jj_3R_90() {
6452 if (jj_3R_101()) return true;
6453 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6456 if (jj_3R_102()) jj_scanpos = xsp;
6457 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6461 static final private boolean jj_3R_197() {
6462 if (jj_3R_51()) return true;
6463 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6467 static final private boolean jj_3R_196() {
6468 if (jj_scan_token(NEW)) return true;
6469 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6470 if (jj_3R_185()) return true;
6471 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6475 static final private boolean jj_3R_195() {
6476 if (jj_scan_token(IDENTIFIER)) return true;
6477 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6481 static final private boolean jj_3R_187() {
6488 if (jj_3R_197()) return true;
6489 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6490 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6491 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6495 static final private boolean jj_3R_77() {
6496 if (jj_scan_token(TILDEEQUAL)) return true;
6497 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6501 static final private boolean jj_3R_89() {
6502 if (jj_scan_token(LIST)) return true;
6503 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6504 if (jj_scan_token(LPAREN)) return true;
6505 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6508 if (jj_3R_104()) jj_scanpos = xsp;
6509 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6512 if (jj_3R_105()) { jj_scanpos = xsp; break; }
6513 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6515 if (jj_scan_token(RPAREN)) return true;
6516 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6518 if (jj_3R_106()) jj_scanpos = xsp;
6519 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6523 static final private boolean jj_3R_76() {
6524 if (jj_scan_token(DOTASSIGN)) return true;
6525 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6529 static final private boolean jj_3R_75() {
6530 if (jj_scan_token(ORASSIGN)) return true;
6531 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6535 static final private boolean jj_3R_74() {
6536 if (jj_scan_token(XORASSIGN)) return true;
6537 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6541 static final private boolean jj_3R_73() {
6542 if (jj_scan_token(ANDASSIGN)) return true;
6543 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6547 static final private boolean jj_3R_72() {
6548 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6549 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6553 static final private boolean jj_3R_71() {
6554 if (jj_scan_token(LSHIFTASSIGN)) return true;
6555 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6559 static final private boolean jj_3R_70() {
6560 if (jj_scan_token(MINUSASSIGN)) return true;
6561 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6565 static final private boolean jj_3R_69() {
6566 if (jj_scan_token(PLUSASSIGN)) return true;
6567 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6571 static final private boolean jj_3R_68() {
6572 if (jj_scan_token(REMASSIGN)) return true;
6573 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6577 static final private boolean jj_3R_189() {
6578 if (jj_scan_token(ARRAY)) return true;
6579 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6580 if (jj_3R_198()) return true;
6581 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6585 static final private boolean jj_3R_67() {
6586 if (jj_scan_token(SLASHASSIGN)) return true;
6587 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6591 static final private boolean jj_3R_66() {
6592 if (jj_scan_token(STARASSIGN)) return true;
6593 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6597 static final private boolean jj_3R_88() {
6598 if (jj_scan_token(PRINT)) return true;
6599 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6600 if (jj_3R_46()) return true;
6601 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6605 static final private boolean jj_3R_65() {
6606 if (jj_scan_token(ASSIGN)) return true;
6607 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6611 static final private boolean jj_3R_52() {
6638 if (jj_3R_77()) return true;
6639 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6640 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6641 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6642 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6643 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6644 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6645 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6646 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6647 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6648 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6649 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6650 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6651 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6655 static final private boolean jj_3_6() {
6656 if (jj_3R_45()) return true;
6657 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6661 static final private boolean jj_3R_178() {
6662 if (jj_3R_189()) return true;
6663 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6667 static final private boolean jj_3_5() {
6668 if (jj_3R_45()) return true;
6669 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6673 static final private boolean jj_3R_188() {
6674 if (jj_3R_45()) return true;
6675 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6679 static final private boolean jj_3R_177() {
6680 if (jj_3R_187()) return true;
6681 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6685 if (jj_3R_188()) { jj_scanpos = xsp; break; }
6686 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6691 static final private boolean jj_3R_186() {
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_42() {
6698 if (jj_3R_51()) return true;
6699 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6700 if (jj_3R_52()) return true;
6701 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6702 if (jj_3R_46()) return true;
6703 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6707 static final private boolean jj_3R_173() {
6714 if (jj_3R_178()) return true;
6715 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6716 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6717 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6721 static final private boolean jj_3_3() {
6722 if (jj_3R_42()) return true;
6723 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6727 static final private boolean jj_3_7() {
6728 if (jj_scan_token(IDENTIFIER)) return true;
6729 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6730 if (jj_scan_token(STATICCLASSACCESS)) return true;
6731 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6732 if (jj_3R_185()) return true;
6733 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6737 if (jj_3R_186()) { jj_scanpos = xsp; break; }
6738 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6743 static private boolean jj_initialized_once = false;
6744 static public PHPParserTokenManager token_source;
6745 static SimpleCharStream jj_input_stream;
6746 static public Token token, jj_nt;
6747 static private int jj_ntk;
6748 static private Token jj_scanpos, jj_lastpos;
6749 static private int jj_la;
6750 static public boolean lookingAhead = false;
6751 static private boolean jj_semLA;
6752 static private int jj_gen;
6753 static final private int[] jj_la1 = new int[123];
6754 static private int[] jj_la1_0;
6755 static private int[] jj_la1_1;
6756 static private int[] jj_la1_2;
6757 static private int[] jj_la1_3;
6758 static private int[] jj_la1_4;
6766 private static void jj_la1_0() {
6767 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,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,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,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,};
6769 private static void jj_la1_1() {
6770 jj_la1_1 = new int[] {0x875d507f,0x0,0x0,0x875d507f,0x0,0x875d507f,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3080000,0x200,0x30c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,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,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,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,};
6772 private static void jj_la1_2() {
6773 jj_la1_2 = new int[] {0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x13c1c00,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x800,0x0,0x0,0x300000,0x0,0x13c1c00,0x0,0x1000000,0x0,0x1000800,0x1000000,0x3fe,0x0,0x13c1c00,0x0,0x4000,0x80010000,0x80010000,0x20000,0x20000,0x0,0x2000000,0x4000000,0x1000000,0x0,0x0,0x0,0x0,0x70000000,0x70000000,0x300000,0x300000,0x8c00000,0x8c00000,0x13c1c00,0x3c1c00,0x300000,0x3c1800,0xc0000,0x1000,0x800,0x3fe,0xc0000,0xc0000,0x800,0x800,0x800,0x800,0x0,0x13c1ffe,0x13c1ffe,0x0,0x0,0x13c1c00,0x0,0x400,0xc0c00,0x0,0x13c1c00,0x13c1c00,0x0,0x0,0x0,0x800,0x0,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,};
6775 private static void jj_la1_3() {
6776 jj_la1_3 = new int[] {0x2288a2,0x0,0x0,0x2288a2,0x200000,0x2288a2,0x0,0x0,0x0,0x400000,0x0,0x20000,0x0,0x20000,0x20800,0x22,0x22,0x8a2,0x0,0x88a2,0x400000,0x0,0x400000,0x0,0x0,0x0,0x0,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,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,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,};
6778 private static void jj_la1_4() {
6779 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,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,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,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,};
6781 static final private JJCalls[] jj_2_rtns = new JJCalls[11];
6782 static private boolean jj_rescan = false;
6783 static private int jj_gc = 0;
6785 public PHPParser(java.io.InputStream stream) {
6786 if (jj_initialized_once) {
6787 System.out.println("ERROR: Second call to constructor of static parser. You must");
6788 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6789 System.out.println(" during parser generation.");
6792 jj_initialized_once = true;
6793 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6794 token_source = new PHPParserTokenManager(jj_input_stream);
6795 token = new Token();
6798 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6799 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6802 static public void ReInit(java.io.InputStream stream) {
6803 jj_input_stream.ReInit(stream, 1, 1);
6804 token_source.ReInit(jj_input_stream);
6805 token = new Token();
6808 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6809 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6812 public PHPParser(java.io.Reader stream) {
6813 if (jj_initialized_once) {
6814 System.out.println("ERROR: Second call to constructor of static parser. You must");
6815 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6816 System.out.println(" during parser generation.");
6819 jj_initialized_once = true;
6820 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6821 token_source = new PHPParserTokenManager(jj_input_stream);
6822 token = new Token();
6825 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6826 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6829 static public void ReInit(java.io.Reader stream) {
6830 jj_input_stream.ReInit(stream, 1, 1);
6831 token_source.ReInit(jj_input_stream);
6832 token = new Token();
6835 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6836 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6839 public PHPParser(PHPParserTokenManager tm) {
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;
6848 token = new Token();
6851 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6852 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6855 public void ReInit(PHPParserTokenManager tm) {
6857 token = new Token();
6860 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6861 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6864 static final private Token jj_consume_token(int kind) throws ParseException {
6866 if ((oldToken = token).next != null) token = token.next;
6867 else token = token.next = token_source.getNextToken();
6869 if (token.kind == kind) {
6871 if (++jj_gc > 100) {
6873 for (int i = 0; i < jj_2_rtns.length; i++) {
6874 JJCalls c = jj_2_rtns[i];
6876 if (c.gen < jj_gen) c.first = null;
6885 throw generateParseException();
6888 static final private boolean jj_scan_token(int kind) {
6889 if (jj_scanpos == jj_lastpos) {
6891 if (jj_scanpos.next == null) {
6892 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
6894 jj_lastpos = jj_scanpos = jj_scanpos.next;
6897 jj_scanpos = jj_scanpos.next;
6900 int i = 0; Token tok = token;
6901 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
6902 if (tok != null) jj_add_error_token(kind, i);
6904 return (jj_scanpos.kind != kind);
6907 static final public Token getNextToken() {
6908 if (token.next != null) token = token.next;
6909 else token = token.next = token_source.getNextToken();
6915 static final public Token getToken(int index) {
6916 Token t = lookingAhead ? jj_scanpos : token;
6917 for (int i = 0; i < index; i++) {
6918 if (t.next != null) t = t.next;
6919 else t = t.next = token_source.getNextToken();
6924 static final private int jj_ntk() {
6925 if ((jj_nt=token.next) == null)
6926 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
6928 return (jj_ntk = jj_nt.kind);
6931 static private java.util.Vector jj_expentries = new java.util.Vector();
6932 static private int[] jj_expentry;
6933 static private int jj_kind = -1;
6934 static private int[] jj_lasttokens = new int[100];
6935 static private int jj_endpos;
6937 static private void jj_add_error_token(int kind, int pos) {
6938 if (pos >= 100) return;
6939 if (pos == jj_endpos + 1) {
6940 jj_lasttokens[jj_endpos++] = kind;
6941 } else if (jj_endpos != 0) {
6942 jj_expentry = new int[jj_endpos];
6943 for (int i = 0; i < jj_endpos; i++) {
6944 jj_expentry[i] = jj_lasttokens[i];
6946 boolean exists = false;
6947 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
6948 int[] oldentry = (int[])(enum.nextElement());
6949 if (oldentry.length == jj_expentry.length) {
6951 for (int i = 0; i < jj_expentry.length; i++) {
6952 if (oldentry[i] != jj_expentry[i]) {
6960 if (!exists) jj_expentries.addElement(jj_expentry);
6961 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
6965 static public ParseException generateParseException() {
6966 jj_expentries.removeAllElements();
6967 boolean[] la1tokens = new boolean[143];
6968 for (int i = 0; i < 143; i++) {
6969 la1tokens[i] = false;
6972 la1tokens[jj_kind] = true;
6975 for (int i = 0; i < 123; i++) {
6976 if (jj_la1[i] == jj_gen) {
6977 for (int j = 0; j < 32; j++) {
6978 if ((jj_la1_0[i] & (1<<j)) != 0) {
6979 la1tokens[j] = true;
6981 if ((jj_la1_1[i] & (1<<j)) != 0) {
6982 la1tokens[32+j] = true;
6984 if ((jj_la1_2[i] & (1<<j)) != 0) {
6985 la1tokens[64+j] = true;
6987 if ((jj_la1_3[i] & (1<<j)) != 0) {
6988 la1tokens[96+j] = true;
6990 if ((jj_la1_4[i] & (1<<j)) != 0) {
6991 la1tokens[128+j] = true;
6996 for (int i = 0; i < 143; i++) {
6998 jj_expentry = new int[1];
7000 jj_expentries.addElement(jj_expentry);
7005 jj_add_error_token(0, 0);
7006 int[][] exptokseq = new int[jj_expentries.size()][];
7007 for (int i = 0; i < jj_expentries.size(); i++) {
7008 exptokseq[i] = (int[])jj_expentries.elementAt(i);
7010 return new ParseException(token, exptokseq, tokenImage);
7013 static final public void enable_tracing() {
7016 static final public void disable_tracing() {
7019 static final private void jj_rescan_token() {
7021 for (int i = 0; i < 11; i++) {
7022 JJCalls p = jj_2_rtns[i];
7024 if (p.gen > jj_gen) {
7025 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7027 case 0: jj_3_1(); break;
7028 case 1: jj_3_2(); break;
7029 case 2: jj_3_3(); break;
7030 case 3: jj_3_4(); break;
7031 case 4: jj_3_5(); break;
7032 case 5: jj_3_6(); break;
7033 case 6: jj_3_7(); break;
7034 case 7: jj_3_8(); break;
7035 case 8: jj_3_9(); break;
7036 case 9: jj_3_10(); break;
7037 case 10: jj_3_11(); break;
7041 } while (p != null);
7046 static final private void jj_save(int index, int xla) {
7047 JJCalls p = jj_2_rtns[index];
7048 while (p.gen > jj_gen) {
7049 if (p.next == null) { p = p.next = new JJCalls(); break; }
7052 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7055 static final class JJCalls {