1 /* Generated By:JavaCC: Do not edit this line. PHPParser.java */
4 import org.eclipse.core.resources.IFile;
5 import org.eclipse.core.resources.IMarker;
6 import org.eclipse.core.runtime.CoreException;
7 import org.eclipse.ui.texteditor.MarkerUtilities;
8 import org.eclipse.jface.preference.IPreferenceStore;
10 import java.util.Hashtable;
11 import java.util.ArrayList;
12 import java.io.StringReader;
14 import java.text.MessageFormat;
16 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
17 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
18 import net.sourceforge.phpdt.internal.compiler.ast.*;
19 import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
20 import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
21 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
25 * This php parser is inspired by the Java 1.2 grammar example
26 * given with JavaCC. You can get JavaCC at http://www.webgain.com
27 * You can test the parser with the PHPParserTestCase2.java
28 * @author Matthieu Casanova
30 public final class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
32 /** The file that is parsed. */
33 private static IFile fileToParse;
35 /** The current segment. */
36 private static OutlineableWithChildren currentSegment;
38 private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
39 private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
40 static PHPOutlineInfo outlineInfo;
42 /** The error level of the current ParseException. */
43 private static int errorLevel = ERROR;
44 /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
45 private static String errorMessage;
47 private static int errorStart = -1;
48 private static int errorEnd = -1;
49 private static PHPDocument phpDocument;
51 private static final char[] SYNTAX_ERROR_CHAR = {'s','y','n','t','a','x',' ','e','r','r','o','r'};
53 * The point where html starts.
54 * It will be used by the token manager to create HTMLCode objects
56 public static int htmlStart;
59 private final static int AstStackIncrement = 100;
60 /** The stack of node. */
61 private static AstNode[] nodes;
62 /** The cursor in expression stack. */
63 private static int nodePtr;
65 public final void setFileToParse(final IFile fileToParse) {
66 this.fileToParse = fileToParse;
72 public PHPParser(final IFile fileToParse) {
73 this(new StringReader(""));
74 this.fileToParse = fileToParse;
78 * Reinitialize the parser.
80 private static final void init() {
81 nodes = new AstNode[AstStackIncrement];
87 * Add an php node on the stack.
88 * @param node the node that will be added to the stack
90 private static final void pushOnAstNodes(AstNode node) {
92 nodes[++nodePtr] = node;
93 } catch (IndexOutOfBoundsException e) {
94 int oldStackLength = nodes.length;
95 AstNode[] oldStack = nodes;
96 nodes = new AstNode[oldStackLength + AstStackIncrement];
97 System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
98 nodePtr = oldStackLength;
99 nodes[nodePtr] = node;
103 public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
104 phpDocument = new PHPDocument(parent,"_root".toCharArray());
105 currentSegment = phpDocument;
106 outlineInfo = new PHPOutlineInfo(parent, currentSegment);
107 final StringReader stream = new StringReader(s);
108 if (jj_input_stream == null) {
109 jj_input_stream = new SimpleCharStream(stream, 1, 1);
115 phpDocument.nodes = new AstNode[nodes.length];
116 System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
117 if (PHPeclipsePlugin.DEBUG) {
118 PHPeclipsePlugin.log(1,phpDocument.toString());
120 } catch (ParseException e) {
121 processParseException(e);
127 * This method will process the parse exception.
128 * If the error message is null, the parse exception wasn't catched and a trace is written in the log
129 * @param e the ParseException
131 private static void processParseException(final ParseException e) {
132 if (errorMessage == null) {
133 PHPeclipsePlugin.log(e);
134 errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
135 errorStart = SimpleCharStream.getPosition();
136 errorEnd = errorStart + 1;
143 * Create marker for the parse error
144 * @param e the ParseException
146 private static void setMarker(final ParseException e) {
148 if (errorStart == -1) {
149 setMarker(fileToParse,
151 SimpleCharStream.tokenBegin,
152 SimpleCharStream.tokenBegin + e.currentToken.image.length(),
154 "Line " + e.currentToken.beginLine);
156 setMarker(fileToParse,
161 "Line " + e.currentToken.beginLine);
165 } catch (CoreException e2) {
166 PHPeclipsePlugin.log(e2);
170 private static void scanLine(final String output,
173 final int brIndx) throws CoreException {
175 StringBuffer lineNumberBuffer = new StringBuffer(10);
177 current = output.substring(indx, brIndx);
179 if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
180 int onLine = current.indexOf("on line <b>");
182 lineNumberBuffer.delete(0, lineNumberBuffer.length());
183 for (int i = onLine; i < current.length(); i++) {
184 ch = current.charAt(i);
185 if ('0' <= ch && '9' >= ch) {
186 lineNumberBuffer.append(ch);
190 int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
192 Hashtable attributes = new Hashtable();
194 current = current.replaceAll("\n", "");
195 current = current.replaceAll("<b>", "");
196 current = current.replaceAll("</b>", "");
197 MarkerUtilities.setMessage(attributes, current);
199 if (current.indexOf(PARSE_ERROR_STRING) != -1)
200 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
201 else if (current.indexOf(PARSE_WARNING_STRING) != -1)
202 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
204 attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
205 MarkerUtilities.setLineNumber(attributes, lineNumber);
206 MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
211 public final void parse(final String s) throws CoreException {
212 final StringReader stream = new StringReader(s);
213 if (jj_input_stream == null) {
214 jj_input_stream = new SimpleCharStream(stream, 1, 1);
220 } catch (ParseException e) {
221 processParseException(e);
226 * Call the php parse command ( php -l -f <filename> )
227 * and create markers according to the external parser output
229 public static void phpExternalParse(final IFile file) {
230 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
231 final String filename = file.getLocation().toString();
233 final String[] arguments = { filename };
234 final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
235 final String command = form.format(arguments);
237 final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
240 // parse the buffer to find the errors and warnings
241 createMarkers(parserResult, file);
242 } catch (CoreException e) {
243 PHPeclipsePlugin.log(e);
248 * Put a new html block in the stack.
250 public static final void createNewHTMLCode() {
251 final int currentPosition = SimpleCharStream.getPosition();
252 if (currentPosition == htmlStart || currentPosition > SimpleCharStream.currentBuffer.length()) {
255 final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray();
256 pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
262 public static final void createNewTask() {
263 final int currentPosition = SimpleCharStream.getPosition();
264 final String todo = SimpleCharStream.currentBuffer.substring(currentPosition+1,
265 SimpleCharStream.currentBuffer.indexOf("\n",
268 setMarker(fileToParse,
270 SimpleCharStream.getBeginLine(),
272 "Line "+SimpleCharStream.getBeginLine());
273 } catch (CoreException e) {
274 PHPeclipsePlugin.log(e);
278 private static final void parse() throws ParseException {
282 static final public void phpFile() throws ParseException {
286 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
325 case INTEGER_LITERAL:
326 case FLOATING_POINT_LITERAL:
341 PHPParser.createNewHTMLCode();
342 } catch (TokenMgrError e) {
343 PHPeclipsePlugin.log(e);
344 errorStart = SimpleCharStream.getPosition();
345 errorEnd = errorStart + 1;
346 errorMessage = e.getMessage();
348 {if (true) throw generateParseException();}
353 * A php block is a <?= expression [;]?>
354 * or <?php somephpcode ?>
355 * or <? somephpcode ?>
357 static final public void PhpBlock() throws ParseException {
358 final int start = SimpleCharStream.getPosition();
359 final PHPEchoBlock phpEchoBlock;
360 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
362 phpEchoBlock = phpEchoBlock();
363 pushOnAstNodes(phpEchoBlock);
402 case INTEGER_LITERAL:
403 case FLOATING_POINT_LITERAL:
410 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
413 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
415 jj_consume_token(PHPSTARTLONG);
418 jj_consume_token(PHPSTARTSHORT);
420 setMarker(fileToParse,
421 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
423 SimpleCharStream.getPosition(),
425 "Line " + token.beginLine);
426 } catch (CoreException e) {
427 PHPeclipsePlugin.log(e);
432 jj_consume_token(-1);
433 throw new ParseException();
442 jj_consume_token(PHPEND);
443 } catch (ParseException e) {
444 errorMessage = "'?>' expected";
446 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
447 errorEnd = SimpleCharStream.getPosition() + 1;
448 processParseException(e);
453 jj_consume_token(-1);
454 throw new ParseException();
458 static final public PHPEchoBlock phpEchoBlock() throws ParseException {
459 final Expression expr;
460 final int pos = SimpleCharStream.getPosition();
461 PHPEchoBlock echoBlock;
462 jj_consume_token(PHPECHOSTART);
464 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
466 jj_consume_token(SEMICOLON);
472 jj_consume_token(PHPEND);
473 echoBlock = new PHPEchoBlock(expr,pos,SimpleCharStream.getPosition());
474 pushOnAstNodes(echoBlock);
475 {if (true) return echoBlock;}
476 throw new Error("Missing return statement in function");
479 static final public void Php() throws ParseException {
482 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
517 case INTEGER_LITERAL:
518 case FLOATING_POINT_LITERAL:
535 static final public ClassDeclaration ClassDeclaration() throws ParseException {
536 final ClassDeclaration classDeclaration;
537 final Token className;
538 Token superclassName = null;
540 char[] classNameImage = SYNTAX_ERROR_CHAR;
541 char[] superclassNameImage = null;
542 jj_consume_token(CLASS);
543 pos = SimpleCharStream.getPosition();
545 className = jj_consume_token(IDENTIFIER);
546 classNameImage = className.image.toCharArray();
547 } catch (ParseException e) {
548 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
550 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
551 errorEnd = SimpleCharStream.getPosition() + 1;
552 processParseException(e);
554 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
556 jj_consume_token(EXTENDS);
558 superclassName = jj_consume_token(IDENTIFIER);
559 superclassNameImage = superclassName.image.toCharArray();
560 } catch (ParseException e) {
561 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
563 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
564 errorEnd = SimpleCharStream.getPosition() + 1;
565 processParseException(e);
566 superclassNameImage = SYNTAX_ERROR_CHAR;
573 if (superclassNameImage == null) {
574 classDeclaration = new ClassDeclaration(currentSegment,
579 classDeclaration = new ClassDeclaration(currentSegment,
585 currentSegment.add(classDeclaration);
586 currentSegment = classDeclaration;
587 ClassBody(classDeclaration);
588 currentSegment = (OutlineableWithChildren) currentSegment.getParent();
589 classDeclaration.sourceEnd = SimpleCharStream.getPosition();
590 pushOnAstNodes(classDeclaration);
591 {if (true) return classDeclaration;}
592 throw new Error("Missing return statement in function");
595 static final public void ClassBody(ClassDeclaration classDeclaration) throws ParseException {
597 jj_consume_token(LBRACE);
598 } catch (ParseException e) {
599 errorMessage = "unexpected token : '"+ e.currentToken.next.image + "', '{' expected";
601 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
602 errorEnd = SimpleCharStream.getPosition() + 1;
607 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
616 ClassBodyDeclaration(classDeclaration);
619 jj_consume_token(RBRACE);
620 } catch (ParseException e) {
621 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', 'var', 'function' or '}' expected";
623 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
624 errorEnd = SimpleCharStream.getPosition() + 1;
630 * A class can contain only methods and fields.
632 static final public void ClassBodyDeclaration(ClassDeclaration classDeclaration) throws ParseException {
633 MethodDeclaration method;
634 FieldDeclaration field;
635 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
637 method = MethodDeclaration();
638 classDeclaration.addMethod(method);
641 field = FieldDeclaration();
642 classDeclaration.addField(field);
646 jj_consume_token(-1);
647 throw new ParseException();
652 * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
654 static final public FieldDeclaration FieldDeclaration() throws ParseException {
655 VariableDeclaration variableDeclaration;
656 VariableDeclaration[] list;
657 final ArrayList arrayList = new ArrayList();
658 final int pos = SimpleCharStream.getPosition();
659 jj_consume_token(VAR);
660 variableDeclaration = VariableDeclarator();
661 arrayList.add(variableDeclaration);
662 outlineInfo.addVariable(new String(variableDeclaration.name));
665 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
673 jj_consume_token(COMMA);
674 variableDeclaration = VariableDeclarator();
675 arrayList.add(variableDeclaration);
676 outlineInfo.addVariable(new String(variableDeclaration.name));
679 jj_consume_token(SEMICOLON);
680 } catch (ParseException e) {
681 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
683 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
684 errorEnd = SimpleCharStream.getPosition() + 1;
685 processParseException(e);
687 list = new VariableDeclaration[arrayList.size()];
688 arrayList.toArray(list);
689 {if (true) return new FieldDeclaration(list,
691 SimpleCharStream.getPosition(),
693 throw new Error("Missing return statement in function");
696 static final public VariableDeclaration VariableDeclarator() throws ParseException {
697 final String varName;
698 Expression initializer = null;
699 final int pos = SimpleCharStream.getPosition();
700 varName = VariableDeclaratorId();
701 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
703 jj_consume_token(ASSIGN);
705 initializer = VariableInitializer();
706 } catch (ParseException e) {
707 errorMessage = "Literal expression expected in variable initializer";
709 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
710 errorEnd = SimpleCharStream.getPosition() + 1;
718 if (initializer == null) {
719 {if (true) return new VariableDeclaration(currentSegment,
720 varName.toCharArray(),
722 SimpleCharStream.getPosition());}
724 {if (true) return new VariableDeclaration(currentSegment,
725 varName.toCharArray(),
728 throw new Error("Missing return statement in function");
733 * @return the variable name (with suffix)
735 static final public String VariableDeclaratorId() throws ParseException {
737 Expression expression = null;
738 final StringBuffer buff = new StringBuffer();
739 final int pos = SimpleCharStream.getPosition();
740 ConstantIdentifier ex;
750 ex = new ConstantIdentifier(expr.toCharArray(),
752 SimpleCharStream.getPosition());
753 expression = VariableSuffix(ex);
755 if (expression == null) {
756 {if (true) return expr;}
758 {if (true) return expression.toStringExpression();}
759 } catch (ParseException e) {
760 errorMessage = "'$' expected for variable identifier";
762 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
763 errorEnd = SimpleCharStream.getPosition() + 1;
766 throw new Error("Missing return statement in function");
770 * Return a variablename without the $.
771 * @return a variable name
773 static final public String Variable() throws ParseException {
774 final StringBuffer buff;
775 Expression expression = null;
778 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
780 token = jj_consume_token(DOLLAR_ID);
781 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
783 jj_consume_token(LBRACE);
784 expression = Expression();
785 jj_consume_token(RBRACE);
791 if (expression == null) {
792 {if (true) return token.image.substring(1);}
794 buff = new StringBuffer(token.image);
796 buff.append(expression.toStringExpression());
798 {if (true) return buff.toString();}
801 jj_consume_token(DOLLAR);
802 expr = VariableName();
803 {if (true) return expr;}
807 jj_consume_token(-1);
808 throw new ParseException();
810 throw new Error("Missing return statement in function");
814 * A Variable name (without the $)
815 * @return a variable name String
817 static final public String VariableName() throws ParseException {
818 final StringBuffer buff;
820 Expression expression = null;
822 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
824 jj_consume_token(LBRACE);
825 expression = Expression();
826 jj_consume_token(RBRACE);
827 buff = new StringBuffer("{");
828 buff.append(expression.toStringExpression());
830 {if (true) return buff.toString();}
833 token = jj_consume_token(IDENTIFIER);
834 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
836 jj_consume_token(LBRACE);
837 expression = Expression();
838 jj_consume_token(RBRACE);
844 if (expression == null) {
845 {if (true) return token.image;}
847 buff = new StringBuffer(token.image);
849 buff.append(expression.toStringExpression());
851 {if (true) return buff.toString();}
854 jj_consume_token(DOLLAR);
855 expr = VariableName();
856 buff = new StringBuffer("$");
858 {if (true) return buff.toString();}
861 token = jj_consume_token(DOLLAR_ID);
862 {if (true) return token.image;}
866 jj_consume_token(-1);
867 throw new ParseException();
869 throw new Error("Missing return statement in function");
872 static final public Expression VariableInitializer() throws ParseException {
873 final Expression expr;
875 final int pos = SimpleCharStream.getPosition();
876 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
880 case INTEGER_LITERAL:
881 case FLOATING_POINT_LITERAL:
884 {if (true) return expr;}
887 jj_consume_token(MINUS);
888 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
889 case INTEGER_LITERAL:
890 token = jj_consume_token(INTEGER_LITERAL);
892 case FLOATING_POINT_LITERAL:
893 token = jj_consume_token(FLOATING_POINT_LITERAL);
897 jj_consume_token(-1);
898 throw new ParseException();
900 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
902 SimpleCharStream.getPosition()),
907 jj_consume_token(PLUS);
908 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
909 case INTEGER_LITERAL:
910 token = jj_consume_token(INTEGER_LITERAL);
912 case FLOATING_POINT_LITERAL:
913 token = jj_consume_token(FLOATING_POINT_LITERAL);
917 jj_consume_token(-1);
918 throw new ParseException();
920 {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token.image.toCharArray(),
922 SimpleCharStream.getPosition()),
927 expr = ArrayDeclarator();
928 {if (true) return expr;}
931 token = jj_consume_token(IDENTIFIER);
932 {if (true) return new ConstantIdentifier(token.image.toCharArray(),pos,SimpleCharStream.getPosition());}
936 jj_consume_token(-1);
937 throw new ParseException();
939 throw new Error("Missing return statement in function");
942 static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
943 Expression expr,expr2;
945 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
947 jj_consume_token(ARRAYASSIGN);
948 expr2 = Expression();
949 {if (true) return new ArrayVariableDeclaration(expr,expr2);}
955 {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
956 throw new Error("Missing return statement in function");
959 static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
960 ArrayVariableDeclaration expr;
961 final ArrayList list = new ArrayList();
962 jj_consume_token(LPAREN);
963 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
979 case INTEGER_LITERAL:
980 case FLOATING_POINT_LITERAL:
985 expr = ArrayVariable();
994 jj_consume_token(COMMA);
995 expr = ArrayVariable();
1000 jj_la1[19] = jj_gen;
1003 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1005 jj_consume_token(COMMA);
1009 jj_la1[20] = jj_gen;
1012 jj_consume_token(RPAREN);
1013 ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1015 {if (true) return vars;}
1016 throw new Error("Missing return statement in function");
1020 * A Method Declaration.
1021 * <b>function</b> MetodDeclarator() Block()
1023 static final public MethodDeclaration MethodDeclaration() throws ParseException {
1024 final MethodDeclaration functionDeclaration;
1026 final OutlineableWithChildren seg = currentSegment;
1027 jj_consume_token(FUNCTION);
1029 functionDeclaration = MethodDeclarator();
1030 outlineInfo.addVariable(new String(functionDeclaration.name));
1031 } catch (ParseException e) {
1032 if (errorMessage != null) {if (true) throw e;}
1033 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1035 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1036 errorEnd = SimpleCharStream.getPosition() + 1;
1037 {if (true) throw e;}
1039 currentSegment = functionDeclaration;
1041 functionDeclaration.statements = block.statements;
1042 currentSegment = seg;
1043 {if (true) return functionDeclaration;}
1044 throw new Error("Missing return statement in function");
1048 * A MethodDeclarator.
1049 * [&] IDENTIFIER(parameters ...).
1050 * @return a function description for the outline
1052 static final public MethodDeclaration MethodDeclarator() throws ParseException {
1053 final Token identifier;
1054 Token reference = null;
1055 final Hashtable formalParameters;
1056 final int pos = SimpleCharStream.getPosition();
1057 char[] identifierChar = SYNTAX_ERROR_CHAR;
1058 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1060 reference = jj_consume_token(BIT_AND);
1063 jj_la1[21] = jj_gen;
1067 identifier = jj_consume_token(IDENTIFIER);
1068 identifierChar = identifier.image.toCharArray();
1069 } catch (ParseException e) {
1070 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1072 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1073 errorEnd = SimpleCharStream.getPosition() + 1;
1074 processParseException(e);
1076 formalParameters = FormalParameters();
1077 {if (true) return new MethodDeclaration(currentSegment,
1082 SimpleCharStream.getPosition());}
1083 throw new Error("Missing return statement in function");
1087 * FormalParameters follows method identifier.
1088 * (FormalParameter())
1090 static final public Hashtable FormalParameters() throws ParseException {
1091 VariableDeclaration var;
1092 final Hashtable parameters = new Hashtable();
1094 jj_consume_token(LPAREN);
1095 } catch (ParseException e) {
1096 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1098 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1099 errorEnd = SimpleCharStream.getPosition() + 1;
1100 processParseException(e);
1102 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1106 var = FormalParameter();
1107 parameters.put(new String(var.name),var);
1110 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1115 jj_la1[22] = jj_gen;
1118 jj_consume_token(COMMA);
1119 var = FormalParameter();
1120 parameters.put(new String(var.name),var);
1124 jj_la1[23] = jj_gen;
1128 jj_consume_token(RPAREN);
1129 } catch (ParseException e) {
1130 errorMessage = "')' expected";
1132 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1133 errorEnd = SimpleCharStream.getPosition() + 1;
1134 processParseException(e);
1136 {if (true) return parameters;}
1137 throw new Error("Missing return statement in function");
1141 * A formal parameter.
1142 * $varname[=value] (,$varname[=value])
1144 static final public VariableDeclaration FormalParameter() throws ParseException {
1145 final VariableDeclaration variableDeclaration;
1147 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1149 token = jj_consume_token(BIT_AND);
1152 jj_la1[24] = jj_gen;
1155 variableDeclaration = VariableDeclarator();
1156 if (token != null) {
1157 variableDeclaration.setReference(true);
1159 {if (true) return variableDeclaration;}
1160 throw new Error("Missing return statement in function");
1163 static final public ConstantIdentifier Type() throws ParseException {
1165 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1167 jj_consume_token(STRING);
1168 pos = SimpleCharStream.getPosition();
1169 {if (true) return new ConstantIdentifier(Types.STRING,pos,pos-6);}
1172 jj_consume_token(BOOL);
1173 pos = SimpleCharStream.getPosition();
1174 {if (true) return new ConstantIdentifier(Types.BOOL,pos,pos-4);}
1177 jj_consume_token(BOOLEAN);
1178 pos = SimpleCharStream.getPosition();
1179 {if (true) return new ConstantIdentifier(Types.BOOLEAN,pos,pos-7);}
1182 jj_consume_token(REAL);
1183 pos = SimpleCharStream.getPosition();
1184 {if (true) return new ConstantIdentifier(Types.REAL,pos,pos-4);}
1187 jj_consume_token(DOUBLE);
1188 pos = SimpleCharStream.getPosition();
1189 {if (true) return new ConstantIdentifier(Types.DOUBLE,pos,pos-5);}
1192 jj_consume_token(FLOAT);
1193 pos = SimpleCharStream.getPosition();
1194 {if (true) return new ConstantIdentifier(Types.FLOAT,pos,pos-5);}
1197 jj_consume_token(INT);
1198 pos = SimpleCharStream.getPosition();
1199 {if (true) return new ConstantIdentifier(Types.INT,pos,pos-3);}
1202 jj_consume_token(INTEGER);
1203 pos = SimpleCharStream.getPosition();
1204 {if (true) return new ConstantIdentifier(Types.INTEGER,pos,pos-7);}
1207 jj_consume_token(OBJECT);
1208 pos = SimpleCharStream.getPosition();
1209 {if (true) return new ConstantIdentifier(Types.OBJECT,pos,pos-6);}
1212 jj_la1[25] = jj_gen;
1213 jj_consume_token(-1);
1214 throw new ParseException();
1216 throw new Error("Missing return statement in function");
1219 static final public Expression Expression() throws ParseException {
1220 final Expression expr;
1221 Token bangToken = null;
1222 final int pos = SimpleCharStream.getPosition();
1223 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1225 jj_consume_token(BANG);
1226 expr = Expression();
1227 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,pos);}
1243 case INTEGER_LITERAL:
1244 case FLOATING_POINT_LITERAL:
1245 case STRING_LITERAL:
1249 expr = ExpressionNoBang();
1250 {if (true) return expr;}
1253 jj_la1[26] = jj_gen;
1254 jj_consume_token(-1);
1255 throw new ParseException();
1257 throw new Error("Missing return statement in function");
1260 static final public Expression ExpressionNoBang() throws ParseException {
1261 final Expression expr;
1262 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1264 expr = PrintExpression();
1265 {if (true) return expr;}
1268 expr = ListExpression();
1269 {if (true) return expr;}
1272 jj_la1[27] = jj_gen;
1273 if (jj_2_3(2147483647)) {
1274 expr = varAssignation();
1275 {if (true) return expr;}
1277 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1290 case INTEGER_LITERAL:
1291 case FLOATING_POINT_LITERAL:
1292 case STRING_LITERAL:
1296 expr = ConditionalExpression();
1297 {if (true) return expr;}
1300 jj_la1[28] = jj_gen;
1301 jj_consume_token(-1);
1302 throw new ParseException();
1306 throw new Error("Missing return statement in function");
1310 * A Variable assignation.
1311 * varName (an assign operator) any expression
1313 static final public VarAssignation varAssignation() throws ParseException {
1315 final Expression initializer;
1316 final int assignOperator;
1317 final int pos = SimpleCharStream.getPosition();
1318 varName = VariableDeclaratorId();
1319 assignOperator = AssignmentOperator();
1321 initializer = Expression();
1322 } catch (ParseException e) {
1323 if (errorMessage != null) {
1324 {if (true) throw e;}
1326 errorMessage = "expression expected";
1328 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1329 errorEnd = SimpleCharStream.getPosition() + 1;
1330 {if (true) throw e;}
1332 {if (true) return new VarAssignation(varName.toCharArray(),
1336 SimpleCharStream.getPosition());}
1337 throw new Error("Missing return statement in function");
1340 static final public int AssignmentOperator() throws ParseException {
1341 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1343 jj_consume_token(ASSIGN);
1344 {if (true) return VarAssignation.EQUAL;}
1347 jj_consume_token(STARASSIGN);
1348 {if (true) return VarAssignation.STAR_EQUAL;}
1351 jj_consume_token(SLASHASSIGN);
1352 {if (true) return VarAssignation.SLASH_EQUAL;}
1355 jj_consume_token(REMASSIGN);
1356 {if (true) return VarAssignation.REM_EQUAL;}
1359 jj_consume_token(PLUSASSIGN);
1360 {if (true) return VarAssignation.PLUS_EQUAL;}
1363 jj_consume_token(MINUSASSIGN);
1364 {if (true) return VarAssignation.MINUS_EQUAL;}
1367 jj_consume_token(LSHIFTASSIGN);
1368 {if (true) return VarAssignation.LSHIFT_EQUAL;}
1370 case RSIGNEDSHIFTASSIGN:
1371 jj_consume_token(RSIGNEDSHIFTASSIGN);
1372 {if (true) return VarAssignation.RSIGNEDSHIFT_EQUAL;}
1375 jj_consume_token(ANDASSIGN);
1376 {if (true) return VarAssignation.AND_EQUAL;}
1379 jj_consume_token(XORASSIGN);
1380 {if (true) return VarAssignation.XOR_EQUAL;}
1383 jj_consume_token(ORASSIGN);
1384 {if (true) return VarAssignation.OR_EQUAL;}
1387 jj_consume_token(DOTASSIGN);
1388 {if (true) return VarAssignation.DOT_EQUAL;}
1391 jj_consume_token(TILDEEQUAL);
1392 {if (true) return VarAssignation.TILDE_EQUAL;}
1395 jj_la1[29] = jj_gen;
1396 jj_consume_token(-1);
1397 throw new ParseException();
1399 throw new Error("Missing return statement in function");
1402 static final public Expression ConditionalExpression() throws ParseException {
1403 final Expression expr;
1404 Expression expr2 = null;
1405 Expression expr3 = null;
1406 expr = ConditionalOrExpression();
1407 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1409 jj_consume_token(HOOK);
1410 expr2 = Expression();
1411 jj_consume_token(COLON);
1412 expr3 = ConditionalExpression();
1415 jj_la1[30] = jj_gen;
1418 if (expr3 == null) {
1419 {if (true) return expr;}
1421 {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1422 throw new Error("Missing return statement in function");
1425 static final public Expression ConditionalOrExpression() throws ParseException {
1426 Expression expr,expr2;
1428 expr = ConditionalAndExpression();
1431 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1437 jj_la1[31] = jj_gen;
1440 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1442 jj_consume_token(OR_OR);
1443 operator = OperatorIds.OR_OR;
1446 jj_consume_token(_ORL);
1447 operator = OperatorIds.ORL;
1450 jj_la1[32] = jj_gen;
1451 jj_consume_token(-1);
1452 throw new ParseException();
1454 expr2 = ConditionalAndExpression();
1455 expr = new BinaryExpression(expr,expr2,operator);
1457 {if (true) return expr;}
1458 throw new Error("Missing return statement in function");
1461 static final public Expression ConditionalAndExpression() throws ParseException {
1462 Expression expr,expr2;
1464 expr = ConcatExpression();
1467 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1473 jj_la1[33] = jj_gen;
1476 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1478 jj_consume_token(AND_AND);
1479 operator = OperatorIds.AND_AND;
1482 jj_consume_token(_ANDL);
1483 operator = OperatorIds.ANDL;
1486 jj_la1[34] = jj_gen;
1487 jj_consume_token(-1);
1488 throw new ParseException();
1490 expr2 = ConcatExpression();
1491 expr = new BinaryExpression(expr,expr2,operator);
1493 {if (true) return expr;}
1494 throw new Error("Missing return statement in function");
1497 static final public Expression ConcatExpression() throws ParseException {
1498 Expression expr,expr2;
1499 expr = InclusiveOrExpression();
1502 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1507 jj_la1[35] = jj_gen;
1510 jj_consume_token(DOT);
1511 expr2 = InclusiveOrExpression();
1512 expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1514 {if (true) return expr;}
1515 throw new Error("Missing return statement in function");
1518 static final public Expression InclusiveOrExpression() throws ParseException {
1519 Expression expr,expr2;
1520 expr = ExclusiveOrExpression();
1523 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1528 jj_la1[36] = jj_gen;
1531 jj_consume_token(BIT_OR);
1532 expr2 = ExclusiveOrExpression();
1533 expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1535 {if (true) return expr;}
1536 throw new Error("Missing return statement in function");
1539 static final public Expression ExclusiveOrExpression() throws ParseException {
1540 Expression expr,expr2;
1541 expr = AndExpression();
1544 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1549 jj_la1[37] = jj_gen;
1552 jj_consume_token(XOR);
1553 expr2 = AndExpression();
1554 expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1556 {if (true) return expr;}
1557 throw new Error("Missing return statement in function");
1560 static final public Expression AndExpression() throws ParseException {
1561 Expression expr,expr2;
1562 expr = EqualityExpression();
1565 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1570 jj_la1[38] = jj_gen;
1573 jj_consume_token(BIT_AND);
1574 expr2 = EqualityExpression();
1575 expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1577 {if (true) return expr;}
1578 throw new Error("Missing return statement in function");
1581 static final public Expression EqualityExpression() throws ParseException {
1582 Expression expr,expr2;
1584 expr = RelationalExpression();
1587 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1591 case BANGDOUBLEEQUAL:
1596 jj_la1[39] = jj_gen;
1599 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1601 jj_consume_token(EQUAL_EQUAL);
1602 operator = OperatorIds.EQUAL_EQUAL;
1605 jj_consume_token(DIF);
1606 operator = OperatorIds.DIF;
1609 jj_consume_token(NOT_EQUAL);
1610 operator = OperatorIds.DIF;
1612 case BANGDOUBLEEQUAL:
1613 jj_consume_token(BANGDOUBLEEQUAL);
1614 operator = OperatorIds.BANG_EQUAL_EQUAL;
1617 jj_consume_token(TRIPLEEQUAL);
1618 operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1621 jj_la1[40] = jj_gen;
1622 jj_consume_token(-1);
1623 throw new ParseException();
1626 expr2 = RelationalExpression();
1627 } catch (ParseException e) {
1628 if (errorMessage != null) {
1629 {if (true) throw e;}
1631 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1633 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1634 errorEnd = SimpleCharStream.getPosition() + 1;
1635 {if (true) throw e;}
1637 expr = new BinaryExpression(expr,expr2,operator);
1639 {if (true) return expr;}
1640 throw new Error("Missing return statement in function");
1643 static final public Expression RelationalExpression() throws ParseException {
1644 Expression expr,expr2;
1646 expr = ShiftExpression();
1649 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1657 jj_la1[41] = jj_gen;
1660 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1662 jj_consume_token(LT);
1663 operator = OperatorIds.LESS;
1666 jj_consume_token(GT);
1667 operator = OperatorIds.GREATER;
1670 jj_consume_token(LE);
1671 operator = OperatorIds.LESS_EQUAL;
1674 jj_consume_token(GE);
1675 operator = OperatorIds.GREATER_EQUAL;
1678 jj_la1[42] = jj_gen;
1679 jj_consume_token(-1);
1680 throw new ParseException();
1682 expr2 = ShiftExpression();
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 ShiftExpression() throws ParseException {
1690 Expression expr,expr2;
1692 expr = AdditiveExpression();
1695 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1698 case RUNSIGNEDSHIFT:
1702 jj_la1[43] = jj_gen;
1705 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1707 jj_consume_token(LSHIFT);
1708 operator = OperatorIds.LEFT_SHIFT;
1711 jj_consume_token(RSIGNEDSHIFT);
1712 operator = OperatorIds.RIGHT_SHIFT;
1714 case RUNSIGNEDSHIFT:
1715 jj_consume_token(RUNSIGNEDSHIFT);
1716 operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1719 jj_la1[44] = jj_gen;
1720 jj_consume_token(-1);
1721 throw new ParseException();
1723 expr2 = AdditiveExpression();
1724 expr = new BinaryExpression(expr,expr2,operator);
1726 {if (true) return expr;}
1727 throw new Error("Missing return statement in function");
1730 static final public Expression AdditiveExpression() throws ParseException {
1731 Expression expr,expr2;
1733 expr = MultiplicativeExpression();
1736 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1742 jj_la1[45] = jj_gen;
1745 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1747 jj_consume_token(PLUS);
1748 operator = OperatorIds.PLUS;
1751 jj_consume_token(MINUS);
1752 operator = OperatorIds.MINUS;
1755 jj_la1[46] = jj_gen;
1756 jj_consume_token(-1);
1757 throw new ParseException();
1759 expr2 = MultiplicativeExpression();
1760 expr = new BinaryExpression(expr,expr2,operator);
1762 {if (true) return expr;}
1763 throw new Error("Missing return statement in function");
1766 static final public Expression MultiplicativeExpression() throws ParseException {
1767 Expression expr,expr2;
1770 expr = UnaryExpression();
1771 } catch (ParseException e) {
1772 if (errorMessage != null) {if (true) throw e;}
1773 errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1775 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1776 errorEnd = SimpleCharStream.getPosition() + 1;
1777 {if (true) throw e;}
1781 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1788 jj_la1[47] = jj_gen;
1791 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1793 jj_consume_token(STAR);
1794 operator = OperatorIds.MULTIPLY;
1797 jj_consume_token(SLASH);
1798 operator = OperatorIds.DIVIDE;
1801 jj_consume_token(REMAINDER);
1802 operator = OperatorIds.REMAINDER;
1805 jj_la1[48] = jj_gen;
1806 jj_consume_token(-1);
1807 throw new ParseException();
1809 expr2 = UnaryExpression();
1810 expr = new BinaryExpression(expr,expr2,operator);
1812 {if (true) return expr;}
1813 throw new Error("Missing return statement in function");
1817 * An unary expression starting with @, & or nothing
1819 static final public Expression UnaryExpression() throws ParseException {
1821 final int pos = SimpleCharStream.getPosition();
1822 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1824 jj_consume_token(BIT_AND);
1825 expr = UnaryExpressionNoPrefix();
1826 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
1839 case INTEGER_LITERAL:
1840 case FLOATING_POINT_LITERAL:
1841 case STRING_LITERAL:
1845 expr = AtUnaryExpression();
1846 {if (true) return expr;}
1849 jj_la1[49] = jj_gen;
1850 jj_consume_token(-1);
1851 throw new ParseException();
1853 throw new Error("Missing return statement in function");
1856 static final public Expression AtUnaryExpression() throws ParseException {
1858 final int pos = SimpleCharStream.getPosition();
1859 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1861 jj_consume_token(AT);
1862 expr = AtUnaryExpression();
1863 {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,pos);}
1875 case INTEGER_LITERAL:
1876 case FLOATING_POINT_LITERAL:
1877 case STRING_LITERAL:
1881 expr = UnaryExpressionNoPrefix();
1882 {if (true) return expr;}
1885 jj_la1[50] = jj_gen;
1886 jj_consume_token(-1);
1887 throw new ParseException();
1889 throw new Error("Missing return statement in function");
1892 static final public Expression UnaryExpressionNoPrefix() throws ParseException {
1895 final int pos = SimpleCharStream.getPosition();
1896 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1899 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1901 jj_consume_token(PLUS);
1902 operator = OperatorIds.PLUS;
1905 jj_consume_token(MINUS);
1906 operator = OperatorIds.MINUS;
1909 jj_la1[51] = jj_gen;
1910 jj_consume_token(-1);
1911 throw new ParseException();
1913 expr = UnaryExpression();
1914 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1918 expr = PreIncDecExpression();
1919 {if (true) return expr;}
1927 case INTEGER_LITERAL:
1928 case FLOATING_POINT_LITERAL:
1929 case STRING_LITERAL:
1933 expr = UnaryExpressionNotPlusMinus();
1934 {if (true) return expr;}
1937 jj_la1[52] = jj_gen;
1938 jj_consume_token(-1);
1939 throw new ParseException();
1941 throw new Error("Missing return statement in function");
1944 static final public Expression PreIncDecExpression() throws ParseException {
1945 final Expression expr;
1947 final int pos = SimpleCharStream.getPosition();
1948 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1950 jj_consume_token(PLUS_PLUS);
1951 operator = OperatorIds.PLUS_PLUS;
1954 jj_consume_token(MINUS_MINUS);
1955 operator = OperatorIds.MINUS_MINUS;
1958 jj_la1[53] = jj_gen;
1959 jj_consume_token(-1);
1960 throw new ParseException();
1962 expr = PrimaryExpression();
1963 {if (true) return new PrefixedUnaryExpression(expr,operator,pos);}
1964 throw new Error("Missing return statement in function");
1967 static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
1969 final int pos = SimpleCharStream.getPosition();
1970 if (jj_2_4(2147483647)) {
1971 expr = CastExpression();
1972 {if (true) return expr;}
1974 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1980 expr = PostfixExpression();
1981 {if (true) return expr;}
1986 case INTEGER_LITERAL:
1987 case FLOATING_POINT_LITERAL:
1988 case STRING_LITERAL:
1990 {if (true) return expr;}
1993 jj_consume_token(LPAREN);
1994 expr = Expression();
1996 jj_consume_token(RPAREN);
1997 } catch (ParseException e) {
1998 errorMessage = "')' expected";
2000 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2001 errorEnd = SimpleCharStream.getPosition() + 1;
2002 {if (true) throw e;}
2004 {if (true) return expr;}
2007 jj_la1[54] = jj_gen;
2008 jj_consume_token(-1);
2009 throw new ParseException();
2012 throw new Error("Missing return statement in function");
2015 static final public CastExpression CastExpression() throws ParseException {
2016 final ConstantIdentifier type;
2017 final Expression expr;
2018 final int pos = SimpleCharStream.getPosition();
2019 jj_consume_token(LPAREN);
2020 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2033 jj_consume_token(ARRAY);
2034 type = new ConstantIdentifier(Types.ARRAY,pos,SimpleCharStream.getPosition());
2037 jj_la1[55] = jj_gen;
2038 jj_consume_token(-1);
2039 throw new ParseException();
2041 jj_consume_token(RPAREN);
2042 expr = UnaryExpression();
2043 {if (true) return new CastExpression(type,expr,pos,SimpleCharStream.getPosition());}
2044 throw new Error("Missing return statement in function");
2047 static final public Expression PostfixExpression() throws ParseException {
2050 final int pos = SimpleCharStream.getPosition();
2051 expr = PrimaryExpression();
2052 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2055 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2057 jj_consume_token(PLUS_PLUS);
2058 operator = OperatorIds.PLUS_PLUS;
2061 jj_consume_token(MINUS_MINUS);
2062 operator = OperatorIds.MINUS_MINUS;
2065 jj_la1[56] = jj_gen;
2066 jj_consume_token(-1);
2067 throw new ParseException();
2071 jj_la1[57] = jj_gen;
2074 if (operator == -1) {
2075 {if (true) return expr;}
2077 {if (true) return new PostfixedUnaryExpression(expr,operator,pos);}
2078 throw new Error("Missing return statement in function");
2081 static final public Expression PrimaryExpression() throws ParseException {
2082 final Token identifier;
2084 final int pos = SimpleCharStream.getPosition();
2086 identifier = jj_consume_token(IDENTIFIER);
2087 jj_consume_token(STATICCLASSACCESS);
2088 expr = ClassIdentifier();
2089 expr = new ClassAccess(new ConstantIdentifier(identifier.image.toCharArray(),
2091 SimpleCharStream.getPosition()),
2093 ClassAccess.STATIC);
2096 if (jj_2_5(2147483647)) {
2101 expr = PrimarySuffix(expr);
2103 {if (true) return expr;}
2105 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2110 expr = PrimaryPrefix();
2113 if (jj_2_6(2147483647)) {
2118 expr = PrimarySuffix(expr);
2120 {if (true) return expr;}
2123 expr = ArrayDeclarator();
2124 {if (true) return expr;}
2127 jj_la1[58] = jj_gen;
2128 jj_consume_token(-1);
2129 throw new ParseException();
2132 throw new Error("Missing return statement in function");
2136 * An array declarator.
2140 static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2141 final ArrayVariableDeclaration[] vars;
2142 final int pos = SimpleCharStream.getPosition();
2143 jj_consume_token(ARRAY);
2144 vars = ArrayInitializer();
2145 {if (true) return new ArrayInitializer(vars,pos,SimpleCharStream.getPosition());}
2146 throw new Error("Missing return statement in function");
2149 static final public Expression PrimaryPrefix() throws ParseException {
2150 final Expression expr;
2153 final int pos = SimpleCharStream.getPosition();
2154 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2156 token = jj_consume_token(IDENTIFIER);
2157 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2159 SimpleCharStream.getPosition());}
2162 jj_consume_token(NEW);
2163 expr = ClassIdentifier();
2164 {if (true) return new PrefixedUnaryExpression(expr,
2170 var = VariableDeclaratorId();
2171 {if (true) return new VariableDeclaration(currentSegment,
2174 SimpleCharStream.getPosition());}
2177 jj_la1[59] = jj_gen;
2178 jj_consume_token(-1);
2179 throw new ParseException();
2181 throw new Error("Missing return statement in function");
2184 static final public PrefixedUnaryExpression classInstantiation() throws ParseException {
2186 final StringBuffer buff;
2187 final int pos = SimpleCharStream.getPosition();
2188 jj_consume_token(NEW);
2189 expr = ClassIdentifier();
2190 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2196 buff = new StringBuffer(expr.toStringExpression());
2197 expr = PrimaryExpression();
2198 buff.append(expr.toStringExpression());
2199 expr = new ConstantIdentifier(buff.toString().toCharArray(),
2201 SimpleCharStream.getPosition());
2204 jj_la1[60] = jj_gen;
2207 {if (true) return new PrefixedUnaryExpression(expr,
2210 throw new Error("Missing return statement in function");
2213 static final public ConstantIdentifier ClassIdentifier() throws ParseException {
2216 final int pos = SimpleCharStream.getPosition();
2217 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2219 token = jj_consume_token(IDENTIFIER);
2220 {if (true) return new ConstantIdentifier(token.image.toCharArray(),
2222 SimpleCharStream.getPosition());}
2226 expr = VariableDeclaratorId();
2227 {if (true) return new ConstantIdentifier(expr.toCharArray(),
2229 SimpleCharStream.getPosition());}
2232 jj_la1[61] = jj_gen;
2233 jj_consume_token(-1);
2234 throw new ParseException();
2236 throw new Error("Missing return statement in function");
2239 static final public AbstractSuffixExpression PrimarySuffix(Expression prefix) throws ParseException {
2240 final AbstractSuffixExpression expr;
2241 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2243 expr = Arguments(prefix);
2244 {if (true) return expr;}
2248 expr = VariableSuffix(prefix);
2249 {if (true) return expr;}
2252 jj_la1[62] = jj_gen;
2253 jj_consume_token(-1);
2254 throw new ParseException();
2256 throw new Error("Missing return statement in function");
2259 static final public AbstractSuffixExpression VariableSuffix(Expression prefix) throws ParseException {
2261 final int pos = SimpleCharStream.getPosition();
2262 Expression expression = null;
2263 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2265 jj_consume_token(CLASSACCESS);
2267 expr = VariableName();
2268 } catch (ParseException e) {
2269 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2271 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2272 errorEnd = SimpleCharStream.getPosition() + 1;
2273 {if (true) throw e;}
2275 {if (true) return new ClassAccess(prefix,
2276 new ConstantIdentifier(expr.toCharArray(),pos,SimpleCharStream.getPosition()),
2277 ClassAccess.NORMAL);}
2280 jj_consume_token(LBRACKET);
2281 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2306 case INTEGER_LITERAL:
2307 case FLOATING_POINT_LITERAL:
2308 case STRING_LITERAL:
2312 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2328 case INTEGER_LITERAL:
2329 case FLOATING_POINT_LITERAL:
2330 case STRING_LITERAL:
2334 expression = Expression();
2345 expression = Type();
2348 jj_la1[63] = jj_gen;
2349 jj_consume_token(-1);
2350 throw new ParseException();
2354 jj_la1[64] = jj_gen;
2358 jj_consume_token(RBRACKET);
2359 } catch (ParseException e) {
2360 errorMessage = "']' expected";
2362 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2363 errorEnd = SimpleCharStream.getPosition() + 1;
2364 {if (true) throw e;}
2366 {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2369 jj_la1[65] = jj_gen;
2370 jj_consume_token(-1);
2371 throw new ParseException();
2373 throw new Error("Missing return statement in function");
2376 static final public Literal Literal() throws ParseException {
2379 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2380 case INTEGER_LITERAL:
2381 token = jj_consume_token(INTEGER_LITERAL);
2382 pos = SimpleCharStream.getPosition();
2383 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2385 case FLOATING_POINT_LITERAL:
2386 token = jj_consume_token(FLOATING_POINT_LITERAL);
2387 pos = SimpleCharStream.getPosition();
2388 {if (true) return new NumberLiteral(token.image.toCharArray(),pos-token.image.length(),pos);}
2390 case STRING_LITERAL:
2391 token = jj_consume_token(STRING_LITERAL);
2392 pos = SimpleCharStream.getPosition();
2393 {if (true) return new StringLiteral(token.image.toCharArray(),pos-token.image.length());}
2396 jj_consume_token(TRUE);
2397 pos = SimpleCharStream.getPosition();
2398 {if (true) return new TrueLiteral(pos-4,pos);}
2401 jj_consume_token(FALSE);
2402 pos = SimpleCharStream.getPosition();
2403 {if (true) return new FalseLiteral(pos-4,pos);}
2406 jj_consume_token(NULL);
2407 pos = SimpleCharStream.getPosition();
2408 {if (true) return new NullLiteral(pos-4,pos);}
2411 jj_la1[66] = jj_gen;
2412 jj_consume_token(-1);
2413 throw new ParseException();
2415 throw new Error("Missing return statement in function");
2418 static final public FunctionCall Arguments(Expression func) throws ParseException {
2419 Expression[] args = null;
2420 jj_consume_token(LPAREN);
2421 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2437 case INTEGER_LITERAL:
2438 case FLOATING_POINT_LITERAL:
2439 case STRING_LITERAL:
2443 args = ArgumentList();
2446 jj_la1[67] = jj_gen;
2450 jj_consume_token(RPAREN);
2451 } catch (ParseException e) {
2452 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2454 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2455 errorEnd = SimpleCharStream.getPosition() + 1;
2456 {if (true) throw e;}
2458 {if (true) return new FunctionCall(func,args,SimpleCharStream.getPosition());}
2459 throw new Error("Missing return statement in function");
2463 * An argument list is a list of arguments separated by comma :
2464 * argumentDeclaration() (, argumentDeclaration)*
2465 * @return an array of arguments
2467 static final public Expression[] ArgumentList() throws ParseException {
2469 final ArrayList list = new ArrayList();
2474 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2479 jj_la1[68] = jj_gen;
2482 jj_consume_token(COMMA);
2486 } catch (ParseException e) {
2487 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2489 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2490 errorEnd = SimpleCharStream.getPosition() + 1;
2491 {if (true) throw e;}
2494 Expression[] arguments = new Expression[list.size()];
2495 list.toArray(arguments);
2496 {if (true) return arguments;}
2497 throw new Error("Missing return statement in function");
2501 * A Statement without break.
2503 static final public Statement StatementNoBreak() throws ParseException {
2504 final Statement statement;
2507 statement = Expression();
2509 jj_consume_token(SEMICOLON);
2510 } catch (ParseException e) {
2511 if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2512 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2514 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2515 errorEnd = SimpleCharStream.getPosition() + 1;
2516 {if (true) throw e;}
2519 {if (true) return statement;}
2520 } else if (jj_2_9(2)) {
2521 statement = LabeledStatement();
2522 {if (true) return statement;}
2524 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2526 statement = Block();
2527 {if (true) return statement;}
2530 statement = EmptyStatement();
2531 {if (true) return statement;}
2540 statement = StatementExpression();
2542 jj_consume_token(SEMICOLON);
2543 } catch (ParseException e) {
2544 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2546 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2547 errorEnd = SimpleCharStream.getPosition() + 1;
2548 {if (true) throw e;}
2550 {if (true) return statement;}
2553 statement = SwitchStatement();
2554 {if (true) return statement;}
2557 statement = IfStatement();
2558 {if (true) return statement;}
2561 statement = WhileStatement();
2562 {if (true) return statement;}
2565 statement = DoStatement();
2566 {if (true) return statement;}
2569 statement = ForStatement();
2570 {if (true) return statement;}
2573 statement = ForeachStatement();
2574 {if (true) return statement;}
2577 statement = ContinueStatement();
2578 {if (true) return statement;}
2581 statement = ReturnStatement();
2582 {if (true) return statement;}
2585 statement = EchoStatement();
2586 {if (true) return statement;}
2593 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2595 token = jj_consume_token(AT);
2598 jj_la1[69] = jj_gen;
2601 statement = IncludeStatement();
2602 if (token != null) {
2603 ((InclusionStatement)statement).silent = true;
2605 {if (true) return statement;}
2608 statement = StaticStatement();
2609 {if (true) return statement;}
2612 statement = GlobalStatement();
2613 {if (true) return statement;}
2616 statement = defineStatement();
2617 currentSegment.add((Outlineable)statement);{if (true) return statement;}
2620 jj_la1[70] = jj_gen;
2621 jj_consume_token(-1);
2622 throw new ParseException();
2625 throw new Error("Missing return statement in function");
2628 static final public Define defineStatement() throws ParseException {
2629 final int start = SimpleCharStream.getPosition();
2630 Expression defineName,defineValue;
2631 jj_consume_token(DEFINE);
2633 jj_consume_token(LPAREN);
2634 } catch (ParseException e) {
2635 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2637 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2638 errorEnd = SimpleCharStream.getPosition() + 1;
2639 processParseException(e);
2642 defineName = Expression();
2643 } catch (ParseException e) {
2644 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2646 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2647 errorEnd = SimpleCharStream.getPosition() + 1;
2648 {if (true) throw e;}
2651 jj_consume_token(COMMA);
2652 } catch (ParseException e) {
2653 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2655 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2656 errorEnd = SimpleCharStream.getPosition() + 1;
2657 processParseException(e);
2660 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2662 defineValue = PrintExpression();
2665 jj_la1[71] = jj_gen;
2666 if (jj_2_10(2147483647)) {
2667 defineValue = varAssignation();
2669 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2682 case INTEGER_LITERAL:
2683 case FLOATING_POINT_LITERAL:
2684 case STRING_LITERAL:
2688 defineValue = ConditionalExpression();
2691 jj_la1[72] = jj_gen;
2692 jj_consume_token(-1);
2693 throw new ParseException();
2697 } catch (ParseException e) {
2698 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2700 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2701 errorEnd = SimpleCharStream.getPosition() + 1;
2702 {if (true) throw e;}
2705 jj_consume_token(RPAREN);
2706 } catch (ParseException e) {
2707 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2709 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2710 errorEnd = SimpleCharStream.getPosition() + 1;
2711 processParseException(e);
2713 {if (true) return new Define(currentSegment,
2717 SimpleCharStream.getPosition());}
2718 throw new Error("Missing return statement in function");
2722 * A Normal statement.
2724 static final public Statement Statement() throws ParseException {
2725 final Statement statement;
2726 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2758 case INTEGER_LITERAL:
2759 case FLOATING_POINT_LITERAL:
2760 case STRING_LITERAL:
2766 statement = StatementNoBreak();
2767 {if (true) return statement;}
2770 statement = BreakStatement();
2771 {if (true) return statement;}
2774 jj_la1[73] = jj_gen;
2775 jj_consume_token(-1);
2776 throw new ParseException();
2778 throw new Error("Missing return statement in function");
2782 * An html block inside a php syntax.
2784 static final public HTMLBlock htmlBlock() throws ParseException {
2785 final int startIndex = nodePtr;
2786 AstNode[] blockNodes;
2788 jj_consume_token(PHPEND);
2791 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2796 jj_la1[74] = jj_gen;
2802 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2804 jj_consume_token(PHPSTARTLONG);
2807 jj_consume_token(PHPSTARTSHORT);
2810 jj_la1[75] = jj_gen;
2811 jj_consume_token(-1);
2812 throw new ParseException();
2814 } catch (ParseException e) {
2815 errorMessage = "unexpected end of file , '<?php' expected";
2817 errorStart = SimpleCharStream.getPosition();
2818 errorEnd = SimpleCharStream.getPosition();
2819 {if (true) throw e;}
2821 nbNodes = nodePtr - startIndex;
2822 blockNodes = new AstNode[nbNodes];
2823 System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2824 nodePtr = startIndex;
2825 {if (true) return new HTMLBlock(blockNodes);}
2826 throw new Error("Missing return statement in function");
2830 * An include statement. It's "include" an expression;
2832 static final public InclusionStatement IncludeStatement() throws ParseException {
2833 final Expression expr;
2835 final int pos = SimpleCharStream.getPosition();
2836 final InclusionStatement inclusionStatement;
2837 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2839 jj_consume_token(REQUIRE);
2840 keyword = InclusionStatement.REQUIRE;
2843 jj_consume_token(REQUIRE_ONCE);
2844 keyword = InclusionStatement.REQUIRE_ONCE;
2847 jj_consume_token(INCLUDE);
2848 keyword = InclusionStatement.INCLUDE;
2851 jj_consume_token(INCLUDE_ONCE);
2852 keyword = InclusionStatement.INCLUDE_ONCE;
2855 jj_la1[76] = jj_gen;
2856 jj_consume_token(-1);
2857 throw new ParseException();
2860 expr = Expression();
2861 } catch (ParseException e) {
2862 if (errorMessage != null) {
2863 {if (true) throw e;}
2865 errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
2867 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2868 errorEnd = SimpleCharStream.getPosition() + 1;
2869 {if (true) throw e;}
2871 inclusionStatement = new InclusionStatement(currentSegment,
2875 currentSegment.add(inclusionStatement);
2877 jj_consume_token(SEMICOLON);
2878 } catch (ParseException e) {
2879 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2881 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2882 errorEnd = SimpleCharStream.getPosition() + 1;
2883 {if (true) throw e;}
2885 {if (true) return inclusionStatement;}
2886 throw new Error("Missing return statement in function");
2889 static final public PrintExpression PrintExpression() throws ParseException {
2890 final Expression expr;
2891 final int pos = SimpleCharStream.getPosition();
2892 jj_consume_token(PRINT);
2893 expr = Expression();
2894 {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
2895 throw new Error("Missing return statement in function");
2898 static final public ListExpression ListExpression() throws ParseException {
2900 Expression expression = null;
2901 ArrayList list = new ArrayList();
2902 final int pos = SimpleCharStream.getPosition();
2903 jj_consume_token(LIST);
2905 jj_consume_token(LPAREN);
2906 } catch (ParseException e) {
2907 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2909 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2910 errorEnd = SimpleCharStream.getPosition() + 1;
2911 {if (true) throw e;}
2913 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2916 expr = VariableDeclaratorId();
2920 jj_la1[77] = jj_gen;
2923 if (expr == null) list.add(null);
2926 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2931 jj_la1[78] = jj_gen;
2935 jj_consume_token(COMMA);
2936 } catch (ParseException e) {
2937 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2939 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2940 errorEnd = SimpleCharStream.getPosition() + 1;
2941 {if (true) throw e;}
2943 expr = VariableDeclaratorId();
2947 jj_consume_token(RPAREN);
2948 } catch (ParseException e) {
2949 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2951 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2952 errorEnd = SimpleCharStream.getPosition() + 1;
2953 {if (true) throw e;}
2955 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2957 jj_consume_token(ASSIGN);
2958 expression = Expression();
2959 String[] strings = new String[list.size()];
2960 list.toArray(strings);
2961 {if (true) return new ListExpression(strings,
2964 SimpleCharStream.getPosition());}
2967 jj_la1[79] = jj_gen;
2970 String[] strings = new String[list.size()];
2971 list.toArray(strings);
2972 {if (true) return new ListExpression(strings,pos,SimpleCharStream.getPosition());}
2973 throw new Error("Missing return statement in function");
2977 * An echo statement.
2978 * echo anyexpression (, otherexpression)*
2980 static final public EchoStatement EchoStatement() throws ParseException {
2981 final ArrayList expressions = new ArrayList();
2983 final int pos = SimpleCharStream.getPosition();
2984 jj_consume_token(ECHO);
2985 expr = Expression();
2986 expressions.add(expr);
2989 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2994 jj_la1[80] = jj_gen;
2997 jj_consume_token(COMMA);
2998 expr = Expression();
2999 expressions.add(expr);
3002 jj_consume_token(SEMICOLON);
3003 } catch (ParseException e) {
3004 if (e.currentToken.next.kind != 4) {
3005 errorMessage = "';' expected after 'echo' statement";
3007 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3008 errorEnd = SimpleCharStream.getPosition() + 1;
3009 {if (true) throw e;}
3012 Expression[] exprs = new Expression[expressions.size()];
3013 expressions.toArray(exprs);
3014 {if (true) return new EchoStatement(exprs,pos);}
3015 throw new Error("Missing return statement in function");
3018 static final public GlobalStatement GlobalStatement() throws ParseException {
3019 final int pos = SimpleCharStream.getPosition();
3021 ArrayList vars = new ArrayList();
3022 GlobalStatement global;
3023 jj_consume_token(GLOBAL);
3024 expr = VariableDeclaratorId();
3028 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3033 jj_la1[81] = jj_gen;
3036 jj_consume_token(COMMA);
3037 expr = VariableDeclaratorId();
3041 jj_consume_token(SEMICOLON);
3042 String[] strings = new String[vars.size()];
3043 vars.toArray(strings);
3044 global = new GlobalStatement(currentSegment,
3047 SimpleCharStream.getPosition());
3048 currentSegment.add(global);
3049 {if (true) return global;}
3050 } catch (ParseException e) {
3051 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3053 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3054 errorEnd = SimpleCharStream.getPosition() + 1;
3055 {if (true) throw e;}
3057 throw new Error("Missing return statement in function");
3060 static final public StaticStatement StaticStatement() throws ParseException {
3061 final int pos = SimpleCharStream.getPosition();
3062 final ArrayList vars = new ArrayList();
3063 VariableDeclaration expr;
3064 jj_consume_token(STATIC);
3065 expr = VariableDeclarator();
3066 vars.add(new String(expr.name));
3069 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3074 jj_la1[82] = jj_gen;
3077 jj_consume_token(COMMA);
3078 expr = VariableDeclarator();
3079 vars.add(new String(expr.name));
3082 jj_consume_token(SEMICOLON);
3083 String[] strings = new String[vars.size()];
3084 vars.toArray(strings);
3085 {if (true) return new StaticStatement(strings,
3087 SimpleCharStream.getPosition());}
3088 } catch (ParseException e) {
3089 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3091 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3092 errorEnd = SimpleCharStream.getPosition() + 1;
3093 {if (true) throw e;}
3095 throw new Error("Missing return statement in function");
3098 static final public LabeledStatement LabeledStatement() throws ParseException {
3099 final int pos = SimpleCharStream.getPosition();
3101 final Statement statement;
3102 label = jj_consume_token(IDENTIFIER);
3103 jj_consume_token(COLON);
3104 statement = Statement();
3105 {if (true) return new LabeledStatement(label.image.toCharArray(),statement,pos,SimpleCharStream.getPosition());}
3106 throw new Error("Missing return statement in function");
3116 static final public Block Block() throws ParseException {
3117 final int pos = SimpleCharStream.getPosition();
3118 final ArrayList list = new ArrayList();
3119 Statement statement;
3121 jj_consume_token(LBRACE);
3122 } catch (ParseException e) {
3123 errorMessage = "'{' expected";
3125 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3126 errorEnd = SimpleCharStream.getPosition() + 1;
3127 {if (true) throw e;}
3131 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3167 case INTEGER_LITERAL:
3168 case FLOATING_POINT_LITERAL:
3169 case STRING_LITERAL:
3178 jj_la1[83] = jj_gen;
3181 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3216 case INTEGER_LITERAL:
3217 case FLOATING_POINT_LITERAL:
3218 case STRING_LITERAL:
3224 statement = BlockStatement();
3225 list.add(statement);
3228 statement = htmlBlock();
3229 list.add(statement);
3232 jj_la1[84] = jj_gen;
3233 jj_consume_token(-1);
3234 throw new ParseException();
3238 jj_consume_token(RBRACE);
3239 } catch (ParseException e) {
3240 errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3242 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3243 errorEnd = SimpleCharStream.getPosition() + 1;
3244 {if (true) throw e;}
3246 Statement[] statements = new Statement[list.size()];
3247 list.toArray(statements);
3248 {if (true) return new Block(statements,pos,SimpleCharStream.getPosition());}
3249 throw new Error("Missing return statement in function");
3252 static final public Statement BlockStatement() throws ParseException {
3253 final Statement statement;
3254 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3287 case INTEGER_LITERAL:
3288 case FLOATING_POINT_LITERAL:
3289 case STRING_LITERAL:
3296 statement = Statement();
3297 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3298 {if (true) return statement;}
3299 } catch (ParseException e) {
3300 if (errorMessage != null) {if (true) throw e;}
3301 errorMessage = "statement expected";
3303 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3304 errorEnd = SimpleCharStream.getPosition() + 1;
3305 {if (true) throw e;}
3309 statement = ClassDeclaration();
3310 {if (true) return statement;}
3313 statement = MethodDeclaration();
3314 if (phpDocument == currentSegment) pushOnAstNodes(statement);
3315 currentSegment.add((MethodDeclaration) statement);
3316 {if (true) return statement;}
3319 jj_la1[85] = jj_gen;
3320 jj_consume_token(-1);
3321 throw new ParseException();
3323 throw new Error("Missing return statement in function");
3327 * A Block statement that will not contain any 'break'
3329 static final public Statement BlockStatementNoBreak() throws ParseException {
3330 final Statement statement;
3331 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3363 case INTEGER_LITERAL:
3364 case FLOATING_POINT_LITERAL:
3365 case STRING_LITERAL:
3371 statement = StatementNoBreak();
3372 {if (true) return statement;}
3375 statement = ClassDeclaration();
3376 {if (true) return statement;}
3379 statement = MethodDeclaration();
3380 currentSegment.add((MethodDeclaration) statement);
3381 {if (true) return statement;}
3384 jj_la1[86] = jj_gen;
3385 jj_consume_token(-1);
3386 throw new ParseException();
3388 throw new Error("Missing return statement in function");
3391 static final public VariableDeclaration[] LocalVariableDeclaration() throws ParseException {
3392 final ArrayList list = new ArrayList();
3393 VariableDeclaration var;
3394 var = LocalVariableDeclarator();
3398 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3403 jj_la1[87] = jj_gen;
3406 jj_consume_token(COMMA);
3407 var = LocalVariableDeclarator();
3410 VariableDeclaration[] vars = new VariableDeclaration[list.size()];
3412 {if (true) return vars;}
3413 throw new Error("Missing return statement in function");
3416 static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3417 final String varName;
3418 Expression initializer = null;
3419 final int pos = SimpleCharStream.getPosition();
3420 varName = VariableDeclaratorId();
3421 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3423 jj_consume_token(ASSIGN);
3424 initializer = Expression();
3427 jj_la1[88] = jj_gen;
3430 if (initializer == null) {
3431 {if (true) return new VariableDeclaration(currentSegment,
3432 varName.toCharArray(),
3434 SimpleCharStream.getPosition());}
3436 {if (true) return new VariableDeclaration(currentSegment,
3437 varName.toCharArray(),
3440 throw new Error("Missing return statement in function");
3443 static final public EmptyStatement EmptyStatement() throws ParseException {
3445 jj_consume_token(SEMICOLON);
3446 pos = SimpleCharStream.getPosition();
3447 {if (true) return new EmptyStatement(pos-1,pos);}
3448 throw new Error("Missing return statement in function");
3451 static final public Expression StatementExpression() throws ParseException {
3452 Expression expr,expr2;
3454 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3457 expr = PreIncDecExpression();
3458 {if (true) return expr;}
3465 expr = PrimaryExpression();
3466 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3481 case RSIGNEDSHIFTASSIGN:
3482 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3484 jj_consume_token(PLUS_PLUS);
3485 {if (true) return new PostfixedUnaryExpression(expr,
3486 OperatorIds.PLUS_PLUS,
3487 SimpleCharStream.getPosition());}
3490 jj_consume_token(MINUS_MINUS);
3491 {if (true) return new PostfixedUnaryExpression(expr,
3492 OperatorIds.MINUS_MINUS,
3493 SimpleCharStream.getPosition());}
3507 case RSIGNEDSHIFTASSIGN:
3508 operator = AssignmentOperator();
3509 expr2 = Expression();
3510 {if (true) return new BinaryExpression(expr,expr2,operator);}
3513 jj_la1[89] = jj_gen;
3514 jj_consume_token(-1);
3515 throw new ParseException();
3519 jj_la1[90] = jj_gen;
3522 {if (true) return expr;}
3525 jj_la1[91] = jj_gen;
3526 jj_consume_token(-1);
3527 throw new ParseException();
3529 throw new Error("Missing return statement in function");
3532 static final public SwitchStatement SwitchStatement() throws ParseException {
3533 final Expression variable;
3534 final AbstractCase[] cases;
3535 final int pos = SimpleCharStream.getPosition();
3536 jj_consume_token(SWITCH);
3538 jj_consume_token(LPAREN);
3539 } catch (ParseException e) {
3540 errorMessage = "'(' expected after 'switch'";
3542 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3543 errorEnd = SimpleCharStream.getPosition() + 1;
3544 {if (true) throw e;}
3547 variable = Expression();
3548 } catch (ParseException e) {
3549 if (errorMessage != null) {
3550 {if (true) throw e;}
3552 errorMessage = "expression expected";
3554 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3555 errorEnd = SimpleCharStream.getPosition() + 1;
3556 {if (true) throw e;}
3559 jj_consume_token(RPAREN);
3560 } catch (ParseException e) {
3561 errorMessage = "')' expected";
3563 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3564 errorEnd = SimpleCharStream.getPosition() + 1;
3565 {if (true) throw e;}
3567 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3569 cases = switchStatementBrace();
3572 cases = switchStatementColon(pos, pos + 6);
3575 jj_la1[92] = jj_gen;
3576 jj_consume_token(-1);
3577 throw new ParseException();
3579 {if (true) return new SwitchStatement(variable,cases,pos,SimpleCharStream.getPosition());}
3580 throw new Error("Missing return statement in function");
3583 static final public AbstractCase[] switchStatementBrace() throws ParseException {
3585 final ArrayList cases = new ArrayList();
3586 jj_consume_token(LBRACE);
3589 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3595 jj_la1[93] = jj_gen;
3598 cas = switchLabel0();
3602 jj_consume_token(RBRACE);
3603 AbstractCase[] abcase = new AbstractCase[cases.size()];
3604 cases.toArray(abcase);
3605 {if (true) return abcase;}
3606 } catch (ParseException e) {
3607 errorMessage = "'}' expected";
3609 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3610 errorEnd = SimpleCharStream.getPosition() + 1;
3611 {if (true) throw e;}
3613 throw new Error("Missing return statement in function");
3617 * A Switch statement with : ... endswitch;
3618 * @param start the begin offset of the switch
3619 * @param end the end offset of the switch
3621 static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3623 final ArrayList cases = new ArrayList();
3624 jj_consume_token(COLON);
3626 setMarker(fileToParse,
3627 "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3631 "Line " + token.beginLine);
3632 } catch (CoreException e) {
3633 PHPeclipsePlugin.log(e);
3637 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3643 jj_la1[94] = jj_gen;
3646 cas = switchLabel0();
3650 jj_consume_token(ENDSWITCH);
3651 } catch (ParseException e) {
3652 errorMessage = "'endswitch' expected";
3654 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3655 errorEnd = SimpleCharStream.getPosition() + 1;
3656 {if (true) throw e;}
3659 jj_consume_token(SEMICOLON);
3660 AbstractCase[] abcase = new AbstractCase[cases.size()];
3661 cases.toArray(abcase);
3662 {if (true) return abcase;}
3663 } catch (ParseException e) {
3664 errorMessage = "';' expected after 'endswitch' keyword";
3666 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3667 errorEnd = SimpleCharStream.getPosition() + 1;
3668 {if (true) throw e;}
3670 throw new Error("Missing return statement in function");
3673 static final public AbstractCase switchLabel0() throws ParseException {
3674 final Expression expr;
3675 Statement statement;
3676 final ArrayList stmts = new ArrayList();
3677 final int pos = SimpleCharStream.getPosition();
3678 expr = SwitchLabel();
3681 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3716 case INTEGER_LITERAL:
3717 case FLOATING_POINT_LITERAL:
3718 case STRING_LITERAL:
3727 jj_la1[95] = jj_gen;
3730 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3764 case INTEGER_LITERAL:
3765 case FLOATING_POINT_LITERAL:
3766 case STRING_LITERAL:
3772 statement = BlockStatementNoBreak();
3773 stmts.add(statement);
3776 statement = htmlBlock();
3777 stmts.add(statement);
3780 jj_la1[96] = jj_gen;
3781 jj_consume_token(-1);
3782 throw new ParseException();
3785 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3787 statement = BreakStatement();
3788 stmts.add(statement);
3791 jj_la1[97] = jj_gen;
3794 Statement[] stmtsArray = new Statement[stmts.size()];
3795 stmts.toArray(stmtsArray);
3796 if (expr == null) {//it's a default
3797 {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3799 {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3800 throw new Error("Missing return statement in function");
3805 * case Expression() :
3807 * @return the if it was a case and null if not
3809 static final public Expression SwitchLabel() throws ParseException {
3810 final Expression expr;
3811 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3813 token = jj_consume_token(CASE);
3815 expr = Expression();
3816 } catch (ParseException e) {
3817 if (errorMessage != null) {if (true) throw e;}
3818 errorMessage = "expression expected after 'case' keyword";
3820 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3821 errorEnd = SimpleCharStream.getPosition() + 1;
3822 {if (true) throw e;}
3825 jj_consume_token(COLON);
3826 {if (true) return expr;}
3827 } catch (ParseException e) {
3828 errorMessage = "':' expected after case expression";
3830 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3831 errorEnd = SimpleCharStream.getPosition() + 1;
3832 {if (true) throw e;}
3836 token = jj_consume_token(_DEFAULT);
3838 jj_consume_token(COLON);
3839 {if (true) return null;}
3840 } catch (ParseException e) {
3841 errorMessage = "':' expected after 'default' keyword";
3843 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3844 errorEnd = SimpleCharStream.getPosition() + 1;
3845 {if (true) throw e;}
3849 jj_la1[98] = jj_gen;
3850 jj_consume_token(-1);
3851 throw new ParseException();
3853 throw new Error("Missing return statement in function");
3856 static final public Break BreakStatement() throws ParseException {
3857 Expression expression = null;
3858 final int start = SimpleCharStream.getPosition();
3859 jj_consume_token(BREAK);
3860 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3876 case INTEGER_LITERAL:
3877 case FLOATING_POINT_LITERAL:
3878 case STRING_LITERAL:
3882 expression = Expression();
3885 jj_la1[99] = jj_gen;
3889 jj_consume_token(SEMICOLON);
3890 } catch (ParseException e) {
3891 errorMessage = "';' expected after 'break' keyword";
3893 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3894 errorEnd = SimpleCharStream.getPosition() + 1;
3895 {if (true) throw e;}
3897 {if (true) return new Break(expression, start, SimpleCharStream.getPosition());}
3898 throw new Error("Missing return statement in function");
3901 static final public IfStatement IfStatement() throws ParseException {
3902 final int pos = SimpleCharStream.getPosition();
3903 Expression condition;
3904 IfStatement ifStatement;
3905 jj_consume_token(IF);
3906 condition = Condition("if");
3907 ifStatement = IfStatement0(condition, pos,pos+2);
3908 {if (true) return ifStatement;}
3909 throw new Error("Missing return statement in function");
3912 static final public Expression Condition(final String keyword) throws ParseException {
3913 final Expression condition;
3915 jj_consume_token(LPAREN);
3916 } catch (ParseException e) {
3917 errorMessage = "'(' expected after " + keyword + " keyword";
3919 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length();
3920 errorEnd = errorStart +1;
3921 processParseException(e);
3923 condition = Expression();
3925 jj_consume_token(RPAREN);
3926 } catch (ParseException e) {
3927 errorMessage = "')' expected after " + keyword + " keyword";
3929 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3930 errorEnd = SimpleCharStream.getPosition() + 1;
3931 processParseException(e);
3933 {if (true) return condition;}
3934 throw new Error("Missing return statement in function");
3937 static final public IfStatement IfStatement0(Expression condition, final int start,final int end) throws ParseException {
3938 Statement statement;
3940 final Statement[] statementsArray;
3941 ElseIf elseifStatement;
3942 Else elseStatement = null;
3944 final ArrayList elseIfList = new ArrayList();
3946 int pos = SimpleCharStream.getPosition();
3948 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3950 jj_consume_token(COLON);
3951 stmts = new ArrayList();
3954 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3988 case INTEGER_LITERAL:
3989 case FLOATING_POINT_LITERAL:
3990 case STRING_LITERAL:
3999 jj_la1[100] = jj_gen;
4002 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4035 case INTEGER_LITERAL:
4036 case FLOATING_POINT_LITERAL:
4037 case STRING_LITERAL:
4043 statement = Statement();
4044 stmts.add(statement);
4047 statement = htmlBlock();
4048 stmts.add(statement);
4051 jj_la1[101] = jj_gen;
4052 jj_consume_token(-1);
4053 throw new ParseException();
4056 endStatements = SimpleCharStream.getPosition();
4059 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4064 jj_la1[102] = jj_gen;
4067 elseifStatement = ElseIfStatementColon();
4068 elseIfList.add(elseifStatement);
4070 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4072 elseStatement = ElseStatementColon();
4075 jj_la1[103] = jj_gen;
4079 setMarker(fileToParse,
4080 "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4084 "Line " + token.beginLine);
4085 } catch (CoreException e) {
4086 PHPeclipsePlugin.log(e);
4089 jj_consume_token(ENDIF);
4090 } catch (ParseException e) {
4091 errorMessage = "'endif' expected";
4093 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4094 errorEnd = SimpleCharStream.getPosition() + 1;
4095 {if (true) throw e;}
4098 jj_consume_token(SEMICOLON);
4099 } catch (ParseException e) {
4100 errorMessage = "';' expected after 'endif' keyword";
4102 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4103 errorEnd = SimpleCharStream.getPosition() + 1;
4104 {if (true) throw e;}
4106 elseIfs = new ElseIf[elseIfList.size()];
4107 elseIfList.toArray(elseIfs);
4108 if (stmts.size() == 1) {
4109 {if (true) return new IfStatement(condition,
4110 (Statement) stmts.get(0),
4114 SimpleCharStream.getPosition());}
4116 statementsArray = new Statement[stmts.size()];
4117 stmts.toArray(statementsArray);
4118 {if (true) return new IfStatement(condition,
4119 new Block(statementsArray,pos,endStatements),
4123 SimpleCharStream.getPosition());}
4159 case INTEGER_LITERAL:
4160 case FLOATING_POINT_LITERAL:
4161 case STRING_LITERAL:
4167 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4200 case INTEGER_LITERAL:
4201 case FLOATING_POINT_LITERAL:
4202 case STRING_LITERAL:
4214 jj_la1[104] = jj_gen;
4215 jj_consume_token(-1);
4216 throw new ParseException();
4220 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4225 jj_la1[105] = jj_gen;
4228 elseifStatement = ElseIfStatement();
4229 elseIfList.add(elseifStatement);
4231 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4233 jj_consume_token(ELSE);
4235 pos = SimpleCharStream.getPosition();
4236 statement = Statement();
4237 elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4238 } catch (ParseException e) {
4239 if (errorMessage != null) {
4240 {if (true) throw e;}
4242 errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4244 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4245 errorEnd = SimpleCharStream.getPosition() + 1;
4246 {if (true) throw e;}
4250 jj_la1[106] = jj_gen;
4253 elseIfs = new ElseIf[elseIfList.size()];
4254 elseIfList.toArray(elseIfs);
4255 {if (true) return new IfStatement(condition,
4260 SimpleCharStream.getPosition());}
4263 jj_la1[107] = jj_gen;
4264 jj_consume_token(-1);
4265 throw new ParseException();
4267 throw new Error("Missing return statement in function");
4270 static final public ElseIf ElseIfStatementColon() throws ParseException {
4271 Expression condition;
4272 Statement statement;
4273 final ArrayList list = new ArrayList();
4274 final int pos = SimpleCharStream.getPosition();
4275 jj_consume_token(ELSEIF);
4276 condition = Condition("elseif");
4277 jj_consume_token(COLON);
4280 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4314 case INTEGER_LITERAL:
4315 case FLOATING_POINT_LITERAL:
4316 case STRING_LITERAL:
4325 jj_la1[108] = jj_gen;
4328 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4361 case INTEGER_LITERAL:
4362 case FLOATING_POINT_LITERAL:
4363 case STRING_LITERAL:
4369 statement = Statement();
4370 list.add(statement);
4373 statement = htmlBlock();
4374 list.add(statement);
4377 jj_la1[109] = jj_gen;
4378 jj_consume_token(-1);
4379 throw new ParseException();
4382 Statement[] stmtsArray = new Statement[list.size()];
4383 list.toArray(stmtsArray);
4384 {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4385 throw new Error("Missing return statement in function");
4388 static final public Else ElseStatementColon() throws ParseException {
4389 Statement statement;
4390 final ArrayList list = new ArrayList();
4391 final int pos = SimpleCharStream.getPosition();
4392 jj_consume_token(ELSE);
4393 jj_consume_token(COLON);
4396 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4430 case INTEGER_LITERAL:
4431 case FLOATING_POINT_LITERAL:
4432 case STRING_LITERAL:
4441 jj_la1[110] = jj_gen;
4444 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4477 case INTEGER_LITERAL:
4478 case FLOATING_POINT_LITERAL:
4479 case STRING_LITERAL:
4485 statement = Statement();
4486 list.add(statement);
4489 statement = htmlBlock();
4490 list.add(statement);
4493 jj_la1[111] = jj_gen;
4494 jj_consume_token(-1);
4495 throw new ParseException();
4498 Statement[] stmtsArray = new Statement[list.size()];
4499 list.toArray(stmtsArray);
4500 {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4501 throw new Error("Missing return statement in function");
4504 static final public ElseIf ElseIfStatement() throws ParseException {
4505 Expression condition;
4506 Statement statement;
4507 final ArrayList list = new ArrayList();
4508 final int pos = SimpleCharStream.getPosition();
4509 jj_consume_token(ELSEIF);
4510 condition = Condition("elseif");
4511 statement = Statement();
4512 list.add(statement);/*todo:do better*/
4513 Statement[] stmtsArray = new Statement[list.size()];
4514 list.toArray(stmtsArray);
4515 {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4516 throw new Error("Missing return statement in function");
4519 static final public WhileStatement WhileStatement() throws ParseException {
4520 final Expression condition;
4521 final Statement action;
4522 final int pos = SimpleCharStream.getPosition();
4523 jj_consume_token(WHILE);
4524 condition = Condition("while");
4525 action = WhileStatement0(pos,pos + 5);
4526 {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4527 throw new Error("Missing return statement in function");
4530 static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4531 Statement statement;
4532 final ArrayList stmts = new ArrayList();
4533 final int pos = SimpleCharStream.getPosition();
4534 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4536 jj_consume_token(COLON);
4539 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4572 case INTEGER_LITERAL:
4573 case FLOATING_POINT_LITERAL:
4574 case STRING_LITERAL:
4583 jj_la1[112] = jj_gen;
4586 statement = Statement();
4587 stmts.add(statement);
4590 setMarker(fileToParse,
4591 "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4595 "Line " + token.beginLine);
4596 } catch (CoreException e) {
4597 PHPeclipsePlugin.log(e);
4600 jj_consume_token(ENDWHILE);
4601 } catch (ParseException e) {
4602 errorMessage = "'endwhile' expected";
4604 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4605 errorEnd = SimpleCharStream.getPosition() + 1;
4606 {if (true) throw e;}
4609 jj_consume_token(SEMICOLON);
4610 Statement[] stmtsArray = new Statement[stmts.size()];
4611 stmts.toArray(stmtsArray);
4612 {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4613 } catch (ParseException e) {
4614 errorMessage = "';' expected after 'endwhile' keyword";
4616 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4617 errorEnd = SimpleCharStream.getPosition() + 1;
4618 {if (true) throw e;}
4653 case INTEGER_LITERAL:
4654 case FLOATING_POINT_LITERAL:
4655 case STRING_LITERAL:
4661 statement = Statement();
4662 {if (true) return statement;}
4665 jj_la1[113] = jj_gen;
4666 jj_consume_token(-1);
4667 throw new ParseException();
4669 throw new Error("Missing return statement in function");
4672 static final public DoStatement DoStatement() throws ParseException {
4673 final Statement action;
4674 final Expression condition;
4675 final int pos = SimpleCharStream.getPosition();
4676 jj_consume_token(DO);
4677 action = Statement();
4678 jj_consume_token(WHILE);
4679 condition = Condition("while");
4681 jj_consume_token(SEMICOLON);
4682 {if (true) return new DoStatement(condition,action,pos,SimpleCharStream.getPosition());}
4683 } catch (ParseException e) {
4684 errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4686 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4687 errorEnd = SimpleCharStream.getPosition() + 1;
4688 {if (true) throw e;}
4690 throw new Error("Missing return statement in function");
4693 static final public ForeachStatement ForeachStatement() throws ParseException {
4694 Statement statement;
4695 Expression expression;
4696 final int pos = SimpleCharStream.getPosition();
4697 ArrayVariableDeclaration variable;
4698 jj_consume_token(FOREACH);
4700 jj_consume_token(LPAREN);
4701 } catch (ParseException e) {
4702 errorMessage = "'(' expected after 'foreach' keyword";
4704 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4705 errorEnd = SimpleCharStream.getPosition() + 1;
4706 {if (true) throw e;}
4709 expression = Expression();
4710 } catch (ParseException e) {
4711 errorMessage = "variable expected";
4713 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4714 errorEnd = SimpleCharStream.getPosition() + 1;
4715 {if (true) throw e;}
4718 jj_consume_token(AS);
4719 } catch (ParseException e) {
4720 errorMessage = "'as' expected";
4722 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4723 errorEnd = SimpleCharStream.getPosition() + 1;
4724 {if (true) throw e;}
4727 variable = ArrayVariable();
4728 } catch (ParseException e) {
4729 errorMessage = "variable expected";
4731 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4732 errorEnd = SimpleCharStream.getPosition() + 1;
4733 {if (true) throw e;}
4736 jj_consume_token(RPAREN);
4737 } catch (ParseException e) {
4738 errorMessage = "')' expected after 'foreach' keyword";
4740 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4741 errorEnd = SimpleCharStream.getPosition() + 1;
4742 {if (true) throw e;}
4745 statement = Statement();
4746 } catch (ParseException e) {
4747 if (errorMessage != null) {if (true) throw e;}
4748 errorMessage = "statement expected";
4750 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4751 errorEnd = SimpleCharStream.getPosition() + 1;
4752 {if (true) throw e;}
4754 {if (true) return new ForeachStatement(expression,
4758 SimpleCharStream.getPosition());}
4759 throw new Error("Missing return statement in function");
4762 static final public ForStatement ForStatement() throws ParseException {
4764 final int pos = SimpleCharStream.getPosition();
4765 Expression[] initializations = null;
4766 Expression condition = null;
4767 Expression[] increments = null;
4769 final ArrayList list = new ArrayList();
4770 final int startBlock, endBlock;
4771 token = jj_consume_token(FOR);
4773 jj_consume_token(LPAREN);
4774 } catch (ParseException e) {
4775 errorMessage = "'(' expected after 'for' keyword";
4777 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4778 errorEnd = SimpleCharStream.getPosition() + 1;
4779 {if (true) throw e;}
4781 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4789 initializations = ForInit();
4792 jj_la1[114] = jj_gen;
4795 jj_consume_token(SEMICOLON);
4796 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4812 case INTEGER_LITERAL:
4813 case FLOATING_POINT_LITERAL:
4814 case STRING_LITERAL:
4818 condition = Expression();
4821 jj_la1[115] = jj_gen;
4824 jj_consume_token(SEMICOLON);
4825 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4833 increments = StatementExpressionList();
4836 jj_la1[116] = jj_gen;
4839 jj_consume_token(RPAREN);
4840 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4873 case INTEGER_LITERAL:
4874 case FLOATING_POINT_LITERAL:
4875 case STRING_LITERAL:
4881 action = Statement();
4882 {if (true) return new ForStatement(initializations,condition,increments,action,pos,SimpleCharStream.getPosition());}
4885 jj_consume_token(COLON);
4886 startBlock = SimpleCharStream.getPosition();
4889 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4922 case INTEGER_LITERAL:
4923 case FLOATING_POINT_LITERAL:
4924 case STRING_LITERAL:
4933 jj_la1[117] = jj_gen;
4936 action = Statement();
4940 setMarker(fileToParse,
4941 "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
4943 pos+token.image.length(),
4945 "Line " + token.beginLine);
4946 } catch (CoreException e) {
4947 PHPeclipsePlugin.log(e);
4949 endBlock = SimpleCharStream.getPosition();
4951 jj_consume_token(ENDFOR);
4952 } catch (ParseException e) {
4953 errorMessage = "'endfor' expected";
4955 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4956 errorEnd = SimpleCharStream.getPosition() + 1;
4957 {if (true) throw e;}
4960 jj_consume_token(SEMICOLON);
4961 Statement[] stmtsArray = new Statement[list.size()];
4962 list.toArray(stmtsArray);
4963 {if (true) return new ForStatement(initializations,condition,increments,new Block(stmtsArray,startBlock,endBlock),pos,SimpleCharStream.getPosition());}
4964 } catch (ParseException e) {
4965 errorMessage = "';' expected after 'endfor' keyword";
4967 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4968 errorEnd = SimpleCharStream.getPosition() + 1;
4969 {if (true) throw e;}
4973 jj_la1[118] = jj_gen;
4974 jj_consume_token(-1);
4975 throw new ParseException();
4977 throw new Error("Missing return statement in function");
4980 static final public Expression[] ForInit() throws ParseException {
4982 if (jj_2_11(2147483647)) {
4983 exprs = LocalVariableDeclaration();
4984 {if (true) return exprs;}
4986 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4994 exprs = StatementExpressionList();
4995 {if (true) return exprs;}
4998 jj_la1[119] = jj_gen;
4999 jj_consume_token(-1);
5000 throw new ParseException();
5003 throw new Error("Missing return statement in function");
5006 static final public Expression[] StatementExpressionList() throws ParseException {
5007 final ArrayList list = new ArrayList();
5009 expr = StatementExpression();
5013 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5018 jj_la1[120] = jj_gen;
5021 jj_consume_token(COMMA);
5022 StatementExpression();
5025 Expression[] exprsArray = new Expression[list.size()];
5026 list.toArray(exprsArray);
5027 {if (true) return exprsArray;}
5028 throw new Error("Missing return statement in function");
5031 static final public Continue ContinueStatement() throws ParseException {
5032 Expression expr = null;
5033 final int pos = SimpleCharStream.getPosition();
5034 jj_consume_token(CONTINUE);
5035 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5051 case INTEGER_LITERAL:
5052 case FLOATING_POINT_LITERAL:
5053 case STRING_LITERAL:
5057 expr = Expression();
5060 jj_la1[121] = jj_gen;
5064 jj_consume_token(SEMICOLON);
5065 {if (true) return new Continue(expr,pos,SimpleCharStream.getPosition());}
5066 } catch (ParseException e) {
5067 errorMessage = "';' expected after 'continue' statement";
5069 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5070 errorEnd = SimpleCharStream.getPosition() + 1;
5071 {if (true) throw e;}
5073 throw new Error("Missing return statement in function");
5076 static final public ReturnStatement ReturnStatement() throws ParseException {
5077 Expression expr = null;
5078 final int pos = SimpleCharStream.getPosition();
5079 jj_consume_token(RETURN);
5080 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5096 case INTEGER_LITERAL:
5097 case FLOATING_POINT_LITERAL:
5098 case STRING_LITERAL:
5102 expr = Expression();
5105 jj_la1[122] = jj_gen;
5109 jj_consume_token(SEMICOLON);
5110 {if (true) return new ReturnStatement(expr,pos,SimpleCharStream.getPosition());}
5111 } catch (ParseException e) {
5112 errorMessage = "';' expected after 'return' statement";
5114 errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5115 errorEnd = SimpleCharStream.getPosition() + 1;
5116 {if (true) throw e;}
5118 throw new Error("Missing return statement in function");
5121 static final private boolean jj_2_1(int xla) {
5122 jj_la = xla; jj_lastpos = jj_scanpos = token;
5123 boolean retval = !jj_3_1();
5128 static final private boolean jj_2_2(int xla) {
5129 jj_la = xla; jj_lastpos = jj_scanpos = token;
5130 boolean retval = !jj_3_2();
5135 static final private boolean jj_2_3(int xla) {
5136 jj_la = xla; jj_lastpos = jj_scanpos = token;
5137 boolean retval = !jj_3_3();
5142 static final private boolean jj_2_4(int xla) {
5143 jj_la = xla; jj_lastpos = jj_scanpos = token;
5144 boolean retval = !jj_3_4();
5149 static final private boolean jj_2_5(int xla) {
5150 jj_la = xla; jj_lastpos = jj_scanpos = token;
5151 boolean retval = !jj_3_5();
5156 static final private boolean jj_2_6(int xla) {
5157 jj_la = xla; jj_lastpos = jj_scanpos = token;
5158 boolean retval = !jj_3_6();
5163 static final private boolean jj_2_7(int xla) {
5164 jj_la = xla; jj_lastpos = jj_scanpos = token;
5165 boolean retval = !jj_3_7();
5170 static final private boolean jj_2_8(int xla) {
5171 jj_la = xla; jj_lastpos = jj_scanpos = token;
5172 boolean retval = !jj_3_8();
5177 static final private boolean jj_2_9(int xla) {
5178 jj_la = xla; jj_lastpos = jj_scanpos = token;
5179 boolean retval = !jj_3_9();
5184 static final private boolean jj_2_10(int xla) {
5185 jj_la = xla; jj_lastpos = jj_scanpos = token;
5186 boolean retval = !jj_3_10();
5191 static final private boolean jj_2_11(int xla) {
5192 jj_la = xla; jj_lastpos = jj_scanpos = token;
5193 boolean retval = !jj_3_11();
5198 static final private boolean jj_3R_202() {
5199 if (jj_scan_token(MINUS_MINUS)) return true;
5200 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5204 static final private boolean jj_3R_201() {
5205 if (jj_scan_token(PLUS_PLUS)) return true;
5206 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5210 static final private boolean jj_3R_194() {
5215 if (jj_3R_202()) return true;
5216 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5217 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5221 static final private boolean jj_3R_177() {
5222 if (jj_3R_175()) return true;
5223 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5226 if (jj_3R_194()) jj_scanpos = xsp;
5227 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5231 static final private boolean jj_3R_57() {
5232 if (jj_3R_86()) return true;
5233 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5237 static final private boolean jj_3R_46() {
5242 if (jj_3R_57()) return true;
5243 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5244 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5248 static final private boolean jj_3R_56() {
5249 if (jj_scan_token(BANG)) return true;
5250 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5251 if (jj_3R_46()) return true;
5252 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5256 static final private boolean jj_3R_44() {
5257 if (jj_scan_token(ARRAY)) return true;
5258 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5262 static final private boolean jj_3R_193() {
5263 if (jj_scan_token(ARRAY)) return true;
5264 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5268 static final private boolean jj_3R_192() {
5269 if (jj_3R_53()) return true;
5270 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5274 static final private boolean jj_3R_176() {
5275 if (jj_scan_token(LPAREN)) return true;
5276 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5281 if (jj_3R_193()) return true;
5282 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5283 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5284 if (jj_scan_token(RPAREN)) return true;
5285 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5286 if (jj_3R_149()) return true;
5287 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5291 static final private boolean jj_3R_84() {
5292 if (jj_scan_token(OBJECT)) return true;
5293 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5297 static final private boolean jj_3R_83() {
5298 if (jj_scan_token(INTEGER)) return true;
5299 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5303 static final private boolean jj_3R_43() {
5304 if (jj_3R_53()) return true;
5305 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5309 static final private boolean jj_3R_82() {
5310 if (jj_scan_token(INT)) return true;
5311 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5315 static final private boolean jj_3R_81() {
5316 if (jj_scan_token(FLOAT)) return true;
5317 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5321 static final private boolean jj_3R_80() {
5322 if (jj_scan_token(DOUBLE)) return true;
5323 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5327 static final private boolean jj_3R_79() {
5328 if (jj_scan_token(REAL)) return true;
5329 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5333 static final private boolean jj_3R_78() {
5334 if (jj_scan_token(BOOLEAN)) return true;
5335 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5339 static final private boolean jj_3_4() {
5340 if (jj_scan_token(LPAREN)) return true;
5341 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5346 if (jj_3R_44()) return true;
5347 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5348 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5349 if (jj_scan_token(RPAREN)) return true;
5350 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5354 static final private boolean jj_3R_77() {
5355 if (jj_scan_token(BOOL)) return true;
5356 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5360 static final private boolean jj_3R_76() {
5361 if (jj_scan_token(STRING)) return true;
5362 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5366 static final private boolean jj_3R_53() {
5385 if (jj_3R_84()) return true;
5386 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5387 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5388 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5389 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5390 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5391 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5392 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5393 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5394 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5398 static final private boolean jj_3R_87() {
5399 if (jj_scan_token(ASSIGN)) return true;
5400 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5401 if (jj_3R_46()) return true;
5402 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5406 static final private boolean jj_3R_174() {
5407 if (jj_scan_token(LPAREN)) return true;
5408 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5409 if (jj_3R_46()) return true;
5410 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5411 if (jj_scan_token(RPAREN)) return true;
5412 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5416 static final private boolean jj_3R_173() {
5417 if (jj_3R_178()) return true;
5418 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5422 static final private boolean jj_3R_172() {
5423 if (jj_3R_177()) return true;
5424 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5428 static final private boolean jj_3R_168() {
5437 if (jj_3R_174()) return true;
5438 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5439 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5440 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5441 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5445 static final private boolean jj_3R_171() {
5446 if (jj_3R_176()) return true;
5447 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5451 static final private boolean jj_3R_170() {
5452 if (jj_scan_token(MINUS_MINUS)) return true;
5453 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5457 static final private boolean jj_3R_169() {
5458 if (jj_scan_token(PLUS_PLUS)) return true;
5459 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5463 static final private boolean jj_3R_167() {
5468 if (jj_3R_170()) return true;
5469 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5470 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5471 if (jj_3R_175()) return true;
5472 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5476 static final private boolean jj_3_10() {
5477 if (jj_3R_42()) return true;
5478 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5482 static final private boolean jj_3R_162() {
5483 if (jj_3R_168()) return true;
5484 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5488 static final private boolean jj_3R_161() {
5489 if (jj_3R_167()) return true;
5490 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5494 static final private boolean jj_3R_166() {
5495 if (jj_scan_token(MINUS)) return true;
5496 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5500 static final private boolean jj_3R_58() {
5501 if (jj_3R_51()) return true;
5502 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5505 if (jj_3R_87()) jj_scanpos = xsp;
5506 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5510 static final private boolean jj_3R_165() {
5511 if (jj_scan_token(PLUS)) return true;
5512 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5516 static final private boolean jj_3R_158() {
5523 if (jj_3R_162()) return true;
5524 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5525 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5526 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5530 static final private boolean jj_3R_160() {
5535 if (jj_3R_166()) return true;
5536 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5537 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5538 if (jj_3R_149()) return true;
5539 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5543 static final private boolean jj_3R_59() {
5544 if (jj_scan_token(COMMA)) return true;
5545 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5546 if (jj_3R_58()) return true;
5547 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5551 static final private boolean jj_3R_164() {
5552 if (jj_3R_158()) return true;
5553 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5557 static final private boolean jj_3R_48() {
5558 if (jj_3R_58()) return true;
5559 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5563 if (jj_3R_59()) { jj_scanpos = xsp; break; }
5564 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5569 static final private boolean jj_3R_159() {
5574 if (jj_3R_164()) return true;
5575 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5576 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5580 static final private boolean jj_3R_163() {
5581 if (jj_scan_token(AT)) return true;
5582 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5583 if (jj_3R_159()) return true;
5584 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5588 static final private boolean jj_3R_154() {
5589 if (jj_3R_159()) return true;
5590 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5594 static final private boolean jj_3R_149() {
5599 if (jj_3R_154()) return true;
5600 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5601 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5605 static final private boolean jj_3R_153() {
5606 if (jj_scan_token(BIT_AND)) return true;
5607 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5608 if (jj_3R_158()) return true;
5609 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5613 static final private boolean jj_3R_157() {
5614 if (jj_scan_token(REMAINDER)) return true;
5615 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5619 static final private boolean jj_3R_156() {
5620 if (jj_scan_token(SLASH)) return true;
5621 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5625 static final private boolean jj_3R_155() {
5626 if (jj_scan_token(STAR)) return true;
5627 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5631 static final private boolean jj_3R_150() {
5638 if (jj_3R_157()) return true;
5639 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5640 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5641 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5642 if (jj_3R_149()) return true;
5643 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5647 static final private boolean jj_3R_144() {
5648 if (jj_3R_149()) return true;
5649 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5653 if (jj_3R_150()) { jj_scanpos = xsp; break; }
5654 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5659 static final private boolean jj_3_9() {
5660 if (jj_3R_47()) return true;
5661 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5665 static final private boolean jj_3R_152() {
5666 if (jj_scan_token(MINUS)) return true;
5667 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5671 static final private boolean jj_3R_151() {
5672 if (jj_scan_token(PLUS)) return true;
5673 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5677 static final private boolean jj_3R_145() {
5682 if (jj_3R_152()) return true;
5683 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5684 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5685 if (jj_3R_144()) return true;
5686 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5690 static final private boolean jj_3R_138() {
5691 if (jj_3R_144()) return true;
5692 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5696 if (jj_3R_145()) { jj_scanpos = xsp; break; }
5697 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5702 static final private boolean jj_3R_204() {
5703 if (jj_scan_token(COMMA)) return true;
5704 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5708 static final private boolean jj_3_8() {
5709 if (jj_3R_46()) return true;
5710 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5711 if (jj_scan_token(SEMICOLON)) return true;
5712 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5716 static final private boolean jj_3_2() {
5717 if (jj_scan_token(COMMA)) return true;
5718 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5719 if (jj_3R_41()) return true;
5720 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5724 static final private boolean jj_3R_148() {
5725 if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
5726 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5730 static final private boolean jj_3R_203() {
5731 if (jj_3R_41()) return true;
5732 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5736 if (jj_3_2()) { jj_scanpos = xsp; break; }
5737 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5742 static final private boolean jj_3R_147() {
5743 if (jj_scan_token(RSIGNEDSHIFT)) return true;
5744 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5748 static final private boolean jj_3R_146() {
5749 if (jj_scan_token(LSHIFT)) return true;
5750 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5754 static final private boolean jj_3R_139() {
5761 if (jj_3R_148()) return true;
5762 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5763 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5764 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5765 if (jj_3R_138()) return true;
5766 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5770 static final private boolean jj_3R_131() {
5771 if (jj_3R_138()) return true;
5772 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5776 if (jj_3R_139()) { jj_scanpos = xsp; break; }
5777 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5782 static final private boolean jj_3_11() {
5783 if (jj_3R_48()) return true;
5784 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5788 static final private boolean jj_3R_200() {
5789 if (jj_scan_token(LPAREN)) return true;
5790 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5793 if (jj_3R_203()) jj_scanpos = xsp;
5794 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5796 if (jj_3R_204()) jj_scanpos = xsp;
5797 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5798 if (jj_scan_token(RPAREN)) return true;
5799 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5803 static final private boolean jj_3R_47() {
5804 if (jj_scan_token(IDENTIFIER)) return true;
5805 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5806 if (jj_scan_token(COLON)) return true;
5807 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5811 static final private boolean jj_3R_143() {
5812 if (jj_scan_token(GE)) return true;
5813 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5817 static final private boolean jj_3R_142() {
5818 if (jj_scan_token(LE)) return true;
5819 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5823 static final private boolean jj_3R_141() {
5824 if (jj_scan_token(GT)) return true;
5825 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5829 static final private boolean jj_3R_140() {
5830 if (jj_scan_token(LT)) return true;
5831 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5835 static final private boolean jj_3R_106() {
5836 if (jj_scan_token(COMMA)) return true;
5837 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5838 if (jj_3R_46()) return true;
5839 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5843 static final private boolean jj_3R_132() {
5852 if (jj_3R_143()) return true;
5853 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5854 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5855 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5856 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5857 if (jj_3R_131()) return true;
5858 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5862 static final private boolean jj_3R_205() {
5863 if (jj_scan_token(ARRAYASSIGN)) return true;
5864 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5865 if (jj_3R_46()) return true;
5866 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5870 static final private boolean jj_3R_129() {
5871 if (jj_3R_131()) return true;
5872 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5876 if (jj_3R_132()) { jj_scanpos = xsp; break; }
5877 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5882 static final private boolean jj_3R_41() {
5883 if (jj_3R_46()) return true;
5884 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5887 if (jj_3R_205()) jj_scanpos = xsp;
5888 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5892 static final private boolean jj_3R_102() {
5893 if (jj_3R_46()) return true;
5894 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5898 if (jj_3R_106()) { jj_scanpos = xsp; break; }
5899 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5904 static final private boolean jj_3R_96() {
5905 if (jj_3R_102()) return true;
5906 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5910 static final private boolean jj_3R_93() {
5911 if (jj_3R_53()) return true;
5912 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5916 static final private boolean jj_3R_137() {
5917 if (jj_scan_token(TRIPLEEQUAL)) return true;
5918 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5922 static final private boolean jj_3R_136() {
5923 if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
5924 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5928 static final private boolean jj_3R_135() {
5929 if (jj_scan_token(NOT_EQUAL)) return true;
5930 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5934 static final private boolean jj_3R_85() {
5935 if (jj_scan_token(LPAREN)) return true;
5936 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5939 if (jj_3R_96()) jj_scanpos = xsp;
5940 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5941 if (jj_scan_token(RPAREN)) return true;
5942 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5946 static final private boolean jj_3R_134() {
5947 if (jj_scan_token(DIF)) return true;
5948 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5952 static final private boolean jj_3R_133() {
5953 if (jj_scan_token(EQUAL_EQUAL)) return true;
5954 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5958 static final private boolean jj_3R_130() {
5969 if (jj_3R_137()) return true;
5970 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5971 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5972 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5973 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5974 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5975 if (jj_3R_129()) return true;
5976 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5980 static final private boolean jj_3R_127() {
5981 if (jj_3R_129()) return true;
5982 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5986 if (jj_3R_130()) { jj_scanpos = xsp; break; }
5987 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5992 static final private boolean jj_3R_186() {
5993 if (jj_scan_token(NULL)) return true;
5994 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5998 static final private boolean jj_3R_185() {
5999 if (jj_scan_token(FALSE)) return true;
6000 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6004 static final private boolean jj_3R_109() {
6005 if (jj_scan_token(LBRACE)) return true;
6006 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6007 if (jj_3R_46()) return true;
6008 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6009 if (jj_scan_token(RBRACE)) return true;
6010 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6014 static final private boolean jj_3R_184() {
6015 if (jj_scan_token(TRUE)) return true;
6016 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6020 static final private boolean jj_3R_183() {
6021 if (jj_scan_token(STRING_LITERAL)) return true;
6022 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6026 static final private boolean jj_3R_91() {
6027 if (jj_scan_token(DOLLAR_ID)) return true;
6028 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6032 static final private boolean jj_3R_182() {
6033 if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
6034 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6038 static final private boolean jj_3R_128() {
6039 if (jj_scan_token(BIT_AND)) return true;
6040 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6041 if (jj_3R_127()) return true;
6042 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6046 static final private boolean jj_3R_181() {
6047 if (jj_scan_token(INTEGER_LITERAL)) return true;
6048 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6052 static final private boolean jj_3R_178() {
6065 if (jj_3R_186()) return true;
6066 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6067 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6068 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6069 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6070 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6071 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6075 static final private boolean jj_3R_90() {
6076 if (jj_scan_token(DOLLAR)) return true;
6077 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6078 if (jj_3R_60()) return true;
6079 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6083 static final private boolean jj_3R_125() {
6084 if (jj_3R_127()) return true;
6085 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6089 if (jj_3R_128()) { jj_scanpos = xsp; break; }
6090 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6095 static final private boolean jj_3R_92() {
6096 if (jj_3R_46()) return true;
6097 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6101 static final private boolean jj_3R_61() {
6106 if (jj_3R_93()) return true;
6107 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6108 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6112 static final private boolean jj_3R_126() {
6113 if (jj_scan_token(XOR)) return true;
6114 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6115 if (jj_3R_125()) return true;
6116 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6120 static final private boolean jj_3R_89() {
6121 if (jj_scan_token(IDENTIFIER)) return true;
6122 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6125 if (jj_3R_109()) jj_scanpos = xsp;
6126 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6130 static final private boolean jj_3R_123() {
6131 if (jj_3R_125()) return true;
6132 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6136 if (jj_3R_126()) { jj_scanpos = xsp; break; }
6137 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6142 static final private boolean jj_3R_50() {
6143 if (jj_scan_token(LBRACKET)) return true;
6144 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6147 if (jj_3R_61()) jj_scanpos = xsp;
6148 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6149 if (jj_scan_token(RBRACKET)) return true;
6150 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6154 static final private boolean jj_3R_88() {
6155 if (jj_scan_token(LBRACE)) return true;
6156 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6157 if (jj_3R_46()) return true;
6158 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6159 if (jj_scan_token(RBRACE)) return true;
6160 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6164 static final private boolean jj_3R_60() {
6173 if (jj_3R_91()) return true;
6174 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6175 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6176 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6177 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6181 static final private boolean jj_3R_124() {
6182 if (jj_scan_token(BIT_OR)) return true;
6183 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6184 if (jj_3R_123()) return true;
6185 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6189 static final private boolean jj_3R_101() {
6190 if (jj_scan_token(LBRACE)) return true;
6191 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6192 if (jj_3R_46()) return true;
6193 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6194 if (jj_scan_token(RBRACE)) return true;
6195 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6199 static final private boolean jj_3R_119() {
6200 if (jj_3R_123()) return true;
6201 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6205 if (jj_3R_124()) { jj_scanpos = xsp; break; }
6206 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6211 static final private boolean jj_3R_40() {
6216 if (jj_3R_50()) return true;
6217 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6218 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6222 static final private boolean jj_3R_49() {
6223 if (jj_scan_token(CLASSACCESS)) return true;
6224 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6225 if (jj_3R_60()) return true;
6226 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6230 static final private boolean jj_3R_95() {
6231 if (jj_scan_token(DOLLAR)) return true;
6232 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6233 if (jj_3R_60()) return true;
6234 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6238 static final private boolean jj_3R_120() {
6239 if (jj_scan_token(DOT)) return true;
6240 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6241 if (jj_3R_119()) return true;
6242 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6246 static final private boolean jj_3R_115() {
6247 if (jj_3R_119()) return true;
6248 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6252 if (jj_3R_120()) { jj_scanpos = xsp; break; }
6253 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6258 static final private boolean jj_3R_55() {
6259 if (jj_3R_40()) return true;
6260 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6264 static final private boolean jj_3R_45() {
6269 if (jj_3R_55()) return true;
6270 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6271 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6275 static final private boolean jj_3R_54() {
6276 if (jj_3R_85()) return true;
6277 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6281 static final private boolean jj_3R_94() {
6282 if (jj_scan_token(DOLLAR_ID)) return true;
6283 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6286 if (jj_3R_101()) jj_scanpos = xsp;
6287 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6291 static final private boolean jj_3R_62() {
6296 if (jj_3R_95()) return true;
6297 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6298 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6302 static final private boolean jj_3R_122() {
6303 if (jj_scan_token(_ANDL)) return true;
6304 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6308 static final private boolean jj_3R_121() {
6309 if (jj_scan_token(AND_AND)) return true;
6310 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6314 static final private boolean jj_3R_116() {
6319 if (jj_3R_122()) return true;
6320 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6321 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6322 if (jj_3R_115()) return true;
6323 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6327 static final private boolean jj_3R_196() {
6328 if (jj_3R_51()) return true;
6329 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6333 static final private boolean jj_3R_108() {
6334 if (jj_scan_token(HOOK)) return true;
6335 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6336 if (jj_3R_46()) return true;
6337 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6338 if (jj_scan_token(COLON)) return true;
6339 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6340 if (jj_3R_105()) return true;
6341 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6345 static final private boolean jj_3R_113() {
6346 if (jj_3R_115()) return true;
6347 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6351 if (jj_3R_116()) { jj_scanpos = xsp; break; }
6352 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6357 static final private boolean jj_3R_195() {
6358 if (jj_scan_token(IDENTIFIER)) return true;
6359 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6363 static final private boolean jj_3R_187() {
6368 if (jj_3R_196()) return true;
6369 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6370 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6374 static final private boolean jj_3R_112() {
6375 if (jj_scan_token(ASSIGN)) return true;
6376 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6377 if (jj_3R_46()) return true;
6378 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6382 static final private boolean jj_3R_118() {
6383 if (jj_scan_token(_ORL)) return true;
6384 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6388 static final private boolean jj_3R_117() {
6389 if (jj_scan_token(OR_OR)) return true;
6390 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6394 static final private boolean jj_3R_114() {
6399 if (jj_3R_118()) 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 if (jj_3R_113()) return true;
6403 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6407 static final private boolean jj_3R_107() {
6408 if (jj_3R_113()) return true;
6409 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6413 if (jj_3R_114()) { jj_scanpos = xsp; break; }
6414 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6419 static final private boolean jj_3_1() {
6420 if (jj_3R_40()) return true;
6421 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6425 static final private boolean jj_3R_111() {
6426 if (jj_scan_token(COMMA)) return true;
6427 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6428 if (jj_3R_51()) return true;
6429 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6433 static final private boolean jj_3R_51() {
6434 if (jj_3R_62()) return true;
6435 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6439 if (jj_3_1()) { jj_scanpos = xsp; break; }
6440 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6445 static final private boolean jj_3R_110() {
6446 if (jj_3R_51()) return true;
6447 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6451 static final private boolean jj_3R_105() {
6452 if (jj_3R_107()) return true;
6453 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6456 if (jj_3R_108()) jj_scanpos = xsp;
6457 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6461 static final private boolean jj_3R_199() {
6462 if (jj_3R_51()) return true;
6463 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6467 static final private boolean jj_3R_198() {
6468 if (jj_scan_token(NEW)) return true;
6469 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6470 if (jj_3R_187()) return true;
6471 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6475 static final private boolean jj_3R_197() {
6476 if (jj_scan_token(IDENTIFIER)) return true;
6477 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6481 static final private boolean jj_3R_189() {
6488 if (jj_3R_199()) return true;
6489 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6490 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6491 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6495 static final private boolean jj_3R_75() {
6496 if (jj_scan_token(TILDEEQUAL)) return true;
6497 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6501 static final private boolean jj_3R_104() {
6502 if (jj_scan_token(LIST)) return true;
6503 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6504 if (jj_scan_token(LPAREN)) return true;
6505 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6508 if (jj_3R_110()) jj_scanpos = xsp;
6509 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6512 if (jj_3R_111()) { jj_scanpos = xsp; break; }
6513 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6515 if (jj_scan_token(RPAREN)) return true;
6516 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6518 if (jj_3R_112()) jj_scanpos = xsp;
6519 else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6523 static final private boolean jj_3R_74() {
6524 if (jj_scan_token(DOTASSIGN)) return true;
6525 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6529 static final private boolean jj_3R_73() {
6530 if (jj_scan_token(ORASSIGN)) return true;
6531 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6535 static final private boolean jj_3R_72() {
6536 if (jj_scan_token(XORASSIGN)) return true;
6537 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6541 static final private boolean jj_3R_71() {
6542 if (jj_scan_token(ANDASSIGN)) return true;
6543 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6547 static final private boolean jj_3R_70() {
6548 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
6549 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6553 static final private boolean jj_3R_69() {
6554 if (jj_scan_token(LSHIFTASSIGN)) return true;
6555 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6559 static final private boolean jj_3R_68() {
6560 if (jj_scan_token(MINUSASSIGN)) return true;
6561 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6565 static final private boolean jj_3R_67() {
6566 if (jj_scan_token(PLUSASSIGN)) return true;
6567 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6571 static final private boolean jj_3R_66() {
6572 if (jj_scan_token(REMASSIGN)) return true;
6573 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6577 static final private boolean jj_3R_191() {
6578 if (jj_scan_token(ARRAY)) return true;
6579 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6580 if (jj_3R_200()) return true;
6581 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6585 static final private boolean jj_3R_65() {
6586 if (jj_scan_token(SLASHASSIGN)) return true;
6587 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6591 static final private boolean jj_3R_64() {
6592 if (jj_scan_token(STARASSIGN)) return true;
6593 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6597 static final private boolean jj_3R_103() {
6598 if (jj_scan_token(PRINT)) return true;
6599 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6600 if (jj_3R_46()) return true;
6601 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6605 static final private boolean jj_3R_52() {
6632 if (jj_3R_75()) return true;
6633 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6634 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6635 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6636 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6637 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6638 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6639 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6640 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6641 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6642 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6643 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6644 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6645 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6649 static final private boolean jj_3R_63() {
6650 if (jj_scan_token(ASSIGN)) return true;
6651 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6655 static final private boolean jj_3_6() {
6656 if (jj_3R_45()) return true;
6657 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6661 static final private boolean jj_3R_180() {
6662 if (jj_3R_191()) return true;
6663 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6667 static final private boolean jj_3_5() {
6668 if (jj_3R_45()) return true;
6669 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6673 static final private boolean jj_3R_190() {
6674 if (jj_3R_45()) return true;
6675 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6679 static final private boolean jj_3R_179() {
6680 if (jj_3R_189()) return true;
6681 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6685 if (jj_3R_190()) { jj_scanpos = xsp; break; }
6686 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6691 static final private boolean jj_3R_188() {
6692 if (jj_3R_45()) return true;
6693 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6697 static final private boolean jj_3R_42() {
6698 if (jj_3R_51()) return true;
6699 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6700 if (jj_3R_52()) return true;
6701 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6702 if (jj_3R_46()) return true;
6703 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6707 static final private boolean jj_3R_175() {
6714 if (jj_3R_180()) return true;
6715 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6716 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6717 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6721 static final private boolean jj_3_3() {
6722 if (jj_3R_42()) return true;
6723 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6727 static final private boolean jj_3_7() {
6728 if (jj_scan_token(IDENTIFIER)) return true;
6729 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6730 if (jj_scan_token(STATICCLASSACCESS)) return true;
6731 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6732 if (jj_3R_187()) return true;
6733 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6737 if (jj_3R_188()) { jj_scanpos = xsp; break; }
6738 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6743 static final private boolean jj_3R_100() {
6744 if (jj_3R_105()) return true;
6745 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6749 static final private boolean jj_3R_99() {
6750 if (jj_3R_42()) return true;
6751 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6755 static final private boolean jj_3R_98() {
6756 if (jj_3R_104()) return true;
6757 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6761 static final private boolean jj_3R_97() {
6762 if (jj_3R_103()) return true;
6763 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6767 static final private boolean jj_3R_86() {
6776 if (jj_3R_100()) return true;
6777 if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6778 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6779 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6780 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6784 static private boolean jj_initialized_once = false;
6785 static public PHPParserTokenManager token_source;
6786 static SimpleCharStream jj_input_stream;
6787 static public Token token, jj_nt;
6788 static private int jj_ntk;
6789 static private Token jj_scanpos, jj_lastpos;
6790 static private int jj_la;
6791 static public boolean lookingAhead = false;
6792 static private boolean jj_semLA;
6793 static private int jj_gen;
6794 static final private int[] jj_la1 = new int[123];
6795 static private int[] jj_la1_0;
6796 static private int[] jj_la1_1;
6797 static private int[] jj_la1_2;
6798 static private int[] jj_la1_3;
6799 static private int[] jj_la1_4;
6807 private static void jj_la1_0() {
6808 jj_la1_0 = new int[] {0xf960001e,0x6,0x6,0xf960001e,0x0,0xf9600000,0x0,0xc00000,0xc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x68000000,0x0,0x0,0x0,0x0,0x0,0x0,0x68000000,0x60000000,0x8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x8000000,0x0,0x8000000,0x0,0x8000000,0x8000000,0x0,0x0,0x8000000,0x0,0x8000000,0x0,0x0,0x68000000,0x68000000,0x0,0x0,0x68000000,0x0,0x0,0x89000000,0x40000000,0x8000000,0xf9000000,0x8,0x6,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf9600010,0xf9600010,0xf9600000,0xe9600000,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x0,0xe9600010,0xe9600010,0x10000000,0x0,0x68000000,0xf9000010,0xf9000010,0x2000000,0x4000000,0xf9000010,0x2000000,0x4000000,0xf9000010,0xf9000010,0xf9000010,0xf9000010,0xf9000010,0xf9000000,0xf9000000,0x8000000,0x68000000,0x8000000,0xf9000000,0xf9000000,0x8000000,0x0,0x68000000,0x68000000,};
6810 private static void jj_la1_1() {
6811 jj_la1_1 = new int[] {0x875d507f,0x0,0x0,0x875d507f,0x0,0x875d507f,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3080000,0x200,0x30c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x30c0000,0x0,0x30c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30c0000,0x30c0000,0x0,0x30c0000,0x0,0x30c0000,0x0,0x0,0x0,0x40000,0x40000,0x40000,0x0,0x80,0x30c0000,0x30c0000,0x80,0x3080000,0x30c0000,0x0,0x0,0x8455507f,0x0,0x30c0000,0x875d507f,0x0,0x0,0xf,0x0,0x0,0x0,0x0,0x0,0x0,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x0,0x0,0x0,0x0,0x40000,0x0,0x2400,0x2400,0x875d507f,0x875d507f,0x0,0x2400,0x30c0000,0x875d507f,0x875d507f,0x0,0x0,0x875d507f,0x0,0x0,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x875d507f,0x40000,0x30c0000,0x40000,0x875d507f,0x875d507f,0x40000,0x0,0x30c0000,0x30c0000,};
6813 private static void jj_la1_2() {
6814 jj_la1_2 = new int[] {0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x13c1c00,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x800,0x0,0x0,0x300000,0x0,0x13c1c00,0x0,0x1000000,0x0,0x1000800,0x1000000,0x3fe,0x13c1c00,0x0,0x13c0c00,0x0,0x4000,0x80010000,0x80010000,0x20000,0x20000,0x0,0x2000000,0x4000000,0x1000000,0x0,0x0,0x0,0x0,0x70000000,0x70000000,0x300000,0x300000,0x8c00000,0x8c00000,0x13c0c00,0x3c0c00,0x300000,0x3c0800,0xc0000,0x800,0x3fe,0xc0000,0xc0000,0x800,0x800,0x800,0x800,0x0,0x13c1ffe,0x13c1ffe,0x0,0x0,0x13c1c00,0x0,0x400,0xc0c00,0x0,0x13c0c00,0x13c1c00,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x0,0x0,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x0,0x0,0xc0000,0xc0000,0xc0800,0x8000,0x0,0x0,0x13c1c00,0x13c1c00,0x0,0x0,0x13c1c00,0x13c1c00,0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x0,0x13c9c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c9c00,0xc0800,0x13c1c00,0xc0800,0x13c1c00,0x13c9c00,0xc0800,0x0,0x13c1c00,0x13c1c00,};
6816 private static void jj_la1_3() {
6817 jj_la1_3 = new int[] {0x2288a2,0x0,0x0,0x2288a2,0x200000,0x2288a2,0x0,0x0,0x0,0x400000,0x0,0x20000,0x0,0x20000,0x20800,0x22,0x22,0x8a2,0x0,0x88a2,0x400000,0x0,0x400000,0x0,0x0,0x0,0x88a2,0x0,0x88a2,0x0,0x0,0x0,0x0,0x1,0x1,0x800000,0x0,0x0,0x0,0xe4000000,0xe4000000,0x1b000000,0x1b000000,0x0,0x0,0x0,0x0,0x0,0x0,0x88a2,0x88a2,0x0,0x88a2,0x0,0x88a2,0x0,0x0,0x0,0x800,0x800,0x800,0x800,0x88000,0x88a2,0x88a2,0x80000,0xa2,0x88a2,0x400000,0x0,0x220800,0x0,0x88a2,0x2288a2,0x0,0x0,0x0,0x0,0x400000,0x0,0x400000,0x400000,0x400000,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x400000,0x0,0x0,0x0,0x800,0x20000,0x0,0x0,0x2288a2,0x2288a2,0x0,0x0,0x88a2,0x2288a2,0x2288a2,0x0,0x0,0x2288a2,0x0,0x0,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x2288a2,0x800,0x88a2,0x800,0x2288a2,0x2288a2,0x800,0x400000,0x88a2,0x88a2,};
6819 private static void jj_la1_4() {
6820 jj_la1_4 = new int[] {0x4000,0x0,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x2,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x0,0x4000,0x0,0x4000,0x3ffe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x4000,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x0,0x4000,0x4000,0x0,0x0,0x4000,0x0,0x0,0x4000,0x0,0x4000,0x4000,0x0,0x0,0x0,0x4000,0x0,0x2,0x0,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x0,0x2,0x3ffe,0x3ffe,0x4000,0x0,0x0,0x0,0x4000,0x4000,0x0,0x0,0x4000,0x4000,0x4000,0x0,0x0,0x4000,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x4000,0x0,0x4000,0x4000,};
6822 static final private JJCalls[] jj_2_rtns = new JJCalls[11];
6823 static private boolean jj_rescan = false;
6824 static private int jj_gc = 0;
6826 public PHPParser(java.io.InputStream stream) {
6827 if (jj_initialized_once) {
6828 System.out.println("ERROR: Second call to constructor of static parser. You must");
6829 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6830 System.out.println(" during parser generation.");
6833 jj_initialized_once = true;
6834 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6835 token_source = new PHPParserTokenManager(jj_input_stream);
6836 token = new Token();
6839 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6840 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6843 static public void ReInit(java.io.InputStream stream) {
6844 jj_input_stream.ReInit(stream, 1, 1);
6845 token_source.ReInit(jj_input_stream);
6846 token = new Token();
6849 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6850 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6853 public PHPParser(java.io.Reader stream) {
6854 if (jj_initialized_once) {
6855 System.out.println("ERROR: Second call to constructor of static parser. You must");
6856 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6857 System.out.println(" during parser generation.");
6860 jj_initialized_once = true;
6861 jj_input_stream = new SimpleCharStream(stream, 1, 1);
6862 token_source = new PHPParserTokenManager(jj_input_stream);
6863 token = new Token();
6866 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6867 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6870 static public void ReInit(java.io.Reader stream) {
6871 jj_input_stream.ReInit(stream, 1, 1);
6872 token_source.ReInit(jj_input_stream);
6873 token = new Token();
6876 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6877 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6880 public PHPParser(PHPParserTokenManager tm) {
6881 if (jj_initialized_once) {
6882 System.out.println("ERROR: Second call to constructor of static parser. You must");
6883 System.out.println(" either use ReInit() or set the JavaCC option STATIC to false");
6884 System.out.println(" during parser generation.");
6887 jj_initialized_once = true;
6889 token = new Token();
6892 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6893 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6896 public void ReInit(PHPParserTokenManager tm) {
6898 token = new Token();
6901 for (int i = 0; i < 123; i++) jj_la1[i] = -1;
6902 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6905 static final private Token jj_consume_token(int kind) throws ParseException {
6907 if ((oldToken = token).next != null) token = token.next;
6908 else token = token.next = token_source.getNextToken();
6910 if (token.kind == kind) {
6912 if (++jj_gc > 100) {
6914 for (int i = 0; i < jj_2_rtns.length; i++) {
6915 JJCalls c = jj_2_rtns[i];
6917 if (c.gen < jj_gen) c.first = null;
6926 throw generateParseException();
6929 static final private boolean jj_scan_token(int kind) {
6930 if (jj_scanpos == jj_lastpos) {
6932 if (jj_scanpos.next == null) {
6933 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
6935 jj_lastpos = jj_scanpos = jj_scanpos.next;
6938 jj_scanpos = jj_scanpos.next;
6941 int i = 0; Token tok = token;
6942 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
6943 if (tok != null) jj_add_error_token(kind, i);
6945 return (jj_scanpos.kind != kind);
6948 static final public Token getNextToken() {
6949 if (token.next != null) token = token.next;
6950 else token = token.next = token_source.getNextToken();
6956 static final public Token getToken(int index) {
6957 Token t = lookingAhead ? jj_scanpos : token;
6958 for (int i = 0; i < index; i++) {
6959 if (t.next != null) t = t.next;
6960 else t = t.next = token_source.getNextToken();
6965 static final private int jj_ntk() {
6966 if ((jj_nt=token.next) == null)
6967 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
6969 return (jj_ntk = jj_nt.kind);
6972 static private java.util.Vector jj_expentries = new java.util.Vector();
6973 static private int[] jj_expentry;
6974 static private int jj_kind = -1;
6975 static private int[] jj_lasttokens = new int[100];
6976 static private int jj_endpos;
6978 static private void jj_add_error_token(int kind, int pos) {
6979 if (pos >= 100) return;
6980 if (pos == jj_endpos + 1) {
6981 jj_lasttokens[jj_endpos++] = kind;
6982 } else if (jj_endpos != 0) {
6983 jj_expentry = new int[jj_endpos];
6984 for (int i = 0; i < jj_endpos; i++) {
6985 jj_expentry[i] = jj_lasttokens[i];
6987 boolean exists = false;
6988 for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
6989 int[] oldentry = (int[])(enum.nextElement());
6990 if (oldentry.length == jj_expentry.length) {
6992 for (int i = 0; i < jj_expentry.length; i++) {
6993 if (oldentry[i] != jj_expentry[i]) {
7001 if (!exists) jj_expentries.addElement(jj_expentry);
7002 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
7006 static public ParseException generateParseException() {
7007 jj_expentries.removeAllElements();
7008 boolean[] la1tokens = new boolean[143];
7009 for (int i = 0; i < 143; i++) {
7010 la1tokens[i] = false;
7013 la1tokens[jj_kind] = true;
7016 for (int i = 0; i < 123; i++) {
7017 if (jj_la1[i] == jj_gen) {
7018 for (int j = 0; j < 32; j++) {
7019 if ((jj_la1_0[i] & (1<<j)) != 0) {
7020 la1tokens[j] = true;
7022 if ((jj_la1_1[i] & (1<<j)) != 0) {
7023 la1tokens[32+j] = true;
7025 if ((jj_la1_2[i] & (1<<j)) != 0) {
7026 la1tokens[64+j] = true;
7028 if ((jj_la1_3[i] & (1<<j)) != 0) {
7029 la1tokens[96+j] = true;
7031 if ((jj_la1_4[i] & (1<<j)) != 0) {
7032 la1tokens[128+j] = true;
7037 for (int i = 0; i < 143; i++) {
7039 jj_expentry = new int[1];
7041 jj_expentries.addElement(jj_expentry);
7046 jj_add_error_token(0, 0);
7047 int[][] exptokseq = new int[jj_expentries.size()][];
7048 for (int i = 0; i < jj_expentries.size(); i++) {
7049 exptokseq[i] = (int[])jj_expentries.elementAt(i);
7051 return new ParseException(token, exptokseq, tokenImage);
7054 static final public void enable_tracing() {
7057 static final public void disable_tracing() {
7060 static final private void jj_rescan_token() {
7062 for (int i = 0; i < 11; i++) {
7063 JJCalls p = jj_2_rtns[i];
7065 if (p.gen > jj_gen) {
7066 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7068 case 0: jj_3_1(); break;
7069 case 1: jj_3_2(); break;
7070 case 2: jj_3_3(); break;
7071 case 3: jj_3_4(); break;
7072 case 4: jj_3_5(); break;
7073 case 5: jj_3_6(); break;
7074 case 6: jj_3_7(); break;
7075 case 7: jj_3_8(); break;
7076 case 8: jj_3_9(); break;
7077 case 9: jj_3_10(); break;
7078 case 10: jj_3_11(); break;
7082 } while (p != null);
7087 static final private void jj_save(int index, int xla) {
7088 JJCalls p = jj_2_rtns[index];
7089 while (p.gen > jj_gen) {
7090 if (p.next == null) { p = p.next = new JJCalls(); break; }
7093 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7096 static final class JJCalls {