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 private static boolean assigning;
44 /** The error level of the current ParseException. */
45 private static int errorLevel = ERROR;
46 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
47 private static String errorMessage;
49 private static int errorStart = -1;
50 private static int errorEnd = -1;
51 private static PHPDocument phpDocument;
53 private static final char[] SYNTAX_ERROR_CHAR = {'s','y','n','t','a','x',' ','e','r','r','o','r'};
55 * The point where html starts.
56 * It will be used by the token manager to create HTMLCode objects
58 public static int htmlStart;
61 private final static int AstStackIncrement = 100;
62 /** The stack of node. */
63 private static AstNode[] nodes;
64 /** The cursor in expression stack. */
65 private static int nodePtr;
67 public final void setFileToParse(final IFile fileToParse) {
68 this.fileToParse = fileToParse;
74 public PHPParser(final IFile fileToParse) {
75 this(new StringReader(""));
76 this.fileToParse = fileToParse;
80 * Reinitialize the parser.
82 private static final void init() {
83 nodes = new AstNode[AstStackIncrement];
89 * Add an php node on the stack.
90 * @param node the node that will be added to the stack
92 private static final void pushOnAstNodes(AstNode node) {
94 nodes[++nodePtr] = node;
95 } catch (IndexOutOfBoundsException e) {
96 int oldStackLength = nodes.length;
97 AstNode[] oldStack = nodes;
98 nodes = new AstNode[oldStackLength + AstStackIncrement];
99 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
100 nodePtr = oldStackLength;
101 nodes[nodePtr] = node;
105 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
106 phpDocument = new PHPDocument(parent,"_root".toCharArray());
107 currentSegment = phpDocument;
108 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
109 final StringReader stream = new StringReader(s);
110 if (jj_input_stream == null) {
111 jj_input_stream = new SimpleCharStream(stream, 1, 1);
117 phpDocument.nodes = new AstNode[nodes.length];
118 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
119 if (PHPeclipsePlugin.DEBUG) {
120 PHPeclipsePlugin.log(1,phpDocument.toString());
122 } catch (ParseException e) {
123 processParseException(e);
129 * This method will process the parse exception.
130 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
131 * @param e the ParseException
133 private static void processParseException(final ParseException e) {
134 if (errorMessage == null) {
135 PHPeclipsePlugin.log(e);
136 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
137 errorStart = SimpleCharStream.getPosition();
138 errorEnd = errorStart + 1;
145 * Create marker for the parse error
146 * @param e the ParseException
148 private static void setMarker(final ParseException e) {
150 if (errorStart == -1) {
151 setMarker(fileToParse,
153 SimpleCharStream.tokenBegin,
154 SimpleCharStream.tokenBegin + e.currentToken.image.length(),
156 "Line " + e.currentToken.beginLine);
158 setMarker(fileToParse,
163 "Line " + e.currentToken.beginLine);
167 } catch (CoreException e2) {
168 PHPeclipsePlugin.log(e2);
173 * Create markers according to the external parser output
175 private static void createMarkers(final String output, final IFile file) throws CoreException {
176 // delete all markers
177 file.deleteMarkers(IMarker.PROBLEM, false, 0);
182 while ((brIndx = output.indexOf("<br />", indx)) != -1) {
183 // newer php error output (tested with 4.2.3)
184 scanLine(output, file, indx, brIndx);
189 while ((brIndx = output.indexOf("<br>", indx)) != -1) {
190 // older php error output (tested with 4.2.3)
191 scanLine(output, file, indx, brIndx);
197 private static void scanLine(final String output,
200 final int brIndx) throws CoreException {
202 StringBuffer lineNumberBuffer = new StringBuffer(10);
204 current = output.substring(indx, brIndx);
206 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
207 int onLine = current.indexOf("on line <b>");
209 lineNumberBuffer.delete(0, lineNumberBuffer.length());
210 for (int i = onLine; i < current.length(); i++) {
211 ch = current.charAt(i);
212 if ('0' <= ch && '9' >= ch) {
213 lineNumberBuffer.append(ch);
217 int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
219 Hashtable attributes = new Hashtable();
221 current = current.replaceAll("\n", "");
222 current = current.replaceAll("<b>", "");
223 current = current.replaceAll("</b>", "");
224 MarkerUtilities.setMessage(attributes, current);
226 if (current.indexOf(PARSE_ERROR_STRING) != -1)
227 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
228 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
229 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
231 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
232 MarkerUtilities.setLineNumber(attributes, lineNumber);
233 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
238 public final void parse(final String s) throws CoreException {
239 final StringReader stream = new StringReader(s);
240 if (jj_input_stream == null) {
241 jj_input_stream = new SimpleCharStream(stream, 1, 1);
247 } catch (ParseException e) {
248 processParseException(e);
253 * Call the php parse command ( php -l -f <filename> )
254 * and create markers according to the external parser output
256 public static void phpExternalParse(final IFile file) {
257 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
258 final String filename = file.getLocation().toString();
260 final String[] arguments = { filename };
261 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
262 final String command = form.format(arguments);
264 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
267 // parse the buffer to find the errors and warnings
268 createMarkers(parserResult, file);
269 } catch (CoreException e) {
270 PHPeclipsePlugin.log(e);
275 * Put a new html block in the stack.
277 public static final void createNewHTMLCode() {
278 final int currentPosition = SimpleCharStream.getPosition();
279 if (currentPosition == htmlStart) {
282 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray();
283 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
286 private static final void parse() throws ParseException {
290 static final public void phpFile() throws ParseException {
294 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
332 case INTEGER_LITERAL:
333 case FLOATING_POINT_LITERAL:
349 } catch (TokenMgrError e) {
350 PHPeclipsePlugin.log(e);
351 errorStart = SimpleCharStream.getPosition();
352 errorEnd = errorStart + 1;
353 errorMessage = e.getMessage();
355 {if (true) throw generateParseException();}
360 * A php block is a <?= expression [;]?>
361 * or <?php somephpcode ?>
362 * or <? somephpcode ?>
364 static final public void PhpBlock() throws ParseException {
365 final int start = SimpleCharStream.getPosition();
366 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
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 && !assigning) {
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");
812 static final public String VariableName() throws ParseException {
813 final StringBuffer buff;
815 Expression expression = null;
817 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
819 jj_consume_token(LBRACE);
820 expression = Expression();
821 jj_consume_token(RBRACE);
822 buff = new StringBuffer("{");
823 buff.append(expression.toStringExpression());
825 {if (true) return buff.toString();}
828 token = jj_consume_token(IDENTIFIER);
829 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
831 jj_consume_token(LBRACE);
832 expression = Expression();
833 jj_consume_token(RBRACE);
839 if (expression == null) {
840 {if (true) return token.image;}
842 buff = new StringBuffer(token.image);
844 buff.append(expression.toStringExpression());
846 {if (true) return buff.toString();}
849 jj_consume_token(DOLLAR);
850 expr = VariableName();
851 buff = new StringBuffer("$");
853 {if (true) return buff.toString();}
856 token = jj_consume_token(DOLLAR_ID);
857 {if (true) return token.image;}
861 jj_consume_token(-1);
862 throw new ParseException();
864 throw new Error("Missing return statement in function");
867 static final public Expression VariableInitializer() throws ParseException {
868 final Expression expr;
870 final int pos = SimpleCharStream.getPosition();
871 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
875 case INTEGER_LITERAL:
876 case FLOATING_POINT_LITERAL:
879 {if (true) return expr;}
882 jj_consume_token(MINUS);
883 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
884 case INTEGER_LITERAL:
885 token = jj_consume_token(INTEGER_LITERAL);
887 case FLOATING_POINT_LITERAL:
888 token = jj_consume_token(FLOATING_POINT_LITERAL);
892 jj_consume_token(-1);
893 throw new ParseException();
895 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
897 SimpleCharStream.getPosition()),
902 jj_consume_token(PLUS);
903 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
904 case INTEGER_LITERAL:
905 token = jj_consume_token(INTEGER_LITERAL);
907 case FLOATING_POINT_LITERAL:
908 token = jj_consume_token(FLOATING_POINT_LITERAL);
912 jj_consume_token(-1);
913 throw new ParseException();
915 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
917 SimpleCharStream.getPosition()),
922 expr = ArrayDeclarator();
923 {if (true) return expr;}
926 token = jj_consume_token(IDENTIFIER);
927 {if (true) return new ConstantIdentifier(token.image.toCharArray(),pos,SimpleCharStream.getPosition());}
931 jj_consume_token(-1);
932 throw new ParseException();
934 throw new Error("Missing return statement in function");
937 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
938 Expression expr,expr2;
940 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
942 jj_consume_token(ARRAYASSIGN);
943 expr2 = Expression();
944 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
950 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
951 throw new Error("Missing return statement in function");
954 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
955 ArrayVariableDeclaration expr;
956 final ArrayList list = new ArrayList();
957 jj_consume_token(LPAREN);
958 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
974 case INTEGER_LITERAL:
975 case FLOATING_POINT_LITERAL:
980 expr = ArrayVariable();
989 jj_consume_token(COMMA);
990 expr = ArrayVariable();
998 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1000 jj_consume_token(COMMA);
1004 jj_la1[20] = jj_gen;
1007 jj_consume_token(RPAREN);
1008 ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1010 {if (true) return vars;}
1011 throw new Error("Missing return statement in function");
1015 * A Method Declaration.
1016 * <b>function</b> MetodDeclarator() Block()
1018 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1019 final MethodDeclaration functionDeclaration;
1021 jj_consume_token(FUNCTION);
1023 functionDeclaration = MethodDeclarator();
1024 outlineInfo.addVariable(new String(functionDeclaration.name));
1025 } catch (ParseException e) {
1026 if (errorMessage != null) {if (true) throw e;}
1027 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1029 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1030 errorEnd = SimpleCharStream.getPosition() + 1;
1031 {if (true) throw e;}
1033 if (currentSegment != null) {
1034 currentSegment.add(functionDeclaration);
1035 currentSegment = functionDeclaration;
1038 functionDeclaration.statements = block.statements;
1039 if (currentSegment != null) {
1040 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
1042 {if (true) return functionDeclaration;}
1043 throw new Error("Missing return statement in function");
1047 * A MethodDeclarator.
1048 * [&] IDENTIFIER(parameters ...).
1049 * @return a function description for the outline
1051 static final public MethodDeclaration MethodDeclarator() throws ParseException {
1052 final Token identifier;
1053 Token reference = null;
1054 final Hashtable formalParameters;
1055 final int pos = SimpleCharStream.getPosition();
1056 char[] identifierChar = SYNTAX_ERROR_CHAR;
1057 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1059 reference = jj_consume_token(BIT_AND);
1062 jj_la1[21] = jj_gen;
1066 identifier = jj_consume_token(IDENTIFIER);
1067 identifierChar = identifier.image.toCharArray();
1068 } catch (ParseException e) {
1069 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1071 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1072 errorEnd = SimpleCharStream.getPosition() + 1;
1073 processParseException(e);
1075 formalParameters = FormalParameters();
1076 {if (true) return new MethodDeclaration(currentSegment,
1081 SimpleCharStream.getPosition());}
1082 throw new Error("Missing return statement in function");
1086 * FormalParameters follows method identifier.
1087 * (FormalParameter())
1089 static final public Hashtable FormalParameters() throws ParseException {
1090 VariableDeclaration var;
1091 final Hashtable parameters = new Hashtable();
1093 jj_consume_token(LPAREN);
1094 } catch (ParseException e) {
1095 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1097 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1098 errorEnd = SimpleCharStream.getPosition() + 1;
1099 {if (true) throw e;}
1101 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1105 var = FormalParameter();
1106 parameters.put(new String(var.name),var);
1109 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1114 jj_la1[22] = jj_gen;
1117 jj_consume_token(COMMA);
1118 var = FormalParameter();
1119 parameters.put(new String(var.name),var);
1123 jj_la1[23] = jj_gen;
1127 jj_consume_token(RPAREN);
1128 } catch (ParseException e) {
1129 errorMessage = "')' expected";
1131 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1132 errorEnd = SimpleCharStream.getPosition() + 1;
1133 {if (true) throw e;}
1135 {if (true) return parameters;}
1136 throw new Error("Missing return statement in function");
1140 * A formal parameter.
1141 * $varname[=value] (,$varname[=value])
1143 static final public VariableDeclaration FormalParameter() throws ParseException {
1144 final VariableDeclaration variableDeclaration;
1146 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1148 token = jj_consume_token(BIT_AND);
1151 jj_la1[24] = jj_gen;
1154 variableDeclaration = VariableDeclarator();
1155 if (token != null) {
1156 variableDeclaration.setReference(true);
1158 {if (true) return variableDeclaration;}
1159 throw new Error("Missing return statement in function");
1162 static final public ConstantIdentifier Type() throws ParseException {
1164 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1166 jj_consume_token(STRING);
1167 pos = SimpleCharStream.getPosition();
1168 {if (true) return new ConstantIdentifier(Types.STRING,pos,pos-6);}
1171 jj_consume_token(BOOL);
1172 pos = SimpleCharStream.getPosition();
1173 {if (true) return new ConstantIdentifier(Types.BOOL,pos,pos-4);}
1176 jj_consume_token(BOOLEAN);
1177 pos = SimpleCharStream.getPosition();
1178 {if (true) return new ConstantIdentifier(Types.BOOLEAN,pos,pos-7);}
1181 jj_consume_token(REAL);
1182 pos = SimpleCharStream.getPosition();
1183 {if (true) return new ConstantIdentifier(Types.REAL,pos,pos-4);}
1186 jj_consume_token(DOUBLE);
1187 pos = SimpleCharStream.getPosition();
1188 {if (true) return new ConstantIdentifier(Types.DOUBLE,pos,pos-5);}
1191 jj_consume_token(FLOAT);
1192 pos = SimpleCharStream.getPosition();
1193 {if (true) return new ConstantIdentifier(Types.FLOAT,pos,pos-5);}
1196 jj_consume_token(INT);
1197 pos = SimpleCharStream.getPosition();
1198 {if (true) return new ConstantIdentifier(Types.INT,pos,pos-3);}
1201 jj_consume_token(INTEGER);
1202 pos = SimpleCharStream.getPosition();
1203 {if (true) return new ConstantIdentifier(Types.INTEGER,pos,pos-7);}
1206 jj_consume_token(OBJECT);
1207 pos = SimpleCharStream.getPosition();
1208 {if (true) return new ConstantIdentifier(Types.OBJECT,pos,pos-6);}
1211 jj_la1[25] = jj_gen;
1212 jj_consume_token(-1);
1213 throw new ParseException();
1215 throw new Error("Missing return statement in function");
1218 static final public Expression Expression() throws ParseException {
1219 final Expression expr;
1220 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1222 expr = PrintExpression();
1223 {if (true) return expr;}
1226 expr = ListExpression();
1227 {if (true) return expr;}
1230 jj_la1[26] = jj_gen;
1231 if (jj_2_3(2147483647)) {
1232 expr = varAssignation();
1233 {if (true) return expr;}
1235 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1249 case INTEGER_LITERAL:
1250 case FLOATING_POINT_LITERAL:
1251 case STRING_LITERAL:
1255 expr = ConditionalExpression();
1256 {if (true) return expr;}
1259 jj_la1[27] = jj_gen;
1260 jj_consume_token(-1);
1261 throw new ParseException();
1265 throw new Error("Missing return statement in function");
1269 * A Variable assignation.
1270 * varName (an assign operator) any expression
1272 static final public VarAssignation varAssignation() throws ParseException {
1274 final Expression expression;
1275 final int assignOperator;
1276 final int pos = SimpleCharStream.getPosition();
1277 varName = VariableDeclaratorId();
1278 assignOperator = AssignmentOperator();
1280 expression = Expression();
1281 } catch (ParseException e) {
1282 if (errorMessage != null) {
1283 {if (true) throw e;}
1285 errorMessage = "expression expected";
1287 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1288 errorEnd = SimpleCharStream.getPosition() + 1;
1289 {if (true) throw e;}
1291 {if (true) return new VarAssignation(varName.toCharArray(),
1295 SimpleCharStream.getPosition());}
1296 throw new Error("Missing return statement in function");
1299 static final public int AssignmentOperator() throws ParseException {
1300 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1302 jj_consume_token(ASSIGN);
1303 {if (true) return VarAssignation.EQUAL;}
1306 jj_consume_token(STARASSIGN);
1307 {if (true) return VarAssignation.STAR_EQUAL;}
1310 jj_consume_token(SLASHASSIGN);
1311 {if (true) return VarAssignation.SLASH_EQUAL;}
1314 jj_consume_token(REMASSIGN);
1315 {if (true) return VarAssignation.REM_EQUAL;}
1318 jj_consume_token(PLUSASSIGN);
1319 {if (true) return VarAssignation.PLUS_EQUAL;}
1322 jj_consume_token(MINUSASSIGN);
1323 {if (true) return VarAssignation.MINUS_EQUAL;}
1326 jj_consume_token(LSHIFTASSIGN);
1327 {if (true) return VarAssignation.LSHIFT_EQUAL;}
1329 case RSIGNEDSHIFTASSIGN:
1330 jj_consume_token(RSIGNEDSHIFTASSIGN);
1331 {if (true) return VarAssignation.RSIGNEDSHIFT_EQUAL;}
1334 jj_consume_token(ANDASSIGN);
1335 {if (true) return VarAssignation.AND_EQUAL;}
1338 jj_consume_token(XORASSIGN);
1339 {if (true) return VarAssignation.XOR_EQUAL;}
1342 jj_consume_token(ORASSIGN);
1343 {if (true) return VarAssignation.OR_EQUAL;}
1346 jj_consume_token(DOTASSIGN);
1347 {if (true) return VarAssignation.DOT_EQUAL;}
1350 jj_consume_token(TILDEEQUAL);
1351 {if (true) return VarAssignation.TILDE_EQUAL;}
1354 jj_la1[28] = jj_gen;
1355 jj_consume_token(-1);
1356 throw new ParseException();
1358 throw new Error("Missing return statement in function");
1361 static final public Expression ConditionalExpression() throws ParseException {
1362 final Expression expr;
1363 Expression expr2 = null;
1364 Expression expr3 = null;
1365 expr = ConditionalOrExpression();
1366 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1368 jj_consume_token(HOOK);
1369 expr2 = Expression();
1370 jj_consume_token(COLON);
1371 expr3 = ConditionalExpression();
1374 jj_la1[29] = jj_gen;
1377 if (expr3 == null) {
1378 {if (true) return expr;}
1380 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1381 throw new Error("Missing return statement in function");
1384 static final public Expression ConditionalOrExpression() throws ParseException {
1385 Expression expr,expr2;
1387 expr = ConditionalAndExpression();
1390 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1396 jj_la1[30] = jj_gen;
1399 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1401 jj_consume_token(OR_OR);
1402 operator = OperatorIds.OR_OR;
1405 jj_consume_token(_ORL);
1406 operator = OperatorIds.ORL;
1409 jj_la1[31] = jj_gen;
1410 jj_consume_token(-1);
1411 throw new ParseException();
1413 expr2 = ConditionalAndExpression();
1414 expr = new BinaryExpression(expr,expr2,operator);
1416 {if (true) return expr;}
1417 throw new Error("Missing return statement in function");
1420 static final public Expression ConditionalAndExpression() throws ParseException {
1421 Expression expr,expr2;
1423 expr = ConcatExpression();
1426 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1432 jj_la1[32] = jj_gen;
1435 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1437 jj_consume_token(AND_AND);
1438 operator = OperatorIds.AND_AND;
1441 jj_consume_token(_ANDL);
1442 operator = OperatorIds.ANDL;
1445 jj_la1[33] = jj_gen;
1446 jj_consume_token(-1);
1447 throw new ParseException();
1449 expr2 = ConcatExpression();
1450 expr = new BinaryExpression(expr,expr2,operator);
1452 {if (true) return expr;}
1453 throw new Error("Missing return statement in function");
1456 static final public Expression ConcatExpression() throws ParseException {
1457 Expression expr,expr2;
1458 expr = InclusiveOrExpression();
1461 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1466 jj_la1[34] = jj_gen;
1469 jj_consume_token(DOT);
1470 expr2 = InclusiveOrExpression();
1471 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1473 {if (true) return expr;}
1474 throw new Error("Missing return statement in function");
1477 static final public Expression InclusiveOrExpression() throws ParseException {
1478 Expression expr,expr2;
1479 expr = ExclusiveOrExpression();
1482 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1487 jj_la1[35] = jj_gen;
1490 jj_consume_token(BIT_OR);
1491 expr2 = ExclusiveOrExpression();
1492 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1494 {if (true) return expr;}
1495 throw new Error("Missing return statement in function");
1498 static final public Expression ExclusiveOrExpression() throws ParseException {
1499 Expression expr,expr2;
1500 expr = AndExpression();
1503 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1508 jj_la1[36] = jj_gen;
1511 jj_consume_token(XOR);
1512 expr2 = AndExpression();
1513 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1515 {if (true) return expr;}
1516 throw new Error("Missing return statement in function");
1519 static final public Expression AndExpression() throws ParseException {
1520 Expression expr,expr2;
1521 expr = EqualityExpression();
1524 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1529 jj_la1[37] = jj_gen;
1532 jj_consume_token(BIT_AND);
1533 expr2 = EqualityExpression();
1534 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1536 {if (true) return expr;}
1537 throw new Error("Missing return statement in function");
1540 static final public Expression EqualityExpression() throws ParseException {
1541 Expression expr,expr2;
1543 expr = RelationalExpression();
1546 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1550 case BANGDOUBLEEQUAL:
1555 jj_la1[38] = jj_gen;
1558 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1560 jj_consume_token(EQUAL_EQUAL);
1561 operator = OperatorIds.EQUAL_EQUAL;
1564 jj_consume_token(DIF);
1565 operator = OperatorIds.DIF;
1568 jj_consume_token(NOT_EQUAL);
1569 operator = OperatorIds.DIF;
1571 case BANGDOUBLEEQUAL:
1572 jj_consume_token(BANGDOUBLEEQUAL);
1573 operator = OperatorIds.BANG_EQUAL_EQUAL;
1576 jj_consume_token(TRIPLEEQUAL);
1577 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1580 jj_la1[39] = jj_gen;
1581 jj_consume_token(-1);
1582 throw new ParseException();
1585 expr2 = RelationalExpression();
1586 } catch (ParseException e) {
1587 if (errorMessage != null) {
1588 {if (true) throw e;}
1590 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1592 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1593 errorEnd = SimpleCharStream.getPosition() + 1;
1594 {if (true) throw e;}
1596 expr = new BinaryExpression(expr,expr2,operator);
1598 {if (true) return expr;}
1599 throw new Error("Missing return statement in function");
1602 static final public Expression RelationalExpression() throws ParseException {
1603 Expression expr,expr2;
1605 expr = ShiftExpression();
1608 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1616 jj_la1[40] = jj_gen;
1619 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1621 jj_consume_token(LT);
1622 operator = OperatorIds.LESS;
1625 jj_consume_token(GT);
1626 operator = OperatorIds.GREATER;
1629 jj_consume_token(LE);
1630 operator = OperatorIds.LESS_EQUAL;
1633 jj_consume_token(GE);
1634 operator = OperatorIds.GREATER_EQUAL;
1637 jj_la1[41] = jj_gen;
1638 jj_consume_token(-1);
1639 throw new ParseException();
1641 expr2 = ShiftExpression();
1642 expr = new BinaryExpression(expr,expr2,operator);
1644 {if (true) return expr;}
1645 throw new Error("Missing return statement in function");
1648 static final public Expression ShiftExpression() throws ParseException {
1649 Expression expr,expr2;
1651 expr = AdditiveExpression();
1654 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1657 case RUNSIGNEDSHIFT:
1661 jj_la1[42] = jj_gen;
1664 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1666 jj_consume_token(LSHIFT);
1667 operator = OperatorIds.LEFT_SHIFT;
1670 jj_consume_token(RSIGNEDSHIFT);
1671 operator = OperatorIds.RIGHT_SHIFT;
1673 case RUNSIGNEDSHIFT:
1674 jj_consume_token(RUNSIGNEDSHIFT);
1675 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1678 jj_la1[43] = jj_gen;
1679 jj_consume_token(-1);
1680 throw new ParseException();
1682 expr2 = AdditiveExpression();
1683 expr = new BinaryExpression(expr,expr2,operator);
1685 {if (true) return expr;}
1686 throw new Error("Missing return statement in function");
1689 static final public Expression AdditiveExpression() throws ParseException {
1690 Expression expr,expr2;
1692 expr = MultiplicativeExpression();
1695 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1701 jj_la1[44] = jj_gen;
1704 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1706 jj_consume_token(PLUS);
1707 operator = OperatorIds.PLUS;
1710 jj_consume_token(MINUS);
1711 operator = OperatorIds.MINUS;
1714 jj_la1[45] = jj_gen;
1715 jj_consume_token(-1);
1716 throw new ParseException();
1718 expr2 = MultiplicativeExpression();
1719 expr = new BinaryExpression(expr,expr2,operator);
1721 {if (true) return expr;}
1722 throw new Error("Missing return statement in function");
1725 static final public Expression MultiplicativeExpression() throws ParseException {
1726 Expression expr,expr2;
1729 expr = UnaryExpression();
1730 } catch (ParseException e) {
1731 if (errorMessage != null) {if (true) throw e;}
1732 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1734 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1735 errorEnd = SimpleCharStream.getPosition() + 1;
1736 {if (true) throw e;}
1740 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1747 jj_la1[46] = jj_gen;
1750 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1752 jj_consume_token(STAR);
1753 operator = OperatorIds.MULTIPLY;
1756 jj_consume_token(SLASH);
1757 operator = OperatorIds.DIVIDE;
1760 jj_consume_token(REMAINDER);
1761 operator = OperatorIds.REMAINDER;
1764 jj_la1[47] = jj_gen;
1765 jj_consume_token(-1);
1766 throw new ParseException();
1768 expr2 = UnaryExpression();
1769 expr = new BinaryExpression(expr,expr2,operator);
1771 {if (true) return expr;}
1772 throw new Error("Missing return statement in function");
1776 * An unary expression starting with @, & or nothing
1778 static final public Expression UnaryExpression() throws ParseException {
1780 final int pos = SimpleCharStream.getPosition();
1781 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1783 jj_consume_token(BIT_AND);
1784 expr = UnaryExpressionNoPrefix();
1785 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1799 case INTEGER_LITERAL:
1800 case FLOATING_POINT_LITERAL:
1801 case STRING_LITERAL:
1805 expr = AtUnaryExpression();
1806 {if (true) return expr;}
1809 jj_la1[48] = jj_gen;
1810 jj_consume_token(-1);
1811 throw new ParseException();
1813 throw new Error("Missing return statement in function");
1816 static final public Expression AtUnaryExpression() throws ParseException {
1818 final int pos = SimpleCharStream.getPosition();
1819 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1821 jj_consume_token(AT);
1822 expr = AtUnaryExpression();
1823 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,pos);}
1836 case INTEGER_LITERAL:
1837 case FLOATING_POINT_LITERAL:
1838 case STRING_LITERAL:
1842 expr = UnaryExpressionNoPrefix();
1843 {if (true) return expr;}
1846 jj_la1[49] = jj_gen;
1847 jj_consume_token(-1);
1848 throw new ParseException();
1850 throw new Error("Missing return statement in function");
1853 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
1856 final int pos = SimpleCharStream.getPosition();
1857 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1860 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1862 jj_consume_token(PLUS);
1863 operator = OperatorIds.PLUS;
1866 jj_consume_token(MINUS);
1867 operator = OperatorIds.MINUS;
1870 jj_la1[50] = jj_gen;
1871 jj_consume_token(-1);
1872 throw new ParseException();
1874 expr = UnaryExpression();
1875 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1879 expr = PreIncDecExpression();
1880 {if (true) return expr;}
1889 case INTEGER_LITERAL:
1890 case FLOATING_POINT_LITERAL:
1891 case STRING_LITERAL:
1895 expr = UnaryExpressionNotPlusMinus();
1896 {if (true) return expr;}
1899 jj_la1[51] = jj_gen;
1900 jj_consume_token(-1);
1901 throw new ParseException();
1903 throw new Error("Missing return statement in function");
1906 static final public Expression PreIncDecExpression() throws ParseException {
1907 final Expression expr;
1909 final int pos = SimpleCharStream.getPosition();
1910 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1912 jj_consume_token(INCR);
1913 operator = OperatorIds.PLUS_PLUS;
1916 jj_consume_token(DECR);
1917 operator = OperatorIds.MINUS_MINUS;
1920 jj_la1[52] = jj_gen;
1921 jj_consume_token(-1);
1922 throw new ParseException();
1924 expr = PrimaryExpression();
1925 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1926 throw new Error("Missing return statement in function");
1929 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
1931 final int pos = SimpleCharStream.getPosition();
1932 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1934 jj_consume_token(BANG);
1935 expr = UnaryExpression();
1936 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1939 jj_la1[53] = jj_gen;
1940 if (jj_2_4(2147483647)) {
1941 expr = CastExpression();
1942 {if (true) return expr;}
1944 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1950 expr = PostfixExpression();
1951 {if (true) return expr;}
1956 case INTEGER_LITERAL:
1957 case FLOATING_POINT_LITERAL:
1958 case STRING_LITERAL:
1960 {if (true) return expr;}
1963 jj_consume_token(LPAREN);
1964 expr = Expression();
1966 jj_consume_token(RPAREN);
1967 } catch (ParseException e) {
1968 errorMessage = "')' expected";
1970 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1971 errorEnd = SimpleCharStream.getPosition() + 1;
1972 {if (true) throw e;}
1974 {if (true) return expr;}
1977 jj_la1[54] = jj_gen;
1978 jj_consume_token(-1);
1979 throw new ParseException();
1983 throw new Error("Missing return statement in function");
1986 static final public CastExpression CastExpression() throws ParseException {
1987 final ConstantIdentifier type;
1988 final Expression expr;
1989 final int pos = SimpleCharStream.getPosition();
1990 jj_consume_token(LPAREN);
1991 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2004 jj_consume_token(ARRAY);
2005 type = new ConstantIdentifier(Types.ARRAY,pos,SimpleCharStream.getPosition());
2008 jj_la1[55] = jj_gen;
2009 jj_consume_token(-1);
2010 throw new ParseException();
2012 jj_consume_token(RPAREN);
2013 expr = UnaryExpression();
2014 {if (true) return new CastExpression(type,expr,pos,SimpleCharStream.getPosition());}
2015 throw new Error("Missing return statement in function");
2018 static final public Expression PostfixExpression() throws ParseException {
2021 final int pos = SimpleCharStream.getPosition();
2022 expr = PrimaryExpression();
2023 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2026 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2028 jj_consume_token(INCR);
2029 operator = OperatorIds.PLUS_PLUS;
2032 jj_consume_token(DECR);
2033 operator = OperatorIds.MINUS_MINUS;
2036 jj_la1[56] = jj_gen;
2037 jj_consume_token(-1);
2038 throw new ParseException();
2042 jj_la1[57] = jj_gen;
2045 if (operator == -1) {
2046 {if (true) return expr;}
2048 {if (true) return new PostfixedUnaryExpression(expr,operator,pos);}
2049 throw new Error("Missing return statement in function");
2052 static final public Expression PrimaryExpression() throws ParseException {
2053 final Token identifier;
2055 final int pos = SimpleCharStream.getPosition();
2057 identifier = jj_consume_token(IDENTIFIER);
2058 jj_consume_token(STATICCLASSACCESS);
2059 expr = ClassIdentifier();
2060 expr = new ClassAccess(new ConstantIdentifier(identifier.image.toCharArray(),
2062 SimpleCharStream.getPosition()),
2064 ClassAccess.STATIC);
2067 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2074 jj_la1[58] = jj_gen;
2077 expr = PrimarySuffix(expr);
2079 {if (true) return expr;}
2081 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2086 expr = PrimaryPrefix();
2089 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2096 jj_la1[59] = jj_gen;
2099 expr = PrimarySuffix(expr);
2101 {if (true) return expr;}
2104 expr = ArrayDeclarator();
2105 {if (true) return expr;}
2108 jj_la1[60] = jj_gen;
2109 jj_consume_token(-1);
2110 throw new ParseException();
2113 throw new Error("Missing return statement in function");
2116 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2117 final ArrayVariableDeclaration[] vars;
2118 final int pos = SimpleCharStream.getPosition();
2119 jj_consume_token(ARRAY);
2120 vars = ArrayInitializer();
2121 {if (true) return new ArrayInitializer(vars,pos,SimpleCharStream.getPosition());}
2122 throw new Error("Missing return statement in function");
2125 static final public Expression PrimaryPrefix() throws ParseException {
2126 final Expression expr;
2129 final int pos = SimpleCharStream.getPosition();
2130 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2132 token = jj_consume_token(IDENTIFIER);
2133 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2135 SimpleCharStream.getPosition());}
2138 jj_consume_token(NEW);
2139 expr = ClassIdentifier();
2140 {if (true) return new PrefixedUnaryExpression(expr,
2146 var = VariableDeclaratorId();
2147 {if (true) return new ConstantIdentifier(var.toCharArray(),
2149 SimpleCharStream.getPosition());}
2152 jj_la1[61] = jj_gen;
2153 jj_consume_token(-1);
2154 throw new ParseException();
2156 throw new Error("Missing return statement in function");
2159 static final public PrefixedUnaryExpression classInstantiation() throws ParseException {
2161 final StringBuffer buff;
2162 final int pos = SimpleCharStream.getPosition();
2163 jj_consume_token(NEW);
2164 expr = ClassIdentifier();
2165 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2171 buff = new StringBuffer(expr.toStringExpression());
2172 expr = PrimaryExpression();
2173 buff.append(expr.toStringExpression());
2174 expr = new ConstantIdentifier(buff.toString().toCharArray(),
2176 SimpleCharStream.getPosition());
2179 jj_la1[62] = jj_gen;
2182 {if (true) return new PrefixedUnaryExpression(expr,
2185 throw new Error("Missing return statement in function");
2188 static final public ConstantIdentifier ClassIdentifier() throws ParseException {
2191 final int pos = SimpleCharStream.getPosition();
2192 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2194 token = jj_consume_token(IDENTIFIER);
2195 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2197 SimpleCharStream.getPosition());}
2201 expr = VariableDeclaratorId();
2202 {if (true) return new ConstantIdentifier(expr.toCharArray(),
2204 SimpleCharStream.getPosition());}
2207 jj_la1[63] = jj_gen;
2208 jj_consume_token(-1);
2209 throw new ParseException();
2211 throw new Error("Missing return statement in function");
2214 static final public AbstractSuffixExpression PrimarySuffix(Expression prefix) throws ParseException {
2215 final AbstractSuffixExpression expr;
2216 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2218 expr = Arguments(prefix);
2219 {if (true) return expr;}
2223 expr = VariableSuffix(prefix);
2224 {if (true) return expr;}
2227 jj_la1[64] = jj_gen;
2228 jj_consume_token(-1);
2229 throw new ParseException();
2231 throw new Error("Missing return statement in function");
2234 static final public AbstractSuffixExpression VariableSuffix(Expression prefix) throws ParseException {
2236 final int pos = SimpleCharStream.getPosition();
2237 Expression expression = null;
2238 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2240 jj_consume_token(CLASSACCESS);
2242 expr = VariableName();
2243 } catch (ParseException e) {
2244 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2246 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2247 errorEnd = SimpleCharStream.getPosition() + 1;
2248 {if (true) throw e;}
2250 {if (true) return new ClassAccess(prefix,
2251 new ConstantIdentifier(expr.toCharArray(),pos,SimpleCharStream.getPosition()),
2252 ClassAccess.NORMAL);}
2255 jj_consume_token(LBRACKET);
2256 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2281 case INTEGER_LITERAL:
2282 case FLOATING_POINT_LITERAL:
2283 case STRING_LITERAL:
2287 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2303 case INTEGER_LITERAL:
2304 case FLOATING_POINT_LITERAL:
2305 case STRING_LITERAL:
2309 expression = Expression();
2320 expression = Type();
2323 jj_la1[65] = jj_gen;
2324 jj_consume_token(-1);
2325 throw new ParseException();
2329 jj_la1[66] = jj_gen;
2333 jj_consume_token(RBRACKET);
2334 } catch (ParseException e) {
2335 errorMessage = "']' expected";
2337 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2338 errorEnd = SimpleCharStream.getPosition() + 1;
2339 {if (true) throw e;}
2341 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2344 jj_la1[67] = jj_gen;
2345 jj_consume_token(-1);
2346 throw new ParseException();
2348 throw new Error("Missing return statement in function");
2351 static final public Literal Literal() throws ParseException {
2354 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2355 case INTEGER_LITERAL:
2356 token = jj_consume_token(INTEGER_LITERAL);
2357 pos = SimpleCharStream.getPosition();
2358 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2360 case FLOATING_POINT_LITERAL:
2361 token = jj_consume_token(FLOATING_POINT_LITERAL);
2362 pos = SimpleCharStream.getPosition();
2363 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2365 case STRING_LITERAL:
2366 token = jj_consume_token(STRING_LITERAL);
2367 pos = SimpleCharStream.getPosition();
2368 {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length());}
2371 jj_consume_token(TRUE);
2372 pos = SimpleCharStream.getPosition();
2373 {if (true) return new TrueLiteral(pos-4,pos);}
2376 jj_consume_token(FALSE);
2377 pos = SimpleCharStream.getPosition();
2378 {if (true) return new FalseLiteral(pos-4,pos);}
2381 jj_consume_token(NULL);
2382 pos = SimpleCharStream.getPosition();
2383 {if (true) return new NullLiteral(pos-4,pos);}
2386 jj_la1[68] = jj_gen;
2387 jj_consume_token(-1);
2388 throw new ParseException();
2390 throw new Error("Missing return statement in function");
2393 static final public FunctionCall Arguments(Expression func) throws ParseException {
2394 Expression[] args = null;
2395 jj_consume_token(LPAREN);
2396 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2412 case INTEGER_LITERAL:
2413 case FLOATING_POINT_LITERAL:
2414 case STRING_LITERAL:
2418 args = ArgumentList();
2421 jj_la1[69] = jj_gen;
2425 jj_consume_token(RPAREN);
2426 } catch (ParseException e) {
2427 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2429 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2430 errorEnd = SimpleCharStream.getPosition() + 1;
2431 {if (true) throw e;}
2433 {if (true) return new FunctionCall(func,args,SimpleCharStream.getPosition());}
2434 throw new Error("Missing return statement in function");
2438 * An argument list is a list of arguments separated by comma :
2439 * argumentDeclaration() (, argumentDeclaration)*
2440 * @return an array of arguments
2442 static final public Expression[] ArgumentList() throws ParseException {
2444 final ArrayList list = new ArrayList();
2449 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2454 jj_la1[70] = jj_gen;
2457 jj_consume_token(COMMA);
2461 } catch (ParseException e) {
2462 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2464 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2465 errorEnd = SimpleCharStream.getPosition() + 1;
2466 {if (true) throw e;}
2469 Expression[] arguments = new Expression[list.size()];
2470 list.toArray(arguments);
2471 {if (true) return arguments;}
2472 throw new Error("Missing return statement in function");
2476 * A Statement without break.
2478 static final public Statement StatementNoBreak() throws ParseException {
2479 final Statement statement;
2482 statement = Expression();
2484 jj_consume_token(SEMICOLON);
2485 } catch (ParseException e) {
2486 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2487 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2489 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2490 errorEnd = SimpleCharStream.getPosition() + 1;
2491 {if (true) throw e;}
2494 {if (true) return statement;}
2495 } else if (jj_2_7(2)) {
2496 statement = LabeledStatement();
2497 {if (true) return statement;}
2499 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2501 statement = Block();
2502 {if (true) return statement;}
2505 statement = EmptyStatement();
2506 {if (true) return statement;}
2515 statement = StatementExpression();
2517 jj_consume_token(SEMICOLON);
2518 } catch (ParseException e) {
2519 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2521 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2522 errorEnd = SimpleCharStream.getPosition() + 1;
2523 {if (true) throw e;}
2525 {if (true) return statement;}
2528 statement = SwitchStatement();
2529 {if (true) return statement;}
2532 statement = IfStatement();
2533 {if (true) return statement;}
2536 statement = WhileStatement();
2537 {if (true) return statement;}
2540 statement = DoStatement();
2541 {if (true) return statement;}
2544 statement = ForStatement();
2545 {if (true) return statement;}
2548 statement = ForeachStatement();
2549 {if (true) return statement;}
2552 statement = ContinueStatement();
2553 {if (true) return statement;}
2556 statement = ReturnStatement();
2557 {if (true) return statement;}
2560 statement = EchoStatement();
2561 {if (true) return statement;}
2568 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2570 token = jj_consume_token(AT);
2573 jj_la1[71] = jj_gen;
2576 statement = IncludeStatement();
2577 if (token != null) {
2578 ((InclusionStatement)statement).silent = true;
2580 {if (true) return statement;}
2583 statement = StaticStatement();
2584 {if (true) return statement;}
2587 statement = GlobalStatement();
2588 {if (true) return statement;}
2591 jj_la1[72] = jj_gen;
2592 jj_consume_token(-1);
2593 throw new ParseException();
2596 throw new Error("Missing return statement in function");
2600 * A Normal statement.
2602 static final public Statement Statement() throws ParseException {
2603 final Statement statement;
2604 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2635 case INTEGER_LITERAL:
2636 case FLOATING_POINT_LITERAL:
2637 case STRING_LITERAL:
2643 statement = StatementNoBreak();
2644 {if (true) return statement;}
2647 statement = BreakStatement();
2648 {if (true) return statement;}
2651 jj_la1[73] = jj_gen;
2652 jj_consume_token(-1);
2653 throw new ParseException();
2655 throw new Error("Missing return statement in function");
2659 * An html block inside a php syntax.
2661 static final public HTMLBlock htmlBlock() throws ParseException {
2662 final int startIndex = nodePtr;
2663 AstNode[] blockNodes;
2665 jj_consume_token(PHPEND);
2668 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2673 jj_la1[74] = jj_gen;
2679 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2681 jj_consume_token(PHPSTARTLONG);
2684 jj_consume_token(PHPSTARTSHORT);
2687 jj_la1[75] = jj_gen;
2688 jj_consume_token(-1);
2689 throw new ParseException();
2691 } catch (ParseException e) {
2692 errorMessage = "End of file unexpected, '<?php' expected";
2694 errorStart = SimpleCharStream.getPosition();
2695 errorEnd = SimpleCharStream.getPosition();
2696 {if (true) throw e;}
2698 nbNodes = nodePtr - startIndex;
2699 blockNodes = new AstNode[nbNodes];
2700 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2701 nodePtr = startIndex;
2702 {if (true) return new HTMLBlock(blockNodes);}
2703 throw new Error("Missing return statement in function");
2707 * An include statement. It's "include" an expression;
2709 static final public InclusionStatement IncludeStatement() throws ParseException {
2710 final Expression expr;
2712 final int pos = SimpleCharStream.getPosition();
2713 final InclusionStatement inclusionStatement;
2714 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2716 jj_consume_token(REQUIRE);
2717 keyword = InclusionStatement.REQUIRE;
2720 jj_consume_token(REQUIRE_ONCE);
2721 keyword = InclusionStatement.REQUIRE_ONCE;
2724 jj_consume_token(INCLUDE);
2725 keyword = InclusionStatement.INCLUDE;
2728 jj_consume_token(INCLUDE_ONCE);
2729 keyword = InclusionStatement.INCLUDE_ONCE;
2732 jj_la1[76] = jj_gen;
2733 jj_consume_token(-1);
2734 throw new ParseException();
2737 expr = Expression();
2738 } catch (ParseException e) {
2739 if (errorMessage != null) {
2740 {if (true) throw e;}
2742 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
2744 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2745 errorEnd = SimpleCharStream.getPosition() + 1;
2746 {if (true) throw e;}
2748 inclusionStatement = new InclusionStatement(currentSegment,
2752 currentSegment.add(inclusionStatement);
2754 jj_consume_token(SEMICOLON);
2755 } catch (ParseException e) {
2756 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2758 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2759 errorEnd = SimpleCharStream.getPosition() + 1;
2760 {if (true) throw e;}
2762 {if (true) return inclusionStatement;}
2763 throw new Error("Missing return statement in function");
2766 static final public PrintExpression PrintExpression() throws ParseException {
2767 final Expression expr;
2768 final int pos = SimpleCharStream.getPosition();
2769 jj_consume_token(PRINT);
2770 expr = Expression();
2771 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
2772 throw new Error("Missing return statement in function");
2775 static final public ListExpression ListExpression() throws ParseException {
2777 Expression expression = null;
2778 ArrayList list = new ArrayList();
2779 final int pos = SimpleCharStream.getPosition();
2780 jj_consume_token(LIST);
2782 jj_consume_token(LPAREN);
2783 } catch (ParseException e) {
2784 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2786 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2787 errorEnd = SimpleCharStream.getPosition() + 1;
2788 {if (true) throw e;}
2790 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2793 expr = VariableDeclaratorId();
2797 jj_la1[77] = jj_gen;
2800 if (expr == null) list.add(null);
2803 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2808 jj_la1[78] = jj_gen;
2812 jj_consume_token(COMMA);
2813 } catch (ParseException e) {
2814 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2816 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2817 errorEnd = SimpleCharStream.getPosition() + 1;
2818 {if (true) throw e;}
2820 expr = VariableDeclaratorId();
2824 jj_consume_token(RPAREN);
2825 } catch (ParseException e) {
2826 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2828 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2829 errorEnd = SimpleCharStream.getPosition() + 1;
2830 {if (true) throw e;}
2832 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2834 jj_consume_token(ASSIGN);
2835 expression = Expression();
2836 String[] strings = new String[list.size()];
2837 list.toArray(strings);
2838 {if (true) return new ListExpression(strings,
2841 SimpleCharStream.getPosition());}
2844 jj_la1[79] = jj_gen;
2847 String[] strings = new String[list.size()];
2848 list.toArray(strings);
2849 {if (true) return new ListExpression(strings,pos,SimpleCharStream.getPosition());}
2850 throw new Error("Missing return statement in function");
2854 * An echo statement.
2855 * echo anyexpression (, otherexpression)*
2857 static final public EchoStatement EchoStatement() throws ParseException {
2858 final ArrayList expressions = new ArrayList();
2860 final int pos = SimpleCharStream.getPosition();
2861 jj_consume_token(ECHO);
2862 expr = Expression();
2863 expressions.add(expr);
2866 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2871 jj_la1[80] = jj_gen;
2874 jj_consume_token(COMMA);
2875 expr = Expression();
2876 expressions.add(expr);
2879 jj_consume_token(SEMICOLON);
2880 } catch (ParseException e) {
2881 if (e.currentToken.next.kind != 4) {
2882 errorMessage = "';' expected after 'echo' statement";
2884 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2885 errorEnd = SimpleCharStream.getPosition() + 1;
2886 {if (true) throw e;}
2889 Expression[] exprs = new Expression[expressions.size()];
2890 expressions.toArray(exprs);
2891 {if (true) return new EchoStatement(exprs,pos);}
2892 throw new Error("Missing return statement in function");
2895 static final public GlobalStatement GlobalStatement() throws ParseException {
2896 final int pos = SimpleCharStream.getPosition();
2898 ArrayList vars = new ArrayList();
2899 GlobalStatement global;
2900 jj_consume_token(GLOBAL);
2901 expr = VariableDeclaratorId();
2905 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2910 jj_la1[81] = jj_gen;
2913 jj_consume_token(COMMA);
2914 expr = VariableDeclaratorId();
2918 jj_consume_token(SEMICOLON);
2919 String[] strings = new String[vars.size()];
2920 vars.toArray(strings);
2921 global = new GlobalStatement(currentSegment,
2924 SimpleCharStream.getPosition());
2925 currentSegment.add(global);
2926 {if (true) return global;}
2927 } catch (ParseException e) {
2928 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
2930 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2931 errorEnd = SimpleCharStream.getPosition() + 1;
2932 {if (true) throw e;}
2934 throw new Error("Missing return statement in function");
2937 static final public StaticStatement StaticStatement() throws ParseException {
2938 final int pos = SimpleCharStream.getPosition();
2939 final ArrayList vars = new ArrayList();
2940 VariableDeclaration expr;
2941 jj_consume_token(STATIC);
2942 expr = VariableDeclarator();
2943 vars.add(new String(expr.name));
2946 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2951 jj_la1[82] = jj_gen;
2954 jj_consume_token(COMMA);
2955 expr = VariableDeclarator();
2956 vars.add(new String(expr.name));
2959 jj_consume_token(SEMICOLON);
2960 String[] strings = new String[vars.size()];
2961 vars.toArray(strings);
2962 {if (true) return new StaticStatement(strings,
2964 SimpleCharStream.getPosition());}
2965 } catch (ParseException e) {
2966 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
2968 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2969 errorEnd = SimpleCharStream.getPosition() + 1;
2970 {if (true) throw e;}
2972 throw new Error("Missing return statement in function");
2975 static final public LabeledStatement LabeledStatement() throws ParseException {
2976 final int pos = SimpleCharStream.getPosition();
2978 final Statement statement;
2979 label = jj_consume_token(IDENTIFIER);
2980 jj_consume_token(COLON);
2981 statement = Statement();
2982 {if (true) return new LabeledStatement(label.image.toCharArray(),statement,pos,SimpleCharStream.getPosition());}
2983 throw new Error("Missing return statement in function");
2993 static final public Block Block() throws ParseException {
2994 final int pos = SimpleCharStream.getPosition();
2995 final ArrayList list = new ArrayList();
2996 Statement statement;
2998 jj_consume_token(LBRACE);
2999 } catch (ParseException e) {
3000 errorMessage = "'{' expected";
3002 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3003 errorEnd = SimpleCharStream.getPosition() + 1;
3004 {if (true) throw e;}
3008 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3043 case INTEGER_LITERAL:
3044 case FLOATING_POINT_LITERAL:
3045 case STRING_LITERAL:
3054 jj_la1[83] = jj_gen;
3057 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3091 case INTEGER_LITERAL:
3092 case FLOATING_POINT_LITERAL:
3093 case STRING_LITERAL:
3099 statement = BlockStatement();
3100 list.add(statement);
3103 statement = htmlBlock();
3104 list.add(statement);
3107 jj_la1[84] = jj_gen;
3108 jj_consume_token(-1);
3109 throw new ParseException();
3113 jj_consume_token(RBRACE);
3114 } catch (ParseException e) {
3115 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3117 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3118 errorEnd = SimpleCharStream.getPosition() + 1;
3119 {if (true) throw e;}
3121 Statement[] statements = new Statement[list.size()];
3122 list.toArray(statements);
3123 {if (true) return new Block(statements,pos,SimpleCharStream.getPosition());}
3124 throw new Error("Missing return statement in function");
3127 static final public Statement BlockStatement() throws ParseException {
3128 final Statement statement;
3129 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3161 case INTEGER_LITERAL:
3162 case FLOATING_POINT_LITERAL:
3163 case STRING_LITERAL:
3170 statement = Statement();
3171 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3172 {if (true) return statement;}
3173 } catch (ParseException e) {
3174 errorMessage = "statement expected";
3176 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3177 errorEnd = SimpleCharStream.getPosition() + 1;
3178 {if (true) throw e;}
3182 statement = ClassDeclaration();
3183 {if (true) return statement;}
3186 statement = MethodDeclaration();
3187 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3188 {if (true) return statement;}
3191 jj_la1[85] = jj_gen;
3192 jj_consume_token(-1);
3193 throw new ParseException();
3195 throw new Error("Missing return statement in function");
3199 * A Block statement that will not contain any 'break'
3201 static final public Statement BlockStatementNoBreak() throws ParseException {
3202 final Statement statement;
3203 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3234 case INTEGER_LITERAL:
3235 case FLOATING_POINT_LITERAL:
3236 case STRING_LITERAL:
3242 statement = StatementNoBreak();
3243 {if (true) return statement;}
3246 statement = ClassDeclaration();
3247 {if (true) return statement;}
3250 statement = MethodDeclaration();
3251 {if (true) return statement;}
3254 jj_la1[86] = jj_gen;
3255 jj_consume_token(-1);
3256 throw new ParseException();
3258 throw new Error("Missing return statement in function");
3261 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3262 final ArrayList list = new ArrayList();
3263 VariableDeclaration var;
3264 var = LocalVariableDeclarator();
3268 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3273 jj_la1[87] = jj_gen;
3276 jj_consume_token(COMMA);
3277 var = LocalVariableDeclarator();
3280 VariableDeclaration[] vars = new VariableDeclaration[list.size()];
3282 {if (true) return vars;}
3283 throw new Error("Missing return statement in function");
3286 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3287 final String varName;
3288 Expression initializer = null;
3289 final int pos = SimpleCharStream.getPosition();
3290 varName = VariableDeclaratorId();
3291 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3293 jj_consume_token(ASSIGN);
3294 initializer = Expression();
3297 jj_la1[88] = jj_gen;
3300 if (initializer == null) {
3301 {if (true) return new VariableDeclaration(currentSegment,
3302 varName.toCharArray(),
3304 SimpleCharStream.getPosition());}
3306 {if (true) return new VariableDeclaration(currentSegment,
3307 varName.toCharArray(),
3310 throw new Error("Missing return statement in function");
3313 static final public EmptyStatement EmptyStatement() throws ParseException {
3315 jj_consume_token(SEMICOLON);
3316 pos = SimpleCharStream.getPosition();
3317 {if (true) return new EmptyStatement(pos-1,pos);}
3318 throw new Error("Missing return statement in function");
3321 static final public Statement StatementExpression() throws ParseException {
3322 Expression expr,expr2;
3324 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3327 expr = PreIncDecExpression();
3328 {if (true) return expr;}
3335 expr = PrimaryExpression();
3336 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3351 case RSIGNEDSHIFTASSIGN:
3352 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3354 jj_consume_token(INCR);
3355 {if (true) return new PostfixedUnaryExpression(expr,
3356 OperatorIds.PLUS_PLUS,
3357 SimpleCharStream.getPosition());}
3360 jj_consume_token(DECR);
3361 {if (true) return new PostfixedUnaryExpression(expr,
3362 OperatorIds.MINUS_MINUS,
3363 SimpleCharStream.getPosition());}
3377 case RSIGNEDSHIFTASSIGN:
3378 operator = AssignmentOperator();
3379 expr2 = Expression();
3380 {if (true) return new BinaryExpression(expr,expr2,operator);}
3383 jj_la1[89] = jj_gen;
3384 jj_consume_token(-1);
3385 throw new ParseException();
3389 jj_la1[90] = jj_gen;
3392 {if (true) return expr;}
3395 jj_la1[91] = jj_gen;
3396 jj_consume_token(-1);
3397 throw new ParseException();
3399 throw new Error("Missing return statement in function");
3402 static final public SwitchStatement SwitchStatement() throws ParseException {
3403 final Expression variable;
3404 final AbstractCase[] cases;
3405 final int pos = SimpleCharStream.getPosition();
3406 jj_consume_token(SWITCH);
3408 jj_consume_token(LPAREN);
3409 } catch (ParseException e) {
3410 errorMessage = "'(' expected after 'switch'";
3412 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3413 errorEnd = SimpleCharStream.getPosition() + 1;
3414 {if (true) throw e;}
3417 variable = Expression();
3418 } catch (ParseException e) {
3419 if (errorMessage != null) {
3420 {if (true) throw e;}
3422 errorMessage = "expression expected";
3424 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3425 errorEnd = SimpleCharStream.getPosition() + 1;
3426 {if (true) throw e;}
3429 jj_consume_token(RPAREN);
3430 } catch (ParseException e) {
3431 errorMessage = "')' expected";
3433 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3434 errorEnd = SimpleCharStream.getPosition() + 1;
3435 {if (true) throw e;}
3437 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3439 cases = switchStatementBrace();
3442 cases = switchStatementColon(pos, pos + 6);
3445 jj_la1[92] = jj_gen;
3446 jj_consume_token(-1);
3447 throw new ParseException();
3449 {if (true) return new SwitchStatement(variable,cases,pos,SimpleCharStream.getPosition());}
3450 throw new Error("Missing return statement in function");
3453 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3455 final ArrayList cases = new ArrayList();
3456 jj_consume_token(LBRACE);
3459 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3465 jj_la1[93] = jj_gen;
3468 cas = switchLabel0();
3472 jj_consume_token(RBRACE);
3473 AbstractCase[] abcase = new AbstractCase[cases.size()];
3474 cases.toArray(abcase);
3475 {if (true) return abcase;}
3476 } catch (ParseException e) {
3477 errorMessage = "'}' expected";
3479 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3480 errorEnd = SimpleCharStream.getPosition() + 1;
3481 {if (true) throw e;}
3483 throw new Error("Missing return statement in function");
3487 * A Switch statement with : ... endswitch;
3488 * @param start the begin offset of the switch
3489 * @param end the end offset of the switch
3491 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3493 final ArrayList cases = new ArrayList();
3494 jj_consume_token(COLON);
3496 setMarker(fileToParse,
3497 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3501 "Line " + token.beginLine);
3502 } catch (CoreException e) {
3503 PHPeclipsePlugin.log(e);
3507 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3513 jj_la1[94] = jj_gen;
3516 cas = switchLabel0();
3520 jj_consume_token(ENDSWITCH);
3521 } catch (ParseException e) {
3522 errorMessage = "'endswitch' expected";
3524 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3525 errorEnd = SimpleCharStream.getPosition() + 1;
3526 {if (true) throw e;}
3529 jj_consume_token(SEMICOLON);
3530 AbstractCase[] abcase = new AbstractCase[cases.size()];
3531 cases.toArray(abcase);
3532 {if (true) return abcase;}
3533 } catch (ParseException e) {
3534 errorMessage = "';' expected after 'endswitch' keyword";
3536 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3537 errorEnd = SimpleCharStream.getPosition() + 1;
3538 {if (true) throw e;}
3540 throw new Error("Missing return statement in function");
3543 static final public AbstractCase switchLabel0() throws ParseException {
3544 final Expression expr;
3545 Statement statement;
3546 final ArrayList stmts = new ArrayList();
3547 final int pos = SimpleCharStream.getPosition();
3548 expr = SwitchLabel();
3551 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3585 case INTEGER_LITERAL:
3586 case FLOATING_POINT_LITERAL:
3587 case STRING_LITERAL:
3596 jj_la1[95] = jj_gen;
3599 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3632 case INTEGER_LITERAL:
3633 case FLOATING_POINT_LITERAL:
3634 case STRING_LITERAL:
3640 statement = BlockStatementNoBreak();
3641 stmts.add(statement);
3644 statement = htmlBlock();
3645 stmts.add(statement);
3648 jj_la1[96] = jj_gen;
3649 jj_consume_token(-1);
3650 throw new ParseException();
3653 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3655 statement = BreakStatement();
3656 stmts.add(statement);
3659 jj_la1[97] = jj_gen;
3662 Statement[] stmtsArray = new Statement[stmts.size()];
3663 stmts.toArray(stmtsArray);
3664 if (expr == null) {//it's a default
3665 {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3667 {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3668 throw new Error("Missing return statement in function");
3673 * case Expression() :
3675 * @return the if it was a case and null if not
3677 static final public Expression SwitchLabel() throws ParseException {
3678 final Expression expr;
3679 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3681 token = jj_consume_token(CASE);
3683 expr = Expression();
3684 } catch (ParseException e) {
3685 if (errorMessage != null) {if (true) throw e;}
3686 errorMessage = "expression expected after 'case' keyword";
3688 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3689 errorEnd = SimpleCharStream.getPosition() + 1;
3690 {if (true) throw e;}
3693 jj_consume_token(COLON);
3694 {if (true) return expr;}
3695 } catch (ParseException e) {
3696 errorMessage = "':' expected after case expression";
3698 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3699 errorEnd = SimpleCharStream.getPosition() + 1;
3700 {if (true) throw e;}
3704 token = jj_consume_token(_DEFAULT);
3706 jj_consume_token(COLON);
3707 {if (true) return null;}
3708 } catch (ParseException e) {
3709 errorMessage = "':' expected after 'default' keyword";
3711 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3712 errorEnd = SimpleCharStream.getPosition() + 1;
3713 {if (true) throw e;}
3717 jj_la1[98] = jj_gen;
3718 jj_consume_token(-1);
3719 throw new ParseException();
3721 throw new Error("Missing return statement in function");
3724 static final public Break BreakStatement() throws ParseException {
3725 Expression expression = null;
3726 final int start = SimpleCharStream.getPosition();
3727 jj_consume_token(BREAK);
3728 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3744 case INTEGER_LITERAL:
3745 case FLOATING_POINT_LITERAL:
3746 case STRING_LITERAL:
3750 expression = Expression();
3753 jj_la1[99] = jj_gen;
3757 jj_consume_token(SEMICOLON);
3758 } catch (ParseException e) {
3759 errorMessage = "';' expected after 'break' keyword";
3761 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3762 errorEnd = SimpleCharStream.getPosition() + 1;
3763 {if (true) throw e;}
3765 {if (true) return new Break(expression, start, SimpleCharStream.getPosition());}
3766 throw new Error("Missing return statement in function");
3769 static final public IfStatement IfStatement() throws ParseException {
3770 final int pos = SimpleCharStream.getPosition();
3771 Expression condition;
3772 IfStatement ifStatement;
3773 jj_consume_token(IF);
3774 condition = Condition("if");
3775 ifStatement = IfStatement0(condition, pos,pos+2);
3776 {if (true) return ifStatement;}
3777 throw new Error("Missing return statement in function");
3780 static final public Expression Condition(final String keyword) throws ParseException {
3781 final Expression condition;
3783 jj_consume_token(LPAREN);
3784 } catch (ParseException e) {
3785 errorMessage = "'(' expected after " + keyword + " keyword";
3787 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length();
3788 errorEnd = errorStart +1;
3789 processParseException(e);
3791 condition = Expression();
3793 jj_consume_token(RPAREN);
3794 } catch (ParseException e) {
3795 errorMessage = "')' expected after " + keyword + " keyword";
3797 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3798 errorEnd = SimpleCharStream.getPosition() + 1;
3799 processParseException(e);
3801 {if (true) return condition;}
3802 throw new Error("Missing return statement in function");
3805 static final public IfStatement IfStatement0(Expression condition, final int start,final int end) throws ParseException {
3806 Statement statement;
3808 final Statement[] statementsArray;
3809 ElseIf elseifStatement;
3810 Else elseStatement = null;
3812 final ArrayList elseIfList = new ArrayList();
3814 int pos = SimpleCharStream.getPosition();
3816 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3818 jj_consume_token(COLON);
3819 stmts = new ArrayList();
3822 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3855 case INTEGER_LITERAL:
3856 case FLOATING_POINT_LITERAL:
3857 case STRING_LITERAL:
3866 jj_la1[100] = jj_gen;
3869 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3901 case INTEGER_LITERAL:
3902 case FLOATING_POINT_LITERAL:
3903 case STRING_LITERAL:
3909 statement = Statement();
3910 stmts.add(statement);
3913 statement = htmlBlock();
3914 stmts.add(statement);
3917 jj_la1[101] = jj_gen;
3918 jj_consume_token(-1);
3919 throw new ParseException();
3922 endStatements = SimpleCharStream.getPosition();
3925 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3930 jj_la1[102] = jj_gen;
3933 elseifStatement = ElseIfStatementColon();
3934 elseIfList.add(elseifStatement);
3936 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3938 elseStatement = ElseStatementColon();
3941 jj_la1[103] = jj_gen;
3945 setMarker(fileToParse,
3946 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
3950 "Line " + token.beginLine);
3951 } catch (CoreException e) {
3952 PHPeclipsePlugin.log(e);
3955 jj_consume_token(ENDIF);
3956 } catch (ParseException e) {
3957 errorMessage = "'endif' expected";
3959 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3960 errorEnd = SimpleCharStream.getPosition() + 1;
3961 {if (true) throw e;}
3964 jj_consume_token(SEMICOLON);
3965 } catch (ParseException e) {
3966 errorMessage = "';' expected after 'endif' keyword";
3968 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3969 errorEnd = SimpleCharStream.getPosition() + 1;
3970 {if (true) throw e;}
3972 elseIfs = new ElseIf[elseIfList.size()];
3973 elseIfList.toArray(elseIfs);
3974 if (stmts.size() == 1) {
3975 {if (true) return new IfStatement(condition,
3976 (Statement) stmts.get(0),
3980 SimpleCharStream.getPosition());}
3982 statementsArray = new Statement[stmts.size()];
3983 stmts.toArray(statementsArray);
3984 {if (true) return new IfStatement(condition,
3985 new Block(statementsArray,pos,endStatements),
3989 SimpleCharStream.getPosition());}
4024 case INTEGER_LITERAL:
4025 case FLOATING_POINT_LITERAL:
4026 case STRING_LITERAL:
4032 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4064 case INTEGER_LITERAL:
4065 case FLOATING_POINT_LITERAL:
4066 case STRING_LITERAL:
4078 jj_la1[104] = jj_gen;
4079 jj_consume_token(-1);
4080 throw new ParseException();
4084 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4089 jj_la1[105] = jj_gen;
4092 elseifStatement = ElseIfStatement();
4093 elseIfList.add(elseifStatement);
4095 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4097 jj_consume_token(ELSE);
4099 pos = SimpleCharStream.getPosition();
4100 statement = Statement();
4101 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4102 } catch (ParseException e) {
4103 if (errorMessage != null) {
4104 {if (true) throw e;}
4106 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4108 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4109 errorEnd = SimpleCharStream.getPosition() + 1;
4110 {if (true) throw e;}
4114 jj_la1[106] = jj_gen;
4117 elseIfs = new ElseIf[elseIfList.size()];
4118 elseIfList.toArray(elseIfs);
4119 {if (true) return new IfStatement(condition,
4124 SimpleCharStream.getPosition());}
4127 jj_la1[107] = jj_gen;
4128 jj_consume_token(-1);
4129 throw new ParseException();
4131 throw new Error("Missing return statement in function");
4134 static final public ElseIf ElseIfStatementColon() throws ParseException {
4135 Expression condition;
4136 Statement statement;
4137 final ArrayList list = new ArrayList();
4138 final int pos = SimpleCharStream.getPosition();
4139 jj_consume_token(ELSEIF);
4140 condition = Condition("elseif");
4141 jj_consume_token(COLON);
4144 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4177 case INTEGER_LITERAL:
4178 case FLOATING_POINT_LITERAL:
4179 case STRING_LITERAL:
4188 jj_la1[108] = jj_gen;
4191 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4223 case INTEGER_LITERAL:
4224 case FLOATING_POINT_LITERAL:
4225 case STRING_LITERAL:
4231 statement = Statement();
4232 list.add(statement);
4235 statement = htmlBlock();
4236 list.add(statement);
4239 jj_la1[109] = jj_gen;
4240 jj_consume_token(-1);
4241 throw new ParseException();
4244 Statement[] stmtsArray = new Statement[list.size()];
4245 list.toArray(stmtsArray);
4246 {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4247 throw new Error("Missing return statement in function");
4250 static final public Else ElseStatementColon() throws ParseException {
4251 Statement statement;
4252 final ArrayList list = new ArrayList();
4253 final int pos = SimpleCharStream.getPosition();
4254 jj_consume_token(ELSE);
4255 jj_consume_token(COLON);
4258 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4291 case INTEGER_LITERAL:
4292 case FLOATING_POINT_LITERAL:
4293 case STRING_LITERAL:
4302 jj_la1[110] = jj_gen;
4305 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4337 case INTEGER_LITERAL:
4338 case FLOATING_POINT_LITERAL:
4339 case STRING_LITERAL:
4345 statement = Statement();
4346 list.add(statement);
4349 statement = htmlBlock();
4350 list.add(statement);
4353 jj_la1[111] = jj_gen;
4354 jj_consume_token(-1);
4355 throw new ParseException();
4358 Statement[] stmtsArray = new Statement[list.size()];
4359 list.toArray(stmtsArray);
4360 {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4361 throw new Error("Missing return statement in function");
4364 static final public ElseIf ElseIfStatement() throws ParseException {
4365 Expression condition;
4366 Statement statement;
4367 final ArrayList list = new ArrayList();
4368 final int pos = SimpleCharStream.getPosition();
4369 jj_consume_token(ELSEIF);
4370 condition = Condition("elseif");
4371 statement = Statement();
4372 list.add(statement);/*todo:do better*/
4373 Statement[] stmtsArray = new Statement[list.size()];
4374 list.toArray(stmtsArray);
4375 {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4376 throw new Error("Missing return statement in function");
4379 static final public WhileStatement WhileStatement() throws ParseException {
4380 final Expression condition;
4381 final Statement action;
4382 final int pos = SimpleCharStream.getPosition();
4383 jj_consume_token(WHILE);
4384 condition = Condition("while");
4385 action = WhileStatement0(pos,pos + 5);
4386 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4387 throw new Error("Missing return statement in function");
4390 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4391 Statement statement;
4392 final ArrayList stmts = new ArrayList();
4393 final int pos = SimpleCharStream.getPosition();
4394 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4396 jj_consume_token(COLON);
4399 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4431 case INTEGER_LITERAL:
4432 case FLOATING_POINT_LITERAL:
4433 case STRING_LITERAL:
4442 jj_la1[112] = jj_gen;
4445 statement = Statement();
4446 stmts.add(statement);
4449 setMarker(fileToParse,
4450 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4454 "Line " + token.beginLine);
4455 } catch (CoreException e) {
4456 PHPeclipsePlugin.log(e);
4459 jj_consume_token(ENDWHILE);
4460 } catch (ParseException e) {
4461 errorMessage = "'endwhile' expected";
4463 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4464 errorEnd = SimpleCharStream.getPosition() + 1;
4465 {if (true) throw e;}
4468 jj_consume_token(SEMICOLON);
4469 Statement[] stmtsArray = new Statement[stmts.size()];
4470 stmts.toArray(stmtsArray);
4471 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4472 } catch (ParseException e) {
4473 errorMessage = "';' expected after 'endwhile' keyword";
4475 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4476 errorEnd = SimpleCharStream.getPosition() + 1;
4477 {if (true) throw e;}
4511 case INTEGER_LITERAL:
4512 case FLOATING_POINT_LITERAL:
4513 case STRING_LITERAL:
4519 statement = Statement();
4520 {if (true) return statement;}
4523 jj_la1[113] = jj_gen;
4524 jj_consume_token(-1);
4525 throw new ParseException();
4527 throw new Error("Missing return statement in function");
4530 static final public DoStatement DoStatement() throws ParseException {
4531 final Statement action;
4532 final Expression condition;
4533 final int pos = SimpleCharStream.getPosition();
4534 jj_consume_token(DO);
4535 action = Statement();
4536 jj_consume_token(WHILE);
4537 condition = Condition("while");
4539 jj_consume_token(SEMICOLON);
4540 {if (true) return new DoStatement(condition,action,pos,SimpleCharStream.getPosition());}
4541 } catch (ParseException e) {
4542 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4544 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4545 errorEnd = SimpleCharStream.getPosition() + 1;
4546 {if (true) throw e;}
4548 throw new Error("Missing return statement in function");
4551 static final public ForeachStatement ForeachStatement() throws ParseException {
4552 Statement statement;
4553 Expression expression;
4554 final int pos = SimpleCharStream.getPosition();
4555 ArrayVariableDeclaration variable;
4556 jj_consume_token(FOREACH);
4558 jj_consume_token(LPAREN);
4559 } catch (ParseException e) {
4560 errorMessage = "'(' expected after 'foreach' keyword";
4562 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4563 errorEnd = SimpleCharStream.getPosition() + 1;
4564 {if (true) throw e;}
4567 expression = Expression();
4568 } catch (ParseException e) {
4569 errorMessage = "variable expected";
4571 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4572 errorEnd = SimpleCharStream.getPosition() + 1;
4573 {if (true) throw e;}
4576 jj_consume_token(AS);
4577 } catch (ParseException e) {
4578 errorMessage = "'as' expected";
4580 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4581 errorEnd = SimpleCharStream.getPosition() + 1;
4582 {if (true) throw e;}
4585 variable = ArrayVariable();
4586 } catch (ParseException e) {
4587 errorMessage = "variable expected";
4589 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4590 errorEnd = SimpleCharStream.getPosition() + 1;
4591 {if (true) throw e;}
4594 jj_consume_token(RPAREN);
4595 } catch (ParseException e) {
4596 errorMessage = "')' expected after 'foreach' keyword";
4598 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4599 errorEnd = SimpleCharStream.getPosition() + 1;
4600 {if (true) throw e;}
4603 statement = Statement();
4604 } catch (ParseException e) {
4605 if (errorMessage != null) {if (true) throw e;}
4606 errorMessage = "statement expected";
4608 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4609 errorEnd = SimpleCharStream.getPosition() + 1;
4610 {if (true) throw e;}
4612 {if (true) return new ForeachStatement(expression,
4616 SimpleCharStream.getPosition());}
4617 throw new Error("Missing return statement in function");
4620 static final public ForStatement ForStatement() throws ParseException {
4622 final int pos = SimpleCharStream.getPosition();
4623 Statement[] initializations = null;
4624 Expression condition = null;
4625 Statement[] increments = null;
4627 final ArrayList list = new ArrayList();
4628 final int startBlock, endBlock;
4629 token = jj_consume_token(FOR);
4631 jj_consume_token(LPAREN);
4632 } catch (ParseException e) {
4633 errorMessage = "'(' expected after 'for' keyword";
4635 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4636 errorEnd = SimpleCharStream.getPosition() + 1;
4637 {if (true) throw e;}
4639 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4647 initializations = ForInit();
4650 jj_la1[114] = jj_gen;
4653 jj_consume_token(SEMICOLON);
4654 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4670 case INTEGER_LITERAL:
4671 case FLOATING_POINT_LITERAL:
4672 case STRING_LITERAL:
4676 condition = Expression();
4679 jj_la1[115] = jj_gen;
4682 jj_consume_token(SEMICOLON);
4683 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4691 increments = StatementExpressionList();
4694 jj_la1[116] = jj_gen;
4697 jj_consume_token(RPAREN);
4698 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4730 case INTEGER_LITERAL:
4731 case FLOATING_POINT_LITERAL:
4732 case STRING_LITERAL:
4738 action = Statement();
4739 {if (true) return new ForStatement(initializations,condition,increments,action,pos,SimpleCharStream.getPosition());}
4742 jj_consume_token(COLON);
4743 startBlock = SimpleCharStream.getPosition();
4746 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4778 case INTEGER_LITERAL:
4779 case FLOATING_POINT_LITERAL:
4780 case STRING_LITERAL:
4789 jj_la1[117] = jj_gen;
4792 action = Statement();
4796 setMarker(fileToParse,
4797 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
4799 pos+token.image.length(),
4801 "Line " + token.beginLine);
4802 } catch (CoreException e) {
4803 PHPeclipsePlugin.log(e);
4805 endBlock = SimpleCharStream.getPosition();
4807 jj_consume_token(ENDFOR);
4808 } catch (ParseException e) {
4809 errorMessage = "'endfor' expected";
4811 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4812 errorEnd = SimpleCharStream.getPosition() + 1;
4813 {if (true) throw e;}
4816 jj_consume_token(SEMICOLON);
4817 Statement[] stmtsArray = new Statement[list.size()];
4818 list.toArray(stmtsArray);
4819 {if (true) return new ForStatement(initializations,condition,increments,new Block(stmtsArray,startBlock,endBlock),pos,SimpleCharStream.getPosition());}
4820 } catch (ParseException e) {
4821 errorMessage = "';' expected after 'endfor' keyword";
4823 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4824 errorEnd = SimpleCharStream.getPosition() + 1;
4825 {if (true) throw e;}
4829 jj_la1[118] = jj_gen;
4830 jj_consume_token(-1);
4831 throw new ParseException();
4833 throw new Error("Missing return statement in function");
4836 static final public Statement[] ForInit() throws ParseException {
4837 Statement[] statements;
4838 if (jj_2_8(2147483647)) {
4839 statements = LocalVariableDeclaration();
4840 {if (true) return statements;}
4842 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4850 statements = StatementExpressionList();
4851 {if (true) return statements;}
4854 jj_la1[119] = jj_gen;
4855 jj_consume_token(-1);
4856 throw new ParseException();
4859 throw new Error("Missing return statement in function");
4862 static final public Statement[] StatementExpressionList() throws ParseException {
4863 final ArrayList list = new ArrayList();
4865 expr = StatementExpression();
4869 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4874 jj_la1[120] = jj_gen;
4877 jj_consume_token(COMMA);
4878 StatementExpression();
4881 Statement[] stmtsArray = new Statement[list.size()];
4882 list.toArray(stmtsArray);
4883 {if (true) return stmtsArray;}
4884 throw new Error("Missing return statement in function");
4887 static final public Continue ContinueStatement() throws ParseException {
4888 Expression expr = null;
4889 final int pos = SimpleCharStream.getPosition();
4890 jj_consume_token(CONTINUE);
4891 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4907 case INTEGER_LITERAL:
4908 case FLOATING_POINT_LITERAL:
4909 case STRING_LITERAL:
4913 expr = Expression();
4916 jj_la1[121] = jj_gen;
4920 jj_consume_token(SEMICOLON);
4921 {if (true) return new Continue(expr,pos,SimpleCharStream.getPosition());}
4922 } catch (ParseException e) {
4923 errorMessage = "';' expected after 'continue' statement";
4925 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4926 errorEnd = SimpleCharStream.getPosition() + 1;
4927 {if (true) throw e;}
4929 throw new Error("Missing return statement in function");
4932 static final public ReturnStatement ReturnStatement() throws ParseException {
4933 Expression expr = null;
4934 final int pos = SimpleCharStream.getPosition();
4935 jj_consume_token(RETURN);
4936 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4952 case INTEGER_LITERAL:
4953 case FLOATING_POINT_LITERAL:
4954 case STRING_LITERAL:
4958 expr = Expression();
4961 jj_la1[122] = jj_gen;
4965 jj_consume_token(SEMICOLON);
4966 {if (true) return new ReturnStatement(expr,pos,SimpleCharStream.getPosition());}
4967 } catch (ParseException e) {
4968 errorMessage = "';' expected after 'return' statement";
4970 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4971 errorEnd = SimpleCharStream.getPosition() + 1;
4972 {if (true) throw e;}
4974 throw new Error("Missing return statement in function");
4977 static final private boolean jj_2_1(int xla) {
4978 jj_la = xla; jj_lastpos = jj_scanpos = token;
4979 boolean retval = !jj_3_1();
4984 static final private boolean jj_2_2(int xla) {
4985 jj_la = xla; jj_lastpos = jj_scanpos = token;
4986 boolean retval = !jj_3_2();
4991 static final private boolean jj_2_3(int xla) {
4992 jj_la = xla; jj_lastpos = jj_scanpos = token;
4993 boolean retval = !jj_3_3();
4998 static final private boolean jj_2_4(int xla) {
4999 jj_la = xla; jj_lastpos = jj_scanpos = token;
5000 boolean retval = !jj_3_4();
5005 static final private boolean jj_2_5(int xla) {
5006 jj_la = xla; jj_lastpos = jj_scanpos = token;
5007 boolean retval = !jj_3_5();
5012 static final private boolean jj_2_6(int xla) {
5013 jj_la = xla; jj_lastpos = jj_scanpos = token;
5014 boolean retval = !jj_3_6();
5019 static final private boolean jj_2_7(int xla) {
5020 jj_la = xla; jj_lastpos = jj_scanpos = token;
5021 boolean retval = !jj_3_7();
5026 static final private boolean jj_2_8(int xla) {
5027 jj_la = xla; jj_lastpos = jj_scanpos = token;
5028 boolean retval = !jj_3_8();
5033 static final private boolean jj_3R_77() {
5034 if (jj_scan_token(BOOLEAN)) return true;
5035 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5039 static final private boolean jj_3R_76() {
5040 if (jj_scan_token(BOOL)) return true;
5041 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5045 static final private boolean jj_3R_43() {
5046 if (jj_3R_52()) return true;
5047 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5051 static final private boolean jj_3R_75() {
5052 if (jj_scan_token(STRING)) return true;
5053 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5057 static final private boolean jj_3R_52() {
5076 if (jj_3R_83()) return true;
5077 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5078 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5079 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5080 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5081 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5082 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5083 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5084 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5085 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5089 static final private boolean jj_3R_84() {
5090 if (jj_scan_token(PRINT)) return true;
5091 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5092 if (jj_3R_45()) return true;
5093 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5097 static final private boolean jj_3_4() {
5098 if (jj_scan_token(LPAREN)) return true;
5099 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5104 if (jj_3R_44()) return true;
5105 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5106 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5107 if (jj_scan_token(RPAREN)) return true;
5108 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5112 static final private boolean jj_3R_165() {
5113 if (jj_scan_token(LPAREN)) return true;
5114 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5115 if (jj_3R_45()) return true;
5116 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5117 if (jj_scan_token(RPAREN)) return true;
5118 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5122 static final private boolean jj_3R_164() {
5123 if (jj_3R_169()) return true;
5124 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5128 static final private boolean jj_3R_163() {
5129 if (jj_3R_168()) return true;
5130 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5134 static final private boolean jj_3R_162() {
5135 if (jj_3R_167()) return true;
5136 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5140 static final private boolean jj_3R_158() {
5151 if (jj_3R_165()) return true;
5152 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5153 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5154 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5155 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5156 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5160 static final private boolean jj_3R_161() {
5161 if (jj_scan_token(BANG)) return true;
5162 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5163 if (jj_3R_139()) return true;
5164 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5168 static final private boolean jj_3R_160() {
5169 if (jj_scan_token(DECR)) return true;
5170 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5174 static final private boolean jj_3R_159() {
5175 if (jj_scan_token(INCR)) return true;
5176 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5180 static final private boolean jj_3R_157() {
5185 if (jj_3R_160()) return true;
5186 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5187 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5188 if (jj_3R_166()) return true;
5189 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5193 static final private boolean jj_3R_152() {
5194 if (jj_3R_158()) return true;
5195 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5199 static final private boolean jj_3R_151() {
5200 if (jj_3R_157()) return true;
5201 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5205 static final private boolean jj_3R_156() {
5206 if (jj_scan_token(MINUS)) return true;
5207 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5211 static final private boolean jj_3R_155() {
5212 if (jj_scan_token(PLUS)) return true;
5213 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5217 static final private boolean jj_3R_148() {
5224 if (jj_3R_152()) return true;
5225 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5226 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5227 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5231 static final private boolean jj_3R_150() {
5236 if (jj_3R_156()) return true;
5237 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5238 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5239 if (jj_3R_139()) return true;
5240 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5244 static final private boolean jj_3R_154() {
5245 if (jj_3R_148()) return true;
5246 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5250 static final private boolean jj_3R_149() {
5255 if (jj_3R_154()) return true;
5256 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5257 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5261 static final private boolean jj_3R_153() {
5262 if (jj_scan_token(AT)) return true;
5263 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5264 if (jj_3R_149()) return true;
5265 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5269 static final private boolean jj_3R_144() {
5270 if (jj_3R_149()) return true;
5271 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5275 static final private boolean jj_3R_139() {
5280 if (jj_3R_144()) return true;
5281 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5282 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5286 static final private boolean jj_3R_143() {
5287 if (jj_scan_token(BIT_AND)) return true;
5288 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5289 if (jj_3R_148()) return true;
5290 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5294 static final private boolean jj_3R_87() {
5295 if (jj_scan_token(ASSIGN)) return true;
5296 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5297 if (jj_3R_45()) return true;
5298 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5302 static final private boolean jj_3R_147() {
5303 if (jj_scan_token(REMAINDER)) return true;
5304 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5308 static final private boolean jj_3R_146() {
5309 if (jj_scan_token(SLASH)) return true;
5310 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5314 static final private boolean jj_3R_145() {
5315 if (jj_scan_token(STAR)) return true;
5316 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5320 static final private boolean jj_3R_140() {
5327 if (jj_3R_147()) return true;
5328 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5329 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5330 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5331 if (jj_3R_139()) return true;
5332 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5336 static final private boolean jj_3R_134() {
5337 if (jj_3R_139()) return true;
5338 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5342 if (jj_3R_140()) { jj_scanpos = xsp; break; }
5343 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5348 static final private boolean jj_3R_142() {
5349 if (jj_scan_token(MINUS)) return true;
5350 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5354 static final private boolean jj_3R_141() {
5355 if (jj_scan_token(PLUS)) return true;
5356 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5360 static final private boolean jj_3R_135() {
5365 if (jj_3R_142()) return true;
5366 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5367 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5368 if (jj_3R_134()) return true;
5369 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5373 static final private boolean jj_3R_57() {
5374 if (jj_3R_50()) return true;
5375 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5378 if (jj_3R_87()) jj_scanpos = xsp;
5379 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5383 static final private boolean jj_3R_128() {
5384 if (jj_3R_134()) return true;
5385 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5389 if (jj_3R_135()) { jj_scanpos = xsp; break; }
5390 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5395 static final private boolean jj_3_7() {
5396 if (jj_3R_46()) return true;
5397 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5401 static final private boolean jj_3R_198() {
5402 if (jj_scan_token(COMMA)) return true;
5403 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5407 static final private boolean jj_3_2() {
5408 if (jj_scan_token(COMMA)) return true;
5409 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5410 if (jj_3R_41()) return true;
5411 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5415 static final private boolean jj_3R_197() {
5416 if (jj_3R_41()) return true;
5417 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5421 if (jj_3_2()) { jj_scanpos = xsp; break; }
5422 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5427 static final private boolean jj_3R_138() {
5428 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
5429 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5433 static final private boolean jj_3R_58() {
5434 if (jj_scan_token(COMMA)) return true;
5435 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5436 if (jj_3R_57()) return true;
5437 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5441 static final private boolean jj_3R_137() {
5442 if (jj_scan_token(RSIGNEDSHIFT)) return true;
5443 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5447 static final private boolean jj_3R_136() {
5448 if (jj_scan_token(LSHIFT)) return true;
5449 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5453 static final private boolean jj_3R_129() {
5460 if (jj_3R_138()) return true;
5461 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5462 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5463 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5464 if (jj_3R_128()) return true;
5465 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5469 static final private boolean jj_3R_47() {
5470 if (jj_3R_57()) return true;
5471 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5475 if (jj_3R_58()) { jj_scanpos = xsp; break; }
5476 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5481 static final private boolean jj_3R_121() {
5482 if (jj_3R_128()) return true;
5483 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5487 if (jj_3R_129()) { jj_scanpos = xsp; break; }
5488 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5493 static final private boolean jj_3_6() {
5494 if (jj_3R_45()) return true;
5495 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5496 if (jj_scan_token(SEMICOLON)) return true;
5497 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5501 static final private boolean jj_3R_192() {
5502 if (jj_scan_token(LPAREN)) return true;
5503 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5506 if (jj_3R_197()) jj_scanpos = xsp;
5507 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5509 if (jj_3R_198()) jj_scanpos = xsp;
5510 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5511 if (jj_scan_token(RPAREN)) return true;
5512 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5516 static final private boolean jj_3R_133() {
5517 if (jj_scan_token(GE)) return true;
5518 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5522 static final private boolean jj_3R_132() {
5523 if (jj_scan_token(LE)) return true;
5524 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5528 static final private boolean jj_3R_131() {
5529 if (jj_scan_token(GT)) return true;
5530 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5534 static final private boolean jj_3R_201() {
5535 if (jj_scan_token(ARRAYASSIGN)) return true;
5536 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5537 if (jj_3R_45()) return true;
5538 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5542 static final private boolean jj_3R_130() {
5543 if (jj_scan_token(LT)) return true;
5544 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5548 static final private boolean jj_3R_41() {
5549 if (jj_3R_45()) return true;
5550 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5553 if (jj_3R_201()) jj_scanpos = xsp;
5554 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5558 static final private boolean jj_3R_122() {
5567 if (jj_3R_133()) return true;
5568 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5569 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5570 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5571 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5572 if (jj_3R_121()) return true;
5573 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5577 static final private boolean jj_3R_119() {
5578 if (jj_3R_121()) return true;
5579 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5583 if (jj_3R_122()) { jj_scanpos = xsp; break; }
5584 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5589 static final private boolean jj_3R_203() {
5590 if (jj_scan_token(COMMA)) return true;
5591 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5592 if (jj_3R_45()) return true;
5593 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5597 static final private boolean jj_3R_202() {
5598 if (jj_3R_45()) return true;
5599 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5603 if (jj_3R_203()) { jj_scanpos = xsp; break; }
5604 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5609 static final private boolean jj_3R_127() {
5610 if (jj_scan_token(TRIPLEEQUAL)) return true;
5611 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5615 static final private boolean jj_3R_200() {
5616 if (jj_3R_202()) return true;
5617 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5621 static final private boolean jj_3R_126() {
5622 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5623 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5627 static final private boolean jj_3R_125() {
5628 if (jj_scan_token(NOT_EQUAL)) return true;
5629 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5633 static final private boolean jj_3R_124() {
5634 if (jj_scan_token(DIF)) return true;
5635 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5639 static final private boolean jj_3R_123() {
5640 if (jj_scan_token(EQUAL_EQUAL)) return true;
5641 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5645 static final private boolean jj_3R_120() {
5656 if (jj_3R_127()) return true;
5657 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5658 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5659 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5660 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5661 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5662 if (jj_3R_119()) return true;
5663 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5667 static final private boolean jj_3R_93() {
5668 if (jj_3R_52()) return true;
5669 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5673 static final private boolean jj_3R_117() {
5674 if (jj_3R_119()) return true;
5675 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5679 if (jj_3R_120()) { jj_scanpos = xsp; break; }
5680 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5685 static final private boolean jj_3R_108() {
5686 if (jj_scan_token(LBRACE)) return true;
5687 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5688 if (jj_3R_45()) return true;
5689 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5690 if (jj_scan_token(RBRACE)) return true;
5691 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5695 static final private boolean jj_3R_199() {
5696 if (jj_scan_token(LPAREN)) return true;
5697 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5700 if (jj_3R_200()) jj_scanpos = xsp;
5701 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5702 if (jj_scan_token(RPAREN)) return true;
5703 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5707 static final private boolean jj_3R_91() {
5708 if (jj_scan_token(DOLLAR_ID)) return true;
5709 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5713 static final private boolean jj_3R_118() {
5714 if (jj_scan_token(BIT_AND)) return true;
5715 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5716 if (jj_3R_117()) return true;
5717 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5721 static final private boolean jj_3R_177() {
5722 if (jj_scan_token(NULL)) return true;
5723 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5727 static final private boolean jj_3R_90() {
5728 if (jj_scan_token(DOLLAR)) return true;
5729 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5730 if (jj_3R_59()) return true;
5731 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5735 static final private boolean jj_3R_176() {
5736 if (jj_scan_token(FALSE)) return true;
5737 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5741 static final private boolean jj_3R_115() {
5742 if (jj_3R_117()) return true;
5743 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5747 if (jj_3R_118()) { jj_scanpos = xsp; break; }
5748 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5753 static final private boolean jj_3R_175() {
5754 if (jj_scan_token(TRUE)) return true;
5755 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5759 static final private boolean jj_3R_174() {
5760 if (jj_scan_token(STRING_LITERAL)) return true;
5761 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5765 static final private boolean jj_3R_173() {
5766 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
5767 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5771 static final private boolean jj_3R_169() {
5784 if (jj_3R_177()) return true;
5785 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5786 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5787 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5788 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5789 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5790 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5794 static final private boolean jj_3R_172() {
5795 if (jj_scan_token(INTEGER_LITERAL)) return true;
5796 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5800 static final private boolean jj_3R_89() {
5801 if (jj_scan_token(IDENTIFIER)) return true;
5802 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5805 if (jj_3R_108()) jj_scanpos = xsp;
5806 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5810 static final private boolean jj_3R_116() {
5811 if (jj_scan_token(XOR)) return true;
5812 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5813 if (jj_3R_115()) return true;
5814 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5818 static final private boolean jj_3R_113() {
5819 if (jj_3R_115()) return true;
5820 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5824 if (jj_3R_116()) { jj_scanpos = xsp; break; }
5825 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5830 static final private boolean jj_3R_92() {
5831 if (jj_3R_45()) return true;
5832 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5836 static final private boolean jj_3R_60() {
5841 if (jj_3R_93()) return true;
5842 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5843 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5847 static final private boolean jj_3R_88() {
5848 if (jj_scan_token(LBRACE)) return true;
5849 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5850 if (jj_3R_45()) return true;
5851 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5852 if (jj_scan_token(RBRACE)) return true;
5853 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5857 static final private boolean jj_3R_59() {
5866 if (jj_3R_91()) return true;
5867 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5868 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5869 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5870 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5874 static final private boolean jj_3R_46() {
5875 if (jj_scan_token(IDENTIFIER)) return true;
5876 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5877 if (jj_scan_token(COLON)) return true;
5878 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5882 static final private boolean jj_3_8() {
5883 if (jj_3R_47()) return true;
5884 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5888 static final private boolean jj_3R_98() {
5889 if (jj_scan_token(LBRACE)) return true;
5890 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5891 if (jj_3R_45()) return true;
5892 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5893 if (jj_scan_token(RBRACE)) return true;
5894 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5898 static final private boolean jj_3R_114() {
5899 if (jj_scan_token(BIT_OR)) return true;
5900 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5901 if (jj_3R_113()) return true;
5902 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5906 static final private boolean jj_3R_109() {
5907 if (jj_3R_113()) return true;
5908 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5912 if (jj_3R_114()) { jj_scanpos = xsp; break; }
5913 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5918 static final private boolean jj_3R_49() {
5919 if (jj_scan_token(LBRACKET)) return true;
5920 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5923 if (jj_3R_60()) jj_scanpos = xsp;
5924 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5925 if (jj_scan_token(RBRACKET)) return true;
5926 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5930 static final private boolean jj_3R_95() {
5931 if (jj_scan_token(DOLLAR)) return true;
5932 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5933 if (jj_3R_59()) return true;
5934 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5938 static final private boolean jj_3R_110() {
5939 if (jj_scan_token(DOT)) return true;
5940 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5941 if (jj_3R_109()) return true;
5942 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5946 static final private boolean jj_3R_104() {
5947 if (jj_3R_109()) return true;
5948 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5952 if (jj_3R_110()) { jj_scanpos = xsp; break; }
5953 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5958 static final private boolean jj_3R_94() {
5959 if (jj_scan_token(DOLLAR_ID)) return true;
5960 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5963 if (jj_3R_98()) jj_scanpos = xsp;
5964 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5968 static final private boolean jj_3R_61() {
5973 if (jj_3R_95()) return true;
5974 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5975 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5979 static final private boolean jj_3R_48() {
5980 if (jj_scan_token(CLASSACCESS)) return true;
5981 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5982 if (jj_3R_59()) return true;
5983 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5987 static final private boolean jj_3R_40() {
5992 if (jj_3R_49()) return true;
5993 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5994 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5998 static final private boolean jj_3R_112() {
5999 if (jj_scan_token(_ANDL)) return true;
6000 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6004 static final private boolean jj_3R_111() {
6005 if (jj_scan_token(AND_AND)) return true;
6006 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6010 static final private boolean jj_3R_196() {
6011 if (jj_3R_40()) return true;
6012 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6016 static final private boolean jj_3R_105() {
6021 if (jj_3R_112()) return true;
6022 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6023 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6024 if (jj_3R_104()) return true;
6025 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6029 static final private boolean jj_3R_195() {
6030 if (jj_3R_199()) return true;
6031 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6035 static final private boolean jj_3R_188() {
6040 if (jj_3R_196()) return true;
6041 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6042 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6046 static final private boolean jj_3R_97() {
6047 if (jj_scan_token(HOOK)) return true;
6048 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6049 if (jj_3R_45()) return true;
6050 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6051 if (jj_scan_token(COLON)) return true;
6052 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6053 if (jj_3R_86()) return true;
6054 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6058 static final private boolean jj_3R_102() {
6059 if (jj_3R_104()) return true;
6060 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6064 if (jj_3R_105()) { jj_scanpos = xsp; break; }
6065 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6070 static final private boolean jj_3_1() {
6071 if (jj_3R_40()) return true;
6072 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6076 static final private boolean jj_3R_187() {
6077 if (jj_3R_50()) return true;
6078 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6082 static final private boolean jj_3R_107() {
6083 if (jj_scan_token(_ORL)) return true;
6084 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6088 static final private boolean jj_3R_106() {
6089 if (jj_scan_token(OR_OR)) return true;
6090 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6094 static final private boolean jj_3R_186() {
6095 if (jj_scan_token(IDENTIFIER)) return true;
6096 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6100 static final private boolean jj_3R_178() {
6105 if (jj_3R_187()) return true;
6106 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6107 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6111 static final private boolean jj_3R_50() {
6112 if (jj_3R_61()) return true;
6113 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6117 if (jj_3_1()) { jj_scanpos = xsp; break; }
6118 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6123 static final private boolean jj_3R_103() {
6128 if (jj_3R_107()) return true;
6129 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6130 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6131 if (jj_3R_102()) return true;
6132 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6136 static final private boolean jj_3R_96() {
6137 if (jj_3R_102()) return true;
6138 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6142 if (jj_3R_103()) { jj_scanpos = xsp; break; }
6143 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6148 static final private boolean jj_3R_86() {
6149 if (jj_3R_96()) return true;
6150 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6153 if (jj_3R_97()) jj_scanpos = xsp;
6154 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6158 static final private boolean jj_3R_74() {
6159 if (jj_scan_token(TILDEEQUAL)) return true;
6160 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6164 static final private boolean jj_3R_191() {
6165 if (jj_3R_50()) return true;
6166 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6170 static final private boolean jj_3R_73() {
6171 if (jj_scan_token(DOTASSIGN)) return true;
6172 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6176 static final private boolean jj_3R_72() {
6177 if (jj_scan_token(ORASSIGN)) return true;
6178 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6182 static final private boolean jj_3R_71() {
6183 if (jj_scan_token(XORASSIGN)) return true;
6184 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6188 static final private boolean jj_3R_190() {
6189 if (jj_scan_token(NEW)) return true;
6190 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6191 if (jj_3R_178()) return true;
6192 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6196 static final private boolean jj_3R_70() {
6197 if (jj_scan_token(ANDASSIGN)) return true;
6198 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6202 static final private boolean jj_3R_69() {
6203 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6204 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6208 static final private boolean jj_3R_68() {
6209 if (jj_scan_token(LSHIFTASSIGN)) return true;
6210 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6214 static final private boolean jj_3R_189() {
6215 if (jj_scan_token(IDENTIFIER)) return true;
6216 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6220 static final private boolean jj_3R_180() {
6227 if (jj_3R_191()) return true;
6228 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6229 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6230 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6234 static final private boolean jj_3R_67() {
6235 if (jj_scan_token(MINUSASSIGN)) return true;
6236 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6240 static final private boolean jj_3R_66() {
6241 if (jj_scan_token(PLUSASSIGN)) return true;
6242 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6246 static final private boolean jj_3R_65() {
6247 if (jj_scan_token(REMASSIGN)) return true;
6248 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6252 static final private boolean jj_3R_64() {
6253 if (jj_scan_token(SLASHASSIGN)) return true;
6254 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6258 static final private boolean jj_3R_63() {
6259 if (jj_scan_token(STARASSIGN)) return true;
6260 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6264 static final private boolean jj_3R_51() {
6291 if (jj_3R_74()) return true;
6292 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6293 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6294 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6295 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6296 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6297 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6298 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6299 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6300 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6301 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6302 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6303 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6304 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6308 static final private boolean jj_3R_62() {
6309 if (jj_scan_token(ASSIGN)) return true;
6310 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6314 static final private boolean jj_3R_182() {
6315 if (jj_scan_token(ARRAY)) return true;
6316 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6317 if (jj_3R_192()) return true;
6318 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6322 static final private boolean jj_3R_171() {
6323 if (jj_3R_182()) return true;
6324 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6328 static final private boolean jj_3R_181() {
6329 if (jj_3R_188()) return true;
6330 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6334 static final private boolean jj_3R_170() {
6335 if (jj_3R_180()) return true;
6336 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6340 if (jj_3R_181()) { jj_scanpos = xsp; break; }
6341 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6346 static final private boolean jj_3R_101() {
6347 if (jj_scan_token(ASSIGN)) return true;
6348 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6349 if (jj_3R_45()) return true;
6350 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6354 static final private boolean jj_3R_179() {
6355 if (jj_3R_188()) return true;
6356 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6360 static final private boolean jj_3R_42() {
6361 if (jj_3R_50()) return true;
6362 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6363 if (jj_3R_51()) return true;
6364 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6365 if (jj_3R_45()) return true;
6366 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6370 static final private boolean jj_3_3() {
6371 if (jj_3R_42()) return true;
6372 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6376 static final private boolean jj_3_5() {
6377 if (jj_scan_token(IDENTIFIER)) return true;
6378 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6379 if (jj_scan_token(STATICCLASSACCESS)) return true;
6380 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6381 if (jj_3R_178()) return true;
6382 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6386 if (jj_3R_179()) { jj_scanpos = xsp; break; }
6387 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6392 static final private boolean jj_3R_166() {
6399 if (jj_3R_171()) return true;
6400 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6401 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6402 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6406 static final private boolean jj_3R_56() {
6407 if (jj_3R_86()) return true;
6408 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6412 static final private boolean jj_3R_55() {
6413 if (jj_3R_42()) return true;
6414 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6418 static final private boolean jj_3R_54() {
6419 if (jj_3R_85()) return true;
6420 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6424 static final private boolean jj_3R_45() {
6433 if (jj_3R_56()) return true;
6434 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6435 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6436 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6437 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6441 static final private boolean jj_3R_53() {
6442 if (jj_3R_84()) return true;
6443 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6447 static final private boolean jj_3R_100() {
6448 if (jj_scan_token(COMMA)) return true;
6449 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6450 if (jj_3R_50()) return true;
6451 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6455 static final private boolean jj_3R_194() {
6456 if (jj_scan_token(DECR)) return true;
6457 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6461 static final private boolean jj_3R_193() {
6462 if (jj_scan_token(INCR)) return true;
6463 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6467 static final private boolean jj_3R_185() {
6472 if (jj_3R_194()) return true;
6473 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6474 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6478 static final private boolean jj_3R_99() {
6479 if (jj_3R_50()) return true;
6480 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6484 static final private boolean jj_3R_168() {
6485 if (jj_3R_166()) return true;
6486 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6489 if (jj_3R_185()) jj_scanpos = xsp;
6490 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6494 static final private boolean jj_3R_83() {
6495 if (jj_scan_token(OBJECT)) return true;
6496 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6500 static final private boolean jj_3R_82() {
6501 if (jj_scan_token(INTEGER)) return true;
6502 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6506 static final private boolean jj_3R_81() {
6507 if (jj_scan_token(INT)) return true;
6508 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6512 static final private boolean jj_3R_44() {
6513 if (jj_scan_token(ARRAY)) return true;
6514 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6518 static final private boolean jj_3R_80() {
6519 if (jj_scan_token(FLOAT)) return true;
6520 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6524 static final private boolean jj_3R_184() {
6525 if (jj_scan_token(ARRAY)) return true;
6526 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6530 static final private boolean jj_3R_79() {
6531 if (jj_scan_token(DOUBLE)) return true;
6532 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6536 static final private boolean jj_3R_183() {
6537 if (jj_3R_52()) return true;
6538 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6542 static final private boolean jj_3R_85() {
6543 if (jj_scan_token(LIST)) return true;
6544 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6545 if (jj_scan_token(LPAREN)) return true;
6546 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6549 if (jj_3R_99()) jj_scanpos = xsp;
6550 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6553 if (jj_3R_100()) { jj_scanpos = xsp; break; }
6554 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6556 if (jj_scan_token(RPAREN)) return true;
6557 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6559 if (jj_3R_101()) jj_scanpos = xsp;
6560 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6564 static final private boolean jj_3R_78() {
6565 if (jj_scan_token(REAL)) return true;
6566 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6570 static final private boolean jj_3R_167() {
6571 if (jj_scan_token(LPAREN)) return true;
6572 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6577 if (jj_3R_184()) return true;
6578 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6579 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6580 if (jj_scan_token(RPAREN)) return true;
6581 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6582 if (jj_3R_139()) return true;
6583 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6587 static private boolean jj_initialized_once = false;
6588 static public PHPParserTokenManager token_source;
6589 static SimpleCharStream jj_input_stream;
6590 static public Token token, jj_nt;
6591 static private int jj_ntk;
6592 static private Token jj_scanpos, jj_lastpos;
6593 static private int jj_la;
6594 static public boolean lookingAhead = false;
6595 static private boolean jj_semLA;
6596 static private int jj_gen;
6597 static final private int[] jj_la1 = new int[123];
6598 static private int[] jj_la1_0;
6599 static private int[] jj_la1_1;
6600 static private int[] jj_la1_2;
6601 static private int[] jj_la1_3;
6602 static private int[] jj_la1_4;
6610 private static void jj_la1_0() {
6611 jj_la1_0 = new int[] {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,};
6613 private static void jj_la1_1() {
6614 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,};
6616 private static void jj_la1_2() {
6617 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,};
6619 private static void jj_la1_3() {
6620 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,};
6622 private static void jj_la1_4() {
6623 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,};
6625 static final private JJCalls[] jj_2_rtns = new JJCalls[8];
6626 static private boolean jj_rescan = false;
6627 static private int jj_gc = 0;
6629 public PHPParser(java.io.InputStream stream) {
6630 if (jj_initialized_once) {
6631 System.out.println("ERROR: Second call to constructor of static parser. You must");
6632 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6633 System.out.println(" during parser generation.");
6636 jj_initialized_once = true;
6637 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6638 token_source = new PHPParserTokenManager(jj_input_stream);
6639 token = new Token();
6642 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6643 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6646 static public void ReInit(java.io.InputStream stream) {
6647 jj_input_stream.ReInit(stream, 1, 1);
6648 token_source.ReInit(jj_input_stream);
6649 token = new Token();
6652 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6653 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6656 public PHPParser(java.io.Reader stream) {
6657 if (jj_initialized_once) {
6658 System.out.println("ERROR: Second call to constructor of static parser. You must");
6659 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6660 System.out.println(" during parser generation.");
6663 jj_initialized_once = true;
6664 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6665 token_source = new PHPParserTokenManager(jj_input_stream);
6666 token = new Token();
6669 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6670 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6673 static public void ReInit(java.io.Reader stream) {
6674 jj_input_stream.ReInit(stream, 1, 1);
6675 token_source.ReInit(jj_input_stream);
6676 token = new Token();
6679 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6680 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6683 public PHPParser(PHPParserTokenManager tm) {
6684 if (jj_initialized_once) {
6685 System.out.println("ERROR: Second call to constructor of static parser. You must");
6686 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6687 System.out.println(" during parser generation.");
6690 jj_initialized_once = true;
6692 token = new Token();
6695 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6696 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6699 public void ReInit(PHPParserTokenManager tm) {
6701 token = new Token();
6704 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6705 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6708 static final private Token jj_consume_token(int kind) throws ParseException {
6710 if ((oldToken = token).next != null) token = token.next;
6711 else token = token.next = token_source.getNextToken();
6713 if (token.kind == kind) {
6715 if (++jj_gc > 100) {
6717 for (int i = 0; i < jj_2_rtns.length; i++) {
6718 JJCalls c = jj_2_rtns[i];
6720 if (c.gen < jj_gen) c.first = null;
6729 throw generateParseException();
6732 static final private boolean jj_scan_token(int kind) {
6733 if (jj_scanpos == jj_lastpos) {
6735 if (jj_scanpos.next == null) {
6736 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
6738 jj_lastpos = jj_scanpos = jj_scanpos.next;
6741 jj_scanpos = jj_scanpos.next;
6744 int i = 0; Token tok = token;
6745 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
6746 if (tok != null) jj_add_error_token(kind, i);
6748 return (jj_scanpos.kind != kind);
6751 static final public Token getNextToken() {
6752 if (token.next != null) token = token.next;
6753 else token = token.next = token_source.getNextToken();
6759 static final public Token getToken(int index) {
6760 Token t = lookingAhead ? jj_scanpos : token;
6761 for (int i = 0; i < index; i++) {
6762 if (t.next != null) t = t.next;
6763 else t = t.next = token_source.getNextToken();
6768 static final private int jj_ntk() {
6769 if ((jj_nt=token.next) == null)
6770 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
6772 return (jj_ntk = jj_nt.kind);
6775 static private java.util.Vector jj_expentries = new java.util.Vector();
6776 static private int[] jj_expentry;
6777 static private int jj_kind = -1;
6778 static private int[] jj_lasttokens = new int[100];
6779 static private int jj_endpos;
6781 static private void jj_add_error_token(int kind, int pos) {
6782 if (pos >= 100) return;
6783 if (pos == jj_endpos + 1) {
6784 jj_lasttokens[jj_endpos++] = kind;
6785 } else if (jj_endpos != 0) {
6786 jj_expentry = new int[jj_endpos];
6787 for (int i = 0; i < jj_endpos; i++) {
6788 jj_expentry[i] = jj_lasttokens[i];
6790 boolean exists = false;
6791 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
6792 int[] oldentry = (int[])(enum.nextElement());
6793 if (oldentry.length == jj_expentry.length) {
6795 for (int i = 0; i < jj_expentry.length; i++) {
6796 if (oldentry[i] != jj_expentry[i]) {
6804 if (!exists) jj_expentries.addElement(jj_expentry);
6805 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
6809 static public ParseException generateParseException() {
6810 jj_expentries.removeAllElements();
6811 boolean[] la1tokens = new boolean[141];
6812 for (int i = 0; i < 141; i++) {
6813 la1tokens[i] = false;
6816 la1tokens[jj_kind] = true;
6819 for (int i = 0; i < 123; i++) {
6820 if (jj_la1[i] == jj_gen) {
6821 for (int j = 0; j < 32; j++) {
6822 if ((jj_la1_0[i] & (1<<j)) != 0) {
6823 la1tokens[j] = true;
6825 if ((jj_la1_1[i] & (1<<j)) != 0) {
6826 la1tokens[32+j] = true;
6828 if ((jj_la1_2[i] & (1<<j)) != 0) {
6829 la1tokens[64+j] = true;
6831 if ((jj_la1_3[i] & (1<<j)) != 0) {
6832 la1tokens[96+j] = true;
6834 if ((jj_la1_4[i] & (1<<j)) != 0) {
6835 la1tokens[128+j] = true;
6840 for (int i = 0; i < 141; i++) {
6842 jj_expentry = new int[1];
6844 jj_expentries.addElement(jj_expentry);
6849 jj_add_error_token(0, 0);
6850 int[][] exptokseq = new int[jj_expentries.size()][];
6851 for (int i = 0; i < jj_expentries.size(); i++) {
6852 exptokseq[i] = (int[])jj_expentries.elementAt(i);
6854 return new ParseException(token, exptokseq, tokenImage);
6857 static final public void enable_tracing() {
6860 static final public void disable_tracing() {
6863 static final private void jj_rescan_token() {
6865 for (int i = 0; i < 8; i++) {
6866 JJCalls p = jj_2_rtns[i];
6868 if (p.gen > jj_gen) {
6869 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
6871 case 0: jj_3_1(); break;
6872 case 1: jj_3_2(); break;
6873 case 2: jj_3_3(); break;
6874 case 3: jj_3_4(); break;
6875 case 4: jj_3_5(); break;
6876 case 5: jj_3_6(); break;
6877 case 6: jj_3_7(); break;
6878 case 7: jj_3_8(); break;
6882 } while (p != null);
6887 static final private void jj_save(int index, int xla) {
6888 JJCalls p = jj_2_rtns[index];
6889 while (p.gen > jj_gen) {
6890 if (p.next == null) { p = p.next = new JJCalls(); break; }
6893 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
6896 static final class JJCalls {