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.Enumeration;
12 import java.util.ArrayList;
13 import java.io.StringReader;
15 import java.text.MessageFormat;
17 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
18 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
19 import net.sourceforge.phpdt.internal.compiler.ast.*;
20 import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
21 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
25 * This php parser is inspired by the Java 1.2 grammar example
26 * given with JavaCC. You can get JavaCC at http://www.webgain.com
27 * You can test the parser with the PHPParserTestCase2.java
28 * @author Matthieu Casanova
30 public final class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
32 /** The file that is parsed. */
33 private static IFile fileToParse;
35 /** The current segment. */
36 private static OutlineableWithChildren currentSegment;
38 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
39 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
40 static PHPOutlineInfo outlineInfo;
42 /** The error level of the current ParseException. */
43 private static int errorLevel = ERROR;
44 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
45 private static String errorMessage;
47 private static int errorStart = -1;
48 private static int errorEnd = -1;
49 private static PHPDocument phpDocument;
51 private static final char[] SYNTAX_ERROR_CHAR = {'s','y','n','t','a','x',' ','e','r','r','o','r'};
53 * The point where html starts.
54 * It will be used by the token manager to create HTMLCode objects
56 public static int htmlStart;
59 private final static int AstStackIncrement = 100;
60 /** The stack of node. */
61 private static AstNode[] nodes;
62 /** The cursor in expression stack. */
63 private static int nodePtr;
65 public final void setFileToParse(final IFile fileToParse) {
66 this.fileToParse = fileToParse;
72 public PHPParser(final IFile fileToParse) {
73 this(new StringReader(""));
74 this.fileToParse = fileToParse;
78 * Reinitialize the parser.
80 private static final void init() {
81 nodes = new AstNode[AstStackIncrement];
87 * Add an php node on the stack.
88 * @param node the node that will be added to the stack
90 private static final void pushOnAstNodes(AstNode node) {
92 nodes[++nodePtr] = node;
93 } catch (IndexOutOfBoundsException e) {
94 int oldStackLength = nodes.length;
95 AstNode[] oldStack = nodes;
96 nodes = new AstNode[oldStackLength + AstStackIncrement];
97 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
98 nodePtr = oldStackLength;
99 nodes[nodePtr] = node;
103 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
104 phpDocument = new PHPDocument(parent,"_root".toCharArray());
105 currentSegment = phpDocument;
106 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
107 final StringReader stream = new StringReader(s);
108 if (jj_input_stream == null) {
109 jj_input_stream = new SimpleCharStream(stream, 1, 1);
115 phpDocument.nodes = new AstNode[nodes.length];
116 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
117 if (PHPeclipsePlugin.DEBUG) {
118 PHPeclipsePlugin.log(1,phpDocument.toString());
120 } catch (ParseException e) {
121 processParseException(e);
127 * This method will process the parse exception.
128 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
129 * @param e the ParseException
131 private static void processParseException(final ParseException e) {
132 if (errorMessage == null) {
133 PHPeclipsePlugin.log(e);
134 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
135 errorStart = SimpleCharStream.getPosition();
136 errorEnd = errorStart + 1;
143 * Create marker for the parse error
144 * @param e the ParseException
146 private static void setMarker(final ParseException e) {
148 if (errorStart == -1) {
149 setMarker(fileToParse,
151 SimpleCharStream.tokenBegin,
152 SimpleCharStream.tokenBegin + e.currentToken.image.length(),
154 "Line " + e.currentToken.beginLine);
156 setMarker(fileToParse,
161 "Line " + e.currentToken.beginLine);
165 } catch (CoreException e2) {
166 PHPeclipsePlugin.log(e2);
171 * Create markers according to the external parser output
173 private static void createMarkers(final String output, final IFile file) throws CoreException {
174 // delete all markers
175 file.deleteMarkers(IMarker.PROBLEM, false, 0);
180 while ((brIndx = output.indexOf("<br />", indx)) != -1) {
181 // newer php error output (tested with 4.2.3)
182 scanLine(output, file, indx, brIndx);
187 while ((brIndx = output.indexOf("<br>", indx)) != -1) {
188 // older php error output (tested with 4.2.3)
189 scanLine(output, file, indx, brIndx);
195 private static void scanLine(final String output,
198 final int brIndx) throws CoreException {
200 StringBuffer lineNumberBuffer = new StringBuffer(10);
202 current = output.substring(indx, brIndx);
204 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
205 int onLine = current.indexOf("on line <b>");
207 lineNumberBuffer.delete(0, lineNumberBuffer.length());
208 for (int i = onLine; i < current.length(); i++) {
209 ch = current.charAt(i);
210 if ('0' <= ch && '9' >= ch) {
211 lineNumberBuffer.append(ch);
215 int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
217 Hashtable attributes = new Hashtable();
219 current = current.replaceAll("\n", "");
220 current = current.replaceAll("<b>", "");
221 current = current.replaceAll("</b>", "");
222 MarkerUtilities.setMessage(attributes, current);
224 if (current.indexOf(PARSE_ERROR_STRING) != -1)
225 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
226 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
227 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
229 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
230 MarkerUtilities.setLineNumber(attributes, lineNumber);
231 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
236 public final void parse(final String s) throws CoreException {
237 final StringReader stream = new StringReader(s);
238 if (jj_input_stream == null) {
239 jj_input_stream = new SimpleCharStream(stream, 1, 1);
245 } catch (ParseException e) {
246 processParseException(e);
251 * Call the php parse command ( php -l -f <filename> )
252 * and create markers according to the external parser output
254 public static void phpExternalParse(final IFile file) {
255 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
256 final String filename = file.getLocation().toString();
258 final String[] arguments = { filename };
259 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
260 final String command = form.format(arguments);
262 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
265 // parse the buffer to find the errors and warnings
266 createMarkers(parserResult, file);
267 } catch (CoreException e) {
268 PHPeclipsePlugin.log(e);
273 * Put a new html block in the stack.
275 public static final void createNewHTMLCode() {
276 final int currentPosition = SimpleCharStream.getPosition();
277 if (currentPosition == htmlStart) {
280 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray();
281 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
284 private static final void parse() throws ParseException {
288 static final public void phpFile() throws ParseException {
292 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
330 case INTEGER_LITERAL:
331 case FLOATING_POINT_LITERAL:
347 } catch (TokenMgrError e) {
348 PHPeclipsePlugin.log(e);
349 errorStart = SimpleCharStream.getPosition();
350 errorEnd = errorStart + 1;
351 errorMessage = e.getMessage();
353 {if (true) throw generateParseException();}
358 * A php block is a <?= expression [;]?>
359 * or <?php somephpcode ?>
360 * or <? somephpcode ?>
362 static final public void PhpBlock() throws ParseException {
363 final int start = SimpleCharStream.getPosition();
364 final PHPEchoBlock phpEchoBlock;
365 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
367 phpEchoBlock = phpEchoBlock();
368 pushOnAstNodes(phpEchoBlock);
406 case INTEGER_LITERAL:
407 case FLOATING_POINT_LITERAL:
414 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
417 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
419 jj_consume_token(PHPSTARTLONG);
422 jj_consume_token(PHPSTARTSHORT);
424 setMarker(fileToParse,
425 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
427 SimpleCharStream.getPosition(),
429 "Line " + token.beginLine);
430 } catch (CoreException e) {
431 PHPeclipsePlugin.log(e);
436 jj_consume_token(-1);
437 throw new ParseException();
446 jj_consume_token(PHPEND);
447 } catch (ParseException e) {
448 errorMessage = "'?>' expected";
450 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
451 errorEnd = SimpleCharStream.getPosition() + 1;
452 processParseException(e);
457 jj_consume_token(-1);
458 throw new ParseException();
462 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
463 final Expression expr;
464 final int pos = SimpleCharStream.getPosition();
465 PHPEchoBlock echoBlock;
466 jj_consume_token(PHPECHOSTART);
468 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
470 jj_consume_token(SEMICOLON);
476 jj_consume_token(PHPEND);
477 echoBlock = new PHPEchoBlock(expr,pos,SimpleCharStream.getPosition());
478 pushOnAstNodes(echoBlock);
479 {if (true) return echoBlock;}
480 throw new Error("Missing return statement in function");
483 static final public void Php() throws ParseException {
486 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
520 case INTEGER_LITERAL:
521 case FLOATING_POINT_LITERAL:
538 static final public ClassDeclaration ClassDeclaration() throws ParseException {
539 final ClassDeclaration classDeclaration;
540 final Token className;
541 Token superclassName = null;
543 char[] classNameImage = SYNTAX_ERROR_CHAR;
544 char[] superclassNameImage = null;
545 jj_consume_token(CLASS);
546 pos = SimpleCharStream.getPosition();
548 className = jj_consume_token(IDENTIFIER);
549 classNameImage = className.image.toCharArray();
550 } catch (ParseException e) {
551 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
553 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
554 errorEnd = SimpleCharStream.getPosition() + 1;
555 processParseException(e);
557 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
559 jj_consume_token(EXTENDS);
561 superclassName = jj_consume_token(IDENTIFIER);
562 superclassNameImage = superclassName.image.toCharArray();
563 } catch (ParseException e) {
564 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
566 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
567 errorEnd = SimpleCharStream.getPosition() + 1;
568 processParseException(e);
569 superclassNameImage = SYNTAX_ERROR_CHAR;
576 if (superclassNameImage == null) {
577 classDeclaration = new ClassDeclaration(currentSegment,
582 classDeclaration = new ClassDeclaration(currentSegment,
588 currentSegment.add(classDeclaration);
589 currentSegment = classDeclaration;
590 ClassBody(classDeclaration);
591 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
592 classDeclaration.sourceEnd = SimpleCharStream.getPosition();
593 pushOnAstNodes(classDeclaration);
594 {if (true) return classDeclaration;}
595 throw new Error("Missing return statement in function");
598 static final public void ClassBody(ClassDeclaration classDeclaration) throws ParseException {
600 jj_consume_token(LBRACE);
601 } catch (ParseException e) {
602 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "', '{' expected";
604 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
605 errorEnd = SimpleCharStream.getPosition() + 1;
610 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
619 ClassBodyDeclaration(classDeclaration);
622 jj_consume_token(RBRACE);
623 } catch (ParseException e) {
624 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', 'var', 'function' or '}' expected";
626 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
627 errorEnd = SimpleCharStream.getPosition() + 1;
633 * A class can contain only methods and fields.
635 static final public void ClassBodyDeclaration(ClassDeclaration classDeclaration) throws ParseException {
636 MethodDeclaration method;
637 FieldDeclaration field;
638 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
640 method = MethodDeclaration();
641 method.setParent(classDeclaration);
644 field = FieldDeclaration();
648 jj_consume_token(-1);
649 throw new ParseException();
654 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
656 static final public FieldDeclaration FieldDeclaration() throws ParseException {
657 VariableDeclaration variableDeclaration;
658 VariableDeclaration[] list;
659 final ArrayList arrayList = new ArrayList();
660 final int pos = SimpleCharStream.getPosition();
661 jj_consume_token(VAR);
662 variableDeclaration = VariableDeclarator();
663 arrayList.add(variableDeclaration);
664 outlineInfo.addVariable(new String(variableDeclaration.name));
665 currentSegment.add(variableDeclaration);
668 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
676 jj_consume_token(COMMA);
677 variableDeclaration = VariableDeclarator();
678 arrayList.add(variableDeclaration);
679 outlineInfo.addVariable(new String(variableDeclaration.name));
680 currentSegment.add(variableDeclaration);
683 jj_consume_token(SEMICOLON);
684 } catch (ParseException e) {
685 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
687 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
688 errorEnd = SimpleCharStream.getPosition() + 1;
689 processParseException(e);
691 list = new VariableDeclaration[arrayList.size()];
692 arrayList.toArray(list);
693 {if (true) return new FieldDeclaration(list,
695 SimpleCharStream.getPosition(),
697 throw new Error("Missing return statement in function");
700 static final public VariableDeclaration VariableDeclarator() throws ParseException {
701 final String varName;
702 Expression initializer = null;
703 final int pos = SimpleCharStream.getPosition();
704 varName = VariableDeclaratorId();
705 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
707 jj_consume_token(ASSIGN);
709 initializer = VariableInitializer();
710 } catch (ParseException e) {
711 errorMessage = "Literal expression expected in variable initializer";
713 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
714 errorEnd = SimpleCharStream.getPosition() + 1;
722 if (initializer == null) {
723 {if (true) return new VariableDeclaration(currentSegment,
724 varName.toCharArray(),
726 SimpleCharStream.getPosition());}
728 {if (true) return new VariableDeclaration(currentSegment,
729 varName.toCharArray(),
732 throw new Error("Missing return statement in function");
737 * @return the variable name (with suffix)
739 static final public String VariableDeclaratorId() throws ParseException {
741 Expression expression;
742 final StringBuffer buff = new StringBuffer();
743 final int pos = SimpleCharStream.getPosition();
744 ConstantIdentifier ex;
755 ex = new ConstantIdentifier(expr.toCharArray(),
757 SimpleCharStream.getPosition());
758 expression = VariableSuffix(ex);
759 buff.append(expression.toStringExpression());
761 {if (true) return buff.toString();}
762 } catch (ParseException e) {
763 errorMessage = "'$' expected for variable identifier";
765 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
766 errorEnd = SimpleCharStream.getPosition() + 1;
769 throw new Error("Missing return statement in function");
772 static final public String Variable() throws ParseException {
773 final StringBuffer buff;
774 Expression expression = null;
777 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
779 token = jj_consume_token(DOLLAR_ID);
780 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
782 jj_consume_token(LBRACE);
783 expression = Expression();
784 jj_consume_token(RBRACE);
790 if (expression == null) {
791 {if (true) return token.image.substring(1);}
793 buff = new StringBuffer(token.image);
795 buff.append(expression.toStringExpression());
797 {if (true) return buff.toString();}
800 jj_consume_token(DOLLAR);
801 expr = VariableName();
802 {if (true) return "$" + expr;}
806 jj_consume_token(-1);
807 throw new ParseException();
809 throw new Error("Missing return statement in function");
813 * A Variable name (without the $)
814 * @return a variable name String
816 static final public String VariableName() throws ParseException {
817 final StringBuffer buff;
819 Expression expression = null;
821 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
823 jj_consume_token(LBRACE);
824 expression = Expression();
825 jj_consume_token(RBRACE);
826 buff = new StringBuffer("{");
827 buff.append(expression.toStringExpression());
829 {if (true) return buff.toString();}
832 token = jj_consume_token(IDENTIFIER);
833 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
835 jj_consume_token(LBRACE);
836 expression = Expression();
837 jj_consume_token(RBRACE);
843 if (expression == null) {
844 {if (true) return token.image;}
846 buff = new StringBuffer(token.image);
848 buff.append(expression.toStringExpression());
850 {if (true) return buff.toString();}
853 jj_consume_token(DOLLAR);
854 expr = VariableName();
855 buff = new StringBuffer("$");
857 {if (true) return buff.toString();}
860 token = jj_consume_token(DOLLAR_ID);
861 {if (true) return token.image;}
865 jj_consume_token(-1);
866 throw new ParseException();
868 throw new Error("Missing return statement in function");
871 static final public Expression VariableInitializer() throws ParseException {
872 final Expression expr;
874 final int pos = SimpleCharStream.getPosition();
875 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
879 case INTEGER_LITERAL:
880 case FLOATING_POINT_LITERAL:
883 {if (true) return expr;}
886 jj_consume_token(MINUS);
887 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
888 case INTEGER_LITERAL:
889 token = jj_consume_token(INTEGER_LITERAL);
891 case FLOATING_POINT_LITERAL:
892 token = jj_consume_token(FLOATING_POINT_LITERAL);
896 jj_consume_token(-1);
897 throw new ParseException();
899 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
901 SimpleCharStream.getPosition()),
906 jj_consume_token(PLUS);
907 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
908 case INTEGER_LITERAL:
909 token = jj_consume_token(INTEGER_LITERAL);
911 case FLOATING_POINT_LITERAL:
912 token = jj_consume_token(FLOATING_POINT_LITERAL);
916 jj_consume_token(-1);
917 throw new ParseException();
919 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
921 SimpleCharStream.getPosition()),
926 expr = ArrayDeclarator();
927 {if (true) return expr;}
930 token = jj_consume_token(IDENTIFIER);
931 {if (true) return new ConstantIdentifier(token.image.toCharArray(),pos,SimpleCharStream.getPosition());}
935 jj_consume_token(-1);
936 throw new ParseException();
938 throw new Error("Missing return statement in function");
941 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
942 Expression expr,expr2;
944 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
946 jj_consume_token(ARRAYASSIGN);
947 expr2 = Expression();
948 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
954 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
955 throw new Error("Missing return statement in function");
958 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
959 ArrayVariableDeclaration expr;
960 final ArrayList list = new ArrayList();
961 jj_consume_token(LPAREN);
962 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
978 case INTEGER_LITERAL:
979 case FLOATING_POINT_LITERAL:
984 expr = ArrayVariable();
993 jj_consume_token(COMMA);
994 expr = ArrayVariable();
1002 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1004 jj_consume_token(COMMA);
1008 jj_la1[20] = jj_gen;
1011 jj_consume_token(RPAREN);
1012 ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1014 {if (true) return vars;}
1015 throw new Error("Missing return statement in function");
1019 * A Method Declaration.
1020 * <b>function</b> MetodDeclarator() Block()
1022 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1023 final MethodDeclaration functionDeclaration;
1025 jj_consume_token(FUNCTION);
1027 functionDeclaration = MethodDeclarator();
1028 outlineInfo.addVariable(new String(functionDeclaration.name));
1029 } catch (ParseException e) {
1030 if (errorMessage != null) {if (true) throw e;}
1031 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1033 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1034 errorEnd = SimpleCharStream.getPosition() + 1;
1035 {if (true) throw e;}
1037 if (currentSegment != null) {
1038 currentSegment.add(functionDeclaration);
1039 currentSegment = functionDeclaration;
1042 functionDeclaration.statements = block.statements;
1043 if (currentSegment != null) {
1044 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
1046 {if (true) return functionDeclaration;}
1047 throw new Error("Missing return statement in function");
1051 * A MethodDeclarator.
1052 * [&] IDENTIFIER(parameters ...).
1053 * @return a function description for the outline
1055 static final public MethodDeclaration MethodDeclarator() throws ParseException {
1056 final Token identifier;
1057 Token reference = null;
1058 final Hashtable formalParameters;
1059 final int pos = SimpleCharStream.getPosition();
1060 char[] identifierChar = SYNTAX_ERROR_CHAR;
1061 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1063 reference = jj_consume_token(BIT_AND);
1066 jj_la1[21] = jj_gen;
1070 identifier = jj_consume_token(IDENTIFIER);
1071 identifierChar = identifier.image.toCharArray();
1072 } catch (ParseException e) {
1073 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1075 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1076 errorEnd = SimpleCharStream.getPosition() + 1;
1077 processParseException(e);
1079 formalParameters = FormalParameters();
1080 {if (true) return new MethodDeclaration(currentSegment,
1085 SimpleCharStream.getPosition());}
1086 throw new Error("Missing return statement in function");
1090 * FormalParameters follows method identifier.
1091 * (FormalParameter())
1093 static final public Hashtable FormalParameters() throws ParseException {
1094 VariableDeclaration var;
1095 final Hashtable parameters = new Hashtable();
1097 jj_consume_token(LPAREN);
1098 } catch (ParseException e) {
1099 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1101 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1102 errorEnd = SimpleCharStream.getPosition() + 1;
1103 {if (true) throw e;}
1105 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1109 var = FormalParameter();
1110 parameters.put(new String(var.name),var);
1113 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1118 jj_la1[22] = jj_gen;
1121 jj_consume_token(COMMA);
1122 var = FormalParameter();
1123 parameters.put(new String(var.name),var);
1127 jj_la1[23] = jj_gen;
1131 jj_consume_token(RPAREN);
1132 } catch (ParseException e) {
1133 errorMessage = "')' expected";
1135 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1136 errorEnd = SimpleCharStream.getPosition() + 1;
1137 {if (true) throw e;}
1139 {if (true) return parameters;}
1140 throw new Error("Missing return statement in function");
1144 * A formal parameter.
1145 * $varname[=value] (,$varname[=value])
1147 static final public VariableDeclaration FormalParameter() throws ParseException {
1148 final VariableDeclaration variableDeclaration;
1150 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1152 token = jj_consume_token(BIT_AND);
1155 jj_la1[24] = jj_gen;
1158 variableDeclaration = VariableDeclarator();
1159 if (token != null) {
1160 variableDeclaration.setReference(true);
1162 {if (true) return variableDeclaration;}
1163 throw new Error("Missing return statement in function");
1166 static final public ConstantIdentifier Type() throws ParseException {
1168 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1170 jj_consume_token(STRING);
1171 pos = SimpleCharStream.getPosition();
1172 {if (true) return new ConstantIdentifier(Types.STRING,pos,pos-6);}
1175 jj_consume_token(BOOL);
1176 pos = SimpleCharStream.getPosition();
1177 {if (true) return new ConstantIdentifier(Types.BOOL,pos,pos-4);}
1180 jj_consume_token(BOOLEAN);
1181 pos = SimpleCharStream.getPosition();
1182 {if (true) return new ConstantIdentifier(Types.BOOLEAN,pos,pos-7);}
1185 jj_consume_token(REAL);
1186 pos = SimpleCharStream.getPosition();
1187 {if (true) return new ConstantIdentifier(Types.REAL,pos,pos-4);}
1190 jj_consume_token(DOUBLE);
1191 pos = SimpleCharStream.getPosition();
1192 {if (true) return new ConstantIdentifier(Types.DOUBLE,pos,pos-5);}
1195 jj_consume_token(FLOAT);
1196 pos = SimpleCharStream.getPosition();
1197 {if (true) return new ConstantIdentifier(Types.FLOAT,pos,pos-5);}
1200 jj_consume_token(INT);
1201 pos = SimpleCharStream.getPosition();
1202 {if (true) return new ConstantIdentifier(Types.INT,pos,pos-3);}
1205 jj_consume_token(INTEGER);
1206 pos = SimpleCharStream.getPosition();
1207 {if (true) return new ConstantIdentifier(Types.INTEGER,pos,pos-7);}
1210 jj_consume_token(OBJECT);
1211 pos = SimpleCharStream.getPosition();
1212 {if (true) return new ConstantIdentifier(Types.OBJECT,pos,pos-6);}
1215 jj_la1[25] = jj_gen;
1216 jj_consume_token(-1);
1217 throw new ParseException();
1219 throw new Error("Missing return statement in function");
1222 static final public Expression Expression() throws ParseException {
1223 final Expression expr;
1224 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1226 expr = PrintExpression();
1227 {if (true) return expr;}
1230 expr = ListExpression();
1231 {if (true) return expr;}
1234 jj_la1[26] = jj_gen;
1235 if (jj_2_3(2147483647)) {
1236 expr = varAssignation();
1237 {if (true) return expr;}
1239 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1253 case INTEGER_LITERAL:
1254 case FLOATING_POINT_LITERAL:
1255 case STRING_LITERAL:
1259 expr = ConditionalExpression();
1260 {if (true) return expr;}
1263 jj_la1[27] = jj_gen;
1264 jj_consume_token(-1);
1265 throw new ParseException();
1269 throw new Error("Missing return statement in function");
1273 * A Variable assignation.
1274 * varName (an assign operator) any expression
1276 static final public VarAssignation varAssignation() throws ParseException {
1278 final Expression expression;
1279 final int assignOperator;
1280 final int pos = SimpleCharStream.getPosition();
1281 varName = VariableDeclaratorId();
1282 assignOperator = AssignmentOperator();
1284 expression = Expression();
1285 } catch (ParseException e) {
1286 if (errorMessage != null) {
1287 {if (true) throw e;}
1289 errorMessage = "expression expected";
1291 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1292 errorEnd = SimpleCharStream.getPosition() + 1;
1293 {if (true) throw e;}
1295 {if (true) return new VarAssignation(varName.toCharArray(),
1299 SimpleCharStream.getPosition());}
1300 throw new Error("Missing return statement in function");
1303 static final public int AssignmentOperator() throws ParseException {
1304 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1306 jj_consume_token(ASSIGN);
1307 {if (true) return VarAssignation.EQUAL;}
1310 jj_consume_token(STARASSIGN);
1311 {if (true) return VarAssignation.STAR_EQUAL;}
1314 jj_consume_token(SLASHASSIGN);
1315 {if (true) return VarAssignation.SLASH_EQUAL;}
1318 jj_consume_token(REMASSIGN);
1319 {if (true) return VarAssignation.REM_EQUAL;}
1322 jj_consume_token(PLUSASSIGN);
1323 {if (true) return VarAssignation.PLUS_EQUAL;}
1326 jj_consume_token(MINUSASSIGN);
1327 {if (true) return VarAssignation.MINUS_EQUAL;}
1330 jj_consume_token(LSHIFTASSIGN);
1331 {if (true) return VarAssignation.LSHIFT_EQUAL;}
1333 case RSIGNEDSHIFTASSIGN:
1334 jj_consume_token(RSIGNEDSHIFTASSIGN);
1335 {if (true) return VarAssignation.RSIGNEDSHIFT_EQUAL;}
1338 jj_consume_token(ANDASSIGN);
1339 {if (true) return VarAssignation.AND_EQUAL;}
1342 jj_consume_token(XORASSIGN);
1343 {if (true) return VarAssignation.XOR_EQUAL;}
1346 jj_consume_token(ORASSIGN);
1347 {if (true) return VarAssignation.OR_EQUAL;}
1350 jj_consume_token(DOTASSIGN);
1351 {if (true) return VarAssignation.DOT_EQUAL;}
1354 jj_consume_token(TILDEEQUAL);
1355 {if (true) return VarAssignation.TILDE_EQUAL;}
1358 jj_la1[28] = jj_gen;
1359 jj_consume_token(-1);
1360 throw new ParseException();
1362 throw new Error("Missing return statement in function");
1365 static final public Expression ConditionalExpression() throws ParseException {
1366 final Expression expr;
1367 Expression expr2 = null;
1368 Expression expr3 = null;
1369 expr = ConditionalOrExpression();
1370 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1372 jj_consume_token(HOOK);
1373 expr2 = Expression();
1374 jj_consume_token(COLON);
1375 expr3 = ConditionalExpression();
1378 jj_la1[29] = jj_gen;
1381 if (expr3 == null) {
1382 {if (true) return expr;}
1384 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1385 throw new Error("Missing return statement in function");
1388 static final public Expression ConditionalOrExpression() throws ParseException {
1389 Expression expr,expr2;
1391 expr = ConditionalAndExpression();
1394 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1400 jj_la1[30] = jj_gen;
1403 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1405 jj_consume_token(OR_OR);
1406 operator = OperatorIds.OR_OR;
1409 jj_consume_token(_ORL);
1410 operator = OperatorIds.ORL;
1413 jj_la1[31] = jj_gen;
1414 jj_consume_token(-1);
1415 throw new ParseException();
1417 expr2 = ConditionalAndExpression();
1418 expr = new BinaryExpression(expr,expr2,operator);
1420 {if (true) return expr;}
1421 throw new Error("Missing return statement in function");
1424 static final public Expression ConditionalAndExpression() throws ParseException {
1425 Expression expr,expr2;
1427 expr = ConcatExpression();
1430 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1436 jj_la1[32] = jj_gen;
1439 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1441 jj_consume_token(AND_AND);
1442 operator = OperatorIds.AND_AND;
1445 jj_consume_token(_ANDL);
1446 operator = OperatorIds.ANDL;
1449 jj_la1[33] = jj_gen;
1450 jj_consume_token(-1);
1451 throw new ParseException();
1453 expr2 = ConcatExpression();
1454 expr = new BinaryExpression(expr,expr2,operator);
1456 {if (true) return expr;}
1457 throw new Error("Missing return statement in function");
1460 static final public Expression ConcatExpression() throws ParseException {
1461 Expression expr,expr2;
1462 expr = InclusiveOrExpression();
1465 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1470 jj_la1[34] = jj_gen;
1473 jj_consume_token(DOT);
1474 expr2 = InclusiveOrExpression();
1475 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1477 {if (true) return expr;}
1478 throw new Error("Missing return statement in function");
1481 static final public Expression InclusiveOrExpression() throws ParseException {
1482 Expression expr,expr2;
1483 expr = ExclusiveOrExpression();
1486 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1491 jj_la1[35] = jj_gen;
1494 jj_consume_token(BIT_OR);
1495 expr2 = ExclusiveOrExpression();
1496 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1498 {if (true) return expr;}
1499 throw new Error("Missing return statement in function");
1502 static final public Expression ExclusiveOrExpression() throws ParseException {
1503 Expression expr,expr2;
1504 expr = AndExpression();
1507 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1512 jj_la1[36] = jj_gen;
1515 jj_consume_token(XOR);
1516 expr2 = AndExpression();
1517 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1519 {if (true) return expr;}
1520 throw new Error("Missing return statement in function");
1523 static final public Expression AndExpression() throws ParseException {
1524 Expression expr,expr2;
1525 expr = EqualityExpression();
1528 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1533 jj_la1[37] = jj_gen;
1536 jj_consume_token(BIT_AND);
1537 expr2 = EqualityExpression();
1538 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1540 {if (true) return expr;}
1541 throw new Error("Missing return statement in function");
1544 static final public Expression EqualityExpression() throws ParseException {
1545 Expression expr,expr2;
1547 expr = RelationalExpression();
1550 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1554 case BANGDOUBLEEQUAL:
1559 jj_la1[38] = jj_gen;
1562 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1564 jj_consume_token(EQUAL_EQUAL);
1565 operator = OperatorIds.EQUAL_EQUAL;
1568 jj_consume_token(DIF);
1569 operator = OperatorIds.DIF;
1572 jj_consume_token(NOT_EQUAL);
1573 operator = OperatorIds.DIF;
1575 case BANGDOUBLEEQUAL:
1576 jj_consume_token(BANGDOUBLEEQUAL);
1577 operator = OperatorIds.BANG_EQUAL_EQUAL;
1580 jj_consume_token(TRIPLEEQUAL);
1581 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1584 jj_la1[39] = jj_gen;
1585 jj_consume_token(-1);
1586 throw new ParseException();
1589 expr2 = RelationalExpression();
1590 } catch (ParseException e) {
1591 if (errorMessage != null) {
1592 {if (true) throw e;}
1594 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1596 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1597 errorEnd = SimpleCharStream.getPosition() + 1;
1598 {if (true) throw e;}
1600 expr = new BinaryExpression(expr,expr2,operator);
1602 {if (true) return expr;}
1603 throw new Error("Missing return statement in function");
1606 static final public Expression RelationalExpression() throws ParseException {
1607 Expression expr,expr2;
1609 expr = ShiftExpression();
1612 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1620 jj_la1[40] = jj_gen;
1623 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1625 jj_consume_token(LT);
1626 operator = OperatorIds.LESS;
1629 jj_consume_token(GT);
1630 operator = OperatorIds.GREATER;
1633 jj_consume_token(LE);
1634 operator = OperatorIds.LESS_EQUAL;
1637 jj_consume_token(GE);
1638 operator = OperatorIds.GREATER_EQUAL;
1641 jj_la1[41] = jj_gen;
1642 jj_consume_token(-1);
1643 throw new ParseException();
1645 expr2 = ShiftExpression();
1646 expr = new BinaryExpression(expr,expr2,operator);
1648 {if (true) return expr;}
1649 throw new Error("Missing return statement in function");
1652 static final public Expression ShiftExpression() throws ParseException {
1653 Expression expr,expr2;
1655 expr = AdditiveExpression();
1658 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1661 case RUNSIGNEDSHIFT:
1665 jj_la1[42] = jj_gen;
1668 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1670 jj_consume_token(LSHIFT);
1671 operator = OperatorIds.LEFT_SHIFT;
1674 jj_consume_token(RSIGNEDSHIFT);
1675 operator = OperatorIds.RIGHT_SHIFT;
1677 case RUNSIGNEDSHIFT:
1678 jj_consume_token(RUNSIGNEDSHIFT);
1679 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1682 jj_la1[43] = jj_gen;
1683 jj_consume_token(-1);
1684 throw new ParseException();
1686 expr2 = AdditiveExpression();
1687 expr = new BinaryExpression(expr,expr2,operator);
1689 {if (true) return expr;}
1690 throw new Error("Missing return statement in function");
1693 static final public Expression AdditiveExpression() throws ParseException {
1694 Expression expr,expr2;
1696 expr = MultiplicativeExpression();
1699 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1705 jj_la1[44] = jj_gen;
1708 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1710 jj_consume_token(PLUS);
1711 operator = OperatorIds.PLUS;
1714 jj_consume_token(MINUS);
1715 operator = OperatorIds.MINUS;
1718 jj_la1[45] = jj_gen;
1719 jj_consume_token(-1);
1720 throw new ParseException();
1722 expr2 = MultiplicativeExpression();
1723 expr = new BinaryExpression(expr,expr2,operator);
1725 {if (true) return expr;}
1726 throw new Error("Missing return statement in function");
1729 static final public Expression MultiplicativeExpression() throws ParseException {
1730 Expression expr,expr2;
1733 expr = UnaryExpression();
1734 } catch (ParseException e) {
1735 if (errorMessage != null) {if (true) throw e;}
1736 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1738 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1739 errorEnd = SimpleCharStream.getPosition() + 1;
1740 {if (true) throw e;}
1744 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1751 jj_la1[46] = jj_gen;
1754 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1756 jj_consume_token(STAR);
1757 operator = OperatorIds.MULTIPLY;
1760 jj_consume_token(SLASH);
1761 operator = OperatorIds.DIVIDE;
1764 jj_consume_token(REMAINDER);
1765 operator = OperatorIds.REMAINDER;
1768 jj_la1[47] = jj_gen;
1769 jj_consume_token(-1);
1770 throw new ParseException();
1772 expr2 = UnaryExpression();
1773 expr = new BinaryExpression(expr,expr2,operator);
1775 {if (true) return expr;}
1776 throw new Error("Missing return statement in function");
1780 * An unary expression starting with @, & or nothing
1782 static final public Expression UnaryExpression() throws ParseException {
1784 final int pos = SimpleCharStream.getPosition();
1785 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1787 jj_consume_token(BIT_AND);
1788 expr = UnaryExpressionNoPrefix();
1789 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1803 case INTEGER_LITERAL:
1804 case FLOATING_POINT_LITERAL:
1805 case STRING_LITERAL:
1809 expr = AtUnaryExpression();
1810 {if (true) return expr;}
1813 jj_la1[48] = jj_gen;
1814 jj_consume_token(-1);
1815 throw new ParseException();
1817 throw new Error("Missing return statement in function");
1820 static final public Expression AtUnaryExpression() throws ParseException {
1822 final int pos = SimpleCharStream.getPosition();
1823 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1825 jj_consume_token(AT);
1826 expr = AtUnaryExpression();
1827 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,pos);}
1840 case INTEGER_LITERAL:
1841 case FLOATING_POINT_LITERAL:
1842 case STRING_LITERAL:
1846 expr = UnaryExpressionNoPrefix();
1847 {if (true) return expr;}
1850 jj_la1[49] = jj_gen;
1851 jj_consume_token(-1);
1852 throw new ParseException();
1854 throw new Error("Missing return statement in function");
1857 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
1860 final int pos = SimpleCharStream.getPosition();
1861 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1864 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1866 jj_consume_token(PLUS);
1867 operator = OperatorIds.PLUS;
1870 jj_consume_token(MINUS);
1871 operator = OperatorIds.MINUS;
1874 jj_la1[50] = jj_gen;
1875 jj_consume_token(-1);
1876 throw new ParseException();
1878 expr = UnaryExpression();
1879 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1883 expr = PreIncDecExpression();
1884 {if (true) return expr;}
1893 case INTEGER_LITERAL:
1894 case FLOATING_POINT_LITERAL:
1895 case STRING_LITERAL:
1899 expr = UnaryExpressionNotPlusMinus();
1900 {if (true) return expr;}
1903 jj_la1[51] = jj_gen;
1904 jj_consume_token(-1);
1905 throw new ParseException();
1907 throw new Error("Missing return statement in function");
1910 static final public Expression PreIncDecExpression() throws ParseException {
1911 final Expression expr;
1913 final int pos = SimpleCharStream.getPosition();
1914 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1916 jj_consume_token(INCR);
1917 operator = OperatorIds.PLUS_PLUS;
1920 jj_consume_token(DECR);
1921 operator = OperatorIds.MINUS_MINUS;
1924 jj_la1[52] = jj_gen;
1925 jj_consume_token(-1);
1926 throw new ParseException();
1928 expr = PrimaryExpression();
1929 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1930 throw new Error("Missing return statement in function");
1933 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
1935 final int pos = SimpleCharStream.getPosition();
1936 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1938 jj_consume_token(BANG);
1939 expr = UnaryExpression();
1940 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1943 jj_la1[53] = jj_gen;
1944 if (jj_2_4(2147483647)) {
1945 expr = CastExpression();
1946 {if (true) return expr;}
1948 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1954 expr = PostfixExpression();
1955 {if (true) return expr;}
1960 case INTEGER_LITERAL:
1961 case FLOATING_POINT_LITERAL:
1962 case STRING_LITERAL:
1964 {if (true) return expr;}
1967 jj_consume_token(LPAREN);
1968 expr = Expression();
1970 jj_consume_token(RPAREN);
1971 } catch (ParseException e) {
1972 errorMessage = "')' expected";
1974 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1975 errorEnd = SimpleCharStream.getPosition() + 1;
1976 {if (true) throw e;}
1978 {if (true) return expr;}
1981 jj_la1[54] = jj_gen;
1982 jj_consume_token(-1);
1983 throw new ParseException();
1987 throw new Error("Missing return statement in function");
1990 static final public CastExpression CastExpression() throws ParseException {
1991 final ConstantIdentifier type;
1992 final Expression expr;
1993 final int pos = SimpleCharStream.getPosition();
1994 jj_consume_token(LPAREN);
1995 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2008 jj_consume_token(ARRAY);
2009 type = new ConstantIdentifier(Types.ARRAY,pos,SimpleCharStream.getPosition());
2012 jj_la1[55] = jj_gen;
2013 jj_consume_token(-1);
2014 throw new ParseException();
2016 jj_consume_token(RPAREN);
2017 expr = UnaryExpression();
2018 {if (true) return new CastExpression(type,expr,pos,SimpleCharStream.getPosition());}
2019 throw new Error("Missing return statement in function");
2022 static final public Expression PostfixExpression() throws ParseException {
2025 final int pos = SimpleCharStream.getPosition();
2026 expr = PrimaryExpression();
2027 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2030 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2032 jj_consume_token(INCR);
2033 operator = OperatorIds.PLUS_PLUS;
2036 jj_consume_token(DECR);
2037 operator = OperatorIds.MINUS_MINUS;
2040 jj_la1[56] = jj_gen;
2041 jj_consume_token(-1);
2042 throw new ParseException();
2046 jj_la1[57] = jj_gen;
2049 if (operator == -1) {
2050 {if (true) return expr;}
2052 {if (true) return new PostfixedUnaryExpression(expr,operator,pos);}
2053 throw new Error("Missing return statement in function");
2056 static final public Expression PrimaryExpression() throws ParseException {
2057 final Token identifier;
2059 final int pos = SimpleCharStream.getPosition();
2061 identifier = jj_consume_token(IDENTIFIER);
2062 jj_consume_token(STATICCLASSACCESS);
2063 expr = ClassIdentifier();
2064 expr = new ClassAccess(new ConstantIdentifier(identifier.image.toCharArray(),
2066 SimpleCharStream.getPosition()),
2068 ClassAccess.STATIC);
2071 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2078 jj_la1[58] = jj_gen;
2081 expr = PrimarySuffix(expr);
2083 {if (true) return expr;}
2085 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2090 expr = PrimaryPrefix();
2093 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2100 jj_la1[59] = jj_gen;
2103 expr = PrimarySuffix(expr);
2105 {if (true) return expr;}
2108 expr = ArrayDeclarator();
2109 {if (true) return expr;}
2112 jj_la1[60] = jj_gen;
2113 jj_consume_token(-1);
2114 throw new ParseException();
2117 throw new Error("Missing return statement in function");
2120 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2121 final ArrayVariableDeclaration[] vars;
2122 final int pos = SimpleCharStream.getPosition();
2123 jj_consume_token(ARRAY);
2124 vars = ArrayInitializer();
2125 {if (true) return new ArrayInitializer(vars,pos,SimpleCharStream.getPosition());}
2126 throw new Error("Missing return statement in function");
2129 static final public Expression PrimaryPrefix() throws ParseException {
2130 final Expression expr;
2133 final int pos = SimpleCharStream.getPosition();
2134 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2136 token = jj_consume_token(IDENTIFIER);
2137 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2139 SimpleCharStream.getPosition());}
2142 jj_consume_token(NEW);
2143 expr = ClassIdentifier();
2144 {if (true) return new PrefixedUnaryExpression(expr,
2150 var = VariableDeclaratorId();
2151 {if (true) return new ConstantIdentifier(var.toCharArray(),
2153 SimpleCharStream.getPosition());}
2156 jj_la1[61] = jj_gen;
2157 jj_consume_token(-1);
2158 throw new ParseException();
2160 throw new Error("Missing return statement in function");
2163 static final public PrefixedUnaryExpression classInstantiation() throws ParseException {
2165 final StringBuffer buff;
2166 final int pos = SimpleCharStream.getPosition();
2167 jj_consume_token(NEW);
2168 expr = ClassIdentifier();
2169 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2175 buff = new StringBuffer(expr.toStringExpression());
2176 expr = PrimaryExpression();
2177 buff.append(expr.toStringExpression());
2178 expr = new ConstantIdentifier(buff.toString().toCharArray(),
2180 SimpleCharStream.getPosition());
2183 jj_la1[62] = jj_gen;
2186 {if (true) return new PrefixedUnaryExpression(expr,
2189 throw new Error("Missing return statement in function");
2192 static final public ConstantIdentifier ClassIdentifier() throws ParseException {
2195 final int pos = SimpleCharStream.getPosition();
2196 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2198 token = jj_consume_token(IDENTIFIER);
2199 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2201 SimpleCharStream.getPosition());}
2205 expr = VariableDeclaratorId();
2206 {if (true) return new ConstantIdentifier(expr.toCharArray(),
2208 SimpleCharStream.getPosition());}
2211 jj_la1[63] = jj_gen;
2212 jj_consume_token(-1);
2213 throw new ParseException();
2215 throw new Error("Missing return statement in function");
2218 static final public AbstractSuffixExpression PrimarySuffix(Expression prefix) throws ParseException {
2219 final AbstractSuffixExpression expr;
2220 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2222 expr = Arguments(prefix);
2223 {if (true) return expr;}
2227 expr = VariableSuffix(prefix);
2228 {if (true) return expr;}
2231 jj_la1[64] = jj_gen;
2232 jj_consume_token(-1);
2233 throw new ParseException();
2235 throw new Error("Missing return statement in function");
2238 static final public AbstractSuffixExpression VariableSuffix(Expression prefix) throws ParseException {
2240 final int pos = SimpleCharStream.getPosition();
2241 Expression expression = null;
2242 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2244 jj_consume_token(CLASSACCESS);
2246 expr = VariableName();
2247 } catch (ParseException e) {
2248 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2250 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2251 errorEnd = SimpleCharStream.getPosition() + 1;
2252 {if (true) throw e;}
2254 {if (true) return new ClassAccess(prefix,
2255 new ConstantIdentifier(expr.toCharArray(),pos,SimpleCharStream.getPosition()),
2256 ClassAccess.NORMAL);}
2259 jj_consume_token(LBRACKET);
2260 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2285 case INTEGER_LITERAL:
2286 case FLOATING_POINT_LITERAL:
2287 case STRING_LITERAL:
2291 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2307 case INTEGER_LITERAL:
2308 case FLOATING_POINT_LITERAL:
2309 case STRING_LITERAL:
2313 expression = Expression();
2324 expression = Type();
2327 jj_la1[65] = jj_gen;
2328 jj_consume_token(-1);
2329 throw new ParseException();
2333 jj_la1[66] = jj_gen;
2337 jj_consume_token(RBRACKET);
2338 } catch (ParseException e) {
2339 errorMessage = "']' expected";
2341 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2342 errorEnd = SimpleCharStream.getPosition() + 1;
2343 {if (true) throw e;}
2345 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2348 jj_la1[67] = jj_gen;
2349 jj_consume_token(-1);
2350 throw new ParseException();
2352 throw new Error("Missing return statement in function");
2355 static final public Literal Literal() throws ParseException {
2358 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2359 case INTEGER_LITERAL:
2360 token = jj_consume_token(INTEGER_LITERAL);
2361 pos = SimpleCharStream.getPosition();
2362 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2364 case FLOATING_POINT_LITERAL:
2365 token = jj_consume_token(FLOATING_POINT_LITERAL);
2366 pos = SimpleCharStream.getPosition();
2367 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2369 case STRING_LITERAL:
2370 token = jj_consume_token(STRING_LITERAL);
2371 pos = SimpleCharStream.getPosition();
2372 {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length());}
2375 jj_consume_token(TRUE);
2376 pos = SimpleCharStream.getPosition();
2377 {if (true) return new TrueLiteral(pos-4,pos);}
2380 jj_consume_token(FALSE);
2381 pos = SimpleCharStream.getPosition();
2382 {if (true) return new FalseLiteral(pos-4,pos);}
2385 jj_consume_token(NULL);
2386 pos = SimpleCharStream.getPosition();
2387 {if (true) return new NullLiteral(pos-4,pos);}
2390 jj_la1[68] = jj_gen;
2391 jj_consume_token(-1);
2392 throw new ParseException();
2394 throw new Error("Missing return statement in function");
2397 static final public FunctionCall Arguments(Expression func) throws ParseException {
2398 Expression[] args = null;
2399 jj_consume_token(LPAREN);
2400 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2416 case INTEGER_LITERAL:
2417 case FLOATING_POINT_LITERAL:
2418 case STRING_LITERAL:
2422 args = ArgumentList();
2425 jj_la1[69] = jj_gen;
2429 jj_consume_token(RPAREN);
2430 } catch (ParseException e) {
2431 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2433 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2434 errorEnd = SimpleCharStream.getPosition() + 1;
2435 {if (true) throw e;}
2437 {if (true) return new FunctionCall(func,args,SimpleCharStream.getPosition());}
2438 throw new Error("Missing return statement in function");
2442 * An argument list is a list of arguments separated by comma :
2443 * argumentDeclaration() (, argumentDeclaration)*
2444 * @return an array of arguments
2446 static final public Expression[] ArgumentList() throws ParseException {
2448 final ArrayList list = new ArrayList();
2453 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2458 jj_la1[70] = jj_gen;
2461 jj_consume_token(COMMA);
2465 } catch (ParseException e) {
2466 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2468 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2469 errorEnd = SimpleCharStream.getPosition() + 1;
2470 {if (true) throw e;}
2473 Expression[] arguments = new Expression[list.size()];
2474 list.toArray(arguments);
2475 {if (true) return arguments;}
2476 throw new Error("Missing return statement in function");
2480 * A Statement without break.
2482 static final public Statement StatementNoBreak() throws ParseException {
2483 final Statement statement;
2486 statement = Expression();
2488 jj_consume_token(SEMICOLON);
2489 } catch (ParseException e) {
2490 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2491 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2493 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2494 errorEnd = SimpleCharStream.getPosition() + 1;
2495 {if (true) throw e;}
2498 {if (true) return statement;}
2499 } else if (jj_2_7(2)) {
2500 statement = LabeledStatement();
2501 {if (true) return statement;}
2503 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2505 statement = Block();
2506 {if (true) return statement;}
2509 statement = EmptyStatement();
2510 {if (true) return statement;}
2519 statement = StatementExpression();
2521 jj_consume_token(SEMICOLON);
2522 } catch (ParseException e) {
2523 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2525 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2526 errorEnd = SimpleCharStream.getPosition() + 1;
2527 {if (true) throw e;}
2529 {if (true) return statement;}
2532 statement = SwitchStatement();
2533 {if (true) return statement;}
2536 statement = IfStatement();
2537 {if (true) return statement;}
2540 statement = WhileStatement();
2541 {if (true) return statement;}
2544 statement = DoStatement();
2545 {if (true) return statement;}
2548 statement = ForStatement();
2549 {if (true) return statement;}
2552 statement = ForeachStatement();
2553 {if (true) return statement;}
2556 statement = ContinueStatement();
2557 {if (true) return statement;}
2560 statement = ReturnStatement();
2561 {if (true) return statement;}
2564 statement = EchoStatement();
2565 {if (true) return statement;}
2572 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2574 token = jj_consume_token(AT);
2577 jj_la1[71] = jj_gen;
2580 statement = IncludeStatement();
2581 if (token != null) {
2582 ((InclusionStatement)statement).silent = true;
2584 {if (true) return statement;}
2587 statement = StaticStatement();
2588 {if (true) return statement;}
2591 statement = GlobalStatement();
2592 {if (true) return statement;}
2595 jj_la1[72] = jj_gen;
2596 jj_consume_token(-1);
2597 throw new ParseException();
2600 throw new Error("Missing return statement in function");
2604 * A Normal statement.
2606 static final public Statement Statement() throws ParseException {
2607 final Statement statement;
2608 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2639 case INTEGER_LITERAL:
2640 case FLOATING_POINT_LITERAL:
2641 case STRING_LITERAL:
2647 statement = StatementNoBreak();
2648 {if (true) return statement;}
2651 statement = BreakStatement();
2652 {if (true) return statement;}
2655 jj_la1[73] = jj_gen;
2656 jj_consume_token(-1);
2657 throw new ParseException();
2659 throw new Error("Missing return statement in function");
2663 * An html block inside a php syntax.
2665 static final public HTMLBlock htmlBlock() throws ParseException {
2666 final int startIndex = nodePtr;
2667 AstNode[] blockNodes;
2669 jj_consume_token(PHPEND);
2672 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2677 jj_la1[74] = jj_gen;
2683 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2685 jj_consume_token(PHPSTARTLONG);
2688 jj_consume_token(PHPSTARTSHORT);
2691 jj_la1[75] = jj_gen;
2692 jj_consume_token(-1);
2693 throw new ParseException();
2695 } catch (ParseException e) {
2696 errorMessage = "End of file unexpected, '<?php' expected";
2698 errorStart = SimpleCharStream.getPosition();
2699 errorEnd = SimpleCharStream.getPosition();
2700 {if (true) throw e;}
2702 nbNodes = nodePtr - startIndex;
2703 blockNodes = new AstNode[nbNodes];
2704 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2705 nodePtr = startIndex;
2706 {if (true) return new HTMLBlock(blockNodes);}
2707 throw new Error("Missing return statement in function");
2711 * An include statement. It's "include" an expression;
2713 static final public InclusionStatement IncludeStatement() throws ParseException {
2714 final Expression expr;
2716 final int pos = SimpleCharStream.getPosition();
2717 final InclusionStatement inclusionStatement;
2718 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2720 jj_consume_token(REQUIRE);
2721 keyword = InclusionStatement.REQUIRE;
2724 jj_consume_token(REQUIRE_ONCE);
2725 keyword = InclusionStatement.REQUIRE_ONCE;
2728 jj_consume_token(INCLUDE);
2729 keyword = InclusionStatement.INCLUDE;
2732 jj_consume_token(INCLUDE_ONCE);
2733 keyword = InclusionStatement.INCLUDE_ONCE;
2736 jj_la1[76] = jj_gen;
2737 jj_consume_token(-1);
2738 throw new ParseException();
2741 expr = Expression();
2742 } catch (ParseException e) {
2743 if (errorMessage != null) {
2744 {if (true) throw e;}
2746 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
2748 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2749 errorEnd = SimpleCharStream.getPosition() + 1;
2750 {if (true) throw e;}
2752 inclusionStatement = new InclusionStatement(currentSegment,
2756 currentSegment.add(inclusionStatement);
2758 jj_consume_token(SEMICOLON);
2759 } catch (ParseException e) {
2760 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2762 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2763 errorEnd = SimpleCharStream.getPosition() + 1;
2764 {if (true) throw e;}
2766 {if (true) return inclusionStatement;}
2767 throw new Error("Missing return statement in function");
2770 static final public PrintExpression PrintExpression() throws ParseException {
2771 final Expression expr;
2772 final int pos = SimpleCharStream.getPosition();
2773 jj_consume_token(PRINT);
2774 expr = Expression();
2775 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
2776 throw new Error("Missing return statement in function");
2779 static final public ListExpression ListExpression() throws ParseException {
2781 Expression expression = null;
2782 ArrayList list = new ArrayList();
2783 final int pos = SimpleCharStream.getPosition();
2784 jj_consume_token(LIST);
2786 jj_consume_token(LPAREN);
2787 } catch (ParseException e) {
2788 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2790 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2791 errorEnd = SimpleCharStream.getPosition() + 1;
2792 {if (true) throw e;}
2794 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2797 expr = VariableDeclaratorId();
2801 jj_la1[77] = jj_gen;
2804 if (expr == null) list.add(null);
2807 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2812 jj_la1[78] = jj_gen;
2816 jj_consume_token(COMMA);
2817 } catch (ParseException e) {
2818 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2820 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2821 errorEnd = SimpleCharStream.getPosition() + 1;
2822 {if (true) throw e;}
2824 expr = VariableDeclaratorId();
2828 jj_consume_token(RPAREN);
2829 } catch (ParseException e) {
2830 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2832 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2833 errorEnd = SimpleCharStream.getPosition() + 1;
2834 {if (true) throw e;}
2836 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2838 jj_consume_token(ASSIGN);
2839 expression = Expression();
2840 String[] strings = new String[list.size()];
2841 list.toArray(strings);
2842 {if (true) return new ListExpression(strings,
2845 SimpleCharStream.getPosition());}
2848 jj_la1[79] = jj_gen;
2851 String[] strings = new String[list.size()];
2852 list.toArray(strings);
2853 {if (true) return new ListExpression(strings,pos,SimpleCharStream.getPosition());}
2854 throw new Error("Missing return statement in function");
2858 * An echo statement.
2859 * echo anyexpression (, otherexpression)*
2861 static final public EchoStatement EchoStatement() throws ParseException {
2862 final ArrayList expressions = new ArrayList();
2864 final int pos = SimpleCharStream.getPosition();
2865 jj_consume_token(ECHO);
2866 expr = Expression();
2867 expressions.add(expr);
2870 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2875 jj_la1[80] = jj_gen;
2878 jj_consume_token(COMMA);
2879 expr = Expression();
2880 expressions.add(expr);
2883 jj_consume_token(SEMICOLON);
2884 } catch (ParseException e) {
2885 if (e.currentToken.next.kind != 4) {
2886 errorMessage = "';' expected after 'echo' statement";
2888 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2889 errorEnd = SimpleCharStream.getPosition() + 1;
2890 {if (true) throw e;}
2893 Expression[] exprs = new Expression[expressions.size()];
2894 expressions.toArray(exprs);
2895 {if (true) return new EchoStatement(exprs,pos);}
2896 throw new Error("Missing return statement in function");
2899 static final public GlobalStatement GlobalStatement() throws ParseException {
2900 final int pos = SimpleCharStream.getPosition();
2902 ArrayList vars = new ArrayList();
2903 GlobalStatement global;
2904 jj_consume_token(GLOBAL);
2905 expr = VariableDeclaratorId();
2909 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2914 jj_la1[81] = jj_gen;
2917 jj_consume_token(COMMA);
2918 expr = VariableDeclaratorId();
2922 jj_consume_token(SEMICOLON);
2923 String[] strings = new String[vars.size()];
2924 vars.toArray(strings);
2925 global = new GlobalStatement(currentSegment,
2928 SimpleCharStream.getPosition());
2929 currentSegment.add(global);
2930 {if (true) return global;}
2931 } catch (ParseException e) {
2932 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
2934 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2935 errorEnd = SimpleCharStream.getPosition() + 1;
2936 {if (true) throw e;}
2938 throw new Error("Missing return statement in function");
2941 static final public StaticStatement StaticStatement() throws ParseException {
2942 final int pos = SimpleCharStream.getPosition();
2943 final ArrayList vars = new ArrayList();
2944 VariableDeclaration expr;
2945 jj_consume_token(STATIC);
2946 expr = VariableDeclarator();
2947 vars.add(new String(expr.name));
2950 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2955 jj_la1[82] = jj_gen;
2958 jj_consume_token(COMMA);
2959 expr = VariableDeclarator();
2960 vars.add(new String(expr.name));
2963 jj_consume_token(SEMICOLON);
2964 String[] strings = new String[vars.size()];
2965 vars.toArray(strings);
2966 {if (true) return new StaticStatement(strings,
2968 SimpleCharStream.getPosition());}
2969 } catch (ParseException e) {
2970 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
2972 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2973 errorEnd = SimpleCharStream.getPosition() + 1;
2974 {if (true) throw e;}
2976 throw new Error("Missing return statement in function");
2979 static final public LabeledStatement LabeledStatement() throws ParseException {
2980 final int pos = SimpleCharStream.getPosition();
2982 final Statement statement;
2983 label = jj_consume_token(IDENTIFIER);
2984 jj_consume_token(COLON);
2985 statement = Statement();
2986 {if (true) return new LabeledStatement(label.image.toCharArray(),statement,pos,SimpleCharStream.getPosition());}
2987 throw new Error("Missing return statement in function");
2997 static final public Block Block() throws ParseException {
2998 final int pos = SimpleCharStream.getPosition();
2999 final ArrayList list = new ArrayList();
3000 Statement statement;
3002 jj_consume_token(LBRACE);
3003 } catch (ParseException e) {
3004 errorMessage = "'{' expected";
3006 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3007 errorEnd = SimpleCharStream.getPosition() + 1;
3008 {if (true) throw e;}
3012 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3047 case INTEGER_LITERAL:
3048 case FLOATING_POINT_LITERAL:
3049 case STRING_LITERAL:
3058 jj_la1[83] = jj_gen;
3061 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3095 case INTEGER_LITERAL:
3096 case FLOATING_POINT_LITERAL:
3097 case STRING_LITERAL:
3103 statement = BlockStatement();
3104 list.add(statement);
3107 statement = htmlBlock();
3108 list.add(statement);
3111 jj_la1[84] = jj_gen;
3112 jj_consume_token(-1);
3113 throw new ParseException();
3117 jj_consume_token(RBRACE);
3118 } catch (ParseException e) {
3119 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3121 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3122 errorEnd = SimpleCharStream.getPosition() + 1;
3123 {if (true) throw e;}
3125 Statement[] statements = new Statement[list.size()];
3126 list.toArray(statements);
3127 {if (true) return new Block(statements,pos,SimpleCharStream.getPosition());}
3128 throw new Error("Missing return statement in function");
3131 static final public Statement BlockStatement() throws ParseException {
3132 final Statement statement;
3133 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3165 case INTEGER_LITERAL:
3166 case FLOATING_POINT_LITERAL:
3167 case STRING_LITERAL:
3174 statement = Statement();
3175 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3176 {if (true) return statement;}
3177 } catch (ParseException e) {
3178 errorMessage = "statement expected";
3180 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3181 errorEnd = SimpleCharStream.getPosition() + 1;
3182 {if (true) throw e;}
3186 statement = ClassDeclaration();
3187 {if (true) return statement;}
3190 statement = MethodDeclaration();
3191 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3192 {if (true) return statement;}
3195 jj_la1[85] = jj_gen;
3196 jj_consume_token(-1);
3197 throw new ParseException();
3199 throw new Error("Missing return statement in function");
3203 * A Block statement that will not contain any 'break'
3205 static final public Statement BlockStatementNoBreak() throws ParseException {
3206 final Statement statement;
3207 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3238 case INTEGER_LITERAL:
3239 case FLOATING_POINT_LITERAL:
3240 case STRING_LITERAL:
3246 statement = StatementNoBreak();
3247 {if (true) return statement;}
3250 statement = ClassDeclaration();
3251 {if (true) return statement;}
3254 statement = MethodDeclaration();
3255 {if (true) return statement;}
3258 jj_la1[86] = jj_gen;
3259 jj_consume_token(-1);
3260 throw new ParseException();
3262 throw new Error("Missing return statement in function");
3265 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3266 final ArrayList list = new ArrayList();
3267 VariableDeclaration var;
3268 var = LocalVariableDeclarator();
3272 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3277 jj_la1[87] = jj_gen;
3280 jj_consume_token(COMMA);
3281 var = LocalVariableDeclarator();
3284 VariableDeclaration[] vars = new VariableDeclaration[list.size()];
3286 {if (true) return vars;}
3287 throw new Error("Missing return statement in function");
3290 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3291 final String varName;
3292 Expression initializer = null;
3293 final int pos = SimpleCharStream.getPosition();
3294 varName = VariableDeclaratorId();
3295 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3297 jj_consume_token(ASSIGN);
3298 initializer = Expression();
3301 jj_la1[88] = jj_gen;
3304 if (initializer == null) {
3305 {if (true) return new VariableDeclaration(currentSegment,
3306 varName.toCharArray(),
3308 SimpleCharStream.getPosition());}
3310 {if (true) return new VariableDeclaration(currentSegment,
3311 varName.toCharArray(),
3314 throw new Error("Missing return statement in function");
3317 static final public EmptyStatement EmptyStatement() throws ParseException {
3319 jj_consume_token(SEMICOLON);
3320 pos = SimpleCharStream.getPosition();
3321 {if (true) return new EmptyStatement(pos-1,pos);}
3322 throw new Error("Missing return statement in function");
3325 static final public Statement StatementExpression() throws ParseException {
3326 Expression expr,expr2;
3328 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3331 expr = PreIncDecExpression();
3332 {if (true) return expr;}
3339 expr = PrimaryExpression();
3340 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3355 case RSIGNEDSHIFTASSIGN:
3356 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3358 jj_consume_token(INCR);
3359 {if (true) return new PostfixedUnaryExpression(expr,
3360 OperatorIds.PLUS_PLUS,
3361 SimpleCharStream.getPosition());}
3364 jj_consume_token(DECR);
3365 {if (true) return new PostfixedUnaryExpression(expr,
3366 OperatorIds.MINUS_MINUS,
3367 SimpleCharStream.getPosition());}
3381 case RSIGNEDSHIFTASSIGN:
3382 operator = AssignmentOperator();
3383 expr2 = Expression();
3384 {if (true) return new BinaryExpression(expr,expr2,operator);}
3387 jj_la1[89] = jj_gen;
3388 jj_consume_token(-1);
3389 throw new ParseException();
3393 jj_la1[90] = jj_gen;
3396 {if (true) return expr;}
3399 jj_la1[91] = jj_gen;
3400 jj_consume_token(-1);
3401 throw new ParseException();
3403 throw new Error("Missing return statement in function");
3406 static final public SwitchStatement SwitchStatement() throws ParseException {
3407 final Expression variable;
3408 final AbstractCase[] cases;
3409 final int pos = SimpleCharStream.getPosition();
3410 jj_consume_token(SWITCH);
3412 jj_consume_token(LPAREN);
3413 } catch (ParseException e) {
3414 errorMessage = "'(' expected after 'switch'";
3416 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3417 errorEnd = SimpleCharStream.getPosition() + 1;
3418 {if (true) throw e;}
3421 variable = Expression();
3422 } catch (ParseException e) {
3423 if (errorMessage != null) {
3424 {if (true) throw e;}
3426 errorMessage = "expression expected";
3428 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3429 errorEnd = SimpleCharStream.getPosition() + 1;
3430 {if (true) throw e;}
3433 jj_consume_token(RPAREN);
3434 } catch (ParseException e) {
3435 errorMessage = "')' expected";
3437 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3438 errorEnd = SimpleCharStream.getPosition() + 1;
3439 {if (true) throw e;}
3441 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3443 cases = switchStatementBrace();
3446 cases = switchStatementColon(pos, pos + 6);
3449 jj_la1[92] = jj_gen;
3450 jj_consume_token(-1);
3451 throw new ParseException();
3453 {if (true) return new SwitchStatement(variable,cases,pos,SimpleCharStream.getPosition());}
3454 throw new Error("Missing return statement in function");
3457 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3459 final ArrayList cases = new ArrayList();
3460 jj_consume_token(LBRACE);
3463 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3469 jj_la1[93] = jj_gen;
3472 cas = switchLabel0();
3476 jj_consume_token(RBRACE);
3477 AbstractCase[] abcase = new AbstractCase[cases.size()];
3478 cases.toArray(abcase);
3479 {if (true) return abcase;}
3480 } catch (ParseException e) {
3481 errorMessage = "'}' expected";
3483 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3484 errorEnd = SimpleCharStream.getPosition() + 1;
3485 {if (true) throw e;}
3487 throw new Error("Missing return statement in function");
3491 * A Switch statement with : ... endswitch;
3492 * @param start the begin offset of the switch
3493 * @param end the end offset of the switch
3495 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3497 final ArrayList cases = new ArrayList();
3498 jj_consume_token(COLON);
3500 setMarker(fileToParse,
3501 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3505 "Line " + token.beginLine);
3506 } catch (CoreException e) {
3507 PHPeclipsePlugin.log(e);
3511 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3517 jj_la1[94] = jj_gen;
3520 cas = switchLabel0();
3524 jj_consume_token(ENDSWITCH);
3525 } catch (ParseException e) {
3526 errorMessage = "'endswitch' expected";
3528 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3529 errorEnd = SimpleCharStream.getPosition() + 1;
3530 {if (true) throw e;}
3533 jj_consume_token(SEMICOLON);
3534 AbstractCase[] abcase = new AbstractCase[cases.size()];
3535 cases.toArray(abcase);
3536 {if (true) return abcase;}
3537 } catch (ParseException e) {
3538 errorMessage = "';' expected after 'endswitch' keyword";
3540 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3541 errorEnd = SimpleCharStream.getPosition() + 1;
3542 {if (true) throw e;}
3544 throw new Error("Missing return statement in function");
3547 static final public AbstractCase switchLabel0() throws ParseException {
3548 final Expression expr;
3549 Statement statement;
3550 final ArrayList stmts = new ArrayList();
3551 final int pos = SimpleCharStream.getPosition();
3552 expr = SwitchLabel();
3555 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3589 case INTEGER_LITERAL:
3590 case FLOATING_POINT_LITERAL:
3591 case STRING_LITERAL:
3600 jj_la1[95] = jj_gen;
3603 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3636 case INTEGER_LITERAL:
3637 case FLOATING_POINT_LITERAL:
3638 case STRING_LITERAL:
3644 statement = BlockStatementNoBreak();
3645 stmts.add(statement);
3648 statement = htmlBlock();
3649 stmts.add(statement);
3652 jj_la1[96] = jj_gen;
3653 jj_consume_token(-1);
3654 throw new ParseException();
3657 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3659 statement = BreakStatement();
3660 stmts.add(statement);
3663 jj_la1[97] = jj_gen;
3666 Statement[] stmtsArray = new Statement[stmts.size()];
3667 stmts.toArray(stmtsArray);
3668 if (expr == null) {//it's a default
3669 {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3671 {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3672 throw new Error("Missing return statement in function");
3677 * case Expression() :
3679 * @return the if it was a case and null if not
3681 static final public Expression SwitchLabel() throws ParseException {
3682 final Expression expr;
3683 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3685 token = jj_consume_token(CASE);
3687 expr = Expression();
3688 } catch (ParseException e) {
3689 if (errorMessage != null) {if (true) throw e;}
3690 errorMessage = "expression expected after 'case' keyword";
3692 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3693 errorEnd = SimpleCharStream.getPosition() + 1;
3694 {if (true) throw e;}
3697 jj_consume_token(COLON);
3698 {if (true) return expr;}
3699 } catch (ParseException e) {
3700 errorMessage = "':' expected after case expression";
3702 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3703 errorEnd = SimpleCharStream.getPosition() + 1;
3704 {if (true) throw e;}
3708 token = jj_consume_token(_DEFAULT);
3710 jj_consume_token(COLON);
3711 {if (true) return null;}
3712 } catch (ParseException e) {
3713 errorMessage = "':' expected after 'default' keyword";
3715 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3716 errorEnd = SimpleCharStream.getPosition() + 1;
3717 {if (true) throw e;}
3721 jj_la1[98] = jj_gen;
3722 jj_consume_token(-1);
3723 throw new ParseException();
3725 throw new Error("Missing return statement in function");
3728 static final public Break BreakStatement() throws ParseException {
3729 Expression expression = null;
3730 final int start = SimpleCharStream.getPosition();
3731 jj_consume_token(BREAK);
3732 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3748 case INTEGER_LITERAL:
3749 case FLOATING_POINT_LITERAL:
3750 case STRING_LITERAL:
3754 expression = Expression();
3757 jj_la1[99] = jj_gen;
3761 jj_consume_token(SEMICOLON);
3762 } catch (ParseException e) {
3763 errorMessage = "';' expected after 'break' keyword";
3765 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3766 errorEnd = SimpleCharStream.getPosition() + 1;
3767 {if (true) throw e;}
3769 {if (true) return new Break(expression, start, SimpleCharStream.getPosition());}
3770 throw new Error("Missing return statement in function");
3773 static final public IfStatement IfStatement() throws ParseException {
3774 final int pos = SimpleCharStream.getPosition();
3775 Expression condition;
3776 IfStatement ifStatement;
3777 jj_consume_token(IF);
3778 condition = Condition("if");
3779 ifStatement = IfStatement0(condition, pos,pos+2);
3780 {if (true) return ifStatement;}
3781 throw new Error("Missing return statement in function");
3784 static final public Expression Condition(final String keyword) throws ParseException {
3785 final Expression condition;
3787 jj_consume_token(LPAREN);
3788 } catch (ParseException e) {
3789 errorMessage = "'(' expected after " + keyword + " keyword";
3791 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length();
3792 errorEnd = errorStart +1;
3793 processParseException(e);
3795 condition = Expression();
3797 jj_consume_token(RPAREN);
3798 } catch (ParseException e) {
3799 errorMessage = "')' expected after " + keyword + " keyword";
3801 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3802 errorEnd = SimpleCharStream.getPosition() + 1;
3803 processParseException(e);
3805 {if (true) return condition;}
3806 throw new Error("Missing return statement in function");
3809 static final public IfStatement IfStatement0(Expression condition, final int start,final int end) throws ParseException {
3810 Statement statement;
3812 final Statement[] statementsArray;
3813 ElseIf elseifStatement;
3814 Else elseStatement = null;
3816 final ArrayList elseIfList = new ArrayList();
3818 int pos = SimpleCharStream.getPosition();
3820 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3822 jj_consume_token(COLON);
3823 stmts = new ArrayList();
3826 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3859 case INTEGER_LITERAL:
3860 case FLOATING_POINT_LITERAL:
3861 case STRING_LITERAL:
3870 jj_la1[100] = jj_gen;
3873 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3905 case INTEGER_LITERAL:
3906 case FLOATING_POINT_LITERAL:
3907 case STRING_LITERAL:
3913 statement = Statement();
3914 stmts.add(statement);
3917 statement = htmlBlock();
3918 stmts.add(statement);
3921 jj_la1[101] = jj_gen;
3922 jj_consume_token(-1);
3923 throw new ParseException();
3926 endStatements = SimpleCharStream.getPosition();
3929 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3934 jj_la1[102] = jj_gen;
3937 elseifStatement = ElseIfStatementColon();
3938 elseIfList.add(elseifStatement);
3940 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3942 elseStatement = ElseStatementColon();
3945 jj_la1[103] = jj_gen;
3949 setMarker(fileToParse,
3950 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
3954 "Line " + token.beginLine);
3955 } catch (CoreException e) {
3956 PHPeclipsePlugin.log(e);
3959 jj_consume_token(ENDIF);
3960 } catch (ParseException e) {
3961 errorMessage = "'endif' expected";
3963 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3964 errorEnd = SimpleCharStream.getPosition() + 1;
3965 {if (true) throw e;}
3968 jj_consume_token(SEMICOLON);
3969 } catch (ParseException e) {
3970 errorMessage = "';' expected after 'endif' keyword";
3972 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3973 errorEnd = SimpleCharStream.getPosition() + 1;
3974 {if (true) throw e;}
3976 elseIfs = new ElseIf[elseIfList.size()];
3977 elseIfList.toArray(elseIfs);
3978 if (stmts.size() == 1) {
3979 {if (true) return new IfStatement(condition,
3980 (Statement) stmts.get(0),
3984 SimpleCharStream.getPosition());}
3986 statementsArray = new Statement[stmts.size()];
3987 stmts.toArray(statementsArray);
3988 {if (true) return new IfStatement(condition,
3989 new Block(statementsArray,pos,endStatements),
3993 SimpleCharStream.getPosition());}
4028 case INTEGER_LITERAL:
4029 case FLOATING_POINT_LITERAL:
4030 case STRING_LITERAL:
4036 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4068 case INTEGER_LITERAL:
4069 case FLOATING_POINT_LITERAL:
4070 case STRING_LITERAL:
4082 jj_la1[104] = jj_gen;
4083 jj_consume_token(-1);
4084 throw new ParseException();
4088 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4093 jj_la1[105] = jj_gen;
4096 elseifStatement = ElseIfStatement();
4097 elseIfList.add(elseifStatement);
4099 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4101 jj_consume_token(ELSE);
4103 pos = SimpleCharStream.getPosition();
4104 statement = Statement();
4105 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4106 } catch (ParseException e) {
4107 if (errorMessage != null) {
4108 {if (true) throw e;}
4110 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4112 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4113 errorEnd = SimpleCharStream.getPosition() + 1;
4114 {if (true) throw e;}
4118 jj_la1[106] = jj_gen;
4121 elseIfs = new ElseIf[elseIfList.size()];
4122 elseIfList.toArray(elseIfs);
4123 {if (true) return new IfStatement(condition,
4128 SimpleCharStream.getPosition());}
4131 jj_la1[107] = jj_gen;
4132 jj_consume_token(-1);
4133 throw new ParseException();
4135 throw new Error("Missing return statement in function");
4138 static final public ElseIf ElseIfStatementColon() throws ParseException {
4139 Expression condition;
4140 Statement statement;
4141 final ArrayList list = new ArrayList();
4142 final int pos = SimpleCharStream.getPosition();
4143 jj_consume_token(ELSEIF);
4144 condition = Condition("elseif");
4145 jj_consume_token(COLON);
4148 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4181 case INTEGER_LITERAL:
4182 case FLOATING_POINT_LITERAL:
4183 case STRING_LITERAL:
4192 jj_la1[108] = jj_gen;
4195 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4227 case INTEGER_LITERAL:
4228 case FLOATING_POINT_LITERAL:
4229 case STRING_LITERAL:
4235 statement = Statement();
4236 list.add(statement);
4239 statement = htmlBlock();
4240 list.add(statement);
4243 jj_la1[109] = jj_gen;
4244 jj_consume_token(-1);
4245 throw new ParseException();
4248 Statement[] stmtsArray = new Statement[list.size()];
4249 list.toArray(stmtsArray);
4250 {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4251 throw new Error("Missing return statement in function");
4254 static final public Else ElseStatementColon() throws ParseException {
4255 Statement statement;
4256 final ArrayList list = new ArrayList();
4257 final int pos = SimpleCharStream.getPosition();
4258 jj_consume_token(ELSE);
4259 jj_consume_token(COLON);
4262 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4295 case INTEGER_LITERAL:
4296 case FLOATING_POINT_LITERAL:
4297 case STRING_LITERAL:
4306 jj_la1[110] = jj_gen;
4309 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4341 case INTEGER_LITERAL:
4342 case FLOATING_POINT_LITERAL:
4343 case STRING_LITERAL:
4349 statement = Statement();
4350 list.add(statement);
4353 statement = htmlBlock();
4354 list.add(statement);
4357 jj_la1[111] = jj_gen;
4358 jj_consume_token(-1);
4359 throw new ParseException();
4362 Statement[] stmtsArray = new Statement[list.size()];
4363 list.toArray(stmtsArray);
4364 {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4365 throw new Error("Missing return statement in function");
4368 static final public ElseIf ElseIfStatement() throws ParseException {
4369 Expression condition;
4370 Statement statement;
4371 final ArrayList list = new ArrayList();
4372 final int pos = SimpleCharStream.getPosition();
4373 jj_consume_token(ELSEIF);
4374 condition = Condition("elseif");
4375 statement = Statement();
4376 list.add(statement);/*todo:do better*/
4377 Statement[] stmtsArray = new Statement[list.size()];
4378 list.toArray(stmtsArray);
4379 {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4380 throw new Error("Missing return statement in function");
4383 static final public WhileStatement WhileStatement() throws ParseException {
4384 final Expression condition;
4385 final Statement action;
4386 final int pos = SimpleCharStream.getPosition();
4387 jj_consume_token(WHILE);
4388 condition = Condition("while");
4389 action = WhileStatement0(pos,pos + 5);
4390 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4391 throw new Error("Missing return statement in function");
4394 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4395 Statement statement;
4396 final ArrayList stmts = new ArrayList();
4397 final int pos = SimpleCharStream.getPosition();
4398 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4400 jj_consume_token(COLON);
4403 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4435 case INTEGER_LITERAL:
4436 case FLOATING_POINT_LITERAL:
4437 case STRING_LITERAL:
4446 jj_la1[112] = jj_gen;
4449 statement = Statement();
4450 stmts.add(statement);
4453 setMarker(fileToParse,
4454 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4458 "Line " + token.beginLine);
4459 } catch (CoreException e) {
4460 PHPeclipsePlugin.log(e);
4463 jj_consume_token(ENDWHILE);
4464 } catch (ParseException e) {
4465 errorMessage = "'endwhile' expected";
4467 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4468 errorEnd = SimpleCharStream.getPosition() + 1;
4469 {if (true) throw e;}
4472 jj_consume_token(SEMICOLON);
4473 Statement[] stmtsArray = new Statement[stmts.size()];
4474 stmts.toArray(stmtsArray);
4475 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4476 } catch (ParseException e) {
4477 errorMessage = "';' expected after 'endwhile' keyword";
4479 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4480 errorEnd = SimpleCharStream.getPosition() + 1;
4481 {if (true) throw e;}
4515 case INTEGER_LITERAL:
4516 case FLOATING_POINT_LITERAL:
4517 case STRING_LITERAL:
4523 statement = Statement();
4524 {if (true) return statement;}
4527 jj_la1[113] = jj_gen;
4528 jj_consume_token(-1);
4529 throw new ParseException();
4531 throw new Error("Missing return statement in function");
4534 static final public DoStatement DoStatement() throws ParseException {
4535 final Statement action;
4536 final Expression condition;
4537 final int pos = SimpleCharStream.getPosition();
4538 jj_consume_token(DO);
4539 action = Statement();
4540 jj_consume_token(WHILE);
4541 condition = Condition("while");
4543 jj_consume_token(SEMICOLON);
4544 {if (true) return new DoStatement(condition,action,pos,SimpleCharStream.getPosition());}
4545 } catch (ParseException e) {
4546 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4548 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4549 errorEnd = SimpleCharStream.getPosition() + 1;
4550 {if (true) throw e;}
4552 throw new Error("Missing return statement in function");
4555 static final public ForeachStatement ForeachStatement() throws ParseException {
4556 Statement statement;
4557 Expression expression;
4558 final int pos = SimpleCharStream.getPosition();
4559 ArrayVariableDeclaration variable;
4560 jj_consume_token(FOREACH);
4562 jj_consume_token(LPAREN);
4563 } catch (ParseException e) {
4564 errorMessage = "'(' expected after 'foreach' keyword";
4566 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4567 errorEnd = SimpleCharStream.getPosition() + 1;
4568 {if (true) throw e;}
4571 expression = Expression();
4572 } catch (ParseException e) {
4573 errorMessage = "variable expected";
4575 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4576 errorEnd = SimpleCharStream.getPosition() + 1;
4577 {if (true) throw e;}
4580 jj_consume_token(AS);
4581 } catch (ParseException e) {
4582 errorMessage = "'as' expected";
4584 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4585 errorEnd = SimpleCharStream.getPosition() + 1;
4586 {if (true) throw e;}
4589 variable = ArrayVariable();
4590 } catch (ParseException e) {
4591 errorMessage = "variable expected";
4593 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4594 errorEnd = SimpleCharStream.getPosition() + 1;
4595 {if (true) throw e;}
4598 jj_consume_token(RPAREN);
4599 } catch (ParseException e) {
4600 errorMessage = "')' expected after 'foreach' keyword";
4602 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4603 errorEnd = SimpleCharStream.getPosition() + 1;
4604 {if (true) throw e;}
4607 statement = Statement();
4608 } catch (ParseException e) {
4609 if (errorMessage != null) {if (true) throw e;}
4610 errorMessage = "statement expected";
4612 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4613 errorEnd = SimpleCharStream.getPosition() + 1;
4614 {if (true) throw e;}
4616 {if (true) return new ForeachStatement(expression,
4620 SimpleCharStream.getPosition());}
4621 throw new Error("Missing return statement in function");
4624 static final public ForStatement ForStatement() throws ParseException {
4626 final int pos = SimpleCharStream.getPosition();
4627 Statement[] initializations = null;
4628 Expression condition = null;
4629 Statement[] increments = null;
4631 final ArrayList list = new ArrayList();
4632 final int startBlock, endBlock;
4633 token = jj_consume_token(FOR);
4635 jj_consume_token(LPAREN);
4636 } catch (ParseException e) {
4637 errorMessage = "'(' expected after 'for' keyword";
4639 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4640 errorEnd = SimpleCharStream.getPosition() + 1;
4641 {if (true) throw e;}
4643 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4651 initializations = ForInit();
4654 jj_la1[114] = jj_gen;
4657 jj_consume_token(SEMICOLON);
4658 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4674 case INTEGER_LITERAL:
4675 case FLOATING_POINT_LITERAL:
4676 case STRING_LITERAL:
4680 condition = Expression();
4683 jj_la1[115] = jj_gen;
4686 jj_consume_token(SEMICOLON);
4687 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4695 increments = StatementExpressionList();
4698 jj_la1[116] = jj_gen;
4701 jj_consume_token(RPAREN);
4702 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4734 case INTEGER_LITERAL:
4735 case FLOATING_POINT_LITERAL:
4736 case STRING_LITERAL:
4742 action = Statement();
4743 {if (true) return new ForStatement(initializations,condition,increments,action,pos,SimpleCharStream.getPosition());}
4746 jj_consume_token(COLON);
4747 startBlock = SimpleCharStream.getPosition();
4750 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4782 case INTEGER_LITERAL:
4783 case FLOATING_POINT_LITERAL:
4784 case STRING_LITERAL:
4793 jj_la1[117] = jj_gen;
4796 action = Statement();
4800 setMarker(fileToParse,
4801 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
4803 pos+token.image.length(),
4805 "Line " + token.beginLine);
4806 } catch (CoreException e) {
4807 PHPeclipsePlugin.log(e);
4809 endBlock = SimpleCharStream.getPosition();
4811 jj_consume_token(ENDFOR);
4812 } catch (ParseException e) {
4813 errorMessage = "'endfor' expected";
4815 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4816 errorEnd = SimpleCharStream.getPosition() + 1;
4817 {if (true) throw e;}
4820 jj_consume_token(SEMICOLON);
4821 Statement[] stmtsArray = new Statement[list.size()];
4822 list.toArray(stmtsArray);
4823 {if (true) return new ForStatement(initializations,condition,increments,new Block(stmtsArray,startBlock,endBlock),pos,SimpleCharStream.getPosition());}
4824 } catch (ParseException e) {
4825 errorMessage = "';' expected after 'endfor' keyword";
4827 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4828 errorEnd = SimpleCharStream.getPosition() + 1;
4829 {if (true) throw e;}
4833 jj_la1[118] = jj_gen;
4834 jj_consume_token(-1);
4835 throw new ParseException();
4837 throw new Error("Missing return statement in function");
4840 static final public Statement[] ForInit() throws ParseException {
4841 Statement[] statements;
4842 if (jj_2_8(2147483647)) {
4843 statements = LocalVariableDeclaration();
4844 {if (true) return statements;}
4846 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4854 statements = StatementExpressionList();
4855 {if (true) return statements;}
4858 jj_la1[119] = jj_gen;
4859 jj_consume_token(-1);
4860 throw new ParseException();
4863 throw new Error("Missing return statement in function");
4866 static final public Statement[] StatementExpressionList() throws ParseException {
4867 final ArrayList list = new ArrayList();
4869 expr = StatementExpression();
4873 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4878 jj_la1[120] = jj_gen;
4881 jj_consume_token(COMMA);
4882 StatementExpression();
4885 Statement[] stmtsArray = new Statement[list.size()];
4886 list.toArray(stmtsArray);
4887 {if (true) return stmtsArray;}
4888 throw new Error("Missing return statement in function");
4891 static final public Continue ContinueStatement() throws ParseException {
4892 Expression expr = null;
4893 final int pos = SimpleCharStream.getPosition();
4894 jj_consume_token(CONTINUE);
4895 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4911 case INTEGER_LITERAL:
4912 case FLOATING_POINT_LITERAL:
4913 case STRING_LITERAL:
4917 expr = Expression();
4920 jj_la1[121] = jj_gen;
4924 jj_consume_token(SEMICOLON);
4925 {if (true) return new Continue(expr,pos,SimpleCharStream.getPosition());}
4926 } catch (ParseException e) {
4927 errorMessage = "';' expected after 'continue' statement";
4929 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4930 errorEnd = SimpleCharStream.getPosition() + 1;
4931 {if (true) throw e;}
4933 throw new Error("Missing return statement in function");
4936 static final public ReturnStatement ReturnStatement() throws ParseException {
4937 Expression expr = null;
4938 final int pos = SimpleCharStream.getPosition();
4939 jj_consume_token(RETURN);
4940 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4956 case INTEGER_LITERAL:
4957 case FLOATING_POINT_LITERAL:
4958 case STRING_LITERAL:
4962 expr = Expression();
4965 jj_la1[122] = jj_gen;
4969 jj_consume_token(SEMICOLON);
4970 {if (true) return new ReturnStatement(expr,pos,SimpleCharStream.getPosition());}
4971 } catch (ParseException e) {
4972 errorMessage = "';' expected after 'return' statement";
4974 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4975 errorEnd = SimpleCharStream.getPosition() + 1;
4976 {if (true) throw e;}
4978 throw new Error("Missing return statement in function");
4981 static final private boolean jj_2_1(int xla) {
4982 jj_la = xla; jj_lastpos = jj_scanpos = token;
4983 boolean retval = !jj_3_1();
4988 static final private boolean jj_2_2(int xla) {
4989 jj_la = xla; jj_lastpos = jj_scanpos = token;
4990 boolean retval = !jj_3_2();
4995 static final private boolean jj_2_3(int xla) {
4996 jj_la = xla; jj_lastpos = jj_scanpos = token;
4997 boolean retval = !jj_3_3();
5002 static final private boolean jj_2_4(int xla) {
5003 jj_la = xla; jj_lastpos = jj_scanpos = token;
5004 boolean retval = !jj_3_4();
5009 static final private boolean jj_2_5(int xla) {
5010 jj_la = xla; jj_lastpos = jj_scanpos = token;
5011 boolean retval = !jj_3_5();
5016 static final private boolean jj_2_6(int xla) {
5017 jj_la = xla; jj_lastpos = jj_scanpos = token;
5018 boolean retval = !jj_3_6();
5023 static final private boolean jj_2_7(int xla) {
5024 jj_la = xla; jj_lastpos = jj_scanpos = token;
5025 boolean retval = !jj_3_7();
5030 static final private boolean jj_2_8(int xla) {
5031 jj_la = xla; jj_lastpos = jj_scanpos = token;
5032 boolean retval = !jj_3_8();
5037 static final private boolean jj_3R_75() {
5038 if (jj_scan_token(STRING)) return true;
5039 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5043 static final private boolean jj_3R_52() {
5062 if (jj_3R_83()) return true;
5063 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5064 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5065 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5066 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5067 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5068 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5069 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5070 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5071 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5075 static final private boolean jj_3R_84() {
5076 if (jj_scan_token(PRINT)) return true;
5077 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5078 if (jj_3R_45()) return true;
5079 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5083 static final private boolean jj_3_4() {
5084 if (jj_scan_token(LPAREN)) return true;
5085 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5090 if (jj_3R_44()) return true;
5091 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5092 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5093 if (jj_scan_token(RPAREN)) return true;
5094 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5098 static final private boolean jj_3R_165() {
5099 if (jj_scan_token(LPAREN)) return true;
5100 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5101 if (jj_3R_45()) return true;
5102 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5103 if (jj_scan_token(RPAREN)) return true;
5104 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5108 static final private boolean jj_3R_164() {
5109 if (jj_3R_169()) return true;
5110 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5114 static final private boolean jj_3R_163() {
5115 if (jj_3R_168()) return true;
5116 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5120 static final private boolean jj_3R_162() {
5121 if (jj_3R_167()) return true;
5122 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5126 static final private boolean jj_3R_158() {
5137 if (jj_3R_165()) return true;
5138 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5139 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5140 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5141 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5142 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5146 static final private boolean jj_3R_161() {
5147 if (jj_scan_token(BANG)) return true;
5148 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5149 if (jj_3R_139()) return true;
5150 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5154 static final private boolean jj_3R_160() {
5155 if (jj_scan_token(DECR)) return true;
5156 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5160 static final private boolean jj_3R_159() {
5161 if (jj_scan_token(INCR)) return true;
5162 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5166 static final private boolean jj_3R_157() {
5171 if (jj_3R_160()) return true;
5172 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5173 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5174 if (jj_3R_166()) return true;
5175 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5179 static final private boolean jj_3R_152() {
5180 if (jj_3R_158()) return true;
5181 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5185 static final private boolean jj_3R_151() {
5186 if (jj_3R_157()) return true;
5187 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5191 static final private boolean jj_3R_156() {
5192 if (jj_scan_token(MINUS)) return true;
5193 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5197 static final private boolean jj_3R_155() {
5198 if (jj_scan_token(PLUS)) return true;
5199 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5203 static final private boolean jj_3R_148() {
5210 if (jj_3R_152()) return true;
5211 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5212 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5213 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5217 static final private boolean jj_3R_150() {
5222 if (jj_3R_156()) return true;
5223 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5224 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5225 if (jj_3R_139()) return true;
5226 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5230 static final private boolean jj_3R_154() {
5231 if (jj_3R_148()) return true;
5232 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5236 static final private boolean jj_3R_149() {
5241 if (jj_3R_154()) return true;
5242 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5243 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5247 static final private boolean jj_3R_153() {
5248 if (jj_scan_token(AT)) return true;
5249 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5250 if (jj_3R_149()) return true;
5251 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5255 static final private boolean jj_3R_144() {
5256 if (jj_3R_149()) return true;
5257 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5261 static final private boolean jj_3R_139() {
5266 if (jj_3R_144()) 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;
5272 static final private boolean jj_3R_143() {
5273 if (jj_scan_token(BIT_AND)) return true;
5274 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5275 if (jj_3R_148()) return true;
5276 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5280 static final private boolean jj_3R_87() {
5281 if (jj_scan_token(ASSIGN)) return true;
5282 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5283 if (jj_3R_45()) return true;
5284 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5288 static final private boolean jj_3R_147() {
5289 if (jj_scan_token(REMAINDER)) return true;
5290 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5294 static final private boolean jj_3R_146() {
5295 if (jj_scan_token(SLASH)) return true;
5296 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5300 static final private boolean jj_3R_145() {
5301 if (jj_scan_token(STAR)) return true;
5302 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5306 static final private boolean jj_3R_140() {
5313 if (jj_3R_147()) return true;
5314 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5315 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5316 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5317 if (jj_3R_139()) return true;
5318 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5322 static final private boolean jj_3R_134() {
5323 if (jj_3R_139()) return true;
5324 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5328 if (jj_3R_140()) { jj_scanpos = xsp; break; }
5329 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5334 static final private boolean jj_3R_142() {
5335 if (jj_scan_token(MINUS)) return true;
5336 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5340 static final private boolean jj_3R_141() {
5341 if (jj_scan_token(PLUS)) return true;
5342 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5346 static final private boolean jj_3R_135() {
5351 if (jj_3R_142()) return true;
5352 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5353 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5354 if (jj_3R_134()) return true;
5355 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5359 static final private boolean jj_3R_57() {
5360 if (jj_3R_50()) return true;
5361 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5364 if (jj_3R_87()) jj_scanpos = xsp;
5365 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5369 static final private boolean jj_3R_128() {
5370 if (jj_3R_134()) return true;
5371 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5375 if (jj_3R_135()) { jj_scanpos = xsp; break; }
5376 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5381 static final private boolean jj_3_7() {
5382 if (jj_3R_46()) return true;
5383 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5387 static final private boolean jj_3R_198() {
5388 if (jj_scan_token(COMMA)) return true;
5389 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5393 static final private boolean jj_3_2() {
5394 if (jj_scan_token(COMMA)) return true;
5395 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5396 if (jj_3R_41()) return true;
5397 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5401 static final private boolean jj_3R_197() {
5402 if (jj_3R_41()) return true;
5403 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5407 if (jj_3_2()) { jj_scanpos = xsp; break; }
5408 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5413 static final private boolean jj_3R_138() {
5414 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
5415 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5419 static final private boolean jj_3R_58() {
5420 if (jj_scan_token(COMMA)) return true;
5421 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5422 if (jj_3R_57()) return true;
5423 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5427 static final private boolean jj_3R_137() {
5428 if (jj_scan_token(RSIGNEDSHIFT)) return true;
5429 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5433 static final private boolean jj_3R_136() {
5434 if (jj_scan_token(LSHIFT)) return true;
5435 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5439 static final private boolean jj_3R_129() {
5446 if (jj_3R_138()) return true;
5447 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5448 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5449 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5450 if (jj_3R_128()) return true;
5451 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5455 static final private boolean jj_3R_47() {
5456 if (jj_3R_57()) return true;
5457 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5461 if (jj_3R_58()) { jj_scanpos = xsp; break; }
5462 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5467 static final private boolean jj_3R_121() {
5468 if (jj_3R_128()) return true;
5469 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5473 if (jj_3R_129()) { jj_scanpos = xsp; break; }
5474 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5479 static final private boolean jj_3_6() {
5480 if (jj_3R_45()) return true;
5481 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5482 if (jj_scan_token(SEMICOLON)) return true;
5483 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5487 static final private boolean jj_3R_192() {
5488 if (jj_scan_token(LPAREN)) return true;
5489 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5492 if (jj_3R_197()) jj_scanpos = xsp;
5493 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5495 if (jj_3R_198()) jj_scanpos = xsp;
5496 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5497 if (jj_scan_token(RPAREN)) return true;
5498 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5502 static final private boolean jj_3R_133() {
5503 if (jj_scan_token(GE)) return true;
5504 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5508 static final private boolean jj_3R_132() {
5509 if (jj_scan_token(LE)) return true;
5510 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5514 static final private boolean jj_3R_131() {
5515 if (jj_scan_token(GT)) return true;
5516 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5520 static final private boolean jj_3R_201() {
5521 if (jj_scan_token(ARRAYASSIGN)) return true;
5522 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5523 if (jj_3R_45()) return true;
5524 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5528 static final private boolean jj_3R_130() {
5529 if (jj_scan_token(LT)) return true;
5530 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5534 static final private boolean jj_3R_41() {
5535 if (jj_3R_45()) return true;
5536 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5539 if (jj_3R_201()) jj_scanpos = xsp;
5540 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5544 static final private boolean jj_3R_122() {
5553 if (jj_3R_133()) return true;
5554 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5555 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5556 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5557 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5558 if (jj_3R_121()) return true;
5559 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5563 static final private boolean jj_3R_119() {
5564 if (jj_3R_121()) return true;
5565 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5569 if (jj_3R_122()) { jj_scanpos = xsp; break; }
5570 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5575 static final private boolean jj_3R_203() {
5576 if (jj_scan_token(COMMA)) return true;
5577 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5578 if (jj_3R_45()) return true;
5579 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5583 static final private boolean jj_3R_202() {
5584 if (jj_3R_45()) return true;
5585 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5589 if (jj_3R_203()) { jj_scanpos = xsp; break; }
5590 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5595 static final private boolean jj_3R_127() {
5596 if (jj_scan_token(TRIPLEEQUAL)) return true;
5597 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5601 static final private boolean jj_3R_200() {
5602 if (jj_3R_202()) return true;
5603 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5607 static final private boolean jj_3R_126() {
5608 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5609 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5613 static final private boolean jj_3R_125() {
5614 if (jj_scan_token(NOT_EQUAL)) return true;
5615 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5619 static final private boolean jj_3R_124() {
5620 if (jj_scan_token(DIF)) return true;
5621 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5625 static final private boolean jj_3R_123() {
5626 if (jj_scan_token(EQUAL_EQUAL)) return true;
5627 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5631 static final private boolean jj_3R_120() {
5642 if (jj_3R_127()) return true;
5643 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5644 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5645 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5646 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5647 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5648 if (jj_3R_119()) return true;
5649 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5653 static final private boolean jj_3R_93() {
5654 if (jj_3R_52()) return true;
5655 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5659 static final private boolean jj_3R_117() {
5660 if (jj_3R_119()) return true;
5661 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5665 if (jj_3R_120()) { jj_scanpos = xsp; break; }
5666 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5671 static final private boolean jj_3R_108() {
5672 if (jj_scan_token(LBRACE)) return true;
5673 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5674 if (jj_3R_45()) return true;
5675 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5676 if (jj_scan_token(RBRACE)) return true;
5677 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5681 static final private boolean jj_3R_199() {
5682 if (jj_scan_token(LPAREN)) return true;
5683 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5686 if (jj_3R_200()) jj_scanpos = xsp;
5687 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5688 if (jj_scan_token(RPAREN)) return true;
5689 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5693 static final private boolean jj_3R_91() {
5694 if (jj_scan_token(DOLLAR_ID)) return true;
5695 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5699 static final private boolean jj_3R_118() {
5700 if (jj_scan_token(BIT_AND)) return true;
5701 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5702 if (jj_3R_117()) return true;
5703 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5707 static final private boolean jj_3R_177() {
5708 if (jj_scan_token(NULL)) return true;
5709 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5713 static final private boolean jj_3R_90() {
5714 if (jj_scan_token(DOLLAR)) return true;
5715 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5716 if (jj_3R_59()) return true;
5717 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5721 static final private boolean jj_3R_176() {
5722 if (jj_scan_token(FALSE)) return true;
5723 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5727 static final private boolean jj_3R_115() {
5728 if (jj_3R_117()) return true;
5729 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5733 if (jj_3R_118()) { jj_scanpos = xsp; break; }
5734 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5739 static final private boolean jj_3R_175() {
5740 if (jj_scan_token(TRUE)) return true;
5741 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5745 static final private boolean jj_3R_174() {
5746 if (jj_scan_token(STRING_LITERAL)) return true;
5747 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5751 static final private boolean jj_3R_173() {
5752 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
5753 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5757 static final private boolean jj_3R_169() {
5770 if (jj_3R_177()) return true;
5771 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5772 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5773 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5774 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5775 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5776 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5780 static final private boolean jj_3R_172() {
5781 if (jj_scan_token(INTEGER_LITERAL)) return true;
5782 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5786 static final private boolean jj_3R_89() {
5787 if (jj_scan_token(IDENTIFIER)) return true;
5788 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5791 if (jj_3R_108()) jj_scanpos = xsp;
5792 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5796 static final private boolean jj_3R_116() {
5797 if (jj_scan_token(XOR)) return true;
5798 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5799 if (jj_3R_115()) return true;
5800 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5804 static final private boolean jj_3R_113() {
5805 if (jj_3R_115()) return true;
5806 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5810 if (jj_3R_116()) { jj_scanpos = xsp; break; }
5811 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5816 static final private boolean jj_3R_92() {
5817 if (jj_3R_45()) return true;
5818 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5822 static final private boolean jj_3R_60() {
5827 if (jj_3R_93()) return true;
5828 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5829 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5833 static final private boolean jj_3R_88() {
5834 if (jj_scan_token(LBRACE)) return true;
5835 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5836 if (jj_3R_45()) return true;
5837 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5838 if (jj_scan_token(RBRACE)) return true;
5839 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5843 static final private boolean jj_3R_59() {
5852 if (jj_3R_91()) return true;
5853 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5854 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5855 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5856 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5860 static final private boolean jj_3R_46() {
5861 if (jj_scan_token(IDENTIFIER)) return true;
5862 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5863 if (jj_scan_token(COLON)) return true;
5864 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5868 static final private boolean jj_3_8() {
5869 if (jj_3R_47()) return true;
5870 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5874 static final private boolean jj_3R_98() {
5875 if (jj_scan_token(LBRACE)) return true;
5876 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5877 if (jj_3R_45()) return true;
5878 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5879 if (jj_scan_token(RBRACE)) return true;
5880 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5884 static final private boolean jj_3R_114() {
5885 if (jj_scan_token(BIT_OR)) return true;
5886 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5887 if (jj_3R_113()) return true;
5888 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5892 static final private boolean jj_3R_109() {
5893 if (jj_3R_113()) return true;
5894 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5898 if (jj_3R_114()) { jj_scanpos = xsp; break; }
5899 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5904 static final private boolean jj_3R_49() {
5905 if (jj_scan_token(LBRACKET)) return true;
5906 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5909 if (jj_3R_60()) jj_scanpos = xsp;
5910 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5911 if (jj_scan_token(RBRACKET)) return true;
5912 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5916 static final private boolean jj_3R_95() {
5917 if (jj_scan_token(DOLLAR)) return true;
5918 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5919 if (jj_3R_59()) return true;
5920 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5924 static final private boolean jj_3R_110() {
5925 if (jj_scan_token(DOT)) return true;
5926 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5927 if (jj_3R_109()) return true;
5928 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5932 static final private boolean jj_3R_104() {
5933 if (jj_3R_109()) return true;
5934 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5938 if (jj_3R_110()) { jj_scanpos = xsp; break; }
5939 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5944 static final private boolean jj_3R_48() {
5945 if (jj_scan_token(CLASSACCESS)) return true;
5946 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5947 if (jj_3R_59()) return true;
5948 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5952 static final private boolean jj_3R_40() {
5957 if (jj_3R_49()) return true;
5958 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5959 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5963 static final private boolean jj_3R_94() {
5964 if (jj_scan_token(DOLLAR_ID)) return true;
5965 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5968 if (jj_3R_98()) jj_scanpos = xsp;
5969 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5973 static final private boolean jj_3R_61() {
5978 if (jj_3R_95()) return true;
5979 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5980 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5984 static final private boolean jj_3R_112() {
5985 if (jj_scan_token(_ANDL)) return true;
5986 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5990 static final private boolean jj_3R_111() {
5991 if (jj_scan_token(AND_AND)) return true;
5992 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5996 static final private boolean jj_3R_196() {
5997 if (jj_3R_40()) return true;
5998 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6002 static final private boolean jj_3R_105() {
6007 if (jj_3R_112()) return true;
6008 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6009 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6010 if (jj_3R_104()) return true;
6011 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6015 static final private boolean jj_3R_195() {
6016 if (jj_3R_199()) return true;
6017 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6021 static final private boolean jj_3R_188() {
6026 if (jj_3R_196()) return true;
6027 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6028 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6032 static final private boolean jj_3R_97() {
6033 if (jj_scan_token(HOOK)) return true;
6034 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6035 if (jj_3R_45()) return true;
6036 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6037 if (jj_scan_token(COLON)) return true;
6038 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6039 if (jj_3R_86()) return true;
6040 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6044 static final private boolean jj_3R_102() {
6045 if (jj_3R_104()) return true;
6046 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6050 if (jj_3R_105()) { jj_scanpos = xsp; break; }
6051 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6056 static final private boolean jj_3R_187() {
6057 if (jj_3R_50()) return true;
6058 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6062 static final private boolean jj_3R_107() {
6063 if (jj_scan_token(_ORL)) return true;
6064 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6068 static final private boolean jj_3R_106() {
6069 if (jj_scan_token(OR_OR)) return true;
6070 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6074 static final private boolean jj_3R_186() {
6075 if (jj_scan_token(IDENTIFIER)) return true;
6076 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6080 static final private boolean jj_3R_178() {
6085 if (jj_3R_187()) return true;
6086 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6087 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6091 static final private boolean jj_3_1() {
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_103() {
6102 if (jj_3R_107()) 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_102()) return true;
6106 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6110 static final private boolean jj_3R_50() {
6111 if (jj_3R_61()) return true;
6112 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6116 if (jj_3_1()) { jj_scanpos = xsp; break; }
6117 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6122 static final private boolean jj_3R_96() {
6123 if (jj_3R_102()) return true;
6124 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6128 if (jj_3R_103()) { jj_scanpos = xsp; break; }
6129 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6134 static final private boolean jj_3R_86() {
6135 if (jj_3R_96()) return true;
6136 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6139 if (jj_3R_97()) jj_scanpos = xsp;
6140 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6144 static final private boolean jj_3R_74() {
6145 if (jj_scan_token(TILDEEQUAL)) return true;
6146 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6150 static final private boolean jj_3R_191() {
6151 if (jj_3R_50()) return true;
6152 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6156 static final private boolean jj_3R_73() {
6157 if (jj_scan_token(DOTASSIGN)) return true;
6158 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6162 static final private boolean jj_3R_72() {
6163 if (jj_scan_token(ORASSIGN)) return true;
6164 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6168 static final private boolean jj_3R_71() {
6169 if (jj_scan_token(XORASSIGN)) return true;
6170 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6174 static final private boolean jj_3R_190() {
6175 if (jj_scan_token(NEW)) return true;
6176 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6177 if (jj_3R_178()) return true;
6178 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6182 static final private boolean jj_3R_70() {
6183 if (jj_scan_token(ANDASSIGN)) return true;
6184 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6188 static final private boolean jj_3R_69() {
6189 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6190 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6194 static final private boolean jj_3R_68() {
6195 if (jj_scan_token(LSHIFTASSIGN)) return true;
6196 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6200 static final private boolean jj_3R_189() {
6201 if (jj_scan_token(IDENTIFIER)) return true;
6202 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6206 static final private boolean jj_3R_180() {
6213 if (jj_3R_191()) return true;
6214 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6215 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6216 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6220 static final private boolean jj_3R_67() {
6221 if (jj_scan_token(MINUSASSIGN)) return true;
6222 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6226 static final private boolean jj_3R_66() {
6227 if (jj_scan_token(PLUSASSIGN)) return true;
6228 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6232 static final private boolean jj_3R_65() {
6233 if (jj_scan_token(REMASSIGN)) return true;
6234 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6238 static final private boolean jj_3R_64() {
6239 if (jj_scan_token(SLASHASSIGN)) return true;
6240 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6244 static final private boolean jj_3R_63() {
6245 if (jj_scan_token(STARASSIGN)) return true;
6246 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6250 static final private boolean jj_3R_51() {
6277 if (jj_3R_74()) return true;
6278 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6279 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6280 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6281 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6282 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6283 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6284 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6285 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6286 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6287 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6288 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6289 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6290 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6294 static final private boolean jj_3R_62() {
6295 if (jj_scan_token(ASSIGN)) return true;
6296 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6300 static final private boolean jj_3R_182() {
6301 if (jj_scan_token(ARRAY)) return true;
6302 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6303 if (jj_3R_192()) return true;
6304 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6308 static final private boolean jj_3R_171() {
6309 if (jj_3R_182()) return true;
6310 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6314 static final private boolean jj_3R_181() {
6315 if (jj_3R_188()) return true;
6316 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6320 static final private boolean jj_3R_170() {
6321 if (jj_3R_180()) return true;
6322 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6326 if (jj_3R_181()) { jj_scanpos = xsp; break; }
6327 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6332 static final private boolean jj_3R_101() {
6333 if (jj_scan_token(ASSIGN)) return true;
6334 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6335 if (jj_3R_45()) return true;
6336 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6340 static final private boolean jj_3R_179() {
6341 if (jj_3R_188()) return true;
6342 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6346 static final private boolean jj_3R_42() {
6347 if (jj_3R_50()) return true;
6348 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6349 if (jj_3R_51()) return true;
6350 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6351 if (jj_3R_45()) return true;
6352 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6356 static final private boolean jj_3_3() {
6357 if (jj_3R_42()) return true;
6358 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6362 static final private boolean jj_3_5() {
6363 if (jj_scan_token(IDENTIFIER)) return true;
6364 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6365 if (jj_scan_token(STATICCLASSACCESS)) return true;
6366 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6367 if (jj_3R_178()) return true;
6368 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6372 if (jj_3R_179()) { jj_scanpos = xsp; break; }
6373 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6378 static final private boolean jj_3R_166() {
6385 if (jj_3R_171()) return true;
6386 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6387 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6388 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6392 static final private boolean jj_3R_56() {
6393 if (jj_3R_86()) return true;
6394 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6398 static final private boolean jj_3R_55() {
6399 if (jj_3R_42()) return true;
6400 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6404 static final private boolean jj_3R_54() {
6405 if (jj_3R_85()) return true;
6406 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6410 static final private boolean jj_3R_45() {
6419 if (jj_3R_56()) return true;
6420 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6421 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6422 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6423 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6427 static final private boolean jj_3R_53() {
6428 if (jj_3R_84()) return true;
6429 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6433 static final private boolean jj_3R_100() {
6434 if (jj_scan_token(COMMA)) return true;
6435 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6436 if (jj_3R_50()) return true;
6437 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6441 static final private boolean jj_3R_194() {
6442 if (jj_scan_token(DECR)) return true;
6443 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6447 static final private boolean jj_3R_193() {
6448 if (jj_scan_token(INCR)) return true;
6449 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6453 static final private boolean jj_3R_185() {
6458 if (jj_3R_194()) return true;
6459 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6460 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6464 static final private boolean jj_3R_99() {
6465 if (jj_3R_50()) return true;
6466 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6470 static final private boolean jj_3R_168() {
6471 if (jj_3R_166()) return true;
6472 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6475 if (jj_3R_185()) jj_scanpos = xsp;
6476 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6480 static final private boolean jj_3R_83() {
6481 if (jj_scan_token(OBJECT)) return true;
6482 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6486 static final private boolean jj_3R_82() {
6487 if (jj_scan_token(INTEGER)) return true;
6488 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6492 static final private boolean jj_3R_81() {
6493 if (jj_scan_token(INT)) return true;
6494 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6498 static final private boolean jj_3R_44() {
6499 if (jj_scan_token(ARRAY)) return true;
6500 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6504 static final private boolean jj_3R_80() {
6505 if (jj_scan_token(FLOAT)) return true;
6506 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6510 static final private boolean jj_3R_184() {
6511 if (jj_scan_token(ARRAY)) return true;
6512 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6516 static final private boolean jj_3R_79() {
6517 if (jj_scan_token(DOUBLE)) return true;
6518 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6522 static final private boolean jj_3R_183() {
6523 if (jj_3R_52()) return true;
6524 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6528 static final private boolean jj_3R_85() {
6529 if (jj_scan_token(LIST)) return true;
6530 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6531 if (jj_scan_token(LPAREN)) return true;
6532 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6535 if (jj_3R_99()) jj_scanpos = xsp;
6536 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6539 if (jj_3R_100()) { jj_scanpos = xsp; break; }
6540 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6542 if (jj_scan_token(RPAREN)) return true;
6543 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6545 if (jj_3R_101()) jj_scanpos = xsp;
6546 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6550 static final private boolean jj_3R_78() {
6551 if (jj_scan_token(REAL)) return true;
6552 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6556 static final private boolean jj_3R_167() {
6557 if (jj_scan_token(LPAREN)) return true;
6558 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6563 if (jj_3R_184()) return true;
6564 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6565 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6566 if (jj_scan_token(RPAREN)) return true;
6567 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6568 if (jj_3R_139()) return true;
6569 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6573 static final private boolean jj_3R_77() {
6574 if (jj_scan_token(BOOLEAN)) return true;
6575 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6579 static final private boolean jj_3R_76() {
6580 if (jj_scan_token(BOOL)) return true;
6581 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6585 static final private boolean jj_3R_43() {
6586 if (jj_3R_52()) return true;
6587 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6591 static private boolean jj_initialized_once = false;
6592 static public PHPParserTokenManager token_source;
6593 static SimpleCharStream jj_input_stream;
6594 static public Token token, jj_nt;
6595 static private int jj_ntk;
6596 static private Token jj_scanpos, jj_lastpos;
6597 static private int jj_la;
6598 static public boolean lookingAhead = false;
6599 static private boolean jj_semLA;
6600 static private int jj_gen;
6601 static final private int[] jj_la1 = new int[123];
6602 static private int[] jj_la1_0;
6603 static private int[] jj_la1_1;
6604 static private int[] jj_la1_2;
6605 static private int[] jj_la1_3;
6606 static private int[] jj_la1_4;
6614 private static void jj_la1_0() {
6615 jj_la1_0 = new int[] {0xfcb0001e,0x6,0x6,0xfcb0001e,0x0,0xfcb00000,0x0,0x600000,0x600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x0,0x34000000,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x4000000,0x0,0x4000000,0x0,0x0,0x4000000,0x4000000,0x0,0x0,0x0,0x0,0x4000000,0x0,0x4000000,0x0,0x0,0x34000000,0x34000000,0x0,0x0,0x34000000,0x0,0x0,0xc4800000,0xfc800000,0x8,0x6,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0xfcb00010,0xfcb00010,0xfcb00000,0xf4b00000,0x0,0x0,0x0,0x0,0x4000000,0x0,0x0,0x0,0xf4b00010,0xf4b00010,0x8000000,0x0,0x34000000,0xfc800010,0xfc800010,0x1000000,0x2000000,0xfc800010,0x1000000,0x2000000,0xfc800010,0xfc800010,0xfc800010,0xfc800010,0xfc800010,0xfc800000,0xfc800000,0x4000000,0x34000000,0x4000000,0xfc800000,0xfc800000,0x4000000,0x0,0x34000000,0x34000000,};
6617 private static void jj_la1_1() {
6618 jj_la1_1 = new int[] {0x21d7541f,0x0,0x0,0x21d7541f,0x0,0x21d7541f,0x2000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc20000,0x80,0xc30000,0x0,0x0,0x0,0x0,0x0,0x80000000,0x0,0xc30000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc30000,0xc30000,0x0,0xc30000,0x0,0x0,0xc30000,0x80000000,0x0,0x0,0x20,0x20,0x10000,0x10000,0x10000,0x0,0x20,0x80c30000,0x80c30000,0x20,0xc20000,0xc30000,0x0,0x0,0x2115541f,0x21d7541f,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x21d7541f,0x21d7541f,0x21d7541f,0x21d7541f,0x0,0x0,0x0,0x0,0x10000,0x0,0x900,0x900,0x21d7541f,0x21d7541f,0x0,0x900,0xc30000,0x21d7541f,0x21d7541f,0x0,0x0,0x21d7541f,0x0,0x0,0x21d7541f,0x21d7541f,0x21d7541f,0x21d7541f,0x21d7541f,0x21d7541f,0x21d7541f,0x10000,0xc30000,0x10000,0x21d7541f,0x21d7541f,0x10000,0x0,0xc30000,0xc30000,};
6620 private static void jj_la1_2() {
6621 jj_la1_2 = new int[] {0x804f0700,0x0,0x0,0x804f0700,0x0,0x804f0700,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x200,0x80000000,0x80000000,0x800c0000,0x0,0x804f0700,0x0,0x400000,0x0,0x400200,0x400000,0xff,0x0,0x804f0700,0x0,0x1000,0x20004000,0x20004000,0x40008000,0x40008000,0x0,0x800000,0x1000000,0x400000,0x0,0x0,0x0,0x0,0x1c000000,0x1c000000,0xc0000,0xc0000,0x2300000,0x2300000,0x804f0700,0x800f0700,0xc0000,0x800f0600,0x30000,0x400,0x80000200,0xff,0x30000,0x30000,0x0,0x0,0x200,0x200,0x200,0x200,0x0,0x804f07ff,0x804f07ff,0x0,0x80000000,0x804f0700,0x0,0x100,0x30300,0x804f0700,0x0,0x0,0x0,0x200,0x0,0x0,0x0,0x0,0x0,0x804f0700,0x804f0700,0x804f0700,0x804f0700,0x0,0x0,0x30000,0x30000,0x30200,0x2000,0x0,0x0,0x804f0700,0x804f0700,0x0,0x0,0x804f0700,0x804f0700,0x804f0700,0x0,0x0,0x804f0700,0x0,0x0,0x804f2700,0x804f0700,0x804f0700,0x804f0700,0x804f0700,0x804f0700,0x804f2700,0x30200,0x804f0700,0x30200,0x804f0700,0x804f2700,0x30200,0x0,0x804f0700,0x804f0700,};
6623 private static void jj_la1_3() {
6624 jj_la1_3 = new int[] {0x8a228,0x0,0x0,0x8a228,0x80000,0x8a228,0x0,0x0,0x0,0x100000,0x80000000,0x8000,0x0,0x8000,0x8200,0x8,0x8,0x228,0x0,0x2228,0x100000,0x0,0x100000,0x0,0x0,0x0,0x0,0x2228,0x80000000,0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x0,0x0,0x79000000,0x79000000,0x6c00000,0x6c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x2228,0x2228,0x0,0x2228,0x0,0x0,0x2228,0x0,0x0,0x0,0x22000,0x22000,0x200,0x200,0x200,0x200,0x22000,0x2228,0x2228,0x20000,0x28,0x2228,0x100000,0x0,0x88200,0x8a228,0x0,0x0,0x0,0x0,0x100000,0x80000000,0x100000,0x100000,0x100000,0x8a228,0x8a228,0x8a228,0x8a228,0x100000,0x80000000,0x80000000,0x80000000,0x200,0x8000,0x0,0x0,0x8a228,0x8a228,0x0,0x0,0x2228,0x8a228,0x8a228,0x0,0x0,0x8a228,0x0,0x0,0x8a228,0x8a228,0x8a228,0x8a228,0x8a228,0x8a228,0x8a228,0x200,0x2228,0x200,0x8a228,0x8a228,0x200,0x100000,0x2228,0x2228,};
6626 private static void jj_la1_4() {
6627 jj_la1_4 = new int[] {0x1000,0x0,0x0,0x1000,0x0,0x1000,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x0,0x1000,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x1000,0xfff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x1000,0x0,0x1000,0x0,0x0,0x1000,0x0,0x0,0x0,0x0,0x0,0x1000,0x1000,0x1000,0x1000,0x0,0x1000,0x1000,0x0,0x0,0x1000,0x0,0x0,0x1000,0x1000,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x0,0x0,0x1000,0x1000,0x1000,0x1000,0x0,0x0,0xfff,0xfff,0x1000,0x0,0x0,0x0,0x1000,0x1000,0x0,0x0,0x1000,0x1000,0x1000,0x0,0x0,0x1000,0x0,0x0,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x0,0x1000,0x1000,};
6629 static final private JJCalls[] jj_2_rtns = new JJCalls[8];
6630 static private boolean jj_rescan = false;
6631 static private int jj_gc = 0;
6633 public PHPParser(java.io.InputStream stream) {
6634 if (jj_initialized_once) {
6635 System.out.println("ERROR: Second call to constructor of static parser. You must");
6636 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6637 System.out.println(" during parser generation.");
6640 jj_initialized_once = true;
6641 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6642 token_source = new PHPParserTokenManager(jj_input_stream);
6643 token = new Token();
6646 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6647 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6650 static public void ReInit(java.io.InputStream stream) {
6651 jj_input_stream.ReInit(stream, 1, 1);
6652 token_source.ReInit(jj_input_stream);
6653 token = new Token();
6656 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6657 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6660 public PHPParser(java.io.Reader stream) {
6661 if (jj_initialized_once) {
6662 System.out.println("ERROR: Second call to constructor of static parser. You must");
6663 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6664 System.out.println(" during parser generation.");
6667 jj_initialized_once = true;
6668 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6669 token_source = new PHPParserTokenManager(jj_input_stream);
6670 token = new Token();
6673 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6674 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6677 static public void ReInit(java.io.Reader stream) {
6678 jj_input_stream.ReInit(stream, 1, 1);
6679 token_source.ReInit(jj_input_stream);
6680 token = new Token();
6683 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6684 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6687 public PHPParser(PHPParserTokenManager tm) {
6688 if (jj_initialized_once) {
6689 System.out.println("ERROR: Second call to constructor of static parser. You must");
6690 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6691 System.out.println(" during parser generation.");
6694 jj_initialized_once = true;
6696 token = new Token();
6699 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6700 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6703 public void ReInit(PHPParserTokenManager tm) {
6705 token = new Token();
6708 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6709 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6712 static final private Token jj_consume_token(int kind) throws ParseException {
6714 if ((oldToken = token).next != null) token = token.next;
6715 else token = token.next = token_source.getNextToken();
6717 if (token.kind == kind) {
6719 if (++jj_gc > 100) {
6721 for (int i = 0; i < jj_2_rtns.length; i++) {
6722 JJCalls c = jj_2_rtns[i];
6724 if (c.gen < jj_gen) c.first = null;
6733 throw generateParseException();
6736 static final private boolean jj_scan_token(int kind) {
6737 if (jj_scanpos == jj_lastpos) {
6739 if (jj_scanpos.next == null) {
6740 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
6742 jj_lastpos = jj_scanpos = jj_scanpos.next;
6745 jj_scanpos = jj_scanpos.next;
6748 int i = 0; Token tok = token;
6749 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
6750 if (tok != null) jj_add_error_token(kind, i);
6752 return (jj_scanpos.kind != kind);
6755 static final public Token getNextToken() {
6756 if (token.next != null) token = token.next;
6757 else token = token.next = token_source.getNextToken();
6763 static final public Token getToken(int index) {
6764 Token t = lookingAhead ? jj_scanpos : token;
6765 for (int i = 0; i < index; i++) {
6766 if (t.next != null) t = t.next;
6767 else t = t.next = token_source.getNextToken();
6772 static final private int jj_ntk() {
6773 if ((jj_nt=token.next) == null)
6774 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
6776 return (jj_ntk = jj_nt.kind);
6779 static private java.util.Vector jj_expentries = new java.util.Vector();
6780 static private int[] jj_expentry;
6781 static private int jj_kind = -1;
6782 static private int[] jj_lasttokens = new int[100];
6783 static private int jj_endpos;
6785 static private void jj_add_error_token(int kind, int pos) {
6786 if (pos >= 100) return;
6787 if (pos == jj_endpos + 1) {
6788 jj_lasttokens[jj_endpos++] = kind;
6789 } else if (jj_endpos != 0) {
6790 jj_expentry = new int[jj_endpos];
6791 for (int i = 0; i < jj_endpos; i++) {
6792 jj_expentry[i] = jj_lasttokens[i];
6794 boolean exists = false;
6795 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
6796 int[] oldentry = (int[])(enum.nextElement());
6797 if (oldentry.length == jj_expentry.length) {
6799 for (int i = 0; i < jj_expentry.length; i++) {
6800 if (oldentry[i] != jj_expentry[i]) {
6808 if (!exists) jj_expentries.addElement(jj_expentry);
6809 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
6813 static public ParseException generateParseException() {
6814 jj_expentries.removeAllElements();
6815 boolean[] la1tokens = new boolean[141];
6816 for (int i = 0; i < 141; i++) {
6817 la1tokens[i] = false;
6820 la1tokens[jj_kind] = true;
6823 for (int i = 0; i < 123; i++) {
6824 if (jj_la1[i] == jj_gen) {
6825 for (int j = 0; j < 32; j++) {
6826 if ((jj_la1_0[i] & (1<<j)) != 0) {
6827 la1tokens[j] = true;
6829 if ((jj_la1_1[i] & (1<<j)) != 0) {
6830 la1tokens[32+j] = true;
6832 if ((jj_la1_2[i] & (1<<j)) != 0) {
6833 la1tokens[64+j] = true;
6835 if ((jj_la1_3[i] & (1<<j)) != 0) {
6836 la1tokens[96+j] = true;
6838 if ((jj_la1_4[i] & (1<<j)) != 0) {
6839 la1tokens[128+j] = true;
6844 for (int i = 0; i < 141; i++) {
6846 jj_expentry = new int[1];
6848 jj_expentries.addElement(jj_expentry);
6853 jj_add_error_token(0, 0);
6854 int[][] exptokseq = new int[jj_expentries.size()][];
6855 for (int i = 0; i < jj_expentries.size(); i++) {
6856 exptokseq[i] = (int[])jj_expentries.elementAt(i);
6858 return new ParseException(token, exptokseq, tokenImage);
6861 static final public void enable_tracing() {
6864 static final public void disable_tracing() {
6867 static final private void jj_rescan_token() {
6869 for (int i = 0; i < 8; i++) {
6870 JJCalls p = jj_2_rtns[i];
6872 if (p.gen > jj_gen) {
6873 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
6875 case 0: jj_3_1(); break;
6876 case 1: jj_3_2(); break;
6877 case 2: jj_3_3(); break;
6878 case 3: jj_3_4(); break;
6879 case 4: jj_3_5(); break;
6880 case 5: jj_3_6(); break;
6881 case 6: jj_3_7(); break;
6882 case 7: jj_3_8(); break;
6886 } while (p != null);
6891 static final private void jj_save(int index, int xla) {
6892 JJCalls p = jj_2_rtns[index];
6893 while (p.gen > jj_gen) {
6894 if (p.next == null) { p = p.next = new JJCalls(); break; }
6897 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
6900 static final class JJCalls {