a lot of bugfixes
[phpeclipse.git] / net.sourceforge.phpeclipse / src / test / PHPParser.java
1 /* Generated By:JavaCC: Do not edit this line. PHPParser.java */
2 package test;
3
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;
9
10 import java.util.Hashtable;
11 import java.util.ArrayList;
12 import java.io.StringReader;
13 import java.io.*;
14 import java.text.MessageFormat;
15
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;
22 import net.sourceforge.phpdt.internal.corext.Assert;
23
24 /**
25  * A new php parser.
26  * This php parser is inspired by the Java 1.2 grammar example
27  * given with JavaCC. You can get JavaCC at http://www.webgain.com
28  * You can test the parser with the PHPParserTestCase2.java
29  * @author Matthieu Casanova
30  */
31 public final class PHPParser extends PHPParserSuperclass implements PHPParserConstants {
32
33 //todo : fix the variables names bug
34 //todo : handle tilde operator
35
36
37   /** The current segment. */
38   private static OutlineableWithChildren currentSegment;
39
40   private static final String PARSE_ERROR_STRING = "Parse error"; //$NON-NLS-1$
41   private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
42   static PHPOutlineInfo outlineInfo;
43
44   /** The error level of the current ParseException. */
45   private static int errorLevel = ERROR;
46   /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
47   private static String errorMessage;
48
49   private static int errorStart = -1;
50   private static int errorEnd = -1;
51   private static PHPDocument phpDocument;
52
53   private static final String SYNTAX_ERROR_CHAR = "syntax error";
54   /**
55    * The point where html starts.
56    * It will be used by the token manager to create HTMLCode objects
57    */
58   public static int htmlStart;
59
60   //ast stack
61   private final static int AstStackIncrement = 100;
62   /** The stack of node. */
63   private static AstNode[] nodes;
64   /** The cursor in expression stack. */
65   private static int nodePtr;
66
67   private static final boolean PARSER_DEBUG = true;
68
69   public final void setFileToParse(final IFile fileToParse) {
70     PHPParser.fileToParse = fileToParse;
71   }
72
73   public PHPParser() {
74   }
75
76   public PHPParser(final IFile fileToParse) {
77     this(new StringReader(""));
78     PHPParser.fileToParse = fileToParse;
79   }
80
81   public static final void phpParserTester(final String strEval) throws ParseException {
82     final StringReader stream = new StringReader(strEval);
83     if (jj_input_stream == null) {
84       jj_input_stream = new SimpleCharStream(stream, 1, 1);
85     }
86     ReInit(new StringReader(strEval));
87     init();
88     phpDocument = new PHPDocument(null,"_root".toCharArray());
89     currentSegment = phpDocument;
90     outlineInfo = new PHPOutlineInfo(null, currentSegment);
91     PHPParserTokenManager.SwitchTo(PHPParserTokenManager.PHPPARSING);
92     phpTest();
93   }
94
95   public static final void htmlParserTester(final File fileName) throws FileNotFoundException, ParseException {
96     final Reader stream = new FileReader(fileName);
97     if (jj_input_stream == null) {
98       jj_input_stream = new SimpleCharStream(stream, 1, 1);
99     }
100     ReInit(stream);
101     init();
102     phpDocument = new PHPDocument(null,"_root".toCharArray());
103     currentSegment = phpDocument;
104     outlineInfo = new PHPOutlineInfo(null, currentSegment);
105     phpFile();
106   }
107
108   public static final void htmlParserTester(final String strEval) throws ParseException {
109     final StringReader stream = new StringReader(strEval);
110     if (jj_input_stream == null) {
111       jj_input_stream = new SimpleCharStream(stream, 1, 1);
112     }
113     ReInit(stream);
114     init();
115     phpDocument = new PHPDocument(null,"_root".toCharArray());
116     currentSegment = phpDocument;
117     outlineInfo = new PHPOutlineInfo(null, currentSegment);
118     phpFile();
119   }
120
121   /**
122    * Reinitialize the parser.
123    */
124   private static final void init() {
125     nodes = new AstNode[AstStackIncrement];
126     nodePtr = -1;
127     htmlStart = 0;
128   }
129
130   /**
131    * Add an php node on the stack.
132    * @param node the node that will be added to the stack
133    */
134   private static final void pushOnAstNodes(final AstNode node) {
135     try {
136       nodes[++nodePtr] = node;
137     } catch (IndexOutOfBoundsException e) {
138       final int oldStackLength = nodes.length;
139       final AstNode[] oldStack = nodes;
140       nodes = new AstNode[oldStackLength + AstStackIncrement];
141       System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
142       nodePtr = oldStackLength;
143       nodes[nodePtr] = node;
144     }
145   }
146
147   public final PHPOutlineInfo parseInfo(final Object parent, final String s) {
148     phpDocument = new PHPDocument(parent,"_root".toCharArray());
149     currentSegment = phpDocument;
150     outlineInfo = new PHPOutlineInfo(parent, currentSegment);
151     final StringReader stream = new StringReader(s);
152     if (jj_input_stream == null) {
153       jj_input_stream = new SimpleCharStream(stream, 1, 1);
154     }
155     ReInit(stream);
156     init();
157     try {
158       parse();
159       phpDocument.nodes = new AstNode[nodes.length];
160       System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
161       if (PHPeclipsePlugin.DEBUG) {
162         PHPeclipsePlugin.log(1,phpDocument.toString());
163       }
164     } catch (ParseException e) {
165       processParseException(e);
166     }
167     return outlineInfo;
168   }
169
170   private static void processParseExceptionDebug(final ParseException e) throws ParseException {
171     if (PARSER_DEBUG) {
172       throw e;
173     }
174     processParseException(e);
175   }
176   /**
177    * This method will process the parse exception.
178    * If the error message is null, the parse exception wasn't catched and a trace is written in the log
179    * @param e the ParseException
180    */
181   private static void processParseException(final ParseException e) {
182     if (errorMessage == null) {
183       PHPeclipsePlugin.log(e);
184       errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
185       errorStart = e.currentToken.sourceStart;
186       errorEnd   = e.currentToken.sourceEnd;
187     }
188     setMarker(e);
189     errorMessage = null;
190   //  if (PHPeclipsePlugin.DEBUG) PHPeclipsePlugin.log(e);
191   }
192
193   /**
194    * Create marker for the parse error.
195    * @param e the ParseException
196    */
197   private static void setMarker(final ParseException e) {
198     try {
199       if (errorStart == -1) {
200         setMarker(fileToParse,
201                   errorMessage,
202                   e.currentToken.sourceStart,
203                   e.currentToken.sourceEnd,
204                   errorLevel,
205                   "Line " + e.currentToken.beginLine);
206       } else {
207         setMarker(fileToParse,
208                   errorMessage,
209                   errorStart,
210                   errorEnd,
211                   errorLevel,
212                   "Line " + e.currentToken.beginLine);
213         errorStart = -1;
214         errorEnd = -1;
215       }
216     } catch (CoreException e2) {
217       PHPeclipsePlugin.log(e2);
218     }
219   }
220
221   private static void scanLine(final String output,
222                                final IFile file,
223                                final int indx,
224                                final int brIndx) throws CoreException {
225     String current;
226     final StringBuffer lineNumberBuffer = new StringBuffer(10);
227     char ch;
228     current = output.substring(indx, brIndx);
229
230     if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
231       final int onLine = current.indexOf("on line <b>");
232       if (onLine != -1) {
233         lineNumberBuffer.delete(0, lineNumberBuffer.length());
234         for (int i = onLine; i < current.length(); i++) {
235           ch = current.charAt(i);
236           if ('0' <= ch && '9' >= ch) {
237             lineNumberBuffer.append(ch);
238           }
239         }
240
241         final int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
242
243         final Hashtable attributes = new Hashtable();
244
245         current = current.replaceAll("\n", "");
246         current = current.replaceAll("<b>", "");
247         current = current.replaceAll("</b>", "");
248         MarkerUtilities.setMessage(attributes, current);
249
250         if (current.indexOf(PARSE_ERROR_STRING) != -1)
251           attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
252         else if (current.indexOf(PARSE_WARNING_STRING) != -1)
253           attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
254         else
255           attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
256         MarkerUtilities.setLineNumber(attributes, lineNumber);
257         MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
258       }
259     }
260   }
261
262   public final void parse(final String s) {
263     final StringReader stream = new StringReader(s);
264     if (jj_input_stream == null) {
265       jj_input_stream = new SimpleCharStream(stream, 1, 1);
266     }
267     ReInit(stream);
268     init();
269     try {
270       parse();
271     } catch (ParseException e) {
272       processParseException(e);
273     }
274   }
275
276   /**
277    * Call the php parse command ( php -l -f &lt;filename&gt; )
278    * and create markers according to the external parser output
279    */
280   public static void phpExternalParse(final IFile file) {
281     final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
282     final String filename = file.getLocation().toString();
283
284     final String[] arguments = { filename };
285     final MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.EXTERNAL_PARSER_PREF));
286     final String command = form.format(arguments);
287
288     final String parserResult = PHPStartApacheAction.getParserOutput(command, "External parser: ");
289
290     try {
291       // parse the buffer to find the errors and warnings
292       createMarkers(parserResult, file);
293     } catch (CoreException e) {
294       PHPeclipsePlugin.log(e);
295     }
296   }
297
298   /**
299    * Put a new html block in the stack.
300    */
301   public static final void createNewHTMLCode() {
302     final int currentPosition = token.sourceStart;
303     if (currentPosition == htmlStart ||
304           currentPosition > SimpleCharStream.currentBuffer.length()) {
305       return;
306     }
307     final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray();
308     pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
309   }
310
311   /** Create a new task. */
312   public static final void createNewTask() {
313     final int currentPosition = token.sourceStart;
314     final String  todo = SimpleCharStream.currentBuffer.substring(currentPosition-3,
315                                                                   SimpleCharStream.currentBuffer.indexOf("\n",
316                                                                                                          currentPosition)-1);
317     if (!PARSER_DEBUG) {
318       try {
319         setMarker(fileToParse,
320                   todo,
321                   SimpleCharStream.getBeginLine(),
322                   TASK,
323                   "Line "+SimpleCharStream.getBeginLine());
324       } catch (CoreException e) {
325         PHPeclipsePlugin.log(e);
326       }
327     }
328   }
329
330   private static final void parse() throws ParseException {
331           phpFile();
332   }
333
334   static final public void phpTest() throws ParseException {
335     Php();
336     jj_consume_token(0);
337   }
338
339   static final public void phpFile() throws ParseException {
340     try {
341       label_1:
342       while (true) {
343         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
344         case PHPSTARTSHORT:
345         case PHPSTARTLONG:
346         case PHPECHOSTART:
347         case PHPEND:
348         case CLASS:
349         case FUNCTION:
350         case IF:
351         case ARRAY:
352         case BREAK:
353         case LIST:
354         case PRINT:
355         case ECHO:
356         case INCLUDE:
357         case REQUIRE:
358         case INCLUDE_ONCE:
359         case REQUIRE_ONCE:
360         case GLOBAL:
361         case DEFINE:
362         case STATIC:
363         case CONTINUE:
364         case DO:
365         case FOR:
366         case NEW:
367         case NULL:
368         case RETURN:
369         case SWITCH:
370         case TRUE:
371         case FALSE:
372         case WHILE:
373         case FOREACH:
374         case AT:
375         case DOLLAR:
376         case BANG:
377         case PLUS_PLUS:
378         case MINUS_MINUS:
379         case PLUS:
380         case MINUS:
381         case BIT_AND:
382         case INTEGER_LITERAL:
383         case FLOATING_POINT_LITERAL:
384         case STRING_LITERAL:
385         case IDENTIFIER:
386         case LPAREN:
387         case LBRACE:
388         case SEMICOLON:
389         case DOLLAR_ID:
390           ;
391           break;
392         default:
393           jj_la1[0] = jj_gen;
394           break label_1;
395         }
396         PhpBlock();
397       }
398      PHPParser.createNewHTMLCode();
399     } catch (TokenMgrError e) {
400     PHPeclipsePlugin.log(e);
401     errorStart   = SimpleCharStream.getPosition();
402     errorEnd     = errorStart + 1;
403     errorMessage = e.getMessage();
404     errorLevel   = ERROR;
405     {if (true) throw generateParseException();}
406     }
407   }
408
409 /**
410  * A php block is a <?= expression [;]?>
411  * or <?php somephpcode ?>
412  * or <? somephpcode ?>
413  */
414   static final public void PhpBlock() throws ParseException {
415   final PHPEchoBlock phpEchoBlock;
416   final Token token;
417     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
418     case PHPECHOSTART:
419       phpEchoBlock = phpEchoBlock();
420    pushOnAstNodes(phpEchoBlock);
421       break;
422     case PHPSTARTSHORT:
423     case PHPSTARTLONG:
424     case PHPEND:
425     case CLASS:
426     case FUNCTION:
427     case IF:
428     case ARRAY:
429     case BREAK:
430     case LIST:
431     case PRINT:
432     case ECHO:
433     case INCLUDE:
434     case REQUIRE:
435     case INCLUDE_ONCE:
436     case REQUIRE_ONCE:
437     case GLOBAL:
438     case DEFINE:
439     case STATIC:
440     case CONTINUE:
441     case DO:
442     case FOR:
443     case NEW:
444     case NULL:
445     case RETURN:
446     case SWITCH:
447     case TRUE:
448     case FALSE:
449     case WHILE:
450     case FOREACH:
451     case AT:
452     case DOLLAR:
453     case BANG:
454     case PLUS_PLUS:
455     case MINUS_MINUS:
456     case PLUS:
457     case MINUS:
458     case BIT_AND:
459     case INTEGER_LITERAL:
460     case FLOATING_POINT_LITERAL:
461     case STRING_LITERAL:
462     case IDENTIFIER:
463     case LPAREN:
464     case LBRACE:
465     case SEMICOLON:
466     case DOLLAR_ID:
467       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
468       case PHPSTARTSHORT:
469       case PHPSTARTLONG:
470         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
471         case PHPSTARTLONG:
472           jj_consume_token(PHPSTARTLONG);
473           break;
474         case PHPSTARTSHORT:
475           token = jj_consume_token(PHPSTARTSHORT);
476      try {
477       setMarker(fileToParse,
478                 "You should use '<?php' instead of '<?' it will avoid some problems with XML",
479                 token.sourceStart,
480                 token.sourceEnd,
481                 INFO,
482                 "Line " + token.beginLine);
483     } catch (CoreException e) {
484       PHPeclipsePlugin.log(e);
485     }
486           break;
487         default:
488           jj_la1[1] = jj_gen;
489           jj_consume_token(-1);
490           throw new ParseException();
491         }
492         break;
493       default:
494         jj_la1[2] = jj_gen;
495         ;
496       }
497       Php();
498       try {
499         jj_consume_token(PHPEND);
500       } catch (ParseException e) {
501     errorMessage = "'?>' expected";
502     errorLevel   = ERROR;
503     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
504     errorEnd   = SimpleCharStream.getPosition() + 1;
505     processParseExceptionDebug(e);
506       }
507       break;
508     default:
509       jj_la1[3] = jj_gen;
510       jj_consume_token(-1);
511       throw new ParseException();
512     }
513   }
514
515   static final public PHPEchoBlock phpEchoBlock() throws ParseException {
516   final Expression expr;
517   final PHPEchoBlock echoBlock;
518   final Token token, token2;
519     token = jj_consume_token(PHPECHOSTART);
520     expr = Expression();
521     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
522     case SEMICOLON:
523       jj_consume_token(SEMICOLON);
524       break;
525     default:
526       jj_la1[4] = jj_gen;
527       ;
528     }
529     token2 = jj_consume_token(PHPEND);
530   echoBlock = new PHPEchoBlock(expr,token.sourceStart,token2.sourceEnd);
531   pushOnAstNodes(echoBlock);
532   {if (true) return echoBlock;}
533     throw new Error("Missing return statement in function");
534   }
535
536   static final public void Php() throws ParseException {
537     label_2:
538     while (true) {
539       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
540       case CLASS:
541       case FUNCTION:
542       case IF:
543       case ARRAY:
544       case BREAK:
545       case LIST:
546       case PRINT:
547       case ECHO:
548       case INCLUDE:
549       case REQUIRE:
550       case INCLUDE_ONCE:
551       case REQUIRE_ONCE:
552       case GLOBAL:
553       case DEFINE:
554       case STATIC:
555       case CONTINUE:
556       case DO:
557       case FOR:
558       case NEW:
559       case NULL:
560       case RETURN:
561       case SWITCH:
562       case TRUE:
563       case FALSE:
564       case WHILE:
565       case FOREACH:
566       case AT:
567       case DOLLAR:
568       case BANG:
569       case PLUS_PLUS:
570       case MINUS_MINUS:
571       case PLUS:
572       case MINUS:
573       case BIT_AND:
574       case INTEGER_LITERAL:
575       case FLOATING_POINT_LITERAL:
576       case STRING_LITERAL:
577       case IDENTIFIER:
578       case LPAREN:
579       case LBRACE:
580       case SEMICOLON:
581       case DOLLAR_ID:
582         ;
583         break;
584       default:
585         jj_la1[5] = jj_gen;
586         break label_2;
587       }
588       BlockStatement();
589     }
590   }
591
592   static final public ClassDeclaration ClassDeclaration() throws ParseException {
593   final ClassDeclaration classDeclaration;
594   Token className = null;
595   final Token superclassName, token;
596   String classNameImage = SYNTAX_ERROR_CHAR;
597   String superclassNameImage = null;
598     token = jj_consume_token(CLASS);
599     try {
600       className = jj_consume_token(IDENTIFIER);
601      classNameImage = className.image;
602     } catch (ParseException e) {
603     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
604     errorLevel   = ERROR;
605     errorStart   = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
606     errorEnd     = SimpleCharStream.getPosition() + 1;
607     processParseExceptionDebug(e);
608     }
609     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
610     case EXTENDS:
611       jj_consume_token(EXTENDS);
612       try {
613         superclassName = jj_consume_token(IDENTIFIER);
614        superclassNameImage = superclassName.image;
615       } catch (ParseException e) {
616       errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
617       errorLevel   = ERROR;
618       errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
619       errorEnd   = SimpleCharStream.getPosition() + 1;
620       processParseExceptionDebug(e);
621       superclassNameImage = SYNTAX_ERROR_CHAR;
622       }
623       break;
624     default:
625       jj_la1[6] = jj_gen;
626       ;
627     }
628     int start, end;
629     if (className == null) {
630       start = token.sourceStart;
631       end = token.sourceEnd;
632     } else {
633       start = className.sourceStart;
634       end = className.sourceEnd;
635     }
636     if (superclassNameImage == null) {
637
638       classDeclaration = new ClassDeclaration(currentSegment,
639                                               classNameImage,
640                                               start,
641                                               end);
642     } else {
643       classDeclaration = new ClassDeclaration(currentSegment,
644                                               classNameImage,
645                                               superclassNameImage,
646                                               start,
647                                               end);
648     }
649       currentSegment.add(classDeclaration);
650       currentSegment = classDeclaration;
651     ClassBody(classDeclaration);
652    currentSegment = (OutlineableWithChildren) currentSegment.getParent();
653    classDeclaration.sourceEnd = SimpleCharStream.getPosition();
654    pushOnAstNodes(classDeclaration);
655    {if (true) return classDeclaration;}
656     throw new Error("Missing return statement in function");
657   }
658
659   static final public void ClassBody(final ClassDeclaration classDeclaration) throws ParseException {
660     try {
661       jj_consume_token(LBRACE);
662     } catch (ParseException e) {
663     errorMessage = "unexpected token : '"+ e.currentToken.next.image + "'. '{' expected";
664     errorLevel   = ERROR;
665     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
666     errorEnd   = SimpleCharStream.getPosition() + 1;
667     processParseExceptionDebug(e);
668     }
669     label_3:
670     while (true) {
671       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
672       case FUNCTION:
673       case VAR:
674         ;
675         break;
676       default:
677         jj_la1[7] = jj_gen;
678         break label_3;
679       }
680       ClassBodyDeclaration(classDeclaration);
681     }
682     try {
683       jj_consume_token(RBRACE);
684     } catch (ParseException e) {
685     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. 'var', 'function' or '}' expected";
686     errorLevel   = ERROR;
687     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
688     errorEnd   = SimpleCharStream.getPosition() + 1;
689     processParseExceptionDebug(e);
690     }
691   }
692
693 /**
694  * A class can contain only methods and fields.
695  */
696   static final public void ClassBodyDeclaration(final ClassDeclaration classDeclaration) throws ParseException {
697   final MethodDeclaration method;
698   final FieldDeclaration field;
699     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
700     case FUNCTION:
701       method = MethodDeclaration();
702                                 method.analyzeCode();
703                                 classDeclaration.addMethod(method);
704       break;
705     case VAR:
706       field = FieldDeclaration();
707                                 classDeclaration.addField(field);
708       break;
709     default:
710       jj_la1[8] = jj_gen;
711       jj_consume_token(-1);
712       throw new ParseException();
713     }
714   }
715
716 /**
717  * A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
718  * it is only used by ClassBodyDeclaration()
719  */
720   static final public FieldDeclaration FieldDeclaration() throws ParseException {
721   VariableDeclaration variableDeclaration;
722   final VariableDeclaration[] list;
723   final ArrayList arrayList = new ArrayList();
724   final Token token;
725   Token token2 = null;
726     token = jj_consume_token(VAR);
727     variableDeclaration = VariableDeclaratorNoSuffix();
728    arrayList.add(variableDeclaration);
729    outlineInfo.addVariable(variableDeclaration.name());
730     label_4:
731     while (true) {
732       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
733       case COMMA:
734         ;
735         break;
736       default:
737         jj_la1[9] = jj_gen;
738         break label_4;
739       }
740       jj_consume_token(COMMA);
741       variableDeclaration = VariableDeclaratorNoSuffix();
742        arrayList.add(variableDeclaration);
743        outlineInfo.addVariable(variableDeclaration.name());
744     }
745     try {
746       token2 = jj_consume_token(SEMICOLON);
747     } catch (ParseException e) {
748     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration";
749     errorLevel   = ERROR;
750     errorStart   = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
751     errorEnd     = SimpleCharStream.getPosition() + 1;
752     processParseExceptionDebug(e);
753     }
754    list = new VariableDeclaration[arrayList.size()];
755    arrayList.toArray(list);
756    int end;
757    if (token2 == null) {
758      end = list[list.length-1].sourceEnd;
759    } else {
760      end = token2.sourceEnd;
761    }
762    {if (true) return new FieldDeclaration(list,
763                                token.sourceStart,
764                                end,
765                                currentSegment);}
766     throw new Error("Missing return statement in function");
767   }
768
769 /**
770  * a strict variable declarator : there cannot be a suffix here.
771  * It will be used by fields and formal parameters
772  */
773   static final public VariableDeclaration VariableDeclaratorNoSuffix() throws ParseException {
774   final Token varName;
775   Expression initializer = null;
776   Token assignToken;
777     varName = jj_consume_token(DOLLAR_ID);
778     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
779     case ASSIGN:
780       assignToken = jj_consume_token(ASSIGN);
781       try {
782         initializer = VariableInitializer();
783       } catch (ParseException e) {
784       errorMessage = "Literal expression expected in variable initializer";
785       errorLevel   = ERROR;
786       errorStart = assignToken.sourceEnd +1;
787       errorEnd   = assignToken.sourceEnd +1;
788       processParseExceptionDebug(e);
789       }
790       break;
791     default:
792       jj_la1[10] = jj_gen;
793       ;
794     }
795   if (initializer == null) {
796     {if (true) return new VariableDeclaration(currentSegment,
797                                    new Variable(varName.image.substring(1),
798                                                 varName.sourceStart+1,
799                                                 varName.sourceEnd+1),
800                                    varName.sourceStart+1,
801                                    varName.sourceEnd+1);}
802   }
803   {if (true) return new VariableDeclaration(currentSegment,
804                                  new Variable(varName.image.substring(1),
805                                               varName.sourceStart+1,
806                                               varName.sourceEnd+1),
807                                  initializer,
808                                  VariableDeclaration.EQUAL,
809                                  varName.sourceStart+1);}
810     throw new Error("Missing return statement in function");
811   }
812
813 /**
814  * this will be used by static statement
815  */
816   static final public VariableDeclaration VariableDeclarator() throws ParseException {
817   final AbstractVariable variable;
818   Expression initializer = null;
819     variable = VariableDeclaratorId();
820     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
821     case ASSIGN:
822       jj_consume_token(ASSIGN);
823       try {
824         initializer = VariableInitializer();
825       } catch (ParseException e) {
826       errorMessage = "Literal expression expected in variable initializer";
827       errorLevel   = ERROR;
828       errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
829       errorEnd   = SimpleCharStream.getPosition() + 1;
830       processParseExceptionDebug(e);
831       }
832       break;
833     default:
834       jj_la1[11] = jj_gen;
835       ;
836     }
837   if (initializer == null) {
838     {if (true) return new VariableDeclaration(currentSegment,
839                                    variable,
840                                    variable.sourceStart,
841                                    variable.sourceEnd);}
842   }
843     {if (true) return new VariableDeclaration(currentSegment,
844                                    variable,
845                                    initializer,
846                                    VariableDeclaration.EQUAL,
847                                    variable.sourceStart);}
848     throw new Error("Missing return statement in function");
849   }
850
851 /**
852  * A Variable name.
853  * @return the variable name (with suffix)
854  */
855   static final public AbstractVariable VariableDeclaratorId() throws ParseException {
856   final Variable var;
857   AbstractVariable expression = null;
858     try {
859       var = Variable();
860       label_5:
861       while (true) {
862         if (jj_2_1(2)) {
863           ;
864         } else {
865           break label_5;
866         }
867         expression = VariableSuffix(var);
868       }
869      if (expression == null) {
870        {if (true) return var;}
871      }
872      {if (true) return expression;}
873     } catch (ParseException e) {
874     errorMessage = "'$' expected for variable identifier";
875     errorLevel   = ERROR;
876     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
877     errorEnd   = SimpleCharStream.getPosition() + 1;
878     {if (true) throw e;}
879     }
880     throw new Error("Missing return statement in function");
881   }
882
883 /**
884  * Return a variablename without the $.
885  * @return a variable name
886  *//*
887 Variable Variable():
888 {
889   final StringBuffer buff;
890   Expression expression = null;
891   final Token token;
892   Variable expr;
893   final int pos;
894 }
895 {
896   token = <DOLLAR_ID>
897   [<LBRACE> expression = Expression() <RBRACE>]
898   {
899     if (expression == null) {
900       return new Variable(token.image.substring(1),
901                           token.sourceStart+1,
902                           token.sourceEnd+1);
903     }
904     String s = expression.toStringExpression();
905     buff = new StringBuffer(token.image.length()+s.length()+2);
906     buff.append(token.image);
907     buff.append("{");
908     buff.append(s);
909     buff.append("}");
910     s = buff.toString();
911     return new Variable(s,token.sourceStart+1,token.sourceEnd+1);
912   }
913 |
914   token = <DOLLAR>
915   expr = VariableName()
916   {return new Variable(expr,token.sourceStart,expr.sourceEnd);}
917 }   */
918   static final public Variable Variable() throws ParseException {
919   Variable variable = null;
920   final Token token;
921     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
922     case DOLLAR_ID:
923       token = jj_consume_token(DOLLAR_ID);
924       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
925       case DOLLAR:
926       case IDENTIFIER:
927       case LBRACE:
928       case DOLLAR_ID:
929         variable = Var(token);
930         break;
931       default:
932         jj_la1[12] = jj_gen;
933         ;
934       }
935     if (variable == null) {
936       {if (true) return new Variable(token.image.substring(1),token.sourceStart+1,token.sourceEnd+1);}
937     }
938     final StringBuffer buff = new StringBuffer();
939     buff.append(token.image.substring(1));
940     buff.append(variable.toStringExpression());
941     {if (true) return new Variable(buff.toString(),token.sourceStart+1,variable.sourceEnd+1);}
942       break;
943     case DOLLAR:
944       token = jj_consume_token(DOLLAR);
945       variable = Var(token);
946     {if (true) return new Variable(variable,token.sourceStart,variable.sourceEnd);}
947       break;
948     default:
949       jj_la1[13] = jj_gen;
950       jj_consume_token(-1);
951       throw new ParseException();
952     }
953     throw new Error("Missing return statement in function");
954   }
955
956   static final public Variable Var(final Token dollar) throws ParseException {
957   Variable variable = null;
958   final Token token;
959   ConstantIdentifier constant;
960     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
961     case DOLLAR_ID:
962       token = jj_consume_token(DOLLAR_ID);
963       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
964       case DOLLAR:
965       case IDENTIFIER:
966       case LBRACE:
967       case DOLLAR_ID:
968         variable = Var(token);
969         break;
970       default:
971         jj_la1[14] = jj_gen;
972         ;
973       }
974    if (variable == null) {
975      {if (true) return new Variable(token.image.substring(1),token.sourceStart+1,token.sourceEnd+1);}
976    }
977    final StringBuffer buff = new StringBuffer();
978    buff.append(token.image.substring(1));
979    buff.append(variable.toStringExpression());
980    {if (true) return new Variable(buff.toString(),dollar.sourceStart,variable.sourceEnd);}
981       break;
982     default:
983       jj_la1[15] = jj_gen;
984       if (jj_2_2(2147483647)) {
985         token = jj_consume_token(DOLLAR);
986         variable = Var(token);
987    {if (true) return new Variable(variable,dollar.sourceStart,variable.sourceEnd);}
988       } else {
989         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
990         case IDENTIFIER:
991         case LBRACE:
992           constant = VariableName();
993    {if (true) return new Variable(constant.name,dollar.sourceStart,constant.sourceEnd);}
994           break;
995         default:
996           jj_la1[16] = jj_gen;
997           jj_consume_token(-1);
998           throw new ParseException();
999         }
1000       }
1001     }
1002     throw new Error("Missing return statement in function");
1003   }
1004
1005 /**
1006  * A Variable name (without the $)
1007  * @return a variable name String
1008  */
1009   static final public ConstantIdentifier VariableName() throws ParseException {
1010   final StringBuffer buff;
1011   String expr;
1012   Expression expression = null;
1013   final Token token;
1014   Token token2 = null;
1015     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1016     case LBRACE:
1017       token = jj_consume_token(LBRACE);
1018       expression = Expression();
1019       token2 = jj_consume_token(RBRACE);
1020    expr = expression.toStringExpression();
1021    buff = new StringBuffer(expr.length()+2);
1022    buff.append("{");
1023    buff.append(expr);
1024    buff.append("}");
1025    expr = buff.toString();
1026    {if (true) return new ConstantIdentifier(expr,
1027                                  token.sourceStart,
1028                                  token2.sourceEnd);}
1029       break;
1030     case IDENTIFIER:
1031       token = jj_consume_token(IDENTIFIER);
1032       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1033       case LBRACE:
1034         jj_consume_token(LBRACE);
1035         expression = Expression();
1036         token2 = jj_consume_token(RBRACE);
1037         break;
1038       default:
1039         jj_la1[17] = jj_gen;
1040         ;
1041       }
1042     if (expression == null) {
1043       {if (true) return new ConstantIdentifier(token.image,
1044                                     token.sourceStart,
1045                                     token.sourceEnd);}
1046     }
1047     expr = expression.toStringExpression();
1048     buff = new StringBuffer(token.image.length()+expr.length()+2);
1049     buff.append(token.image);
1050     buff.append("{");
1051     buff.append(expr);
1052     buff.append("}");
1053     expr = buff.toString();
1054     {if (true) return new ConstantIdentifier(expr,
1055                                   token.sourceStart,
1056                                   token2.sourceEnd);}
1057       break;
1058     default:
1059       jj_la1[18] = jj_gen;
1060       jj_consume_token(-1);
1061       throw new ParseException();
1062     }
1063     throw new Error("Missing return statement in function");
1064   }
1065
1066   static final public Expression VariableInitializer() throws ParseException {
1067   final Expression expr;
1068   final Token token, token2;
1069     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1070     case NULL:
1071     case TRUE:
1072     case FALSE:
1073     case INTEGER_LITERAL:
1074     case FLOATING_POINT_LITERAL:
1075     case STRING_LITERAL:
1076       expr = Literal();
1077    {if (true) return expr;}
1078       break;
1079     case MINUS:
1080       token2 = jj_consume_token(MINUS);
1081       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1082       case INTEGER_LITERAL:
1083         token = jj_consume_token(INTEGER_LITERAL);
1084         break;
1085       case FLOATING_POINT_LITERAL:
1086         token = jj_consume_token(FLOATING_POINT_LITERAL);
1087         break;
1088       default:
1089         jj_la1[19] = jj_gen;
1090         jj_consume_token(-1);
1091         throw new ParseException();
1092       }
1093    {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
1094                                       OperatorIds.MINUS,
1095                                       token2.sourceStart);}
1096       break;
1097     case PLUS:
1098       token2 = jj_consume_token(PLUS);
1099       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1100       case INTEGER_LITERAL:
1101         token = jj_consume_token(INTEGER_LITERAL);
1102         break;
1103       case FLOATING_POINT_LITERAL:
1104         token = jj_consume_token(FLOATING_POINT_LITERAL);
1105         break;
1106       default:
1107         jj_la1[20] = jj_gen;
1108         jj_consume_token(-1);
1109         throw new ParseException();
1110       }
1111    {if (true) return new PrefixedUnaryExpression(new NumberLiteral(token),
1112                                       OperatorIds.PLUS,
1113                                       token2.sourceStart);}
1114       break;
1115     case ARRAY:
1116       expr = ArrayDeclarator();
1117    {if (true) return expr;}
1118       break;
1119     case IDENTIFIER:
1120       token = jj_consume_token(IDENTIFIER);
1121    {if (true) return new ConstantIdentifier(token);}
1122       break;
1123     default:
1124       jj_la1[21] = jj_gen;
1125       jj_consume_token(-1);
1126       throw new ParseException();
1127     }
1128     throw new Error("Missing return statement in function");
1129   }
1130
1131   static final public ArrayVariableDeclaration ArrayVariable() throws ParseException {
1132 final Expression expr,expr2;
1133     expr = Expression();
1134     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1135     case ARRAYASSIGN:
1136       jj_consume_token(ARRAYASSIGN);
1137       expr2 = Expression();
1138      {if (true) return new ArrayVariableDeclaration(expr,expr2);}
1139       break;
1140     default:
1141       jj_la1[22] = jj_gen;
1142       ;
1143     }
1144    {if (true) return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
1145     throw new Error("Missing return statement in function");
1146   }
1147
1148   static final public ArrayVariableDeclaration[] ArrayInitializer() throws ParseException {
1149   ArrayVariableDeclaration expr;
1150   final ArrayList list = new ArrayList();
1151     jj_consume_token(LPAREN);
1152     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1153     case ARRAY:
1154     case LIST:
1155     case PRINT:
1156     case NEW:
1157     case NULL:
1158     case TRUE:
1159     case FALSE:
1160     case AT:
1161     case DOLLAR:
1162     case BANG:
1163     case PLUS_PLUS:
1164     case MINUS_MINUS:
1165     case PLUS:
1166     case MINUS:
1167     case BIT_AND:
1168     case INTEGER_LITERAL:
1169     case FLOATING_POINT_LITERAL:
1170     case STRING_LITERAL:
1171     case IDENTIFIER:
1172     case LPAREN:
1173     case DOLLAR_ID:
1174       expr = ArrayVariable();
1175        list.add(expr);
1176       label_6:
1177       while (true) {
1178         if (jj_2_3(2)) {
1179           ;
1180         } else {
1181           break label_6;
1182         }
1183         jj_consume_token(COMMA);
1184         expr = ArrayVariable();
1185        list.add(expr);
1186       }
1187       break;
1188     default:
1189       jj_la1[23] = jj_gen;
1190       ;
1191     }
1192     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1193     case COMMA:
1194       jj_consume_token(COMMA);
1195                list.add(null);
1196       break;
1197     default:
1198       jj_la1[24] = jj_gen;
1199       ;
1200     }
1201     jj_consume_token(RPAREN);
1202   final ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
1203   list.toArray(vars);
1204   {if (true) return vars;}
1205     throw new Error("Missing return statement in function");
1206   }
1207
1208 /**
1209  * A Method Declaration.
1210  * <b>function</b> MetodDeclarator() Block()
1211  */
1212   static final public MethodDeclaration MethodDeclaration() throws ParseException {
1213   final MethodDeclaration functionDeclaration;
1214   final Block block;
1215   final OutlineableWithChildren seg = currentSegment;
1216   final Token token;
1217     token = jj_consume_token(FUNCTION);
1218     try {
1219       functionDeclaration = MethodDeclarator(token.sourceStart);
1220      outlineInfo.addVariable(new String(functionDeclaration.name));
1221     } catch (ParseException e) {
1222     if (errorMessage != null)  {if (true) throw e;}
1223     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1224     errorLevel   = ERROR;
1225     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1226     errorEnd   = SimpleCharStream.getPosition() + 1;
1227     {if (true) throw e;}
1228     }
1229    currentSegment = functionDeclaration;
1230     block = Block();
1231    functionDeclaration.statements = block.statements;
1232    currentSegment = seg;
1233    {if (true) return functionDeclaration;}
1234     throw new Error("Missing return statement in function");
1235   }
1236
1237 /**
1238  * A MethodDeclarator.
1239  * [&] IDENTIFIER(parameters ...).
1240  * @return a function description for the outline
1241  */
1242   static final public MethodDeclaration MethodDeclarator(final int start) throws ParseException {
1243   Token identifier = null;
1244   Token reference = null;
1245   final Hashtable formalParameters = new Hashtable();
1246   String identifierChar = SYNTAX_ERROR_CHAR;
1247   final int end;
1248     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1249     case BIT_AND:
1250       reference = jj_consume_token(BIT_AND);
1251       break;
1252     default:
1253       jj_la1[25] = jj_gen;
1254       ;
1255     }
1256     try {
1257       identifier = jj_consume_token(IDENTIFIER);
1258      identifierChar = identifier.image;
1259     } catch (ParseException e) {
1260     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
1261     errorLevel   = ERROR;
1262     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1263     errorEnd   = SimpleCharStream.getPosition() + 1;
1264     processParseExceptionDebug(e);
1265     }
1266     end = FormalParameters(formalParameters);
1267   int nameStart, nameEnd;
1268   if (identifier == null) {
1269     if (reference == null) {
1270       nameStart = start + 9;
1271       nameEnd = start + 10;
1272     } else {
1273       nameStart = reference.sourceEnd + 1;
1274       nameEnd = reference.sourceEnd + 2;
1275     }
1276   } else {
1277       nameStart = identifier.sourceStart;
1278       nameEnd = identifier.sourceEnd;
1279   }
1280   {if (true) return new MethodDeclaration(currentSegment,
1281                                identifierChar,
1282                                formalParameters,
1283                                reference != null,
1284                                nameStart,
1285                                nameEnd,
1286                                start,
1287                                end);}
1288     throw new Error("Missing return statement in function");
1289   }
1290
1291 /**
1292  * FormalParameters follows method identifier.
1293  * (FormalParameter())
1294  */
1295   static final public int FormalParameters(final Hashtable parameters) throws ParseException {
1296   VariableDeclaration var;
1297   final Token token;
1298   int end;
1299     try {
1300       jj_consume_token(LPAREN);
1301     } catch (ParseException e) {
1302     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected after function identifier";
1303     errorLevel   = ERROR;
1304     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1305     errorEnd   = SimpleCharStream.getPosition() + 1;
1306     processParseExceptionDebug(e);
1307     }
1308     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1309     case BIT_AND:
1310     case DOLLAR_ID:
1311       var = FormalParameter();
1312      parameters.put(new String(var.name()),var);
1313       label_7:
1314       while (true) {
1315         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1316         case COMMA:
1317           ;
1318           break;
1319         default:
1320           jj_la1[26] = jj_gen;
1321           break label_7;
1322         }
1323         jj_consume_token(COMMA);
1324         var = FormalParameter();
1325        parameters.put(new String(var.name()),var);
1326       }
1327       break;
1328     default:
1329       jj_la1[27] = jj_gen;
1330       ;
1331     }
1332     try {
1333       token = jj_consume_token(RPAREN);
1334      end = token.sourceEnd;
1335     } catch (ParseException e) {
1336     errorMessage = "')' expected";
1337     errorLevel   = ERROR;
1338     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1339     errorEnd   = SimpleCharStream.getPosition() + 1;
1340     processParseExceptionDebug(e);
1341     end = e.currentToken.sourceStart;
1342     }
1343   {if (true) return end;}
1344     throw new Error("Missing return statement in function");
1345   }
1346
1347 /**
1348  * A formal parameter.
1349  * $varname[=value] (,$varname[=value])
1350  */
1351   static final public VariableDeclaration FormalParameter() throws ParseException {
1352   final VariableDeclaration variableDeclaration;
1353   Token token = null;
1354     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1355     case BIT_AND:
1356       token = jj_consume_token(BIT_AND);
1357       break;
1358     default:
1359       jj_la1[28] = jj_gen;
1360       ;
1361     }
1362     variableDeclaration = VariableDeclaratorNoSuffix();
1363     if (token != null) {
1364       variableDeclaration.setReference(true);
1365     }
1366     {if (true) return variableDeclaration;}
1367     throw new Error("Missing return statement in function");
1368   }
1369
1370   static final public ConstantIdentifier Type() throws ParseException {
1371  final Token token;
1372     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1373     case STRING:
1374       token = jj_consume_token(STRING);
1375                        {if (true) return new ConstantIdentifier(token);}
1376       break;
1377     case BOOL:
1378       token = jj_consume_token(BOOL);
1379                        {if (true) return new ConstantIdentifier(token);}
1380       break;
1381     case BOOLEAN:
1382       token = jj_consume_token(BOOLEAN);
1383                        {if (true) return new ConstantIdentifier(token);}
1384       break;
1385     case REAL:
1386       token = jj_consume_token(REAL);
1387                        {if (true) return new ConstantIdentifier(token);}
1388       break;
1389     case DOUBLE:
1390       token = jj_consume_token(DOUBLE);
1391                        {if (true) return new ConstantIdentifier(token);}
1392       break;
1393     case FLOAT:
1394       token = jj_consume_token(FLOAT);
1395                        {if (true) return new ConstantIdentifier(token);}
1396       break;
1397     case INT:
1398       token = jj_consume_token(INT);
1399                        {if (true) return new ConstantIdentifier(token);}
1400       break;
1401     case INTEGER:
1402       token = jj_consume_token(INTEGER);
1403                        {if (true) return new ConstantIdentifier(token);}
1404       break;
1405     case OBJECT:
1406       token = jj_consume_token(OBJECT);
1407                        {if (true) return new ConstantIdentifier(token);}
1408       break;
1409     default:
1410       jj_la1[29] = jj_gen;
1411       jj_consume_token(-1);
1412       throw new ParseException();
1413     }
1414     throw new Error("Missing return statement in function");
1415   }
1416
1417   static final public Expression Expression() throws ParseException {
1418   final Expression expr;
1419   Expression initializer = null;
1420   int assignOperator = -1;
1421     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1422     case ARRAY:
1423     case NEW:
1424     case NULL:
1425     case TRUE:
1426     case FALSE:
1427     case AT:
1428     case DOLLAR:
1429     case BANG:
1430     case PLUS_PLUS:
1431     case MINUS_MINUS:
1432     case PLUS:
1433     case MINUS:
1434     case BIT_AND:
1435     case INTEGER_LITERAL:
1436     case FLOATING_POINT_LITERAL:
1437     case STRING_LITERAL:
1438     case IDENTIFIER:
1439     case LPAREN:
1440     case DOLLAR_ID:
1441       expr = ConditionalExpression();
1442       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1443       case ASSIGN:
1444       case PLUSASSIGN:
1445       case MINUSASSIGN:
1446       case STARASSIGN:
1447       case SLASHASSIGN:
1448       case ANDASSIGN:
1449       case ORASSIGN:
1450       case XORASSIGN:
1451       case DOTASSIGN:
1452       case REMASSIGN:
1453       case TILDEEQUAL:
1454       case LSHIFTASSIGN:
1455       case RSIGNEDSHIFTASSIGN:
1456         assignOperator = AssignmentOperator();
1457         try {
1458           initializer = Expression();
1459         } catch (ParseException e) {
1460       if (errorMessage != null) {
1461         {if (true) throw e;}
1462       }
1463       errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1464       errorLevel   = ERROR;
1465       errorEnd   = SimpleCharStream.getPosition();
1466       {if (true) throw e;}
1467         }
1468         break;
1469       default:
1470         jj_la1[30] = jj_gen;
1471         ;
1472       }
1473     if (assignOperator != -1) {// todo : change this, very very bad :(
1474         if (expr instanceof AbstractVariable) {
1475           {if (true) return new VariableDeclaration(currentSegment,
1476                                          (AbstractVariable) expr,
1477                                          initializer,
1478                                          expr.sourceStart,
1479                                          initializer.sourceEnd);}
1480         }
1481         String varName = expr.toStringExpression().substring(1);
1482         {if (true) return new VariableDeclaration(currentSegment,
1483                                        new Variable(varName,
1484                                                     expr.sourceStart,
1485                                                     expr.sourceEnd),
1486                                        expr.sourceStart,
1487                                        initializer.sourceEnd);}
1488     }
1489     {if (true) return expr;}
1490       break;
1491     case LIST:
1492     case PRINT:
1493       expr = ExpressionWBang();
1494                                   {if (true) return expr;}
1495       break;
1496     default:
1497       jj_la1[31] = jj_gen;
1498       jj_consume_token(-1);
1499       throw new ParseException();
1500     }
1501     throw new Error("Missing return statement in function");
1502   }
1503
1504   static final public Expression ExpressionWBang() throws ParseException {
1505   final Expression expr;
1506   final Token token;
1507     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1508     case BANG:
1509       token = jj_consume_token(BANG);
1510       expr = ExpressionWBang();
1511    {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
1512       break;
1513     case LIST:
1514     case PRINT:
1515       expr = ExpressionNoBang();
1516                              {if (true) return expr;}
1517       break;
1518     default:
1519       jj_la1[32] = jj_gen;
1520       jj_consume_token(-1);
1521       throw new ParseException();
1522     }
1523     throw new Error("Missing return statement in function");
1524   }
1525
1526   static final public Expression ExpressionNoBang() throws ParseException {
1527   Expression expr;
1528     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1529     case LIST:
1530       expr = ListExpression();
1531                               {if (true) return expr;}
1532       break;
1533     case PRINT:
1534       expr = PrintExpression();
1535                               {if (true) return expr;}
1536       break;
1537     default:
1538       jj_la1[33] = jj_gen;
1539       jj_consume_token(-1);
1540       throw new ParseException();
1541     }
1542     throw new Error("Missing return statement in function");
1543   }
1544
1545 /**
1546  * Any assignement operator.
1547  * @return the assignement operator id
1548  */
1549   static final public int AssignmentOperator() throws ParseException {
1550     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1551     case ASSIGN:
1552       jj_consume_token(ASSIGN);
1553                         {if (true) return VariableDeclaration.EQUAL;}
1554       break;
1555     case STARASSIGN:
1556       jj_consume_token(STARASSIGN);
1557                         {if (true) return VariableDeclaration.STAR_EQUAL;}
1558       break;
1559     case SLASHASSIGN:
1560       jj_consume_token(SLASHASSIGN);
1561                         {if (true) return VariableDeclaration.SLASH_EQUAL;}
1562       break;
1563     case REMASSIGN:
1564       jj_consume_token(REMASSIGN);
1565                         {if (true) return VariableDeclaration.REM_EQUAL;}
1566       break;
1567     case PLUSASSIGN:
1568       jj_consume_token(PLUSASSIGN);
1569                         {if (true) return VariableDeclaration.PLUS_EQUAL;}
1570       break;
1571     case MINUSASSIGN:
1572       jj_consume_token(MINUSASSIGN);
1573                         {if (true) return VariableDeclaration.MINUS_EQUAL;}
1574       break;
1575     case LSHIFTASSIGN:
1576       jj_consume_token(LSHIFTASSIGN);
1577                         {if (true) return VariableDeclaration.LSHIFT_EQUAL;}
1578       break;
1579     case RSIGNEDSHIFTASSIGN:
1580       jj_consume_token(RSIGNEDSHIFTASSIGN);
1581                         {if (true) return VariableDeclaration.RSIGNEDSHIFT_EQUAL;}
1582       break;
1583     case ANDASSIGN:
1584       jj_consume_token(ANDASSIGN);
1585                         {if (true) return VariableDeclaration.AND_EQUAL;}
1586       break;
1587     case XORASSIGN:
1588       jj_consume_token(XORASSIGN);
1589                         {if (true) return VariableDeclaration.XOR_EQUAL;}
1590       break;
1591     case ORASSIGN:
1592       jj_consume_token(ORASSIGN);
1593                         {if (true) return VariableDeclaration.OR_EQUAL;}
1594       break;
1595     case DOTASSIGN:
1596       jj_consume_token(DOTASSIGN);
1597                         {if (true) return VariableDeclaration.DOT_EQUAL;}
1598       break;
1599     case TILDEEQUAL:
1600       jj_consume_token(TILDEEQUAL);
1601                         {if (true) return VariableDeclaration.TILDE_EQUAL;}
1602       break;
1603     default:
1604       jj_la1[34] = jj_gen;
1605       jj_consume_token(-1);
1606       throw new ParseException();
1607     }
1608     throw new Error("Missing return statement in function");
1609   }
1610
1611   static final public Expression ConditionalExpression() throws ParseException {
1612   final Expression expr;
1613   Expression expr2 = null;
1614   Expression expr3 = null;
1615     expr = ConditionalOrExpression();
1616     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1617     case HOOK:
1618       jj_consume_token(HOOK);
1619       expr2 = Expression();
1620       jj_consume_token(COLON);
1621       expr3 = ConditionalExpression();
1622       break;
1623     default:
1624       jj_la1[35] = jj_gen;
1625       ;
1626     }
1627   if (expr3 == null) {
1628     {if (true) return expr;}
1629   }
1630   {if (true) return new ConditionalExpression(expr,expr2,expr3);}
1631     throw new Error("Missing return statement in function");
1632   }
1633
1634   static final public Expression ConditionalOrExpression() throws ParseException {
1635   Expression expr,expr2;
1636   int operator;
1637     expr = ConditionalAndExpression();
1638     label_8:
1639     while (true) {
1640       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1641       case OR_OR:
1642       case _ORL:
1643         ;
1644         break;
1645       default:
1646         jj_la1[36] = jj_gen;
1647         break label_8;
1648       }
1649       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1650       case OR_OR:
1651         jj_consume_token(OR_OR);
1652                  operator = OperatorIds.OR_OR;
1653         break;
1654       case _ORL:
1655         jj_consume_token(_ORL);
1656                  operator = OperatorIds.ORL;
1657         break;
1658       default:
1659         jj_la1[37] = jj_gen;
1660         jj_consume_token(-1);
1661         throw new ParseException();
1662       }
1663       expr2 = ConditionalAndExpression();
1664       expr = new BinaryExpression(expr,expr2,operator);
1665     }
1666    {if (true) return expr;}
1667     throw new Error("Missing return statement in function");
1668   }
1669
1670   static final public Expression ConditionalAndExpression() throws ParseException {
1671   Expression expr,expr2;
1672   int operator;
1673     expr = ConcatExpression();
1674     label_9:
1675     while (true) {
1676       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1677       case AND_AND:
1678       case _ANDL:
1679         ;
1680         break;
1681       default:
1682         jj_la1[38] = jj_gen;
1683         break label_9;
1684       }
1685       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1686       case AND_AND:
1687         jj_consume_token(AND_AND);
1688                 operator = OperatorIds.AND_AND;
1689         break;
1690       case _ANDL:
1691         jj_consume_token(_ANDL);
1692                 operator = OperatorIds.ANDL;
1693         break;
1694       default:
1695         jj_la1[39] = jj_gen;
1696         jj_consume_token(-1);
1697         throw new ParseException();
1698       }
1699       expr2 = ConcatExpression();
1700                                expr = new BinaryExpression(expr,expr2,operator);
1701     }
1702    {if (true) return expr;}
1703     throw new Error("Missing return statement in function");
1704   }
1705
1706   static final public Expression ConcatExpression() throws ParseException {
1707   Expression expr,expr2;
1708     expr = InclusiveOrExpression();
1709     label_10:
1710     while (true) {
1711       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1712       case DOT:
1713         ;
1714         break;
1715       default:
1716         jj_la1[40] = jj_gen;
1717         break label_10;
1718       }
1719       jj_consume_token(DOT);
1720       expr2 = InclusiveOrExpression();
1721      expr = new BinaryExpression(expr,expr2,OperatorIds.DOT);
1722     }
1723    {if (true) return expr;}
1724     throw new Error("Missing return statement in function");
1725   }
1726
1727   static final public Expression InclusiveOrExpression() throws ParseException {
1728   Expression expr,expr2;
1729     expr = ExclusiveOrExpression();
1730     label_11:
1731     while (true) {
1732       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1733       case BIT_OR:
1734         ;
1735         break;
1736       default:
1737         jj_la1[41] = jj_gen;
1738         break label_11;
1739       }
1740       jj_consume_token(BIT_OR);
1741       expr2 = ExclusiveOrExpression();
1742     expr = new BinaryExpression(expr,expr2,OperatorIds.OR);
1743     }
1744    {if (true) return expr;}
1745     throw new Error("Missing return statement in function");
1746   }
1747
1748   static final public Expression ExclusiveOrExpression() throws ParseException {
1749   Expression expr,expr2;
1750     expr = AndExpression();
1751     label_12:
1752     while (true) {
1753       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1754       case XOR:
1755         ;
1756         break;
1757       default:
1758         jj_la1[42] = jj_gen;
1759         break label_12;
1760       }
1761       jj_consume_token(XOR);
1762       expr2 = AndExpression();
1763      expr = new BinaryExpression(expr,expr2,OperatorIds.XOR);
1764     }
1765    {if (true) return expr;}
1766     throw new Error("Missing return statement in function");
1767   }
1768
1769   static final public Expression AndExpression() throws ParseException {
1770   Expression expr,expr2;
1771     expr = EqualityExpression();
1772     label_13:
1773     while (true) {
1774       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1775       case BIT_AND:
1776         ;
1777         break;
1778       default:
1779         jj_la1[43] = jj_gen;
1780         break label_13;
1781       }
1782       jj_consume_token(BIT_AND);
1783       expr2 = EqualityExpression();
1784      expr = new BinaryExpression(expr,expr2,OperatorIds.AND);
1785     }
1786    {if (true) return expr;}
1787     throw new Error("Missing return statement in function");
1788   }
1789
1790   static final public Expression EqualityExpression() throws ParseException {
1791   Expression expr,expr2;
1792   int operator;
1793     expr = RelationalExpression();
1794     label_14:
1795     while (true) {
1796       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1797       case EQUAL_EQUAL:
1798       case NOT_EQUAL:
1799       case DIF:
1800       case BANGDOUBLEEQUAL:
1801       case TRIPLEEQUAL:
1802         ;
1803         break;
1804       default:
1805         jj_la1[44] = jj_gen;
1806         break label_14;
1807       }
1808       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1809       case EQUAL_EQUAL:
1810         jj_consume_token(EQUAL_EQUAL);
1811                           operator = OperatorIds.EQUAL_EQUAL;
1812         break;
1813       case DIF:
1814         jj_consume_token(DIF);
1815                           operator = OperatorIds.DIF;
1816         break;
1817       case NOT_EQUAL:
1818         jj_consume_token(NOT_EQUAL);
1819                           operator = OperatorIds.DIF;
1820         break;
1821       case BANGDOUBLEEQUAL:
1822         jj_consume_token(BANGDOUBLEEQUAL);
1823                           operator = OperatorIds.BANG_EQUAL_EQUAL;
1824         break;
1825       case TRIPLEEQUAL:
1826         jj_consume_token(TRIPLEEQUAL);
1827                           operator = OperatorIds.EQUAL_EQUAL_EQUAL;
1828         break;
1829       default:
1830         jj_la1[45] = jj_gen;
1831         jj_consume_token(-1);
1832         throw new ParseException();
1833       }
1834       try {
1835         expr2 = RelationalExpression();
1836       } catch (ParseException e) {
1837     if (errorMessage != null) {
1838       {if (true) throw e;}
1839     }
1840     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
1841     errorLevel   = ERROR;
1842     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1843     errorEnd   = SimpleCharStream.getPosition() + 1;
1844     {if (true) throw e;}
1845       }
1846     expr = new BinaryExpression(expr,expr2,operator);
1847     }
1848    {if (true) return expr;}
1849     throw new Error("Missing return statement in function");
1850   }
1851
1852   static final public Expression RelationalExpression() throws ParseException {
1853   Expression expr,expr2;
1854   int operator;
1855     expr = ShiftExpression();
1856     label_15:
1857     while (true) {
1858       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1859       case GT:
1860       case LT:
1861       case LE:
1862       case GE:
1863         ;
1864         break;
1865       default:
1866         jj_la1[46] = jj_gen;
1867         break label_15;
1868       }
1869       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1870       case LT:
1871         jj_consume_token(LT);
1872           operator = OperatorIds.LESS;
1873         break;
1874       case GT:
1875         jj_consume_token(GT);
1876           operator = OperatorIds.GREATER;
1877         break;
1878       case LE:
1879         jj_consume_token(LE);
1880           operator = OperatorIds.LESS_EQUAL;
1881         break;
1882       case GE:
1883         jj_consume_token(GE);
1884           operator = OperatorIds.GREATER_EQUAL;
1885         break;
1886       default:
1887         jj_la1[47] = jj_gen;
1888         jj_consume_token(-1);
1889         throw new ParseException();
1890       }
1891       expr2 = ShiftExpression();
1892    expr = new BinaryExpression(expr,expr2,operator);
1893     }
1894    {if (true) return expr;}
1895     throw new Error("Missing return statement in function");
1896   }
1897
1898   static final public Expression ShiftExpression() throws ParseException {
1899   Expression expr,expr2;
1900   int operator;
1901     expr = AdditiveExpression();
1902     label_16:
1903     while (true) {
1904       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1905       case LSHIFT:
1906       case RSIGNEDSHIFT:
1907       case RUNSIGNEDSHIFT:
1908         ;
1909         break;
1910       default:
1911         jj_la1[48] = jj_gen;
1912         break label_16;
1913       }
1914       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1915       case LSHIFT:
1916         jj_consume_token(LSHIFT);
1917                       operator = OperatorIds.LEFT_SHIFT;
1918         break;
1919       case RSIGNEDSHIFT:
1920         jj_consume_token(RSIGNEDSHIFT);
1921                       operator = OperatorIds.RIGHT_SHIFT;
1922         break;
1923       case RUNSIGNEDSHIFT:
1924         jj_consume_token(RUNSIGNEDSHIFT);
1925                       operator = OperatorIds.UNSIGNED_RIGHT_SHIFT;
1926         break;
1927       default:
1928         jj_la1[49] = jj_gen;
1929         jj_consume_token(-1);
1930         throw new ParseException();
1931       }
1932       expr2 = AdditiveExpression();
1933    expr = new BinaryExpression(expr,expr2,operator);
1934     }
1935    {if (true) return expr;}
1936     throw new Error("Missing return statement in function");
1937   }
1938
1939   static final public Expression AdditiveExpression() throws ParseException {
1940   Expression expr,expr2;
1941   int operator;
1942     expr = MultiplicativeExpression();
1943     label_17:
1944     while (true) {
1945       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1946       case PLUS:
1947       case MINUS:
1948         ;
1949         break;
1950       default:
1951         jj_la1[50] = jj_gen;
1952         break label_17;
1953       }
1954       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1955       case PLUS:
1956         jj_consume_token(PLUS);
1957                 operator = OperatorIds.PLUS;
1958         break;
1959       case MINUS:
1960         jj_consume_token(MINUS);
1961                 operator = OperatorIds.MINUS;
1962         break;
1963       default:
1964         jj_la1[51] = jj_gen;
1965         jj_consume_token(-1);
1966         throw new ParseException();
1967       }
1968       expr2 = MultiplicativeExpression();
1969    expr = new BinaryExpression(expr,expr2,operator);
1970     }
1971    {if (true) return expr;}
1972     throw new Error("Missing return statement in function");
1973   }
1974
1975   static final public Expression MultiplicativeExpression() throws ParseException {
1976   Expression expr,expr2;
1977   int operator;
1978     try {
1979       expr = UnaryExpression();
1980     } catch (ParseException e) {
1981     if (errorMessage != null) {if (true) throw e;}
1982     errorMessage = "unexpected token '"+e.currentToken.next.image+"'";
1983     errorLevel   = ERROR;
1984     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
1985     errorEnd   = SimpleCharStream.getPosition() + 1;
1986     {if (true) throw e;}
1987     }
1988     label_18:
1989     while (true) {
1990       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1991       case STAR:
1992       case SLASH:
1993       case REMAINDER:
1994         ;
1995         break;
1996       default:
1997         jj_la1[52] = jj_gen;
1998         break label_18;
1999       }
2000       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2001       case STAR:
2002         jj_consume_token(STAR);
2003                    operator = OperatorIds.MULTIPLY;
2004         break;
2005       case SLASH:
2006         jj_consume_token(SLASH);
2007                    operator = OperatorIds.DIVIDE;
2008         break;
2009       case REMAINDER:
2010         jj_consume_token(REMAINDER);
2011                    operator = OperatorIds.REMAINDER;
2012         break;
2013       default:
2014         jj_la1[53] = jj_gen;
2015         jj_consume_token(-1);
2016         throw new ParseException();
2017       }
2018       expr2 = UnaryExpression();
2019      expr = new BinaryExpression(expr,expr2,operator);
2020     }
2021    {if (true) return expr;}
2022     throw new Error("Missing return statement in function");
2023   }
2024
2025 /**
2026  * An unary expression starting with @, & or nothing
2027  */
2028   static final public Expression UnaryExpression() throws ParseException {
2029   final Expression expr;
2030     /* <BIT_AND> expr = UnaryExpressionNoPrefix()             //why did I had that ?
2031       {return new PrefixedUnaryExpression(expr,OperatorIds.AND,pos);}
2032     |      */
2033       expr = AtNotUnaryExpression();
2034                                  {if (true) return expr;}
2035     throw new Error("Missing return statement in function");
2036   }
2037
2038 /**
2039  * An expression prefixed (or not) by one or more @ and !.
2040  * @return the expression
2041  */
2042   static final public Expression AtNotUnaryExpression() throws ParseException {
2043   final Expression expr;
2044   final Token token;
2045     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2046     case AT:
2047       token = jj_consume_token(AT);
2048       expr = AtNotUnaryExpression();
2049    {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.AT,token.sourceStart);}
2050       break;
2051     case BANG:
2052       token = jj_consume_token(BANG);
2053       expr = AtNotUnaryExpression();
2054    {if (true) return new PrefixedUnaryExpression(expr,OperatorIds.NOT,token.sourceStart);}
2055       break;
2056     case ARRAY:
2057     case NEW:
2058     case NULL:
2059     case TRUE:
2060     case FALSE:
2061     case DOLLAR:
2062     case PLUS_PLUS:
2063     case MINUS_MINUS:
2064     case PLUS:
2065     case MINUS:
2066     case BIT_AND:
2067     case INTEGER_LITERAL:
2068     case FLOATING_POINT_LITERAL:
2069     case STRING_LITERAL:
2070     case IDENTIFIER:
2071     case LPAREN:
2072     case DOLLAR_ID:
2073       expr = UnaryExpressionNoPrefix();
2074    {if (true) return expr;}
2075       break;
2076     default:
2077       jj_la1[54] = jj_gen;
2078       jj_consume_token(-1);
2079       throw new ParseException();
2080     }
2081     throw new Error("Missing return statement in function");
2082   }
2083
2084   static final public Expression UnaryExpressionNoPrefix() throws ParseException {
2085   final Expression expr;
2086   final Token token;
2087     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2088     case PLUS:
2089       token = jj_consume_token(PLUS);
2090       expr = AtNotUnaryExpression();
2091                                                   {if (true) return new PrefixedUnaryExpression(expr,
2092                                                                                      OperatorIds.PLUS,
2093                                                                                      token.sourceStart);}
2094       break;
2095     case MINUS:
2096       token = jj_consume_token(MINUS);
2097       expr = AtNotUnaryExpression();
2098                                                   {if (true) return new PrefixedUnaryExpression(expr,
2099                                                                                      OperatorIds.MINUS,
2100                                                                                      token.sourceStart);}
2101       break;
2102     case PLUS_PLUS:
2103     case MINUS_MINUS:
2104       expr = PreIncDecExpression();
2105    {if (true) return expr;}
2106       break;
2107     case ARRAY:
2108     case NEW:
2109     case NULL:
2110     case TRUE:
2111     case FALSE:
2112     case DOLLAR:
2113     case BIT_AND:
2114     case INTEGER_LITERAL:
2115     case FLOATING_POINT_LITERAL:
2116     case STRING_LITERAL:
2117     case IDENTIFIER:
2118     case LPAREN:
2119     case DOLLAR_ID:
2120       expr = UnaryExpressionNotPlusMinus();
2121    {if (true) return expr;}
2122       break;
2123     default:
2124       jj_la1[55] = jj_gen;
2125       jj_consume_token(-1);
2126       throw new ParseException();
2127     }
2128     throw new Error("Missing return statement in function");
2129   }
2130
2131   static final public Expression PreIncDecExpression() throws ParseException {
2132 final Expression expr;
2133 final int operator;
2134 final Token token;
2135     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2136     case PLUS_PLUS:
2137       token = jj_consume_token(PLUS_PLUS);
2138                              operator = OperatorIds.PLUS_PLUS;
2139       break;
2140     case MINUS_MINUS:
2141       token = jj_consume_token(MINUS_MINUS);
2142                              operator = OperatorIds.MINUS_MINUS;
2143       break;
2144     default:
2145       jj_la1[56] = jj_gen;
2146       jj_consume_token(-1);
2147       throw new ParseException();
2148     }
2149     expr = PrimaryExpression();
2150    {if (true) return new PrefixedUnaryExpression(expr,operator,token.sourceStart);}
2151     throw new Error("Missing return statement in function");
2152   }
2153
2154   static final public Expression UnaryExpressionNotPlusMinus() throws ParseException {
2155   final Expression expr;
2156     if (jj_2_4(2147483647)) {
2157       expr = CastExpression();
2158                                    {if (true) return expr;}
2159     } else {
2160       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2161       case ARRAY:
2162       case NEW:
2163       case DOLLAR:
2164       case BIT_AND:
2165       case IDENTIFIER:
2166       case DOLLAR_ID:
2167         expr = PostfixExpression();
2168                                    {if (true) return expr;}
2169         break;
2170       case NULL:
2171       case TRUE:
2172       case FALSE:
2173       case INTEGER_LITERAL:
2174       case FLOATING_POINT_LITERAL:
2175       case STRING_LITERAL:
2176         expr = Literal();
2177                                    {if (true) return expr;}
2178         break;
2179       case LPAREN:
2180         jj_consume_token(LPAREN);
2181         expr = Expression();
2182         try {
2183           jj_consume_token(RPAREN);
2184         } catch (ParseException e) {
2185     errorMessage = "')' expected";
2186     errorLevel   = ERROR;
2187     errorStart   = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2188     errorEnd     = SimpleCharStream.getPosition() + 1;
2189     {if (true) throw e;}
2190         }
2191    {if (true) return expr;}
2192         break;
2193       default:
2194         jj_la1[57] = jj_gen;
2195         jj_consume_token(-1);
2196         throw new ParseException();
2197       }
2198     }
2199     throw new Error("Missing return statement in function");
2200   }
2201
2202   static final public CastExpression CastExpression() throws ParseException {
2203 final ConstantIdentifier type;
2204 final Expression expr;
2205 final Token token,token1;
2206     token1 = jj_consume_token(LPAREN);
2207     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2208     case STRING:
2209     case OBJECT:
2210     case BOOL:
2211     case BOOLEAN:
2212     case REAL:
2213     case DOUBLE:
2214     case FLOAT:
2215     case INT:
2216     case INTEGER:
2217       type = Type();
2218       break;
2219     case ARRAY:
2220       token = jj_consume_token(ARRAY);
2221                        type = new ConstantIdentifier(token);
2222       break;
2223     default:
2224       jj_la1[58] = jj_gen;
2225       jj_consume_token(-1);
2226       throw new ParseException();
2227     }
2228     jj_consume_token(RPAREN);
2229     expr = UnaryExpression();
2230    {if (true) return new CastExpression(type,expr,token1.sourceStart,expr.sourceEnd);}
2231     throw new Error("Missing return statement in function");
2232   }
2233
2234   static final public Expression PostfixExpression() throws ParseException {
2235   final Expression expr;
2236   int operator = -1;
2237   Token token = null;
2238     expr = PrimaryExpression();
2239     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2240     case PLUS_PLUS:
2241     case MINUS_MINUS:
2242       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2243       case PLUS_PLUS:
2244         token = jj_consume_token(PLUS_PLUS);
2245                              operator = OperatorIds.PLUS_PLUS;
2246         break;
2247       case MINUS_MINUS:
2248         token = jj_consume_token(MINUS_MINUS);
2249                              operator = OperatorIds.MINUS_MINUS;
2250         break;
2251       default:
2252         jj_la1[59] = jj_gen;
2253         jj_consume_token(-1);
2254         throw new ParseException();
2255       }
2256       break;
2257     default:
2258       jj_la1[60] = jj_gen;
2259       ;
2260     }
2261     if (operator == -1) {
2262       {if (true) return expr;}
2263     }
2264     {if (true) return new PostfixedUnaryExpression(expr,operator,token.sourceEnd);}
2265     throw new Error("Missing return statement in function");
2266   }
2267
2268   static final public Expression PrimaryExpression() throws ParseException {
2269   Expression expr;
2270   Token token = null;
2271     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2272     case NEW:
2273     case DOLLAR:
2274     case BIT_AND:
2275     case IDENTIFIER:
2276     case DOLLAR_ID:
2277       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2278       case BIT_AND:
2279         token = jj_consume_token(BIT_AND);
2280         break;
2281       default:
2282         jj_la1[61] = jj_gen;
2283         ;
2284       }
2285       expr = refPrimaryExpression(token);
2286    {if (true) return expr;}
2287       break;
2288     case ARRAY:
2289       expr = ArrayDeclarator();
2290    {if (true) return expr;}
2291       break;
2292     default:
2293       jj_la1[62] = jj_gen;
2294       jj_consume_token(-1);
2295       throw new ParseException();
2296     }
2297     throw new Error("Missing return statement in function");
2298   }
2299
2300   static final public Expression refPrimaryExpression(final Token reference) throws ParseException {
2301   Expression expr;
2302   Expression expr2 = null;
2303   final Token identifier;
2304     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2305     case IDENTIFIER:
2306       identifier = jj_consume_token(IDENTIFIER);
2307     expr = new ConstantIdentifier(identifier);
2308       label_19:
2309       while (true) {
2310         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2311         case STATICCLASSACCESS:
2312           ;
2313           break;
2314         default:
2315           jj_la1[63] = jj_gen;
2316           break label_19;
2317         }
2318         jj_consume_token(STATICCLASSACCESS);
2319         expr2 = ClassIdentifier();
2320      expr = new ClassAccess(expr,
2321                             expr2,
2322                             ClassAccess.STATIC);
2323       }
2324       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2325       case LPAREN:
2326         expr2 = Arguments(expr);
2327         break;
2328       default:
2329         jj_la1[64] = jj_gen;
2330         ;
2331       }
2332     if (expr2 == null) {
2333       if (reference != null) {
2334         ParseException e = generateParseException();
2335         errorMessage = "you cannot use a constant by reference";
2336         errorLevel   = ERROR;
2337         errorStart   = reference.sourceStart;
2338         errorEnd     = reference.sourceEnd;
2339         processParseExceptionDebug(e);
2340       }
2341       {if (true) return expr;}
2342     }
2343     {if (true) return expr2;}
2344       break;
2345     case DOLLAR:
2346     case DOLLAR_ID:
2347       expr = VariableDeclaratorId();
2348       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2349       case LPAREN:
2350         expr = Arguments(expr);
2351         break;
2352       default:
2353         jj_la1[65] = jj_gen;
2354         ;
2355       }
2356    {if (true) return expr;}
2357       break;
2358     case NEW:
2359       token = jj_consume_token(NEW);
2360       expr = ClassIdentifier();
2361     int start;
2362     if (reference == null) {
2363       start = token.sourceStart;
2364     } else {
2365       start = reference.sourceStart;
2366     }
2367     expr = new ClassInstantiation(expr,
2368                                   reference != null,
2369                                   start);
2370       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2371       case LPAREN:
2372         expr = Arguments(expr);
2373         break;
2374       default:
2375         jj_la1[66] = jj_gen;
2376         ;
2377       }
2378    {if (true) return expr;}
2379       break;
2380     default:
2381       jj_la1[67] = jj_gen;
2382       jj_consume_token(-1);
2383       throw new ParseException();
2384     }
2385     throw new Error("Missing return statement in function");
2386   }
2387
2388 /**
2389  * An array declarator.
2390  * array(vars)
2391  * @return an array
2392  */
2393   static final public ArrayInitializer ArrayDeclarator() throws ParseException {
2394   final ArrayVariableDeclaration[] vars;
2395   final Token token;
2396     token = jj_consume_token(ARRAY);
2397     vars = ArrayInitializer();
2398    {if (true) return new ArrayInitializer(vars,token.sourceStart,SimpleCharStream.getPosition());}
2399     throw new Error("Missing return statement in function");
2400   }
2401
2402   static final public Expression ClassIdentifier() throws ParseException {
2403   final Expression expr;
2404   final Token token;
2405     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2406     case IDENTIFIER:
2407       token = jj_consume_token(IDENTIFIER);
2408                                  {if (true) return new ConstantIdentifier(token);}
2409       break;
2410     case STRING:
2411     case OBJECT:
2412     case BOOL:
2413     case BOOLEAN:
2414     case REAL:
2415     case DOUBLE:
2416     case FLOAT:
2417     case INT:
2418     case INTEGER:
2419       expr = Type();
2420                                  {if (true) return expr;}
2421       break;
2422     case DOLLAR:
2423     case DOLLAR_ID:
2424       expr = VariableDeclaratorId();
2425                                  {if (true) return expr;}
2426       break;
2427     default:
2428       jj_la1[68] = jj_gen;
2429       jj_consume_token(-1);
2430       throw new ParseException();
2431     }
2432     throw new Error("Missing return statement in function");
2433   }
2434
2435 /**
2436  * Used by Variabledeclaratorid and primarysuffix
2437  */
2438   static final public AbstractVariable VariableSuffix(final AbstractVariable prefix) throws ParseException {
2439   Expression expression = null;
2440   final Token classAccessToken;
2441     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2442     case CLASSACCESS:
2443       classAccessToken = jj_consume_token(CLASSACCESS);
2444       try {
2445         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2446         case IDENTIFIER:
2447         case LBRACE:
2448           expression = VariableName();
2449           break;
2450         case DOLLAR:
2451         case DOLLAR_ID:
2452           expression = Variable();
2453           break;
2454         default:
2455           jj_la1[69] = jj_gen;
2456           jj_consume_token(-1);
2457           throw new ParseException();
2458         }
2459       } catch (ParseException e) {
2460     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function call or field access expected";
2461     errorLevel   = ERROR;
2462     errorStart = classAccessToken.sourceEnd +1;
2463     errorEnd   = classAccessToken.sourceEnd +1;
2464     processParseExceptionDebug(e);
2465       }
2466    {if (true) return new ClassAccess(prefix,
2467                           expression,
2468                           ClassAccess.NORMAL);}
2469       break;
2470     case LBRACKET:
2471       jj_consume_token(LBRACKET);
2472       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2473       case ARRAY:
2474       case LIST:
2475       case PRINT:
2476       case NEW:
2477       case NULL:
2478       case TRUE:
2479       case FALSE:
2480       case STRING:
2481       case OBJECT:
2482       case BOOL:
2483       case BOOLEAN:
2484       case REAL:
2485       case DOUBLE:
2486       case FLOAT:
2487       case INT:
2488       case INTEGER:
2489       case AT:
2490       case DOLLAR:
2491       case BANG:
2492       case PLUS_PLUS:
2493       case MINUS_MINUS:
2494       case PLUS:
2495       case MINUS:
2496       case BIT_AND:
2497       case INTEGER_LITERAL:
2498       case FLOATING_POINT_LITERAL:
2499       case STRING_LITERAL:
2500       case IDENTIFIER:
2501       case LPAREN:
2502       case DOLLAR_ID:
2503         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2504         case ARRAY:
2505         case LIST:
2506         case PRINT:
2507         case NEW:
2508         case NULL:
2509         case TRUE:
2510         case FALSE:
2511         case AT:
2512         case DOLLAR:
2513         case BANG:
2514         case PLUS_PLUS:
2515         case MINUS_MINUS:
2516         case PLUS:
2517         case MINUS:
2518         case BIT_AND:
2519         case INTEGER_LITERAL:
2520         case FLOATING_POINT_LITERAL:
2521         case STRING_LITERAL:
2522         case IDENTIFIER:
2523         case LPAREN:
2524         case DOLLAR_ID:
2525           expression = Expression();
2526           break;
2527         case STRING:
2528         case OBJECT:
2529         case BOOL:
2530         case BOOLEAN:
2531         case REAL:
2532         case DOUBLE:
2533         case FLOAT:
2534         case INT:
2535         case INTEGER:
2536           expression = Type();
2537           break;
2538         default:
2539           jj_la1[70] = jj_gen;
2540           jj_consume_token(-1);
2541           throw new ParseException();
2542         }
2543         break;
2544       default:
2545         jj_la1[71] = jj_gen;
2546         ;
2547       }
2548       try {
2549         jj_consume_token(RBRACKET);
2550       } catch (ParseException e) {
2551     errorMessage = "']' expected";
2552     errorLevel   = ERROR;
2553     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2554     errorEnd   = SimpleCharStream.getPosition() + 1;
2555     {if (true) throw e;}
2556       }
2557    {if (true) return new ArrayDeclarator(prefix,expression,SimpleCharStream.getPosition());}
2558       break;
2559     default:
2560       jj_la1[72] = jj_gen;
2561       jj_consume_token(-1);
2562       throw new ParseException();
2563     }
2564     throw new Error("Missing return statement in function");
2565   }
2566
2567   static final public Literal Literal() throws ParseException {
2568   final Token token;
2569     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2570     case INTEGER_LITERAL:
2571       token = jj_consume_token(INTEGER_LITERAL);
2572                                     {if (true) return new NumberLiteral(token);}
2573       break;
2574     case FLOATING_POINT_LITERAL:
2575       token = jj_consume_token(FLOATING_POINT_LITERAL);
2576                                     {if (true) return new NumberLiteral(token);}
2577       break;
2578     case STRING_LITERAL:
2579       token = jj_consume_token(STRING_LITERAL);
2580                                     {if (true) return new StringLiteral(token);}
2581       break;
2582     case TRUE:
2583       token = jj_consume_token(TRUE);
2584                                     {if (true) return new TrueLiteral(token);}
2585       break;
2586     case FALSE:
2587       token = jj_consume_token(FALSE);
2588                                     {if (true) return new FalseLiteral(token);}
2589       break;
2590     case NULL:
2591       token = jj_consume_token(NULL);
2592                                     {if (true) return new NullLiteral(token);}
2593       break;
2594     default:
2595       jj_la1[73] = jj_gen;
2596       jj_consume_token(-1);
2597       throw new ParseException();
2598     }
2599     throw new Error("Missing return statement in function");
2600   }
2601
2602   static final public FunctionCall Arguments(final Expression func) throws ParseException {
2603 Expression[] args = null;
2604 final Token token;
2605     jj_consume_token(LPAREN);
2606     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2607     case ARRAY:
2608     case LIST:
2609     case PRINT:
2610     case NEW:
2611     case NULL:
2612     case TRUE:
2613     case FALSE:
2614     case AT:
2615     case DOLLAR:
2616     case BANG:
2617     case PLUS_PLUS:
2618     case MINUS_MINUS:
2619     case PLUS:
2620     case MINUS:
2621     case BIT_AND:
2622     case INTEGER_LITERAL:
2623     case FLOATING_POINT_LITERAL:
2624     case STRING_LITERAL:
2625     case IDENTIFIER:
2626     case LPAREN:
2627     case DOLLAR_ID:
2628       args = ArgumentList();
2629       break;
2630     default:
2631       jj_la1[74] = jj_gen;
2632       ;
2633     }
2634     try {
2635       token = jj_consume_token(RPAREN);
2636     } catch (ParseException e) {
2637     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected to close the argument list";
2638     errorLevel   = ERROR;
2639     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2640     errorEnd   = SimpleCharStream.getPosition() + 1;
2641     {if (true) throw e;}
2642     }
2643    {if (true) return new FunctionCall(func,args,token.sourceEnd);}
2644     throw new Error("Missing return statement in function");
2645   }
2646
2647 /**
2648  * An argument list is a list of arguments separated by comma :
2649  * argumentDeclaration() (, argumentDeclaration)*
2650  * @return an array of arguments
2651  */
2652   static final public Expression[] ArgumentList() throws ParseException {
2653 Expression arg;
2654 final ArrayList list = new ArrayList();
2655     arg = Expression();
2656    list.add(arg);
2657     label_20:
2658     while (true) {
2659       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2660       case COMMA:
2661         ;
2662         break;
2663       default:
2664         jj_la1[75] = jj_gen;
2665         break label_20;
2666       }
2667       jj_consume_token(COMMA);
2668       try {
2669         arg = Expression();
2670          list.add(arg);
2671       } catch (ParseException e) {
2672         errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. An expression expected after a comma in argument list";
2673         errorLevel   = ERROR;
2674         errorStart   = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2675         errorEnd     = SimpleCharStream.getPosition() + 1;
2676         {if (true) throw e;}
2677       }
2678     }
2679    final Expression[] arguments = new Expression[list.size()];
2680    list.toArray(arguments);
2681    {if (true) return arguments;}
2682     throw new Error("Missing return statement in function");
2683   }
2684
2685 /**
2686  * A Statement without break.
2687  * @return a statement
2688  */
2689   static final public Statement StatementNoBreak() throws ParseException {
2690   final Statement statement;
2691   Token token = null;
2692     if (jj_2_5(2)) {
2693       statement = expressionStatement();
2694                                          {if (true) return statement;}
2695     } else {
2696       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2697       case IDENTIFIER:
2698         statement = LabeledStatement();
2699                                          {if (true) return statement;}
2700         break;
2701       case LBRACE:
2702         statement = Block();
2703                                          {if (true) return statement;}
2704         break;
2705       case SEMICOLON:
2706         statement = EmptyStatement();
2707                                          {if (true) return statement;}
2708         break;
2709       case SWITCH:
2710         statement = SwitchStatement();
2711                                          {if (true) return statement;}
2712         break;
2713       case IF:
2714         statement = IfStatement();
2715                                          {if (true) return statement;}
2716         break;
2717       case WHILE:
2718         statement = WhileStatement();
2719                                          {if (true) return statement;}
2720         break;
2721       case DO:
2722         statement = DoStatement();
2723                                          {if (true) return statement;}
2724         break;
2725       case FOR:
2726         statement = ForStatement();
2727                                          {if (true) return statement;}
2728         break;
2729       case FOREACH:
2730         statement = ForeachStatement();
2731                                          {if (true) return statement;}
2732         break;
2733       case CONTINUE:
2734         statement = ContinueStatement();
2735                                          {if (true) return statement;}
2736         break;
2737       case RETURN:
2738         statement = ReturnStatement();
2739                                          {if (true) return statement;}
2740         break;
2741       case ECHO:
2742         statement = EchoStatement();
2743                                          {if (true) return statement;}
2744         break;
2745       case INCLUDE:
2746       case REQUIRE:
2747       case INCLUDE_ONCE:
2748       case REQUIRE_ONCE:
2749       case AT:
2750         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2751         case AT:
2752           token = jj_consume_token(AT);
2753           break;
2754         default:
2755           jj_la1[76] = jj_gen;
2756           ;
2757         }
2758         statement = IncludeStatement();
2759    if (token != null) {
2760     ((InclusionStatement)statement).silent = true;
2761     statement.sourceStart = token.sourceStart;
2762   }
2763   {if (true) return statement;}
2764         break;
2765       case STATIC:
2766         statement = StaticStatement();
2767                                          {if (true) return statement;}
2768         break;
2769       case GLOBAL:
2770         statement = GlobalStatement();
2771                                          {if (true) return statement;}
2772         break;
2773       case DEFINE:
2774         statement = defineStatement();
2775                                          currentSegment.add((Outlineable)statement);{if (true) return statement;}
2776         break;
2777       default:
2778         jj_la1[77] = jj_gen;
2779         jj_consume_token(-1);
2780         throw new ParseException();
2781       }
2782     }
2783     throw new Error("Missing return statement in function");
2784   }
2785
2786 /**
2787  * A statement expression.
2788  * expression ;
2789  * @return an expression
2790  */
2791   static final public Statement expressionStatement() throws ParseException {
2792   final Statement statement;
2793   final Token token;
2794     statement = Expression();
2795     try {
2796       token = jj_consume_token(SEMICOLON);
2797      statement.sourceEnd = token.sourceEnd;
2798     } catch (ParseException e) {
2799     if (e.currentToken.next.kind != PHPParserConstants.PHPEND) {
2800       errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
2801       errorLevel   = ERROR;
2802       errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2803       errorEnd   = SimpleCharStream.getPosition() + 1;
2804       {if (true) throw e;}
2805     }
2806     }
2807    {if (true) return statement;}
2808     throw new Error("Missing return statement in function");
2809   }
2810
2811   static final public Define defineStatement() throws ParseException {
2812   final int start = SimpleCharStream.getPosition();
2813   Expression defineName,defineValue;
2814     jj_consume_token(DEFINE);
2815     try {
2816       jj_consume_token(LPAREN);
2817     } catch (ParseException e) {
2818     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
2819     errorLevel   = ERROR;
2820     errorStart   = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2821     errorEnd     = SimpleCharStream.getPosition() + 1;
2822     processParseExceptionDebug(e);
2823     }
2824     try {
2825       defineName = Expression();
2826     } catch (ParseException e) {
2827     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2828     errorLevel   = ERROR;
2829     errorStart   = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2830     errorEnd     = SimpleCharStream.getPosition() + 1;
2831     {if (true) throw e;}
2832     }
2833     try {
2834       jj_consume_token(COMMA);
2835     } catch (ParseException e) {
2836     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
2837     errorLevel   = ERROR;
2838     errorStart   = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2839     errorEnd     = SimpleCharStream.getPosition() + 1;
2840     processParseExceptionDebug(e);
2841     }
2842     try {
2843       defineValue = Expression();
2844     } catch (ParseException e) {
2845     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
2846     errorLevel   = ERROR;
2847     errorStart   = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2848     errorEnd     = SimpleCharStream.getPosition() + 1;
2849     {if (true) throw e;}
2850     }
2851     try {
2852       jj_consume_token(RPAREN);
2853     } catch (ParseException e) {
2854     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
2855     errorLevel   = ERROR;
2856     errorStart   = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
2857     errorEnd     = SimpleCharStream.getPosition() + 1;
2858     processParseExceptionDebug(e);
2859     }
2860    {if (true) return new Define(currentSegment,
2861                      defineName,
2862                      defineValue,
2863                      start,
2864                      SimpleCharStream.getPosition());}
2865     throw new Error("Missing return statement in function");
2866   }
2867
2868 /**
2869  * A Normal statement.
2870  */
2871   static final public Statement Statement() throws ParseException {
2872   final Statement statement;
2873     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2874     case IF:
2875     case ARRAY:
2876     case LIST:
2877     case PRINT:
2878     case ECHO:
2879     case INCLUDE:
2880     case REQUIRE:
2881     case INCLUDE_ONCE:
2882     case REQUIRE_ONCE:
2883     case GLOBAL:
2884     case DEFINE:
2885     case STATIC:
2886     case CONTINUE:
2887     case DO:
2888     case FOR:
2889     case NEW:
2890     case NULL:
2891     case RETURN:
2892     case SWITCH:
2893     case TRUE:
2894     case FALSE:
2895     case WHILE:
2896     case FOREACH:
2897     case AT:
2898     case DOLLAR:
2899     case BANG:
2900     case PLUS_PLUS:
2901     case MINUS_MINUS:
2902     case PLUS:
2903     case MINUS:
2904     case BIT_AND:
2905     case INTEGER_LITERAL:
2906     case FLOATING_POINT_LITERAL:
2907     case STRING_LITERAL:
2908     case IDENTIFIER:
2909     case LPAREN:
2910     case LBRACE:
2911     case SEMICOLON:
2912     case DOLLAR_ID:
2913       statement = StatementNoBreak();
2914                                   {if (true) return statement;}
2915       break;
2916     case BREAK:
2917       statement = BreakStatement();
2918                                   {if (true) return statement;}
2919       break;
2920     default:
2921       jj_la1[78] = jj_gen;
2922       jj_consume_token(-1);
2923       throw new ParseException();
2924     }
2925     throw new Error("Missing return statement in function");
2926   }
2927
2928 /**
2929  * An html block inside a php syntax.
2930  */
2931   static final public HTMLBlock htmlBlock() throws ParseException {
2932   final int startIndex = nodePtr;
2933   final AstNode[] blockNodes;
2934   final int nbNodes;
2935     jj_consume_token(PHPEND);
2936     label_21:
2937     while (true) {
2938       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2939       case PHPECHOSTART:
2940         ;
2941         break;
2942       default:
2943         jj_la1[79] = jj_gen;
2944         break label_21;
2945       }
2946       phpEchoBlock();
2947     }
2948     try {
2949       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2950       case PHPSTARTLONG:
2951         jj_consume_token(PHPSTARTLONG);
2952         break;
2953       case PHPSTARTSHORT:
2954         jj_consume_token(PHPSTARTSHORT);
2955         break;
2956       default:
2957         jj_la1[80] = jj_gen;
2958         jj_consume_token(-1);
2959         throw new ParseException();
2960       }
2961     } catch (ParseException e) {
2962     errorMessage = "unexpected end of file , '<?php' expected";
2963     errorLevel   = ERROR;
2964     errorStart   = SimpleCharStream.getPosition();
2965     errorEnd     = SimpleCharStream.getPosition();
2966     {if (true) throw e;}
2967     }
2968   nbNodes    = nodePtr - startIndex;
2969   blockNodes = new AstNode[nbNodes];
2970   System.arraycopy(nodes,startIndex,blockNodes,0,nbNodes);
2971   nodePtr = startIndex;
2972   {if (true) return new HTMLBlock(blockNodes);}
2973     throw new Error("Missing return statement in function");
2974   }
2975
2976 /**
2977  * An include statement. It's "include" an expression;
2978  */
2979   static final public InclusionStatement IncludeStatement() throws ParseException {
2980   final Expression expr;
2981   final int keyword;
2982   final InclusionStatement inclusionStatement;
2983   final Token token, token2;
2984     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2985     case REQUIRE:
2986       token = jj_consume_token(REQUIRE);
2987                                  keyword = InclusionStatement.REQUIRE;
2988       break;
2989     case REQUIRE_ONCE:
2990       token = jj_consume_token(REQUIRE_ONCE);
2991                                  keyword = InclusionStatement.REQUIRE_ONCE;
2992       break;
2993     case INCLUDE:
2994       token = jj_consume_token(INCLUDE);
2995                                  keyword = InclusionStatement.INCLUDE;
2996       break;
2997     case INCLUDE_ONCE:
2998       token = jj_consume_token(INCLUDE_ONCE);
2999                                  keyword = InclusionStatement.INCLUDE_ONCE;
3000       break;
3001     default:
3002       jj_la1[81] = jj_gen;
3003       jj_consume_token(-1);
3004       throw new ParseException();
3005     }
3006     try {
3007       expr = Expression();
3008     } catch (ParseException e) {
3009     if (errorMessage != null) {
3010       {if (true) throw e;}
3011     }
3012     errorMessage = "unexpected token '"+ e.currentToken.next.image+"', expression expected";
3013     errorLevel   = ERROR;
3014     errorStart   = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3015     errorEnd     = SimpleCharStream.getPosition() + 1;
3016     {if (true) throw e;}
3017     }
3018    inclusionStatement = new InclusionStatement(currentSegment,
3019                                                keyword,
3020                                                expr,
3021                                                token.sourceStart);
3022    currentSegment.add(inclusionStatement);
3023     try {
3024       token2 = jj_consume_token(SEMICOLON);
3025     } catch (ParseException e) {
3026     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
3027     errorLevel   = ERROR;
3028     errorStart   = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3029     errorEnd     = SimpleCharStream.getPosition() + 1;
3030     {if (true) throw e;}
3031     }
3032    inclusionStatement.sourceEnd = token2.sourceEnd;
3033   {if (true) return inclusionStatement;}
3034     throw new Error("Missing return statement in function");
3035   }
3036
3037   static final public PrintExpression PrintExpression() throws ParseException {
3038   final Expression expr;
3039   final int pos = SimpleCharStream.getPosition();
3040     jj_consume_token(PRINT);
3041     expr = Expression();
3042                                {if (true) return new PrintExpression(expr,pos,SimpleCharStream.getPosition());}
3043     throw new Error("Missing return statement in function");
3044   }
3045
3046   static final public ListExpression ListExpression() throws ParseException {
3047   Expression expr = null;
3048   final Expression expression;
3049   final ArrayList list = new ArrayList();
3050   final int pos = SimpleCharStream.getPosition();
3051   final Token listToken;
3052     listToken = jj_consume_token(LIST);
3053     try {
3054       jj_consume_token(LPAREN);
3055     } catch (ParseException e) {
3056     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', '(' expected";
3057     errorLevel   = ERROR;
3058     errorStart   = listToken.sourceEnd+1;
3059     errorEnd     = listToken.sourceEnd+1;
3060     processParseExceptionDebug(e);
3061     }
3062     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3063     case DOLLAR:
3064     case DOLLAR_ID:
3065       expr = VariableDeclaratorId();
3066      list.add(expr);
3067       break;
3068     default:
3069       jj_la1[82] = jj_gen;
3070       ;
3071     }
3072    if (expr == null) list.add(null);
3073     label_22:
3074     while (true) {
3075       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3076       case COMMA:
3077         ;
3078         break;
3079       default:
3080         jj_la1[83] = jj_gen;
3081         break label_22;
3082       }
3083       try {
3084         jj_consume_token(COMMA);
3085       } catch (ParseException e) {
3086       errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ',' expected";
3087       errorLevel   = ERROR;
3088       errorStart   = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3089       errorEnd     = SimpleCharStream.getPosition() + 1;
3090       {if (true) throw e;}
3091       }
3092       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3093       case DOLLAR:
3094       case DOLLAR_ID:
3095         expr = VariableDeclaratorId();
3096                                     list.add(expr);
3097         break;
3098       default:
3099         jj_la1[84] = jj_gen;
3100         ;
3101       }
3102     }
3103     try {
3104       jj_consume_token(RPAREN);
3105     } catch (ParseException e) {
3106     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', ')' expected";
3107     errorLevel   = ERROR;
3108     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3109     errorEnd   = SimpleCharStream.getPosition() + 1;
3110     {if (true) throw e;}
3111     }
3112     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3113     case ASSIGN:
3114       jj_consume_token(ASSIGN);
3115       expression = Expression();
3116     final AbstractVariable[] vars = new AbstractVariable[list.size()];
3117     list.toArray(vars);
3118     {if (true) return new ListExpression(vars,
3119                               expression,
3120                               pos,
3121                               SimpleCharStream.getPosition());}
3122       break;
3123     default:
3124       jj_la1[85] = jj_gen;
3125       ;
3126     }
3127     final Variable[] vars = new Variable[list.size()];
3128     list.toArray(vars);
3129     {if (true) return new ListExpression(vars,pos,SimpleCharStream.getPosition());}
3130     throw new Error("Missing return statement in function");
3131   }
3132
3133 /**
3134  * An echo statement.
3135  * echo anyexpression (, otherexpression)*
3136  */
3137   static final public EchoStatement EchoStatement() throws ParseException {
3138   final ArrayList expressions = new ArrayList();
3139   Expression expr;
3140   Token token;
3141   Token token2 = null;
3142     token = jj_consume_token(ECHO);
3143     expr = Expression();
3144    expressions.add(expr);
3145     label_23:
3146     while (true) {
3147       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3148       case COMMA:
3149         ;
3150         break;
3151       default:
3152         jj_la1[86] = jj_gen;
3153         break label_23;
3154       }
3155       jj_consume_token(COMMA);
3156       expr = Expression();
3157      expressions.add(expr);
3158     }
3159     try {
3160       token2 = jj_consume_token(SEMICOLON);
3161     } catch (ParseException e) {
3162     if (e.currentToken.next.kind != 4) {
3163       errorMessage = "';' expected after 'echo' statement";
3164       errorLevel   = ERROR;
3165       errorStart   = e.currentToken.sourceEnd;
3166       errorEnd     = e.currentToken.sourceEnd;
3167       processParseExceptionDebug(e);
3168     }
3169     }
3170    final Expression[] exprs = new Expression[expressions.size()];
3171    expressions.toArray(exprs);
3172    if (token2 == null) {
3173      {if (true) return new EchoStatement(exprs,token.sourceStart, exprs[exprs.length-1].sourceEnd);}
3174    }
3175    {if (true) return new EchoStatement(exprs,token.sourceStart, token2.sourceEnd);}
3176     throw new Error("Missing return statement in function");
3177   }
3178
3179   static final public GlobalStatement GlobalStatement() throws ParseException {
3180    Variable expr;
3181    final ArrayList vars = new ArrayList();
3182    final GlobalStatement global;
3183    final Token token, token2;
3184     token = jj_consume_token(GLOBAL);
3185     expr = Variable();
3186      vars.add(expr);
3187     label_24:
3188     while (true) {
3189       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3190       case COMMA:
3191         ;
3192         break;
3193       default:
3194         jj_la1[87] = jj_gen;
3195         break label_24;
3196       }
3197       jj_consume_token(COMMA);
3198       expr = Variable();
3199      vars.add(expr);
3200     }
3201     try {
3202       token2 = jj_consume_token(SEMICOLON);
3203     final Variable[] variables = new Variable[vars.size()];
3204     vars.toArray(variables);
3205     global = new GlobalStatement(currentSegment,
3206                                  variables,
3207                                  token.sourceStart,
3208                                  token2.sourceEnd);
3209     currentSegment.add(global);
3210     {if (true) return global;}
3211     } catch (ParseException e) {
3212     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3213     errorLevel   = ERROR;
3214     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3215     errorEnd   = SimpleCharStream.getPosition() + 1;
3216     {if (true) throw e;}
3217     }
3218     throw new Error("Missing return statement in function");
3219   }
3220
3221   static final public StaticStatement StaticStatement() throws ParseException {
3222   final ArrayList vars = new ArrayList();
3223   VariableDeclaration expr;
3224   final Token token, token2;
3225     token = jj_consume_token(STATIC);
3226     expr = VariableDeclarator();
3227                                                 vars.add(expr);
3228     label_25:
3229     while (true) {
3230       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3231       case COMMA:
3232         ;
3233         break;
3234       default:
3235         jj_la1[88] = jj_gen;
3236         break label_25;
3237       }
3238       jj_consume_token(COMMA);
3239       expr = VariableDeclarator();
3240                                          vars.add(expr);
3241     }
3242     try {
3243       token2 = jj_consume_token(SEMICOLON);
3244     final VariableDeclaration[] variables = new VariableDeclaration[vars.size()];
3245     vars.toArray(variables);
3246     {if (true) return new StaticStatement(variables,
3247                                token.sourceStart,
3248                                token2.sourceEnd);}
3249     } catch (ParseException e) {
3250     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. a ';' was expected";
3251     errorLevel   = ERROR;
3252     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3253     errorEnd   = SimpleCharStream.getPosition() + 1;
3254     {if (true) throw e;}
3255     }
3256     throw new Error("Missing return statement in function");
3257   }
3258
3259   static final public LabeledStatement LabeledStatement() throws ParseException {
3260   final Token label;
3261   final Statement statement;
3262     label = jj_consume_token(IDENTIFIER);
3263     jj_consume_token(COLON);
3264     statement = Statement();
3265    {if (true) return new LabeledStatement(label.image,statement,label.sourceStart,statement.sourceEnd);}
3266     throw new Error("Missing return statement in function");
3267   }
3268
3269 /**
3270  * A Block is
3271  * {
3272  * statements
3273  * }.
3274  * @return a block
3275  */
3276   static final public Block Block() throws ParseException {
3277   final ArrayList list = new ArrayList();
3278   Statement statement;
3279   final Token token, token2;
3280     try {
3281       token = jj_consume_token(LBRACE);
3282     } catch (ParseException e) {
3283     errorMessage = "'{' expected";
3284     errorLevel   = ERROR;
3285     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3286     errorEnd   = SimpleCharStream.getPosition() + 1;
3287     {if (true) throw e;}
3288     }
3289     label_26:
3290     while (true) {
3291       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3292       case PHPEND:
3293       case CLASS:
3294       case FUNCTION:
3295       case IF:
3296       case ARRAY:
3297       case BREAK:
3298       case LIST:
3299       case PRINT:
3300       case ECHO:
3301       case INCLUDE:
3302       case REQUIRE:
3303       case INCLUDE_ONCE:
3304       case REQUIRE_ONCE:
3305       case GLOBAL:
3306       case DEFINE:
3307       case STATIC:
3308       case CONTINUE:
3309       case DO:
3310       case FOR:
3311       case NEW:
3312       case NULL:
3313       case RETURN:
3314       case SWITCH:
3315       case TRUE:
3316       case FALSE:
3317       case WHILE:
3318       case FOREACH:
3319       case AT:
3320       case DOLLAR:
3321       case BANG:
3322       case PLUS_PLUS:
3323       case MINUS_MINUS:
3324       case PLUS:
3325       case MINUS:
3326       case BIT_AND:
3327       case INTEGER_LITERAL:
3328       case FLOATING_POINT_LITERAL:
3329       case STRING_LITERAL:
3330       case IDENTIFIER:
3331       case LPAREN:
3332       case LBRACE:
3333       case SEMICOLON:
3334       case DOLLAR_ID:
3335         ;
3336         break;
3337       default:
3338         jj_la1[89] = jj_gen;
3339         break label_26;
3340       }
3341       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3342       case CLASS:
3343       case FUNCTION:
3344       case IF:
3345       case ARRAY:
3346       case BREAK:
3347       case LIST:
3348       case PRINT:
3349       case ECHO:
3350       case INCLUDE:
3351       case REQUIRE:
3352       case INCLUDE_ONCE:
3353       case REQUIRE_ONCE:
3354       case GLOBAL:
3355       case DEFINE:
3356       case STATIC:
3357       case CONTINUE:
3358       case DO:
3359       case FOR:
3360       case NEW:
3361       case NULL:
3362       case RETURN:
3363       case SWITCH:
3364       case TRUE:
3365       case FALSE:
3366       case WHILE:
3367       case FOREACH:
3368       case AT:
3369       case DOLLAR:
3370       case BANG:
3371       case PLUS_PLUS:
3372       case MINUS_MINUS:
3373       case PLUS:
3374       case MINUS:
3375       case BIT_AND:
3376       case INTEGER_LITERAL:
3377       case FLOATING_POINT_LITERAL:
3378       case STRING_LITERAL:
3379       case IDENTIFIER:
3380       case LPAREN:
3381       case LBRACE:
3382       case SEMICOLON:
3383       case DOLLAR_ID:
3384         statement = BlockStatement();
3385                                   list.add(statement);
3386         break;
3387       case PHPEND:
3388         statement = htmlBlock();
3389                                   list.add(statement);
3390         break;
3391       default:
3392         jj_la1[90] = jj_gen;
3393         jj_consume_token(-1);
3394         throw new ParseException();
3395       }
3396     }
3397     try {
3398       token2 = jj_consume_token(RBRACE);
3399     } catch (ParseException e) {
3400     errorMessage = "unexpected token : '"+ e.currentToken.image +"', '}' expected";
3401     errorLevel   = ERROR;
3402     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3403     errorEnd   = SimpleCharStream.getPosition() + 1;
3404     {if (true) throw e;}
3405     }
3406   final Statement[] statements = new Statement[list.size()];
3407   list.toArray(statements);
3408   {if (true) return new Block(statements,token.sourceStart,token2.sourceEnd);}
3409     throw new Error("Missing return statement in function");
3410   }
3411
3412   static final public Statement BlockStatement() throws ParseException {
3413   final Statement statement;
3414     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3415     case IF:
3416     case ARRAY:
3417     case BREAK:
3418     case LIST:
3419     case PRINT:
3420     case ECHO:
3421     case INCLUDE:
3422     case REQUIRE:
3423     case INCLUDE_ONCE:
3424     case REQUIRE_ONCE:
3425     case GLOBAL:
3426     case DEFINE:
3427     case STATIC:
3428     case CONTINUE:
3429     case DO:
3430     case FOR:
3431     case NEW:
3432     case NULL:
3433     case RETURN:
3434     case SWITCH:
3435     case TRUE:
3436     case FALSE:
3437     case WHILE:
3438     case FOREACH:
3439     case AT:
3440     case DOLLAR:
3441     case BANG:
3442     case PLUS_PLUS:
3443     case MINUS_MINUS:
3444     case PLUS:
3445     case MINUS:
3446     case BIT_AND:
3447     case INTEGER_LITERAL:
3448     case FLOATING_POINT_LITERAL:
3449     case STRING_LITERAL:
3450     case IDENTIFIER:
3451     case LPAREN:
3452     case LBRACE:
3453     case SEMICOLON:
3454     case DOLLAR_ID:
3455       try {
3456         statement = Statement();
3457                                      if (phpDocument == currentSegment) pushOnAstNodes(statement);
3458                                      {if (true) return statement;}
3459       } catch (ParseException e) {
3460     errorMessage = "unexpected token : '"+ e.currentToken.image +"', a statement was expected";
3461     errorLevel   = ERROR;
3462     errorStart = e.currentToken.sourceStart;
3463     errorEnd   = e.currentToken.sourceEnd;
3464     {if (true) throw e;}
3465       }
3466       break;
3467     case CLASS:
3468       statement = ClassDeclaration();
3469                                    {if (true) return statement;}
3470       break;
3471     case FUNCTION:
3472       statement = MethodDeclaration();
3473                                    if (phpDocument == currentSegment) pushOnAstNodes(statement);
3474                                    currentSegment.add((MethodDeclaration) statement);
3475                                    ((MethodDeclaration) statement).analyzeCode();
3476                                    {if (true) return statement;}
3477       break;
3478     default:
3479       jj_la1[91] = jj_gen;
3480       jj_consume_token(-1);
3481       throw new ParseException();
3482     }
3483     throw new Error("Missing return statement in function");
3484   }
3485
3486 /**
3487  * A Block statement that will not contain any 'break'
3488  */
3489   static final public Statement BlockStatementNoBreak() throws ParseException {
3490   final Statement statement;
3491     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3492     case IF:
3493     case ARRAY:
3494     case LIST:
3495     case PRINT:
3496     case ECHO:
3497     case INCLUDE:
3498     case REQUIRE:
3499     case INCLUDE_ONCE:
3500     case REQUIRE_ONCE:
3501     case GLOBAL:
3502     case DEFINE:
3503     case STATIC:
3504     case CONTINUE:
3505     case DO:
3506     case FOR:
3507     case NEW:
3508     case NULL:
3509     case RETURN:
3510     case SWITCH:
3511     case TRUE:
3512     case FALSE:
3513     case WHILE:
3514     case FOREACH:
3515     case AT:
3516     case DOLLAR:
3517     case BANG:
3518     case PLUS_PLUS:
3519     case MINUS_MINUS:
3520     case PLUS:
3521     case MINUS:
3522     case BIT_AND:
3523     case INTEGER_LITERAL:
3524     case FLOATING_POINT_LITERAL:
3525     case STRING_LITERAL:
3526     case IDENTIFIER:
3527     case LPAREN:
3528     case LBRACE:
3529     case SEMICOLON:
3530     case DOLLAR_ID:
3531       statement = StatementNoBreak();
3532                                    {if (true) return statement;}
3533       break;
3534     case CLASS:
3535       statement = ClassDeclaration();
3536                                    {if (true) return statement;}
3537       break;
3538     case FUNCTION:
3539       statement = MethodDeclaration();
3540                                    currentSegment.add((MethodDeclaration) statement);
3541                                    ((MethodDeclaration) statement).analyzeCode();
3542                                    {if (true) return statement;}
3543       break;
3544     default:
3545       jj_la1[92] = jj_gen;
3546       jj_consume_token(-1);
3547       throw new ParseException();
3548     }
3549     throw new Error("Missing return statement in function");
3550   }
3551
3552 /**
3553  * used only by ForInit()
3554  */
3555   static final public Expression[] LocalVariableDeclaration() throws ParseException {
3556   final ArrayList list = new ArrayList();
3557   Expression var;
3558     var = Expression();
3559    list.add(var);
3560     label_27:
3561     while (true) {
3562       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3563       case COMMA:
3564         ;
3565         break;
3566       default:
3567         jj_la1[93] = jj_gen;
3568         break label_27;
3569       }
3570       jj_consume_token(COMMA);
3571       var = Expression();
3572                                 list.add(var);
3573     }
3574     final Expression[] vars = new Expression[list.size()];
3575     list.toArray(vars);
3576     {if (true) return vars;}
3577     throw new Error("Missing return statement in function");
3578   }
3579
3580 /**
3581  * used only by LocalVariableDeclaration().
3582  */
3583   static final public VariableDeclaration LocalVariableDeclarator() throws ParseException {
3584   final Variable varName;
3585   Expression initializer = null;
3586     varName = Variable();
3587     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3588     case ASSIGN:
3589       jj_consume_token(ASSIGN);
3590       initializer = Expression();
3591       break;
3592     default:
3593       jj_la1[94] = jj_gen;
3594       ;
3595     }
3596    if (initializer == null) {
3597     {if (true) return new VariableDeclaration(currentSegment,
3598                                    varName,
3599                                    varName.sourceStart,
3600                                    varName.sourceEnd);}
3601    }
3602     {if (true) return new VariableDeclaration(currentSegment,
3603                                    varName,
3604                                    initializer,
3605                                    VariableDeclaration.EQUAL,
3606                                    varName.sourceStart);}
3607     throw new Error("Missing return statement in function");
3608   }
3609
3610   static final public EmptyStatement EmptyStatement() throws ParseException {
3611   final Token token;
3612     token = jj_consume_token(SEMICOLON);
3613    {if (true) return new EmptyStatement(token.sourceStart,token.sourceEnd);}
3614     throw new Error("Missing return statement in function");
3615   }
3616
3617 /**
3618  * used only by StatementExpressionList() which is used only by ForInit() and ForStatement()
3619  */
3620   static final public Expression StatementExpression() throws ParseException {
3621   final Expression expr;
3622     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3623     case PLUS_PLUS:
3624     case MINUS_MINUS:
3625       expr = PreIncDecExpression();
3626                                 {if (true) return expr;}
3627       break;
3628     case ARRAY:
3629     case NEW:
3630     case DOLLAR:
3631     case BIT_AND:
3632     case IDENTIFIER:
3633     case DOLLAR_ID:
3634       expr = PrimaryExpression();
3635       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3636       case PLUS_PLUS:
3637       case MINUS_MINUS:
3638         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3639         case PLUS_PLUS:
3640           jj_consume_token(PLUS_PLUS);
3641                  {if (true) return new PostfixedUnaryExpression(expr,
3642                                                      OperatorIds.PLUS_PLUS,
3643                                                      SimpleCharStream.getPosition());}
3644           break;
3645         case MINUS_MINUS:
3646           jj_consume_token(MINUS_MINUS);
3647                    {if (true) return new PostfixedUnaryExpression(expr,
3648                                                        OperatorIds.MINUS_MINUS,
3649                                                        SimpleCharStream.getPosition());}
3650           break;
3651         default:
3652           jj_la1[95] = jj_gen;
3653           jj_consume_token(-1);
3654           throw new ParseException();
3655         }
3656         break;
3657       default:
3658         jj_la1[96] = jj_gen;
3659         ;
3660       }
3661    {if (true) return expr;}
3662       break;
3663     default:
3664       jj_la1[97] = jj_gen;
3665       jj_consume_token(-1);
3666       throw new ParseException();
3667     }
3668     throw new Error("Missing return statement in function");
3669   }
3670
3671   static final public SwitchStatement SwitchStatement() throws ParseException {
3672   final Expression variable;
3673   final AbstractCase[] cases;
3674   final int pos = SimpleCharStream.getPosition();
3675   final Token switchToken;
3676     switchToken = jj_consume_token(SWITCH);
3677     try {
3678       jj_consume_token(LPAREN);
3679     } catch (ParseException e) {
3680     errorMessage = "'(' expected after 'switch'";
3681     errorLevel   = ERROR;
3682     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3683     errorEnd   = SimpleCharStream.getPosition() + 1;
3684     {if (true) throw e;}
3685     }
3686     try {
3687       variable = Expression();
3688     } catch (ParseException e) {
3689     if (errorMessage != null) {
3690       {if (true) throw e;}
3691     }
3692     errorMessage = "expression expected";
3693     errorLevel   = ERROR;
3694     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3695     errorEnd   = SimpleCharStream.getPosition() + 1;
3696     {if (true) throw e;}
3697     }
3698     try {
3699       jj_consume_token(RPAREN);
3700     } catch (ParseException e) {
3701     errorMessage = "')' expected";
3702     errorLevel   = ERROR;
3703     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3704     errorEnd   = SimpleCharStream.getPosition() + 1;
3705     {if (true) throw e;}
3706     }
3707     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3708     case LBRACE:
3709       cases = switchStatementBrace();
3710       break;
3711     case COLON:
3712       cases = switchStatementColon(switchToken.sourceStart, switchToken.sourceEnd);
3713       break;
3714     default:
3715       jj_la1[98] = jj_gen;
3716       jj_consume_token(-1);
3717       throw new ParseException();
3718     }
3719    {if (true) return new SwitchStatement(variable,cases,switchToken.sourceStart,SimpleCharStream.getPosition());}
3720     throw new Error("Missing return statement in function");
3721   }
3722
3723   static final public AbstractCase[] switchStatementBrace() throws ParseException {
3724   AbstractCase cas;
3725   final ArrayList cases = new ArrayList();
3726     jj_consume_token(LBRACE);
3727     label_28:
3728     while (true) {
3729       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3730       case CASE:
3731       case _DEFAULT:
3732         ;
3733         break;
3734       default:
3735         jj_la1[99] = jj_gen;
3736         break label_28;
3737       }
3738       cas = switchLabel0();
3739                          cases.add(cas);
3740     }
3741     try {
3742       jj_consume_token(RBRACE);
3743     final AbstractCase[] abcase = new AbstractCase[cases.size()];
3744     cases.toArray(abcase);
3745     {if (true) return abcase;}
3746     } catch (ParseException e) {
3747     errorMessage = "'}' expected";
3748     errorLevel   = ERROR;
3749     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3750     errorEnd   = SimpleCharStream.getPosition() + 1;
3751     {if (true) throw e;}
3752     }
3753     throw new Error("Missing return statement in function");
3754   }
3755
3756 /**
3757  * A Switch statement with : ... endswitch;
3758  * @param start the begin offset of the switch
3759  * @param end the end offset of the switch
3760  */
3761   static final public AbstractCase[] switchStatementColon(final int start, final int end) throws ParseException {
3762   AbstractCase cas;
3763   final ArrayList cases = new ArrayList();
3764     jj_consume_token(COLON);
3765    try {
3766   setMarker(fileToParse,
3767             "Ugly syntax detected, you should switch () {...} instead of switch (): ... enswitch;",
3768             start,
3769             end,
3770             INFO,
3771             "Line " + token.beginLine);
3772   } catch (CoreException e) {
3773     PHPeclipsePlugin.log(e);
3774   }
3775     label_29:
3776     while (true) {
3777       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3778       case CASE:
3779       case _DEFAULT:
3780         ;
3781         break;
3782       default:
3783         jj_la1[100] = jj_gen;
3784         break label_29;
3785       }
3786       cas = switchLabel0();
3787                           cases.add(cas);
3788     }
3789     try {
3790       jj_consume_token(ENDSWITCH);
3791     } catch (ParseException e) {
3792     errorMessage = "'endswitch' expected";
3793     errorLevel   = ERROR;
3794     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3795     errorEnd   = SimpleCharStream.getPosition() + 1;
3796     {if (true) throw e;}
3797     }
3798     try {
3799       jj_consume_token(SEMICOLON);
3800     final AbstractCase[] abcase = new AbstractCase[cases.size()];
3801     cases.toArray(abcase);
3802     {if (true) return abcase;}
3803     } catch (ParseException e) {
3804     errorMessage = "';' expected after 'endswitch' keyword";
3805     errorLevel   = ERROR;
3806     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
3807     errorEnd   = SimpleCharStream.getPosition() + 1;
3808     {if (true) throw e;}
3809     }
3810     throw new Error("Missing return statement in function");
3811   }
3812
3813   static final public AbstractCase switchLabel0() throws ParseException {
3814   final Expression expr;
3815   Statement statement;
3816   final ArrayList stmts = new ArrayList();
3817   final int pos = SimpleCharStream.getPosition();
3818     expr = SwitchLabel();
3819     label_30:
3820     while (true) {
3821       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3822       case PHPEND:
3823       case CLASS:
3824       case FUNCTION:
3825       case IF:
3826       case ARRAY:
3827       case LIST:
3828       case PRINT:
3829       case ECHO:
3830       case INCLUDE:
3831       case REQUIRE:
3832       case INCLUDE_ONCE:
3833       case REQUIRE_ONCE:
3834       case GLOBAL:
3835       case DEFINE:
3836       case STATIC:
3837       case CONTINUE:
3838       case DO:
3839       case FOR:
3840       case NEW:
3841       case NULL:
3842       case RETURN:
3843       case SWITCH:
3844       case TRUE:
3845       case FALSE:
3846       case WHILE:
3847       case FOREACH:
3848       case AT:
3849       case DOLLAR:
3850       case BANG:
3851       case PLUS_PLUS:
3852       case MINUS_MINUS:
3853       case PLUS:
3854       case MINUS:
3855       case BIT_AND:
3856       case INTEGER_LITERAL:
3857       case FLOATING_POINT_LITERAL:
3858       case STRING_LITERAL:
3859       case IDENTIFIER:
3860       case LPAREN:
3861       case LBRACE:
3862       case SEMICOLON:
3863       case DOLLAR_ID:
3864         ;
3865         break;
3866       default:
3867         jj_la1[101] = jj_gen;
3868         break label_30;
3869       }
3870       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3871       case CLASS:
3872       case FUNCTION:
3873       case IF:
3874       case ARRAY:
3875       case LIST:
3876       case PRINT:
3877       case ECHO:
3878       case INCLUDE:
3879       case REQUIRE:
3880       case INCLUDE_ONCE:
3881       case REQUIRE_ONCE:
3882       case GLOBAL:
3883       case DEFINE:
3884       case STATIC:
3885       case CONTINUE:
3886       case DO:
3887       case FOR:
3888       case NEW:
3889       case NULL:
3890       case RETURN:
3891       case SWITCH:
3892       case TRUE:
3893       case FALSE:
3894       case WHILE:
3895       case FOREACH:
3896       case AT:
3897       case DOLLAR:
3898       case BANG:
3899       case PLUS_PLUS:
3900       case MINUS_MINUS:
3901       case PLUS:
3902       case MINUS:
3903       case BIT_AND:
3904       case INTEGER_LITERAL:
3905       case FLOATING_POINT_LITERAL:
3906       case STRING_LITERAL:
3907       case IDENTIFIER:
3908       case LPAREN:
3909       case LBRACE:
3910       case SEMICOLON:
3911       case DOLLAR_ID:
3912         statement = BlockStatementNoBreak();
3913                                          stmts.add(statement);
3914         break;
3915       case PHPEND:
3916         statement = htmlBlock();
3917                                          stmts.add(statement);
3918         break;
3919       default:
3920         jj_la1[102] = jj_gen;
3921         jj_consume_token(-1);
3922         throw new ParseException();
3923       }
3924     }
3925     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3926     case BREAK:
3927       statement = BreakStatement();
3928                                          stmts.add(statement);
3929       break;
3930     default:
3931       jj_la1[103] = jj_gen;
3932       ;
3933     }
3934   final Statement[] stmtsArray = new Statement[stmts.size()];
3935   stmts.toArray(stmtsArray);
3936   if (expr == null) {//it's a default
3937     {if (true) return new DefaultCase(stmtsArray,pos,SimpleCharStream.getPosition());}
3938   }
3939   {if (true) return new Case(expr,stmtsArray,pos,SimpleCharStream.getPosition());}
3940     throw new Error("Missing return statement in function");
3941   }
3942
3943 /**
3944  * A SwitchLabel.
3945  * case Expression() :
3946  * default :
3947  * @return the if it was a case and null if not
3948  */
3949   static final public Expression SwitchLabel() throws ParseException {
3950   final Expression expr;
3951     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3952     case CASE:
3953       token = jj_consume_token(CASE);
3954       try {
3955         expr = Expression();
3956       } catch (ParseException e) {
3957     if (errorMessage != null) {if (true) throw e;}
3958     errorMessage = "expression expected after 'case' keyword";
3959     errorLevel   = ERROR;
3960     errorStart = token.sourceEnd +1;
3961     errorEnd   = token.sourceEnd +1;
3962     {if (true) throw e;}
3963       }
3964       try {
3965         token = jj_consume_token(COLON);
3966      {if (true) return expr;}
3967       } catch (ParseException e) {
3968     errorMessage = "':' expected after case expression";
3969     errorLevel   = ERROR;
3970     errorStart = expr.sourceEnd+1;
3971     errorEnd   = expr.sourceEnd+1;
3972     processParseExceptionDebug(e);
3973       }
3974       break;
3975     case _DEFAULT:
3976       token = jj_consume_token(_DEFAULT);
3977       try {
3978         jj_consume_token(COLON);
3979      {if (true) return null;}
3980       } catch (ParseException e) {
3981     errorMessage = "':' expected after 'default' keyword";
3982     errorLevel   = ERROR;
3983     errorStart = token.sourceEnd+1;
3984     errorEnd   = token.sourceEnd+1;
3985     processParseExceptionDebug(e);
3986       }
3987       break;
3988     default:
3989       jj_la1[104] = jj_gen;
3990       jj_consume_token(-1);
3991       throw new ParseException();
3992     }
3993     throw new Error("Missing return statement in function");
3994   }
3995
3996   static final public Break BreakStatement() throws ParseException {
3997   Expression expression = null;
3998   final Token token, token2;
3999     token = jj_consume_token(BREAK);
4000     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4001     case ARRAY:
4002     case LIST:
4003     case PRINT:
4004     case NEW:
4005     case NULL:
4006     case TRUE:
4007     case FALSE:
4008     case AT:
4009     case DOLLAR:
4010     case BANG:
4011     case PLUS_PLUS:
4012     case MINUS_MINUS:
4013     case PLUS:
4014     case MINUS:
4015     case BIT_AND:
4016     case INTEGER_LITERAL:
4017     case FLOATING_POINT_LITERAL:
4018     case STRING_LITERAL:
4019     case IDENTIFIER:
4020     case LPAREN:
4021     case DOLLAR_ID:
4022       expression = Expression();
4023       break;
4024     default:
4025       jj_la1[105] = jj_gen;
4026       ;
4027     }
4028     try {
4029       token2 = jj_consume_token(SEMICOLON);
4030     } catch (ParseException e) {
4031     errorMessage = "';' expected after 'break' keyword";
4032     errorLevel   = ERROR;
4033     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4034     errorEnd   = SimpleCharStream.getPosition() + 1;
4035     {if (true) throw e;}
4036     }
4037    {if (true) return new Break(expression, token.sourceStart, token2.sourceEnd);}
4038     throw new Error("Missing return statement in function");
4039   }
4040
4041   static final public IfStatement IfStatement() throws ParseException {
4042   final Expression condition;
4043   final IfStatement ifStatement;
4044   Token token;
4045     token = jj_consume_token(IF);
4046     condition = Condition("if");
4047     ifStatement = IfStatement0(condition,token.sourceStart,token.sourceEnd);
4048    {if (true) return ifStatement;}
4049     throw new Error("Missing return statement in function");
4050   }
4051
4052   static final public Expression Condition(final String keyword) throws ParseException {
4053   final Expression condition;
4054     try {
4055       jj_consume_token(LPAREN);
4056     } catch (ParseException e) {
4057     errorMessage = "'(' expected after " + keyword + " keyword";
4058     errorLevel   = ERROR;
4059     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length();
4060     errorEnd   = errorStart +1;
4061     processParseExceptionDebug(e);
4062     }
4063     condition = Expression();
4064     try {
4065       jj_consume_token(RPAREN);
4066     } catch (ParseException e) {
4067     errorMessage = "')' expected after " + keyword + " keyword";
4068     errorLevel   = ERROR;
4069     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4070     errorEnd   = SimpleCharStream.getPosition() + 1;
4071     processParseExceptionDebug(e);
4072     }
4073    {if (true) return condition;}
4074     throw new Error("Missing return statement in function");
4075   }
4076
4077   static final public IfStatement IfStatement0(final Expression condition, final int start,final int end) throws ParseException {
4078   Statement statement;
4079   final Statement stmt;
4080   final Statement[] statementsArray;
4081   ElseIf elseifStatement;
4082   Else elseStatement = null;
4083   final ArrayList stmts;
4084   final ArrayList elseIfList = new ArrayList();
4085   final ElseIf[] elseIfs;
4086   int pos = SimpleCharStream.getPosition();
4087   final int endStatements;
4088     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4089     case COLON:
4090       jj_consume_token(COLON);
4091    stmts = new ArrayList();
4092       label_31:
4093       while (true) {
4094         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4095         case PHPEND:
4096         case IF:
4097         case ARRAY:
4098         case BREAK:
4099         case LIST:
4100         case PRINT:
4101         case ECHO:
4102         case INCLUDE:
4103         case REQUIRE:
4104         case INCLUDE_ONCE:
4105         case REQUIRE_ONCE:
4106         case GLOBAL:
4107         case DEFINE:
4108         case STATIC:
4109         case CONTINUE:
4110         case DO:
4111         case FOR:
4112         case NEW:
4113         case NULL:
4114         case RETURN:
4115         case SWITCH:
4116         case TRUE:
4117         case FALSE:
4118         case WHILE:
4119         case FOREACH:
4120         case AT:
4121         case DOLLAR:
4122         case BANG:
4123         case PLUS_PLUS:
4124         case MINUS_MINUS:
4125         case PLUS:
4126         case MINUS:
4127         case BIT_AND:
4128         case INTEGER_LITERAL:
4129         case FLOATING_POINT_LITERAL:
4130         case STRING_LITERAL:
4131         case IDENTIFIER:
4132         case LPAREN:
4133         case LBRACE:
4134         case SEMICOLON:
4135         case DOLLAR_ID:
4136           ;
4137           break;
4138         default:
4139           jj_la1[106] = jj_gen;
4140           break label_31;
4141         }
4142         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4143         case IF:
4144         case ARRAY:
4145         case BREAK:
4146         case LIST:
4147         case PRINT:
4148         case ECHO:
4149         case INCLUDE:
4150         case REQUIRE:
4151         case INCLUDE_ONCE:
4152         case REQUIRE_ONCE:
4153         case GLOBAL:
4154         case DEFINE:
4155         case STATIC:
4156         case CONTINUE:
4157         case DO:
4158         case FOR:
4159         case NEW:
4160         case NULL:
4161         case RETURN:
4162         case SWITCH:
4163         case TRUE:
4164         case FALSE:
4165         case WHILE:
4166         case FOREACH:
4167         case AT:
4168         case DOLLAR:
4169         case BANG:
4170         case PLUS_PLUS:
4171         case MINUS_MINUS:
4172         case PLUS:
4173         case MINUS:
4174         case BIT_AND:
4175         case INTEGER_LITERAL:
4176         case FLOATING_POINT_LITERAL:
4177         case STRING_LITERAL:
4178         case IDENTIFIER:
4179         case LPAREN:
4180         case LBRACE:
4181         case SEMICOLON:
4182         case DOLLAR_ID:
4183           statement = Statement();
4184                               stmts.add(statement);
4185           break;
4186         case PHPEND:
4187           statement = htmlBlock();
4188                               stmts.add(statement);
4189           break;
4190         default:
4191           jj_la1[107] = jj_gen;
4192           jj_consume_token(-1);
4193           throw new ParseException();
4194         }
4195       }
4196     endStatements = SimpleCharStream.getPosition();
4197       label_32:
4198       while (true) {
4199         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4200         case ELSEIF:
4201           ;
4202           break;
4203         default:
4204           jj_la1[108] = jj_gen;
4205           break label_32;
4206         }
4207         elseifStatement = ElseIfStatementColon();
4208                                               elseIfList.add(elseifStatement);
4209       }
4210       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4211       case ELSE:
4212         elseStatement = ElseStatementColon();
4213         break;
4214       default:
4215         jj_la1[109] = jj_gen;
4216         ;
4217       }
4218    try {
4219   setMarker(fileToParse,
4220             "Ugly syntax detected, you should if () {...} instead of if (): ... endif;",
4221             start,
4222             end,
4223             INFO,
4224             "Line " + token.beginLine);
4225   } catch (CoreException e) {
4226     PHPeclipsePlugin.log(e);
4227   }
4228       try {
4229         jj_consume_token(ENDIF);
4230       } catch (ParseException e) {
4231     errorMessage = "'endif' expected";
4232     errorLevel   = ERROR;
4233     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4234     errorEnd   = SimpleCharStream.getPosition() + 1;
4235     {if (true) throw e;}
4236       }
4237       try {
4238         jj_consume_token(SEMICOLON);
4239       } catch (ParseException e) {
4240     errorMessage = "';' expected after 'endif' keyword";
4241     errorLevel   = ERROR;
4242     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4243     errorEnd   = SimpleCharStream.getPosition() + 1;
4244     {if (true) throw e;}
4245       }
4246     elseIfs = new ElseIf[elseIfList.size()];
4247     elseIfList.toArray(elseIfs);
4248     if (stmts.size() == 1) {
4249       {if (true) return new IfStatement(condition,
4250                              (Statement) stmts.get(0),
4251                               elseIfs,
4252                               elseStatement,
4253                               pos,
4254                               SimpleCharStream.getPosition());}
4255     } else {
4256       statementsArray = new Statement[stmts.size()];
4257       stmts.toArray(statementsArray);
4258       {if (true) return new IfStatement(condition,
4259                              new Block(statementsArray,pos,endStatements),
4260                              elseIfs,
4261                              elseStatement,
4262                              pos,
4263                              SimpleCharStream.getPosition());}
4264     }
4265       break;
4266     case PHPEND:
4267     case IF:
4268     case ARRAY:
4269     case BREAK:
4270     case LIST:
4271     case PRINT:
4272     case ECHO:
4273     case INCLUDE:
4274     case REQUIRE:
4275     case INCLUDE_ONCE:
4276     case REQUIRE_ONCE:
4277     case GLOBAL:
4278     case DEFINE:
4279     case STATIC:
4280     case CONTINUE:
4281     case DO:
4282     case FOR:
4283     case NEW:
4284     case NULL:
4285     case RETURN:
4286     case SWITCH:
4287     case TRUE:
4288     case FALSE:
4289     case WHILE:
4290     case FOREACH:
4291     case AT:
4292     case DOLLAR:
4293     case BANG:
4294     case PLUS_PLUS:
4295     case MINUS_MINUS:
4296     case PLUS:
4297     case MINUS:
4298     case BIT_AND:
4299     case INTEGER_LITERAL:
4300     case FLOATING_POINT_LITERAL:
4301     case STRING_LITERAL:
4302     case IDENTIFIER:
4303     case LPAREN:
4304     case LBRACE:
4305     case SEMICOLON:
4306     case DOLLAR_ID:
4307       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4308       case IF:
4309       case ARRAY:
4310       case BREAK:
4311       case LIST:
4312       case PRINT:
4313       case ECHO:
4314       case INCLUDE:
4315       case REQUIRE:
4316       case INCLUDE_ONCE:
4317       case REQUIRE_ONCE:
4318       case GLOBAL:
4319       case DEFINE:
4320       case STATIC:
4321       case CONTINUE:
4322       case DO:
4323       case FOR:
4324       case NEW:
4325       case NULL:
4326       case RETURN:
4327       case SWITCH:
4328       case TRUE:
4329       case FALSE:
4330       case WHILE:
4331       case FOREACH:
4332       case AT:
4333       case DOLLAR:
4334       case BANG:
4335       case PLUS_PLUS:
4336       case MINUS_MINUS:
4337       case PLUS:
4338       case MINUS:
4339       case BIT_AND:
4340       case INTEGER_LITERAL:
4341       case FLOATING_POINT_LITERAL:
4342       case STRING_LITERAL:
4343       case IDENTIFIER:
4344       case LPAREN:
4345       case LBRACE:
4346       case SEMICOLON:
4347       case DOLLAR_ID:
4348         stmt = Statement();
4349         break;
4350       case PHPEND:
4351         stmt = htmlBlock();
4352         break;
4353       default:
4354         jj_la1[110] = jj_gen;
4355         jj_consume_token(-1);
4356         throw new ParseException();
4357       }
4358       label_33:
4359       while (true) {
4360         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4361         case ELSEIF:
4362           ;
4363           break;
4364         default:
4365           jj_la1[111] = jj_gen;
4366           break label_33;
4367         }
4368         elseifStatement = ElseIfStatement();
4369                                                       elseIfList.add(elseifStatement);
4370       }
4371       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4372       case ELSE:
4373         jj_consume_token(ELSE);
4374         try {
4375        pos = SimpleCharStream.getPosition();
4376           statement = Statement();
4377        elseStatement = new Else(statement,pos,SimpleCharStream.getPosition());
4378         } catch (ParseException e) {
4379       if (errorMessage != null) {
4380         {if (true) throw e;}
4381       }
4382       errorMessage = "unexpected token '"+e.currentToken.next.image+"', a statement was expected";
4383       errorLevel   = ERROR;
4384       errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4385       errorEnd   = SimpleCharStream.getPosition() + 1;
4386       {if (true) throw e;}
4387         }
4388         break;
4389       default:
4390         jj_la1[112] = jj_gen;
4391         ;
4392       }
4393     elseIfs = new ElseIf[elseIfList.size()];
4394     elseIfList.toArray(elseIfs);
4395     {if (true) return new IfStatement(condition,
4396                            stmt,
4397                            elseIfs,
4398                            elseStatement,
4399                            pos,
4400                            SimpleCharStream.getPosition());}
4401       break;
4402     default:
4403       jj_la1[113] = jj_gen;
4404       jj_consume_token(-1);
4405       throw new ParseException();
4406     }
4407     throw new Error("Missing return statement in function");
4408   }
4409
4410   static final public ElseIf ElseIfStatementColon() throws ParseException {
4411   final Expression condition;
4412   Statement statement;
4413   final ArrayList list = new ArrayList();
4414   final int pos = SimpleCharStream.getPosition();
4415     jj_consume_token(ELSEIF);
4416     condition = Condition("elseif");
4417     jj_consume_token(COLON);
4418     label_34:
4419     while (true) {
4420       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4421       case PHPEND:
4422       case IF:
4423       case ARRAY:
4424       case BREAK:
4425       case LIST:
4426       case PRINT:
4427       case ECHO:
4428       case INCLUDE:
4429       case REQUIRE:
4430       case INCLUDE_ONCE:
4431       case REQUIRE_ONCE:
4432       case GLOBAL:
4433       case DEFINE:
4434       case STATIC:
4435       case CONTINUE:
4436       case DO:
4437       case FOR:
4438       case NEW:
4439       case NULL:
4440       case RETURN:
4441       case SWITCH:
4442       case TRUE:
4443       case FALSE:
4444       case WHILE:
4445       case FOREACH:
4446       case AT:
4447       case DOLLAR:
4448       case BANG:
4449       case PLUS_PLUS:
4450       case MINUS_MINUS:
4451       case PLUS:
4452       case MINUS:
4453       case BIT_AND:
4454       case INTEGER_LITERAL:
4455       case FLOATING_POINT_LITERAL:
4456       case STRING_LITERAL:
4457       case IDENTIFIER:
4458       case LPAREN:
4459       case LBRACE:
4460       case SEMICOLON:
4461       case DOLLAR_ID:
4462         ;
4463         break;
4464       default:
4465         jj_la1[114] = jj_gen;
4466         break label_34;
4467       }
4468       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4469       case IF:
4470       case ARRAY:
4471       case BREAK:
4472       case LIST:
4473       case PRINT:
4474       case ECHO:
4475       case INCLUDE:
4476       case REQUIRE:
4477       case INCLUDE_ONCE:
4478       case REQUIRE_ONCE:
4479       case GLOBAL:
4480       case DEFINE:
4481       case STATIC:
4482       case CONTINUE:
4483       case DO:
4484       case FOR:
4485       case NEW:
4486       case NULL:
4487       case RETURN:
4488       case SWITCH:
4489       case TRUE:
4490       case FALSE:
4491       case WHILE:
4492       case FOREACH:
4493       case AT:
4494       case DOLLAR:
4495       case BANG:
4496       case PLUS_PLUS:
4497       case MINUS_MINUS:
4498       case PLUS:
4499       case MINUS:
4500       case BIT_AND:
4501       case INTEGER_LITERAL:
4502       case FLOATING_POINT_LITERAL:
4503       case STRING_LITERAL:
4504       case IDENTIFIER:
4505       case LPAREN:
4506       case LBRACE:
4507       case SEMICOLON:
4508       case DOLLAR_ID:
4509         statement = Statement();
4510                                       list.add(statement);
4511         break;
4512       case PHPEND:
4513         statement = htmlBlock();
4514                                       list.add(statement);
4515         break;
4516       default:
4517         jj_la1[115] = jj_gen;
4518         jj_consume_token(-1);
4519         throw new ParseException();
4520       }
4521     }
4522   final Statement[] stmtsArray = new Statement[list.size()];
4523   list.toArray(stmtsArray);
4524   {if (true) return new ElseIf(condition,stmtsArray ,pos,SimpleCharStream.getPosition());}
4525     throw new Error("Missing return statement in function");
4526   }
4527
4528   static final public Else ElseStatementColon() throws ParseException {
4529   Statement statement;
4530   final ArrayList list = new ArrayList();
4531   final int pos = SimpleCharStream.getPosition();
4532     jj_consume_token(ELSE);
4533     jj_consume_token(COLON);
4534     label_35:
4535     while (true) {
4536       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4537       case PHPEND:
4538       case IF:
4539       case ARRAY:
4540       case BREAK:
4541       case LIST:
4542       case PRINT:
4543       case ECHO:
4544       case INCLUDE:
4545       case REQUIRE:
4546       case INCLUDE_ONCE:
4547       case REQUIRE_ONCE:
4548       case GLOBAL:
4549       case DEFINE:
4550       case STATIC:
4551       case CONTINUE:
4552       case DO:
4553       case FOR:
4554       case NEW:
4555       case NULL:
4556       case RETURN:
4557       case SWITCH:
4558       case TRUE:
4559       case FALSE:
4560       case WHILE:
4561       case FOREACH:
4562       case AT:
4563       case DOLLAR:
4564       case BANG:
4565       case PLUS_PLUS:
4566       case MINUS_MINUS:
4567       case PLUS:
4568       case MINUS:
4569       case BIT_AND:
4570       case INTEGER_LITERAL:
4571       case FLOATING_POINT_LITERAL:
4572       case STRING_LITERAL:
4573       case IDENTIFIER:
4574       case LPAREN:
4575       case LBRACE:
4576       case SEMICOLON:
4577       case DOLLAR_ID:
4578         ;
4579         break;
4580       default:
4581         jj_la1[116] = jj_gen;
4582         break label_35;
4583       }
4584       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4585       case IF:
4586       case ARRAY:
4587       case BREAK:
4588       case LIST:
4589       case PRINT:
4590       case ECHO:
4591       case INCLUDE:
4592       case REQUIRE:
4593       case INCLUDE_ONCE:
4594       case REQUIRE_ONCE:
4595       case GLOBAL:
4596       case DEFINE:
4597       case STATIC:
4598       case CONTINUE:
4599       case DO:
4600       case FOR:
4601       case NEW:
4602       case NULL:
4603       case RETURN:
4604       case SWITCH:
4605       case TRUE:
4606       case FALSE:
4607       case WHILE:
4608       case FOREACH:
4609       case AT:
4610       case DOLLAR:
4611       case BANG:
4612       case PLUS_PLUS:
4613       case MINUS_MINUS:
4614       case PLUS:
4615       case MINUS:
4616       case BIT_AND:
4617       case INTEGER_LITERAL:
4618       case FLOATING_POINT_LITERAL:
4619       case STRING_LITERAL:
4620       case IDENTIFIER:
4621       case LPAREN:
4622       case LBRACE:
4623       case SEMICOLON:
4624       case DOLLAR_ID:
4625         statement = Statement();
4626                                              list.add(statement);
4627         break;
4628       case PHPEND:
4629         statement = htmlBlock();
4630                                              list.add(statement);
4631         break;
4632       default:
4633         jj_la1[117] = jj_gen;
4634         jj_consume_token(-1);
4635         throw new ParseException();
4636       }
4637     }
4638   final Statement[] stmtsArray = new Statement[list.size()];
4639   list.toArray(stmtsArray);
4640   {if (true) return new Else(stmtsArray,pos,SimpleCharStream.getPosition());}
4641     throw new Error("Missing return statement in function");
4642   }
4643
4644   static final public ElseIf ElseIfStatement() throws ParseException {
4645   final Expression condition;
4646   final Statement statement;
4647   final ArrayList list = new ArrayList();
4648   final int pos = SimpleCharStream.getPosition();
4649     jj_consume_token(ELSEIF);
4650     condition = Condition("elseif");
4651     statement = Statement();
4652                                                                     list.add(statement);/*todo:do better*/
4653   final Statement[] stmtsArray = new Statement[list.size()];
4654   list.toArray(stmtsArray);
4655   {if (true) return new ElseIf(condition,stmtsArray,pos,SimpleCharStream.getPosition());}
4656     throw new Error("Missing return statement in function");
4657   }
4658
4659   static final public WhileStatement WhileStatement() throws ParseException {
4660   final Expression condition;
4661   final Statement action;
4662   final int pos = SimpleCharStream.getPosition();
4663     jj_consume_token(WHILE);
4664     condition = Condition("while");
4665     action = WhileStatement0(pos,pos + 5);
4666      {if (true) return new WhileStatement(condition,action,pos,SimpleCharStream.getPosition());}
4667     throw new Error("Missing return statement in function");
4668   }
4669
4670   static final public Statement WhileStatement0(final int start, final int end) throws ParseException {
4671   Statement statement;
4672   final ArrayList stmts = new ArrayList();
4673   final int pos = SimpleCharStream.getPosition();
4674     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4675     case COLON:
4676       jj_consume_token(COLON);
4677       label_36:
4678       while (true) {
4679         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4680         case IF:
4681         case ARRAY:
4682         case BREAK:
4683         case LIST:
4684         case PRINT:
4685         case ECHO:
4686         case INCLUDE:
4687         case REQUIRE:
4688         case INCLUDE_ONCE:
4689         case REQUIRE_ONCE:
4690         case GLOBAL:
4691         case DEFINE:
4692         case STATIC:
4693         case CONTINUE:
4694         case DO:
4695         case FOR:
4696         case NEW:
4697         case NULL:
4698         case RETURN:
4699         case SWITCH:
4700         case TRUE:
4701         case FALSE:
4702         case WHILE:
4703         case FOREACH:
4704         case AT:
4705         case DOLLAR:
4706         case BANG:
4707         case PLUS_PLUS:
4708         case MINUS_MINUS:
4709         case PLUS:
4710         case MINUS:
4711         case BIT_AND:
4712         case INTEGER_LITERAL:
4713         case FLOATING_POINT_LITERAL:
4714         case STRING_LITERAL:
4715         case IDENTIFIER:
4716         case LPAREN:
4717         case LBRACE:
4718         case SEMICOLON:
4719         case DOLLAR_ID:
4720           ;
4721           break;
4722         default:
4723           jj_la1[118] = jj_gen;
4724           break label_36;
4725         }
4726         statement = Statement();
4727                                     stmts.add(statement);
4728       }
4729    try {
4730   setMarker(fileToParse,
4731             "Ugly syntax detected, you should while () {...} instead of while (): ... endwhile;",
4732             start,
4733             end,
4734             INFO,
4735             "Line " + token.beginLine);
4736   } catch (CoreException e) {
4737     PHPeclipsePlugin.log(e);
4738   }
4739       try {
4740         jj_consume_token(ENDWHILE);
4741       } catch (ParseException e) {
4742     errorMessage = "'endwhile' expected";
4743     errorLevel   = ERROR;
4744     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4745     errorEnd   = SimpleCharStream.getPosition() + 1;
4746     {if (true) throw e;}
4747       }
4748       try {
4749         jj_consume_token(SEMICOLON);
4750     final Statement[] stmtsArray = new Statement[stmts.size()];
4751     stmts.toArray(stmtsArray);
4752     {if (true) return new Block(stmtsArray,pos,SimpleCharStream.getPosition());}
4753       } catch (ParseException e) {
4754     errorMessage = "';' expected after 'endwhile' keyword";
4755     errorLevel   = ERROR;
4756     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4757     errorEnd   = SimpleCharStream.getPosition() + 1;
4758     {if (true) throw e;}
4759       }
4760       break;
4761     case IF:
4762     case ARRAY:
4763     case BREAK:
4764     case LIST:
4765     case PRINT:
4766     case ECHO:
4767     case INCLUDE:
4768     case REQUIRE:
4769     case INCLUDE_ONCE:
4770     case REQUIRE_ONCE:
4771     case GLOBAL:
4772     case DEFINE:
4773     case STATIC:
4774     case CONTINUE:
4775     case DO:
4776     case FOR:
4777     case NEW:
4778     case NULL:
4779     case RETURN:
4780     case SWITCH:
4781     case TRUE:
4782     case FALSE:
4783     case WHILE:
4784     case FOREACH:
4785     case AT:
4786     case DOLLAR:
4787     case BANG:
4788     case PLUS_PLUS:
4789     case MINUS_MINUS:
4790     case PLUS:
4791     case MINUS:
4792     case BIT_AND:
4793     case INTEGER_LITERAL:
4794     case FLOATING_POINT_LITERAL:
4795     case STRING_LITERAL:
4796     case IDENTIFIER:
4797     case LPAREN:
4798     case LBRACE:
4799     case SEMICOLON:
4800     case DOLLAR_ID:
4801       statement = Statement();
4802    {if (true) return statement;}
4803       break;
4804     default:
4805       jj_la1[119] = jj_gen;
4806       jj_consume_token(-1);
4807       throw new ParseException();
4808     }
4809     throw new Error("Missing return statement in function");
4810   }
4811
4812   static final public DoStatement DoStatement() throws ParseException {
4813   final Statement action;
4814   final Expression condition;
4815   final Token token, token2;
4816     token = jj_consume_token(DO);
4817     action = Statement();
4818     jj_consume_token(WHILE);
4819     condition = Condition("while");
4820     try {
4821       token2 = jj_consume_token(SEMICOLON);
4822      {if (true) return new DoStatement(condition,action,token.sourceStart,token2.sourceEnd);}
4823     } catch (ParseException e) {
4824     errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected";
4825     errorLevel   = ERROR;
4826     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4827     errorEnd   = SimpleCharStream.getPosition() + 1;
4828     {if (true) throw e;}
4829     }
4830     throw new Error("Missing return statement in function");
4831   }
4832
4833   static final public ForeachStatement ForeachStatement() throws ParseException {
4834   Statement statement;
4835   Expression expression;
4836   ArrayVariableDeclaration variable;
4837   Token token;
4838     token = jj_consume_token(FOREACH);
4839     try {
4840       jj_consume_token(LPAREN);
4841     } catch (ParseException e) {
4842     errorMessage = "'(' expected after 'foreach' keyword";
4843     errorLevel   = ERROR;
4844     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4845     errorEnd   = SimpleCharStream.getPosition() + 1;
4846     {if (true) throw e;}
4847     }
4848     try {
4849       expression = Expression();
4850     } catch (ParseException e) {
4851     errorMessage = "variable expected";
4852     errorLevel   = ERROR;
4853     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4854     errorEnd   = SimpleCharStream.getPosition() + 1;
4855     {if (true) throw e;}
4856     }
4857     try {
4858       jj_consume_token(AS);
4859     } catch (ParseException e) {
4860     errorMessage = "'as' expected";
4861     errorLevel   = ERROR;
4862     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4863     errorEnd   = SimpleCharStream.getPosition() + 1;
4864     {if (true) throw e;}
4865     }
4866     try {
4867       variable = ArrayVariable();
4868     } catch (ParseException e) {
4869     errorMessage = "variable expected";
4870     errorLevel   = ERROR;
4871     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4872     errorEnd   = SimpleCharStream.getPosition() + 1;
4873     {if (true) throw e;}
4874     }
4875     try {
4876       jj_consume_token(RPAREN);
4877     } catch (ParseException e) {
4878     errorMessage = "')' expected after 'foreach' keyword";
4879     errorLevel   = ERROR;
4880     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4881     errorEnd   = SimpleCharStream.getPosition() + 1;
4882     {if (true) throw e;}
4883     }
4884     try {
4885       statement = Statement();
4886     } catch (ParseException e) {
4887     if (errorMessage != null) {if (true) throw e;}
4888     errorMessage = "statement expected";
4889     errorLevel   = ERROR;
4890     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
4891     errorEnd   = SimpleCharStream.getPosition() + 1;
4892     {if (true) throw e;}
4893     }
4894    {if (true) return new ForeachStatement(expression,
4895                                variable,
4896                                statement,
4897                                token.sourceStart,
4898                                statement.sourceEnd);}
4899     throw new Error("Missing return statement in function");
4900   }
4901
4902 /**
4903  * a for declaration.
4904  * @return a node representing the for statement
4905  */
4906   static final public ForStatement ForStatement() throws ParseException {
4907 final Token token,token2;
4908 final int pos = SimpleCharStream.getPosition();
4909 Expression[] initializations = null;
4910 Expression condition = null;
4911 Expression[] increments = null;
4912 Statement action;
4913 final ArrayList list = new ArrayList();
4914     token = jj_consume_token(FOR);
4915     try {
4916       jj_consume_token(LPAREN);
4917     } catch (ParseException e) {
4918     errorMessage = "'(' expected after 'for' keyword";
4919     errorLevel   = ERROR;
4920     errorStart = token.sourceEnd;
4921     errorEnd   = token.sourceEnd +1;
4922     processParseExceptionDebug(e);
4923     }
4924     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4925     case ARRAY:
4926     case LIST:
4927     case PRINT:
4928     case NEW:
4929     case NULL:
4930     case TRUE:
4931     case FALSE:
4932     case AT:
4933     case DOLLAR:
4934     case BANG:
4935     case PLUS_PLUS:
4936     case MINUS_MINUS:
4937     case PLUS:
4938     case MINUS:
4939     case BIT_AND:
4940     case INTEGER_LITERAL:
4941     case FLOATING_POINT_LITERAL:
4942     case STRING_LITERAL:
4943     case IDENTIFIER:
4944     case LPAREN:
4945     case DOLLAR_ID:
4946       initializations = ForInit();
4947       break;
4948     default:
4949       jj_la1[120] = jj_gen;
4950       ;
4951     }
4952     jj_consume_token(SEMICOLON);
4953     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4954     case ARRAY:
4955     case LIST:
4956     case PRINT:
4957     case NEW:
4958     case NULL:
4959     case TRUE:
4960     case FALSE:
4961     case AT:
4962     case DOLLAR:
4963     case BANG:
4964     case PLUS_PLUS:
4965     case MINUS_MINUS:
4966     case PLUS:
4967     case MINUS:
4968     case BIT_AND:
4969     case INTEGER_LITERAL:
4970     case FLOATING_POINT_LITERAL:
4971     case STRING_LITERAL:
4972     case IDENTIFIER:
4973     case LPAREN:
4974     case DOLLAR_ID:
4975       condition = Expression();
4976       break;
4977     default:
4978       jj_la1[121] = jj_gen;
4979       ;
4980     }
4981     jj_consume_token(SEMICOLON);
4982     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
4983     case ARRAY:
4984     case LIST:
4985     case PRINT:
4986     case NEW:
4987     case NULL:
4988     case TRUE:
4989     case FALSE:
4990     case AT:
4991     case DOLLAR:
4992     case BANG:
4993     case PLUS_PLUS:
4994     case MINUS_MINUS:
4995     case PLUS:
4996     case MINUS:
4997     case BIT_AND:
4998     case INTEGER_LITERAL:
4999     case FLOATING_POINT_LITERAL:
5000     case STRING_LITERAL:
5001     case IDENTIFIER:
5002     case LPAREN:
5003     case DOLLAR_ID:
5004       increments = StatementExpressionList();
5005       break;
5006     default:
5007       jj_la1[122] = jj_gen;
5008       ;
5009     }
5010     jj_consume_token(RPAREN);
5011     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5012     case IF:
5013     case ARRAY:
5014     case BREAK:
5015     case LIST:
5016     case PRINT:
5017     case ECHO:
5018     case INCLUDE:
5019     case REQUIRE:
5020     case INCLUDE_ONCE:
5021     case REQUIRE_ONCE:
5022     case GLOBAL:
5023     case DEFINE:
5024     case STATIC:
5025     case CONTINUE:
5026     case DO:
5027     case FOR:
5028     case NEW:
5029     case NULL:
5030     case RETURN:
5031     case SWITCH:
5032     case TRUE:
5033     case FALSE:
5034     case WHILE:
5035     case FOREACH:
5036     case AT:
5037     case DOLLAR:
5038     case BANG:
5039     case PLUS_PLUS:
5040     case MINUS_MINUS:
5041     case PLUS:
5042     case MINUS:
5043     case BIT_AND:
5044     case INTEGER_LITERAL:
5045     case FLOATING_POINT_LITERAL:
5046     case STRING_LITERAL:
5047     case IDENTIFIER:
5048     case LPAREN:
5049     case LBRACE:
5050     case SEMICOLON:
5051     case DOLLAR_ID:
5052       action = Statement();
5053        {if (true) return new ForStatement(initializations,
5054                                condition,
5055                                increments,
5056                                action,
5057                                token.sourceStart,
5058                                action.sourceEnd);}
5059       break;
5060     case COLON:
5061       jj_consume_token(COLON);
5062       label_37:
5063       while (true) {
5064         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5065         case IF:
5066         case ARRAY:
5067         case BREAK:
5068         case LIST:
5069         case PRINT:
5070         case ECHO:
5071         case INCLUDE:
5072         case REQUIRE:
5073         case INCLUDE_ONCE:
5074         case REQUIRE_ONCE:
5075         case GLOBAL:
5076         case DEFINE:
5077         case STATIC:
5078         case CONTINUE:
5079         case DO:
5080         case FOR:
5081         case NEW:
5082         case NULL:
5083         case RETURN:
5084         case SWITCH:
5085         case TRUE:
5086         case FALSE:
5087         case WHILE:
5088         case FOREACH:
5089         case AT:
5090         case DOLLAR:
5091         case BANG:
5092         case PLUS_PLUS:
5093         case MINUS_MINUS:
5094         case PLUS:
5095         case MINUS:
5096         case BIT_AND:
5097         case INTEGER_LITERAL:
5098         case FLOATING_POINT_LITERAL:
5099         case STRING_LITERAL:
5100         case IDENTIFIER:
5101         case LPAREN:
5102         case LBRACE:
5103         case SEMICOLON:
5104         case DOLLAR_ID:
5105           ;
5106           break;
5107         default:
5108           jj_la1[123] = jj_gen;
5109           break label_37;
5110         }
5111         action = Statement();
5112                              list.add(action);
5113       }
5114         try {
5115         setMarker(fileToParse,
5116                   "Ugly syntax detected, you should for () {...} instead of for (): ... endfor;",
5117                   token.sourceStart,
5118                   token.sourceEnd,
5119                   INFO,
5120                   "Line " + token.beginLine);
5121         } catch (CoreException e) {
5122           PHPeclipsePlugin.log(e);
5123         }
5124       try {
5125         jj_consume_token(ENDFOR);
5126       } catch (ParseException e) {
5127         errorMessage = "'endfor' expected";
5128         errorLevel   = ERROR;
5129         errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5130         errorEnd   = SimpleCharStream.getPosition() + 1;
5131         {if (true) throw e;}
5132       }
5133       try {
5134         token2 = jj_consume_token(SEMICOLON);
5135         final Statement[] stmtsArray = new Statement[list.size()];
5136         list.toArray(stmtsArray);
5137         {if (true) return new ForStatement(initializations,
5138                                 condition,
5139                                 increments,
5140                                 new Block(stmtsArray,
5141                                           stmtsArray[0].sourceStart,
5142                                           stmtsArray[stmtsArray.length-1].sourceEnd),
5143                                 token.sourceStart,
5144                                 token2.sourceEnd);}
5145       } catch (ParseException e) {
5146         errorMessage = "';' expected after 'endfor' keyword";
5147         errorLevel   = ERROR;
5148         errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5149         errorEnd   = SimpleCharStream.getPosition() + 1;
5150         {if (true) throw e;}
5151       }
5152       break;
5153     default:
5154       jj_la1[124] = jj_gen;
5155       jj_consume_token(-1);
5156       throw new ParseException();
5157     }
5158     throw new Error("Missing return statement in function");
5159   }
5160
5161   static final public Expression[] ForInit() throws ParseException {
5162   final Expression[] exprs;
5163     if (jj_2_6(2147483647)) {
5164       exprs = LocalVariableDeclaration();
5165    {if (true) return exprs;}
5166     } else {
5167       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5168       case ARRAY:
5169       case LIST:
5170       case PRINT:
5171       case NEW:
5172       case NULL:
5173       case TRUE:
5174       case FALSE:
5175       case AT:
5176       case DOLLAR:
5177       case BANG:
5178       case PLUS_PLUS:
5179       case MINUS_MINUS:
5180       case PLUS:
5181       case MINUS:
5182       case BIT_AND:
5183       case INTEGER_LITERAL:
5184       case FLOATING_POINT_LITERAL:
5185       case STRING_LITERAL:
5186       case IDENTIFIER:
5187       case LPAREN:
5188       case DOLLAR_ID:
5189         exprs = StatementExpressionList();
5190    {if (true) return exprs;}
5191         break;
5192       default:
5193         jj_la1[125] = jj_gen;
5194         jj_consume_token(-1);
5195         throw new ParseException();
5196       }
5197     }
5198     throw new Error("Missing return statement in function");
5199   }
5200
5201   static final public Expression[] StatementExpressionList() throws ParseException {
5202   final ArrayList list = new ArrayList();
5203   final Expression expr;
5204     expr = Expression();
5205                          list.add(expr);
5206     label_38:
5207     while (true) {
5208       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5209       case COMMA:
5210         ;
5211         break;
5212       default:
5213         jj_la1[126] = jj_gen;
5214         break label_38;
5215       }
5216       jj_consume_token(COMMA);
5217       Expression();
5218                          list.add(expr);
5219     }
5220     final Expression[] exprsArray = new Expression[list.size()];
5221     list.toArray(exprsArray);
5222     {if (true) return exprsArray;}
5223     throw new Error("Missing return statement in function");
5224   }
5225
5226   static final public Continue ContinueStatement() throws ParseException {
5227   Expression expr = null;
5228   final Token token,token2;
5229     token = jj_consume_token(CONTINUE);
5230     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5231     case ARRAY:
5232     case LIST:
5233     case PRINT:
5234     case NEW:
5235     case NULL:
5236     case TRUE:
5237     case FALSE:
5238     case AT:
5239     case DOLLAR:
5240     case BANG:
5241     case PLUS_PLUS:
5242     case MINUS_MINUS:
5243     case PLUS:
5244     case MINUS:
5245     case BIT_AND:
5246     case INTEGER_LITERAL:
5247     case FLOATING_POINT_LITERAL:
5248     case STRING_LITERAL:
5249     case IDENTIFIER:
5250     case LPAREN:
5251     case DOLLAR_ID:
5252       expr = Expression();
5253       break;
5254     default:
5255       jj_la1[127] = jj_gen;
5256       ;
5257     }
5258     try {
5259       token2 = jj_consume_token(SEMICOLON);
5260      {if (true) return new Continue(expr,token.sourceStart,token2.sourceEnd);}
5261     } catch (ParseException e) {
5262     errorMessage = "';' expected after 'continue' statement";
5263     errorLevel   = ERROR;
5264     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5265     errorEnd   = SimpleCharStream.getPosition() + 1;
5266     {if (true) throw e;}
5267     }
5268     throw new Error("Missing return statement in function");
5269   }
5270
5271   static final public ReturnStatement ReturnStatement() throws ParseException {
5272   Expression expr = null;
5273   final Token token,token2;
5274     token = jj_consume_token(RETURN);
5275     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
5276     case ARRAY:
5277     case LIST:
5278     case PRINT:
5279     case NEW:
5280     case NULL:
5281     case TRUE:
5282     case FALSE:
5283     case AT:
5284     case DOLLAR:
5285     case BANG:
5286     case PLUS_PLUS:
5287     case MINUS_MINUS:
5288     case PLUS:
5289     case MINUS:
5290     case BIT_AND:
5291     case INTEGER_LITERAL:
5292     case FLOATING_POINT_LITERAL:
5293     case STRING_LITERAL:
5294     case IDENTIFIER:
5295     case LPAREN:
5296     case DOLLAR_ID:
5297       expr = Expression();
5298       break;
5299     default:
5300       jj_la1[128] = jj_gen;
5301       ;
5302     }
5303     try {
5304       token2 = jj_consume_token(SEMICOLON);
5305      {if (true) return new ReturnStatement(expr,token.sourceStart,token2.sourceEnd);}
5306     } catch (ParseException e) {
5307     errorMessage = "';' expected after 'return' statement";
5308     errorLevel   = ERROR;
5309     errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
5310     errorEnd   = SimpleCharStream.getPosition() + 1;
5311     {if (true) throw e;}
5312     }
5313     throw new Error("Missing return statement in function");
5314   }
5315
5316   static final private boolean jj_2_1(int xla) {
5317     jj_la = xla; jj_lastpos = jj_scanpos = token;
5318     boolean retval = !jj_3_1();
5319     jj_save(0, xla);
5320     return retval;
5321   }
5322
5323   static final private boolean jj_2_2(int xla) {
5324     jj_la = xla; jj_lastpos = jj_scanpos = token;
5325     boolean retval = !jj_3_2();
5326     jj_save(1, xla);
5327     return retval;
5328   }
5329
5330   static final private boolean jj_2_3(int xla) {
5331     jj_la = xla; jj_lastpos = jj_scanpos = token;
5332     boolean retval = !jj_3_3();
5333     jj_save(2, xla);
5334     return retval;
5335   }
5336
5337   static final private boolean jj_2_4(int xla) {
5338     jj_la = xla; jj_lastpos = jj_scanpos = token;
5339     boolean retval = !jj_3_4();
5340     jj_save(3, xla);
5341     return retval;
5342   }
5343
5344   static final private boolean jj_2_5(int xla) {
5345     jj_la = xla; jj_lastpos = jj_scanpos = token;
5346     boolean retval = !jj_3_5();
5347     jj_save(4, xla);
5348     return retval;
5349   }
5350
5351   static final private boolean jj_2_6(int xla) {
5352     jj_la = xla; jj_lastpos = jj_scanpos = token;
5353     boolean retval = !jj_3_6();
5354     jj_save(5, xla);
5355     return retval;
5356   }
5357
5358   static final private boolean jj_3R_114() {
5359     if (jj_scan_token(XOR)) return true;
5360     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5361     if (jj_3R_113()) return true;
5362     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5363     return false;
5364   }
5365
5366   static final private boolean jj_3R_46() {
5367     if (jj_scan_token(LBRACKET)) return true;
5368     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5369     Token xsp;
5370     xsp = jj_scanpos;
5371     if (jj_3R_52()) jj_scanpos = xsp;
5372     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5373     if (jj_scan_token(RBRACKET)) return true;
5374     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5375     return false;
5376   }
5377
5378   static final private boolean jj_3R_108() {
5379     if (jj_3R_113()) return true;
5380     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5381     Token xsp;
5382     while (true) {
5383       xsp = jj_scanpos;
5384       if (jj_3R_114()) { jj_scanpos = xsp; break; }
5385       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5386     }
5387     return false;
5388   }
5389
5390   static final private boolean jj_3R_50() {
5391     if (jj_3R_64()) return true;
5392     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5393     return false;
5394   }
5395
5396   static final private boolean jj_3R_109() {
5397     if (jj_scan_token(BIT_OR)) return true;
5398     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5399     if (jj_3R_108()) return true;
5400     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5401     return false;
5402   }
5403
5404   static final private boolean jj_3R_102() {
5405     if (jj_3R_108()) return true;
5406     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5407     Token xsp;
5408     while (true) {
5409       xsp = jj_scanpos;
5410       if (jj_3R_109()) { jj_scanpos = xsp; break; }
5411       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5412     }
5413     return false;
5414   }
5415
5416   static final private boolean jj_3R_45() {
5417     if (jj_scan_token(CLASSACCESS)) return true;
5418     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5419     Token xsp;
5420     xsp = jj_scanpos;
5421     if (jj_3R_50()) {
5422     jj_scanpos = xsp;
5423     if (jj_3R_51()) return true;
5424     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5425     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5426     return false;
5427   }
5428
5429   static final private boolean jj_3R_39() {
5430     Token xsp;
5431     xsp = jj_scanpos;
5432     if (jj_3R_45()) {
5433     jj_scanpos = xsp;
5434     if (jj_3R_46()) return true;
5435     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5436     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5437     return false;
5438   }
5439
5440   static final private boolean jj_3R_105() {
5441     if (jj_scan_token(DOT)) return true;
5442     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5443     if (jj_3R_102()) return true;
5444     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5445     return false;
5446   }
5447
5448   static final private boolean jj_3R_204() {
5449     if (jj_3R_115()) return true;
5450     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5451     return false;
5452   }
5453
5454   static final private boolean jj_3R_96() {
5455     if (jj_3R_102()) return true;
5456     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5457     Token xsp;
5458     while (true) {
5459       xsp = jj_scanpos;
5460       if (jj_3R_105()) { jj_scanpos = xsp; break; }
5461       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5462     }
5463     return false;
5464   }
5465
5466   static final private boolean jj_3R_203() {
5467     if (jj_3R_48()) return true;
5468     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5469     return false;
5470   }
5471
5472   static final private boolean jj_3R_202() {
5473     if (jj_scan_token(IDENTIFIER)) return true;
5474     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5475     return false;
5476   }
5477
5478   static final private boolean jj_3R_197() {
5479     Token xsp;
5480     xsp = jj_scanpos;
5481     if (jj_3R_202()) {
5482     jj_scanpos = xsp;
5483     if (jj_3R_203()) {
5484     jj_scanpos = xsp;
5485     if (jj_3R_204()) return true;
5486     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5487     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5488     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5489     return false;
5490   }
5491
5492   static final private boolean jj_3R_107() {
5493     if (jj_scan_token(_ANDL)) return true;
5494     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5495     return false;
5496   }
5497
5498   static final private boolean jj_3R_106() {
5499     if (jj_scan_token(AND_AND)) return true;
5500     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5501     return false;
5502   }
5503
5504   static final private boolean jj_3R_184() {
5505     if (jj_scan_token(ARRAY)) return true;
5506     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5507     if (jj_3R_193()) return true;
5508     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5509     return false;
5510   }
5511
5512   static final private boolean jj_3R_99() {
5513     Token xsp;
5514     xsp = jj_scanpos;
5515     if (jj_3R_106()) {
5516     jj_scanpos = xsp;
5517     if (jj_3R_107()) return true;
5518     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5519     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5520     if (jj_3R_96()) return true;
5521     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5522     return false;
5523   }
5524
5525   static final private boolean jj_3R_153() {
5526     if (jj_scan_token(LBRACE)) return true;
5527     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5528     if (jj_3R_47()) return true;
5529     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5530     if (jj_scan_token(RBRACE)) return true;
5531     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5532     return false;
5533   }
5534
5535   static final private boolean jj_3R_80() {
5536     if (jj_3R_96()) return true;
5537     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5538     Token xsp;
5539     while (true) {
5540       xsp = jj_scanpos;
5541       if (jj_3R_99()) { jj_scanpos = xsp; break; }
5542       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5543     }
5544     return false;
5545   }
5546
5547   static final private boolean jj_3R_78() {
5548     if (jj_scan_token(HOOK)) return true;
5549     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5550     if (jj_3R_47()) return true;
5551     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5552     if (jj_scan_token(COLON)) return true;
5553     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5554     if (jj_3R_68()) return true;
5555     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5556     return false;
5557   }
5558
5559   static final private boolean jj_3R_72() {
5560     if (jj_scan_token(IDENTIFIER)) return true;
5561     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5562     Token xsp;
5563     xsp = jj_scanpos;
5564     if (jj_3R_153()) jj_scanpos = xsp;
5565     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5566     return false;
5567   }
5568
5569   static final private boolean jj_3R_112() {
5570     if (jj_scan_token(ASSIGN)) return true;
5571     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5572     if (jj_3R_47()) return true;
5573     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5574     return false;
5575   }
5576
5577   static final private boolean jj_3R_101() {
5578     if (jj_scan_token(_ORL)) return true;
5579     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5580     return false;
5581   }
5582
5583   static final private boolean jj_3R_198() {
5584     if (jj_3R_201()) return true;
5585     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5586     return false;
5587   }
5588
5589   static final private boolean jj_3R_100() {
5590     if (jj_scan_token(OR_OR)) return true;
5591     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5592     return false;
5593   }
5594
5595   static final private boolean jj_3R_116() {
5596     if (jj_3R_115()) return true;
5597     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5598     return false;
5599   }
5600
5601   static final private boolean jj_3R_71() {
5602     if (jj_scan_token(LBRACE)) return true;
5603     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5604     if (jj_3R_47()) return true;
5605     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5606     if (jj_scan_token(RBRACE)) return true;
5607     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5608     return false;
5609   }
5610
5611   static final private boolean jj_3R_64() {
5612     Token xsp;
5613     xsp = jj_scanpos;
5614     if (jj_3R_71()) {
5615     jj_scanpos = xsp;
5616     if (jj_3R_72()) return true;
5617     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5618     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5619     return false;
5620   }
5621
5622   static final private boolean jj_3R_82() {
5623     Token xsp;
5624     xsp = jj_scanpos;
5625     if (jj_3R_100()) {
5626     jj_scanpos = xsp;
5627     if (jj_3R_101()) return true;
5628     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5629     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5630     if (jj_3R_80()) return true;
5631     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5632     return false;
5633   }
5634
5635   static final private boolean jj_3R_75() {
5636     if (jj_3R_80()) return true;
5637     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5638     Token xsp;
5639     while (true) {
5640       xsp = jj_scanpos;
5641       if (jj_3R_82()) { jj_scanpos = xsp; break; }
5642       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5643     }
5644     return false;
5645   }
5646
5647   static final private boolean jj_3R_111() {
5648     if (jj_scan_token(COMMA)) return true;
5649     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5650     Token xsp;
5651     xsp = jj_scanpos;
5652     if (jj_3R_116()) jj_scanpos = xsp;
5653     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5654     return false;
5655   }
5656
5657   static final private boolean jj_3R_144() {
5658     if (jj_3R_129()) return true;
5659     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5660     return false;
5661   }
5662
5663   static final private boolean jj_3R_190() {
5664     if (jj_scan_token(NEW)) return true;
5665     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5666     if (jj_3R_197()) return true;
5667     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5668     Token xsp;
5669     xsp = jj_scanpos;
5670     if (jj_3R_198()) jj_scanpos = xsp;
5671     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5672     return false;
5673   }
5674
5675   static final private boolean jj_3_2() {
5676     if (jj_scan_token(DOLLAR)) return true;
5677     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5678     if (jj_scan_token(DOLLAR)) return true;
5679     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5680     return false;
5681   }
5682
5683   static final private boolean jj_3R_196() {
5684     if (jj_3R_201()) return true;
5685     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5686     return false;
5687   }
5688
5689   static final private boolean jj_3R_110() {
5690     if (jj_3R_115()) return true;
5691     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5692     return false;
5693   }
5694
5695   static final private boolean jj_3R_189() {
5696     if (jj_3R_115()) return true;
5697     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5698     Token xsp;
5699     xsp = jj_scanpos;
5700     if (jj_3R_196()) jj_scanpos = xsp;
5701     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5702     return false;
5703   }
5704
5705   static final private boolean jj_3R_138() {
5706     if (jj_3R_64()) return true;
5707     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5708     return false;
5709   }
5710
5711   static final private boolean jj_3R_68() {
5712     if (jj_3R_75()) return true;
5713     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5714     Token xsp;
5715     xsp = jj_scanpos;
5716     if (jj_3R_78()) jj_scanpos = xsp;
5717     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5718     return false;
5719   }
5720
5721   static final private boolean jj_3R_137() {
5722     if (jj_scan_token(DOLLAR)) return true;
5723     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5724     if (jj_3R_129()) return true;
5725     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5726     return false;
5727   }
5728
5729   static final private boolean jj_3R_103() {
5730     if (jj_scan_token(LIST)) return true;
5731     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5732     if (jj_scan_token(LPAREN)) return true;
5733     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5734     Token xsp;
5735     xsp = jj_scanpos;
5736     if (jj_3R_110()) jj_scanpos = xsp;
5737     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5738     while (true) {
5739       xsp = jj_scanpos;
5740       if (jj_3R_111()) { jj_scanpos = xsp; break; }
5741       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5742     }
5743     if (jj_scan_token(RPAREN)) return true;
5744     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5745     xsp = jj_scanpos;
5746     if (jj_3R_112()) jj_scanpos = xsp;
5747     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5748     return false;
5749   }
5750
5751   static final private boolean jj_3R_195() {
5752     if (jj_3R_201()) return true;
5753     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5754     return false;
5755   }
5756
5757   static final private boolean jj_3R_95() {
5758     if (jj_scan_token(TILDEEQUAL)) return true;
5759     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5760     return false;
5761   }
5762
5763   static final private boolean jj_3R_129() {
5764     Token xsp;
5765     xsp = jj_scanpos;
5766     if (jj_3R_136()) {
5767     jj_scanpos = xsp;
5768     if (jj_3R_137()) {
5769     jj_scanpos = xsp;
5770     if (jj_3R_138()) return true;
5771     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5772     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5773     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5774     return false;
5775   }
5776
5777   static final private boolean jj_3R_136() {
5778     if (jj_scan_token(DOLLAR_ID)) return true;
5779     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5780     Token xsp;
5781     xsp = jj_scanpos;
5782     if (jj_3R_144()) jj_scanpos = xsp;
5783     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5784     return false;
5785   }
5786
5787   static final private boolean jj_3R_94() {
5788     if (jj_scan_token(DOTASSIGN)) return true;
5789     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5790     return false;
5791   }
5792
5793   static final private boolean jj_3R_93() {
5794     if (jj_scan_token(ORASSIGN)) return true;
5795     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5796     return false;
5797   }
5798
5799   static final private boolean jj_3R_92() {
5800     if (jj_scan_token(XORASSIGN)) return true;
5801     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5802     return false;
5803   }
5804
5805   static final private boolean jj_3R_194() {
5806     if (jj_scan_token(STATICCLASSACCESS)) return true;
5807     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5808     if (jj_3R_197()) return true;
5809     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5810     return false;
5811   }
5812
5813   static final private boolean jj_3R_91() {
5814     if (jj_scan_token(ANDASSIGN)) return true;
5815     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5816     return false;
5817   }
5818
5819   static final private boolean jj_3R_128() {
5820     if (jj_3R_129()) return true;
5821     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5822     return false;
5823   }
5824
5825   static final private boolean jj_3R_90() {
5826     if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
5827     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5828     return false;
5829   }
5830
5831   static final private boolean jj_3R_89() {
5832     if (jj_scan_token(LSHIFTASSIGN)) return true;
5833     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5834     return false;
5835   }
5836
5837   static final private boolean jj_3R_88() {
5838     if (jj_scan_token(MINUSASSIGN)) return true;
5839     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5840     return false;
5841   }
5842
5843   static final private boolean jj_3R_87() {
5844     if (jj_scan_token(PLUSASSIGN)) return true;
5845     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5846     return false;
5847   }
5848
5849   static final private boolean jj_3R_104() {
5850     if (jj_scan_token(PRINT)) return true;
5851     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5852     if (jj_3R_47()) return true;
5853     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5854     return false;
5855   }
5856
5857   static final private boolean jj_3R_86() {
5858     if (jj_scan_token(REMASSIGN)) return true;
5859     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5860     return false;
5861   }
5862
5863   static final private boolean jj_3R_85() {
5864     if (jj_scan_token(SLASHASSIGN)) return true;
5865     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5866     return false;
5867   }
5868
5869   static final private boolean jj_3R_188() {
5870     if (jj_scan_token(IDENTIFIER)) return true;
5871     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5872     Token xsp;
5873     while (true) {
5874       xsp = jj_scanpos;
5875       if (jj_3R_194()) { jj_scanpos = xsp; break; }
5876       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5877     }
5878     xsp = jj_scanpos;
5879     if (jj_3R_195()) jj_scanpos = xsp;
5880     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5881     return false;
5882   }
5883
5884   static final private boolean jj_3R_183() {
5885     Token xsp;
5886     xsp = jj_scanpos;
5887     if (jj_3R_188()) {
5888     jj_scanpos = xsp;
5889     if (jj_3R_189()) {
5890     jj_scanpos = xsp;
5891     if (jj_3R_190()) return true;
5892     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5893     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5894     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5895     return false;
5896   }
5897
5898   static final private boolean jj_3R_84() {
5899     if (jj_scan_token(STARASSIGN)) return true;
5900     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5901     return false;
5902   }
5903
5904   static final private boolean jj_3R_83() {
5905     if (jj_scan_token(ASSIGN)) return true;
5906     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5907     return false;
5908   }
5909
5910   static final private boolean jj_3R_79() {
5911     Token xsp;
5912     xsp = jj_scanpos;
5913     if (jj_3R_83()) {
5914     jj_scanpos = xsp;
5915     if (jj_3R_84()) {
5916     jj_scanpos = xsp;
5917     if (jj_3R_85()) {
5918     jj_scanpos = xsp;
5919     if (jj_3R_86()) {
5920     jj_scanpos = xsp;
5921     if (jj_3R_87()) {
5922     jj_scanpos = xsp;
5923     if (jj_3R_88()) {
5924     jj_scanpos = xsp;
5925     if (jj_3R_89()) {
5926     jj_scanpos = xsp;
5927     if (jj_3R_90()) {
5928     jj_scanpos = xsp;
5929     if (jj_3R_91()) {
5930     jj_scanpos = xsp;
5931     if (jj_3R_92()) {
5932     jj_scanpos = xsp;
5933     if (jj_3R_93()) {
5934     jj_scanpos = xsp;
5935     if (jj_3R_94()) {
5936     jj_scanpos = xsp;
5937     if (jj_3R_95()) return true;
5938     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5939     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5940     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5941     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5942     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5943     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5944     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5945     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5946     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5947     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5948     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5949     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5950     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5951     return false;
5952   }
5953
5954   static final private boolean jj_3R_74() {
5955     if (jj_scan_token(DOLLAR)) return true;
5956     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5957     if (jj_3R_129()) return true;
5958     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5959     return false;
5960   }
5961
5962   static final private boolean jj_3R_98() {
5963     if (jj_3R_104()) return true;
5964     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5965     return false;
5966   }
5967
5968   static final private boolean jj_3R_175() {
5969     if (jj_3R_184()) return true;
5970     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5971     return false;
5972   }
5973
5974   static final private boolean jj_3R_182() {
5975     if (jj_scan_token(BIT_AND)) return true;
5976     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5977     return false;
5978   }
5979
5980   static final private boolean jj_3R_97() {
5981     if (jj_3R_103()) return true;
5982     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5983     return false;
5984   }
5985
5986   static final private boolean jj_3R_81() {
5987     Token xsp;
5988     xsp = jj_scanpos;
5989     if (jj_3R_97()) {
5990     jj_scanpos = xsp;
5991     if (jj_3R_98()) return true;
5992     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5993     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
5994     return false;
5995   }
5996
5997   static final private boolean jj_3R_170() {
5998     Token xsp;
5999     xsp = jj_scanpos;
6000     if (jj_3R_174()) {
6001     jj_scanpos = xsp;
6002     if (jj_3R_175()) return true;
6003     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6004     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6005     return false;
6006   }
6007
6008   static final private boolean jj_3R_174() {
6009     Token xsp;
6010     xsp = jj_scanpos;
6011     if (jj_3R_182()) jj_scanpos = xsp;
6012     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6013     if (jj_3R_183()) return true;
6014     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6015     return false;
6016   }
6017
6018   static final private boolean jj_3R_73() {
6019     if (jj_scan_token(DOLLAR_ID)) return true;
6020     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6021     Token xsp;
6022     xsp = jj_scanpos;
6023     if (jj_3R_128()) jj_scanpos = xsp;
6024     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6025     return false;
6026   }
6027
6028   static final private boolean jj_3R_65() {
6029     Token xsp;
6030     xsp = jj_scanpos;
6031     if (jj_3R_73()) {
6032     jj_scanpos = xsp;
6033     if (jj_3R_74()) return true;
6034     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6035     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6036     return false;
6037   }
6038
6039   static final private boolean jj_3R_77() {
6040     if (jj_3R_81()) return true;
6041     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6042     return false;
6043   }
6044
6045   static final private boolean jj_3R_76() {
6046     if (jj_scan_token(BANG)) return true;
6047     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6048     if (jj_3R_69()) return true;
6049     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6050     return false;
6051   }
6052
6053   static final private boolean jj_3R_69() {
6054     Token xsp;
6055     xsp = jj_scanpos;
6056     if (jj_3R_76()) {
6057     jj_scanpos = xsp;
6058     if (jj_3R_77()) return true;
6059     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6060     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6061     return false;
6062   }
6063
6064   static final private boolean jj_3R_192() {
6065     if (jj_scan_token(MINUS_MINUS)) return true;
6066     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6067     return false;
6068   }
6069
6070   static final private boolean jj_3R_191() {
6071     if (jj_scan_token(PLUS_PLUS)) return true;
6072     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6073     return false;
6074   }
6075
6076   static final private boolean jj_3R_187() {
6077     Token xsp;
6078     xsp = jj_scanpos;
6079     if (jj_3R_191()) {
6080     jj_scanpos = xsp;
6081     if (jj_3R_192()) return true;
6082     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6083     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6084     return false;
6085   }
6086
6087   static final private boolean jj_3R_54() {
6088     if (jj_3R_69()) return true;
6089     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6090     return false;
6091   }
6092
6093   static final private boolean jj_3R_172() {
6094     if (jj_3R_170()) return true;
6095     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6096     Token xsp;
6097     xsp = jj_scanpos;
6098     if (jj_3R_187()) jj_scanpos = xsp;
6099     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6100     return false;
6101   }
6102
6103   static final private boolean jj_3R_186() {
6104     if (jj_scan_token(ARRAY)) return true;
6105     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6106     return false;
6107   }
6108
6109   static final private boolean jj_3R_185() {
6110     if (jj_3R_48()) return true;
6111     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6112     return false;
6113   }
6114
6115   static final private boolean jj_3R_42() {
6116     if (jj_scan_token(ARRAY)) return true;
6117     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6118     return false;
6119   }
6120
6121   static final private boolean jj_3R_171() {
6122     if (jj_scan_token(LPAREN)) return true;
6123     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6124     Token xsp;
6125     xsp = jj_scanpos;
6126     if (jj_3R_185()) {
6127     jj_scanpos = xsp;
6128     if (jj_3R_186()) return true;
6129     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6130     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6131     if (jj_scan_token(RPAREN)) return true;
6132     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6133     if (jj_3R_145()) return true;
6134     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6135     return false;
6136   }
6137
6138   static final private boolean jj_3R_41() {
6139     if (jj_3R_48()) return true;
6140     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6141     return false;
6142   }
6143
6144   static final private boolean jj_3R_70() {
6145     if (jj_3R_79()) return true;
6146     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6147     if (jj_3R_47()) return true;
6148     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6149     return false;
6150   }
6151
6152   static final private boolean jj_3_4() {
6153     if (jj_scan_token(LPAREN)) return true;
6154     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6155     Token xsp;
6156     xsp = jj_scanpos;
6157     if (jj_3R_41()) {
6158     jj_scanpos = xsp;
6159     if (jj_3R_42()) return true;
6160     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6161     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6162     if (jj_scan_token(RPAREN)) return true;
6163     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6164     return false;
6165   }
6166
6167   static final private boolean jj_3R_47() {
6168     Token xsp;
6169     xsp = jj_scanpos;
6170     if (jj_3R_53()) {
6171     jj_scanpos = xsp;
6172     if (jj_3R_54()) return true;
6173     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6174     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6175     return false;
6176   }
6177
6178   static final private boolean jj_3R_53() {
6179     if (jj_3R_68()) return true;
6180     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6181     Token xsp;
6182     xsp = jj_scanpos;
6183     if (jj_3R_70()) jj_scanpos = xsp;
6184     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6185     return false;
6186   }
6187
6188   static final private boolean jj_3_1() {
6189     if (jj_3R_39()) return true;
6190     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6191     return false;
6192   }
6193
6194   static final private boolean jj_3R_169() {
6195     if (jj_scan_token(LPAREN)) return true;
6196     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6197     if (jj_3R_47()) return true;
6198     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6199     if (jj_scan_token(RPAREN)) return true;
6200     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6201     return false;
6202   }
6203
6204   static final private boolean jj_3R_168() {
6205     if (jj_3R_173()) return true;
6206     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6207     return false;
6208   }
6209
6210   static final private boolean jj_3R_167() {
6211     if (jj_3R_172()) return true;
6212     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6213     return false;
6214   }
6215
6216   static final private boolean jj_3R_163() {
6217     Token xsp;
6218     xsp = jj_scanpos;
6219     if (jj_3R_166()) {
6220     jj_scanpos = xsp;
6221     if (jj_3R_167()) {
6222     jj_scanpos = xsp;
6223     if (jj_3R_168()) {
6224     jj_scanpos = xsp;
6225     if (jj_3R_169()) return true;
6226     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6227     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6228     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6229     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6230     return false;
6231   }
6232
6233   static final private boolean jj_3R_166() {
6234     if (jj_3R_171()) return true;
6235     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6236     return false;
6237   }
6238
6239   static final private boolean jj_3R_115() {
6240     if (jj_3R_65()) return true;
6241     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6242     Token xsp;
6243     while (true) {
6244       xsp = jj_scanpos;
6245       if (jj_3_1()) { jj_scanpos = xsp; break; }
6246       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6247     }
6248     return false;
6249   }
6250
6251   static final private boolean jj_3R_63() {
6252     if (jj_scan_token(OBJECT)) return true;
6253     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6254     return false;
6255   }
6256
6257   static final private boolean jj_3R_62() {
6258     if (jj_scan_token(INTEGER)) return true;
6259     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6260     return false;
6261   }
6262
6263   static final private boolean jj_3R_61() {
6264     if (jj_scan_token(INT)) return true;
6265     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6266     return false;
6267   }
6268
6269   static final private boolean jj_3R_60() {
6270     if (jj_scan_token(FLOAT)) return true;
6271     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6272     return false;
6273   }
6274
6275   static final private boolean jj_3R_59() {
6276     if (jj_scan_token(DOUBLE)) return true;
6277     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6278     return false;
6279   }
6280
6281   static final private boolean jj_3R_58() {
6282     if (jj_scan_token(REAL)) return true;
6283     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6284     return false;
6285   }
6286
6287   static final private boolean jj_3R_165() {
6288     if (jj_scan_token(MINUS_MINUS)) return true;
6289     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6290     return false;
6291   }
6292
6293   static final private boolean jj_3R_57() {
6294     if (jj_scan_token(BOOLEAN)) return true;
6295     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6296     return false;
6297   }
6298
6299   static final private boolean jj_3R_56() {
6300     if (jj_scan_token(BOOL)) return true;
6301     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6302     return false;
6303   }
6304
6305   static final private boolean jj_3R_164() {
6306     if (jj_scan_token(PLUS_PLUS)) return true;
6307     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6308     return false;
6309   }
6310
6311   static final private boolean jj_3R_48() {
6312     Token xsp;
6313     xsp = jj_scanpos;
6314     if (jj_3R_55()) {
6315     jj_scanpos = xsp;
6316     if (jj_3R_56()) {
6317     jj_scanpos = xsp;
6318     if (jj_3R_57()) {
6319     jj_scanpos = xsp;
6320     if (jj_3R_58()) {
6321     jj_scanpos = xsp;
6322     if (jj_3R_59()) {
6323     jj_scanpos = xsp;
6324     if (jj_3R_60()) {
6325     jj_scanpos = xsp;
6326     if (jj_3R_61()) {
6327     jj_scanpos = xsp;
6328     if (jj_3R_62()) {
6329     jj_scanpos = xsp;
6330     if (jj_3R_63()) return true;
6331     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6332     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6333     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6334     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6335     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6336     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6337     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6338     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6339     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6340     return false;
6341   }
6342
6343   static final private boolean jj_3R_55() {
6344     if (jj_scan_token(STRING)) return true;
6345     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6346     return false;
6347   }
6348
6349   static final private boolean jj_3R_162() {
6350     Token xsp;
6351     xsp = jj_scanpos;
6352     if (jj_3R_164()) {
6353     jj_scanpos = xsp;
6354     if (jj_3R_165()) return true;
6355     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6356     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6357     if (jj_3R_170()) return true;
6358     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6359     return false;
6360   }
6361
6362   static final private boolean jj_3R_161() {
6363     if (jj_3R_163()) return true;
6364     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6365     return false;
6366   }
6367
6368   static final private boolean jj_3R_160() {
6369     if (jj_3R_162()) return true;
6370     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6371     return false;
6372   }
6373
6374   static final private boolean jj_3R_159() {
6375     if (jj_scan_token(MINUS)) return true;
6376     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6377     if (jj_3R_149()) return true;
6378     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6379     return false;
6380   }
6381
6382   static final private boolean jj_3R_157() {
6383     Token xsp;
6384     xsp = jj_scanpos;
6385     if (jj_3R_158()) {
6386     jj_scanpos = xsp;
6387     if (jj_3R_159()) {
6388     jj_scanpos = xsp;
6389     if (jj_3R_160()) {
6390     jj_scanpos = xsp;
6391     if (jj_3R_161()) return true;
6392     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6393     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6394     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6395     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6396     return false;
6397   }
6398
6399   static final private boolean jj_3R_158() {
6400     if (jj_scan_token(PLUS)) return true;
6401     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6402     if (jj_3R_149()) return true;
6403     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6404     return false;
6405   }
6406
6407   static final private boolean jj_3R_49() {
6408     if (jj_scan_token(COMMA)) return true;
6409     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6410     if (jj_3R_47()) return true;
6411     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6412     return false;
6413   }
6414
6415   static final private boolean jj_3R_44() {
6416     if (jj_3R_47()) return true;
6417     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6418     Token xsp;
6419     while (true) {
6420       xsp = jj_scanpos;
6421       if (jj_3R_49()) { jj_scanpos = xsp; break; }
6422       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6423     }
6424     return false;
6425   }
6426
6427   static final private boolean jj_3R_156() {
6428     if (jj_3R_157()) return true;
6429     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6430     return false;
6431   }
6432
6433   static final private boolean jj_3R_155() {
6434     if (jj_scan_token(BANG)) return true;
6435     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6436     if (jj_3R_149()) return true;
6437     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6438     return false;
6439   }
6440
6441   static final private boolean jj_3R_149() {
6442     Token xsp;
6443     xsp = jj_scanpos;
6444     if (jj_3R_154()) {
6445     jj_scanpos = xsp;
6446     if (jj_3R_155()) {
6447     jj_scanpos = xsp;
6448     if (jj_3R_156()) return true;
6449     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6450     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6451     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6452     return false;
6453   }
6454
6455   static final private boolean jj_3R_154() {
6456     if (jj_scan_token(AT)) return true;
6457     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6458     if (jj_3R_149()) return true;
6459     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6460     return false;
6461   }
6462
6463   static final private boolean jj_3R_145() {
6464     if (jj_3R_149()) return true;
6465     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6466     return false;
6467   }
6468
6469   static final private boolean jj_3R_152() {
6470     if (jj_scan_token(REMAINDER)) return true;
6471     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6472     return false;
6473   }
6474
6475   static final private boolean jj_3R_151() {
6476     if (jj_scan_token(SLASH)) return true;
6477     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6478     return false;
6479   }
6480
6481   static final private boolean jj_3R_150() {
6482     if (jj_scan_token(STAR)) return true;
6483     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6484     return false;
6485   }
6486
6487   static final private boolean jj_3R_146() {
6488     Token xsp;
6489     xsp = jj_scanpos;
6490     if (jj_3R_150()) {
6491     jj_scanpos = xsp;
6492     if (jj_3R_151()) {
6493     jj_scanpos = xsp;
6494     if (jj_3R_152()) return true;
6495     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6496     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6497     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6498     if (jj_3R_145()) return true;
6499     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6500     return false;
6501   }
6502
6503   static final private boolean jj_3R_43() {
6504     if (jj_3R_47()) return true;
6505     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6506     if (jj_scan_token(SEMICOLON)) return true;
6507     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6508     return false;
6509   }
6510
6511   static final private boolean jj_3R_139() {
6512     if (jj_3R_145()) return true;
6513     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6514     Token xsp;
6515     while (true) {
6516       xsp = jj_scanpos;
6517       if (jj_3R_146()) { jj_scanpos = xsp; break; }
6518       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6519     }
6520     return false;
6521   }
6522
6523   static final private boolean jj_3R_148() {
6524     if (jj_scan_token(MINUS)) return true;
6525     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6526     return false;
6527   }
6528
6529   static final private boolean jj_3R_147() {
6530     if (jj_scan_token(PLUS)) return true;
6531     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6532     return false;
6533   }
6534
6535   static final private boolean jj_3_6() {
6536     if (jj_3R_44()) return true;
6537     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6538     return false;
6539   }
6540
6541   static final private boolean jj_3R_140() {
6542     Token xsp;
6543     xsp = jj_scanpos;
6544     if (jj_3R_147()) {
6545     jj_scanpos = xsp;
6546     if (jj_3R_148()) return true;
6547     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6548     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6549     if (jj_3R_139()) return true;
6550     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6551     return false;
6552   }
6553
6554   static final private boolean jj_3R_130() {
6555     if (jj_3R_139()) return true;
6556     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6557     Token xsp;
6558     while (true) {
6559       xsp = jj_scanpos;
6560       if (jj_3R_140()) { jj_scanpos = xsp; break; }
6561       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6562     }
6563     return false;
6564   }
6565
6566   static final private boolean jj_3_5() {
6567     if (jj_3R_43()) return true;
6568     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6569     return false;
6570   }
6571
6572   static final private boolean jj_3R_143() {
6573     if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
6574     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6575     return false;
6576   }
6577
6578   static final private boolean jj_3R_142() {
6579     if (jj_scan_token(RSIGNEDSHIFT)) return true;
6580     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6581     return false;
6582   }
6583
6584   static final private boolean jj_3R_141() {
6585     if (jj_scan_token(LSHIFT)) return true;
6586     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6587     return false;
6588   }
6589
6590   static final private boolean jj_3R_131() {
6591     Token xsp;
6592     xsp = jj_scanpos;
6593     if (jj_3R_141()) {
6594     jj_scanpos = xsp;
6595     if (jj_3R_142()) {
6596     jj_scanpos = xsp;
6597     if (jj_3R_143()) return true;
6598     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6599     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6600     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6601     if (jj_3R_130()) return true;
6602     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6603     return false;
6604   }
6605
6606   static final private boolean jj_3R_121() {
6607     if (jj_3R_130()) return true;
6608     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6609     Token xsp;
6610     while (true) {
6611       xsp = jj_scanpos;
6612       if (jj_3R_131()) { jj_scanpos = xsp; break; }
6613       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6614     }
6615     return false;
6616   }
6617
6618   static final private boolean jj_3R_135() {
6619     if (jj_scan_token(GE)) return true;
6620     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6621     return false;
6622   }
6623
6624   static final private boolean jj_3R_134() {
6625     if (jj_scan_token(LE)) return true;
6626     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6627     return false;
6628   }
6629
6630   static final private boolean jj_3R_133() {
6631     if (jj_scan_token(GT)) return true;
6632     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6633     return false;
6634   }
6635
6636   static final private boolean jj_3R_132() {
6637     if (jj_scan_token(LT)) return true;
6638     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6639     return false;
6640   }
6641
6642   static final private boolean jj_3R_122() {
6643     Token xsp;
6644     xsp = jj_scanpos;
6645     if (jj_3R_132()) {
6646     jj_scanpos = xsp;
6647     if (jj_3R_133()) {
6648     jj_scanpos = xsp;
6649     if (jj_3R_134()) {
6650     jj_scanpos = xsp;
6651     if (jj_3R_135()) return true;
6652     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6653     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6654     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6655     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6656     if (jj_3R_121()) return true;
6657     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6658     return false;
6659   }
6660
6661   static final private boolean jj_3R_208() {
6662     if (jj_scan_token(COMMA)) return true;
6663     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6664     if (jj_3R_47()) return true;
6665     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6666     return false;
6667   }
6668
6669   static final private boolean jj_3R_119() {
6670     if (jj_3R_121()) return true;
6671     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6672     Token xsp;
6673     while (true) {
6674       xsp = jj_scanpos;
6675       if (jj_3R_122()) { jj_scanpos = xsp; break; }
6676       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6677     }
6678     return false;
6679   }
6680
6681   static final private boolean jj_3R_207() {
6682     if (jj_3R_47()) return true;
6683     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6684     Token xsp;
6685     while (true) {
6686       xsp = jj_scanpos;
6687       if (jj_3R_208()) { jj_scanpos = xsp; break; }
6688       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6689     }
6690     return false;
6691   }
6692
6693   static final private boolean jj_3R_200() {
6694     if (jj_scan_token(COMMA)) return true;
6695     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6696     return false;
6697   }
6698
6699   static final private boolean jj_3_3() {
6700     if (jj_scan_token(COMMA)) return true;
6701     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6702     if (jj_3R_40()) return true;
6703     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6704     return false;
6705   }
6706
6707   static final private boolean jj_3R_199() {
6708     if (jj_3R_40()) return true;
6709     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6710     Token xsp;
6711     while (true) {
6712       xsp = jj_scanpos;
6713       if (jj_3_3()) { jj_scanpos = xsp; break; }
6714       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6715     }
6716     return false;
6717   }
6718
6719   static final private boolean jj_3R_205() {
6720     if (jj_3R_207()) return true;
6721     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6722     return false;
6723   }
6724
6725   static final private boolean jj_3R_67() {
6726     if (jj_3R_48()) return true;
6727     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6728     return false;
6729   }
6730
6731   static final private boolean jj_3R_193() {
6732     if (jj_scan_token(LPAREN)) return true;
6733     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6734     Token xsp;
6735     xsp = jj_scanpos;
6736     if (jj_3R_199()) jj_scanpos = xsp;
6737     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6738     xsp = jj_scanpos;
6739     if (jj_3R_200()) jj_scanpos = xsp;
6740     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6741     if (jj_scan_token(RPAREN)) return true;
6742     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6743     return false;
6744   }
6745
6746   static final private boolean jj_3R_127() {
6747     if (jj_scan_token(TRIPLEEQUAL)) return true;
6748     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6749     return false;
6750   }
6751
6752   static final private boolean jj_3R_126() {
6753     if (jj_scan_token(BANGDOUBLEEQUAL)) return true;
6754     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6755     return false;
6756   }
6757
6758   static final private boolean jj_3R_125() {
6759     if (jj_scan_token(NOT_EQUAL)) return true;
6760     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6761     return false;
6762   }
6763
6764   static final private boolean jj_3R_124() {
6765     if (jj_scan_token(DIF)) return true;
6766     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6767     return false;
6768   }
6769
6770   static final private boolean jj_3R_123() {
6771     if (jj_scan_token(EQUAL_EQUAL)) return true;
6772     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6773     return false;
6774   }
6775
6776   static final private boolean jj_3R_201() {
6777     if (jj_scan_token(LPAREN)) return true;
6778     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6779     Token xsp;
6780     xsp = jj_scanpos;
6781     if (jj_3R_205()) jj_scanpos = xsp;
6782     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6783     if (jj_scan_token(RPAREN)) return true;
6784     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6785     return false;
6786   }
6787
6788   static final private boolean jj_3R_206() {
6789     if (jj_scan_token(ARRAYASSIGN)) return true;
6790     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6791     if (jj_3R_47()) return true;
6792     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6793     return false;
6794   }
6795
6796   static final private boolean jj_3R_120() {
6797     Token xsp;
6798     xsp = jj_scanpos;
6799     if (jj_3R_123()) {
6800     jj_scanpos = xsp;
6801     if (jj_3R_124()) {
6802     jj_scanpos = xsp;
6803     if (jj_3R_125()) {
6804     jj_scanpos = xsp;
6805     if (jj_3R_126()) {
6806     jj_scanpos = xsp;
6807     if (jj_3R_127()) return true;
6808     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6809     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6810     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6811     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6812     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6813     if (jj_3R_119()) return true;
6814     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6815     return false;
6816   }
6817
6818   static final private boolean jj_3R_117() {
6819     if (jj_3R_119()) return true;
6820     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6821     Token xsp;
6822     while (true) {
6823       xsp = jj_scanpos;
6824       if (jj_3R_120()) { jj_scanpos = xsp; break; }
6825       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6826     }
6827     return false;
6828   }
6829
6830   static final private boolean jj_3R_40() {
6831     if (jj_3R_47()) return true;
6832     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6833     Token xsp;
6834     xsp = jj_scanpos;
6835     if (jj_3R_206()) jj_scanpos = xsp;
6836     else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6837     return false;
6838   }
6839
6840   static final private boolean jj_3R_181() {
6841     if (jj_scan_token(NULL)) return true;
6842     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6843     return false;
6844   }
6845
6846   static final private boolean jj_3R_180() {
6847     if (jj_scan_token(FALSE)) return true;
6848     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6849     return false;
6850   }
6851
6852   static final private boolean jj_3R_51() {
6853     if (jj_3R_65()) return true;
6854     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6855     return false;
6856   }
6857
6858   static final private boolean jj_3R_179() {
6859     if (jj_scan_token(TRUE)) return true;
6860     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6861     return false;
6862   }
6863
6864   static final private boolean jj_3R_178() {
6865     if (jj_scan_token(STRING_LITERAL)) return true;
6866     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6867     return false;
6868   }
6869
6870   static final private boolean jj_3R_177() {
6871     if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
6872     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6873     return false;
6874   }
6875
6876   static final private boolean jj_3R_176() {
6877     if (jj_scan_token(INTEGER_LITERAL)) return true;
6878     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6879     return false;
6880   }
6881
6882   static final private boolean jj_3R_173() {
6883     Token xsp;
6884     xsp = jj_scanpos;
6885     if (jj_3R_176()) {
6886     jj_scanpos = xsp;
6887     if (jj_3R_177()) {
6888     jj_scanpos = xsp;
6889     if (jj_3R_178()) {
6890     jj_scanpos = xsp;
6891     if (jj_3R_179()) {
6892     jj_scanpos = xsp;
6893     if (jj_3R_180()) {
6894     jj_scanpos = xsp;
6895     if (jj_3R_181()) return true;
6896     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6897     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6898     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6899     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6900     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6901     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6902     return false;
6903   }
6904
6905   static final private boolean jj_3R_118() {
6906     if (jj_scan_token(BIT_AND)) return true;
6907     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6908     if (jj_3R_117()) return true;
6909     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6910     return false;
6911   }
6912
6913   static final private boolean jj_3R_52() {
6914     Token xsp;
6915     xsp = jj_scanpos;
6916     if (jj_3R_66()) {
6917     jj_scanpos = xsp;
6918     if (jj_3R_67()) return true;
6919     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6920     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6921     return false;
6922   }
6923
6924   static final private boolean jj_3R_66() {
6925     if (jj_3R_47()) return true;
6926     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6927     return false;
6928   }
6929
6930   static final private boolean jj_3R_113() {
6931     if (jj_3R_117()) return true;
6932     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6933     Token xsp;
6934     while (true) {
6935       xsp = jj_scanpos;
6936       if (jj_3R_118()) { jj_scanpos = xsp; break; }
6937       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
6938     }
6939     return false;
6940   }
6941
6942   static private boolean jj_initialized_once = false;
6943   static public PHPParserTokenManager token_source;
6944   static SimpleCharStream jj_input_stream;
6945   static public Token token, jj_nt;
6946   static private int jj_ntk;
6947   static private Token jj_scanpos, jj_lastpos;
6948   static private int jj_la;
6949   static public boolean lookingAhead = false;
6950   static private boolean jj_semLA;
6951   static private int jj_gen;
6952   static final private int[] jj_la1 = new int[129];
6953   static private int[] jj_la1_0;
6954   static private int[] jj_la1_1;
6955   static private int[] jj_la1_2;
6956   static private int[] jj_la1_3;
6957   static private int[] jj_la1_4;
6958   static {
6959       jj_la1_0();
6960       jj_la1_1();
6961       jj_la1_2();
6962       jj_la1_3();
6963       jj_la1_4();
6964    }
6965    private static void jj_la1_0() {
6966       jj_la1_0 = new int[] {0xf960001e,0x6,0x6,0xf960001e,0x0,0xf9600000,0x0,0xc00000,0xc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x68000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x68000000,0x60000000,0x60000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x8000000,0x0,0x8000000,0x8000000,0x0,0x0,0x0,0x8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x68000000,0x68000000,0x0,0x0,0x68000000,0x0,0x0,0x81000000,0xf9000000,0x8,0x6,0x0,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,0x68000000,0x68000000,0x68000000,0xf9000000,0xf9000000,0x68000000,0x0,0x68000000,0x68000000,};
6967    }
6968    private static void jj_la1_1() {
6969       jj_la1_1 = new int[] {0x875d507f,0x0,0x0,0x875d507f,0x0,0x875d507f,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3080000,0x200,0x30c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30c0000,0x0,0x0,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,0x0,0x0,0x0,0x40000,0x100,0x0,0x0,0x0,0x40000,0x0,0x0,0x30c0000,0x30c0000,0x80,0x3080000,0x30c0000,0x0,0x0,0x8451507f,0x875d507f,0x0,0x0,0xf,0x0,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,0x30c0000,0x30c0000,0x30c0000,0x875d507f,0x875d507f,0x30c0000,0x0,0x30c0000,0x30c0000,};
6970    }
6971    private static void jj_la1_2() {
6972       jj_la1_2 = new int[] {0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x13c1c00,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x800,0x800,0x0,0x0,0x0,0x0,0x0,0x0,0x300000,0x0,0x13c1c00,0x0,0x1000000,0x0,0x1000000,0x1000000,0x3fe,0x0,0x13c1c00,0x1000,0x0,0x0,0x4000,0x80010000,0x80010000,0x20000,0x20000,0x0,0x2000000,0x4000000,0x1000000,0x0,0x0,0x0,0x0,0x70000000,0x70000000,0x300000,0x300000,0x8c00000,0x8c00000,0x13c1c00,0x13c0800,0xc0000,0x1000800,0x3fe,0xc0000,0xc0000,0x1000000,0x1000800,0x0,0x0,0x0,0x0,0x800,0xbfe,0x800,0x13c1ffe,0x13c1ffe,0x0,0x0,0x13c1c00,0x0,0x400,0x400,0x13c1c00,0x0,0x0,0x0,0x800,0x0,0x800,0x0,0x0,0x0,0x0,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x0,0x0,0xc0000,0xc0000,0x10c0800,0x8000,0x0,0x0,0x13c1c00,0x13c1c00,0x0,0x0,0x13c1c00,0x13c1c00,0x13c1c00,0x0,0x0,0x13c1c00,0x0,0x0,0x13c9c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c9c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c1c00,0x13c9c00,0x13c1c00,0x0,0x13c1c00,0x13c1c00,};
6973    }
6974    private static void jj_la1_3() {
6975       jj_la1_3 = new int[] {0x2288a2,0x0,0x0,0x2288a2,0x200000,0x2288a2,0x0,0x0,0x0,0x400000,0x0,0x0,0x20800,0x0,0x20800,0x0,0x20800,0x20000,0x20800,0x22,0x22,0x8a2,0x0,0x88a2,0x400000,0x0,0x400000,0x0,0x0,0x0,0x0,0x88a2,0x0,0x0,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,0x0,0x0,0x0,0x800,0x0,0x8000,0x8000,0x8000,0x800,0x800,0x20800,0x88a2,0x88a2,0x80000,0xa2,0x88a2,0x400000,0x0,0x220800,0x2288a2,0x0,0x0,0x0,0x0,0x400000,0x0,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,0x88a2,0x88a2,0x88a2,0x2288a2,0x2288a2,0x88a2,0x400000,0x88a2,0x88a2,};
6976    }
6977    private static void jj_la1_4() {
6978       jj_la1_4 = new int[] {0x4000,0x0,0x0,0x4000,0x0,0x4000,0x0,0x0,0x0,0x0,0x2,0x2,0x4000,0x4000,0x4000,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x0,0x3ffe,0x4000,0x0,0x0,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,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x4000,0x0,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x4000,0x2,0x0,0x0,0x0,0x4000,0x4000,0x4000,0x4000,0x0,0x2,0x0,0x0,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,};
6979    }
6980   static final private JJCalls[] jj_2_rtns = new JJCalls[6];
6981   static private boolean jj_rescan = false;
6982   static private int jj_gc = 0;
6983
6984   public PHPParser(java.io.InputStream stream) {
6985     if (jj_initialized_once) {
6986       System.out.println("ERROR: Second call to constructor of static parser.  You must");
6987       System.out.println("       either use ReInit() or set the JavaCC option STATIC to false");
6988       System.out.println("       during parser generation.");
6989       throw new Error();
6990     }
6991     jj_initialized_once = true;
6992     jj_input_stream = new SimpleCharStream(stream, 1, 1);
6993     token_source = new PHPParserTokenManager(jj_input_stream);
6994     token = new Token();
6995     jj_ntk = -1;
6996     jj_gen = 0;
6997     for (int i = 0; i < 129; i++) jj_la1[i] = -1;
6998     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
6999   }
7000
7001   static public void ReInit(java.io.InputStream stream) {
7002     jj_input_stream.ReInit(stream, 1, 1);
7003     token_source.ReInit(jj_input_stream);
7004     token = new Token();
7005     jj_ntk = -1;
7006     jj_gen = 0;
7007     for (int i = 0; i < 129; i++) jj_la1[i] = -1;
7008     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7009   }
7010
7011   public PHPParser(java.io.Reader stream) {
7012     if (jj_initialized_once) {
7013       System.out.println("ERROR: Second call to constructor of static parser.  You must");
7014       System.out.println("       either use ReInit() or set the JavaCC option STATIC to false");
7015       System.out.println("       during parser generation.");
7016       throw new Error();
7017     }
7018     jj_initialized_once = true;
7019     jj_input_stream = new SimpleCharStream(stream, 1, 1);
7020     token_source = new PHPParserTokenManager(jj_input_stream);
7021     token = new Token();
7022     jj_ntk = -1;
7023     jj_gen = 0;
7024     for (int i = 0; i < 129; i++) jj_la1[i] = -1;
7025     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7026   }
7027
7028   static public void ReInit(java.io.Reader stream) {
7029     jj_input_stream.ReInit(stream, 1, 1);
7030     token_source.ReInit(jj_input_stream);
7031     token = new Token();
7032     jj_ntk = -1;
7033     jj_gen = 0;
7034     for (int i = 0; i < 129; i++) jj_la1[i] = -1;
7035     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7036   }
7037
7038   public PHPParser(PHPParserTokenManager tm) {
7039     if (jj_initialized_once) {
7040       System.out.println("ERROR: Second call to constructor of static parser.  You must");
7041       System.out.println("       either use ReInit() or set the JavaCC option STATIC to false");
7042       System.out.println("       during parser generation.");
7043       throw new Error();
7044     }
7045     jj_initialized_once = true;
7046     token_source = tm;
7047     token = new Token();
7048     jj_ntk = -1;
7049     jj_gen = 0;
7050     for (int i = 0; i < 129; i++) jj_la1[i] = -1;
7051     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7052   }
7053
7054   public void ReInit(PHPParserTokenManager tm) {
7055     token_source = tm;
7056     token = new Token();
7057     jj_ntk = -1;
7058     jj_gen = 0;
7059     for (int i = 0; i < 129; i++) jj_la1[i] = -1;
7060     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
7061   }
7062
7063   static final private Token jj_consume_token(int kind) throws ParseException {
7064     Token oldToken;
7065     if ((oldToken = token).next != null) token = token.next;
7066     else token = token.next = token_source.getNextToken();
7067     jj_ntk = -1;
7068     if (token.kind == kind) {
7069       jj_gen++;
7070       if (++jj_gc > 100) {
7071         jj_gc = 0;
7072         for (int i = 0; i < jj_2_rtns.length; i++) {
7073           JJCalls c = jj_2_rtns[i];
7074           while (c != null) {
7075             if (c.gen < jj_gen) c.first = null;
7076             c = c.next;
7077           }
7078         }
7079       }
7080       return token;
7081     }
7082     token = oldToken;
7083     jj_kind = kind;
7084     throw generateParseException();
7085   }
7086
7087   static final private boolean jj_scan_token(int kind) {
7088     if (jj_scanpos == jj_lastpos) {
7089       jj_la--;
7090       if (jj_scanpos.next == null) {
7091         jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
7092       } else {
7093         jj_lastpos = jj_scanpos = jj_scanpos.next;
7094       }
7095     } else {
7096       jj_scanpos = jj_scanpos.next;
7097     }
7098     if (jj_rescan) {
7099       int i = 0; Token tok = token;
7100       while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
7101       if (tok != null) jj_add_error_token(kind, i);
7102     }
7103     return (jj_scanpos.kind != kind);
7104   }
7105
7106   static final public Token getNextToken() {
7107     if (token.next != null) token = token.next;
7108     else token = token.next = token_source.getNextToken();
7109     jj_ntk = -1;
7110     jj_gen++;
7111     return token;
7112   }
7113
7114   static final public Token getToken(int index) {
7115     Token t = lookingAhead ? jj_scanpos : token;
7116     for (int i = 0; i < index; i++) {
7117       if (t.next != null) t = t.next;
7118       else t = t.next = token_source.getNextToken();
7119     }
7120     return t;
7121   }
7122
7123   static final private int jj_ntk() {
7124     if ((jj_nt=token.next) == null)
7125       return (jj_ntk = (token.next=token_source.getNextToken()).kind);
7126     else
7127       return (jj_ntk = jj_nt.kind);
7128   }
7129
7130   static private java.util.Vector jj_expentries = new java.util.Vector();
7131   static private int[] jj_expentry;
7132   static private int jj_kind = -1;
7133   static private int[] jj_lasttokens = new int[100];
7134   static private int jj_endpos;
7135
7136   static private void jj_add_error_token(int kind, int pos) {
7137     if (pos >= 100) return;
7138     if (pos == jj_endpos + 1) {
7139       jj_lasttokens[jj_endpos++] = kind;
7140     } else if (jj_endpos != 0) {
7141       jj_expentry = new int[jj_endpos];
7142       for (int i = 0; i < jj_endpos; i++) {
7143         jj_expentry[i] = jj_lasttokens[i];
7144       }
7145       boolean exists = false;
7146       for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
7147         int[] oldentry = (int[])(enum.nextElement());
7148         if (oldentry.length == jj_expentry.length) {
7149           exists = true;
7150           for (int i = 0; i < jj_expentry.length; i++) {
7151             if (oldentry[i] != jj_expentry[i]) {
7152               exists = false;
7153               break;
7154             }
7155           }
7156           if (exists) break;
7157         }
7158       }
7159       if (!exists) jj_expentries.addElement(jj_expentry);
7160       if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
7161     }
7162   }
7163
7164   static public ParseException generateParseException() {
7165     jj_expentries.removeAllElements();
7166     boolean[] la1tokens = new boolean[143];
7167     for (int i = 0; i < 143; i++) {
7168       la1tokens[i] = false;
7169     }
7170     if (jj_kind >= 0) {
7171       la1tokens[jj_kind] = true;
7172       jj_kind = -1;
7173     }
7174     for (int i = 0; i < 129; i++) {
7175       if (jj_la1[i] == jj_gen) {
7176         for (int j = 0; j < 32; j++) {
7177           if ((jj_la1_0[i] & (1<<j)) != 0) {
7178             la1tokens[j] = true;
7179           }
7180           if ((jj_la1_1[i] & (1<<j)) != 0) {
7181             la1tokens[32+j] = true;
7182           }
7183           if ((jj_la1_2[i] & (1<<j)) != 0) {
7184             la1tokens[64+j] = true;
7185           }
7186           if ((jj_la1_3[i] & (1<<j)) != 0) {
7187             la1tokens[96+j] = true;
7188           }
7189           if ((jj_la1_4[i] & (1<<j)) != 0) {
7190             la1tokens[128+j] = true;
7191           }
7192         }
7193       }
7194     }
7195     for (int i = 0; i < 143; i++) {
7196       if (la1tokens[i]) {
7197         jj_expentry = new int[1];
7198         jj_expentry[0] = i;
7199         jj_expentries.addElement(jj_expentry);
7200       }
7201     }
7202     jj_endpos = 0;
7203     jj_rescan_token();
7204     jj_add_error_token(0, 0);
7205     int[][] exptokseq = new int[jj_expentries.size()][];
7206     for (int i = 0; i < jj_expentries.size(); i++) {
7207       exptokseq[i] = (int[])jj_expentries.elementAt(i);
7208     }
7209     return new ParseException(token, exptokseq, tokenImage);
7210   }
7211
7212   static final public void enable_tracing() {
7213   }
7214
7215   static final public void disable_tracing() {
7216   }
7217
7218   static final private void jj_rescan_token() {
7219     jj_rescan = true;
7220     for (int i = 0; i < 6; i++) {
7221       JJCalls p = jj_2_rtns[i];
7222       do {
7223         if (p.gen > jj_gen) {
7224           jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
7225           switch (i) {
7226             case 0: jj_3_1(); break;
7227             case 1: jj_3_2(); break;
7228             case 2: jj_3_3(); break;
7229             case 3: jj_3_4(); break;
7230             case 4: jj_3_5(); break;
7231             case 5: jj_3_6(); break;
7232           }
7233         }
7234         p = p.next;
7235       } while (p != null);
7236     }
7237     jj_rescan = false;
7238   }
7239
7240   static final private void jj_save(int index, int xla) {
7241     JJCalls p = jj_2_rtns[index];
7242     while (p.gen > jj_gen) {
7243       if (p.next == null) { p = p.next = new JJCalls(); break; }
7244       p = p.next;
7245     }
7246     p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
7247   }
7248
7249   static final class JJCalls {
7250     int gen;
7251     Token first;
7252     int arg;
7253     JJCalls next;
7254   }
7255
7256 }