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.PHPOutlineInfo;
24 * This php parser is inspired by the Java 1.2 grammar example
25 * given with JavaCC. You can get JavaCC at http://www.webgain.com
26 * You can test the parser with the PHPParserTestCase2.java
27 * @author Matthieu Casanova
29 public final class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
31 /** The file that is parsed. */
32 private static IFile fileToParse;
34 /** The current segment. */
35 private static OutlineableWithChildren currentSegment;
37 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
38 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
39 static PHPOutlineInfo outlineInfo;
41 /** The error level of the current ParseException. */
42 private static int errorLevel = ERROR;
43 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
44 private static String errorMessage;
46 private static int errorStart = -1;
47 private static int errorEnd = -1;
48 private static PHPDocument phpDocument;
50 private static final char[] SYNTAX_ERROR_CHAR = {'s','y','n','t','a','x',' ','e','r','r','o','r'};
52 * The point where html starts.
53 * It will be used by the token manager to create HTMLCode objects
55 public static int htmlStart;
58 private final static int AstStackIncrement = 100;
59 /** The stack of node. */
60 private static AstNode[] nodes;
61 /** The cursor in expression stack. */
62 private static int nodePtr;
64 public final void setFileToParse(final IFile fileToParse) {
65 this.fileToParse = fileToParse;
71 public PHPParser(final IFile fileToParse) {
72 this(new StringReader(""));
73 this.fileToParse = fileToParse;
77 * Reinitialize the parser.
79 private static final void init() {
80 nodes = new AstNode[AstStackIncrement];
86 * Add an php node on the stack.
87 * @param node the node that will be added to the stack
89 private static final void pushOnAstNodes(AstNode node) {
91 nodes[++nodePtr] = node;
92 } catch (IndexOutOfBoundsException e) {
93 int oldStackLength = nodes.length;
94 AstNode[] oldStack = nodes;
95 nodes = new AstNode[oldStackLength + AstStackIncrement];
96 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
97 nodePtr = oldStackLength;
98 nodes[nodePtr] = node;
102 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
103 phpDocument = new PHPDocument(parent,"_root".toCharArray());
104 currentSegment = phpDocument;
105 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
106 final StringReader stream = new StringReader(s);
107 if (jj_input_stream == null) {
108 jj_input_stream = new SimpleCharStream(stream, 1, 1);
114 phpDocument.nodes = new AstNode[nodes.length];
115 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
116 if (PHPeclipsePlugin.DEBUG) {
117 PHPeclipsePlugin.log(1,phpDocument.toString());
119 } catch (ParseException e) {
120 processParseException(e);
126 * This method will process the parse exception.
127 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
128 * @param e the ParseException
130 private static void processParseException(final ParseException e) {
131 if (errorMessage == null) {
132 PHPeclipsePlugin.log(e);
133 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
134 errorStart = SimpleCharStream.getPosition();
135 errorEnd = errorStart + 1;
142 * Create marker for the parse error
143 * @param e the ParseException
145 private static void setMarker(final ParseException e) {
147 if (errorStart == -1) {
148 setMarker(fileToParse,
150 SimpleCharStream.tokenBegin,
151 SimpleCharStream.tokenBegin + e.currentToken.image.length(),
153 "Line " + e.currentToken.beginLine);
155 setMarker(fileToParse,
160 "Line " + e.currentToken.beginLine);
164 } catch (CoreException e2) {
165 PHPeclipsePlugin.log(e2);
169 private static void scanLine(final String output,
172 final int brIndx) throws CoreException {
174 StringBuffer lineNumberBuffer = new StringBuffer(10);
176 current = output.substring(indx, brIndx);
178 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
179 int onLine = current.indexOf("on line <b>");
181 lineNumberBuffer.delete(0, lineNumberBuffer.length());
182 for (int i = onLine; i < current.length(); i++) {
183 ch = current.charAt(i);
184 if ('0' <= ch && '9' >= ch) {
185 lineNumberBuffer.append(ch);
189 int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
191 Hashtable attributes = new Hashtable();
193 current = current.replaceAll("\n", "");
194 current = current.replaceAll("<b>", "");
195 current = current.replaceAll("</b>", "");
196 MarkerUtilities.setMessage(attributes, current);
198 if (current.indexOf(PARSE_ERROR_STRING) != -1)
199 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
200 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
201 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
203 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
204 MarkerUtilities.setLineNumber(attributes, lineNumber);
205 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
210 public final void parse(final String s) throws CoreException {
211 final StringReader stream = new StringReader(s);
212 if (jj_input_stream == null) {
213 jj_input_stream = new SimpleCharStream(stream, 1, 1);
219 } catch (ParseException e) {
220 processParseException(e);
225 * Call the php parse command ( php -l -f <filename> )
226 * and create markers according to the external parser output
228 public static void phpExternalParse(final IFile file) {
229 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
230 final String filename = file.getLocation().toString();
232 final String[] arguments = { filename };
233 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
234 final String command = form.format(arguments);
236 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
239 // parse the buffer to find the errors and warnings
240 createMarkers(parserResult, file);
241 } catch (CoreException e) {
242 PHPeclipsePlugin.log(e);
247 * Put a new html block in the stack.
249 public static final void createNewHTMLCode() {
250 final int currentPosition = SimpleCharStream.getPosition();
251 if (currentPosition == htmlStart) {
254 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray();
255 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
261 public static final void createNewTask() {
262 final int currentPosition = SimpleCharStream.getPosition();
263 final String todo = SimpleCharStream.currentBuffer.substring(currentPosition+1,
264 SimpleCharStream.currentBuffer.indexOf("\n",
267 setMarker(fileToParse,
269 SimpleCharStream.getBeginLine(),
271 "Line "+SimpleCharStream.getBeginLine());
272 } catch (CoreException e) {
273 PHPeclipsePlugin.log(e);
277 private static final void parse() throws ParseException {
281 static final public void phpFile() throws ParseException {
285 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
323 case INTEGER_LITERAL:
324 case FLOATING_POINT_LITERAL:
339 PHPParser.createNewHTMLCode();
340 } catch (TokenMgrError e) {
341 PHPeclipsePlugin.log(e);
342 errorStart = SimpleCharStream.getPosition();
343 errorEnd = errorStart + 1;
344 errorMessage = e.getMessage();
346 {if (true) throw generateParseException();}
351 * A php block is a <?= expression [;]?>
352 * or <?php somephpcode ?>
353 * or <? somephpcode ?>
355 static final public void PhpBlock() throws ParseException {
356 final int start = SimpleCharStream.getPosition();
357 final PHPEchoBlock phpEchoBlock;
358 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
360 phpEchoBlock = phpEchoBlock();
361 pushOnAstNodes(phpEchoBlock);
399 case INTEGER_LITERAL:
400 case FLOATING_POINT_LITERAL:
407 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
410 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
412 jj_consume_token(PHPSTARTLONG);
415 jj_consume_token(PHPSTARTSHORT);
417 setMarker(fileToParse,
418 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
420 SimpleCharStream.getPosition(),
422 "Line " + token.beginLine);
423 } catch (CoreException e) {
424 PHPeclipsePlugin.log(e);
429 jj_consume_token(-1);
430 throw new ParseException();
439 jj_consume_token(PHPEND);
440 } catch (ParseException e) {
441 errorMessage = "'?>' expected";
443 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
444 errorEnd = SimpleCharStream.getPosition() + 1;
445 processParseException(e);
450 jj_consume_token(-1);
451 throw new ParseException();
455 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
456 final Expression expr;
457 final int pos = SimpleCharStream.getPosition();
458 PHPEchoBlock echoBlock;
459 jj_consume_token(PHPECHOSTART);
461 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
463 jj_consume_token(SEMICOLON);
469 jj_consume_token(PHPEND);
470 echoBlock = new PHPEchoBlock(expr,pos,SimpleCharStream.getPosition());
471 pushOnAstNodes(echoBlock);
472 {if (true) return echoBlock;}
473 throw new Error("Missing return statement in function");
476 static final public void Php() throws ParseException {
479 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
513 case INTEGER_LITERAL:
514 case FLOATING_POINT_LITERAL:
531 static final public ClassDeclaration ClassDeclaration() throws ParseException {
532 final ClassDeclaration classDeclaration;
533 final Token className;
534 Token superclassName = null;
536 char[] classNameImage = SYNTAX_ERROR_CHAR;
537 char[] superclassNameImage = null;
538 jj_consume_token(CLASS);
539 pos = SimpleCharStream.getPosition();
541 className = jj_consume_token(IDENTIFIER);
542 classNameImage = className.image.toCharArray();
543 } catch (ParseException e) {
544 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
546 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
547 errorEnd = SimpleCharStream.getPosition() + 1;
548 processParseException(e);
550 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
552 jj_consume_token(EXTENDS);
554 superclassName = jj_consume_token(IDENTIFIER);
555 superclassNameImage = superclassName.image.toCharArray();
556 } catch (ParseException e) {
557 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
559 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
560 errorEnd = SimpleCharStream.getPosition() + 1;
561 processParseException(e);
562 superclassNameImage = SYNTAX_ERROR_CHAR;
569 if (superclassNameImage == null) {
570 classDeclaration = new ClassDeclaration(currentSegment,
575 classDeclaration = new ClassDeclaration(currentSegment,
581 currentSegment.add(classDeclaration);
582 currentSegment = classDeclaration;
583 ClassBody(classDeclaration);
584 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
585 classDeclaration.sourceEnd = SimpleCharStream.getPosition();
586 pushOnAstNodes(classDeclaration);
587 {if (true) return classDeclaration;}
588 throw new Error("Missing return statement in function");
591 static final public void ClassBody(ClassDeclaration classDeclaration) throws ParseException {
593 jj_consume_token(LBRACE);
594 } catch (ParseException e) {
595 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "', '{' expected";
597 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
598 errorEnd = SimpleCharStream.getPosition() + 1;
603 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
612 ClassBodyDeclaration(classDeclaration);
615 jj_consume_token(RBRACE);
616 } catch (ParseException e) {
617 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', 'var', 'function' or '}' expected";
619 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
620 errorEnd = SimpleCharStream.getPosition() + 1;
626 * A class can contain only methods and fields.
628 static final public void ClassBodyDeclaration(ClassDeclaration classDeclaration) throws ParseException {
629 MethodDeclaration method;
630 FieldDeclaration field;
631 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
633 method = MethodDeclaration();
634 classDeclaration.addMethod(method);
637 field = FieldDeclaration();
638 classDeclaration.addField(field);
642 jj_consume_token(-1);
643 throw new ParseException();
648 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
650 static final public FieldDeclaration FieldDeclaration() throws ParseException {
651 VariableDeclaration variableDeclaration;
652 VariableDeclaration[] list;
653 final ArrayList arrayList = new ArrayList();
654 final int pos = SimpleCharStream.getPosition();
655 jj_consume_token(VAR);
656 variableDeclaration = VariableDeclarator();
657 arrayList.add(variableDeclaration);
658 outlineInfo.addVariable(new String(variableDeclaration.name));
661 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
669 jj_consume_token(COMMA);
670 variableDeclaration = VariableDeclarator();
671 arrayList.add(variableDeclaration);
672 outlineInfo.addVariable(new String(variableDeclaration.name));
675 jj_consume_token(SEMICOLON);
676 } catch (ParseException e) {
677 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
679 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
680 errorEnd = SimpleCharStream.getPosition() + 1;
681 processParseException(e);
683 list = new VariableDeclaration[arrayList.size()];
684 arrayList.toArray(list);
685 {if (true) return new FieldDeclaration(list,
687 SimpleCharStream.getPosition(),
689 throw new Error("Missing return statement in function");
692 static final public VariableDeclaration VariableDeclarator() throws ParseException {
693 final String varName;
694 Expression initializer = null;
695 final int pos = SimpleCharStream.getPosition();
696 varName = VariableDeclaratorId();
697 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
699 jj_consume_token(ASSIGN);
701 initializer = VariableInitializer();
702 } catch (ParseException e) {
703 errorMessage = "Literal expression expected in variable initializer";
705 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
706 errorEnd = SimpleCharStream.getPosition() + 1;
714 if (initializer == null) {
715 {if (true) return new VariableDeclaration(currentSegment,
716 varName.toCharArray(),
718 SimpleCharStream.getPosition());}
720 {if (true) return new VariableDeclaration(currentSegment,
721 varName.toCharArray(),
724 throw new Error("Missing return statement in function");
729 * @return the variable name (with suffix)
731 static final public String VariableDeclaratorId() throws ParseException {
733 Expression expression = null;
734 final StringBuffer buff = new StringBuffer();
735 final int pos = SimpleCharStream.getPosition();
736 ConstantIdentifier ex;
746 ex = new ConstantIdentifier(expr.toCharArray(),
748 SimpleCharStream.getPosition());
749 expression = VariableSuffix(ex);
751 if (expression == null) {
752 {if (true) return expr;}
754 {if (true) return expression.toStringExpression();}
755 } catch (ParseException e) {
756 errorMessage = "'$' expected for variable identifier";
758 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
759 errorEnd = SimpleCharStream.getPosition() + 1;
762 throw new Error("Missing return statement in function");
766 * Return a variablename without the $.
767 * @return a variable name
769 static final public String Variable() throws ParseException {
770 final StringBuffer buff;
771 Expression expression = null;
774 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
776 token = jj_consume_token(DOLLAR_ID);
777 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
779 jj_consume_token(LBRACE);
780 expression = Expression();
781 jj_consume_token(RBRACE);
787 if (expression == null) {
788 {if (true) return token.image.substring(1);}
790 buff = new StringBuffer(token.image);
792 buff.append(expression.toStringExpression());
794 {if (true) return buff.toString();}
797 jj_consume_token(DOLLAR);
798 expr = VariableName();
799 {if (true) return expr;}
803 jj_consume_token(-1);
804 throw new ParseException();
806 throw new Error("Missing return statement in function");
810 * A Variable name (without the $)
811 * @return a variable name String
813 static final public String VariableName() throws ParseException {
814 final StringBuffer buff;
816 Expression expression = null;
818 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
820 jj_consume_token(LBRACE);
821 expression = Expression();
822 jj_consume_token(RBRACE);
823 buff = new StringBuffer("{");
824 buff.append(expression.toStringExpression());
826 {if (true) return buff.toString();}
829 token = jj_consume_token(IDENTIFIER);
830 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
832 jj_consume_token(LBRACE);
833 expression = Expression();
834 jj_consume_token(RBRACE);
840 if (expression == null) {
841 {if (true) return token.image;}
843 buff = new StringBuffer(token.image);
845 buff.append(expression.toStringExpression());
847 {if (true) return buff.toString();}
850 jj_consume_token(DOLLAR);
851 expr = VariableName();
852 buff = new StringBuffer("$");
854 {if (true) return buff.toString();}
857 token = jj_consume_token(DOLLAR_ID);
858 {if (true) return token.image;}
862 jj_consume_token(-1);
863 throw new ParseException();
865 throw new Error("Missing return statement in function");
868 static final public Expression VariableInitializer() throws ParseException {
869 final Expression expr;
871 final int pos = SimpleCharStream.getPosition();
872 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
876 case INTEGER_LITERAL:
877 case FLOATING_POINT_LITERAL:
880 {if (true) return expr;}
883 jj_consume_token(MINUS);
884 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
885 case INTEGER_LITERAL:
886 token = jj_consume_token(INTEGER_LITERAL);
888 case FLOATING_POINT_LITERAL:
889 token = jj_consume_token(FLOATING_POINT_LITERAL);
893 jj_consume_token(-1);
894 throw new ParseException();
896 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
898 SimpleCharStream.getPosition()),
903 jj_consume_token(PLUS);
904 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
905 case INTEGER_LITERAL:
906 token = jj_consume_token(INTEGER_LITERAL);
908 case FLOATING_POINT_LITERAL:
909 token = jj_consume_token(FLOATING_POINT_LITERAL);
913 jj_consume_token(-1);
914 throw new ParseException();
916 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
918 SimpleCharStream.getPosition()),
923 expr = ArrayDeclarator();
924 {if (true) return expr;}
927 token = jj_consume_token(IDENTIFIER);
928 {if (true) return new ConstantIdentifier(token.image.toCharArray(),pos,SimpleCharStream.getPosition());}
932 jj_consume_token(-1);
933 throw new ParseException();
935 throw new Error("Missing return statement in function");
938 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
939 Expression expr,expr2;
941 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
943 jj_consume_token(ARRAYASSIGN);
944 expr2 = Expression();
945 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
951 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
952 throw new Error("Missing return statement in function");
955 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
956 ArrayVariableDeclaration expr;
957 final ArrayList list = new ArrayList();
958 jj_consume_token(LPAREN);
959 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
975 case INTEGER_LITERAL:
976 case FLOATING_POINT_LITERAL:
981 expr = ArrayVariable();
990 jj_consume_token(COMMA);
991 expr = ArrayVariable();
999 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1001 jj_consume_token(COMMA);
1005 jj_la1[20] = jj_gen;
1008 jj_consume_token(RPAREN);
1009 ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1011 {if (true) return vars;}
1012 throw new Error("Missing return statement in function");
1016 * A Method Declaration.
1017 * <b>function</b> MetodDeclarator() Block()
1019 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1020 final MethodDeclaration functionDeclaration;
1022 final OutlineableWithChildren seg = currentSegment;
1023 jj_consume_token(FUNCTION);
1025 functionDeclaration = MethodDeclarator();
1026 outlineInfo.addVariable(new String(functionDeclaration.name));
1027 } catch (ParseException e) {
1028 if (errorMessage != null) {if (true) throw e;}
1029 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1031 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1032 errorEnd = SimpleCharStream.getPosition() + 1;
1033 {if (true) throw e;}
1035 currentSegment = functionDeclaration;
1037 functionDeclaration.statements = block.statements;
1038 currentSegment = seg;
1039 {if (true) return functionDeclaration;}
1040 throw new Error("Missing return statement in function");
1044 * A MethodDeclarator.
1045 * [&] IDENTIFIER(parameters ...).
1046 * @return a function description for the outline
1048 static final public MethodDeclaration MethodDeclarator() throws ParseException {
1049 final Token identifier;
1050 Token reference = null;
1051 final Hashtable formalParameters;
1052 final int pos = SimpleCharStream.getPosition();
1053 char[] identifierChar = SYNTAX_ERROR_CHAR;
1054 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1056 reference = jj_consume_token(BIT_AND);
1059 jj_la1[21] = jj_gen;
1063 identifier = jj_consume_token(IDENTIFIER);
1064 identifierChar = identifier.image.toCharArray();
1065 } catch (ParseException e) {
1066 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1068 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1069 errorEnd = SimpleCharStream.getPosition() + 1;
1070 processParseException(e);
1072 formalParameters = FormalParameters();
1073 {if (true) return new MethodDeclaration(currentSegment,
1078 SimpleCharStream.getPosition());}
1079 throw new Error("Missing return statement in function");
1083 * FormalParameters follows method identifier.
1084 * (FormalParameter())
1086 static final public Hashtable FormalParameters() throws ParseException {
1087 VariableDeclaration var;
1088 final Hashtable parameters = new Hashtable();
1090 jj_consume_token(LPAREN);
1091 } catch (ParseException e) {
1092 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1094 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1095 errorEnd = SimpleCharStream.getPosition() + 1;
1096 processParseException(e);
1098 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1102 var = FormalParameter();
1103 parameters.put(new String(var.name),var);
1106 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1111 jj_la1[22] = jj_gen;
1114 jj_consume_token(COMMA);
1115 var = FormalParameter();
1116 parameters.put(new String(var.name),var);
1120 jj_la1[23] = jj_gen;
1124 jj_consume_token(RPAREN);
1125 } catch (ParseException e) {
1126 errorMessage = "')' expected";
1128 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1129 errorEnd = SimpleCharStream.getPosition() + 1;
1130 processParseException(e);
1132 {if (true) return parameters;}
1133 throw new Error("Missing return statement in function");
1137 * A formal parameter.
1138 * $varname[=value] (,$varname[=value])
1140 static final public VariableDeclaration FormalParameter() throws ParseException {
1141 final VariableDeclaration variableDeclaration;
1143 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1145 token = jj_consume_token(BIT_AND);
1148 jj_la1[24] = jj_gen;
1151 variableDeclaration = VariableDeclarator();
1152 if (token != null) {
1153 variableDeclaration.setReference(true);
1155 {if (true) return variableDeclaration;}
1156 throw new Error("Missing return statement in function");
1159 static final public ConstantIdentifier Type() throws ParseException {
1161 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1163 jj_consume_token(STRING);
1164 pos = SimpleCharStream.getPosition();
1165 {if (true) return new ConstantIdentifier(Types.STRING,pos,pos-6);}
1168 jj_consume_token(BOOL);
1169 pos = SimpleCharStream.getPosition();
1170 {if (true) return new ConstantIdentifier(Types.BOOL,pos,pos-4);}
1173 jj_consume_token(BOOLEAN);
1174 pos = SimpleCharStream.getPosition();
1175 {if (true) return new ConstantIdentifier(Types.BOOLEAN,pos,pos-7);}
1178 jj_consume_token(REAL);
1179 pos = SimpleCharStream.getPosition();
1180 {if (true) return new ConstantIdentifier(Types.REAL,pos,pos-4);}
1183 jj_consume_token(DOUBLE);
1184 pos = SimpleCharStream.getPosition();
1185 {if (true) return new ConstantIdentifier(Types.DOUBLE,pos,pos-5);}
1188 jj_consume_token(FLOAT);
1189 pos = SimpleCharStream.getPosition();
1190 {if (true) return new ConstantIdentifier(Types.FLOAT,pos,pos-5);}
1193 jj_consume_token(INT);
1194 pos = SimpleCharStream.getPosition();
1195 {if (true) return new ConstantIdentifier(Types.INT,pos,pos-3);}
1198 jj_consume_token(INTEGER);
1199 pos = SimpleCharStream.getPosition();
1200 {if (true) return new ConstantIdentifier(Types.INTEGER,pos,pos-7);}
1203 jj_consume_token(OBJECT);
1204 pos = SimpleCharStream.getPosition();
1205 {if (true) return new ConstantIdentifier(Types.OBJECT,pos,pos-6);}
1208 jj_la1[25] = jj_gen;
1209 jj_consume_token(-1);
1210 throw new ParseException();
1212 throw new Error("Missing return statement in function");
1215 static final public Expression Expression() throws ParseException {
1216 final Expression expr;
1217 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1219 expr = PrintExpression();
1220 {if (true) return expr;}
1223 expr = ListExpression();
1224 {if (true) return expr;}
1227 jj_la1[26] = jj_gen;
1228 if (jj_2_3(2147483647)) {
1229 expr = varAssignation();
1230 {if (true) return expr;}
1232 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1246 case INTEGER_LITERAL:
1247 case FLOATING_POINT_LITERAL:
1248 case STRING_LITERAL:
1252 expr = ConditionalExpression();
1253 {if (true) return expr;}
1256 jj_la1[27] = jj_gen;
1257 jj_consume_token(-1);
1258 throw new ParseException();
1262 throw new Error("Missing return statement in function");
1266 * A Variable assignation.
1267 * varName (an assign operator) any expression
1269 static final public VarAssignation varAssignation() throws ParseException {
1271 final Expression initializer;
1272 final int assignOperator;
1273 final int pos = SimpleCharStream.getPosition();
1274 varName = VariableDeclaratorId();
1275 assignOperator = AssignmentOperator();
1277 initializer = Expression();
1278 } catch (ParseException e) {
1279 if (errorMessage != null) {
1280 {if (true) throw e;}
1282 errorMessage = "expression expected";
1284 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1285 errorEnd = SimpleCharStream.getPosition() + 1;
1286 {if (true) throw e;}
1288 {if (true) return new VarAssignation(varName.toCharArray(),
1292 SimpleCharStream.getPosition());}
1293 throw new Error("Missing return statement in function");
1296 static final public int AssignmentOperator() throws ParseException {
1297 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1299 jj_consume_token(ASSIGN);
1300 {if (true) return VarAssignation.EQUAL;}
1303 jj_consume_token(STARASSIGN);
1304 {if (true) return VarAssignation.STAR_EQUAL;}
1307 jj_consume_token(SLASHASSIGN);
1308 {if (true) return VarAssignation.SLASH_EQUAL;}
1311 jj_consume_token(REMASSIGN);
1312 {if (true) return VarAssignation.REM_EQUAL;}
1315 jj_consume_token(PLUSASSIGN);
1316 {if (true) return VarAssignation.PLUS_EQUAL;}
1319 jj_consume_token(MINUSASSIGN);
1320 {if (true) return VarAssignation.MINUS_EQUAL;}
1323 jj_consume_token(LSHIFTASSIGN);
1324 {if (true) return VarAssignation.LSHIFT_EQUAL;}
1326 case RSIGNEDSHIFTASSIGN:
1327 jj_consume_token(RSIGNEDSHIFTASSIGN);
1328 {if (true) return VarAssignation.RSIGNEDSHIFT_EQUAL;}
1331 jj_consume_token(ANDASSIGN);
1332 {if (true) return VarAssignation.AND_EQUAL;}
1335 jj_consume_token(XORASSIGN);
1336 {if (true) return VarAssignation.XOR_EQUAL;}
1339 jj_consume_token(ORASSIGN);
1340 {if (true) return VarAssignation.OR_EQUAL;}
1343 jj_consume_token(DOTASSIGN);
1344 {if (true) return VarAssignation.DOT_EQUAL;}
1347 jj_consume_token(TILDEEQUAL);
1348 {if (true) return VarAssignation.TILDE_EQUAL;}
1351 jj_la1[28] = jj_gen;
1352 jj_consume_token(-1);
1353 throw new ParseException();
1355 throw new Error("Missing return statement in function");
1358 static final public Expression ConditionalExpression() throws ParseException {
1359 final Expression expr;
1360 Expression expr2 = null;
1361 Expression expr3 = null;
1362 expr = ConditionalOrExpression();
1363 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1365 jj_consume_token(HOOK);
1366 expr2 = Expression();
1367 jj_consume_token(COLON);
1368 expr3 = ConditionalExpression();
1371 jj_la1[29] = jj_gen;
1374 if (expr3 == null) {
1375 {if (true) return expr;}
1377 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1378 throw new Error("Missing return statement in function");
1381 static final public Expression ConditionalOrExpression() throws ParseException {
1382 Expression expr,expr2;
1384 expr = ConditionalAndExpression();
1387 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1393 jj_la1[30] = jj_gen;
1396 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1398 jj_consume_token(OR_OR);
1399 operator = OperatorIds.OR_OR;
1402 jj_consume_token(_ORL);
1403 operator = OperatorIds.ORL;
1406 jj_la1[31] = jj_gen;
1407 jj_consume_token(-1);
1408 throw new ParseException();
1410 expr2 = ConditionalAndExpression();
1411 expr = new BinaryExpression(expr,expr2,operator);
1413 {if (true) return expr;}
1414 throw new Error("Missing return statement in function");
1417 static final public Expression ConditionalAndExpression() throws ParseException {
1418 Expression expr,expr2;
1420 expr = ConcatExpression();
1423 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1429 jj_la1[32] = jj_gen;
1432 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1434 jj_consume_token(AND_AND);
1435 operator = OperatorIds.AND_AND;
1438 jj_consume_token(_ANDL);
1439 operator = OperatorIds.ANDL;
1442 jj_la1[33] = jj_gen;
1443 jj_consume_token(-1);
1444 throw new ParseException();
1446 expr2 = ConcatExpression();
1447 expr = new BinaryExpression(expr,expr2,operator);
1449 {if (true) return expr;}
1450 throw new Error("Missing return statement in function");
1453 static final public Expression ConcatExpression() throws ParseException {
1454 Expression expr,expr2;
1455 expr = InclusiveOrExpression();
1458 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1463 jj_la1[34] = jj_gen;
1466 jj_consume_token(DOT);
1467 expr2 = InclusiveOrExpression();
1468 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1470 {if (true) return expr;}
1471 throw new Error("Missing return statement in function");
1474 static final public Expression InclusiveOrExpression() throws ParseException {
1475 Expression expr,expr2;
1476 expr = ExclusiveOrExpression();
1479 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1484 jj_la1[35] = jj_gen;
1487 jj_consume_token(BIT_OR);
1488 expr2 = ExclusiveOrExpression();
1489 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1491 {if (true) return expr;}
1492 throw new Error("Missing return statement in function");
1495 static final public Expression ExclusiveOrExpression() throws ParseException {
1496 Expression expr,expr2;
1497 expr = AndExpression();
1500 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1505 jj_la1[36] = jj_gen;
1508 jj_consume_token(XOR);
1509 expr2 = AndExpression();
1510 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1512 {if (true) return expr;}
1513 throw new Error("Missing return statement in function");
1516 static final public Expression AndExpression() throws ParseException {
1517 Expression expr,expr2;
1518 expr = EqualityExpression();
1521 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1526 jj_la1[37] = jj_gen;
1529 jj_consume_token(BIT_AND);
1530 expr2 = EqualityExpression();
1531 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1533 {if (true) return expr;}
1534 throw new Error("Missing return statement in function");
1537 static final public Expression EqualityExpression() throws ParseException {
1538 Expression expr,expr2;
1540 expr = RelationalExpression();
1543 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1547 case BANGDOUBLEEQUAL:
1552 jj_la1[38] = jj_gen;
1555 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1557 jj_consume_token(EQUAL_EQUAL);
1558 operator = OperatorIds.EQUAL_EQUAL;
1561 jj_consume_token(DIF);
1562 operator = OperatorIds.DIF;
1565 jj_consume_token(NOT_EQUAL);
1566 operator = OperatorIds.DIF;
1568 case BANGDOUBLEEQUAL:
1569 jj_consume_token(BANGDOUBLEEQUAL);
1570 operator = OperatorIds.BANG_EQUAL_EQUAL;
1573 jj_consume_token(TRIPLEEQUAL);
1574 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1577 jj_la1[39] = jj_gen;
1578 jj_consume_token(-1);
1579 throw new ParseException();
1582 expr2 = RelationalExpression();
1583 } catch (ParseException e) {
1584 if (errorMessage != null) {
1585 {if (true) throw e;}
1587 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1589 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1590 errorEnd = SimpleCharStream.getPosition() + 1;
1591 {if (true) throw e;}
1593 expr = new BinaryExpression(expr,expr2,operator);
1595 {if (true) return expr;}
1596 throw new Error("Missing return statement in function");
1599 static final public Expression RelationalExpression() throws ParseException {
1600 Expression expr,expr2;
1602 expr = ShiftExpression();
1605 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1613 jj_la1[40] = jj_gen;
1616 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1618 jj_consume_token(LT);
1619 operator = OperatorIds.LESS;
1622 jj_consume_token(GT);
1623 operator = OperatorIds.GREATER;
1626 jj_consume_token(LE);
1627 operator = OperatorIds.LESS_EQUAL;
1630 jj_consume_token(GE);
1631 operator = OperatorIds.GREATER_EQUAL;
1634 jj_la1[41] = jj_gen;
1635 jj_consume_token(-1);
1636 throw new ParseException();
1638 expr2 = ShiftExpression();
1639 expr = new BinaryExpression(expr,expr2,operator);
1641 {if (true) return expr;}
1642 throw new Error("Missing return statement in function");
1645 static final public Expression ShiftExpression() throws ParseException {
1646 Expression expr,expr2;
1648 expr = AdditiveExpression();
1651 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1654 case RUNSIGNEDSHIFT:
1658 jj_la1[42] = jj_gen;
1661 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1663 jj_consume_token(LSHIFT);
1664 operator = OperatorIds.LEFT_SHIFT;
1667 jj_consume_token(RSIGNEDSHIFT);
1668 operator = OperatorIds.RIGHT_SHIFT;
1670 case RUNSIGNEDSHIFT:
1671 jj_consume_token(RUNSIGNEDSHIFT);
1672 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1675 jj_la1[43] = jj_gen;
1676 jj_consume_token(-1);
1677 throw new ParseException();
1679 expr2 = AdditiveExpression();
1680 expr = new BinaryExpression(expr,expr2,operator);
1682 {if (true) return expr;}
1683 throw new Error("Missing return statement in function");
1686 static final public Expression AdditiveExpression() throws ParseException {
1687 Expression expr,expr2;
1689 expr = MultiplicativeExpression();
1692 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1698 jj_la1[44] = jj_gen;
1701 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1703 jj_consume_token(PLUS);
1704 operator = OperatorIds.PLUS;
1707 jj_consume_token(MINUS);
1708 operator = OperatorIds.MINUS;
1711 jj_la1[45] = jj_gen;
1712 jj_consume_token(-1);
1713 throw new ParseException();
1715 expr2 = MultiplicativeExpression();
1716 expr = new BinaryExpression(expr,expr2,operator);
1718 {if (true) return expr;}
1719 throw new Error("Missing return statement in function");
1722 static final public Expression MultiplicativeExpression() throws ParseException {
1723 Expression expr,expr2;
1726 expr = UnaryExpression();
1727 } catch (ParseException e) {
1728 if (errorMessage != null) {if (true) throw e;}
1729 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1731 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1732 errorEnd = SimpleCharStream.getPosition() + 1;
1733 {if (true) throw e;}
1737 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1744 jj_la1[46] = jj_gen;
1747 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1749 jj_consume_token(STAR);
1750 operator = OperatorIds.MULTIPLY;
1753 jj_consume_token(SLASH);
1754 operator = OperatorIds.DIVIDE;
1757 jj_consume_token(REMAINDER);
1758 operator = OperatorIds.REMAINDER;
1761 jj_la1[47] = jj_gen;
1762 jj_consume_token(-1);
1763 throw new ParseException();
1765 expr2 = UnaryExpression();
1766 expr = new BinaryExpression(expr,expr2,operator);
1768 {if (true) return expr;}
1769 throw new Error("Missing return statement in function");
1773 * An unary expression starting with @, & or nothing
1775 static final public Expression UnaryExpression() throws ParseException {
1777 final int pos = SimpleCharStream.getPosition();
1778 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1780 jj_consume_token(BIT_AND);
1781 expr = UnaryExpressionNoPrefix();
1782 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1796 case INTEGER_LITERAL:
1797 case FLOATING_POINT_LITERAL:
1798 case STRING_LITERAL:
1802 expr = AtUnaryExpression();
1803 {if (true) return expr;}
1806 jj_la1[48] = jj_gen;
1807 jj_consume_token(-1);
1808 throw new ParseException();
1810 throw new Error("Missing return statement in function");
1813 static final public Expression AtUnaryExpression() throws ParseException {
1815 final int pos = SimpleCharStream.getPosition();
1816 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1818 jj_consume_token(AT);
1819 expr = AtUnaryExpression();
1820 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,pos);}
1833 case INTEGER_LITERAL:
1834 case FLOATING_POINT_LITERAL:
1835 case STRING_LITERAL:
1839 expr = UnaryExpressionNoPrefix();
1840 {if (true) return expr;}
1843 jj_la1[49] = jj_gen;
1844 jj_consume_token(-1);
1845 throw new ParseException();
1847 throw new Error("Missing return statement in function");
1850 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
1853 final int pos = SimpleCharStream.getPosition();
1854 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1857 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1859 jj_consume_token(PLUS);
1860 operator = OperatorIds.PLUS;
1863 jj_consume_token(MINUS);
1864 operator = OperatorIds.MINUS;
1867 jj_la1[50] = jj_gen;
1868 jj_consume_token(-1);
1869 throw new ParseException();
1871 expr = UnaryExpression();
1872 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1876 expr = PreIncDecExpression();
1877 {if (true) return expr;}
1886 case INTEGER_LITERAL:
1887 case FLOATING_POINT_LITERAL:
1888 case STRING_LITERAL:
1892 expr = UnaryExpressionNotPlusMinus();
1893 {if (true) return expr;}
1896 jj_la1[51] = jj_gen;
1897 jj_consume_token(-1);
1898 throw new ParseException();
1900 throw new Error("Missing return statement in function");
1903 static final public Expression PreIncDecExpression() throws ParseException {
1904 final Expression expr;
1906 final int pos = SimpleCharStream.getPosition();
1907 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1909 jj_consume_token(PLUS_PLUS);
1910 operator = OperatorIds.PLUS_PLUS;
1913 jj_consume_token(MINUS_MINUS);
1914 operator = OperatorIds.MINUS_MINUS;
1917 jj_la1[52] = jj_gen;
1918 jj_consume_token(-1);
1919 throw new ParseException();
1921 expr = PrimaryExpression();
1922 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1923 throw new Error("Missing return statement in function");
1926 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
1928 final int pos = SimpleCharStream.getPosition();
1929 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1931 jj_consume_token(BANG);
1932 expr = UnaryExpression();
1933 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1936 jj_la1[53] = jj_gen;
1937 if (jj_2_4(2147483647)) {
1938 expr = CastExpression();
1939 {if (true) return expr;}
1941 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1947 expr = PostfixExpression();
1948 {if (true) return expr;}
1953 case INTEGER_LITERAL:
1954 case FLOATING_POINT_LITERAL:
1955 case STRING_LITERAL:
1957 {if (true) return expr;}
1960 jj_consume_token(LPAREN);
1961 expr = Expression();
1963 jj_consume_token(RPAREN);
1964 } catch (ParseException e) {
1965 errorMessage = "')' expected";
1967 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1968 errorEnd = SimpleCharStream.getPosition() + 1;
1969 {if (true) throw e;}
1971 {if (true) return expr;}
1974 jj_la1[54] = jj_gen;
1975 jj_consume_token(-1);
1976 throw new ParseException();
1980 throw new Error("Missing return statement in function");
1983 static final public CastExpression CastExpression() throws ParseException {
1984 final ConstantIdentifier type;
1985 final Expression expr;
1986 final int pos = SimpleCharStream.getPosition();
1987 jj_consume_token(LPAREN);
1988 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2001 jj_consume_token(ARRAY);
2002 type = new ConstantIdentifier(Types.ARRAY,pos,SimpleCharStream.getPosition());
2005 jj_la1[55] = jj_gen;
2006 jj_consume_token(-1);
2007 throw new ParseException();
2009 jj_consume_token(RPAREN);
2010 expr = UnaryExpression();
2011 {if (true) return new CastExpression(type,expr,pos,SimpleCharStream.getPosition());}
2012 throw new Error("Missing return statement in function");
2015 static final public Expression PostfixExpression() throws ParseException {
2018 final int pos = SimpleCharStream.getPosition();
2019 expr = PrimaryExpression();
2020 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2023 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2025 jj_consume_token(PLUS_PLUS);
2026 operator = OperatorIds.PLUS_PLUS;
2029 jj_consume_token(MINUS_MINUS);
2030 operator = OperatorIds.MINUS_MINUS;
2033 jj_la1[56] = jj_gen;
2034 jj_consume_token(-1);
2035 throw new ParseException();
2039 jj_la1[57] = jj_gen;
2042 if (operator == -1) {
2043 {if (true) return expr;}
2045 {if (true) return new PostfixedUnaryExpression(expr,operator,pos);}
2046 throw new Error("Missing return statement in function");
2049 static final public Expression PrimaryExpression() throws ParseException {
2050 final Token identifier;
2052 final int pos = SimpleCharStream.getPosition();
2054 identifier = jj_consume_token(IDENTIFIER);
2055 jj_consume_token(STATICCLASSACCESS);
2056 expr = ClassIdentifier();
2057 expr = new ClassAccess(new ConstantIdentifier(identifier.image.toCharArray(),
2059 SimpleCharStream.getPosition()),
2061 ClassAccess.STATIC);
2064 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2071 jj_la1[58] = jj_gen;
2074 expr = PrimarySuffix(expr);
2076 {if (true) return expr;}
2078 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2083 expr = PrimaryPrefix();
2086 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2093 jj_la1[59] = jj_gen;
2096 expr = PrimarySuffix(expr);
2098 {if (true) return expr;}
2101 expr = ArrayDeclarator();
2102 {if (true) return expr;}
2105 jj_la1[60] = jj_gen;
2106 jj_consume_token(-1);
2107 throw new ParseException();
2110 throw new Error("Missing return statement in function");
2113 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2114 final ArrayVariableDeclaration[] vars;
2115 final int pos = SimpleCharStream.getPosition();
2116 jj_consume_token(ARRAY);
2117 vars = ArrayInitializer();
2118 {if (true) return new ArrayInitializer(vars,pos,SimpleCharStream.getPosition());}
2119 throw new Error("Missing return statement in function");
2122 static final public Expression PrimaryPrefix() throws ParseException {
2123 final Expression expr;
2126 final int pos = SimpleCharStream.getPosition();
2127 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2129 token = jj_consume_token(IDENTIFIER);
2130 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2132 SimpleCharStream.getPosition());}
2135 jj_consume_token(NEW);
2136 expr = ClassIdentifier();
2137 {if (true) return new PrefixedUnaryExpression(expr,
2143 var = VariableDeclaratorId();
2144 {if (true) return new VariableDeclaration(currentSegment,
2147 SimpleCharStream.getPosition());}
2150 jj_la1[61] = jj_gen;
2151 jj_consume_token(-1);
2152 throw new ParseException();
2154 throw new Error("Missing return statement in function");
2157 static final public PrefixedUnaryExpression classInstantiation() throws ParseException {
2159 final StringBuffer buff;
2160 final int pos = SimpleCharStream.getPosition();
2161 jj_consume_token(NEW);
2162 expr = ClassIdentifier();
2163 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2169 buff = new StringBuffer(expr.toStringExpression());
2170 expr = PrimaryExpression();
2171 buff.append(expr.toStringExpression());
2172 expr = new ConstantIdentifier(buff.toString().toCharArray(),
2174 SimpleCharStream.getPosition());
2177 jj_la1[62] = jj_gen;
2180 {if (true) return new PrefixedUnaryExpression(expr,
2183 throw new Error("Missing return statement in function");
2186 static final public ConstantIdentifier ClassIdentifier() throws ParseException {
2189 final int pos = SimpleCharStream.getPosition();
2190 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2192 token = jj_consume_token(IDENTIFIER);
2193 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2195 SimpleCharStream.getPosition());}
2199 expr = VariableDeclaratorId();
2200 {if (true) return new ConstantIdentifier(expr.toCharArray(),
2202 SimpleCharStream.getPosition());}
2205 jj_la1[63] = jj_gen;
2206 jj_consume_token(-1);
2207 throw new ParseException();
2209 throw new Error("Missing return statement in function");
2212 static final public AbstractSuffixExpression PrimarySuffix(Expression prefix) throws ParseException {
2213 final AbstractSuffixExpression expr;
2214 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2216 expr = Arguments(prefix);
2217 {if (true) return expr;}
2221 expr = VariableSuffix(prefix);
2222 {if (true) return expr;}
2225 jj_la1[64] = jj_gen;
2226 jj_consume_token(-1);
2227 throw new ParseException();
2229 throw new Error("Missing return statement in function");
2232 static final public AbstractSuffixExpression VariableSuffix(Expression prefix) throws ParseException {
2234 final int pos = SimpleCharStream.getPosition();
2235 Expression expression = null;
2236 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2238 jj_consume_token(CLASSACCESS);
2240 expr = VariableName();
2241 } catch (ParseException e) {
2242 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2244 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2245 errorEnd = SimpleCharStream.getPosition() + 1;
2246 {if (true) throw e;}
2248 {if (true) return new ClassAccess(prefix,
2249 new ConstantIdentifier(expr.toCharArray(),pos,SimpleCharStream.getPosition()),
2250 ClassAccess.NORMAL);}
2253 jj_consume_token(LBRACKET);
2254 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2279 case INTEGER_LITERAL:
2280 case FLOATING_POINT_LITERAL:
2281 case STRING_LITERAL:
2285 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2301 case INTEGER_LITERAL:
2302 case FLOATING_POINT_LITERAL:
2303 case STRING_LITERAL:
2307 expression = Expression();
2318 expression = Type();
2321 jj_la1[65] = jj_gen;
2322 jj_consume_token(-1);
2323 throw new ParseException();
2327 jj_la1[66] = jj_gen;
2331 jj_consume_token(RBRACKET);
2332 } catch (ParseException e) {
2333 errorMessage = "']' expected";
2335 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2336 errorEnd = SimpleCharStream.getPosition() + 1;
2337 {if (true) throw e;}
2339 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2342 jj_la1[67] = jj_gen;
2343 jj_consume_token(-1);
2344 throw new ParseException();
2346 throw new Error("Missing return statement in function");
2349 static final public Literal Literal() throws ParseException {
2352 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2353 case INTEGER_LITERAL:
2354 token = jj_consume_token(INTEGER_LITERAL);
2355 pos = SimpleCharStream.getPosition();
2356 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2358 case FLOATING_POINT_LITERAL:
2359 token = jj_consume_token(FLOATING_POINT_LITERAL);
2360 pos = SimpleCharStream.getPosition();
2361 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2363 case STRING_LITERAL:
2364 token = jj_consume_token(STRING_LITERAL);
2365 pos = SimpleCharStream.getPosition();
2366 {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length());}
2369 jj_consume_token(TRUE);
2370 pos = SimpleCharStream.getPosition();
2371 {if (true) return new TrueLiteral(pos-4,pos);}
2374 jj_consume_token(FALSE);
2375 pos = SimpleCharStream.getPosition();
2376 {if (true) return new FalseLiteral(pos-4,pos);}
2379 jj_consume_token(NULL);
2380 pos = SimpleCharStream.getPosition();
2381 {if (true) return new NullLiteral(pos-4,pos);}
2384 jj_la1[68] = jj_gen;
2385 jj_consume_token(-1);
2386 throw new ParseException();
2388 throw new Error("Missing return statement in function");
2391 static final public FunctionCall Arguments(Expression func) throws ParseException {
2392 Expression[] args = null;
2393 jj_consume_token(LPAREN);
2394 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2410 case INTEGER_LITERAL:
2411 case FLOATING_POINT_LITERAL:
2412 case STRING_LITERAL:
2416 args = ArgumentList();
2419 jj_la1[69] = jj_gen;
2423 jj_consume_token(RPAREN);
2424 } catch (ParseException e) {
2425 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2427 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2428 errorEnd = SimpleCharStream.getPosition() + 1;
2429 {if (true) throw e;}
2431 {if (true) return new FunctionCall(func,args,SimpleCharStream.getPosition());}
2432 throw new Error("Missing return statement in function");
2436 * An argument list is a list of arguments separated by comma :
2437 * argumentDeclaration() (, argumentDeclaration)*
2438 * @return an array of arguments
2440 static final public Expression[] ArgumentList() throws ParseException {
2442 final ArrayList list = new ArrayList();
2447 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2452 jj_la1[70] = jj_gen;
2455 jj_consume_token(COMMA);
2459 } catch (ParseException e) {
2460 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2462 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2463 errorEnd = SimpleCharStream.getPosition() + 1;
2464 {if (true) throw e;}
2467 Expression[] arguments = new Expression[list.size()];
2468 list.toArray(arguments);
2469 {if (true) return arguments;}
2470 throw new Error("Missing return statement in function");
2474 * A Statement without break.
2476 static final public Statement StatementNoBreak() throws ParseException {
2477 final Statement statement;
2480 statement = Expression();
2482 jj_consume_token(SEMICOLON);
2483 } catch (ParseException e) {
2484 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2485 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2487 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2488 errorEnd = SimpleCharStream.getPosition() + 1;
2489 {if (true) throw e;}
2492 {if (true) return statement;}
2493 } else if (jj_2_7(2)) {
2494 statement = LabeledStatement();
2495 {if (true) return statement;}
2497 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2499 statement = Block();
2500 {if (true) return statement;}
2503 statement = EmptyStatement();
2504 {if (true) return statement;}
2513 statement = StatementExpression();
2515 jj_consume_token(SEMICOLON);
2516 } catch (ParseException e) {
2517 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2519 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2520 errorEnd = SimpleCharStream.getPosition() + 1;
2521 {if (true) throw e;}
2523 {if (true) return statement;}
2526 statement = SwitchStatement();
2527 {if (true) return statement;}
2530 statement = IfStatement();
2531 {if (true) return statement;}
2534 statement = WhileStatement();
2535 {if (true) return statement;}
2538 statement = DoStatement();
2539 {if (true) return statement;}
2542 statement = ForStatement();
2543 {if (true) return statement;}
2546 statement = ForeachStatement();
2547 {if (true) return statement;}
2550 statement = ContinueStatement();
2551 {if (true) return statement;}
2554 statement = ReturnStatement();
2555 {if (true) return statement;}
2558 statement = EchoStatement();
2559 {if (true) return statement;}
2566 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2568 token = jj_consume_token(AT);
2571 jj_la1[71] = jj_gen;
2574 statement = IncludeStatement();
2575 if (token != null) {
2576 ((InclusionStatement)statement).silent = true;
2578 {if (true) return statement;}
2581 statement = StaticStatement();
2582 {if (true) return statement;}
2585 statement = GlobalStatement();
2586 {if (true) return statement;}
2589 jj_la1[72] = jj_gen;
2590 jj_consume_token(-1);
2591 throw new ParseException();
2594 throw new Error("Missing return statement in function");
2598 * A Normal statement.
2600 static final public Statement Statement() throws ParseException {
2601 final Statement statement;
2602 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2633 case INTEGER_LITERAL:
2634 case FLOATING_POINT_LITERAL:
2635 case STRING_LITERAL:
2641 statement = StatementNoBreak();
2642 {if (true) return statement;}
2645 statement = BreakStatement();
2646 {if (true) return statement;}
2649 jj_la1[73] = jj_gen;
2650 jj_consume_token(-1);
2651 throw new ParseException();
2653 throw new Error("Missing return statement in function");
2657 * An html block inside a php syntax.
2659 static final public HTMLBlock htmlBlock() throws ParseException {
2660 final int startIndex = nodePtr;
2661 AstNode[] blockNodes;
2663 jj_consume_token(PHPEND);
2666 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2671 jj_la1[74] = jj_gen;
2677 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2679 jj_consume_token(PHPSTARTLONG);
2682 jj_consume_token(PHPSTARTSHORT);
2685 jj_la1[75] = jj_gen;
2686 jj_consume_token(-1);
2687 throw new ParseException();
2689 } catch (ParseException e) {
2690 errorMessage = "unexpected end of file , '<?php' expected";
2692 errorStart = SimpleCharStream.getPosition();
2693 errorEnd = SimpleCharStream.getPosition();
2694 {if (true) throw e;}
2696 nbNodes = nodePtr - startIndex;
2697 blockNodes = new AstNode[nbNodes];
2698 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2699 nodePtr = startIndex;
2700 {if (true) return new HTMLBlock(blockNodes);}
2701 throw new Error("Missing return statement in function");
2705 * An include statement. It's "include" an expression;
2707 static final public InclusionStatement IncludeStatement() throws ParseException {
2708 final Expression expr;
2710 final int pos = SimpleCharStream.getPosition();
2711 final InclusionStatement inclusionStatement;
2712 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2714 jj_consume_token(REQUIRE);
2715 keyword = InclusionStatement.REQUIRE;
2718 jj_consume_token(REQUIRE_ONCE);
2719 keyword = InclusionStatement.REQUIRE_ONCE;
2722 jj_consume_token(INCLUDE);
2723 keyword = InclusionStatement.INCLUDE;
2726 jj_consume_token(INCLUDE_ONCE);
2727 keyword = InclusionStatement.INCLUDE_ONCE;
2730 jj_la1[76] = jj_gen;
2731 jj_consume_token(-1);
2732 throw new ParseException();
2735 expr = Expression();
2736 } catch (ParseException e) {
2737 if (errorMessage != null) {
2738 {if (true) throw e;}
2740 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
2742 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2743 errorEnd = SimpleCharStream.getPosition() + 1;
2744 {if (true) throw e;}
2746 inclusionStatement = new InclusionStatement(currentSegment,
2750 currentSegment.add(inclusionStatement);
2752 jj_consume_token(SEMICOLON);
2753 } catch (ParseException e) {
2754 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2756 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2757 errorEnd = SimpleCharStream.getPosition() + 1;
2758 {if (true) throw e;}
2760 {if (true) return inclusionStatement;}
2761 throw new Error("Missing return statement in function");
2764 static final public PrintExpression PrintExpression() throws ParseException {
2765 final Expression expr;
2766 final int pos = SimpleCharStream.getPosition();
2767 jj_consume_token(PRINT);
2768 expr = Expression();
2769 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
2770 throw new Error("Missing return statement in function");
2773 static final public ListExpression ListExpression() throws ParseException {
2775 Expression expression = null;
2776 ArrayList list = new ArrayList();
2777 final int pos = SimpleCharStream.getPosition();
2778 jj_consume_token(LIST);
2780 jj_consume_token(LPAREN);
2781 } catch (ParseException e) {
2782 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2784 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2785 errorEnd = SimpleCharStream.getPosition() + 1;
2786 {if (true) throw e;}
2788 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2791 expr = VariableDeclaratorId();
2795 jj_la1[77] = jj_gen;
2798 if (expr == null) list.add(null);
2801 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2806 jj_la1[78] = jj_gen;
2810 jj_consume_token(COMMA);
2811 } catch (ParseException e) {
2812 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2814 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2815 errorEnd = SimpleCharStream.getPosition() + 1;
2816 {if (true) throw e;}
2818 expr = VariableDeclaratorId();
2822 jj_consume_token(RPAREN);
2823 } catch (ParseException e) {
2824 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2826 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2827 errorEnd = SimpleCharStream.getPosition() + 1;
2828 {if (true) throw e;}
2830 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2832 jj_consume_token(ASSIGN);
2833 expression = Expression();
2834 String[] strings = new String[list.size()];
2835 list.toArray(strings);
2836 {if (true) return new ListExpression(strings,
2839 SimpleCharStream.getPosition());}
2842 jj_la1[79] = jj_gen;
2845 String[] strings = new String[list.size()];
2846 list.toArray(strings);
2847 {if (true) return new ListExpression(strings,pos,SimpleCharStream.getPosition());}
2848 throw new Error("Missing return statement in function");
2852 * An echo statement.
2853 * echo anyexpression (, otherexpression)*
2855 static final public EchoStatement EchoStatement() throws ParseException {
2856 final ArrayList expressions = new ArrayList();
2858 final int pos = SimpleCharStream.getPosition();
2859 jj_consume_token(ECHO);
2860 expr = Expression();
2861 expressions.add(expr);
2864 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2869 jj_la1[80] = jj_gen;
2872 jj_consume_token(COMMA);
2873 expr = Expression();
2874 expressions.add(expr);
2877 jj_consume_token(SEMICOLON);
2878 } catch (ParseException e) {
2879 if (e.currentToken.next.kind != 4) {
2880 errorMessage = "';' expected after 'echo' statement";
2882 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2883 errorEnd = SimpleCharStream.getPosition() + 1;
2884 {if (true) throw e;}
2887 Expression[] exprs = new Expression[expressions.size()];
2888 expressions.toArray(exprs);
2889 {if (true) return new EchoStatement(exprs,pos);}
2890 throw new Error("Missing return statement in function");
2893 static final public GlobalStatement GlobalStatement() throws ParseException {
2894 final int pos = SimpleCharStream.getPosition();
2896 ArrayList vars = new ArrayList();
2897 GlobalStatement global;
2898 jj_consume_token(GLOBAL);
2899 expr = VariableDeclaratorId();
2903 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2908 jj_la1[81] = jj_gen;
2911 jj_consume_token(COMMA);
2912 expr = VariableDeclaratorId();
2916 jj_consume_token(SEMICOLON);
2917 String[] strings = new String[vars.size()];
2918 vars.toArray(strings);
2919 global = new GlobalStatement(currentSegment,
2922 SimpleCharStream.getPosition());
2923 currentSegment.add(global);
2924 {if (true) return global;}
2925 } catch (ParseException e) {
2926 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
2928 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2929 errorEnd = SimpleCharStream.getPosition() + 1;
2930 {if (true) throw e;}
2932 throw new Error("Missing return statement in function");
2935 static final public StaticStatement StaticStatement() throws ParseException {
2936 final int pos = SimpleCharStream.getPosition();
2937 final ArrayList vars = new ArrayList();
2938 VariableDeclaration expr;
2939 jj_consume_token(STATIC);
2940 expr = VariableDeclarator();
2941 vars.add(new String(expr.name));
2944 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2949 jj_la1[82] = jj_gen;
2952 jj_consume_token(COMMA);
2953 expr = VariableDeclarator();
2954 vars.add(new String(expr.name));
2957 jj_consume_token(SEMICOLON);
2958 String[] strings = new String[vars.size()];
2959 vars.toArray(strings);
2960 {if (true) return new StaticStatement(strings,
2962 SimpleCharStream.getPosition());}
2963 } catch (ParseException e) {
2964 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
2966 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2967 errorEnd = SimpleCharStream.getPosition() + 1;
2968 {if (true) throw e;}
2970 throw new Error("Missing return statement in function");
2973 static final public LabeledStatement LabeledStatement() throws ParseException {
2974 final int pos = SimpleCharStream.getPosition();
2976 final Statement statement;
2977 label = jj_consume_token(IDENTIFIER);
2978 jj_consume_token(COLON);
2979 statement = Statement();
2980 {if (true) return new LabeledStatement(label.image.toCharArray(),statement,pos,SimpleCharStream.getPosition());}
2981 throw new Error("Missing return statement in function");
2991 static final public Block Block() throws ParseException {
2992 final int pos = SimpleCharStream.getPosition();
2993 final ArrayList list = new ArrayList();
2994 Statement statement;
2996 jj_consume_token(LBRACE);
2997 } catch (ParseException e) {
2998 errorMessage = "'{' expected";
3000 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3001 errorEnd = SimpleCharStream.getPosition() + 1;
3002 {if (true) throw e;}
3006 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3041 case INTEGER_LITERAL:
3042 case FLOATING_POINT_LITERAL:
3043 case STRING_LITERAL:
3052 jj_la1[83] = jj_gen;
3055 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3089 case INTEGER_LITERAL:
3090 case FLOATING_POINT_LITERAL:
3091 case STRING_LITERAL:
3097 statement = BlockStatement();
3098 list.add(statement);
3101 statement = htmlBlock();
3102 list.add(statement);
3105 jj_la1[84] = jj_gen;
3106 jj_consume_token(-1);
3107 throw new ParseException();
3111 jj_consume_token(RBRACE);
3112 } catch (ParseException e) {
3113 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3115 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3116 errorEnd = SimpleCharStream.getPosition() + 1;
3117 {if (true) throw e;}
3119 Statement[] statements = new Statement[list.size()];
3120 list.toArray(statements);
3121 {if (true) return new Block(statements,pos,SimpleCharStream.getPosition());}
3122 throw new Error("Missing return statement in function");
3125 static final public Statement BlockStatement() throws ParseException {
3126 final Statement statement;
3127 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3159 case INTEGER_LITERAL:
3160 case FLOATING_POINT_LITERAL:
3161 case STRING_LITERAL:
3168 statement = Statement();
3169 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3170 {if (true) return statement;}
3171 } catch (ParseException e) {
3172 if (errorMessage != null) {if (true) throw e;}
3173 errorMessage = "statement expected";
3175 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3176 errorEnd = SimpleCharStream.getPosition() + 1;
3177 {if (true) throw e;}
3181 statement = ClassDeclaration();
3182 {if (true) return statement;}
3185 statement = MethodDeclaration();
3186 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3187 currentSegment.add((MethodDeclaration) statement);
3188 {if (true) return statement;}
3191 jj_la1[85] = jj_gen;
3192 jj_consume_token(-1);
3193 throw new ParseException();
3195 throw new Error("Missing return statement in function");
3199 * A Block statement that will not contain any 'break'
3201 static final public Statement BlockStatementNoBreak() throws ParseException {
3202 final Statement statement;
3203 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3234 case INTEGER_LITERAL:
3235 case FLOATING_POINT_LITERAL:
3236 case STRING_LITERAL:
3242 statement = StatementNoBreak();
3243 {if (true) return statement;}
3246 statement = ClassDeclaration();
3247 {if (true) return statement;}
3250 statement = MethodDeclaration();
3251 currentSegment.add((MethodDeclaration) statement);
3252 {if (true) return statement;}
3255 jj_la1[86] = jj_gen;
3256 jj_consume_token(-1);
3257 throw new ParseException();
3259 throw new Error("Missing return statement in function");
3262 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3263 final ArrayList list = new ArrayList();
3264 VariableDeclaration var;
3265 var = LocalVariableDeclarator();
3269 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3274 jj_la1[87] = jj_gen;
3277 jj_consume_token(COMMA);
3278 var = LocalVariableDeclarator();
3281 VariableDeclaration[] vars = new VariableDeclaration[list.size()];
3283 {if (true) return vars;}
3284 throw new Error("Missing return statement in function");
3287 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3288 final String varName;
3289 Expression initializer = null;
3290 final int pos = SimpleCharStream.getPosition();
3291 varName = VariableDeclaratorId();
3292 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3294 jj_consume_token(ASSIGN);
3295 initializer = Expression();
3298 jj_la1[88] = jj_gen;
3301 if (initializer == null) {
3302 {if (true) return new VariableDeclaration(currentSegment,
3303 varName.toCharArray(),
3305 SimpleCharStream.getPosition());}
3307 {if (true) return new VariableDeclaration(currentSegment,
3308 varName.toCharArray(),
3311 throw new Error("Missing return statement in function");
3314 static final public EmptyStatement EmptyStatement() throws ParseException {
3316 jj_consume_token(SEMICOLON);
3317 pos = SimpleCharStream.getPosition();
3318 {if (true) return new EmptyStatement(pos-1,pos);}
3319 throw new Error("Missing return statement in function");
3322 static final public Expression StatementExpression() throws ParseException {
3323 Expression expr,expr2;
3325 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3328 expr = PreIncDecExpression();
3329 {if (true) return expr;}
3336 expr = PrimaryExpression();
3337 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3352 case RSIGNEDSHIFTASSIGN:
3353 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3355 jj_consume_token(PLUS_PLUS);
3356 {if (true) return new PostfixedUnaryExpression(expr,
3357 OperatorIds.PLUS_PLUS,
3358 SimpleCharStream.getPosition());}
3361 jj_consume_token(MINUS_MINUS);
3362 {if (true) return new PostfixedUnaryExpression(expr,
3363 OperatorIds.MINUS_MINUS,
3364 SimpleCharStream.getPosition());}
3378 case RSIGNEDSHIFTASSIGN:
3379 operator = AssignmentOperator();
3380 expr2 = Expression();
3381 {if (true) return new BinaryExpression(expr,expr2,operator);}
3384 jj_la1[89] = jj_gen;
3385 jj_consume_token(-1);
3386 throw new ParseException();
3390 jj_la1[90] = jj_gen;
3393 {if (true) return expr;}
3396 jj_la1[91] = jj_gen;
3397 jj_consume_token(-1);
3398 throw new ParseException();
3400 throw new Error("Missing return statement in function");
3403 static final public SwitchStatement SwitchStatement() throws ParseException {
3404 final Expression variable;
3405 final AbstractCase[] cases;
3406 final int pos = SimpleCharStream.getPosition();
3407 jj_consume_token(SWITCH);
3409 jj_consume_token(LPAREN);
3410 } catch (ParseException e) {
3411 errorMessage = "'(' expected after 'switch'";
3413 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3414 errorEnd = SimpleCharStream.getPosition() + 1;
3415 {if (true) throw e;}
3418 variable = Expression();
3419 } catch (ParseException e) {
3420 if (errorMessage != null) {
3421 {if (true) throw e;}
3423 errorMessage = "expression expected";
3425 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3426 errorEnd = SimpleCharStream.getPosition() + 1;
3427 {if (true) throw e;}
3430 jj_consume_token(RPAREN);
3431 } catch (ParseException e) {
3432 errorMessage = "')' expected";
3434 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3435 errorEnd = SimpleCharStream.getPosition() + 1;
3436 {if (true) throw e;}
3438 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3440 cases = switchStatementBrace();
3443 cases = switchStatementColon(pos, pos + 6);
3446 jj_la1[92] = jj_gen;
3447 jj_consume_token(-1);
3448 throw new ParseException();
3450 {if (true) return new SwitchStatement(variable,cases,pos,SimpleCharStream.getPosition());}
3451 throw new Error("Missing return statement in function");
3454 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3456 final ArrayList cases = new ArrayList();
3457 jj_consume_token(LBRACE);
3460 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3466 jj_la1[93] = jj_gen;
3469 cas = switchLabel0();
3473 jj_consume_token(RBRACE);
3474 AbstractCase[] abcase = new AbstractCase[cases.size()];
3475 cases.toArray(abcase);
3476 {if (true) return abcase;}
3477 } catch (ParseException e) {
3478 errorMessage = "'}' expected";
3480 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3481 errorEnd = SimpleCharStream.getPosition() + 1;
3482 {if (true) throw e;}
3484 throw new Error("Missing return statement in function");
3488 * A Switch statement with : ... endswitch;
3489 * @param start the begin offset of the switch
3490 * @param end the end offset of the switch
3492 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3494 final ArrayList cases = new ArrayList();
3495 jj_consume_token(COLON);
3497 setMarker(fileToParse,
3498 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3502 "Line " + token.beginLine);
3503 } catch (CoreException e) {
3504 PHPeclipsePlugin.log(e);
3508 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3514 jj_la1[94] = jj_gen;
3517 cas = switchLabel0();
3521 jj_consume_token(ENDSWITCH);
3522 } catch (ParseException e) {
3523 errorMessage = "'endswitch' expected";
3525 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3526 errorEnd = SimpleCharStream.getPosition() + 1;
3527 {if (true) throw e;}
3530 jj_consume_token(SEMICOLON);
3531 AbstractCase[] abcase = new AbstractCase[cases.size()];
3532 cases.toArray(abcase);
3533 {if (true) return abcase;}
3534 } catch (ParseException e) {
3535 errorMessage = "';' expected after 'endswitch' keyword";
3537 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3538 errorEnd = SimpleCharStream.getPosition() + 1;
3539 {if (true) throw e;}
3541 throw new Error("Missing return statement in function");
3544 static final public AbstractCase switchLabel0() throws ParseException {
3545 final Expression expr;
3546 Statement statement;
3547 final ArrayList stmts = new ArrayList();
3548 final int pos = SimpleCharStream.getPosition();
3549 expr = SwitchLabel();
3552 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3586 case INTEGER_LITERAL:
3587 case FLOATING_POINT_LITERAL:
3588 case STRING_LITERAL:
3597 jj_la1[95] = jj_gen;
3600 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3633 case INTEGER_LITERAL:
3634 case FLOATING_POINT_LITERAL:
3635 case STRING_LITERAL:
3641 statement = BlockStatementNoBreak();
3642 stmts.add(statement);
3645 statement = htmlBlock();
3646 stmts.add(statement);
3649 jj_la1[96] = jj_gen;
3650 jj_consume_token(-1);
3651 throw new ParseException();
3654 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3656 statement = BreakStatement();
3657 stmts.add(statement);
3660 jj_la1[97] = jj_gen;
3663 Statement[] stmtsArray = new Statement[stmts.size()];
3664 stmts.toArray(stmtsArray);
3665 if (expr == null) {//it's a default
3666 {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3668 {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3669 throw new Error("Missing return statement in function");
3674 * case Expression() :
3676 * @return the if it was a case and null if not
3678 static final public Expression SwitchLabel() throws ParseException {
3679 final Expression expr;
3680 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3682 token = jj_consume_token(CASE);
3684 expr = Expression();
3685 } catch (ParseException e) {
3686 if (errorMessage != null) {if (true) throw e;}
3687 errorMessage = "expression expected after 'case' keyword";
3689 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3690 errorEnd = SimpleCharStream.getPosition() + 1;
3691 {if (true) throw e;}
3694 jj_consume_token(COLON);
3695 {if (true) return expr;}
3696 } catch (ParseException e) {
3697 errorMessage = "':' expected after case expression";
3699 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3700 errorEnd = SimpleCharStream.getPosition() + 1;
3701 {if (true) throw e;}
3705 token = jj_consume_token(_DEFAULT);
3707 jj_consume_token(COLON);
3708 {if (true) return null;}
3709 } catch (ParseException e) {
3710 errorMessage = "':' expected after 'default' keyword";
3712 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3713 errorEnd = SimpleCharStream.getPosition() + 1;
3714 {if (true) throw e;}
3718 jj_la1[98] = jj_gen;
3719 jj_consume_token(-1);
3720 throw new ParseException();
3722 throw new Error("Missing return statement in function");
3725 static final public Break BreakStatement() throws ParseException {
3726 Expression expression = null;
3727 final int start = SimpleCharStream.getPosition();
3728 jj_consume_token(BREAK);
3729 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3745 case INTEGER_LITERAL:
3746 case FLOATING_POINT_LITERAL:
3747 case STRING_LITERAL:
3751 expression = Expression();
3754 jj_la1[99] = jj_gen;
3758 jj_consume_token(SEMICOLON);
3759 } catch (ParseException e) {
3760 errorMessage = "';' expected after 'break' keyword";
3762 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3763 errorEnd = SimpleCharStream.getPosition() + 1;
3764 {if (true) throw e;}
3766 {if (true) return new Break(expression, start, SimpleCharStream.getPosition());}
3767 throw new Error("Missing return statement in function");
3770 static final public IfStatement IfStatement() throws ParseException {
3771 final int pos = SimpleCharStream.getPosition();
3772 Expression condition;
3773 IfStatement ifStatement;
3774 jj_consume_token(IF);
3775 condition = Condition("if");
3776 ifStatement = IfStatement0(condition, pos,pos+2);
3777 {if (true) return ifStatement;}
3778 throw new Error("Missing return statement in function");
3781 static final public Expression Condition(final String keyword) throws ParseException {
3782 final Expression condition;
3784 jj_consume_token(LPAREN);
3785 } catch (ParseException e) {
3786 errorMessage = "'(' expected after " + keyword + " keyword";
3788 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length();
3789 errorEnd = errorStart +1;
3790 processParseException(e);
3792 condition = Expression();
3794 jj_consume_token(RPAREN);
3795 } catch (ParseException e) {
3796 errorMessage = "')' expected after " + keyword + " keyword";
3798 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3799 errorEnd = SimpleCharStream.getPosition() + 1;
3800 processParseException(e);
3802 {if (true) return condition;}
3803 throw new Error("Missing return statement in function");
3806 static final public IfStatement IfStatement0(Expression condition, final int start,final int end) throws ParseException {
3807 Statement statement;
3809 final Statement[] statementsArray;
3810 ElseIf elseifStatement;
3811 Else elseStatement = null;
3813 final ArrayList elseIfList = new ArrayList();
3815 int pos = SimpleCharStream.getPosition();
3817 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3819 jj_consume_token(COLON);
3820 stmts = new ArrayList();
3823 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3856 case INTEGER_LITERAL:
3857 case FLOATING_POINT_LITERAL:
3858 case STRING_LITERAL:
3867 jj_la1[100] = jj_gen;
3870 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3902 case INTEGER_LITERAL:
3903 case FLOATING_POINT_LITERAL:
3904 case STRING_LITERAL:
3910 statement = Statement();
3911 stmts.add(statement);
3914 statement = htmlBlock();
3915 stmts.add(statement);
3918 jj_la1[101] = jj_gen;
3919 jj_consume_token(-1);
3920 throw new ParseException();
3923 endStatements = SimpleCharStream.getPosition();
3926 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3931 jj_la1[102] = jj_gen;
3934 elseifStatement = ElseIfStatementColon();
3935 elseIfList.add(elseifStatement);
3937 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3939 elseStatement = ElseStatementColon();
3942 jj_la1[103] = jj_gen;
3946 setMarker(fileToParse,
3947 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
3951 "Line " + token.beginLine);
3952 } catch (CoreException e) {
3953 PHPeclipsePlugin.log(e);
3956 jj_consume_token(ENDIF);
3957 } catch (ParseException e) {
3958 errorMessage = "'endif' expected";
3960 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3961 errorEnd = SimpleCharStream.getPosition() + 1;
3962 {if (true) throw e;}
3965 jj_consume_token(SEMICOLON);
3966 } catch (ParseException e) {
3967 errorMessage = "';' expected after 'endif' keyword";
3969 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3970 errorEnd = SimpleCharStream.getPosition() + 1;
3971 {if (true) throw e;}
3973 elseIfs = new ElseIf[elseIfList.size()];
3974 elseIfList.toArray(elseIfs);
3975 if (stmts.size() == 1) {
3976 {if (true) return new IfStatement(condition,
3977 (Statement) stmts.get(0),
3981 SimpleCharStream.getPosition());}
3983 statementsArray = new Statement[stmts.size()];
3984 stmts.toArray(statementsArray);
3985 {if (true) return new IfStatement(condition,
3986 new Block(statementsArray,pos,endStatements),
3990 SimpleCharStream.getPosition());}
4025 case INTEGER_LITERAL:
4026 case FLOATING_POINT_LITERAL:
4027 case STRING_LITERAL:
4033 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4065 case INTEGER_LITERAL:
4066 case FLOATING_POINT_LITERAL:
4067 case STRING_LITERAL:
4079 jj_la1[104] = jj_gen;
4080 jj_consume_token(-1);
4081 throw new ParseException();
4085 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4090 jj_la1[105] = jj_gen;
4093 elseifStatement = ElseIfStatement();
4094 elseIfList.add(elseifStatement);
4096 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4098 jj_consume_token(ELSE);
4100 pos = SimpleCharStream.getPosition();
4101 statement = Statement();
4102 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4103 } catch (ParseException e) {
4104 if (errorMessage != null) {
4105 {if (true) throw e;}
4107 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4109 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4110 errorEnd = SimpleCharStream.getPosition() + 1;
4111 {if (true) throw e;}
4115 jj_la1[106] = jj_gen;
4118 elseIfs = new ElseIf[elseIfList.size()];
4119 elseIfList.toArray(elseIfs);
4120 {if (true) return new IfStatement(condition,
4125 SimpleCharStream.getPosition());}
4128 jj_la1[107] = jj_gen;
4129 jj_consume_token(-1);
4130 throw new ParseException();
4132 throw new Error("Missing return statement in function");
4135 static final public ElseIf ElseIfStatementColon() throws ParseException {
4136 Expression condition;
4137 Statement statement;
4138 final ArrayList list = new ArrayList();
4139 final int pos = SimpleCharStream.getPosition();
4140 jj_consume_token(ELSEIF);
4141 condition = Condition("elseif");
4142 jj_consume_token(COLON);
4145 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4178 case INTEGER_LITERAL:
4179 case FLOATING_POINT_LITERAL:
4180 case STRING_LITERAL:
4189 jj_la1[108] = jj_gen;
4192 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4224 case INTEGER_LITERAL:
4225 case FLOATING_POINT_LITERAL:
4226 case STRING_LITERAL:
4232 statement = Statement();
4233 list.add(statement);
4236 statement = htmlBlock();
4237 list.add(statement);
4240 jj_la1[109] = jj_gen;
4241 jj_consume_token(-1);
4242 throw new ParseException();
4245 Statement[] stmtsArray = new Statement[list.size()];
4246 list.toArray(stmtsArray);
4247 {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4248 throw new Error("Missing return statement in function");
4251 static final public Else ElseStatementColon() throws ParseException {
4252 Statement statement;
4253 final ArrayList list = new ArrayList();
4254 final int pos = SimpleCharStream.getPosition();
4255 jj_consume_token(ELSE);
4256 jj_consume_token(COLON);
4259 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4292 case INTEGER_LITERAL:
4293 case FLOATING_POINT_LITERAL:
4294 case STRING_LITERAL:
4303 jj_la1[110] = jj_gen;
4306 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4338 case INTEGER_LITERAL:
4339 case FLOATING_POINT_LITERAL:
4340 case STRING_LITERAL:
4346 statement = Statement();
4347 list.add(statement);
4350 statement = htmlBlock();
4351 list.add(statement);
4354 jj_la1[111] = jj_gen;
4355 jj_consume_token(-1);
4356 throw new ParseException();
4359 Statement[] stmtsArray = new Statement[list.size()];
4360 list.toArray(stmtsArray);
4361 {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4362 throw new Error("Missing return statement in function");
4365 static final public ElseIf ElseIfStatement() throws ParseException {
4366 Expression condition;
4367 Statement statement;
4368 final ArrayList list = new ArrayList();
4369 final int pos = SimpleCharStream.getPosition();
4370 jj_consume_token(ELSEIF);
4371 condition = Condition("elseif");
4372 statement = Statement();
4373 list.add(statement);/*todo:do better*/
4374 Statement[] stmtsArray = new Statement[list.size()];
4375 list.toArray(stmtsArray);
4376 {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4377 throw new Error("Missing return statement in function");
4380 static final public WhileStatement WhileStatement() throws ParseException {
4381 final Expression condition;
4382 final Statement action;
4383 final int pos = SimpleCharStream.getPosition();
4384 jj_consume_token(WHILE);
4385 condition = Condition("while");
4386 action = WhileStatement0(pos,pos + 5);
4387 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4388 throw new Error("Missing return statement in function");
4391 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4392 Statement statement;
4393 final ArrayList stmts = new ArrayList();
4394 final int pos = SimpleCharStream.getPosition();
4395 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4397 jj_consume_token(COLON);
4400 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4432 case INTEGER_LITERAL:
4433 case FLOATING_POINT_LITERAL:
4434 case STRING_LITERAL:
4443 jj_la1[112] = jj_gen;
4446 statement = Statement();
4447 stmts.add(statement);
4450 setMarker(fileToParse,
4451 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4455 "Line " + token.beginLine);
4456 } catch (CoreException e) {
4457 PHPeclipsePlugin.log(e);
4460 jj_consume_token(ENDWHILE);
4461 } catch (ParseException e) {
4462 errorMessage = "'endwhile' expected";
4464 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4465 errorEnd = SimpleCharStream.getPosition() + 1;
4466 {if (true) throw e;}
4469 jj_consume_token(SEMICOLON);
4470 Statement[] stmtsArray = new Statement[stmts.size()];
4471 stmts.toArray(stmtsArray);
4472 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4473 } catch (ParseException e) {
4474 errorMessage = "';' expected after 'endwhile' keyword";
4476 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4477 errorEnd = SimpleCharStream.getPosition() + 1;
4478 {if (true) throw e;}
4512 case INTEGER_LITERAL:
4513 case FLOATING_POINT_LITERAL:
4514 case STRING_LITERAL:
4520 statement = Statement();
4521 {if (true) return statement;}
4524 jj_la1[113] = jj_gen;
4525 jj_consume_token(-1);
4526 throw new ParseException();
4528 throw new Error("Missing return statement in function");
4531 static final public DoStatement DoStatement() throws ParseException {
4532 final Statement action;
4533 final Expression condition;
4534 final int pos = SimpleCharStream.getPosition();
4535 jj_consume_token(DO);
4536 action = Statement();
4537 jj_consume_token(WHILE);
4538 condition = Condition("while");
4540 jj_consume_token(SEMICOLON);
4541 {if (true) return new DoStatement(condition,action,pos,SimpleCharStream.getPosition());}
4542 } catch (ParseException e) {
4543 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4545 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4546 errorEnd = SimpleCharStream.getPosition() + 1;
4547 {if (true) throw e;}
4549 throw new Error("Missing return statement in function");
4552 static final public ForeachStatement ForeachStatement() throws ParseException {
4553 Statement statement;
4554 Expression expression;
4555 final int pos = SimpleCharStream.getPosition();
4556 ArrayVariableDeclaration variable;
4557 jj_consume_token(FOREACH);
4559 jj_consume_token(LPAREN);
4560 } catch (ParseException e) {
4561 errorMessage = "'(' expected after 'foreach' keyword";
4563 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4564 errorEnd = SimpleCharStream.getPosition() + 1;
4565 {if (true) throw e;}
4568 expression = Expression();
4569 } catch (ParseException e) {
4570 errorMessage = "variable expected";
4572 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4573 errorEnd = SimpleCharStream.getPosition() + 1;
4574 {if (true) throw e;}
4577 jj_consume_token(AS);
4578 } catch (ParseException e) {
4579 errorMessage = "'as' expected";
4581 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4582 errorEnd = SimpleCharStream.getPosition() + 1;
4583 {if (true) throw e;}
4586 variable = ArrayVariable();
4587 } catch (ParseException e) {
4588 errorMessage = "variable expected";
4590 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4591 errorEnd = SimpleCharStream.getPosition() + 1;
4592 {if (true) throw e;}
4595 jj_consume_token(RPAREN);
4596 } catch (ParseException e) {
4597 errorMessage = "')' expected after 'foreach' keyword";
4599 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4600 errorEnd = SimpleCharStream.getPosition() + 1;
4601 {if (true) throw e;}
4604 statement = Statement();
4605 } catch (ParseException e) {
4606 if (errorMessage != null) {if (true) throw e;}
4607 errorMessage = "statement expected";
4609 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4610 errorEnd = SimpleCharStream.getPosition() + 1;
4611 {if (true) throw e;}
4613 {if (true) return new ForeachStatement(expression,
4617 SimpleCharStream.getPosition());}
4618 throw new Error("Missing return statement in function");
4621 static final public ForStatement ForStatement() throws ParseException {
4623 final int pos = SimpleCharStream.getPosition();
4624 Expression[] initializations = null;
4625 Expression condition = null;
4626 Expression[] increments = null;
4628 final ArrayList list = new ArrayList();
4629 final int startBlock, endBlock;
4630 token = jj_consume_token(FOR);
4632 jj_consume_token(LPAREN);
4633 } catch (ParseException e) {
4634 errorMessage = "'(' expected after 'for' keyword";
4636 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4637 errorEnd = SimpleCharStream.getPosition() + 1;
4638 {if (true) throw e;}
4640 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4648 initializations = ForInit();
4651 jj_la1[114] = jj_gen;
4654 jj_consume_token(SEMICOLON);
4655 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4671 case INTEGER_LITERAL:
4672 case FLOATING_POINT_LITERAL:
4673 case STRING_LITERAL:
4677 condition = Expression();
4680 jj_la1[115] = jj_gen;
4683 jj_consume_token(SEMICOLON);
4684 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4692 increments = StatementExpressionList();
4695 jj_la1[116] = jj_gen;
4698 jj_consume_token(RPAREN);
4699 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4731 case INTEGER_LITERAL:
4732 case FLOATING_POINT_LITERAL:
4733 case STRING_LITERAL:
4739 action = Statement();
4740 {if (true) return new ForStatement(initializations,condition,increments,action,pos,SimpleCharStream.getPosition());}
4743 jj_consume_token(COLON);
4744 startBlock = SimpleCharStream.getPosition();
4747 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4779 case INTEGER_LITERAL:
4780 case FLOATING_POINT_LITERAL:
4781 case STRING_LITERAL:
4790 jj_la1[117] = jj_gen;
4793 action = Statement();
4797 setMarker(fileToParse,
4798 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
4800 pos+token.image.length(),
4802 "Line " + token.beginLine);
4803 } catch (CoreException e) {
4804 PHPeclipsePlugin.log(e);
4806 endBlock = SimpleCharStream.getPosition();
4808 jj_consume_token(ENDFOR);
4809 } catch (ParseException e) {
4810 errorMessage = "'endfor' expected";
4812 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4813 errorEnd = SimpleCharStream.getPosition() + 1;
4814 {if (true) throw e;}
4817 jj_consume_token(SEMICOLON);
4818 Statement[] stmtsArray = new Statement[list.size()];
4819 list.toArray(stmtsArray);
4820 {if (true) return new ForStatement(initializations,condition,increments,new Block(stmtsArray,startBlock,endBlock),pos,SimpleCharStream.getPosition());}
4821 } catch (ParseException e) {
4822 errorMessage = "';' expected after 'endfor' keyword";
4824 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4825 errorEnd = SimpleCharStream.getPosition() + 1;
4826 {if (true) throw e;}
4830 jj_la1[118] = jj_gen;
4831 jj_consume_token(-1);
4832 throw new ParseException();
4834 throw new Error("Missing return statement in function");
4837 static final public Expression[] ForInit() throws ParseException {
4839 if (jj_2_8(2147483647)) {
4840 exprs = LocalVariableDeclaration();
4841 {if (true) return exprs;}
4843 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4851 exprs = StatementExpressionList();
4852 {if (true) return exprs;}
4855 jj_la1[119] = jj_gen;
4856 jj_consume_token(-1);
4857 throw new ParseException();
4860 throw new Error("Missing return statement in function");
4863 static final public Expression[] StatementExpressionList() throws ParseException {
4864 final ArrayList list = new ArrayList();
4866 expr = StatementExpression();
4870 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4875 jj_la1[120] = jj_gen;
4878 jj_consume_token(COMMA);
4879 StatementExpression();
4882 Expression[] exprsArray = new Expression[list.size()];
4883 list.toArray(exprsArray);
4884 {if (true) return exprsArray;}
4885 throw new Error("Missing return statement in function");
4888 static final public Continue ContinueStatement() throws ParseException {
4889 Expression expr = null;
4890 final int pos = SimpleCharStream.getPosition();
4891 jj_consume_token(CONTINUE);
4892 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4908 case INTEGER_LITERAL:
4909 case FLOATING_POINT_LITERAL:
4910 case STRING_LITERAL:
4914 expr = Expression();
4917 jj_la1[121] = jj_gen;
4921 jj_consume_token(SEMICOLON);
4922 {if (true) return new Continue(expr,pos,SimpleCharStream.getPosition());}
4923 } catch (ParseException e) {
4924 errorMessage = "';' expected after 'continue' statement";
4926 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4927 errorEnd = SimpleCharStream.getPosition() + 1;
4928 {if (true) throw e;}
4930 throw new Error("Missing return statement in function");
4933 static final public ReturnStatement ReturnStatement() throws ParseException {
4934 Expression expr = null;
4935 final int pos = SimpleCharStream.getPosition();
4936 jj_consume_token(RETURN);
4937 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4953 case INTEGER_LITERAL:
4954 case FLOATING_POINT_LITERAL:
4955 case STRING_LITERAL:
4959 expr = Expression();
4962 jj_la1[122] = jj_gen;
4966 jj_consume_token(SEMICOLON);
4967 {if (true) return new ReturnStatement(expr,pos,SimpleCharStream.getPosition());}
4968 } catch (ParseException e) {
4969 errorMessage = "';' expected after 'return' statement";
4971 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4972 errorEnd = SimpleCharStream.getPosition() + 1;
4973 {if (true) throw e;}
4975 throw new Error("Missing return statement in function");
4978 static final private boolean jj_2_1(int xla) {
4979 jj_la = xla; jj_lastpos = jj_scanpos = token;
4980 boolean retval = !jj_3_1();
4985 static final private boolean jj_2_2(int xla) {
4986 jj_la = xla; jj_lastpos = jj_scanpos = token;
4987 boolean retval = !jj_3_2();
4992 static final private boolean jj_2_3(int xla) {
4993 jj_la = xla; jj_lastpos = jj_scanpos = token;
4994 boolean retval = !jj_3_3();
4999 static final private boolean jj_2_4(int xla) {
5000 jj_la = xla; jj_lastpos = jj_scanpos = token;
5001 boolean retval = !jj_3_4();
5006 static final private boolean jj_2_5(int xla) {
5007 jj_la = xla; jj_lastpos = jj_scanpos = token;
5008 boolean retval = !jj_3_5();
5013 static final private boolean jj_2_6(int xla) {
5014 jj_la = xla; jj_lastpos = jj_scanpos = token;
5015 boolean retval = !jj_3_6();
5020 static final private boolean jj_2_7(int xla) {
5021 jj_la = xla; jj_lastpos = jj_scanpos = token;
5022 boolean retval = !jj_3_7();
5027 static final private boolean jj_2_8(int xla) {
5028 jj_la = xla; jj_lastpos = jj_scanpos = token;
5029 boolean retval = !jj_3_8();
5034 static final private boolean jj_3R_81() {
5035 if (jj_scan_token(INT)) return true;
5036 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5040 static final private boolean jj_3R_44() {
5041 if (jj_scan_token(ARRAY)) return true;
5042 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5046 static final private boolean jj_3R_80() {
5047 if (jj_scan_token(FLOAT)) return true;
5048 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5052 static final private boolean jj_3R_184() {
5053 if (jj_scan_token(ARRAY)) return true;
5054 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5058 static final private boolean jj_3R_79() {
5059 if (jj_scan_token(DOUBLE)) return true;
5060 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5064 static final private boolean jj_3R_85() {
5065 if (jj_scan_token(LIST)) return true;
5066 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5067 if (jj_scan_token(LPAREN)) return true;
5068 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5071 if (jj_3R_99()) jj_scanpos = xsp;
5072 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5075 if (jj_3R_100()) { jj_scanpos = xsp; break; }
5076 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5078 if (jj_scan_token(RPAREN)) return true;
5079 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5081 if (jj_3R_101()) jj_scanpos = xsp;
5082 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5086 static final private boolean jj_3R_183() {
5087 if (jj_3R_52()) return true;
5088 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5092 static final private boolean jj_3R_78() {
5093 if (jj_scan_token(REAL)) return true;
5094 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5098 static final private boolean jj_3R_167() {
5099 if (jj_scan_token(LPAREN)) return true;
5100 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5105 if (jj_3R_184()) return true;
5106 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5107 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5108 if (jj_scan_token(RPAREN)) return true;
5109 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5110 if (jj_3R_139()) return true;
5111 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5115 static final private boolean jj_3R_77() {
5116 if (jj_scan_token(BOOLEAN)) return true;
5117 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5121 static final private boolean jj_3R_76() {
5122 if (jj_scan_token(BOOL)) return true;
5123 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5127 static final private boolean jj_3R_43() {
5128 if (jj_3R_52()) return true;
5129 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5133 static final private boolean jj_3R_75() {
5134 if (jj_scan_token(STRING)) return true;
5135 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5139 static final private boolean jj_3R_52() {
5158 if (jj_3R_83()) return true;
5159 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5160 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5161 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5162 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5163 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5164 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5165 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5166 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5167 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5171 static final private boolean jj_3R_84() {
5172 if (jj_scan_token(PRINT)) return true;
5173 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5174 if (jj_3R_45()) return true;
5175 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5179 static final private boolean jj_3_4() {
5180 if (jj_scan_token(LPAREN)) return true;
5181 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5186 if (jj_3R_44()) return true;
5187 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5188 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5189 if (jj_scan_token(RPAREN)) return true;
5190 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5194 static final private boolean jj_3R_165() {
5195 if (jj_scan_token(LPAREN)) return true;
5196 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5197 if (jj_3R_45()) return true;
5198 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5199 if (jj_scan_token(RPAREN)) return true;
5200 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5204 static final private boolean jj_3R_164() {
5205 if (jj_3R_169()) return true;
5206 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5210 static final private boolean jj_3R_163() {
5211 if (jj_3R_168()) return true;
5212 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5216 static final private boolean jj_3R_162() {
5217 if (jj_3R_167()) return true;
5218 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5222 static final private boolean jj_3R_158() {
5233 if (jj_3R_165()) return true;
5234 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5235 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5236 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5237 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5238 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5242 static final private boolean jj_3R_161() {
5243 if (jj_scan_token(BANG)) return true;
5244 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5245 if (jj_3R_139()) return true;
5246 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5250 static final private boolean jj_3R_160() {
5251 if (jj_scan_token(MINUS_MINUS)) return true;
5252 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5256 static final private boolean jj_3R_159() {
5257 if (jj_scan_token(PLUS_PLUS)) return true;
5258 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5262 static final private boolean jj_3R_157() {
5267 if (jj_3R_160()) return true;
5268 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5269 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5270 if (jj_3R_166()) return true;
5271 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5275 static final private boolean jj_3R_152() {
5276 if (jj_3R_158()) return true;
5277 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5281 static final private boolean jj_3R_151() {
5282 if (jj_3R_157()) return true;
5283 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5287 static final private boolean jj_3R_156() {
5288 if (jj_scan_token(MINUS)) return true;
5289 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5293 static final private boolean jj_3R_155() {
5294 if (jj_scan_token(PLUS)) return true;
5295 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5299 static final private boolean jj_3R_148() {
5306 if (jj_3R_152()) 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 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5313 static final private boolean jj_3R_150() {
5318 if (jj_3R_156()) return true;
5319 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5320 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5321 if (jj_3R_139()) return true;
5322 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5326 static final private boolean jj_3R_154() {
5327 if (jj_3R_148()) return true;
5328 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5332 static final private boolean jj_3R_149() {
5337 if (jj_3R_154()) return true;
5338 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5339 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5343 static final private boolean jj_3R_153() {
5344 if (jj_scan_token(AT)) return true;
5345 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5346 if (jj_3R_149()) return true;
5347 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5351 static final private boolean jj_3R_144() {
5352 if (jj_3R_149()) return true;
5353 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5357 static final private boolean jj_3R_139() {
5362 if (jj_3R_144()) return true;
5363 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5364 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5368 static final private boolean jj_3R_143() {
5369 if (jj_scan_token(BIT_AND)) return true;
5370 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5371 if (jj_3R_148()) return true;
5372 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5376 static final private boolean jj_3R_87() {
5377 if (jj_scan_token(ASSIGN)) return true;
5378 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5379 if (jj_3R_45()) return true;
5380 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5384 static final private boolean jj_3R_147() {
5385 if (jj_scan_token(REMAINDER)) return true;
5386 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5390 static final private boolean jj_3R_146() {
5391 if (jj_scan_token(SLASH)) return true;
5392 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5396 static final private boolean jj_3R_145() {
5397 if (jj_scan_token(STAR)) return true;
5398 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5402 static final private boolean jj_3R_140() {
5409 if (jj_3R_147()) return true;
5410 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5411 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5412 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5413 if (jj_3R_139()) return true;
5414 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5418 static final private boolean jj_3R_134() {
5419 if (jj_3R_139()) return true;
5420 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5424 if (jj_3R_140()) { jj_scanpos = xsp; break; }
5425 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5430 static final private boolean jj_3R_142() {
5431 if (jj_scan_token(MINUS)) return true;
5432 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5436 static final private boolean jj_3R_141() {
5437 if (jj_scan_token(PLUS)) return true;
5438 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5442 static final private boolean jj_3R_57() {
5443 if (jj_3R_50()) return true;
5444 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5447 if (jj_3R_87()) jj_scanpos = xsp;
5448 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5452 static final private boolean jj_3R_198() {
5453 if (jj_scan_token(COMMA)) return true;
5454 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5458 static final private boolean jj_3R_135() {
5463 if (jj_3R_142()) return true;
5464 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5465 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5466 if (jj_3R_134()) return true;
5467 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5471 static final private boolean jj_3_2() {
5472 if (jj_scan_token(COMMA)) return true;
5473 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5474 if (jj_3R_41()) return true;
5475 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5479 static final private boolean jj_3R_128() {
5480 if (jj_3R_134()) return true;
5481 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5485 if (jj_3R_135()) { jj_scanpos = xsp; break; }
5486 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5491 static final private boolean jj_3R_197() {
5492 if (jj_3R_41()) return true;
5493 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5497 if (jj_3_2()) { jj_scanpos = xsp; break; }
5498 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5503 static final private boolean jj_3_7() {
5504 if (jj_3R_46()) return true;
5505 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5509 static final private boolean jj_3R_58() {
5510 if (jj_scan_token(COMMA)) return true;
5511 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5512 if (jj_3R_57()) return true;
5513 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5517 static final private boolean jj_3R_138() {
5518 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
5519 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5523 static final private boolean jj_3R_47() {
5524 if (jj_3R_57()) return true;
5525 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5529 if (jj_3R_58()) { jj_scanpos = xsp; break; }
5530 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5535 static final private boolean jj_3R_192() {
5536 if (jj_scan_token(LPAREN)) return true;
5537 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5540 if (jj_3R_197()) jj_scanpos = xsp;
5541 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5543 if (jj_3R_198()) jj_scanpos = xsp;
5544 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5545 if (jj_scan_token(RPAREN)) return true;
5546 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5550 static final private boolean jj_3R_137() {
5551 if (jj_scan_token(RSIGNEDSHIFT)) return true;
5552 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5556 static final private boolean jj_3R_136() {
5557 if (jj_scan_token(LSHIFT)) return true;
5558 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5562 static final private boolean jj_3R_129() {
5569 if (jj_3R_138()) return true;
5570 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5571 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5572 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5573 if (jj_3R_128()) return true;
5574 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5578 static final private boolean jj_3_6() {
5579 if (jj_3R_45()) return true;
5580 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5581 if (jj_scan_token(SEMICOLON)) return true;
5582 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5586 static final private boolean jj_3R_121() {
5587 if (jj_3R_128()) return true;
5588 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5592 if (jj_3R_129()) { jj_scanpos = xsp; break; }
5593 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5598 static final private boolean jj_3R_201() {
5599 if (jj_scan_token(ARRAYASSIGN)) return true;
5600 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5601 if (jj_3R_45()) return true;
5602 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5606 static final private boolean jj_3R_41() {
5607 if (jj_3R_45()) return true;
5608 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5611 if (jj_3R_201()) jj_scanpos = xsp;
5612 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5616 static final private boolean jj_3R_133() {
5617 if (jj_scan_token(GE)) return true;
5618 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5622 static final private boolean jj_3R_132() {
5623 if (jj_scan_token(LE)) return true;
5624 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5628 static final private boolean jj_3R_131() {
5629 if (jj_scan_token(GT)) return true;
5630 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5634 static final private boolean jj_3R_130() {
5635 if (jj_scan_token(LT)) return true;
5636 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5640 static final private boolean jj_3R_122() {
5649 if (jj_3R_133()) return true;
5650 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5651 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5652 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5653 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5654 if (jj_3R_121()) return true;
5655 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5659 static final private boolean jj_3R_119() {
5660 if (jj_3R_121()) return true;
5661 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5665 if (jj_3R_122()) { jj_scanpos = xsp; break; }
5666 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5671 static final private boolean jj_3R_203() {
5672 if (jj_scan_token(COMMA)) return true;
5673 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5674 if (jj_3R_45()) return true;
5675 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5679 static final private boolean jj_3R_202() {
5680 if (jj_3R_45()) return true;
5681 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5685 if (jj_3R_203()) { jj_scanpos = xsp; break; }
5686 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5691 static final private boolean jj_3R_200() {
5692 if (jj_3R_202()) return true;
5693 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5697 static final private boolean jj_3R_127() {
5698 if (jj_scan_token(TRIPLEEQUAL)) return true;
5699 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5703 static final private boolean jj_3R_126() {
5704 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5705 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5709 static final private boolean jj_3R_125() {
5710 if (jj_scan_token(NOT_EQUAL)) return true;
5711 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5715 static final private boolean jj_3R_108() {
5716 if (jj_scan_token(LBRACE)) return true;
5717 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5718 if (jj_3R_45()) return true;
5719 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5720 if (jj_scan_token(RBRACE)) return true;
5721 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5725 static final private boolean jj_3R_124() {
5726 if (jj_scan_token(DIF)) return true;
5727 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5731 static final private boolean jj_3R_123() {
5732 if (jj_scan_token(EQUAL_EQUAL)) return true;
5733 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5737 static final private boolean jj_3R_91() {
5738 if (jj_scan_token(DOLLAR_ID)) return true;
5739 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5743 static final private boolean jj_3R_120() {
5754 if (jj_3R_127()) return true;
5755 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5756 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5757 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5758 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5759 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5760 if (jj_3R_119()) return true;
5761 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5765 static final private boolean jj_3R_93() {
5766 if (jj_3R_52()) return true;
5767 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5771 static final private boolean jj_3R_117() {
5772 if (jj_3R_119()) return true;
5773 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5777 if (jj_3R_120()) { jj_scanpos = xsp; break; }
5778 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5783 static final private boolean jj_3R_199() {
5784 if (jj_scan_token(LPAREN)) return true;
5785 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5788 if (jj_3R_200()) jj_scanpos = xsp;
5789 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5790 if (jj_scan_token(RPAREN)) return true;
5791 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5795 static final private boolean jj_3R_90() {
5796 if (jj_scan_token(DOLLAR)) return true;
5797 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5798 if (jj_3R_59()) return true;
5799 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5803 static final private boolean jj_3R_177() {
5804 if (jj_scan_token(NULL)) return true;
5805 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5809 static final private boolean jj_3R_118() {
5810 if (jj_scan_token(BIT_AND)) return true;
5811 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5812 if (jj_3R_117()) return true;
5813 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5817 static final private boolean jj_3R_176() {
5818 if (jj_scan_token(FALSE)) return true;
5819 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5823 static final private boolean jj_3R_175() {
5824 if (jj_scan_token(TRUE)) return true;
5825 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5829 static final private boolean jj_3R_115() {
5830 if (jj_3R_117()) return true;
5831 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5835 if (jj_3R_118()) { jj_scanpos = xsp; break; }
5836 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5841 static final private boolean jj_3R_89() {
5842 if (jj_scan_token(IDENTIFIER)) return true;
5843 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5846 if (jj_3R_108()) jj_scanpos = xsp;
5847 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5851 static final private boolean jj_3R_174() {
5852 if (jj_scan_token(STRING_LITERAL)) return true;
5853 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5857 static final private boolean jj_3R_173() {
5858 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
5859 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5863 static final private boolean jj_3R_169() {
5876 if (jj_3R_177()) return true;
5877 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5878 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5879 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5880 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5881 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5882 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5886 static final private boolean jj_3R_172() {
5887 if (jj_scan_token(INTEGER_LITERAL)) return true;
5888 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5892 static final private boolean jj_3R_88() {
5893 if (jj_scan_token(LBRACE)) return true;
5894 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5895 if (jj_3R_45()) return true;
5896 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5897 if (jj_scan_token(RBRACE)) return true;
5898 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5902 static final private boolean jj_3R_59() {
5911 if (jj_3R_91()) return true;
5912 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5913 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5914 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5915 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5919 static final private boolean jj_3R_116() {
5920 if (jj_scan_token(XOR)) return true;
5921 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5922 if (jj_3R_115()) return true;
5923 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5927 static final private boolean jj_3R_92() {
5928 if (jj_3R_45()) return true;
5929 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5933 static final private boolean jj_3R_60() {
5938 if (jj_3R_93()) return true;
5939 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5940 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5944 static final private boolean jj_3_8() {
5945 if (jj_3R_47()) return true;
5946 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5950 static final private boolean jj_3R_113() {
5951 if (jj_3R_115()) return true;
5952 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5956 if (jj_3R_116()) { jj_scanpos = xsp; break; }
5957 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5962 static final private boolean jj_3R_98() {
5963 if (jj_scan_token(LBRACE)) return true;
5964 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5965 if (jj_3R_45()) return true;
5966 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5967 if (jj_scan_token(RBRACE)) return true;
5968 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5972 static final private boolean jj_3R_46() {
5973 if (jj_scan_token(IDENTIFIER)) return true;
5974 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5975 if (jj_scan_token(COLON)) return true;
5976 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5980 static final private boolean jj_3R_95() {
5981 if (jj_scan_token(DOLLAR)) return true;
5982 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5983 if (jj_3R_59()) return true;
5984 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5988 static final private boolean jj_3R_114() {
5989 if (jj_scan_token(BIT_OR)) return true;
5990 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5991 if (jj_3R_113()) return true;
5992 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5996 static final private boolean jj_3R_109() {
5997 if (jj_3R_113()) return true;
5998 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6002 if (jj_3R_114()) { jj_scanpos = xsp; break; }
6003 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6008 static final private boolean jj_3R_49() {
6009 if (jj_scan_token(LBRACKET)) return true;
6010 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6013 if (jj_3R_60()) jj_scanpos = xsp;
6014 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6015 if (jj_scan_token(RBRACKET)) return true;
6016 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6020 static final private boolean jj_3R_110() {
6021 if (jj_scan_token(DOT)) return true;
6022 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6023 if (jj_3R_109()) return true;
6024 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6028 static final private boolean jj_3R_94() {
6029 if (jj_scan_token(DOLLAR_ID)) return true;
6030 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6033 if (jj_3R_98()) jj_scanpos = xsp;
6034 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6038 static final private boolean jj_3R_61() {
6043 if (jj_3R_95()) return true;
6044 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6045 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6049 static final private boolean jj_3R_104() {
6050 if (jj_3R_109()) return true;
6051 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6055 if (jj_3R_110()) { jj_scanpos = xsp; break; }
6056 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6061 static final private boolean jj_3R_48() {
6062 if (jj_scan_token(CLASSACCESS)) return true;
6063 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6064 if (jj_3R_59()) return true;
6065 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6069 static final private boolean jj_3R_40() {
6074 if (jj_3R_49()) return true;
6075 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6076 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6080 static final private boolean jj_3R_112() {
6081 if (jj_scan_token(_ANDL)) return true;
6082 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6086 static final private boolean jj_3R_111() {
6087 if (jj_scan_token(AND_AND)) return true;
6088 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6092 static final private boolean jj_3R_196() {
6093 if (jj_3R_40()) return true;
6094 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6098 static final private boolean jj_3R_195() {
6099 if (jj_3R_199()) return true;
6100 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6104 static final private boolean jj_3R_188() {
6109 if (jj_3R_196()) return true;
6110 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6111 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6115 static final private boolean jj_3R_105() {
6120 if (jj_3R_112()) return true;
6121 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6122 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6123 if (jj_3R_104()) return true;
6124 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6128 static final private boolean jj_3R_97() {
6129 if (jj_scan_token(HOOK)) return true;
6130 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6131 if (jj_3R_45()) return true;
6132 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6133 if (jj_scan_token(COLON)) return true;
6134 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6135 if (jj_3R_86()) return true;
6136 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6140 static final private boolean jj_3R_102() {
6141 if (jj_3R_104()) return true;
6142 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6146 if (jj_3R_105()) { jj_scanpos = xsp; break; }
6147 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6152 static final private boolean jj_3R_187() {
6153 if (jj_3R_50()) return true;
6154 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6158 static final private boolean jj_3R_107() {
6159 if (jj_scan_token(_ORL)) return true;
6160 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6164 static final private boolean jj_3R_106() {
6165 if (jj_scan_token(OR_OR)) return true;
6166 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6170 static final private boolean jj_3R_186() {
6171 if (jj_scan_token(IDENTIFIER)) return true;
6172 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6176 static final private boolean jj_3R_178() {
6181 if (jj_3R_187()) return true;
6182 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6183 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6187 static final private boolean jj_3_1() {
6188 if (jj_3R_40()) return true;
6189 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6193 static final private boolean jj_3R_103() {
6198 if (jj_3R_107()) return true;
6199 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6200 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6201 if (jj_3R_102()) return true;
6202 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6206 static final private boolean jj_3R_50() {
6207 if (jj_3R_61()) return true;
6208 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6212 if (jj_3_1()) { jj_scanpos = xsp; break; }
6213 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6218 static final private boolean jj_3R_96() {
6219 if (jj_3R_102()) return true;
6220 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6224 if (jj_3R_103()) { jj_scanpos = xsp; break; }
6225 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6230 static final private boolean jj_3R_86() {
6231 if (jj_3R_96()) return true;
6232 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6235 if (jj_3R_97()) jj_scanpos = xsp;
6236 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6240 static final private boolean jj_3R_74() {
6241 if (jj_scan_token(TILDEEQUAL)) return true;
6242 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6246 static final private boolean jj_3R_191() {
6247 if (jj_3R_50()) return true;
6248 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6252 static final private boolean jj_3R_73() {
6253 if (jj_scan_token(DOTASSIGN)) return true;
6254 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6258 static final private boolean jj_3R_72() {
6259 if (jj_scan_token(ORASSIGN)) return true;
6260 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6264 static final private boolean jj_3R_71() {
6265 if (jj_scan_token(XORASSIGN)) return true;
6266 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6270 static final private boolean jj_3R_190() {
6271 if (jj_scan_token(NEW)) return true;
6272 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6273 if (jj_3R_178()) return true;
6274 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6278 static final private boolean jj_3R_70() {
6279 if (jj_scan_token(ANDASSIGN)) return true;
6280 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6284 static final private boolean jj_3R_69() {
6285 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6286 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6290 static final private boolean jj_3R_68() {
6291 if (jj_scan_token(LSHIFTASSIGN)) return true;
6292 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6296 static final private boolean jj_3R_189() {
6297 if (jj_scan_token(IDENTIFIER)) return true;
6298 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6302 static final private boolean jj_3R_180() {
6309 if (jj_3R_191()) return true;
6310 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6311 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6312 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6316 static final private boolean jj_3R_67() {
6317 if (jj_scan_token(MINUSASSIGN)) return true;
6318 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6322 static final private boolean jj_3R_66() {
6323 if (jj_scan_token(PLUSASSIGN)) return true;
6324 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6328 static final private boolean jj_3R_65() {
6329 if (jj_scan_token(REMASSIGN)) return true;
6330 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6334 static final private boolean jj_3R_64() {
6335 if (jj_scan_token(SLASHASSIGN)) return true;
6336 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6340 static final private boolean jj_3R_63() {
6341 if (jj_scan_token(STARASSIGN)) return true;
6342 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6346 static final private boolean jj_3R_51() {
6373 if (jj_3R_74()) return true;
6374 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6375 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6376 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6377 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6378 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6379 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6380 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6381 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6382 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6383 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6384 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6385 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6386 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6390 static final private boolean jj_3R_62() {
6391 if (jj_scan_token(ASSIGN)) return true;
6392 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6396 static final private boolean jj_3R_182() {
6397 if (jj_scan_token(ARRAY)) return true;
6398 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6399 if (jj_3R_192()) return true;
6400 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6404 static final private boolean jj_3R_171() {
6405 if (jj_3R_182()) return true;
6406 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6410 static final private boolean jj_3R_181() {
6411 if (jj_3R_188()) return true;
6412 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6416 static final private boolean jj_3R_170() {
6417 if (jj_3R_180()) return true;
6418 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6422 if (jj_3R_181()) { jj_scanpos = xsp; break; }
6423 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6428 static final private boolean jj_3R_101() {
6429 if (jj_scan_token(ASSIGN)) return true;
6430 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6431 if (jj_3R_45()) return true;
6432 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6436 static final private boolean jj_3R_179() {
6437 if (jj_3R_188()) return true;
6438 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6442 static final private boolean jj_3R_42() {
6443 if (jj_3R_50()) return true;
6444 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6445 if (jj_3R_51()) return true;
6446 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6447 if (jj_3R_45()) return true;
6448 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6452 static final private boolean jj_3_3() {
6453 if (jj_3R_42()) return true;
6454 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6458 static final private boolean jj_3_5() {
6459 if (jj_scan_token(IDENTIFIER)) return true;
6460 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6461 if (jj_scan_token(STATICCLASSACCESS)) return true;
6462 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6463 if (jj_3R_178()) return true;
6464 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6468 if (jj_3R_179()) { jj_scanpos = xsp; break; }
6469 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6474 static final private boolean jj_3R_166() {
6481 if (jj_3R_171()) return true;
6482 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6483 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6484 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6488 static final private boolean jj_3R_56() {
6489 if (jj_3R_86()) return true;
6490 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6494 static final private boolean jj_3R_55() {
6495 if (jj_3R_42()) return true;
6496 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6500 static final private boolean jj_3R_54() {
6501 if (jj_3R_85()) return true;
6502 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6506 static final private boolean jj_3R_100() {
6507 if (jj_scan_token(COMMA)) return true;
6508 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6509 if (jj_3R_50()) return true;
6510 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6514 static final private boolean jj_3R_45() {
6523 if (jj_3R_56()) return true;
6524 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6525 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6526 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6527 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6531 static final private boolean jj_3R_53() {
6532 if (jj_3R_84()) return true;
6533 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6537 static final private boolean jj_3R_194() {
6538 if (jj_scan_token(MINUS_MINUS)) return true;
6539 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6543 static final private boolean jj_3R_193() {
6544 if (jj_scan_token(PLUS_PLUS)) return true;
6545 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6549 static final private boolean jj_3R_185() {
6554 if (jj_3R_194()) return true;
6555 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6556 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6560 static final private boolean jj_3R_99() {
6561 if (jj_3R_50()) return true;
6562 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6566 static final private boolean jj_3R_168() {
6567 if (jj_3R_166()) return true;
6568 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6571 if (jj_3R_185()) jj_scanpos = xsp;
6572 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6576 static final private boolean jj_3R_83() {
6577 if (jj_scan_token(OBJECT)) return true;
6578 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6582 static final private boolean jj_3R_82() {
6583 if (jj_scan_token(INTEGER)) return true;
6584 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6588 static private boolean jj_initialized_once = false;
6589 static public PHPParserTokenManager token_source;
6590 static SimpleCharStream jj_input_stream;
6591 static public Token token, jj_nt;
6592 static private int jj_ntk;
6593 static private Token jj_scanpos, jj_lastpos;
6594 static private int jj_la;
6595 static public boolean lookingAhead = false;
6596 static private boolean jj_semLA;
6597 static private int jj_gen;
6598 static final private int[] jj_la1 = new int[123];
6599 static private int[] jj_la1_0;
6600 static private int[] jj_la1_1;
6601 static private int[] jj_la1_2;
6602 static private int[] jj_la1_3;
6603 static private int[] jj_la1_4;
6611 private static void jj_la1_0() {
6612 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,0x0,0x0,0x8000000,0x0,0x8000000,0x0,0x0,0x68000000,0x68000000,0x0,0x0,0x68000000,0x0,0x0,0x89000000,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,};
6614 private static void jj_la1_1() {
6615 jj_la1_1 = new int[] {0x43aea83f,0x0,0x0,0x43aea83f,0x0,0x43aea83f,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1840000,0x100,0x1860000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1860000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1860000,0x1860000,0x0,0x1860000,0x0,0x0,0x1860000,0x0,0x0,0x0,0x40,0x40,0x20000,0x20000,0x20000,0x0,0x40,0x1860000,0x1860000,0x40,0x1840000,0x1860000,0x0,0x0,0x422aa83f,0x43aea83f,0x0,0x0,0xf,0x0,0x0,0x0,0x0,0x0,0x0,0x43aea83f,0x43aea83f,0x43aea83f,0x43aea83f,0x0,0x0,0x0,0x0,0x20000,0x0,0x1200,0x1200,0x43aea83f,0x43aea83f,0x0,0x1200,0x1860000,0x43aea83f,0x43aea83f,0x0,0x0,0x43aea83f,0x0,0x0,0x43aea83f,0x43aea83f,0x43aea83f,0x43aea83f,0x43aea83f,0x43aea83f,0x43aea83f,0x20000,0x1860000,0x20000,0x43aea83f,0x43aea83f,0x20000,0x0,0x1860000,0x1860000,};
6617 private static void jj_la1_2() {
6618 jj_la1_2 = new int[] {0x9e0e00,0x0,0x0,0x9e0e00,0x0,0x9e0e00,0x0,0x0,0x0,0x0,0x0,0x0,0x400,0x0,0x400,0x0,0x0,0x180000,0x0,0x9e0e00,0x0,0x800000,0x0,0x800400,0x800000,0x1ff,0x0,0x9e0e00,0x0,0x2000,0x40008000,0x40008000,0x80010000,0x80010000,0x0,0x1000000,0x2000000,0x800000,0x0,0x0,0x0,0x0,0x38000000,0x38000000,0x180000,0x180000,0x4600000,0x4600000,0x9e0e00,0x1e0e00,0x180000,0x1e0c00,0x60000,0x800,0x400,0x1ff,0x60000,0x60000,0x0,0x0,0x400,0x400,0x400,0x400,0x0,0x9e0fff,0x9e0fff,0x0,0x0,0x9e0e00,0x0,0x200,0x60600,0x9e0e00,0x0,0x0,0x0,0x400,0x0,0x0,0x0,0x0,0x0,0x9e0e00,0x9e0e00,0x9e0e00,0x9e0e00,0x0,0x0,0x60000,0x60000,0x60400,0x4000,0x0,0x0,0x9e0e00,0x9e0e00,0x0,0x0,0x9e0e00,0x9e0e00,0x9e0e00,0x0,0x0,0x9e0e00,0x0,0x0,0x9e4e00,0x9e0e00,0x9e0e00,0x9e0e00,0x9e0e00,0x9e0e00,0x9e4e00,0x60400,0x9e0e00,0x60400,0x9e0e00,0x9e4e00,0x60400,0x0,0x9e0e00,0x9e0e00,};
6620 private static void jj_la1_3() {
6621 jj_la1_3 = new int[] {0x114451,0x0,0x0,0x114451,0x100000,0x114451,0x0,0x0,0x0,0x200000,0x0,0x10000,0x0,0x10000,0x10400,0x11,0x11,0x451,0x0,0x4451,0x200000,0x0,0x200000,0x0,0x0,0x0,0x0,0x4451,0x0,0x0,0x0,0x0,0x0,0x0,0x400000,0x0,0x0,0x0,0xf2000000,0xf2000000,0xd800000,0xd800000,0x0,0x0,0x0,0x0,0x0,0x0,0x4451,0x4451,0x0,0x4451,0x0,0x0,0x4451,0x0,0x0,0x0,0x44000,0x44000,0x400,0x400,0x400,0x400,0x44000,0x4451,0x4451,0x40000,0x51,0x4451,0x200000,0x0,0x110400,0x114451,0x0,0x0,0x0,0x0,0x200000,0x0,0x200000,0x200000,0x200000,0x114451,0x114451,0x114451,0x114451,0x200000,0x0,0x0,0x0,0x400,0x10000,0x0,0x0,0x114451,0x114451,0x0,0x0,0x4451,0x114451,0x114451,0x0,0x0,0x114451,0x0,0x0,0x114451,0x114451,0x114451,0x114451,0x114451,0x114451,0x114451,0x400,0x4451,0x400,0x114451,0x114451,0x400,0x200000,0x4451,0x4451,};
6623 private static void jj_la1_4() {
6624 jj_la1_4 = new int[] {0x2000,0x0,0x0,0x2000,0x0,0x2000,0x0,0x0,0x0,0x0,0x1,0x0,0x2000,0x0,0x2000,0x0,0x0,0x0,0x0,0x2000,0x0,0x0,0x0,0x2000,0x0,0x0,0x0,0x2000,0x1fff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2000,0x2000,0x0,0x2000,0x0,0x0,0x2000,0x0,0x0,0x0,0x0,0x0,0x2000,0x2000,0x2000,0x2000,0x0,0x2000,0x2000,0x0,0x0,0x2000,0x0,0x0,0x2000,0x2000,0x0,0x0,0x0,0x2000,0x0,0x1,0x0,0x0,0x0,0x2000,0x2000,0x2000,0x2000,0x0,0x1,0x1fff,0x1fff,0x2000,0x0,0x0,0x0,0x2000,0x2000,0x0,0x0,0x2000,0x2000,0x2000,0x0,0x0,0x2000,0x0,0x0,0x2000,0x2000,0x2000,0x2000,0x2000,0x2000,0x2000,0x2000,0x2000,0x2000,0x2000,0x2000,0x2000,0x0,0x2000,0x2000,};
6626 static final private JJCalls[] jj_2_rtns = new JJCalls[8];
6627 static private boolean jj_rescan = false;
6628 static private int jj_gc = 0;
6630 public PHPParser(java.io.InputStream stream) {
6631 if (jj_initialized_once) {
6632 System.out.println("ERROR: Second call to constructor of static parser. You must");
6633 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6634 System.out.println(" during parser generation.");
6637 jj_initialized_once = true;
6638 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6639 token_source = new PHPParserTokenManager(jj_input_stream);
6640 token = new Token();
6643 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6644 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6647 static public void ReInit(java.io.InputStream stream) {
6648 jj_input_stream.ReInit(stream, 1, 1);
6649 token_source.ReInit(jj_input_stream);
6650 token = new Token();
6653 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6654 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6657 public PHPParser(java.io.Reader stream) {
6658 if (jj_initialized_once) {
6659 System.out.println("ERROR: Second call to constructor of static parser. You must");
6660 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6661 System.out.println(" during parser generation.");
6664 jj_initialized_once = true;
6665 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6666 token_source = new PHPParserTokenManager(jj_input_stream);
6667 token = new Token();
6670 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6671 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6674 static public void ReInit(java.io.Reader stream) {
6675 jj_input_stream.ReInit(stream, 1, 1);
6676 token_source.ReInit(jj_input_stream);
6677 token = new Token();
6680 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6681 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6684 public PHPParser(PHPParserTokenManager tm) {
6685 if (jj_initialized_once) {
6686 System.out.println("ERROR: Second call to constructor of static parser. You must");
6687 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6688 System.out.println(" during parser generation.");
6691 jj_initialized_once = true;
6693 token = new Token();
6696 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6697 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6700 public void ReInit(PHPParserTokenManager tm) {
6702 token = new Token();
6705 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6706 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6709 static final private Token jj_consume_token(int kind) throws ParseException {
6711 if ((oldToken = token).next != null) token = token.next;
6712 else token = token.next = token_source.getNextToken();
6714 if (token.kind == kind) {
6716 if (++jj_gc > 100) {
6718 for (int i = 0; i < jj_2_rtns.length; i++) {
6719 JJCalls c = jj_2_rtns[i];
6721 if (c.gen < jj_gen) c.first = null;
6730 throw generateParseException();
6733 static final private boolean jj_scan_token(int kind) {
6734 if (jj_scanpos == jj_lastpos) {
6736 if (jj_scanpos.next == null) {
6737 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
6739 jj_lastpos = jj_scanpos = jj_scanpos.next;
6742 jj_scanpos = jj_scanpos.next;
6745 int i = 0; Token tok = token;
6746 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
6747 if (tok != null) jj_add_error_token(kind, i);
6749 return (jj_scanpos.kind != kind);
6752 static final public Token getNextToken() {
6753 if (token.next != null) token = token.next;
6754 else token = token.next = token_source.getNextToken();
6760 static final public Token getToken(int index) {
6761 Token t = lookingAhead ? jj_scanpos : token;
6762 for (int i = 0; i < index; i++) {
6763 if (t.next != null) t = t.next;
6764 else t = t.next = token_source.getNextToken();
6769 static final private int jj_ntk() {
6770 if ((jj_nt=token.next) == null)
6771 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
6773 return (jj_ntk = jj_nt.kind);
6776 static private java.util.Vector jj_expentries = new java.util.Vector();
6777 static private int[] jj_expentry;
6778 static private int jj_kind = -1;
6779 static private int[] jj_lasttokens = new int[100];
6780 static private int jj_endpos;
6782 static private void jj_add_error_token(int kind, int pos) {
6783 if (pos >= 100) return;
6784 if (pos == jj_endpos + 1) {
6785 jj_lasttokens[jj_endpos++] = kind;
6786 } else if (jj_endpos != 0) {
6787 jj_expentry = new int[jj_endpos];
6788 for (int i = 0; i < jj_endpos; i++) {
6789 jj_expentry[i] = jj_lasttokens[i];
6791 boolean exists = false;
6792 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
6793 int[] oldentry = (int[])(enum.nextElement());
6794 if (oldentry.length == jj_expentry.length) {
6796 for (int i = 0; i < jj_expentry.length; i++) {
6797 if (oldentry[i] != jj_expentry[i]) {
6805 if (!exists) jj_expentries.addElement(jj_expentry);
6806 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
6810 static public ParseException generateParseException() {
6811 jj_expentries.removeAllElements();
6812 boolean[] la1tokens = new boolean[142];
6813 for (int i = 0; i < 142; i++) {
6814 la1tokens[i] = false;
6817 la1tokens[jj_kind] = true;
6820 for (int i = 0; i < 123; i++) {
6821 if (jj_la1[i] == jj_gen) {
6822 for (int j = 0; j < 32; j++) {
6823 if ((jj_la1_0[i] & (1<<j)) != 0) {
6824 la1tokens[j] = true;
6826 if ((jj_la1_1[i] & (1<<j)) != 0) {
6827 la1tokens[32+j] = true;
6829 if ((jj_la1_2[i] & (1<<j)) != 0) {
6830 la1tokens[64+j] = true;
6832 if ((jj_la1_3[i] & (1<<j)) != 0) {
6833 la1tokens[96+j] = true;
6835 if ((jj_la1_4[i] & (1<<j)) != 0) {
6836 la1tokens[128+j] = true;
6841 for (int i = 0; i < 142; i++) {
6843 jj_expentry = new int[1];
6845 jj_expentries.addElement(jj_expentry);
6850 jj_add_error_token(0, 0);
6851 int[][] exptokseq = new int[jj_expentries.size()][];
6852 for (int i = 0; i < jj_expentries.size(); i++) {
6853 exptokseq[i] = (int[])jj_expentries.elementAt(i);
6855 return new ParseException(token, exptokseq, tokenImage);
6858 static final public void enable_tracing() {
6861 static final public void disable_tracing() {
6864 static final private void jj_rescan_token() {
6866 for (int i = 0; i < 8; i++) {
6867 JJCalls p = jj_2_rtns[i];
6869 if (p.gen > jj_gen) {
6870 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
6872 case 0: jj_3_1(); break;
6873 case 1: jj_3_2(); break;
6874 case 2: jj_3_3(); break;
6875 case 3: jj_3_4(); break;
6876 case 4: jj_3_5(); break;
6877 case 5: jj_3_6(); break;
6878 case 6: jj_3_7(); break;
6879 case 7: jj_3_8(); break;
6883 } while (p != null);
6888 static final private void jj_save(int index, int xla) {
6889 JJCalls p = jj_2_rtns[index];
6890 while (p.gen > jj_gen) {
6891 if (p.next == null) { p = p.next = new JJCalls(); break; }
6894 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
6897 static final class JJCalls {