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(INCR);
1910 operator = OperatorIds.PLUS_PLUS;
1913 jj_consume_token(DECR);
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(INCR);
2026 operator = OperatorIds.PLUS_PLUS;
2029 jj_consume_token(DECR);
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 ConstantIdentifier(var.toCharArray(),
2146 SimpleCharStream.getPosition());}
2149 jj_la1[61] = jj_gen;
2150 jj_consume_token(-1);
2151 throw new ParseException();
2153 throw new Error("Missing return statement in function");
2156 static final public PrefixedUnaryExpression classInstantiation() throws ParseException {
2158 final StringBuffer buff;
2159 final int pos = SimpleCharStream.getPosition();
2160 jj_consume_token(NEW);
2161 expr = ClassIdentifier();
2162 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2168 buff = new StringBuffer(expr.toStringExpression());
2169 expr = PrimaryExpression();
2170 buff.append(expr.toStringExpression());
2171 expr = new ConstantIdentifier(buff.toString().toCharArray(),
2173 SimpleCharStream.getPosition());
2176 jj_la1[62] = jj_gen;
2179 {if (true) return new PrefixedUnaryExpression(expr,
2182 throw new Error("Missing return statement in function");
2185 static final public ConstantIdentifier ClassIdentifier() throws ParseException {
2188 final int pos = SimpleCharStream.getPosition();
2189 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2191 token = jj_consume_token(IDENTIFIER);
2192 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2194 SimpleCharStream.getPosition());}
2198 expr = VariableDeclaratorId();
2199 {if (true) return new ConstantIdentifier(expr.toCharArray(),
2201 SimpleCharStream.getPosition());}
2204 jj_la1[63] = jj_gen;
2205 jj_consume_token(-1);
2206 throw new ParseException();
2208 throw new Error("Missing return statement in function");
2211 static final public AbstractSuffixExpression PrimarySuffix(Expression prefix) throws ParseException {
2212 final AbstractSuffixExpression expr;
2213 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2215 expr = Arguments(prefix);
2216 {if (true) return expr;}
2220 expr = VariableSuffix(prefix);
2221 {if (true) return expr;}
2224 jj_la1[64] = jj_gen;
2225 jj_consume_token(-1);
2226 throw new ParseException();
2228 throw new Error("Missing return statement in function");
2231 static final public AbstractSuffixExpression VariableSuffix(Expression prefix) throws ParseException {
2233 final int pos = SimpleCharStream.getPosition();
2234 Expression expression = null;
2235 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2237 jj_consume_token(CLASSACCESS);
2239 expr = VariableName();
2240 } catch (ParseException e) {
2241 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2243 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2244 errorEnd = SimpleCharStream.getPosition() + 1;
2245 {if (true) throw e;}
2247 {if (true) return new ClassAccess(prefix,
2248 new ConstantIdentifier(expr.toCharArray(),pos,SimpleCharStream.getPosition()),
2249 ClassAccess.NORMAL);}
2252 jj_consume_token(LBRACKET);
2253 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2278 case INTEGER_LITERAL:
2279 case FLOATING_POINT_LITERAL:
2280 case STRING_LITERAL:
2284 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2300 case INTEGER_LITERAL:
2301 case FLOATING_POINT_LITERAL:
2302 case STRING_LITERAL:
2306 expression = Expression();
2317 expression = Type();
2320 jj_la1[65] = jj_gen;
2321 jj_consume_token(-1);
2322 throw new ParseException();
2326 jj_la1[66] = jj_gen;
2330 jj_consume_token(RBRACKET);
2331 } catch (ParseException e) {
2332 errorMessage = "']' expected";
2334 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2335 errorEnd = SimpleCharStream.getPosition() + 1;
2336 {if (true) throw e;}
2338 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2341 jj_la1[67] = jj_gen;
2342 jj_consume_token(-1);
2343 throw new ParseException();
2345 throw new Error("Missing return statement in function");
2348 static final public Literal Literal() throws ParseException {
2351 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2352 case INTEGER_LITERAL:
2353 token = jj_consume_token(INTEGER_LITERAL);
2354 pos = SimpleCharStream.getPosition();
2355 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2357 case FLOATING_POINT_LITERAL:
2358 token = jj_consume_token(FLOATING_POINT_LITERAL);
2359 pos = SimpleCharStream.getPosition();
2360 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2362 case STRING_LITERAL:
2363 token = jj_consume_token(STRING_LITERAL);
2364 pos = SimpleCharStream.getPosition();
2365 {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length());}
2368 jj_consume_token(TRUE);
2369 pos = SimpleCharStream.getPosition();
2370 {if (true) return new TrueLiteral(pos-4,pos);}
2373 jj_consume_token(FALSE);
2374 pos = SimpleCharStream.getPosition();
2375 {if (true) return new FalseLiteral(pos-4,pos);}
2378 jj_consume_token(NULL);
2379 pos = SimpleCharStream.getPosition();
2380 {if (true) return new NullLiteral(pos-4,pos);}
2383 jj_la1[68] = jj_gen;
2384 jj_consume_token(-1);
2385 throw new ParseException();
2387 throw new Error("Missing return statement in function");
2390 static final public FunctionCall Arguments(Expression func) throws ParseException {
2391 Expression[] args = null;
2392 jj_consume_token(LPAREN);
2393 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2409 case INTEGER_LITERAL:
2410 case FLOATING_POINT_LITERAL:
2411 case STRING_LITERAL:
2415 args = ArgumentList();
2418 jj_la1[69] = jj_gen;
2422 jj_consume_token(RPAREN);
2423 } catch (ParseException e) {
2424 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2426 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2427 errorEnd = SimpleCharStream.getPosition() + 1;
2428 {if (true) throw e;}
2430 {if (true) return new FunctionCall(func,args,SimpleCharStream.getPosition());}
2431 throw new Error("Missing return statement in function");
2435 * An argument list is a list of arguments separated by comma :
2436 * argumentDeclaration() (, argumentDeclaration)*
2437 * @return an array of arguments
2439 static final public Expression[] ArgumentList() throws ParseException {
2441 final ArrayList list = new ArrayList();
2446 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2451 jj_la1[70] = jj_gen;
2454 jj_consume_token(COMMA);
2458 } catch (ParseException e) {
2459 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2461 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2462 errorEnd = SimpleCharStream.getPosition() + 1;
2463 {if (true) throw e;}
2466 Expression[] arguments = new Expression[list.size()];
2467 list.toArray(arguments);
2468 {if (true) return arguments;}
2469 throw new Error("Missing return statement in function");
2473 * A Statement without break.
2475 static final public Statement StatementNoBreak() throws ParseException {
2476 final Statement statement;
2479 statement = Expression();
2481 jj_consume_token(SEMICOLON);
2482 } catch (ParseException e) {
2483 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2484 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2486 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2487 errorEnd = SimpleCharStream.getPosition() + 1;
2488 {if (true) throw e;}
2491 {if (true) return statement;}
2492 } else if (jj_2_7(2)) {
2493 statement = LabeledStatement();
2494 {if (true) return statement;}
2496 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2498 statement = Block();
2499 {if (true) return statement;}
2502 statement = EmptyStatement();
2503 {if (true) return statement;}
2512 statement = StatementExpression();
2514 jj_consume_token(SEMICOLON);
2515 } catch (ParseException e) {
2516 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2518 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2519 errorEnd = SimpleCharStream.getPosition() + 1;
2520 {if (true) throw e;}
2522 {if (true) return statement;}
2525 statement = SwitchStatement();
2526 {if (true) return statement;}
2529 statement = IfStatement();
2530 {if (true) return statement;}
2533 statement = WhileStatement();
2534 {if (true) return statement;}
2537 statement = DoStatement();
2538 {if (true) return statement;}
2541 statement = ForStatement();
2542 {if (true) return statement;}
2545 statement = ForeachStatement();
2546 {if (true) return statement;}
2549 statement = ContinueStatement();
2550 {if (true) return statement;}
2553 statement = ReturnStatement();
2554 {if (true) return statement;}
2557 statement = EchoStatement();
2558 {if (true) return statement;}
2565 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2567 token = jj_consume_token(AT);
2570 jj_la1[71] = jj_gen;
2573 statement = IncludeStatement();
2574 if (token != null) {
2575 ((InclusionStatement)statement).silent = true;
2577 {if (true) return statement;}
2580 statement = StaticStatement();
2581 {if (true) return statement;}
2584 statement = GlobalStatement();
2585 {if (true) return statement;}
2588 jj_la1[72] = jj_gen;
2589 jj_consume_token(-1);
2590 throw new ParseException();
2593 throw new Error("Missing return statement in function");
2597 * A Normal statement.
2599 static final public Statement Statement() throws ParseException {
2600 final Statement statement;
2601 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2632 case INTEGER_LITERAL:
2633 case FLOATING_POINT_LITERAL:
2634 case STRING_LITERAL:
2640 statement = StatementNoBreak();
2641 {if (true) return statement;}
2644 statement = BreakStatement();
2645 {if (true) return statement;}
2648 jj_la1[73] = jj_gen;
2649 jj_consume_token(-1);
2650 throw new ParseException();
2652 throw new Error("Missing return statement in function");
2656 * An html block inside a php syntax.
2658 static final public HTMLBlock htmlBlock() throws ParseException {
2659 final int startIndex = nodePtr;
2660 AstNode[] blockNodes;
2662 jj_consume_token(PHPEND);
2665 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2670 jj_la1[74] = jj_gen;
2676 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2678 jj_consume_token(PHPSTARTLONG);
2681 jj_consume_token(PHPSTARTSHORT);
2684 jj_la1[75] = jj_gen;
2685 jj_consume_token(-1);
2686 throw new ParseException();
2688 } catch (ParseException e) {
2689 errorMessage = "unexpected end of file , '<?php' expected";
2691 errorStart = SimpleCharStream.getPosition();
2692 errorEnd = SimpleCharStream.getPosition();
2693 {if (true) throw e;}
2695 nbNodes = nodePtr - startIndex;
2696 blockNodes = new AstNode[nbNodes];
2697 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2698 nodePtr = startIndex;
2699 {if (true) return new HTMLBlock(blockNodes);}
2700 throw new Error("Missing return statement in function");
2704 * An include statement. It's "include" an expression;
2706 static final public InclusionStatement IncludeStatement() throws ParseException {
2707 final Expression expr;
2709 final int pos = SimpleCharStream.getPosition();
2710 final InclusionStatement inclusionStatement;
2711 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2713 jj_consume_token(REQUIRE);
2714 keyword = InclusionStatement.REQUIRE;
2717 jj_consume_token(REQUIRE_ONCE);
2718 keyword = InclusionStatement.REQUIRE_ONCE;
2721 jj_consume_token(INCLUDE);
2722 keyword = InclusionStatement.INCLUDE;
2725 jj_consume_token(INCLUDE_ONCE);
2726 keyword = InclusionStatement.INCLUDE_ONCE;
2729 jj_la1[76] = jj_gen;
2730 jj_consume_token(-1);
2731 throw new ParseException();
2734 expr = Expression();
2735 } catch (ParseException e) {
2736 if (errorMessage != null) {
2737 {if (true) throw e;}
2739 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
2741 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2742 errorEnd = SimpleCharStream.getPosition() + 1;
2743 {if (true) throw e;}
2745 inclusionStatement = new InclusionStatement(currentSegment,
2749 currentSegment.add(inclusionStatement);
2751 jj_consume_token(SEMICOLON);
2752 } catch (ParseException e) {
2753 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2755 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2756 errorEnd = SimpleCharStream.getPosition() + 1;
2757 {if (true) throw e;}
2759 {if (true) return inclusionStatement;}
2760 throw new Error("Missing return statement in function");
2763 static final public PrintExpression PrintExpression() throws ParseException {
2764 final Expression expr;
2765 final int pos = SimpleCharStream.getPosition();
2766 jj_consume_token(PRINT);
2767 expr = Expression();
2768 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
2769 throw new Error("Missing return statement in function");
2772 static final public ListExpression ListExpression() throws ParseException {
2774 Expression expression = null;
2775 ArrayList list = new ArrayList();
2776 final int pos = SimpleCharStream.getPosition();
2777 jj_consume_token(LIST);
2779 jj_consume_token(LPAREN);
2780 } catch (ParseException e) {
2781 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2783 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2784 errorEnd = SimpleCharStream.getPosition() + 1;
2785 {if (true) throw e;}
2787 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2790 expr = VariableDeclaratorId();
2794 jj_la1[77] = jj_gen;
2797 if (expr == null) list.add(null);
2800 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2805 jj_la1[78] = jj_gen;
2809 jj_consume_token(COMMA);
2810 } catch (ParseException e) {
2811 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2813 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2814 errorEnd = SimpleCharStream.getPosition() + 1;
2815 {if (true) throw e;}
2817 expr = VariableDeclaratorId();
2821 jj_consume_token(RPAREN);
2822 } catch (ParseException e) {
2823 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2825 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2826 errorEnd = SimpleCharStream.getPosition() + 1;
2827 {if (true) throw e;}
2829 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2831 jj_consume_token(ASSIGN);
2832 expression = Expression();
2833 String[] strings = new String[list.size()];
2834 list.toArray(strings);
2835 {if (true) return new ListExpression(strings,
2838 SimpleCharStream.getPosition());}
2841 jj_la1[79] = jj_gen;
2844 String[] strings = new String[list.size()];
2845 list.toArray(strings);
2846 {if (true) return new ListExpression(strings,pos,SimpleCharStream.getPosition());}
2847 throw new Error("Missing return statement in function");
2851 * An echo statement.
2852 * echo anyexpression (, otherexpression)*
2854 static final public EchoStatement EchoStatement() throws ParseException {
2855 final ArrayList expressions = new ArrayList();
2857 final int pos = SimpleCharStream.getPosition();
2858 jj_consume_token(ECHO);
2859 expr = Expression();
2860 expressions.add(expr);
2863 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2868 jj_la1[80] = jj_gen;
2871 jj_consume_token(COMMA);
2872 expr = Expression();
2873 expressions.add(expr);
2876 jj_consume_token(SEMICOLON);
2877 } catch (ParseException e) {
2878 if (e.currentToken.next.kind != 4) {
2879 errorMessage = "';' expected after 'echo' statement";
2881 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2882 errorEnd = SimpleCharStream.getPosition() + 1;
2883 {if (true) throw e;}
2886 Expression[] exprs = new Expression[expressions.size()];
2887 expressions.toArray(exprs);
2888 {if (true) return new EchoStatement(exprs,pos);}
2889 throw new Error("Missing return statement in function");
2892 static final public GlobalStatement GlobalStatement() throws ParseException {
2893 final int pos = SimpleCharStream.getPosition();
2895 ArrayList vars = new ArrayList();
2896 GlobalStatement global;
2897 jj_consume_token(GLOBAL);
2898 expr = VariableDeclaratorId();
2902 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2907 jj_la1[81] = jj_gen;
2910 jj_consume_token(COMMA);
2911 expr = VariableDeclaratorId();
2915 jj_consume_token(SEMICOLON);
2916 String[] strings = new String[vars.size()];
2917 vars.toArray(strings);
2918 global = new GlobalStatement(currentSegment,
2921 SimpleCharStream.getPosition());
2922 currentSegment.add(global);
2923 {if (true) return global;}
2924 } catch (ParseException e) {
2925 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
2927 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2928 errorEnd = SimpleCharStream.getPosition() + 1;
2929 {if (true) throw e;}
2931 throw new Error("Missing return statement in function");
2934 static final public StaticStatement StaticStatement() throws ParseException {
2935 final int pos = SimpleCharStream.getPosition();
2936 final ArrayList vars = new ArrayList();
2937 VariableDeclaration expr;
2938 jj_consume_token(STATIC);
2939 expr = VariableDeclarator();
2940 vars.add(new String(expr.name));
2943 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2948 jj_la1[82] = jj_gen;
2951 jj_consume_token(COMMA);
2952 expr = VariableDeclarator();
2953 vars.add(new String(expr.name));
2956 jj_consume_token(SEMICOLON);
2957 String[] strings = new String[vars.size()];
2958 vars.toArray(strings);
2959 {if (true) return new StaticStatement(strings,
2961 SimpleCharStream.getPosition());}
2962 } catch (ParseException e) {
2963 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
2965 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2966 errorEnd = SimpleCharStream.getPosition() + 1;
2967 {if (true) throw e;}
2969 throw new Error("Missing return statement in function");
2972 static final public LabeledStatement LabeledStatement() throws ParseException {
2973 final int pos = SimpleCharStream.getPosition();
2975 final Statement statement;
2976 label = jj_consume_token(IDENTIFIER);
2977 jj_consume_token(COLON);
2978 statement = Statement();
2979 {if (true) return new LabeledStatement(label.image.toCharArray(),statement,pos,SimpleCharStream.getPosition());}
2980 throw new Error("Missing return statement in function");
2990 static final public Block Block() throws ParseException {
2991 final int pos = SimpleCharStream.getPosition();
2992 final ArrayList list = new ArrayList();
2993 Statement statement;
2995 jj_consume_token(LBRACE);
2996 } catch (ParseException e) {
2997 errorMessage = "'{' expected";
2999 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3000 errorEnd = SimpleCharStream.getPosition() + 1;
3001 {if (true) throw e;}
3005 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3040 case INTEGER_LITERAL:
3041 case FLOATING_POINT_LITERAL:
3042 case STRING_LITERAL:
3051 jj_la1[83] = jj_gen;
3054 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3088 case INTEGER_LITERAL:
3089 case FLOATING_POINT_LITERAL:
3090 case STRING_LITERAL:
3096 statement = BlockStatement();
3097 list.add(statement);
3100 statement = htmlBlock();
3101 list.add(statement);
3104 jj_la1[84] = jj_gen;
3105 jj_consume_token(-1);
3106 throw new ParseException();
3110 jj_consume_token(RBRACE);
3111 } catch (ParseException e) {
3112 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3114 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3115 errorEnd = SimpleCharStream.getPosition() + 1;
3116 {if (true) throw e;}
3118 Statement[] statements = new Statement[list.size()];
3119 list.toArray(statements);
3120 {if (true) return new Block(statements,pos,SimpleCharStream.getPosition());}
3121 throw new Error("Missing return statement in function");
3124 static final public Statement BlockStatement() throws ParseException {
3125 final Statement statement;
3126 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3158 case INTEGER_LITERAL:
3159 case FLOATING_POINT_LITERAL:
3160 case STRING_LITERAL:
3167 statement = Statement();
3168 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3169 {if (true) return statement;}
3170 } catch (ParseException e) {
3171 if (errorMessage != null) {if (true) throw e;}
3172 errorMessage = "statement expected";
3174 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3175 errorEnd = SimpleCharStream.getPosition() + 1;
3176 {if (true) throw e;}
3180 statement = ClassDeclaration();
3181 {if (true) return statement;}
3184 statement = MethodDeclaration();
3185 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3186 currentSegment.add((MethodDeclaration) statement);
3187 {if (true) return statement;}
3190 jj_la1[85] = jj_gen;
3191 jj_consume_token(-1);
3192 throw new ParseException();
3194 throw new Error("Missing return statement in function");
3198 * A Block statement that will not contain any 'break'
3200 static final public Statement BlockStatementNoBreak() throws ParseException {
3201 final Statement statement;
3202 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3233 case INTEGER_LITERAL:
3234 case FLOATING_POINT_LITERAL:
3235 case STRING_LITERAL:
3241 statement = StatementNoBreak();
3242 {if (true) return statement;}
3245 statement = ClassDeclaration();
3246 {if (true) return statement;}
3249 statement = MethodDeclaration();
3250 currentSegment.add((MethodDeclaration) statement);
3251 {if (true) return statement;}
3254 jj_la1[86] = jj_gen;
3255 jj_consume_token(-1);
3256 throw new ParseException();
3258 throw new Error("Missing return statement in function");
3261 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3262 final ArrayList list = new ArrayList();
3263 VariableDeclaration var;
3264 var = LocalVariableDeclarator();
3268 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3273 jj_la1[87] = jj_gen;
3276 jj_consume_token(COMMA);
3277 var = LocalVariableDeclarator();
3280 VariableDeclaration[] vars = new VariableDeclaration[list.size()];
3282 {if (true) return vars;}
3283 throw new Error("Missing return statement in function");
3286 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3287 final String varName;
3288 Expression initializer = null;
3289 final int pos = SimpleCharStream.getPosition();
3290 varName = VariableDeclaratorId();
3291 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3293 jj_consume_token(ASSIGN);
3294 initializer = Expression();
3297 jj_la1[88] = jj_gen;
3300 if (initializer == null) {
3301 {if (true) return new VariableDeclaration(currentSegment,
3302 varName.toCharArray(),
3304 SimpleCharStream.getPosition());}
3306 {if (true) return new VariableDeclaration(currentSegment,
3307 varName.toCharArray(),
3310 throw new Error("Missing return statement in function");
3313 static final public EmptyStatement EmptyStatement() throws ParseException {
3315 jj_consume_token(SEMICOLON);
3316 pos = SimpleCharStream.getPosition();
3317 {if (true) return new EmptyStatement(pos-1,pos);}
3318 throw new Error("Missing return statement in function");
3321 static final public Statement StatementExpression() throws ParseException {
3322 Expression expr,expr2;
3324 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3327 expr = PreIncDecExpression();
3328 {if (true) return expr;}
3335 expr = PrimaryExpression();
3336 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3351 case RSIGNEDSHIFTASSIGN:
3352 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3354 jj_consume_token(INCR);
3355 {if (true) return new PostfixedUnaryExpression(expr,
3356 OperatorIds.PLUS_PLUS,
3357 SimpleCharStream.getPosition());}
3360 jj_consume_token(DECR);
3361 {if (true) return new PostfixedUnaryExpression(expr,
3362 OperatorIds.MINUS_MINUS,
3363 SimpleCharStream.getPosition());}
3377 case RSIGNEDSHIFTASSIGN:
3378 operator = AssignmentOperator();
3379 expr2 = Expression();
3380 {if (true) return new BinaryExpression(expr,expr2,operator);}
3383 jj_la1[89] = jj_gen;
3384 jj_consume_token(-1);
3385 throw new ParseException();
3389 jj_la1[90] = jj_gen;
3392 {if (true) return expr;}
3395 jj_la1[91] = jj_gen;
3396 jj_consume_token(-1);
3397 throw new ParseException();
3399 throw new Error("Missing return statement in function");
3402 static final public SwitchStatement SwitchStatement() throws ParseException {
3403 final Expression variable;
3404 final AbstractCase[] cases;
3405 final int pos = SimpleCharStream.getPosition();
3406 jj_consume_token(SWITCH);
3408 jj_consume_token(LPAREN);
3409 } catch (ParseException e) {
3410 errorMessage = "'(' expected after 'switch'";
3412 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3413 errorEnd = SimpleCharStream.getPosition() + 1;
3414 {if (true) throw e;}
3417 variable = Expression();
3418 } catch (ParseException e) {
3419 if (errorMessage != null) {
3420 {if (true) throw e;}
3422 errorMessage = "expression expected";
3424 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3425 errorEnd = SimpleCharStream.getPosition() + 1;
3426 {if (true) throw e;}
3429 jj_consume_token(RPAREN);
3430 } catch (ParseException e) {
3431 errorMessage = "')' expected";
3433 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3434 errorEnd = SimpleCharStream.getPosition() + 1;
3435 {if (true) throw e;}
3437 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3439 cases = switchStatementBrace();
3442 cases = switchStatementColon(pos, pos + 6);
3445 jj_la1[92] = jj_gen;
3446 jj_consume_token(-1);
3447 throw new ParseException();
3449 {if (true) return new SwitchStatement(variable,cases,pos,SimpleCharStream.getPosition());}
3450 throw new Error("Missing return statement in function");
3453 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3455 final ArrayList cases = new ArrayList();
3456 jj_consume_token(LBRACE);
3459 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3465 jj_la1[93] = jj_gen;
3468 cas = switchLabel0();
3472 jj_consume_token(RBRACE);
3473 AbstractCase[] abcase = new AbstractCase[cases.size()];
3474 cases.toArray(abcase);
3475 {if (true) return abcase;}
3476 } catch (ParseException e) {
3477 errorMessage = "'}' expected";
3479 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3480 errorEnd = SimpleCharStream.getPosition() + 1;
3481 {if (true) throw e;}
3483 throw new Error("Missing return statement in function");
3487 * A Switch statement with : ... endswitch;
3488 * @param start the begin offset of the switch
3489 * @param end the end offset of the switch
3491 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3493 final ArrayList cases = new ArrayList();
3494 jj_consume_token(COLON);
3496 setMarker(fileToParse,
3497 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3501 "Line " + token.beginLine);
3502 } catch (CoreException e) {
3503 PHPeclipsePlugin.log(e);
3507 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3513 jj_la1[94] = jj_gen;
3516 cas = switchLabel0();
3520 jj_consume_token(ENDSWITCH);
3521 } catch (ParseException e) {
3522 errorMessage = "'endswitch' expected";
3524 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3525 errorEnd = SimpleCharStream.getPosition() + 1;
3526 {if (true) throw e;}
3529 jj_consume_token(SEMICOLON);
3530 AbstractCase[] abcase = new AbstractCase[cases.size()];
3531 cases.toArray(abcase);
3532 {if (true) return abcase;}
3533 } catch (ParseException e) {
3534 errorMessage = "';' expected after 'endswitch' keyword";
3536 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3537 errorEnd = SimpleCharStream.getPosition() + 1;
3538 {if (true) throw e;}
3540 throw new Error("Missing return statement in function");
3543 static final public AbstractCase switchLabel0() throws ParseException {
3544 final Expression expr;
3545 Statement statement;
3546 final ArrayList stmts = new ArrayList();
3547 final int pos = SimpleCharStream.getPosition();
3548 expr = SwitchLabel();
3551 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3585 case INTEGER_LITERAL:
3586 case FLOATING_POINT_LITERAL:
3587 case STRING_LITERAL:
3596 jj_la1[95] = jj_gen;
3599 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3632 case INTEGER_LITERAL:
3633 case FLOATING_POINT_LITERAL:
3634 case STRING_LITERAL:
3640 statement = BlockStatementNoBreak();
3641 stmts.add(statement);
3644 statement = htmlBlock();
3645 stmts.add(statement);
3648 jj_la1[96] = jj_gen;
3649 jj_consume_token(-1);
3650 throw new ParseException();
3653 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3655 statement = BreakStatement();
3656 stmts.add(statement);
3659 jj_la1[97] = jj_gen;
3662 Statement[] stmtsArray = new Statement[stmts.size()];
3663 stmts.toArray(stmtsArray);
3664 if (expr == null) {//it's a default
3665 {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3667 {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3668 throw new Error("Missing return statement in function");
3673 * case Expression() :
3675 * @return the if it was a case and null if not
3677 static final public Expression SwitchLabel() throws ParseException {
3678 final Expression expr;
3679 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3681 token = jj_consume_token(CASE);
3683 expr = Expression();
3684 } catch (ParseException e) {
3685 if (errorMessage != null) {if (true) throw e;}
3686 errorMessage = "expression expected after 'case' keyword";
3688 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3689 errorEnd = SimpleCharStream.getPosition() + 1;
3690 {if (true) throw e;}
3693 jj_consume_token(COLON);
3694 {if (true) return expr;}
3695 } catch (ParseException e) {
3696 errorMessage = "':' expected after case expression";
3698 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3699 errorEnd = SimpleCharStream.getPosition() + 1;
3700 {if (true) throw e;}
3704 token = jj_consume_token(_DEFAULT);
3706 jj_consume_token(COLON);
3707 {if (true) return null;}
3708 } catch (ParseException e) {
3709 errorMessage = "':' expected after 'default' keyword";
3711 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3712 errorEnd = SimpleCharStream.getPosition() + 1;
3713 {if (true) throw e;}
3717 jj_la1[98] = jj_gen;
3718 jj_consume_token(-1);
3719 throw new ParseException();
3721 throw new Error("Missing return statement in function");
3724 static final public Break BreakStatement() throws ParseException {
3725 Expression expression = null;
3726 final int start = SimpleCharStream.getPosition();
3727 jj_consume_token(BREAK);
3728 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3744 case INTEGER_LITERAL:
3745 case FLOATING_POINT_LITERAL:
3746 case STRING_LITERAL:
3750 expression = Expression();
3753 jj_la1[99] = jj_gen;
3757 jj_consume_token(SEMICOLON);
3758 } catch (ParseException e) {
3759 errorMessage = "';' expected after 'break' keyword";
3761 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3762 errorEnd = SimpleCharStream.getPosition() + 1;
3763 {if (true) throw e;}
3765 {if (true) return new Break(expression, start, SimpleCharStream.getPosition());}
3766 throw new Error("Missing return statement in function");
3769 static final public IfStatement IfStatement() throws ParseException {
3770 final int pos = SimpleCharStream.getPosition();
3771 Expression condition;
3772 IfStatement ifStatement;
3773 jj_consume_token(IF);
3774 condition = Condition("if");
3775 ifStatement = IfStatement0(condition, pos,pos+2);
3776 {if (true) return ifStatement;}
3777 throw new Error("Missing return statement in function");
3780 static final public Expression Condition(final String keyword) throws ParseException {
3781 final Expression condition;
3783 jj_consume_token(LPAREN);
3784 } catch (ParseException e) {
3785 errorMessage = "'(' expected after " + keyword + " keyword";
3787 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length();
3788 errorEnd = errorStart +1;
3789 processParseException(e);
3791 condition = Expression();
3793 jj_consume_token(RPAREN);
3794 } catch (ParseException e) {
3795 errorMessage = "')' expected after " + keyword + " keyword";
3797 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3798 errorEnd = SimpleCharStream.getPosition() + 1;
3799 processParseException(e);
3801 {if (true) return condition;}
3802 throw new Error("Missing return statement in function");
3805 static final public IfStatement IfStatement0(Expression condition, final int start,final int end) throws ParseException {
3806 Statement statement;
3808 final Statement[] statementsArray;
3809 ElseIf elseifStatement;
3810 Else elseStatement = null;
3812 final ArrayList elseIfList = new ArrayList();
3814 int pos = SimpleCharStream.getPosition();
3816 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3818 jj_consume_token(COLON);
3819 stmts = new ArrayList();
3822 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3855 case INTEGER_LITERAL:
3856 case FLOATING_POINT_LITERAL:
3857 case STRING_LITERAL:
3866 jj_la1[100] = jj_gen;
3869 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3901 case INTEGER_LITERAL:
3902 case FLOATING_POINT_LITERAL:
3903 case STRING_LITERAL:
3909 statement = Statement();
3910 stmts.add(statement);
3913 statement = htmlBlock();
3914 stmts.add(statement);
3917 jj_la1[101] = jj_gen;
3918 jj_consume_token(-1);
3919 throw new ParseException();
3922 endStatements = SimpleCharStream.getPosition();
3925 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3930 jj_la1[102] = jj_gen;
3933 elseifStatement = ElseIfStatementColon();
3934 elseIfList.add(elseifStatement);
3936 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3938 elseStatement = ElseStatementColon();
3941 jj_la1[103] = jj_gen;
3945 setMarker(fileToParse,
3946 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
3950 "Line " + token.beginLine);
3951 } catch (CoreException e) {
3952 PHPeclipsePlugin.log(e);
3955 jj_consume_token(ENDIF);
3956 } catch (ParseException e) {
3957 errorMessage = "'endif' expected";
3959 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3960 errorEnd = SimpleCharStream.getPosition() + 1;
3961 {if (true) throw e;}
3964 jj_consume_token(SEMICOLON);
3965 } catch (ParseException e) {
3966 errorMessage = "';' expected after 'endif' keyword";
3968 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3969 errorEnd = SimpleCharStream.getPosition() + 1;
3970 {if (true) throw e;}
3972 elseIfs = new ElseIf[elseIfList.size()];
3973 elseIfList.toArray(elseIfs);
3974 if (stmts.size() == 1) {
3975 {if (true) return new IfStatement(condition,
3976 (Statement) stmts.get(0),
3980 SimpleCharStream.getPosition());}
3982 statementsArray = new Statement[stmts.size()];
3983 stmts.toArray(statementsArray);
3984 {if (true) return new IfStatement(condition,
3985 new Block(statementsArray,pos,endStatements),
3989 SimpleCharStream.getPosition());}
4024 case INTEGER_LITERAL:
4025 case FLOATING_POINT_LITERAL:
4026 case STRING_LITERAL:
4032 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4064 case INTEGER_LITERAL:
4065 case FLOATING_POINT_LITERAL:
4066 case STRING_LITERAL:
4078 jj_la1[104] = jj_gen;
4079 jj_consume_token(-1);
4080 throw new ParseException();
4084 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4089 jj_la1[105] = jj_gen;
4092 elseifStatement = ElseIfStatement();
4093 elseIfList.add(elseifStatement);
4095 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4097 jj_consume_token(ELSE);
4099 pos = SimpleCharStream.getPosition();
4100 statement = Statement();
4101 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4102 } catch (ParseException e) {
4103 if (errorMessage != null) {
4104 {if (true) throw e;}
4106 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4108 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4109 errorEnd = SimpleCharStream.getPosition() + 1;
4110 {if (true) throw e;}
4114 jj_la1[106] = jj_gen;
4117 elseIfs = new ElseIf[elseIfList.size()];
4118 elseIfList.toArray(elseIfs);
4119 {if (true) return new IfStatement(condition,
4124 SimpleCharStream.getPosition());}
4127 jj_la1[107] = jj_gen;
4128 jj_consume_token(-1);
4129 throw new ParseException();
4131 throw new Error("Missing return statement in function");
4134 static final public ElseIf ElseIfStatementColon() throws ParseException {
4135 Expression condition;
4136 Statement statement;
4137 final ArrayList list = new ArrayList();
4138 final int pos = SimpleCharStream.getPosition();
4139 jj_consume_token(ELSEIF);
4140 condition = Condition("elseif");
4141 jj_consume_token(COLON);
4144 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4177 case INTEGER_LITERAL:
4178 case FLOATING_POINT_LITERAL:
4179 case STRING_LITERAL:
4188 jj_la1[108] = jj_gen;
4191 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4223 case INTEGER_LITERAL:
4224 case FLOATING_POINT_LITERAL:
4225 case STRING_LITERAL:
4231 statement = Statement();
4232 list.add(statement);
4235 statement = htmlBlock();
4236 list.add(statement);
4239 jj_la1[109] = jj_gen;
4240 jj_consume_token(-1);
4241 throw new ParseException();
4244 Statement[] stmtsArray = new Statement[list.size()];
4245 list.toArray(stmtsArray);
4246 {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4247 throw new Error("Missing return statement in function");
4250 static final public Else ElseStatementColon() throws ParseException {
4251 Statement statement;
4252 final ArrayList list = new ArrayList();
4253 final int pos = SimpleCharStream.getPosition();
4254 jj_consume_token(ELSE);
4255 jj_consume_token(COLON);
4258 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4291 case INTEGER_LITERAL:
4292 case FLOATING_POINT_LITERAL:
4293 case STRING_LITERAL:
4302 jj_la1[110] = jj_gen;
4305 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4337 case INTEGER_LITERAL:
4338 case FLOATING_POINT_LITERAL:
4339 case STRING_LITERAL:
4345 statement = Statement();
4346 list.add(statement);
4349 statement = htmlBlock();
4350 list.add(statement);
4353 jj_la1[111] = jj_gen;
4354 jj_consume_token(-1);
4355 throw new ParseException();
4358 Statement[] stmtsArray = new Statement[list.size()];
4359 list.toArray(stmtsArray);
4360 {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4361 throw new Error("Missing return statement in function");
4364 static final public ElseIf ElseIfStatement() throws ParseException {
4365 Expression condition;
4366 Statement statement;
4367 final ArrayList list = new ArrayList();
4368 final int pos = SimpleCharStream.getPosition();
4369 jj_consume_token(ELSEIF);
4370 condition = Condition("elseif");
4371 statement = Statement();
4372 list.add(statement);/*todo:do better*/
4373 Statement[] stmtsArray = new Statement[list.size()];
4374 list.toArray(stmtsArray);
4375 {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4376 throw new Error("Missing return statement in function");
4379 static final public WhileStatement WhileStatement() throws ParseException {
4380 final Expression condition;
4381 final Statement action;
4382 final int pos = SimpleCharStream.getPosition();
4383 jj_consume_token(WHILE);
4384 condition = Condition("while");
4385 action = WhileStatement0(pos,pos + 5);
4386 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4387 throw new Error("Missing return statement in function");
4390 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4391 Statement statement;
4392 final ArrayList stmts = new ArrayList();
4393 final int pos = SimpleCharStream.getPosition();
4394 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4396 jj_consume_token(COLON);
4399 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4431 case INTEGER_LITERAL:
4432 case FLOATING_POINT_LITERAL:
4433 case STRING_LITERAL:
4442 jj_la1[112] = jj_gen;
4445 statement = Statement();
4446 stmts.add(statement);
4449 setMarker(fileToParse,
4450 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4454 "Line " + token.beginLine);
4455 } catch (CoreException e) {
4456 PHPeclipsePlugin.log(e);
4459 jj_consume_token(ENDWHILE);
4460 } catch (ParseException e) {
4461 errorMessage = "'endwhile' expected";
4463 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4464 errorEnd = SimpleCharStream.getPosition() + 1;
4465 {if (true) throw e;}
4468 jj_consume_token(SEMICOLON);
4469 Statement[] stmtsArray = new Statement[stmts.size()];
4470 stmts.toArray(stmtsArray);
4471 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4472 } catch (ParseException e) {
4473 errorMessage = "';' expected after 'endwhile' keyword";
4475 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4476 errorEnd = SimpleCharStream.getPosition() + 1;
4477 {if (true) throw e;}
4511 case INTEGER_LITERAL:
4512 case FLOATING_POINT_LITERAL:
4513 case STRING_LITERAL:
4519 statement = Statement();
4520 {if (true) return statement;}
4523 jj_la1[113] = jj_gen;
4524 jj_consume_token(-1);
4525 throw new ParseException();
4527 throw new Error("Missing return statement in function");
4530 static final public DoStatement DoStatement() throws ParseException {
4531 final Statement action;
4532 final Expression condition;
4533 final int pos = SimpleCharStream.getPosition();
4534 jj_consume_token(DO);
4535 action = Statement();
4536 jj_consume_token(WHILE);
4537 condition = Condition("while");
4539 jj_consume_token(SEMICOLON);
4540 {if (true) return new DoStatement(condition,action,pos,SimpleCharStream.getPosition());}
4541 } catch (ParseException e) {
4542 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4544 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4545 errorEnd = SimpleCharStream.getPosition() + 1;
4546 {if (true) throw e;}
4548 throw new Error("Missing return statement in function");
4551 static final public ForeachStatement ForeachStatement() throws ParseException {
4552 Statement statement;
4553 Expression expression;
4554 final int pos = SimpleCharStream.getPosition();
4555 ArrayVariableDeclaration variable;
4556 jj_consume_token(FOREACH);
4558 jj_consume_token(LPAREN);
4559 } catch (ParseException e) {
4560 errorMessage = "'(' expected after 'foreach' keyword";
4562 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4563 errorEnd = SimpleCharStream.getPosition() + 1;
4564 {if (true) throw e;}
4567 expression = Expression();
4568 } catch (ParseException e) {
4569 errorMessage = "variable expected";
4571 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4572 errorEnd = SimpleCharStream.getPosition() + 1;
4573 {if (true) throw e;}
4576 jj_consume_token(AS);
4577 } catch (ParseException e) {
4578 errorMessage = "'as' expected";
4580 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4581 errorEnd = SimpleCharStream.getPosition() + 1;
4582 {if (true) throw e;}
4585 variable = ArrayVariable();
4586 } catch (ParseException e) {
4587 errorMessage = "variable expected";
4589 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4590 errorEnd = SimpleCharStream.getPosition() + 1;
4591 {if (true) throw e;}
4594 jj_consume_token(RPAREN);
4595 } catch (ParseException e) {
4596 errorMessage = "')' expected after 'foreach' keyword";
4598 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4599 errorEnd = SimpleCharStream.getPosition() + 1;
4600 {if (true) throw e;}
4603 statement = Statement();
4604 } catch (ParseException e) {
4605 if (errorMessage != null) {if (true) throw e;}
4606 errorMessage = "statement expected";
4608 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4609 errorEnd = SimpleCharStream.getPosition() + 1;
4610 {if (true) throw e;}
4612 {if (true) return new ForeachStatement(expression,
4616 SimpleCharStream.getPosition());}
4617 throw new Error("Missing return statement in function");
4620 static final public ForStatement ForStatement() throws ParseException {
4622 final int pos = SimpleCharStream.getPosition();
4623 Statement[] initializations = null;
4624 Expression condition = null;
4625 Statement[] increments = null;
4627 final ArrayList list = new ArrayList();
4628 final int startBlock, endBlock;
4629 token = jj_consume_token(FOR);
4631 jj_consume_token(LPAREN);
4632 } catch (ParseException e) {
4633 errorMessage = "'(' expected after 'for' keyword";
4635 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4636 errorEnd = SimpleCharStream.getPosition() + 1;
4637 {if (true) throw e;}
4639 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4647 initializations = ForInit();
4650 jj_la1[114] = jj_gen;
4653 jj_consume_token(SEMICOLON);
4654 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4670 case INTEGER_LITERAL:
4671 case FLOATING_POINT_LITERAL:
4672 case STRING_LITERAL:
4676 condition = Expression();
4679 jj_la1[115] = jj_gen;
4682 jj_consume_token(SEMICOLON);
4683 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4691 increments = StatementExpressionList();
4694 jj_la1[116] = jj_gen;
4697 jj_consume_token(RPAREN);
4698 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4730 case INTEGER_LITERAL:
4731 case FLOATING_POINT_LITERAL:
4732 case STRING_LITERAL:
4738 action = Statement();
4739 {if (true) return new ForStatement(initializations,condition,increments,action,pos,SimpleCharStream.getPosition());}
4742 jj_consume_token(COLON);
4743 startBlock = SimpleCharStream.getPosition();
4746 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4778 case INTEGER_LITERAL:
4779 case FLOATING_POINT_LITERAL:
4780 case STRING_LITERAL:
4789 jj_la1[117] = jj_gen;
4792 action = Statement();
4796 setMarker(fileToParse,
4797 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
4799 pos+token.image.length(),
4801 "Line " + token.beginLine);
4802 } catch (CoreException e) {
4803 PHPeclipsePlugin.log(e);
4805 endBlock = SimpleCharStream.getPosition();
4807 jj_consume_token(ENDFOR);
4808 } catch (ParseException e) {
4809 errorMessage = "'endfor' expected";
4811 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4812 errorEnd = SimpleCharStream.getPosition() + 1;
4813 {if (true) throw e;}
4816 jj_consume_token(SEMICOLON);
4817 Statement[] stmtsArray = new Statement[list.size()];
4818 list.toArray(stmtsArray);
4819 {if (true) return new ForStatement(initializations,condition,increments,new Block(stmtsArray,startBlock,endBlock),pos,SimpleCharStream.getPosition());}
4820 } catch (ParseException e) {
4821 errorMessage = "';' expected after 'endfor' keyword";
4823 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4824 errorEnd = SimpleCharStream.getPosition() + 1;
4825 {if (true) throw e;}
4829 jj_la1[118] = jj_gen;
4830 jj_consume_token(-1);
4831 throw new ParseException();
4833 throw new Error("Missing return statement in function");
4836 static final public Statement[] ForInit() throws ParseException {
4837 Statement[] statements;
4838 if (jj_2_8(2147483647)) {
4839 statements = LocalVariableDeclaration();
4840 {if (true) return statements;}
4842 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4850 statements = StatementExpressionList();
4851 {if (true) return statements;}
4854 jj_la1[119] = jj_gen;
4855 jj_consume_token(-1);
4856 throw new ParseException();
4859 throw new Error("Missing return statement in function");
4862 static final public Statement[] StatementExpressionList() throws ParseException {
4863 final ArrayList list = new ArrayList();
4865 expr = StatementExpression();
4869 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4874 jj_la1[120] = jj_gen;
4877 jj_consume_token(COMMA);
4878 StatementExpression();
4881 Statement[] stmtsArray = new Statement[list.size()];
4882 list.toArray(stmtsArray);
4883 {if (true) return stmtsArray;}
4884 throw new Error("Missing return statement in function");
4887 static final public Continue ContinueStatement() throws ParseException {
4888 Expression expr = null;
4889 final int pos = SimpleCharStream.getPosition();
4890 jj_consume_token(CONTINUE);
4891 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4907 case INTEGER_LITERAL:
4908 case FLOATING_POINT_LITERAL:
4909 case STRING_LITERAL:
4913 expr = Expression();
4916 jj_la1[121] = jj_gen;
4920 jj_consume_token(SEMICOLON);
4921 {if (true) return new Continue(expr,pos,SimpleCharStream.getPosition());}
4922 } catch (ParseException e) {
4923 errorMessage = "';' expected after 'continue' statement";
4925 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4926 errorEnd = SimpleCharStream.getPosition() + 1;
4927 {if (true) throw e;}
4929 throw new Error("Missing return statement in function");
4932 static final public ReturnStatement ReturnStatement() throws ParseException {
4933 Expression expr = null;
4934 final int pos = SimpleCharStream.getPosition();
4935 jj_consume_token(RETURN);
4936 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4952 case INTEGER_LITERAL:
4953 case FLOATING_POINT_LITERAL:
4954 case STRING_LITERAL:
4958 expr = Expression();
4961 jj_la1[122] = jj_gen;
4965 jj_consume_token(SEMICOLON);
4966 {if (true) return new ReturnStatement(expr,pos,SimpleCharStream.getPosition());}
4967 } catch (ParseException e) {
4968 errorMessage = "';' expected after 'return' statement";
4970 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4971 errorEnd = SimpleCharStream.getPosition() + 1;
4972 {if (true) throw e;}
4974 throw new Error("Missing return statement in function");
4977 static final private boolean jj_2_1(int xla) {
4978 jj_la = xla; jj_lastpos = jj_scanpos = token;
4979 boolean retval = !jj_3_1();
4984 static final private boolean jj_2_2(int xla) {
4985 jj_la = xla; jj_lastpos = jj_scanpos = token;
4986 boolean retval = !jj_3_2();
4991 static final private boolean jj_2_3(int xla) {
4992 jj_la = xla; jj_lastpos = jj_scanpos = token;
4993 boolean retval = !jj_3_3();
4998 static final private boolean jj_2_4(int xla) {
4999 jj_la = xla; jj_lastpos = jj_scanpos = token;
5000 boolean retval = !jj_3_4();
5005 static final private boolean jj_2_5(int xla) {
5006 jj_la = xla; jj_lastpos = jj_scanpos = token;
5007 boolean retval = !jj_3_5();
5012 static final private boolean jj_2_6(int xla) {
5013 jj_la = xla; jj_lastpos = jj_scanpos = token;
5014 boolean retval = !jj_3_6();
5019 static final private boolean jj_2_7(int xla) {
5020 jj_la = xla; jj_lastpos = jj_scanpos = token;
5021 boolean retval = !jj_3_7();
5026 static final private boolean jj_2_8(int xla) {
5027 jj_la = xla; jj_lastpos = jj_scanpos = token;
5028 boolean retval = !jj_3_8();
5033 static final private boolean jj_3R_81() {
5034 if (jj_scan_token(INT)) return true;
5035 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5039 static final private boolean jj_3R_44() {
5040 if (jj_scan_token(ARRAY)) return true;
5041 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5045 static final private boolean jj_3R_80() {
5046 if (jj_scan_token(FLOAT)) return true;
5047 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5051 static final private boolean jj_3R_184() {
5052 if (jj_scan_token(ARRAY)) return true;
5053 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5057 static final private boolean jj_3R_79() {
5058 if (jj_scan_token(DOUBLE)) return true;
5059 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5063 static final private boolean jj_3R_183() {
5064 if (jj_3R_52()) return true;
5065 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5069 static final private boolean jj_3R_85() {
5070 if (jj_scan_token(LIST)) return true;
5071 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5072 if (jj_scan_token(LPAREN)) return true;
5073 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5076 if (jj_3R_99()) jj_scanpos = xsp;
5077 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5080 if (jj_3R_100()) { jj_scanpos = xsp; break; }
5081 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5083 if (jj_scan_token(RPAREN)) return true;
5084 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5086 if (jj_3R_101()) jj_scanpos = xsp;
5087 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5091 static final private boolean jj_3R_78() {
5092 if (jj_scan_token(REAL)) return true;
5093 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5097 static final private boolean jj_3R_167() {
5098 if (jj_scan_token(LPAREN)) return true;
5099 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5104 if (jj_3R_184()) return true;
5105 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5106 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5107 if (jj_scan_token(RPAREN)) return true;
5108 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5109 if (jj_3R_139()) return true;
5110 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5114 static final private boolean jj_3R_77() {
5115 if (jj_scan_token(BOOLEAN)) return true;
5116 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5120 static final private boolean jj_3R_76() {
5121 if (jj_scan_token(BOOL)) return true;
5122 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5126 static final private boolean jj_3R_43() {
5127 if (jj_3R_52()) return true;
5128 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5132 static final private boolean jj_3R_75() {
5133 if (jj_scan_token(STRING)) return true;
5134 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5138 static final private boolean jj_3R_52() {
5157 if (jj_3R_83()) return true;
5158 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5159 } else 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;
5170 static final private boolean jj_3R_84() {
5171 if (jj_scan_token(PRINT)) return true;
5172 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5173 if (jj_3R_45()) return true;
5174 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5178 static final private boolean jj_3_4() {
5179 if (jj_scan_token(LPAREN)) return true;
5180 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5185 if (jj_3R_44()) return true;
5186 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5187 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5188 if (jj_scan_token(RPAREN)) return true;
5189 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5193 static final private boolean jj_3R_165() {
5194 if (jj_scan_token(LPAREN)) return true;
5195 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5196 if (jj_3R_45()) return true;
5197 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5198 if (jj_scan_token(RPAREN)) return true;
5199 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5203 static final private boolean jj_3R_164() {
5204 if (jj_3R_169()) return true;
5205 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5209 static final private boolean jj_3R_163() {
5210 if (jj_3R_168()) return true;
5211 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5215 static final private boolean jj_3R_162() {
5216 if (jj_3R_167()) return true;
5217 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5221 static final private boolean jj_3R_158() {
5232 if (jj_3R_165()) return true;
5233 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5234 } else 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;
5241 static final private boolean jj_3R_161() {
5242 if (jj_scan_token(BANG)) return true;
5243 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5244 if (jj_3R_139()) return true;
5245 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5249 static final private boolean jj_3R_160() {
5250 if (jj_scan_token(DECR)) return true;
5251 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5255 static final private boolean jj_3R_159() {
5256 if (jj_scan_token(INCR)) return true;
5257 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5261 static final private boolean jj_3R_157() {
5266 if (jj_3R_160()) return true;
5267 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5268 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5269 if (jj_3R_166()) return true;
5270 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5274 static final private boolean jj_3R_152() {
5275 if (jj_3R_158()) return true;
5276 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5280 static final private boolean jj_3R_151() {
5281 if (jj_3R_157()) return true;
5282 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5286 static final private boolean jj_3R_156() {
5287 if (jj_scan_token(MINUS)) return true;
5288 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5292 static final private boolean jj_3R_155() {
5293 if (jj_scan_token(PLUS)) return true;
5294 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5298 static final private boolean jj_3R_148() {
5305 if (jj_3R_152()) return true;
5306 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5307 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5308 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5312 static final private boolean jj_3R_150() {
5317 if (jj_3R_156()) return true;
5318 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5319 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5320 if (jj_3R_139()) return true;
5321 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5325 static final private boolean jj_3R_154() {
5326 if (jj_3R_148()) return true;
5327 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5331 static final private boolean jj_3R_149() {
5336 if (jj_3R_154()) return true;
5337 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5338 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5342 static final private boolean jj_3R_153() {
5343 if (jj_scan_token(AT)) return true;
5344 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5345 if (jj_3R_149()) return true;
5346 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5350 static final private boolean jj_3R_144() {
5351 if (jj_3R_149()) return true;
5352 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5356 static final private boolean jj_3R_139() {
5361 if (jj_3R_144()) return true;
5362 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5363 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5367 static final private boolean jj_3R_143() {
5368 if (jj_scan_token(BIT_AND)) return true;
5369 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5370 if (jj_3R_148()) return true;
5371 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5375 static final private boolean jj_3R_87() {
5376 if (jj_scan_token(ASSIGN)) return true;
5377 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5378 if (jj_3R_45()) return true;
5379 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5383 static final private boolean jj_3R_147() {
5384 if (jj_scan_token(REMAINDER)) return true;
5385 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5389 static final private boolean jj_3R_146() {
5390 if (jj_scan_token(SLASH)) return true;
5391 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5395 static final private boolean jj_3R_145() {
5396 if (jj_scan_token(STAR)) return true;
5397 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5401 static final private boolean jj_3R_140() {
5408 if (jj_3R_147()) return true;
5409 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5410 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5411 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5412 if (jj_3R_139()) return true;
5413 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5417 static final private boolean jj_3R_134() {
5418 if (jj_3R_139()) return true;
5419 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5423 if (jj_3R_140()) { jj_scanpos = xsp; break; }
5424 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5429 static final private boolean jj_3R_142() {
5430 if (jj_scan_token(MINUS)) return true;
5431 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5435 static final private boolean jj_3R_141() {
5436 if (jj_scan_token(PLUS)) return true;
5437 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5441 static final private boolean jj_3R_198() {
5442 if (jj_scan_token(COMMA)) return true;
5443 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5447 static final private boolean jj_3R_57() {
5448 if (jj_3R_50()) return true;
5449 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5452 if (jj_3R_87()) jj_scanpos = xsp;
5453 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5457 static final private boolean jj_3R_135() {
5462 if (jj_3R_142()) return true;
5463 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5464 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5465 if (jj_3R_134()) return true;
5466 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5470 static final private boolean jj_3_2() {
5471 if (jj_scan_token(COMMA)) return true;
5472 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5473 if (jj_3R_41()) return true;
5474 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5478 static final private boolean jj_3R_128() {
5479 if (jj_3R_134()) return true;
5480 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5484 if (jj_3R_135()) { jj_scanpos = xsp; break; }
5485 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5490 static final private boolean jj_3R_197() {
5491 if (jj_3R_41()) return true;
5492 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5496 if (jj_3_2()) { jj_scanpos = xsp; break; }
5497 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5502 static final private boolean jj_3_7() {
5503 if (jj_3R_46()) return true;
5504 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5508 static final private boolean jj_3R_58() {
5509 if (jj_scan_token(COMMA)) return true;
5510 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5511 if (jj_3R_57()) return true;
5512 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5516 static final private boolean jj_3R_138() {
5517 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
5518 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5522 static final private boolean jj_3R_192() {
5523 if (jj_scan_token(LPAREN)) return true;
5524 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5527 if (jj_3R_197()) jj_scanpos = xsp;
5528 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5530 if (jj_3R_198()) jj_scanpos = xsp;
5531 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5532 if (jj_scan_token(RPAREN)) return true;
5533 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5537 static final private boolean jj_3R_137() {
5538 if (jj_scan_token(RSIGNEDSHIFT)) return true;
5539 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5543 static final private boolean jj_3R_47() {
5544 if (jj_3R_57()) return true;
5545 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5549 if (jj_3R_58()) { jj_scanpos = xsp; break; }
5550 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5555 static final private boolean jj_3R_136() {
5556 if (jj_scan_token(LSHIFT)) return true;
5557 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5561 static final private boolean jj_3R_129() {
5568 if (jj_3R_138()) return true;
5569 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5570 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5571 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5572 if (jj_3R_128()) return true;
5573 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5577 static final private boolean jj_3R_121() {
5578 if (jj_3R_128()) return true;
5579 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5583 if (jj_3R_129()) { jj_scanpos = xsp; break; }
5584 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5589 static final private boolean jj_3_6() {
5590 if (jj_3R_45()) return true;
5591 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5592 if (jj_scan_token(SEMICOLON)) return true;
5593 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5597 static final private boolean jj_3R_201() {
5598 if (jj_scan_token(ARRAYASSIGN)) return true;
5599 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5600 if (jj_3R_45()) return true;
5601 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5605 static final private boolean jj_3R_41() {
5606 if (jj_3R_45()) return true;
5607 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5610 if (jj_3R_201()) jj_scanpos = xsp;
5611 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5615 static final private boolean jj_3R_133() {
5616 if (jj_scan_token(GE)) return true;
5617 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5621 static final private boolean jj_3R_132() {
5622 if (jj_scan_token(LE)) return true;
5623 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5627 static final private boolean jj_3R_131() {
5628 if (jj_scan_token(GT)) return true;
5629 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5633 static final private boolean jj_3R_130() {
5634 if (jj_scan_token(LT)) return true;
5635 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5639 static final private boolean jj_3R_122() {
5648 if (jj_3R_133()) return true;
5649 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5650 } else 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 if (jj_3R_121()) return true;
5654 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5658 static final private boolean jj_3R_119() {
5659 if (jj_3R_121()) return true;
5660 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5664 if (jj_3R_122()) { jj_scanpos = xsp; break; }
5665 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5670 static final private boolean jj_3R_203() {
5671 if (jj_scan_token(COMMA)) return true;
5672 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5673 if (jj_3R_45()) return true;
5674 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5678 static final private boolean jj_3R_202() {
5679 if (jj_3R_45()) return true;
5680 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5684 if (jj_3R_203()) { jj_scanpos = xsp; break; }
5685 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5690 static final private boolean jj_3R_127() {
5691 if (jj_scan_token(TRIPLEEQUAL)) return true;
5692 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5696 static final private boolean jj_3R_200() {
5697 if (jj_3R_202()) return true;
5698 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5702 static final private boolean jj_3R_126() {
5703 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5704 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5708 static final private boolean jj_3R_125() {
5709 if (jj_scan_token(NOT_EQUAL)) return true;
5710 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5714 static final private boolean jj_3R_108() {
5715 if (jj_scan_token(LBRACE)) return true;
5716 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5717 if (jj_3R_45()) return true;
5718 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5719 if (jj_scan_token(RBRACE)) return true;
5720 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5724 static final private boolean jj_3R_124() {
5725 if (jj_scan_token(DIF)) return true;
5726 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5730 static final private boolean jj_3R_123() {
5731 if (jj_scan_token(EQUAL_EQUAL)) return true;
5732 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5736 static final private boolean jj_3R_91() {
5737 if (jj_scan_token(DOLLAR_ID)) return true;
5738 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5742 static final private boolean jj_3R_120() {
5753 if (jj_3R_127()) return true;
5754 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5755 } else 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 if (jj_3R_119()) return true;
5760 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5764 static final private boolean jj_3R_93() {
5765 if (jj_3R_52()) return true;
5766 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5770 static final private boolean jj_3R_117() {
5771 if (jj_3R_119()) return true;
5772 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5776 if (jj_3R_120()) { jj_scanpos = xsp; break; }
5777 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5782 static final private boolean jj_3R_199() {
5783 if (jj_scan_token(LPAREN)) return true;
5784 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5787 if (jj_3R_200()) jj_scanpos = xsp;
5788 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5789 if (jj_scan_token(RPAREN)) return true;
5790 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5794 static final private boolean jj_3R_90() {
5795 if (jj_scan_token(DOLLAR)) return true;
5796 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5797 if (jj_3R_59()) return true;
5798 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5802 static final private boolean jj_3R_118() {
5803 if (jj_scan_token(BIT_AND)) return true;
5804 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5805 if (jj_3R_117()) return true;
5806 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5810 static final private boolean jj_3R_177() {
5811 if (jj_scan_token(NULL)) return true;
5812 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5816 static final private boolean jj_3R_176() {
5817 if (jj_scan_token(FALSE)) return true;
5818 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5822 static final private boolean jj_3R_115() {
5823 if (jj_3R_117()) return true;
5824 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5828 if (jj_3R_118()) { jj_scanpos = xsp; break; }
5829 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5834 static final private boolean jj_3R_175() {
5835 if (jj_scan_token(TRUE)) return true;
5836 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5840 static final private boolean jj_3R_89() {
5841 if (jj_scan_token(IDENTIFIER)) return true;
5842 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5845 if (jj_3R_108()) jj_scanpos = xsp;
5846 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5850 static final private boolean jj_3R_174() {
5851 if (jj_scan_token(STRING_LITERAL)) return true;
5852 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5856 static final private boolean jj_3R_173() {
5857 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
5858 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5862 static final private boolean jj_3R_88() {
5863 if (jj_scan_token(LBRACE)) return true;
5864 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5865 if (jj_3R_45()) return true;
5866 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5867 if (jj_scan_token(RBRACE)) return true;
5868 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5872 static final private boolean jj_3R_59() {
5881 if (jj_3R_91()) return true;
5882 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5883 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5884 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5885 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5889 static final private boolean jj_3R_169() {
5902 if (jj_3R_177()) return true;
5903 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5904 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5905 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5906 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5907 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5908 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5912 static final private boolean jj_3R_172() {
5913 if (jj_scan_token(INTEGER_LITERAL)) return true;
5914 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5918 static final private boolean jj_3R_116() {
5919 if (jj_scan_token(XOR)) return true;
5920 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5921 if (jj_3R_115()) return true;
5922 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5926 static final private boolean jj_3R_113() {
5927 if (jj_3R_115()) return true;
5928 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5932 if (jj_3R_116()) { jj_scanpos = xsp; break; }
5933 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5938 static final private boolean jj_3R_92() {
5939 if (jj_3R_45()) return true;
5940 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5944 static final private boolean jj_3R_60() {
5949 if (jj_3R_93()) return true;
5950 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5951 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5955 static final private boolean jj_3_8() {
5956 if (jj_3R_47()) return true;
5957 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5961 static final private boolean jj_3R_98() {
5962 if (jj_scan_token(LBRACE)) return true;
5963 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5964 if (jj_3R_45()) return true;
5965 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5966 if (jj_scan_token(RBRACE)) return true;
5967 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5971 static final private boolean jj_3R_46() {
5972 if (jj_scan_token(IDENTIFIER)) return true;
5973 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5974 if (jj_scan_token(COLON)) return true;
5975 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5979 static final private boolean jj_3R_95() {
5980 if (jj_scan_token(DOLLAR)) return true;
5981 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5982 if (jj_3R_59()) return true;
5983 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5987 static final private boolean jj_3R_114() {
5988 if (jj_scan_token(BIT_OR)) return true;
5989 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5990 if (jj_3R_113()) return true;
5991 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5995 static final private boolean jj_3R_109() {
5996 if (jj_3R_113()) return true;
5997 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6001 if (jj_3R_114()) { jj_scanpos = xsp; break; }
6002 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6007 static final private boolean jj_3R_49() {
6008 if (jj_scan_token(LBRACKET)) return true;
6009 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6012 if (jj_3R_60()) jj_scanpos = xsp;
6013 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6014 if (jj_scan_token(RBRACKET)) return true;
6015 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6019 static final private boolean jj_3R_110() {
6020 if (jj_scan_token(DOT)) return true;
6021 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6022 if (jj_3R_109()) return true;
6023 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6027 static final private boolean jj_3R_94() {
6028 if (jj_scan_token(DOLLAR_ID)) return true;
6029 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6032 if (jj_3R_98()) jj_scanpos = xsp;
6033 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6037 static final private boolean jj_3R_61() {
6042 if (jj_3R_95()) return true;
6043 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6044 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6048 static final private boolean jj_3R_104() {
6049 if (jj_3R_109()) return true;
6050 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6054 if (jj_3R_110()) { jj_scanpos = xsp; break; }
6055 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6060 static final private boolean jj_3R_48() {
6061 if (jj_scan_token(CLASSACCESS)) return true;
6062 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6063 if (jj_3R_59()) return true;
6064 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6068 static final private boolean jj_3R_40() {
6073 if (jj_3R_49()) return true;
6074 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6075 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6079 static final private boolean jj_3R_112() {
6080 if (jj_scan_token(_ANDL)) return true;
6081 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6085 static final private boolean jj_3R_111() {
6086 if (jj_scan_token(AND_AND)) return true;
6087 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6091 static final private boolean jj_3R_196() {
6092 if (jj_3R_40()) return true;
6093 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6097 static final private boolean jj_3R_105() {
6102 if (jj_3R_112()) return true;
6103 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6104 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6105 if (jj_3R_104()) return true;
6106 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6110 static final private boolean jj_3R_195() {
6111 if (jj_3R_199()) return true;
6112 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6116 static final private boolean jj_3R_188() {
6121 if (jj_3R_196()) return true;
6122 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6123 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6127 static final private boolean jj_3R_97() {
6128 if (jj_scan_token(HOOK)) return true;
6129 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6130 if (jj_3R_45()) return true;
6131 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6132 if (jj_scan_token(COLON)) return true;
6133 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6134 if (jj_3R_86()) return true;
6135 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6139 static final private boolean jj_3R_102() {
6140 if (jj_3R_104()) return true;
6141 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6145 if (jj_3R_105()) { jj_scanpos = xsp; break; }
6146 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6151 static final private boolean jj_3R_187() {
6152 if (jj_3R_50()) return true;
6153 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6157 static final private boolean jj_3R_107() {
6158 if (jj_scan_token(_ORL)) return true;
6159 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6163 static final private boolean jj_3R_106() {
6164 if (jj_scan_token(OR_OR)) return true;
6165 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6169 static final private boolean jj_3R_186() {
6170 if (jj_scan_token(IDENTIFIER)) return true;
6171 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6175 static final private boolean jj_3R_178() {
6180 if (jj_3R_187()) return true;
6181 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6182 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6186 static final private boolean jj_3_1() {
6187 if (jj_3R_40()) return true;
6188 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6192 static final private boolean jj_3R_103() {
6197 if (jj_3R_107()) return true;
6198 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6199 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6200 if (jj_3R_102()) return true;
6201 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6205 static final private boolean jj_3R_50() {
6206 if (jj_3R_61()) return true;
6207 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6211 if (jj_3_1()) { jj_scanpos = xsp; break; }
6212 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6217 static final private boolean jj_3R_96() {
6218 if (jj_3R_102()) return true;
6219 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6223 if (jj_3R_103()) { jj_scanpos = xsp; break; }
6224 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6229 static final private boolean jj_3R_86() {
6230 if (jj_3R_96()) return true;
6231 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6234 if (jj_3R_97()) jj_scanpos = xsp;
6235 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6239 static final private boolean jj_3R_74() {
6240 if (jj_scan_token(TILDEEQUAL)) return true;
6241 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6245 static final private boolean jj_3R_191() {
6246 if (jj_3R_50()) return true;
6247 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6251 static final private boolean jj_3R_73() {
6252 if (jj_scan_token(DOTASSIGN)) return true;
6253 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6257 static final private boolean jj_3R_72() {
6258 if (jj_scan_token(ORASSIGN)) return true;
6259 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6263 static final private boolean jj_3R_71() {
6264 if (jj_scan_token(XORASSIGN)) return true;
6265 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6269 static final private boolean jj_3R_190() {
6270 if (jj_scan_token(NEW)) return true;
6271 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6272 if (jj_3R_178()) return true;
6273 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6277 static final private boolean jj_3R_70() {
6278 if (jj_scan_token(ANDASSIGN)) return true;
6279 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6283 static final private boolean jj_3R_69() {
6284 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6285 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6289 static final private boolean jj_3R_68() {
6290 if (jj_scan_token(LSHIFTASSIGN)) return true;
6291 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6295 static final private boolean jj_3R_189() {
6296 if (jj_scan_token(IDENTIFIER)) return true;
6297 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6301 static final private boolean jj_3R_180() {
6308 if (jj_3R_191()) return true;
6309 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6310 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6311 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6315 static final private boolean jj_3R_67() {
6316 if (jj_scan_token(MINUSASSIGN)) return true;
6317 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6321 static final private boolean jj_3R_66() {
6322 if (jj_scan_token(PLUSASSIGN)) return true;
6323 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6327 static final private boolean jj_3R_65() {
6328 if (jj_scan_token(REMASSIGN)) return true;
6329 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6333 static final private boolean jj_3R_64() {
6334 if (jj_scan_token(SLASHASSIGN)) return true;
6335 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6339 static final private boolean jj_3R_63() {
6340 if (jj_scan_token(STARASSIGN)) return true;
6341 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6345 static final private boolean jj_3R_51() {
6372 if (jj_3R_74()) return true;
6373 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6374 } else 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;
6389 static final private boolean jj_3R_62() {
6390 if (jj_scan_token(ASSIGN)) return true;
6391 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6395 static final private boolean jj_3R_182() {
6396 if (jj_scan_token(ARRAY)) return true;
6397 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6398 if (jj_3R_192()) return true;
6399 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6403 static final private boolean jj_3R_171() {
6404 if (jj_3R_182()) return true;
6405 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6409 static final private boolean jj_3R_181() {
6410 if (jj_3R_188()) return true;
6411 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6415 static final private boolean jj_3R_170() {
6416 if (jj_3R_180()) return true;
6417 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6421 if (jj_3R_181()) { jj_scanpos = xsp; break; }
6422 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6427 static final private boolean jj_3R_101() {
6428 if (jj_scan_token(ASSIGN)) return true;
6429 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6430 if (jj_3R_45()) return true;
6431 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6435 static final private boolean jj_3R_179() {
6436 if (jj_3R_188()) return true;
6437 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6441 static final private boolean jj_3R_42() {
6442 if (jj_3R_50()) return true;
6443 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6444 if (jj_3R_51()) return true;
6445 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6446 if (jj_3R_45()) return true;
6447 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6451 static final private boolean jj_3_3() {
6452 if (jj_3R_42()) return true;
6453 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6457 static final private boolean jj_3_5() {
6458 if (jj_scan_token(IDENTIFIER)) return true;
6459 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6460 if (jj_scan_token(STATICCLASSACCESS)) return true;
6461 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6462 if (jj_3R_178()) return true;
6463 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6467 if (jj_3R_179()) { jj_scanpos = xsp; break; }
6468 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6473 static final private boolean jj_3R_166() {
6480 if (jj_3R_171()) return true;
6481 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6482 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6483 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6487 static final private boolean jj_3R_56() {
6488 if (jj_3R_86()) return true;
6489 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6493 static final private boolean jj_3R_55() {
6494 if (jj_3R_42()) return true;
6495 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6499 static final private boolean jj_3R_54() {
6500 if (jj_3R_85()) return true;
6501 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6505 static final private boolean jj_3R_45() {
6514 if (jj_3R_56()) return true;
6515 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6516 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6517 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6518 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6522 static final private boolean jj_3R_53() {
6523 if (jj_3R_84()) return true;
6524 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6528 static final private boolean jj_3R_100() {
6529 if (jj_scan_token(COMMA)) return true;
6530 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6531 if (jj_3R_50()) return true;
6532 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6536 static final private boolean jj_3R_194() {
6537 if (jj_scan_token(DECR)) return true;
6538 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6542 static final private boolean jj_3R_193() {
6543 if (jj_scan_token(INCR)) return true;
6544 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6548 static final private boolean jj_3R_185() {
6553 if (jj_3R_194()) return true;
6554 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6555 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6559 static final private boolean jj_3R_99() {
6560 if (jj_3R_50()) return true;
6561 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6565 static final private boolean jj_3R_168() {
6566 if (jj_3R_166()) return true;
6567 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6570 if (jj_3R_185()) jj_scanpos = xsp;
6571 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6575 static final private boolean jj_3R_83() {
6576 if (jj_scan_token(OBJECT)) return true;
6577 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6581 static final private boolean jj_3R_82() {
6582 if (jj_scan_token(INTEGER)) return true;
6583 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6587 static private boolean jj_initialized_once = false;
6588 static public PHPParserTokenManager token_source;
6589 static SimpleCharStream jj_input_stream;
6590 static public Token token, jj_nt;
6591 static private int jj_ntk;
6592 static private Token jj_scanpos, jj_lastpos;
6593 static private int jj_la;
6594 static public boolean lookingAhead = false;
6595 static private boolean jj_semLA;
6596 static private int jj_gen;
6597 static final private int[] jj_la1 = new int[123];
6598 static private int[] jj_la1_0;
6599 static private int[] jj_la1_1;
6600 static private int[] jj_la1_2;
6601 static private int[] jj_la1_3;
6602 static private int[] jj_la1_4;
6610 private static void jj_la1_0() {
6611 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,};
6613 private static void jj_la1_1() {
6614 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,};
6616 private static void jj_la1_2() {
6617 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,};
6619 private static void jj_la1_3() {
6620 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,};
6622 private static void jj_la1_4() {
6623 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,};
6625 static final private JJCalls[] jj_2_rtns = new JJCalls[8];
6626 static private boolean jj_rescan = false;
6627 static private int jj_gc = 0;
6629 public PHPParser(java.io.InputStream stream) {
6630 if (jj_initialized_once) {
6631 System.out.println("ERROR: Second call to constructor of static parser. You must");
6632 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6633 System.out.println(" during parser generation.");
6636 jj_initialized_once = true;
6637 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6638 token_source = new PHPParserTokenManager(jj_input_stream);
6639 token = new Token();
6642 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6643 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6646 static public void ReInit(java.io.InputStream stream) {
6647 jj_input_stream.ReInit(stream, 1, 1);
6648 token_source.ReInit(jj_input_stream);
6649 token = new Token();
6652 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6653 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6656 public PHPParser(java.io.Reader stream) {
6657 if (jj_initialized_once) {
6658 System.out.println("ERROR: Second call to constructor of static parser. You must");
6659 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6660 System.out.println(" during parser generation.");
6663 jj_initialized_once = true;
6664 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6665 token_source = new PHPParserTokenManager(jj_input_stream);
6666 token = new Token();
6669 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6670 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6673 static public void ReInit(java.io.Reader stream) {
6674 jj_input_stream.ReInit(stream, 1, 1);
6675 token_source.ReInit(jj_input_stream);
6676 token = new Token();
6679 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6680 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6683 public PHPParser(PHPParserTokenManager tm) {
6684 if (jj_initialized_once) {
6685 System.out.println("ERROR: Second call to constructor of static parser. You must");
6686 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6687 System.out.println(" during parser generation.");
6690 jj_initialized_once = true;
6692 token = new Token();
6695 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6696 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6699 public void ReInit(PHPParserTokenManager tm) {
6701 token = new Token();
6704 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6705 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6708 static final private Token jj_consume_token(int kind) throws ParseException {
6710 if ((oldToken = token).next != null) token = token.next;
6711 else token = token.next = token_source.getNextToken();
6713 if (token.kind == kind) {
6715 if (++jj_gc > 100) {
6717 for (int i = 0; i < jj_2_rtns.length; i++) {
6718 JJCalls c = jj_2_rtns[i];
6720 if (c.gen < jj_gen) c.first = null;
6729 throw generateParseException();
6732 static final private boolean jj_scan_token(int kind) {
6733 if (jj_scanpos == jj_lastpos) {
6735 if (jj_scanpos.next == null) {
6736 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
6738 jj_lastpos = jj_scanpos = jj_scanpos.next;
6741 jj_scanpos = jj_scanpos.next;
6744 int i = 0; Token tok = token;
6745 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
6746 if (tok != null) jj_add_error_token(kind, i);
6748 return (jj_scanpos.kind != kind);
6751 static final public Token getNextToken() {
6752 if (token.next != null) token = token.next;
6753 else token = token.next = token_source.getNextToken();
6759 static final public Token getToken(int index) {
6760 Token t = lookingAhead ? jj_scanpos : token;
6761 for (int i = 0; i < index; i++) {
6762 if (t.next != null) t = t.next;
6763 else t = t.next = token_source.getNextToken();
6768 static final private int jj_ntk() {
6769 if ((jj_nt=token.next) == null)
6770 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
6772 return (jj_ntk = jj_nt.kind);
6775 static private java.util.Vector jj_expentries = new java.util.Vector();
6776 static private int[] jj_expentry;
6777 static private int jj_kind = -1;
6778 static private int[] jj_lasttokens = new int[100];
6779 static private int jj_endpos;
6781 static private void jj_add_error_token(int kind, int pos) {
6782 if (pos >= 100) return;
6783 if (pos == jj_endpos + 1) {
6784 jj_lasttokens[jj_endpos++] = kind;
6785 } else if (jj_endpos != 0) {
6786 jj_expentry = new int[jj_endpos];
6787 for (int i = 0; i < jj_endpos; i++) {
6788 jj_expentry[i] = jj_lasttokens[i];
6790 boolean exists = false;
6791 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
6792 int[] oldentry = (int[])(enum.nextElement());
6793 if (oldentry.length == jj_expentry.length) {
6795 for (int i = 0; i < jj_expentry.length; i++) {
6796 if (oldentry[i] != jj_expentry[i]) {
6804 if (!exists) jj_expentries.addElement(jj_expentry);
6805 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
6809 static public ParseException generateParseException() {
6810 jj_expentries.removeAllElements();
6811 boolean[] la1tokens = new boolean[142];
6812 for (int i = 0; i < 142; i++) {
6813 la1tokens[i] = false;
6816 la1tokens[jj_kind] = true;
6819 for (int i = 0; i < 123; i++) {
6820 if (jj_la1[i] == jj_gen) {
6821 for (int j = 0; j < 32; j++) {
6822 if ((jj_la1_0[i] & (1<<j)) != 0) {
6823 la1tokens[j] = true;
6825 if ((jj_la1_1[i] & (1<<j)) != 0) {
6826 la1tokens[32+j] = true;
6828 if ((jj_la1_2[i] & (1<<j)) != 0) {
6829 la1tokens[64+j] = true;
6831 if ((jj_la1_3[i] & (1<<j)) != 0) {
6832 la1tokens[96+j] = true;
6834 if ((jj_la1_4[i] & (1<<j)) != 0) {
6835 la1tokens[128+j] = true;
6840 for (int i = 0; i < 142; i++) {
6842 jj_expentry = new int[1];
6844 jj_expentries.addElement(jj_expentry);
6849 jj_add_error_token(0, 0);
6850 int[][] exptokseq = new int[jj_expentries.size()][];
6851 for (int i = 0; i < jj_expentries.size(); i++) {
6852 exptokseq[i] = (int[])jj_expentries.elementAt(i);
6854 return new ParseException(token, exptokseq, tokenImage);
6857 static final public void enable_tracing() {
6860 static final public void disable_tracing() {
6863 static final private void jj_rescan_token() {
6865 for (int i = 0; i < 8; i++) {
6866 JJCalls p = jj_2_rtns[i];
6868 if (p.gen > jj_gen) {
6869 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
6871 case 0: jj_3_1(); break;
6872 case 1: jj_3_2(); break;
6873 case 2: jj_3_3(); break;
6874 case 3: jj_3_4(); break;
6875 case 4: jj_3_5(); break;
6876 case 5: jj_3_6(); break;
6877 case 6: jj_3_7(); break;
6878 case 7: jj_3_8(); break;
6882 } while (p != null);
6887 static final private void jj_save(int index, int xla) {
6888 JJCalls p = jj_2_rtns[index];
6889 while (p.gen > jj_gen) {
6890 if (p.next == null) { p = p.next = new JJCalls(); break; }
6893 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
6896 static final class JJCalls {