View Javadoc

1   /* Generated By:JJTree&JavaCC: Do not edit this line. Parser.java */
2   package org.apache.velocity.runtime.parser;
3   
4   import java.io.*;
5   import java.util.*;
6   import org.apache.velocity.exception.VelocityException;
7   import org.apache.velocity.runtime.RuntimeServices;
8   import org.apache.velocity.runtime.parser.node.*;
9   import org.apache.velocity.runtime.directive.Directive;
10  import org.apache.velocity.runtime.directive.Macro;
11  import org.apache.velocity.runtime.directive.MacroParseException;
12  import org.apache.velocity.util.StringUtils;
13  
14  /**
15   * This class is responsible for parsing a Velocity
16   * template. This class was generated by JavaCC using
17   * the JJTree extension to produce an Abstract
18   * Syntax Tree (AST) of the template.
19   *
20   * Please look at the Parser.jjt file which is
21   * what controls the generation of this class.
22   *
23   * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
24   * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
25   * @author <a href="hps@intermeta.de">Henning P. Schmiedehausen</a>
26   * @version $Id: Parser.java 736127 2009-01-20 21:59:00Z byron $
27  */
28  public class Parser/*@bgen(jjtree)*/implements ParserTreeConstants, ParserConstants {/*@bgen(jjtree)*/
29    protected JJTParserState jjtree = new JJTParserState();/**
30       *  This Hashtable contains a list of all of the dynamic directives.
31       */
32      private Hashtable directives = new Hashtable(0);
33  
34      /**
35       *  Name of current template we are parsing.  Passed to us in parse()
36       */
37      public String currentTemplateName = "";
38  
39      VelocityCharStream velcharstream = null;
40  
41      private RuntimeServices rsvc = null;
42  
43      /**
44       * This constructor was added to allow the re-use of parsers.
45       * The normal constructor takes a single argument which
46       * an InputStream. This simply creates a re-usable parser
47       * object, we satisfy the requirement of an InputStream
48       * by using a newline character as an input stream.
49       */
50      public Parser( RuntimeServices rs)
51      {
52          /*
53           * need to call the CTOR first thing.
54           */
55  
56          this(   new VelocityCharStream(
57                  new ByteArrayInputStream("\n".getBytes()), 1, 1 ));
58  
59          /*
60           * now setup a VCS for later use
61           */
62          velcharstream = new VelocityCharStream(
63                  new ByteArrayInputStream("\n".getBytes()), 1, 1 );
64  
65          /*
66           *  and save the RuntimeServices
67           */
68          rsvc = rs;
69      }
70  
71      /**
72       * This was also added to allow parsers to be
73       * re-usable. Normal JavaCC use entails passing an
74       * input stream to the constructor and the parsing
75       * process is carried out once. We want to be able
76       * to re-use parsers: we do this by adding this
77       * method and re-initializing the lexer with
78       * the new stream that we want parsed.
79       */
80      public SimpleNode parse( Reader reader, String templateName )
81          throws ParseException
82      {
83          SimpleNode sn = null;
84  
85          currentTemplateName = templateName;
86  
87          try
88          {
89              token_source.clearStateVars();
90  
91              /*
92               *  reinitialize the VelocityCharStream
93               *  with the new reader
94               */
95              velcharstream.ReInit( reader, 1, 1 );
96  
97              /*
98               * now reinit the Parser with this CharStream
99               */
100             ReInit( velcharstream  );
101 
102             /*
103              *  do that voodoo...
104              */
105             sn = process();
106         }
107         catch (MacroParseException mee)
108         {
109             /*
110              *  thrown by the Macro class when something is amiss in the
111              *  Macro specification
112              */
113             rsvc.getLog().error("Parser Error: " + templateName, mee);
114             throw mee;
115         }
116         catch (ParseException pe)
117         {
118             rsvc.getLog().error("Parser Exception: " + templateName, pe);
119             throw new TemplateParseException (pe.currentToken,
120                                 pe.expectedTokenSequences, pe.tokenImage, currentTemplateName);
121                 }
122         catch (TokenMgrError tme)
123         {
124             throw new ParseException("Lexical error: " + tme.toString());
125         }
126         catch (Exception e)
127         {
128             String msg = "Parser Error: " + templateName;
129             rsvc.getLog().error(msg, e);
130             throw new VelocityException(msg, e);
131         }
132 
133         currentTemplateName = "";
134 
135         return sn;
136     }
137 
138     /**
139      *  This method sets the directives Hashtable
140      */
141     public void setDirectives(Hashtable directives)
142     {
143         this.directives = directives;
144     }
145 
146     /**
147      *  This method gets a Directive from the directives Hashtable
148      */
149     public Directive getDirective(String directive)
150     {
151         return (Directive) directives.get(directive);
152     }
153 
154     /**
155      *  This method finds out of the directive exists in the directives
156      *  Hashtable.
157      */
158     public boolean isDirective(String directive)
159     {
160         return directives.containsKey(directive);
161     }
162 
163 
164     /**
165      * Produces a processed output for an escaped control or
166      * pluggable directive
167      */
168     private String escapedDirective( String strImage )
169     {
170         int iLast = strImage.lastIndexOf("\\");
171 
172         String strDirective = strImage.substring(iLast + 1);
173 
174         boolean bRecognizedDirective = false;
175 
176         // we don't have to call substring method all the time in this method
177         String dirTag = strDirective.substring(1);
178         if (dirTag.charAt(0) == '{')
179         {
180             dirTag = dirTag.substring(1, dirTag.length() - 1);
181         }
182 
183         /*
184          *  is this a PD or a control directive?
185          */
186 
187         if ( isDirective(dirTag) )
188         {
189            bRecognizedDirective = true;
190         }
191         else if ( rsvc.isVelocimacro(dirTag, currentTemplateName))
192         {
193             bRecognizedDirective = true;
194         }
195         else
196         {
197             /* order for speed? */
198 
199             if ( dirTag.equals("if")
200                 || dirTag.equals("end")
201                 || dirTag.equals("set")
202                 || dirTag.equals("else")
203                 || dirTag.equals("elseif")
204                 || dirTag.equals("stop")
205             )
206             {
207                 bRecognizedDirective = true;
208             }
209         }
210 
211         /*
212          *  if so, make the proper prefix string (let the escapes do their thing..)
213          *  otherwise, just return what it is..
214          */
215 
216         if (bRecognizedDirective)
217             return ( strImage.substring(0,iLast/2) + strDirective);
218         else
219             return ( strImage );
220     }
221 
222     /**
223      * Check whether there is a left parenthesis with leading optional
224      * whitespaces. This method is used in the semantic look ahead of
225      * Directive method. This is done in code instead of as a production
226      * for simplicity and efficiency.
227      */
228     private boolean isLeftParenthesis()
229     {
230         char c;
231         int no = 0;
232         try {
233             while(true)
234             {
235                 /**
236                  * Read a character
237                  */
238                 c = velcharstream.readChar();
239                 no++;
240                 if (c == '(')
241                 {
242                     return true;
243                 }
244                 /**
245                  * if not a white space return
246                  */
247                 else if (c != ' ' && c != '\n' && c != '\r' && c != '\t')
248                 {
249                     return false;
250                 }
251             }
252         }
253         catch (IOException e)
254         {
255         }
256         finally
257         {
258             /**
259              * Backup the stream to the initial state
260              */
261             velcharstream.backup(no);
262         }
263         return false;
264     }
265 
266 /**
267  * This method is what starts the whole parsing
268  * process. After the parsing is complete and
269  * the template has been turned into an AST,
270  * this method returns the root of AST which
271  * can subsequently be traversed by a visitor
272  * which implements the ParserVisitor interface
273  * which is generated automatically by JavaCC
274  */
275   final public SimpleNode process() throws ParseException {
276                         /*@bgen(jjtree) process */
277   ASTprocess jjtn000 = new ASTprocess(this, JJTPROCESS);
278   boolean jjtc000 = true;
279   jjtree.openNodeScope(jjtn000);
280     try {
281       label_1:
282       while (true) {
283         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
284         case LPAREN:
285         case RPAREN:
286         case ESCAPE_DIRECTIVE:
287         case SET_DIRECTIVE:
288         case SINGLE_LINE_COMMENT_START:
289         case DOUBLE_ESCAPE:
290         case ESCAPE:
291         case TEXT:
292         case FORMAL_COMMENT:
293         case MULTI_LINE_COMMENT:
294         case STRING_LITERAL:
295         case IF_DIRECTIVE:
296         case STOP_DIRECTIVE:
297         case INTEGER_LITERAL:
298         case FLOATING_POINT_LITERAL:
299         case WORD:
300         case BRACKETED_WORD:
301         case IDENTIFIER:
302         case DOT:
303         case LCURLY:
304         case RCURLY:
305           ;
306           break;
307         default:
308           jj_la1[0] = jj_gen;
309           break label_1;
310         }
311         Statement();
312       }
313       jj_consume_token(0);
314      jjtree.closeNodeScope(jjtn000, true);
315      jjtc000 = false;
316      {if (true) return jjtn000;}
317     } catch (Throwable jjte000) {
318      if (jjtc000) {
319        jjtree.clearNodeScope(jjtn000);
320        jjtc000 = false;
321      } else {
322        jjtree.popNode();
323      }
324      if (jjte000 instanceof RuntimeException) {
325        {if (true) throw (RuntimeException)jjte000;}
326      }
327      if (jjte000 instanceof ParseException) {
328        {if (true) throw (ParseException)jjte000;}
329      }
330      {if (true) throw (Error)jjte000;}
331     } finally {
332      if (jjtc000) {
333        jjtree.closeNodeScope(jjtn000, true);
334      }
335     }
336     throw new Error("Missing return statement in function");
337   }
338 
339 /**
340  * These are the types of statements that
341  * are acceptable in Velocity templates.
342  */
343   final public void Statement() throws ParseException {
344     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
345     case IF_DIRECTIVE:
346       IfStatement();
347       break;
348     case STOP_DIRECTIVE:
349       StopStatement();
350       break;
351     default:
352       jj_la1[1] = jj_gen;
353       if (jj_2_1(2)) {
354         Reference();
355       } else {
356         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
357         case SINGLE_LINE_COMMENT_START:
358         case FORMAL_COMMENT:
359         case MULTI_LINE_COMMENT:
360           Comment();
361           break;
362         case SET_DIRECTIVE:
363           SetDirective();
364           break;
365         case ESCAPE_DIRECTIVE:
366           EscapedDirective();
367           break;
368         case DOUBLE_ESCAPE:
369           Escape();
370           break;
371         case WORD:
372         case BRACKETED_WORD:
373           Directive();
374           break;
375         case LPAREN:
376         case RPAREN:
377         case ESCAPE:
378         case TEXT:
379         case STRING_LITERAL:
380         case INTEGER_LITERAL:
381         case FLOATING_POINT_LITERAL:
382         case DOT:
383         case LCURLY:
384         case RCURLY:
385           Text();
386           break;
387         default:
388           jj_la1[2] = jj_gen;
389           jj_consume_token(-1);
390           throw new ParseException();
391         }
392       }
393     }
394   }
395 
396 /**
397  *  used to separate the notion of a valid directive that has been
398  *  escaped, versus something that looks like a directive and
399  *  is just schmoo.  This is important to do as a separate production
400  *  that creates a node, because we want this, in either case, to stop
401  *  the further parsing of the Directive() tree.
402  */
403   final public void EscapedDirective() throws ParseException {
404                            /*@bgen(jjtree) EscapedDirective */
405   ASTEscapedDirective jjtn000 = new ASTEscapedDirective(this, JJTESCAPEDDIRECTIVE);
406   boolean jjtc000 = true;
407   jjtree.openNodeScope(jjtn000);
408     try {
409         Token t = null;
410       t = jj_consume_token(ESCAPE_DIRECTIVE);
411       jjtree.closeNodeScope(jjtn000, true);
412       jjtc000 = false;
413         /*
414          *  churn and burn..
415          */
416         t.image = escapedDirective( t.image );
417     } finally {
418       if (jjtc000) {
419         jjtree.closeNodeScope(jjtn000, true);
420       }
421     }
422   }
423 
424 /**
425  *  Used to catch and process escape sequences in grammatical constructs
426  *  as escapes outside of VTL are just characters.  Right now we have both
427  *  this and the EscapeDirective() construction because in the EscapeDirective()
428  *  case, we want to suck in the #<directive> and here we don't.  We just want
429  *  the escapes to render correctly
430  */
431   final public void Escape() throws ParseException {
432                  /*@bgen(jjtree) Escape */
433   ASTEscape jjtn000 = new ASTEscape(this, JJTESCAPE);
434   boolean jjtc000 = true;
435   jjtree.openNodeScope(jjtn000);
436     try {
437         Token t = null;
438         int count = 0;
439         boolean control = false;
440       label_2:
441       while (true) {
442         t = jj_consume_token(DOUBLE_ESCAPE);
443         count++;
444         if (jj_2_2(2)) {
445           ;
446         } else {
447           break label_2;
448         }
449       }
450       jjtree.closeNodeScope(jjtn000, true);
451       jjtc000 = false;
452         /*
453          * first, check to see if we have a control directive
454          */
455         switch(t.next.kind ) {
456             case IF_DIRECTIVE :
457             case ELSE_DIRECTIVE :
458             case ELSEIF_DIRECTIVE :
459             case END :
460             case STOP_DIRECTIVE :
461                 control = true;
462                 break;
463         }
464 
465         /*
466          * if that failed, lets lookahead to see if we matched a PD or a VM
467          */
468         String nTag = t.next.image.substring(1);
469 
470         if ( isDirective(nTag) )
471             control = true;
472         else if ( rsvc.isVelocimacro(nTag, currentTemplateName))
473             control = true;
474 
475         jjtn000.val = "";
476 
477         for( int i = 0; i < count; i++)
478             jjtn000.val += ( control ? "\\" : "\\\\");
479     } finally {
480       if (jjtc000) {
481         jjtree.closeNodeScope(jjtn000, true);
482       }
483     }
484   }
485 
486   final public void Comment() throws ParseException {
487                   /*@bgen(jjtree) Comment */
488   ASTComment jjtn000 = new ASTComment(this, JJTCOMMENT);
489   boolean jjtc000 = true;
490   jjtree.openNodeScope(jjtn000);
491     try {
492       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
493       case SINGLE_LINE_COMMENT_START:
494         jj_consume_token(SINGLE_LINE_COMMENT_START);
495         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
496         case SINGLE_LINE_COMMENT:
497           jj_consume_token(SINGLE_LINE_COMMENT);
498           break;
499         default:
500           jj_la1[3] = jj_gen;
501           ;
502         }
503         break;
504       case MULTI_LINE_COMMENT:
505         jj_consume_token(MULTI_LINE_COMMENT);
506         break;
507       case FORMAL_COMMENT:
508         jj_consume_token(FORMAL_COMMENT);
509         break;
510       default:
511         jj_la1[4] = jj_gen;
512         jj_consume_token(-1);
513         throw new ParseException();
514       }
515     } finally {
516           if (jjtc000) {
517             jjtree.closeNodeScope(jjtn000, true);
518           }
519     }
520   }
521 
522   final public void FloatingPointLiteral() throws ParseException {
523                                /*@bgen(jjtree) FloatingPointLiteral */
524   ASTFloatingPointLiteral jjtn000 = new ASTFloatingPointLiteral(this, JJTFLOATINGPOINTLITERAL);
525   boolean jjtc000 = true;
526   jjtree.openNodeScope(jjtn000);
527     try {
528       jj_consume_token(FLOATING_POINT_LITERAL);
529     } finally {
530       if (jjtc000) {
531         jjtree.closeNodeScope(jjtn000, true);
532       }
533     }
534   }
535 
536   final public void IntegerLiteral() throws ParseException {
537                          /*@bgen(jjtree) IntegerLiteral */
538   ASTIntegerLiteral jjtn000 = new ASTIntegerLiteral(this, JJTINTEGERLITERAL);
539   boolean jjtc000 = true;
540   jjtree.openNodeScope(jjtn000);
541     try {
542       jj_consume_token(INTEGER_LITERAL);
543     } finally {
544        if (jjtc000) {
545          jjtree.closeNodeScope(jjtn000, true);
546        }
547     }
548   }
549 
550   final public void StringLiteral() throws ParseException {
551                         /*@bgen(jjtree) StringLiteral */
552   ASTStringLiteral jjtn000 = new ASTStringLiteral(this, JJTSTRINGLITERAL);
553   boolean jjtc000 = true;
554   jjtree.openNodeScope(jjtn000);
555     try {
556       jj_consume_token(STRING_LITERAL);
557     } finally {
558       if (jjtc000) {
559         jjtree.closeNodeScope(jjtn000, true);
560       }
561     }
562   }
563 
564 /**
565  * This method corresponds to variable
566  * references in Velocity templates.
567  * The following are examples of variable
568  * references that may be found in a
569  * template:
570  *
571  * $foo
572  * $bar
573  *
574  */
575   final public void Identifier() throws ParseException {
576                      /*@bgen(jjtree) Identifier */
577   ASTIdentifier jjtn000 = new ASTIdentifier(this, JJTIDENTIFIER);
578   boolean jjtc000 = true;
579   jjtree.openNodeScope(jjtn000);
580     try {
581       jj_consume_token(IDENTIFIER);
582     } finally {
583       if (jjtc000) {
584         jjtree.closeNodeScope(jjtn000, true);
585       }
586     }
587   }
588 
589   final public void Word() throws ParseException {
590                /*@bgen(jjtree) Word */
591   ASTWord jjtn000 = new ASTWord(this, JJTWORD);
592   boolean jjtc000 = true;
593   jjtree.openNodeScope(jjtn000);
594     try {
595       jj_consume_token(WORD);
596     } finally {
597       if (jjtc000) {
598         jjtree.closeNodeScope(jjtn000, true);
599       }
600     }
601   }
602 
603 /**
604  *   Supports the arguments for the Pluggable Directives
605  */
606   final public int DirectiveArg() throws ParseException {
607     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
608     case IDENTIFIER:
609     case LCURLY:
610       Reference();
611         {if (true) return ParserTreeConstants.JJTREFERENCE;}
612       break;
613     case WORD:
614       Word();
615         {if (true) return ParserTreeConstants.JJTWORD;}
616       break;
617     case STRING_LITERAL:
618       StringLiteral();
619         {if (true) return ParserTreeConstants.JJTSTRINGLITERAL;}
620       break;
621     case INTEGER_LITERAL:
622       IntegerLiteral();
623         {if (true) return ParserTreeConstants.JJTINTEGERLITERAL;}
624       break;
625     default:
626       jj_la1[5] = jj_gen;
627       if (jj_2_3(2147483647)) {
628         IntegerRange();
629         {if (true) return ParserTreeConstants.JJTINTEGERRANGE;}
630       } else {
631         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
632         case FLOATING_POINT_LITERAL:
633           FloatingPointLiteral();
634         {if (true) return ParserTreeConstants.JJTFLOATINGPOINTLITERAL;}
635           break;
636         case LEFT_CURLEY:
637           Map();
638         {if (true) return ParserTreeConstants.JJTMAP;}
639           break;
640         case LBRACKET:
641           ObjectArray();
642         {if (true) return ParserTreeConstants.JJTOBJECTARRAY;}
643           break;
644         case TRUE:
645           True();
646         {if (true) return ParserTreeConstants.JJTTRUE;}
647           break;
648         case FALSE:
649           False();
650         {if (true) return ParserTreeConstants.JJTFALSE;}
651           break;
652         default:
653           jj_la1[6] = jj_gen;
654           jj_consume_token(-1);
655           throw new ParseException();
656         }
657       }
658     }
659     throw new Error("Missing return statement in function");
660   }
661 
662 /**
663  *   Supports the Pluggable Directives
664  *     #foo( arg+ )
665  */
666   final public SimpleNode Directive() throws ParseException {
667  /*@bgen(jjtree) Directive */
668     ASTDirective jjtn000 = new ASTDirective(this, JJTDIRECTIVE);
669     boolean jjtc000 = true;
670     jjtree.openNodeScope(jjtn000);Token t = null;
671     int argType;
672     int argPos = 0;
673     Directive d;
674     int directiveType;
675     boolean isVM = false;
676     boolean doItNow = false;
677     try {
678       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
679       case WORD:
680         t = jj_consume_token(WORD);
681         break;
682       case BRACKETED_WORD:
683         t = jj_consume_token(BRACKETED_WORD);
684         break;
685       default:
686         jj_la1[7] = jj_gen;
687         jj_consume_token(-1);
688         throw new ParseException();
689       }
690         String directiveName;
691         if (t.kind == ParserConstants.BRACKETED_WORD)
692         {
693             directiveName = t.image.substring(2, t.image.length() - 1);
694         }
695         else
696         {
697             directiveName = t.image.substring(1);
698         }
699 
700         d = (Directive) directives.get(directiveName);
701 
702         /*
703          *  Velocimacro support : if the directive is macro directive
704          *   then set the flag so after the block parsing, we add the VM
705          *   right then. (So available if used w/in the current template )
706          */
707 
708         if (directiveName.equals("macro"))
709         {
710              doItNow = true;
711         }
712 
713         /*
714          * set the directive name from here.  No reason for the thing to know
715          * about parser tokens
716          */
717 
718         jjtn000.setDirectiveName(directiveName);
719 
720         if ( d == null)
721         {
722             /*
723              *  if null, then not a real directive, but maybe a Velocimacro
724              */
725 
726             isVM = rsvc.isVelocimacro(directiveName, currentTemplateName);
727 
728             /*
729              *  Currently, all VMs are LINE directives
730              */
731 
732             directiveType = Directive.LINE;
733         }
734         else
735         {
736             directiveType = d.getType();
737         }
738 
739         /*
740          *  now, switch us out of PRE_DIRECTIVE
741          */
742 
743         token_source.SwitchTo(DIRECTIVE);
744 
745         argPos = 0;
746       if (isLeftParenthesis()) {
747         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
748         case WHITESPACE:
749           jj_consume_token(WHITESPACE);
750           break;
751         default:
752           jj_la1[8] = jj_gen;
753           ;
754         }
755         jj_consume_token(LPAREN);
756         label_3:
757         while (true) {
758           if (jj_2_4(2)) {
759             ;
760           } else {
761             break label_3;
762           }
763           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
764           case WHITESPACE:
765             jj_consume_token(WHITESPACE);
766             break;
767           default:
768             jj_la1[9] = jj_gen;
769             ;
770           }
771           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
772           case COMMA:
773             jj_consume_token(COMMA);
774             switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
775             case WHITESPACE:
776               jj_consume_token(WHITESPACE);
777               break;
778             default:
779               jj_la1[10] = jj_gen;
780               ;
781             }
782             break;
783           default:
784             jj_la1[11] = jj_gen;
785             ;
786           }
787           argType = DirectiveArg();
788                 if (argType == ParserTreeConstants.JJTWORD)
789                 {
790                     if (doItNow && argPos == 0)
791                     {
792                         /* if #macro and it's the 0th arg, ok */
793                     }
794                     else if (isVM)
795                     {
796                         {if (true) throw new MacroParseException("Invalid arg #"
797                         + argPos + " in VM " + t.image, currentTemplateName, t);}
798                     }
799                                           /* if #foreach and it's the 2nd arg, ok */
800                     else if (d != null && (!directiveName.equals("foreach") || argPos != 1))
801                     {
802                         {if (true) throw new MacroParseException("Invalid arg #"
803                         + argPos + " in directive " + t.image, currentTemplateName, t);}
804                     }
805                     else
806                     {
807                         /* either schmoo or a late-defined macro,
808                          * VelocimacroProxy will have to check for latter. */
809                     }
810                 }
811                 else
812                 {
813                     if (doItNow && argPos == 0)
814                     {
815                         /* if a VM and it's the 0th arg, not ok */
816 
817                         {if (true) throw new MacroParseException("Invalid first arg"
818                         + " in #macro() directive - must be a"
819                         + " word token (no \' or \" surrounding)", currentTemplateName, t);}
820                     }
821                 }
822 
823                 argPos++;
824         }
825         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
826         case WHITESPACE:
827           jj_consume_token(WHITESPACE);
828           break;
829         default:
830           jj_la1[12] = jj_gen;
831           ;
832         }
833         jj_consume_token(RPAREN);
834         if (directiveType  == Directive.LINE)
835         {
836             {if (true) return jjtn000;}
837         }
838       } else {
839         if (doItNow)  // doItNow is true if the directive is "macro"
840         {
841             // VELOCITY-667 We get here if we have a "#macro" construct
842             // without parenthesis which is a parse error
843             {if (true) throw new MacroParseException("A macro declaration requires at least a name argument"
844               , currentTemplateName, t);}
845         }
846 
847         /**
848          * Not a directive
849          */
850         token_source.stateStackPop();
851         token_source.inDirective = false;
852         {if (true) return jjtn000;}
853       }
854       ASTBlock jjtn001 = new ASTBlock(this, JJTBLOCK);
855       boolean jjtc001 = true;
856       jjtree.openNodeScope(jjtn001);
857       try {
858         label_4:
859         while (true) {
860           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
861           case LPAREN:
862           case RPAREN:
863           case ESCAPE_DIRECTIVE:
864           case SET_DIRECTIVE:
865           case SINGLE_LINE_COMMENT_START:
866           case DOUBLE_ESCAPE:
867           case ESCAPE:
868           case TEXT:
869           case FORMAL_COMMENT:
870           case MULTI_LINE_COMMENT:
871           case STRING_LITERAL:
872           case IF_DIRECTIVE:
873           case STOP_DIRECTIVE:
874           case INTEGER_LITERAL:
875           case FLOATING_POINT_LITERAL:
876           case WORD:
877           case BRACKETED_WORD:
878           case IDENTIFIER:
879           case DOT:
880           case LCURLY:
881           case RCURLY:
882             ;
883             break;
884           default:
885             jj_la1[13] = jj_gen;
886             break label_4;
887           }
888           Statement();
889         }
890       } catch (Throwable jjte001) {
891       if (jjtc001) {
892         jjtree.clearNodeScope(jjtn001);
893         jjtc001 = false;
894       } else {
895         jjtree.popNode();
896       }
897       if (jjte001 instanceof RuntimeException) {
898         {if (true) throw (RuntimeException)jjte001;}
899       }
900       if (jjte001 instanceof ParseException) {
901         {if (true) throw (ParseException)jjte001;}
902       }
903       {if (true) throw (Error)jjte001;}
904       } finally {
905       if (jjtc001) {
906         jjtree.closeNodeScope(jjtn001, true);
907       }
908       }
909       jj_consume_token(END);
910       jjtree.closeNodeScope(jjtn000, true);
911       jjtc000 = false;
912         /*
913          *  VM : if we are processing a #macro directive, we need to
914          *     process the block.  In truth, I can just register the name
915          *     and do the work later when init-ing.  That would work
916          *     as long as things were always defined before use.  This way
917          *     we don't have to worry about forward references and such...
918          */
919 
920         if (doItNow)
921         {
922             Macro.processAndRegister(rsvc, t, jjtn000, currentTemplateName);
923         }
924 
925         /*
926          *  VM : end
927          */
928 
929         {if (true) return jjtn000;}
930     } catch (Throwable jjte000) {
931       if (jjtc000) {
932         jjtree.clearNodeScope(jjtn000);
933         jjtc000 = false;
934       } else {
935         jjtree.popNode();
936       }
937       if (jjte000 instanceof RuntimeException) {
938         {if (true) throw (RuntimeException)jjte000;}
939       }
940       if (jjte000 instanceof ParseException) {
941         {if (true) throw (ParseException)jjte000;}
942       }
943       {if (true) throw (Error)jjte000;}
944     } finally {
945       if (jjtc000) {
946         jjtree.closeNodeScope(jjtn000, true);
947       }
948     }
949     throw new Error("Missing return statement in function");
950   }
951 
952 /**
953  * for creating a map in a #set
954  *
955  *  #set($foo = {$foo : $bar, $blargh : $thingy})
956  */
957   final public void Map() throws ParseException {
958               /*@bgen(jjtree) Map */
959   ASTMap jjtn000 = new ASTMap(this, JJTMAP);
960   boolean jjtc000 = true;
961   jjtree.openNodeScope(jjtn000);
962     try {
963       jj_consume_token(LEFT_CURLEY);
964       if (jj_2_5(2)) {
965         Parameter();
966         jj_consume_token(COLON);
967         Parameter();
968         label_5:
969         while (true) {
970           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
971           case COMMA:
972             ;
973             break;
974           default:
975             jj_la1[14] = jj_gen;
976             break label_5;
977           }
978           jj_consume_token(COMMA);
979           Parameter();
980           jj_consume_token(COLON);
981           Parameter();
982         }
983       } else {
984         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
985         case WHITESPACE:
986           jj_consume_token(WHITESPACE);
987           break;
988         default:
989           jj_la1[15] = jj_gen;
990           ;
991         }
992       }
993       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
994       case RIGHT_CURLEY:
995         jj_consume_token(RIGHT_CURLEY);
996         break;
997       case RCURLY:
998         jj_consume_token(RCURLY);
999         break;
1000       default:
1001         jj_la1[16] = jj_gen;
1002         jj_consume_token(-1);
1003         throw new ParseException();
1004       }
1005     } catch (Throwable jjte000) {
1006       if (jjtc000) {
1007         jjtree.clearNodeScope(jjtn000);
1008         jjtc000 = false;
1009       } else {
1010         jjtree.popNode();
1011       }
1012       if (jjte000 instanceof RuntimeException) {
1013         {if (true) throw (RuntimeException)jjte000;}
1014       }
1015       if (jjte000 instanceof ParseException) {
1016         {if (true) throw (ParseException)jjte000;}
1017       }
1018       {if (true) throw (Error)jjte000;}
1019     } finally {
1020       if (jjtc000) {
1021         jjtree.closeNodeScope(jjtn000, true);
1022       }
1023     }
1024   }
1025 
1026   final public void ObjectArray() throws ParseException {
1027                       /*@bgen(jjtree) ObjectArray */
1028   ASTObjectArray jjtn000 = new ASTObjectArray(this, JJTOBJECTARRAY);
1029   boolean jjtc000 = true;
1030   jjtree.openNodeScope(jjtn000);
1031     try {
1032       jj_consume_token(LBRACKET);
1033       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1034       case LBRACKET:
1035       case LEFT_CURLEY:
1036       case WHITESPACE:
1037       case STRING_LITERAL:
1038       case TRUE:
1039       case FALSE:
1040       case INTEGER_LITERAL:
1041       case FLOATING_POINT_LITERAL:
1042       case IDENTIFIER:
1043       case LCURLY:
1044         Parameter();
1045         label_6:
1046         while (true) {
1047           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1048           case COMMA:
1049             ;
1050             break;
1051           default:
1052             jj_la1[17] = jj_gen;
1053             break label_6;
1054           }
1055           jj_consume_token(COMMA);
1056           Parameter();
1057         }
1058         break;
1059       default:
1060         jj_la1[18] = jj_gen;
1061         ;
1062       }
1063       jj_consume_token(RBRACKET);
1064     } catch (Throwable jjte000) {
1065       if (jjtc000) {
1066         jjtree.clearNodeScope(jjtn000);
1067         jjtc000 = false;
1068       } else {
1069         jjtree.popNode();
1070       }
1071       if (jjte000 instanceof RuntimeException) {
1072         {if (true) throw (RuntimeException)jjte000;}
1073       }
1074       if (jjte000 instanceof ParseException) {
1075         {if (true) throw (ParseException)jjte000;}
1076       }
1077       {if (true) throw (Error)jjte000;}
1078     } finally {
1079       if (jjtc000) {
1080         jjtree.closeNodeScope(jjtn000, true);
1081       }
1082     }
1083   }
1084 
1085 /**
1086  *  supports the [n..m] vector generator for use in
1087  *  the #foreach() to generate measured ranges w/o
1088  *  needing explicit support from the app/servlet
1089  */
1090   final public void IntegerRange() throws ParseException {
1091                        /*@bgen(jjtree) IntegerRange */
1092   ASTIntegerRange jjtn000 = new ASTIntegerRange(this, JJTINTEGERRANGE);
1093   boolean jjtc000 = true;
1094   jjtree.openNodeScope(jjtn000);
1095     try {
1096       jj_consume_token(LBRACKET);
1097       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1098       case WHITESPACE:
1099         jj_consume_token(WHITESPACE);
1100         break;
1101       default:
1102         jj_la1[19] = jj_gen;
1103         ;
1104       }
1105       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1106       case IDENTIFIER:
1107       case LCURLY:
1108         Reference();
1109         break;
1110       case INTEGER_LITERAL:
1111         IntegerLiteral();
1112         break;
1113       default:
1114         jj_la1[20] = jj_gen;
1115         jj_consume_token(-1);
1116         throw new ParseException();
1117       }
1118       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1119       case WHITESPACE:
1120         jj_consume_token(WHITESPACE);
1121         break;
1122       default:
1123         jj_la1[21] = jj_gen;
1124         ;
1125       }
1126       jj_consume_token(DOUBLEDOT);
1127       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1128       case WHITESPACE:
1129         jj_consume_token(WHITESPACE);
1130         break;
1131       default:
1132         jj_la1[22] = jj_gen;
1133         ;
1134       }
1135       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1136       case IDENTIFIER:
1137       case LCURLY:
1138         Reference();
1139         break;
1140       case INTEGER_LITERAL:
1141         IntegerLiteral();
1142         break;
1143       default:
1144         jj_la1[23] = jj_gen;
1145         jj_consume_token(-1);
1146         throw new ParseException();
1147       }
1148       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1149       case WHITESPACE:
1150         jj_consume_token(WHITESPACE);
1151         break;
1152       default:
1153         jj_la1[24] = jj_gen;
1154         ;
1155       }
1156       jj_consume_token(RBRACKET);
1157     } catch (Throwable jjte000) {
1158       if (jjtc000) {
1159         jjtree.clearNodeScope(jjtn000);
1160         jjtc000 = false;
1161       } else {
1162         jjtree.popNode();
1163       }
1164       if (jjte000 instanceof RuntimeException) {
1165         {if (true) throw (RuntimeException)jjte000;}
1166       }
1167       if (jjte000 instanceof ParseException) {
1168         {if (true) throw (ParseException)jjte000;}
1169       }
1170       {if (true) throw (Error)jjte000;}
1171     } finally {
1172       if (jjtc000) {
1173         jjtree.closeNodeScope(jjtn000, true);
1174       }
1175     }
1176   }
1177 
1178 /**
1179  * This method has yet to be fully implemented
1180  * but will allow arbitrarily nested method
1181  * calls
1182  */
1183   final public void Parameter() throws ParseException {
1184     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1185     case WHITESPACE:
1186       jj_consume_token(WHITESPACE);
1187       break;
1188     default:
1189       jj_la1[25] = jj_gen;
1190       ;
1191     }
1192     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1193     case STRING_LITERAL:
1194       StringLiteral();
1195       break;
1196     case INTEGER_LITERAL:
1197       IntegerLiteral();
1198       break;
1199     default:
1200       jj_la1[26] = jj_gen;
1201       if (jj_2_6(2147483647)) {
1202         IntegerRange();
1203       } else {
1204         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1205         case LEFT_CURLEY:
1206           Map();
1207           break;
1208         case LBRACKET:
1209           ObjectArray();
1210           break;
1211         case TRUE:
1212           True();
1213           break;
1214         case FALSE:
1215           False();
1216           break;
1217         case IDENTIFIER:
1218         case LCURLY:
1219           Reference();
1220           break;
1221         case FLOATING_POINT_LITERAL:
1222           FloatingPointLiteral();
1223           break;
1224         default:
1225           jj_la1[27] = jj_gen;
1226           jj_consume_token(-1);
1227           throw new ParseException();
1228         }
1229       }
1230     }
1231     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1232     case WHITESPACE:
1233       jj_consume_token(WHITESPACE);
1234       break;
1235     default:
1236       jj_la1[28] = jj_gen;
1237       ;
1238     }
1239   }
1240 
1241 /**
1242  * This method has yet to be fully implemented
1243  * but will allow arbitrarily nested method
1244  * calls
1245  */
1246   final public void Method() throws ParseException {
1247                  /*@bgen(jjtree) Method */
1248   ASTMethod jjtn000 = new ASTMethod(this, JJTMETHOD);
1249   boolean jjtc000 = true;
1250   jjtree.openNodeScope(jjtn000);
1251     try {
1252       Identifier();
1253       jj_consume_token(LPAREN);
1254       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1255       case LBRACKET:
1256       case LEFT_CURLEY:
1257       case WHITESPACE:
1258       case STRING_LITERAL:
1259       case TRUE:
1260       case FALSE:
1261       case INTEGER_LITERAL:
1262       case FLOATING_POINT_LITERAL:
1263       case IDENTIFIER:
1264       case LCURLY:
1265         Parameter();
1266         label_7:
1267         while (true) {
1268           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1269           case COMMA:
1270             ;
1271             break;
1272           default:
1273             jj_la1[29] = jj_gen;
1274             break label_7;
1275           }
1276           jj_consume_token(COMMA);
1277           Parameter();
1278         }
1279         break;
1280       default:
1281         jj_la1[30] = jj_gen;
1282         ;
1283       }
1284       jj_consume_token(REFMOD2_RPAREN);
1285     } catch (Throwable jjte000) {
1286      if (jjtc000) {
1287        jjtree.clearNodeScope(jjtn000);
1288        jjtc000 = false;
1289      } else {
1290        jjtree.popNode();
1291      }
1292      if (jjte000 instanceof RuntimeException) {
1293        {if (true) throw (RuntimeException)jjte000;}
1294      }
1295      if (jjte000 instanceof ParseException) {
1296        {if (true) throw (ParseException)jjte000;}
1297      }
1298      {if (true) throw (Error)jjte000;}
1299     } finally {
1300      if (jjtc000) {
1301        jjtree.closeNodeScope(jjtn000, true);
1302      }
1303     }
1304   }
1305 
1306   final public void Reference() throws ParseException {
1307                     /*@bgen(jjtree) Reference */
1308   ASTReference jjtn000 = new ASTReference(this, JJTREFERENCE);
1309   boolean jjtc000 = true;
1310   jjtree.openNodeScope(jjtn000);
1311     try {
1312       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1313       case IDENTIFIER:
1314         jj_consume_token(IDENTIFIER);
1315         label_8:
1316         while (true) {
1317           if (jj_2_7(2)) {
1318             ;
1319           } else {
1320             break label_8;
1321           }
1322           jj_consume_token(DOT);
1323           if (jj_2_8(3)) {
1324             Method();
1325           } else {
1326             switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1327             case IDENTIFIER:
1328               Identifier();
1329               break;
1330             default:
1331               jj_la1[31] = jj_gen;
1332               jj_consume_token(-1);
1333               throw new ParseException();
1334             }
1335           }
1336         }
1337         break;
1338       case LCURLY:
1339         jj_consume_token(LCURLY);
1340         jj_consume_token(IDENTIFIER);
1341         label_9:
1342         while (true) {
1343           if (jj_2_9(2)) {
1344             ;
1345           } else {
1346             break label_9;
1347           }
1348           jj_consume_token(DOT);
1349           if (jj_2_10(3)) {
1350             Method();
1351           } else {
1352             switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1353             case IDENTIFIER:
1354               Identifier();
1355               break;
1356             default:
1357               jj_la1[32] = jj_gen;
1358               jj_consume_token(-1);
1359               throw new ParseException();
1360             }
1361           }
1362         }
1363         jj_consume_token(RCURLY);
1364         break;
1365       default:
1366         jj_la1[33] = jj_gen;
1367         jj_consume_token(-1);
1368         throw new ParseException();
1369       }
1370     } catch (Throwable jjte000) {
1371         if (jjtc000) {
1372           jjtree.clearNodeScope(jjtn000);
1373           jjtc000 = false;
1374         } else {
1375           jjtree.popNode();
1376         }
1377         if (jjte000 instanceof RuntimeException) {
1378           {if (true) throw (RuntimeException)jjte000;}
1379         }
1380         if (jjte000 instanceof ParseException) {
1381           {if (true) throw (ParseException)jjte000;}
1382         }
1383         {if (true) throw (Error)jjte000;}
1384     } finally {
1385         if (jjtc000) {
1386           jjtree.closeNodeScope(jjtn000, true);
1387         }
1388     }
1389   }
1390 
1391   final public void True() throws ParseException {
1392                /*@bgen(jjtree) True */
1393   ASTTrue jjtn000 = new ASTTrue(this, JJTTRUE);
1394   boolean jjtc000 = true;
1395   jjtree.openNodeScope(jjtn000);
1396     try {
1397       jj_consume_token(TRUE);
1398     } finally {
1399       if (jjtc000) {
1400         jjtree.closeNodeScope(jjtn000, true);
1401       }
1402     }
1403   }
1404 
1405   final public void False() throws ParseException {
1406                 /*@bgen(jjtree) False */
1407   ASTFalse jjtn000 = new ASTFalse(this, JJTFALSE);
1408   boolean jjtc000 = true;
1409   jjtree.openNodeScope(jjtn000);
1410     try {
1411       jj_consume_token(FALSE);
1412     } finally {
1413       if (jjtc000) {
1414         jjtree.closeNodeScope(jjtn000, true);
1415       }
1416     }
1417   }
1418 
1419 /**
1420  * This method is responsible for allowing
1421  * all non-grammar text to pass through
1422  * unscathed.
1423  */
1424   final public void Text() throws ParseException {
1425                /*@bgen(jjtree) Text */
1426   ASTText jjtn000 = new ASTText(this, JJTTEXT);
1427   boolean jjtc000 = true;
1428   jjtree.openNodeScope(jjtn000);
1429     try {
1430       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1431       case TEXT:
1432         jj_consume_token(TEXT);
1433         break;
1434       case DOT:
1435         jj_consume_token(DOT);
1436         break;
1437       case RPAREN:
1438         jj_consume_token(RPAREN);
1439         break;
1440       case LPAREN:
1441         jj_consume_token(LPAREN);
1442         break;
1443       case INTEGER_LITERAL:
1444         jj_consume_token(INTEGER_LITERAL);
1445         break;
1446       case FLOATING_POINT_LITERAL:
1447         jj_consume_token(FLOATING_POINT_LITERAL);
1448         break;
1449       case STRING_LITERAL:
1450         jj_consume_token(STRING_LITERAL);
1451         break;
1452       case ESCAPE:
1453         jj_consume_token(ESCAPE);
1454         break;
1455       case LCURLY:
1456         jj_consume_token(LCURLY);
1457         break;
1458       case RCURLY:
1459         jj_consume_token(RCURLY);
1460         break;
1461       default:
1462         jj_la1[34] = jj_gen;
1463         jj_consume_token(-1);
1464         throw new ParseException();
1465       }
1466     } finally {
1467       if (jjtc000) {
1468         jjtree.closeNodeScope(jjtn000, true);
1469       }
1470     }
1471   }
1472 
1473 /* -----------------------------------------------------------------------
1474  *
1475  *  Defined Directive Syntax
1476  *
1477  * ----------------------------------------------------------------------*/
1478   final public void IfStatement() throws ParseException {
1479                       /*@bgen(jjtree) IfStatement */
1480   ASTIfStatement jjtn000 = new ASTIfStatement(this, JJTIFSTATEMENT);
1481   boolean jjtc000 = true;
1482   jjtree.openNodeScope(jjtn000);
1483     try {
1484       jj_consume_token(IF_DIRECTIVE);
1485       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1486       case WHITESPACE:
1487         jj_consume_token(WHITESPACE);
1488         break;
1489       default:
1490         jj_la1[35] = jj_gen;
1491         ;
1492       }
1493       jj_consume_token(LPAREN);
1494       Expression();
1495       jj_consume_token(RPAREN);
1496       ASTBlock jjtn001 = new ASTBlock(this, JJTBLOCK);
1497       boolean jjtc001 = true;
1498       jjtree.openNodeScope(jjtn001);
1499       try {
1500         label_10:
1501         while (true) {
1502           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1503           case LPAREN:
1504           case RPAREN:
1505           case ESCAPE_DIRECTIVE:
1506           case SET_DIRECTIVE:
1507           case SINGLE_LINE_COMMENT_START:
1508           case DOUBLE_ESCAPE:
1509           case ESCAPE:
1510           case TEXT:
1511           case FORMAL_COMMENT:
1512           case MULTI_LINE_COMMENT:
1513           case STRING_LITERAL:
1514           case IF_DIRECTIVE:
1515           case STOP_DIRECTIVE:
1516           case INTEGER_LITERAL:
1517           case FLOATING_POINT_LITERAL:
1518           case WORD:
1519           case BRACKETED_WORD:
1520           case IDENTIFIER:
1521           case DOT:
1522           case LCURLY:
1523           case RCURLY:
1524             ;
1525             break;
1526           default:
1527             jj_la1[36] = jj_gen;
1528             break label_10;
1529           }
1530           Statement();
1531         }
1532       } catch (Throwable jjte001) {
1533       if (jjtc001) {
1534         jjtree.clearNodeScope(jjtn001);
1535         jjtc001 = false;
1536       } else {
1537         jjtree.popNode();
1538       }
1539       if (jjte001 instanceof RuntimeException) {
1540         {if (true) throw (RuntimeException)jjte001;}
1541       }
1542       if (jjte001 instanceof ParseException) {
1543         {if (true) throw (ParseException)jjte001;}
1544       }
1545       {if (true) throw (Error)jjte001;}
1546       } finally {
1547       if (jjtc001) {
1548         jjtree.closeNodeScope(jjtn001, true);
1549       }
1550       }
1551       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1552       case ELSEIF_DIRECTIVE:
1553         label_11:
1554         while (true) {
1555           ElseIfStatement();
1556           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1557           case ELSEIF_DIRECTIVE:
1558             ;
1559             break;
1560           default:
1561             jj_la1[37] = jj_gen;
1562             break label_11;
1563           }
1564         }
1565         break;
1566       default:
1567         jj_la1[38] = jj_gen;
1568         ;
1569       }
1570       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1571       case ELSE_DIRECTIVE:
1572         ElseStatement();
1573         break;
1574       default:
1575         jj_la1[39] = jj_gen;
1576         ;
1577       }
1578       jj_consume_token(END);
1579     } catch (Throwable jjte000) {
1580       if (jjtc000) {
1581         jjtree.clearNodeScope(jjtn000);
1582         jjtc000 = false;
1583       } else {
1584         jjtree.popNode();
1585       }
1586       if (jjte000 instanceof RuntimeException) {
1587         {if (true) throw (RuntimeException)jjte000;}
1588       }
1589       if (jjte000 instanceof ParseException) {
1590         {if (true) throw (ParseException)jjte000;}
1591       }
1592       {if (true) throw (Error)jjte000;}
1593     } finally {
1594       if (jjtc000) {
1595         jjtree.closeNodeScope(jjtn000, true);
1596       }
1597     }
1598   }
1599 
1600   final public void ElseStatement() throws ParseException {
1601                         /*@bgen(jjtree) ElseStatement */
1602   ASTElseStatement jjtn000 = new ASTElseStatement(this, JJTELSESTATEMENT);
1603   boolean jjtc000 = true;
1604   jjtree.openNodeScope(jjtn000);
1605     try {
1606       jj_consume_token(ELSE_DIRECTIVE);
1607       ASTBlock jjtn001 = new ASTBlock(this, JJTBLOCK);
1608       boolean jjtc001 = true;
1609       jjtree.openNodeScope(jjtn001);
1610       try {
1611         label_12:
1612         while (true) {
1613           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1614           case LPAREN:
1615           case RPAREN:
1616           case ESCAPE_DIRECTIVE:
1617           case SET_DIRECTIVE:
1618           case SINGLE_LINE_COMMENT_START:
1619           case DOUBLE_ESCAPE:
1620           case ESCAPE:
1621           case TEXT:
1622           case FORMAL_COMMENT:
1623           case MULTI_LINE_COMMENT:
1624           case STRING_LITERAL:
1625           case IF_DIRECTIVE:
1626           case STOP_DIRECTIVE:
1627           case INTEGER_LITERAL:
1628           case FLOATING_POINT_LITERAL:
1629           case WORD:
1630           case BRACKETED_WORD:
1631           case IDENTIFIER:
1632           case DOT:
1633           case LCURLY:
1634           case RCURLY:
1635             ;
1636             break;
1637           default:
1638             jj_la1[40] = jj_gen;
1639             break label_12;
1640           }
1641           Statement();
1642         }
1643       } catch (Throwable jjte001) {
1644       if (jjtc001) {
1645         jjtree.clearNodeScope(jjtn001);
1646         jjtc001 = false;
1647       } else {
1648         jjtree.popNode();
1649       }
1650       if (jjte001 instanceof RuntimeException) {
1651         {if (true) throw (RuntimeException)jjte001;}
1652       }
1653       if (jjte001 instanceof ParseException) {
1654         {if (true) throw (ParseException)jjte001;}
1655       }
1656       {if (true) throw (Error)jjte001;}
1657       } finally {
1658       if (jjtc001) {
1659         jjtree.closeNodeScope(jjtn001, true);
1660       }
1661       }
1662     } catch (Throwable jjte000) {
1663      if (jjtc000) {
1664        jjtree.clearNodeScope(jjtn000);
1665        jjtc000 = false;
1666      } else {
1667        jjtree.popNode();
1668      }
1669      if (jjte000 instanceof RuntimeException) {
1670        {if (true) throw (RuntimeException)jjte000;}
1671      }
1672      if (jjte000 instanceof ParseException) {
1673        {if (true) throw (ParseException)jjte000;}
1674      }
1675      {if (true) throw (Error)jjte000;}
1676     } finally {
1677      if (jjtc000) {
1678        jjtree.closeNodeScope(jjtn000, true);
1679      }
1680     }
1681   }
1682 
1683   final public void ElseIfStatement() throws ParseException {
1684                           /*@bgen(jjtree) ElseIfStatement */
1685   ASTElseIfStatement jjtn000 = new ASTElseIfStatement(this, JJTELSEIFSTATEMENT);
1686   boolean jjtc000 = true;
1687   jjtree.openNodeScope(jjtn000);
1688     try {
1689       jj_consume_token(ELSEIF_DIRECTIVE);
1690       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1691       case WHITESPACE:
1692         jj_consume_token(WHITESPACE);
1693         break;
1694       default:
1695         jj_la1[41] = jj_gen;
1696         ;
1697       }
1698       jj_consume_token(LPAREN);
1699       Expression();
1700       jj_consume_token(RPAREN);
1701       ASTBlock jjtn001 = new ASTBlock(this, JJTBLOCK);
1702       boolean jjtc001 = true;
1703       jjtree.openNodeScope(jjtn001);
1704       try {
1705         label_13:
1706         while (true) {
1707           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1708           case LPAREN:
1709           case RPAREN:
1710           case ESCAPE_DIRECTIVE:
1711           case SET_DIRECTIVE:
1712           case SINGLE_LINE_COMMENT_START:
1713           case DOUBLE_ESCAPE:
1714           case ESCAPE:
1715           case TEXT:
1716           case FORMAL_COMMENT:
1717           case MULTI_LINE_COMMENT:
1718           case STRING_LITERAL:
1719           case IF_DIRECTIVE:
1720           case STOP_DIRECTIVE:
1721           case INTEGER_LITERAL:
1722           case FLOATING_POINT_LITERAL:
1723           case WORD:
1724           case BRACKETED_WORD:
1725           case IDENTIFIER:
1726           case DOT:
1727           case LCURLY:
1728           case RCURLY:
1729             ;
1730             break;
1731           default:
1732             jj_la1[42] = jj_gen;
1733             break label_13;
1734           }
1735           Statement();
1736         }
1737       } catch (Throwable jjte001) {
1738       if (jjtc001) {
1739         jjtree.clearNodeScope(jjtn001);
1740         jjtc001 = false;
1741       } else {
1742         jjtree.popNode();
1743       }
1744       if (jjte001 instanceof RuntimeException) {
1745         {if (true) throw (RuntimeException)jjte001;}
1746       }
1747       if (jjte001 instanceof ParseException) {
1748         {if (true) throw (ParseException)jjte001;}
1749       }
1750       {if (true) throw (Error)jjte001;}
1751       } finally {
1752       if (jjtc001) {
1753         jjtree.closeNodeScope(jjtn001, true);
1754       }
1755       }
1756     } catch (Throwable jjte000) {
1757       if (jjtc000) {
1758         jjtree.clearNodeScope(jjtn000);
1759         jjtc000 = false;
1760       } else {
1761         jjtree.popNode();
1762       }
1763       if (jjte000 instanceof RuntimeException) {
1764         {if (true) throw (RuntimeException)jjte000;}
1765       }
1766       if (jjte000 instanceof ParseException) {
1767         {if (true) throw (ParseException)jjte000;}
1768       }
1769       {if (true) throw (Error)jjte000;}
1770     } finally {
1771       if (jjtc000) {
1772         jjtree.closeNodeScope(jjtn000, true);
1773       }
1774     }
1775   }
1776 
1777 /**
1778  *  Currently support both types of set :
1779  *   #set( expr )
1780  *   #set expr
1781  */
1782   final public void SetDirective() throws ParseException {
1783                        /*@bgen(jjtree) SetDirective */
1784   ASTSetDirective jjtn000 = new ASTSetDirective(this, JJTSETDIRECTIVE);
1785   boolean jjtc000 = true;
1786   jjtree.openNodeScope(jjtn000);
1787     try {
1788       jj_consume_token(SET_DIRECTIVE);
1789       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1790       case WHITESPACE:
1791         jj_consume_token(WHITESPACE);
1792         break;
1793       default:
1794         jj_la1[43] = jj_gen;
1795         ;
1796       }
1797       Reference();
1798       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1799       case WHITESPACE:
1800         jj_consume_token(WHITESPACE);
1801         break;
1802       default:
1803         jj_la1[44] = jj_gen;
1804         ;
1805       }
1806       jj_consume_token(EQUALS);
1807       Expression();
1808       jj_consume_token(RPAREN);
1809         /*
1810          * ensure that inSet is false.  Leads to some amusing bugs...
1811          */
1812 
1813         token_source.inSet = false;
1814       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1815       case NEWLINE:
1816         jj_consume_token(NEWLINE);
1817         break;
1818       default:
1819         jj_la1[45] = jj_gen;
1820         ;
1821       }
1822     } catch (Throwable jjte000) {
1823       if (jjtc000) {
1824         jjtree.clearNodeScope(jjtn000);
1825         jjtc000 = false;
1826       } else {
1827         jjtree.popNode();
1828       }
1829       if (jjte000 instanceof RuntimeException) {
1830         {if (true) throw (RuntimeException)jjte000;}
1831       }
1832       if (jjte000 instanceof ParseException) {
1833         {if (true) throw (ParseException)jjte000;}
1834       }
1835       {if (true) throw (Error)jjte000;}
1836     } finally {
1837       if (jjtc000) {
1838         jjtree.closeNodeScope(jjtn000, true);
1839       }
1840     }
1841   }
1842 
1843 /**
1844  * This method corresponds to the #stop
1845  * directive which just simulates and EOF
1846  * so that parsing stops. The #stop directive
1847  * is useful for end-user debugging
1848  * purposes.
1849  */
1850   final public void StopStatement() throws ParseException {
1851                                 /*@bgen(jjtree) #Stop( 0) */
1852   ASTStop jjtn000 = new ASTStop(this, JJTSTOP);
1853   boolean jjtc000 = true;
1854   jjtree.openNodeScope(jjtn000);
1855     try {
1856       jj_consume_token(STOP_DIRECTIVE);
1857     } finally {
1858       if (jjtc000) {
1859         jjtree.closeNodeScope(jjtn000,  0);
1860       }
1861     }
1862   }
1863 
1864 /* -----------------------------------------------------------------------
1865  *
1866  *  Expression Syntax
1867  *
1868  * ----------------------------------------------------------------------*/
1869   final public void Expression() throws ParseException {
1870                      /*@bgen(jjtree) Expression */
1871   ASTExpression jjtn000 = new ASTExpression(this, JJTEXPRESSION);
1872   boolean jjtc000 = true;
1873   jjtree.openNodeScope(jjtn000);
1874     try {
1875       ConditionalOrExpression();
1876     } catch (Throwable jjte000) {
1877   if (jjtc000) {
1878     jjtree.clearNodeScope(jjtn000);
1879     jjtc000 = false;
1880   } else {
1881     jjtree.popNode();
1882   }
1883   if (jjte000 instanceof RuntimeException) {
1884     {if (true) throw (RuntimeException)jjte000;}
1885   }
1886   if (jjte000 instanceof ParseException) {
1887     {if (true) throw (ParseException)jjte000;}
1888   }
1889   {if (true) throw (Error)jjte000;}
1890     } finally {
1891   if (jjtc000) {
1892     jjtree.closeNodeScope(jjtn000, true);
1893   }
1894     }
1895   }
1896 
1897   final public void Assignment() throws ParseException {
1898                                     /*@bgen(jjtree) #Assignment( 2) */
1899   ASTAssignment jjtn000 = new ASTAssignment(this, JJTASSIGNMENT);
1900   boolean jjtc000 = true;
1901   jjtree.openNodeScope(jjtn000);
1902     try {
1903       PrimaryExpression();
1904       jj_consume_token(EQUALS);
1905       Expression();
1906     } catch (Throwable jjte000) {
1907       if (jjtc000) {
1908         jjtree.clearNodeScope(jjtn000);
1909         jjtc000 = false;
1910       } else {
1911         jjtree.popNode();
1912       }
1913       if (jjte000 instanceof RuntimeException) {
1914         {if (true) throw (RuntimeException)jjte000;}
1915       }
1916       if (jjte000 instanceof ParseException) {
1917         {if (true) throw (ParseException)jjte000;}
1918       }
1919       {if (true) throw (Error)jjte000;}
1920     } finally {
1921       if (jjtc000) {
1922         jjtree.closeNodeScope(jjtn000,  2);
1923       }
1924     }
1925   }
1926 
1927   final public void ConditionalOrExpression() throws ParseException {
1928     ConditionalAndExpression();
1929     label_14:
1930     while (true) {
1931       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1932       case LOGICAL_OR:
1933         ;
1934         break;
1935       default:
1936         jj_la1[46] = jj_gen;
1937         break label_14;
1938       }
1939       jj_consume_token(LOGICAL_OR);
1940                      ASTOrNode jjtn001 = new ASTOrNode(this, JJTORNODE);
1941                      boolean jjtc001 = true;
1942                      jjtree.openNodeScope(jjtn001);
1943       try {
1944         ConditionalAndExpression();
1945       } catch (Throwable jjte001) {
1946                      if (jjtc001) {
1947                        jjtree.clearNodeScope(jjtn001);
1948                        jjtc001 = false;
1949                      } else {
1950                        jjtree.popNode();
1951                      }
1952                      if (jjte001 instanceof RuntimeException) {
1953                        {if (true) throw (RuntimeException)jjte001;}
1954                      }
1955                      if (jjte001 instanceof ParseException) {
1956                        {if (true) throw (ParseException)jjte001;}
1957                      }
1958                      {if (true) throw (Error)jjte001;}
1959       } finally {
1960                      if (jjtc001) {
1961                        jjtree.closeNodeScope(jjtn001,  2);
1962                      }
1963       }
1964     }
1965   }
1966 
1967   final public void ConditionalAndExpression() throws ParseException {
1968     EqualityExpression();
1969     label_15:
1970     while (true) {
1971       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1972       case LOGICAL_AND:
1973         ;
1974         break;
1975       default:
1976         jj_la1[47] = jj_gen;
1977         break label_15;
1978       }
1979       jj_consume_token(LOGICAL_AND);
1980                     ASTAndNode jjtn001 = new ASTAndNode(this, JJTANDNODE);
1981                     boolean jjtc001 = true;
1982                     jjtree.openNodeScope(jjtn001);
1983       try {
1984         EqualityExpression();
1985       } catch (Throwable jjte001) {
1986                     if (jjtc001) {
1987                       jjtree.clearNodeScope(jjtn001);
1988                       jjtc001 = false;
1989                     } else {
1990                       jjtree.popNode();
1991                     }
1992                     if (jjte001 instanceof RuntimeException) {
1993                       {if (true) throw (RuntimeException)jjte001;}
1994                     }
1995                     if (jjte001 instanceof ParseException) {
1996                       {if (true) throw (ParseException)jjte001;}
1997                     }
1998                     {if (true) throw (Error)jjte001;}
1999       } finally {
2000                     if (jjtc001) {
2001                       jjtree.closeNodeScope(jjtn001,  2);
2002                     }
2003       }
2004     }
2005   }
2006 
2007   final public void EqualityExpression() throws ParseException {
2008     RelationalExpression();
2009     label_16:
2010     while (true) {
2011       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2012       case LOGICAL_EQUALS:
2013       case LOGICAL_NOT_EQUALS:
2014         ;
2015         break;
2016       default:
2017         jj_la1[48] = jj_gen;
2018         break label_16;
2019       }
2020       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2021       case LOGICAL_EQUALS:
2022         jj_consume_token(LOGICAL_EQUALS);
2023                           ASTEQNode jjtn001 = new ASTEQNode(this, JJTEQNODE);
2024                           boolean jjtc001 = true;
2025                           jjtree.openNodeScope(jjtn001);
2026         try {
2027           RelationalExpression();
2028         } catch (Throwable jjte001) {
2029                           if (jjtc001) {
2030                             jjtree.clearNodeScope(jjtn001);
2031                             jjtc001 = false;
2032                           } else {
2033                             jjtree.popNode();
2034                           }
2035                           if (jjte001 instanceof RuntimeException) {
2036                             {if (true) throw (RuntimeException)jjte001;}
2037                           }
2038                           if (jjte001 instanceof ParseException) {
2039                             {if (true) throw (ParseException)jjte001;}
2040                           }
2041                           {if (true) throw (Error)jjte001;}
2042         } finally {
2043                           if (jjtc001) {
2044                             jjtree.closeNodeScope(jjtn001,  2);
2045                           }
2046         }
2047         break;
2048       case LOGICAL_NOT_EQUALS:
2049         jj_consume_token(LOGICAL_NOT_EQUALS);
2050                               ASTNENode jjtn002 = new ASTNENode(this, JJTNENODE);
2051                               boolean jjtc002 = true;
2052                               jjtree.openNodeScope(jjtn002);
2053         try {
2054           RelationalExpression();
2055         } catch (Throwable jjte002) {
2056                               if (jjtc002) {
2057                                 jjtree.clearNodeScope(jjtn002);
2058                                 jjtc002 = false;
2059                               } else {
2060                                 jjtree.popNode();
2061                               }
2062                               if (jjte002 instanceof RuntimeException) {
2063                                 {if (true) throw (RuntimeException)jjte002;}
2064                               }
2065                               if (jjte002 instanceof ParseException) {
2066                                 {if (true) throw (ParseException)jjte002;}
2067                               }
2068                               {if (true) throw (Error)jjte002;}
2069         } finally {
2070                               if (jjtc002) {
2071                                 jjtree.closeNodeScope(jjtn002,  2);
2072                               }
2073         }
2074         break;
2075       default:
2076         jj_la1[49] = jj_gen;
2077         jj_consume_token(-1);
2078         throw new ParseException();
2079       }
2080     }
2081   }
2082 
2083   final public void RelationalExpression() throws ParseException {
2084     AdditiveExpression();
2085     label_17:
2086     while (true) {
2087       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2088       case LOGICAL_LT:
2089       case LOGICAL_LE:
2090       case LOGICAL_GT:
2091       case LOGICAL_GE:
2092         ;
2093         break;
2094       default:
2095         jj_la1[50] = jj_gen;
2096         break label_17;
2097       }
2098       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2099       case LOGICAL_LT:
2100         jj_consume_token(LOGICAL_LT);
2101                         ASTLTNode jjtn001 = new ASTLTNode(this, JJTLTNODE);
2102                         boolean jjtc001 = true;
2103                         jjtree.openNodeScope(jjtn001);
2104         try {
2105           AdditiveExpression();
2106         } catch (Throwable jjte001) {
2107                         if (jjtc001) {
2108                           jjtree.clearNodeScope(jjtn001);
2109                           jjtc001 = false;
2110                         } else {
2111                           jjtree.popNode();
2112                         }
2113                         if (jjte001 instanceof RuntimeException) {
2114                           {if (true) throw (RuntimeException)jjte001;}
2115                         }
2116                         if (jjte001 instanceof ParseException) {
2117                           {if (true) throw (ParseException)jjte001;}
2118                         }
2119                         {if (true) throw (Error)jjte001;}
2120         } finally {
2121                         if (jjtc001) {
2122                           jjtree.closeNodeScope(jjtn001,  2);
2123                         }
2124         }
2125         break;
2126       case LOGICAL_GT:
2127         jj_consume_token(LOGICAL_GT);
2128                         ASTGTNode jjtn002 = new ASTGTNode(this, JJTGTNODE);
2129                         boolean jjtc002 = true;
2130                         jjtree.openNodeScope(jjtn002);
2131         try {
2132           AdditiveExpression();
2133         } catch (Throwable jjte002) {
2134                         if (jjtc002) {
2135                           jjtree.clearNodeScope(jjtn002);
2136                           jjtc002 = false;
2137                         } else {
2138                           jjtree.popNode();
2139                         }
2140                         if (jjte002 instanceof RuntimeException) {
2141                           {if (true) throw (RuntimeException)jjte002;}
2142                         }
2143                         if (jjte002 instanceof ParseException) {
2144                           {if (true) throw (ParseException)jjte002;}
2145                         }
2146                         {if (true) throw (Error)jjte002;}
2147         } finally {
2148                         if (jjtc002) {
2149                           jjtree.closeNodeScope(jjtn002,  2);
2150                         }
2151         }
2152         break;
2153       case LOGICAL_LE:
2154         jj_consume_token(LOGICAL_LE);
2155                         ASTLENode jjtn003 = new ASTLENode(this, JJTLENODE);
2156                         boolean jjtc003 = true;
2157                         jjtree.openNodeScope(jjtn003);
2158         try {
2159           AdditiveExpression();
2160         } catch (Throwable jjte003) {
2161                         if (jjtc003) {
2162                           jjtree.clearNodeScope(jjtn003);
2163                           jjtc003 = false;
2164                         } else {
2165                           jjtree.popNode();
2166                         }
2167                         if (jjte003 instanceof RuntimeException) {
2168                           {if (true) throw (RuntimeException)jjte003;}
2169                         }
2170                         if (jjte003 instanceof ParseException) {
2171                           {if (true) throw (ParseException)jjte003;}
2172                         }
2173                         {if (true) throw (Error)jjte003;}
2174         } finally {
2175                         if (jjtc003) {
2176                           jjtree.closeNodeScope(jjtn003,  2);
2177                         }
2178         }
2179         break;
2180       case LOGICAL_GE:
2181         jj_consume_token(LOGICAL_GE);
2182                         ASTGENode jjtn004 = new ASTGENode(this, JJTGENODE);
2183                         boolean jjtc004 = true;
2184                         jjtree.openNodeScope(jjtn004);
2185         try {
2186           AdditiveExpression();
2187         } catch (Throwable jjte004) {
2188                         if (jjtc004) {
2189                           jjtree.clearNodeScope(jjtn004);
2190                           jjtc004 = false;
2191                         } else {
2192                           jjtree.popNode();
2193                         }
2194                         if (jjte004 instanceof RuntimeException) {
2195                           {if (true) throw (RuntimeException)jjte004;}
2196                         }
2197                         if (jjte004 instanceof ParseException) {
2198                           {if (true) throw (ParseException)jjte004;}
2199                         }
2200                         {if (true) throw (Error)jjte004;}
2201         } finally {
2202                         if (jjtc004) {
2203                           jjtree.closeNodeScope(jjtn004,  2);
2204                         }
2205         }
2206         break;
2207       default:
2208         jj_la1[51] = jj_gen;
2209         jj_consume_token(-1);
2210         throw new ParseException();
2211       }
2212     }
2213   }
2214 
2215   final public void AdditiveExpression() throws ParseException {
2216     MultiplicativeExpression();
2217     label_18:
2218     while (true) {
2219       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2220       case MINUS:
2221       case PLUS:
2222         ;
2223         break;
2224       default:
2225         jj_la1[52] = jj_gen;
2226         break label_18;
2227       }
2228       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2229       case PLUS:
2230         jj_consume_token(PLUS);
2231                   ASTAddNode jjtn001 = new ASTAddNode(this, JJTADDNODE);
2232                   boolean jjtc001 = true;
2233                   jjtree.openNodeScope(jjtn001);
2234         try {
2235           MultiplicativeExpression();
2236         } catch (Throwable jjte001) {
2237                   if (jjtc001) {
2238                     jjtree.clearNodeScope(jjtn001);
2239                     jjtc001 = false;
2240                   } else {
2241                     jjtree.popNode();
2242                   }
2243                   if (jjte001 instanceof RuntimeException) {
2244                     {if (true) throw (RuntimeException)jjte001;}
2245                   }
2246                   if (jjte001 instanceof ParseException) {
2247                     {if (true) throw (ParseException)jjte001;}
2248                   }
2249                   {if (true) throw (Error)jjte001;}
2250         } finally {
2251                   if (jjtc001) {
2252                     jjtree.closeNodeScope(jjtn001,  2);
2253                   }
2254         }
2255         break;
2256       case MINUS:
2257         jj_consume_token(MINUS);
2258                   ASTSubtractNode jjtn002 = new ASTSubtractNode(this, JJTSUBTRACTNODE);
2259                   boolean jjtc002 = true;
2260                   jjtree.openNodeScope(jjtn002);
2261         try {
2262           MultiplicativeExpression();
2263         } catch (Throwable jjte002) {
2264                   if (jjtc002) {
2265                     jjtree.clearNodeScope(jjtn002);
2266                     jjtc002 = false;
2267                   } else {
2268                     jjtree.popNode();
2269                   }
2270                   if (jjte002 instanceof RuntimeException) {
2271                     {if (true) throw (RuntimeException)jjte002;}
2272                   }
2273                   if (jjte002 instanceof ParseException) {
2274                     {if (true) throw (ParseException)jjte002;}
2275                   }
2276                   {if (true) throw (Error)jjte002;}
2277         } finally {
2278                   if (jjtc002) {
2279                     jjtree.closeNodeScope(jjtn002,  2);
2280                   }
2281         }
2282         break;
2283       default:
2284         jj_la1[53] = jj_gen;
2285         jj_consume_token(-1);
2286         throw new ParseException();
2287       }
2288     }
2289   }
2290 
2291   final public void MultiplicativeExpression() throws ParseException {
2292     UnaryExpression();
2293     label_19:
2294     while (true) {
2295       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2296       case MULTIPLY:
2297       case DIVIDE:
2298       case MODULUS:
2299         ;
2300         break;
2301       default:
2302         jj_la1[54] = jj_gen;
2303         break label_19;
2304       }
2305       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2306       case MULTIPLY:
2307         jj_consume_token(MULTIPLY);
2308                           ASTMulNode jjtn001 = new ASTMulNode(this, JJTMULNODE);
2309                           boolean jjtc001 = true;
2310                           jjtree.openNodeScope(jjtn001);
2311         try {
2312           UnaryExpression();
2313         } catch (Throwable jjte001) {
2314                           if (jjtc001) {
2315                             jjtree.clearNodeScope(jjtn001);
2316                             jjtc001 = false;
2317                           } else {
2318                             jjtree.popNode();
2319                           }
2320                           if (jjte001 instanceof RuntimeException) {
2321                             {if (true) throw (RuntimeException)jjte001;}
2322                           }
2323                           if (jjte001 instanceof ParseException) {
2324                             {if (true) throw (ParseException)jjte001;}
2325                           }
2326                           {if (true) throw (Error)jjte001;}
2327         } finally {
2328                           if (jjtc001) {
2329                             jjtree.closeNodeScope(jjtn001,  2);
2330                           }
2331         }
2332         break;
2333       case DIVIDE:
2334         jj_consume_token(DIVIDE);
2335                         ASTDivNode jjtn002 = new ASTDivNode(this, JJTDIVNODE);
2336                         boolean jjtc002 = true;
2337                         jjtree.openNodeScope(jjtn002);
2338         try {
2339           UnaryExpression();
2340         } catch (Throwable jjte002) {
2341                         if (jjtc002) {
2342                           jjtree.clearNodeScope(jjtn002);
2343                           jjtc002 = false;
2344                         } else {
2345                           jjtree.popNode();
2346                         }
2347                         if (jjte002 instanceof RuntimeException) {
2348                           {if (true) throw (RuntimeException)jjte002;}
2349                         }
2350                         if (jjte002 instanceof ParseException) {
2351                           {if (true) throw (ParseException)jjte002;}
2352                         }
2353                         {if (true) throw (Error)jjte002;}
2354         } finally {
2355                         if (jjtc002) {
2356                           jjtree.closeNodeScope(jjtn002,  2);
2357                         }
2358         }
2359         break;
2360       case MODULUS:
2361         jj_consume_token(MODULUS);
2362                          ASTModNode jjtn003 = new ASTModNode(this, JJTMODNODE);
2363                          boolean jjtc003 = true;
2364                          jjtree.openNodeScope(jjtn003);
2365         try {
2366           UnaryExpression();
2367         } catch (Throwable jjte003) {
2368                          if (jjtc003) {
2369                            jjtree.clearNodeScope(jjtn003);
2370                            jjtc003 = false;
2371                          } else {
2372                            jjtree.popNode();
2373                          }
2374                          if (jjte003 instanceof RuntimeException) {
2375                            {if (true) throw (RuntimeException)jjte003;}
2376                          }
2377                          if (jjte003 instanceof ParseException) {
2378                            {if (true) throw (ParseException)jjte003;}
2379                          }
2380                          {if (true) throw (Error)jjte003;}
2381         } finally {
2382                          if (jjtc003) {
2383                            jjtree.closeNodeScope(jjtn003,  2);
2384                          }
2385         }
2386         break;
2387       default:
2388         jj_la1[55] = jj_gen;
2389         jj_consume_token(-1);
2390         throw new ParseException();
2391       }
2392     }
2393   }
2394 
2395   final public void UnaryExpression() throws ParseException {
2396     if (jj_2_11(2)) {
2397       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2398       case WHITESPACE:
2399         jj_consume_token(WHITESPACE);
2400         break;
2401       default:
2402         jj_la1[56] = jj_gen;
2403         ;
2404       }
2405       jj_consume_token(LOGICAL_NOT);
2406                                                     ASTNotNode jjtn001 = new ASTNotNode(this, JJTNOTNODE);
2407                                                     boolean jjtc001 = true;
2408                                                     jjtree.openNodeScope(jjtn001);
2409       try {
2410         UnaryExpression();
2411       } catch (Throwable jjte001) {
2412                                                     if (jjtc001) {
2413                                                       jjtree.clearNodeScope(jjtn001);
2414                                                       jjtc001 = false;
2415                                                     } else {
2416                                                       jjtree.popNode();
2417                                                     }
2418                                                     if (jjte001 instanceof RuntimeException) {
2419                                                       {if (true) throw (RuntimeException)jjte001;}
2420                                                     }
2421                                                     if (jjte001 instanceof ParseException) {
2422                                                       {if (true) throw (ParseException)jjte001;}
2423                                                     }
2424                                                     {if (true) throw (Error)jjte001;}
2425       } finally {
2426                                                     if (jjtc001) {
2427                                                       jjtree.closeNodeScope(jjtn001,  1);
2428                                                     }
2429       }
2430     } else {
2431       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2432       case LBRACKET:
2433       case LEFT_CURLEY:
2434       case LPAREN:
2435       case WHITESPACE:
2436       case STRING_LITERAL:
2437       case TRUE:
2438       case FALSE:
2439       case INTEGER_LITERAL:
2440       case FLOATING_POINT_LITERAL:
2441       case IDENTIFIER:
2442       case LCURLY:
2443         PrimaryExpression();
2444         break;
2445       default:
2446         jj_la1[57] = jj_gen;
2447         jj_consume_token(-1);
2448         throw new ParseException();
2449       }
2450     }
2451   }
2452 
2453   final public void PrimaryExpression() throws ParseException {
2454     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2455     case WHITESPACE:
2456       jj_consume_token(WHITESPACE);
2457       break;
2458     default:
2459       jj_la1[58] = jj_gen;
2460       ;
2461     }
2462     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2463     case STRING_LITERAL:
2464       StringLiteral();
2465       break;
2466     case IDENTIFIER:
2467     case LCURLY:
2468       Reference();
2469       break;
2470     case INTEGER_LITERAL:
2471       IntegerLiteral();
2472       break;
2473     default:
2474       jj_la1[59] = jj_gen;
2475       if (jj_2_12(2147483647)) {
2476         IntegerRange();
2477       } else {
2478         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2479         case FLOATING_POINT_LITERAL:
2480           FloatingPointLiteral();
2481           break;
2482         case LEFT_CURLEY:
2483           Map();
2484           break;
2485         case LBRACKET:
2486           ObjectArray();
2487           break;
2488         case TRUE:
2489           True();
2490           break;
2491         case FALSE:
2492           False();
2493           break;
2494         case LPAREN:
2495           jj_consume_token(LPAREN);
2496           Expression();
2497           jj_consume_token(RPAREN);
2498           break;
2499         default:
2500           jj_la1[60] = jj_gen;
2501           jj_consume_token(-1);
2502           throw new ParseException();
2503         }
2504       }
2505     }
2506     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2507     case WHITESPACE:
2508       jj_consume_token(WHITESPACE);
2509       break;
2510     default:
2511       jj_la1[61] = jj_gen;
2512       ;
2513     }
2514   }
2515 
2516   final private boolean jj_2_1(int xla) {
2517     jj_la = xla; jj_lastpos = jj_scanpos = token;
2518     try { return !jj_3_1(); }
2519     catch(LookaheadSuccess ls) { return true; }
2520     finally { jj_save(0, xla); }
2521   }
2522 
2523   final private boolean jj_2_2(int xla) {
2524     jj_la = xla; jj_lastpos = jj_scanpos = token;
2525     try { return !jj_3_2(); }
2526     catch(LookaheadSuccess ls) { return true; }
2527     finally { jj_save(1, xla); }
2528   }
2529 
2530   final private boolean jj_2_3(int xla) {
2531     jj_la = xla; jj_lastpos = jj_scanpos = token;
2532     try { return !jj_3_3(); }
2533     catch(LookaheadSuccess ls) { return true; }
2534     finally { jj_save(2, xla); }
2535   }
2536 
2537   final private boolean jj_2_4(int xla) {
2538     jj_la = xla; jj_lastpos = jj_scanpos = token;
2539     try { return !jj_3_4(); }
2540     catch(LookaheadSuccess ls) { return true; }
2541     finally { jj_save(3, xla); }
2542   }
2543 
2544   final private boolean jj_2_5(int xla) {
2545     jj_la = xla; jj_lastpos = jj_scanpos = token;
2546     try { return !jj_3_5(); }
2547     catch(LookaheadSuccess ls) { return true; }
2548     finally { jj_save(4, xla); }
2549   }
2550 
2551   final private boolean jj_2_6(int xla) {
2552     jj_la = xla; jj_lastpos = jj_scanpos = token;
2553     try { return !jj_3_6(); }
2554     catch(LookaheadSuccess ls) { return true; }
2555     finally { jj_save(5, xla); }
2556   }
2557 
2558   final private boolean jj_2_7(int xla) {
2559     jj_la = xla; jj_lastpos = jj_scanpos = token;
2560     try { return !jj_3_7(); }
2561     catch(LookaheadSuccess ls) { return true; }
2562     finally { jj_save(6, xla); }
2563   }
2564 
2565   final private boolean jj_2_8(int xla) {
2566     jj_la = xla; jj_lastpos = jj_scanpos = token;
2567     try { return !jj_3_8(); }
2568     catch(LookaheadSuccess ls) { return true; }
2569     finally { jj_save(7, xla); }
2570   }
2571 
2572   final private boolean jj_2_9(int xla) {
2573     jj_la = xla; jj_lastpos = jj_scanpos = token;
2574     try { return !jj_3_9(); }
2575     catch(LookaheadSuccess ls) { return true; }
2576     finally { jj_save(8, xla); }
2577   }
2578 
2579   final private boolean jj_2_10(int xla) {
2580     jj_la = xla; jj_lastpos = jj_scanpos = token;
2581     try { return !jj_3_10(); }
2582     catch(LookaheadSuccess ls) { return true; }
2583     finally { jj_save(9, xla); }
2584   }
2585 
2586   final private boolean jj_2_11(int xla) {
2587     jj_la = xla; jj_lastpos = jj_scanpos = token;
2588     try { return !jj_3_11(); }
2589     catch(LookaheadSuccess ls) { return true; }
2590     finally { jj_save(10, xla); }
2591   }
2592 
2593   final private boolean jj_2_12(int xla) {
2594     jj_la = xla; jj_lastpos = jj_scanpos = token;
2595     try { return !jj_3_12(); }
2596     catch(LookaheadSuccess ls) { return true; }
2597     finally { jj_save(11, xla); }
2598   }
2599 
2600   final private boolean jj_3_1() {
2601     if (jj_3R_20()) return true;
2602     return false;
2603   }
2604 
2605   final private boolean jj_3R_21() {
2606     if (jj_3R_20()) return true;
2607     return false;
2608   }
2609 
2610   final private boolean jj_3R_64() {
2611     if (jj_scan_token(LBRACKET)) return true;
2612     Token xsp;
2613     xsp = jj_scanpos;
2614     if (jj_3R_71()) jj_scanpos = xsp;
2615     if (jj_scan_token(RBRACKET)) return true;
2616     return false;
2617   }
2618 
2619   final private boolean jj_3R_70() {
2620     Token xsp;
2621     xsp = jj_scanpos;
2622     if (jj_scan_token(26)) jj_scanpos = xsp;
2623     return false;
2624   }
2625 
2626   final private boolean jj_3_5() {
2627     if (jj_3R_25()) return true;
2628     if (jj_scan_token(COLON)) return true;
2629     if (jj_3R_25()) return true;
2630     Token xsp;
2631     while (true) {
2632       xsp = jj_scanpos;
2633       if (jj_3R_85()) { jj_scanpos = xsp; break; }
2634     }
2635     return false;
2636   }
2637 
2638   final private boolean jj_3R_63() {
2639     if (jj_scan_token(LEFT_CURLEY)) return true;
2640     Token xsp;
2641     xsp = jj_scanpos;
2642     if (jj_3_5()) {
2643     jj_scanpos = xsp;
2644     if (jj_3R_70()) return true;
2645     }
2646     xsp = jj_scanpos;
2647     if (jj_scan_token(7)) {
2648     jj_scanpos = xsp;
2649     if (jj_scan_token(65)) return true;
2650     }
2651     return false;
2652   }
2653 
2654   final private boolean jj_3R_46() {
2655     if (jj_3R_66()) return true;
2656     return false;
2657   }
2658 
2659   final private boolean jj_3R_45() {
2660     if (jj_3R_65()) return true;
2661     return false;
2662   }
2663 
2664   final private boolean jj_3_3() {
2665     if (jj_scan_token(LBRACKET)) return true;
2666     Token xsp;
2667     xsp = jj_scanpos;
2668     if (jj_scan_token(26)) jj_scanpos = xsp;
2669     xsp = jj_scanpos;
2670     if (jj_3R_21()) {
2671     jj_scanpos = xsp;
2672     if (jj_3R_22()) return true;
2673     }
2674     xsp = jj_scanpos;
2675     if (jj_scan_token(26)) jj_scanpos = xsp;
2676     if (jj_scan_token(DOUBLEDOT)) return true;
2677     return false;
2678   }
2679 
2680   final private boolean jj_3R_44() {
2681     if (jj_3R_64()) return true;
2682     return false;
2683   }
2684 
2685   final private boolean jj_3R_43() {
2686     if (jj_3R_63()) return true;
2687     return false;
2688   }
2689 
2690   final private boolean jj_3R_42() {
2691     if (jj_3R_62()) return true;
2692     return false;
2693   }
2694 
2695   final private boolean jj_3R_41() {
2696     if (jj_3R_61()) return true;
2697     return false;
2698   }
2699 
2700   final private boolean jj_3R_40() {
2701     if (jj_3R_36()) return true;
2702     return false;
2703   }
2704 
2705   final private boolean jj_3R_39() {
2706     if (jj_3R_60()) return true;
2707     return false;
2708   }
2709 
2710   final private boolean jj_3R_38() {
2711     if (jj_3R_59()) return true;
2712     return false;
2713   }
2714 
2715   final private boolean jj_3R_23() {
2716     if (jj_scan_token(COMMA)) return true;
2717     Token xsp;
2718     xsp = jj_scanpos;
2719     if (jj_scan_token(26)) jj_scanpos = xsp;
2720     return false;
2721   }
2722 
2723   final private boolean jj_3R_37() {
2724     if (jj_3R_20()) return true;
2725     return false;
2726   }
2727 
2728   final private boolean jj_3R_24() {
2729     Token xsp;
2730     xsp = jj_scanpos;
2731     if (jj_3R_37()) {
2732     jj_scanpos = xsp;
2733     if (jj_3R_38()) {
2734     jj_scanpos = xsp;
2735     if (jj_3R_39()) {
2736     jj_scanpos = xsp;
2737     if (jj_3R_40()) {
2738     jj_scanpos = xsp;
2739     if (jj_3R_41()) {
2740     jj_scanpos = xsp;
2741     if (jj_3R_42()) {
2742     jj_scanpos = xsp;
2743     if (jj_3R_43()) {
2744     jj_scanpos = xsp;
2745     if (jj_3R_44()) {
2746     jj_scanpos = xsp;
2747     if (jj_3R_45()) {
2748     jj_scanpos = xsp;
2749     if (jj_3R_46()) return true;
2750     }
2751     }
2752     }
2753     }
2754     }
2755     }
2756     }
2757     }
2758     }
2759     return false;
2760   }
2761 
2762   final private boolean jj_3R_59() {
2763     if (jj_scan_token(WORD)) return true;
2764     return false;
2765   }
2766 
2767   final private boolean jj_3R_56() {
2768     if (jj_scan_token(IDENTIFIER)) return true;
2769     return false;
2770   }
2771 
2772   final private boolean jj_3R_30() {
2773     if (jj_3R_56()) return true;
2774     return false;
2775   }
2776 
2777   final private boolean jj_3R_28() {
2778     if (jj_3R_56()) return true;
2779     return false;
2780   }
2781 
2782   final private boolean jj_3R_33() {
2783     if (jj_3R_36()) return true;
2784     return false;
2785   }
2786 
2787   final private boolean jj_3_4() {
2788     Token xsp;
2789     xsp = jj_scanpos;
2790     if (jj_scan_token(26)) jj_scanpos = xsp;
2791     xsp = jj_scanpos;
2792     if (jj_3R_23()) jj_scanpos = xsp;
2793     if (jj_3R_24()) return true;
2794     return false;
2795   }
2796 
2797   final private boolean jj_3R_60() {
2798     if (jj_scan_token(STRING_LITERAL)) return true;
2799     return false;
2800   }
2801 
2802   final private boolean jj_3R_36() {
2803     if (jj_scan_token(INTEGER_LITERAL)) return true;
2804     return false;
2805   }
2806 
2807   final private boolean jj_3R_32() {
2808     if (jj_3R_20()) return true;
2809     return false;
2810   }
2811 
2812   final private boolean jj_3R_27() {
2813     if (jj_3R_36()) return true;
2814     return false;
2815   }
2816 
2817   final private boolean jj_3R_62() {
2818     if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
2819     return false;
2820   }
2821 
2822   final private boolean jj_3_10() {
2823     if (jj_3R_29()) return true;
2824     return false;
2825   }
2826 
2827   final private boolean jj_3R_82() {
2828     if (jj_scan_token(COMMA)) return true;
2829     if (jj_3R_25()) return true;
2830     return false;
2831   }
2832 
2833   final private boolean jj_3_8() {
2834     if (jj_3R_29()) return true;
2835     return false;
2836   }
2837 
2838   final private boolean jj_3R_26() {
2839     if (jj_3R_20()) return true;
2840     return false;
2841   }
2842 
2843   final private boolean jj_3R_66() {
2844     if (jj_scan_token(FALSE)) return true;
2845     return false;
2846   }
2847 
2848   final private boolean jj_3R_65() {
2849     if (jj_scan_token(TRUE)) return true;
2850     return false;
2851   }
2852 
2853   final private boolean jj_3_9() {
2854     if (jj_scan_token(DOT)) return true;
2855     Token xsp;
2856     xsp = jj_scanpos;
2857     if (jj_3_10()) {
2858     jj_scanpos = xsp;
2859     if (jj_3R_30()) return true;
2860     }
2861     return false;
2862   }
2863 
2864   final private boolean jj_3R_57() {
2865     if (jj_3R_25()) return true;
2866     Token xsp;
2867     while (true) {
2868       xsp = jj_scanpos;
2869       if (jj_3R_82()) { jj_scanpos = xsp; break; }
2870     }
2871     return false;
2872   }
2873 
2874   final private boolean jj_3_7() {
2875     if (jj_scan_token(DOT)) return true;
2876     Token xsp;
2877     xsp = jj_scanpos;
2878     if (jj_3_8()) {
2879     jj_scanpos = xsp;
2880     if (jj_3R_28()) return true;
2881     }
2882     return false;
2883   }
2884 
2885   final private boolean jj_3R_35() {
2886     if (jj_scan_token(LCURLY)) return true;
2887     if (jj_scan_token(IDENTIFIER)) return true;
2888     Token xsp;
2889     while (true) {
2890       xsp = jj_scanpos;
2891       if (jj_3_9()) { jj_scanpos = xsp; break; }
2892     }
2893     if (jj_scan_token(RCURLY)) return true;
2894     return false;
2895   }
2896 
2897   final private boolean jj_3_12() {
2898     if (jj_scan_token(LBRACKET)) return true;
2899     Token xsp;
2900     xsp = jj_scanpos;
2901     if (jj_scan_token(26)) jj_scanpos = xsp;
2902     xsp = jj_scanpos;
2903     if (jj_3R_32()) {
2904     jj_scanpos = xsp;
2905     if (jj_3R_33()) return true;
2906     }
2907     xsp = jj_scanpos;
2908     if (jj_scan_token(26)) jj_scanpos = xsp;
2909     if (jj_scan_token(DOUBLEDOT)) return true;
2910     return false;
2911   }
2912 
2913   final private boolean jj_3R_34() {
2914     if (jj_scan_token(IDENTIFIER)) return true;
2915     Token xsp;
2916     while (true) {
2917       xsp = jj_scanpos;
2918       if (jj_3_7()) { jj_scanpos = xsp; break; }
2919     }
2920     return false;
2921   }
2922 
2923   final private boolean jj_3R_81() {
2924     if (jj_scan_token(LPAREN)) return true;
2925     return false;
2926   }
2927 
2928   final private boolean jj_3R_80() {
2929     if (jj_3R_66()) return true;
2930     return false;
2931   }
2932 
2933   final private boolean jj_3R_79() {
2934     if (jj_3R_65()) return true;
2935     return false;
2936   }
2937 
2938   final private boolean jj_3R_20() {
2939     Token xsp;
2940     xsp = jj_scanpos;
2941     if (jj_3R_34()) {
2942     jj_scanpos = xsp;
2943     if (jj_3R_35()) return true;
2944     }
2945     return false;
2946   }
2947 
2948   final private boolean jj_3R_78() {
2949     if (jj_3R_64()) return true;
2950     return false;
2951   }
2952 
2953   final private boolean jj_3R_77() {
2954     if (jj_3R_63()) return true;
2955     return false;
2956   }
2957 
2958   final private boolean jj_3R_76() {
2959     if (jj_3R_62()) return true;
2960     return false;
2961   }
2962 
2963   final private boolean jj_3R_75() {
2964     if (jj_3R_61()) return true;
2965     return false;
2966   }
2967 
2968   final private boolean jj_3R_74() {
2969     if (jj_3R_36()) return true;
2970     return false;
2971   }
2972 
2973   final private boolean jj_3R_73() {
2974     if (jj_3R_20()) return true;
2975     return false;
2976   }
2977 
2978   final private boolean jj_3_6() {
2979     if (jj_scan_token(LBRACKET)) return true;
2980     Token xsp;
2981     xsp = jj_scanpos;
2982     if (jj_scan_token(26)) jj_scanpos = xsp;
2983     xsp = jj_scanpos;
2984     if (jj_3R_26()) {
2985     jj_scanpos = xsp;
2986     if (jj_3R_27()) return true;
2987     }
2988     xsp = jj_scanpos;
2989     if (jj_scan_token(26)) jj_scanpos = xsp;
2990     if (jj_scan_token(DOUBLEDOT)) return true;
2991     return false;
2992   }
2993 
2994   final private boolean jj_3_2() {
2995     if (jj_scan_token(DOUBLE_ESCAPE)) return true;
2996     return false;
2997   }
2998 
2999   final private boolean jj_3R_29() {
3000     if (jj_3R_56()) return true;
3001     if (jj_scan_token(LPAREN)) return true;
3002     Token xsp;
3003     xsp = jj_scanpos;
3004     if (jj_3R_57()) jj_scanpos = xsp;
3005     if (jj_scan_token(REFMOD2_RPAREN)) return true;
3006     return false;
3007   }
3008 
3009   final private boolean jj_3R_72() {
3010     if (jj_3R_60()) return true;
3011     return false;
3012   }
3013 
3014   final private boolean jj_3R_67() {
3015     Token xsp;
3016     xsp = jj_scanpos;
3017     if (jj_scan_token(26)) jj_scanpos = xsp;
3018     xsp = jj_scanpos;
3019     if (jj_3R_72()) {
3020     jj_scanpos = xsp;
3021     if (jj_3R_73()) {
3022     jj_scanpos = xsp;
3023     if (jj_3R_74()) {
3024     jj_scanpos = xsp;
3025     if (jj_3R_75()) {
3026     jj_scanpos = xsp;
3027     if (jj_3R_76()) {
3028     jj_scanpos = xsp;
3029     if (jj_3R_77()) {
3030     jj_scanpos = xsp;
3031     if (jj_3R_78()) {
3032     jj_scanpos = xsp;
3033     if (jj_3R_79()) {
3034     jj_scanpos = xsp;
3035     if (jj_3R_80()) {
3036     jj_scanpos = xsp;
3037     if (jj_3R_81()) return true;
3038     }
3039     }
3040     }
3041     }
3042     }
3043     }
3044     }
3045     }
3046     }
3047     return false;
3048   }
3049 
3050   final private boolean jj_3R_55() {
3051     if (jj_3R_62()) return true;
3052     return false;
3053   }
3054 
3055   final private boolean jj_3R_54() {
3056     if (jj_3R_20()) return true;
3057     return false;
3058   }
3059 
3060   final private boolean jj_3R_53() {
3061     if (jj_3R_66()) return true;
3062     return false;
3063   }
3064 
3065   final private boolean jj_3R_52() {
3066     if (jj_3R_65()) return true;
3067     return false;
3068   }
3069 
3070   final private boolean jj_3R_31() {
3071     Token xsp;
3072     xsp = jj_scanpos;
3073     if (jj_3_11()) {
3074     jj_scanpos = xsp;
3075     if (jj_3R_58()) return true;
3076     }
3077     return false;
3078   }
3079 
3080   final private boolean jj_3_11() {
3081     Token xsp;
3082     xsp = jj_scanpos;
3083     if (jj_scan_token(26)) jj_scanpos = xsp;
3084     if (jj_scan_token(LOGICAL_NOT)) return true;
3085     if (jj_3R_31()) return true;
3086     return false;
3087   }
3088 
3089   final private boolean jj_3R_58() {
3090     if (jj_3R_67()) return true;
3091     return false;
3092   }
3093 
3094   final private boolean jj_3R_51() {
3095     if (jj_3R_64()) return true;
3096     return false;
3097   }
3098 
3099   final private boolean jj_3R_85() {
3100     if (jj_scan_token(COMMA)) return true;
3101     if (jj_3R_25()) return true;
3102     if (jj_scan_token(COLON)) return true;
3103     if (jj_3R_25()) return true;
3104     return false;
3105   }
3106 
3107   final private boolean jj_3R_50() {
3108     if (jj_3R_63()) return true;
3109     return false;
3110   }
3111 
3112   final private boolean jj_3R_49() {
3113     if (jj_3R_61()) return true;
3114     return false;
3115   }
3116 
3117   final private boolean jj_3R_48() {
3118     if (jj_3R_36()) return true;
3119     return false;
3120   }
3121 
3122   final private boolean jj_3R_47() {
3123     if (jj_3R_60()) return true;
3124     return false;
3125   }
3126 
3127   final private boolean jj_3R_84() {
3128     if (jj_3R_36()) return true;
3129     return false;
3130   }
3131 
3132   final private boolean jj_3R_69() {
3133     if (jj_3R_36()) return true;
3134     return false;
3135   }
3136 
3137   final private boolean jj_3R_86() {
3138     if (jj_scan_token(COMMA)) return true;
3139     if (jj_3R_25()) return true;
3140     return false;
3141   }
3142 
3143   final private boolean jj_3R_25() {
3144     Token xsp;
3145     xsp = jj_scanpos;
3146     if (jj_scan_token(26)) jj_scanpos = xsp;
3147     xsp = jj_scanpos;
3148     if (jj_3R_47()) {
3149     jj_scanpos = xsp;
3150     if (jj_3R_48()) {
3151     jj_scanpos = xsp;
3152     if (jj_3R_49()) {
3153     jj_scanpos = xsp;
3154     if (jj_3R_50()) {
3155     jj_scanpos = xsp;
3156     if (jj_3R_51()) {
3157     jj_scanpos = xsp;
3158     if (jj_3R_52()) {
3159     jj_scanpos = xsp;
3160     if (jj_3R_53()) {
3161     jj_scanpos = xsp;
3162     if (jj_3R_54()) {
3163     jj_scanpos = xsp;
3164     if (jj_3R_55()) return true;
3165     }
3166     }
3167     }
3168     }
3169     }
3170     }
3171     }
3172     }
3173     xsp = jj_scanpos;
3174     if (jj_scan_token(26)) jj_scanpos = xsp;
3175     return false;
3176   }
3177 
3178   final private boolean jj_3R_83() {
3179     if (jj_3R_20()) return true;
3180     return false;
3181   }
3182 
3183   final private boolean jj_3R_22() {
3184     if (jj_3R_36()) return true;
3185     return false;
3186   }
3187 
3188   final private boolean jj_3R_68() {
3189     if (jj_3R_20()) return true;
3190     return false;
3191   }
3192 
3193   final private boolean jj_3R_71() {
3194     if (jj_3R_25()) return true;
3195     Token xsp;
3196     while (true) {
3197       xsp = jj_scanpos;
3198       if (jj_3R_86()) { jj_scanpos = xsp; break; }
3199     }
3200     return false;
3201   }
3202 
3203   final private boolean jj_3R_61() {
3204     if (jj_scan_token(LBRACKET)) return true;
3205     Token xsp;
3206     xsp = jj_scanpos;
3207     if (jj_scan_token(26)) jj_scanpos = xsp;
3208     xsp = jj_scanpos;
3209     if (jj_3R_68()) {
3210     jj_scanpos = xsp;
3211     if (jj_3R_69()) return true;
3212     }
3213     xsp = jj_scanpos;
3214     if (jj_scan_token(26)) jj_scanpos = xsp;
3215     if (jj_scan_token(DOUBLEDOT)) return true;
3216     xsp = jj_scanpos;
3217     if (jj_scan_token(26)) jj_scanpos = xsp;
3218     xsp = jj_scanpos;
3219     if (jj_3R_83()) {
3220     jj_scanpos = xsp;
3221     if (jj_3R_84()) return true;
3222     }
3223     xsp = jj_scanpos;
3224     if (jj_scan_token(26)) jj_scanpos = xsp;
3225     if (jj_scan_token(RBRACKET)) return true;
3226     return false;
3227   }
3228 
3229   public ParserTokenManager token_source;
3230   public Token token, jj_nt;
3231   private int jj_ntk;
3232   private Token jj_scanpos, jj_lastpos;
3233   private int jj_la;
3234   public boolean lookingAhead = false;
3235   private boolean jj_semLA;
3236   private int jj_gen;
3237   final private int[] jj_la1 = new int[62];
3238   static private int[] jj_la1_0;
3239   static private int[] jj_la1_1;
3240   static private int[] jj_la1_2;
3241   static {
3242       jj_la1_0();
3243       jj_la1_1();
3244       jj_la1_2();
3245    }
3246    private static void jj_la1_0() {
3247       jj_la1_0 = new int[] {0x9bc1b00,0x0,0x9bc1b00,0x400000,0x1840000,0x8000000,0x30000042,0x0,0x4000000,0x4000000,0x4000000,0x8,0x4000000,0x9bc1b00,0x8,0x4000000,0x80,0x8,0x3c000042,0x4000000,0x0,0x4000000,0x4000000,0x0,0x4000000,0x4000000,0x8000000,0x30000042,0x4000000,0x8,0x3c000042,0x0,0x0,0x0,0x8300300,0x4000000,0x9bc1b00,0x0,0x0,0x0,0x9bc1b00,0x4000000,0x9bc1b00,0x4000000,0x4000000,0x40000000,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,0x80000000,0x0,0x0,0x4000000,0x3c000142,0x4000000,0x8000000,0x30000142,0x4000000,};
3248    }
3249    private static void jj_la1_1() {
3250       jj_la1_1 = new int[] {0xc6348000,0x48000,0x86300000,0x0,0x0,0x42100000,0x200000,0x6000000,0x0,0x0,0x0,0x0,0x0,0xc6348000,0x0,0x0,0x0,0x0,0x40300000,0x0,0x40100000,0x0,0x0,0x40100000,0x0,0x0,0x100000,0x40200000,0x0,0x0,0x40300000,0x40000000,0x40000000,0x40000000,0x80300000,0x0,0xc6348000,0x10000,0x10000,0x20000,0xc6348000,0x0,0xc6348000,0x0,0x0,0x0,0x20,0x10,0xc00,0xc00,0x3c0,0x3c0,0x1,0x1,0xe,0xe,0x0,0x40300000,0x0,0x40100000,0x200000,0x0,};
3251    }
3252    private static void jj_la1_2() {
3253       jj_la1_2 = new int[] {0x3,0x0,0x3,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x0,0x2,0x0,0x1,0x0,0x1,0x0,0x0,0x1,0x0,0x0,0x0,0x1,0x0,0x0,0x1,0x0,0x0,0x1,0x3,0x0,0x3,0x0,0x0,0x0,0x3,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x0,0x0,};
3254    }
3255   final private JJCalls[] jj_2_rtns = new JJCalls[12];
3256   private boolean jj_rescan = false;
3257   private int jj_gc = 0;
3258 
3259   public Parser(CharStream stream) {
3260     token_source = new ParserTokenManager(stream);
3261     token = new Token();
3262     jj_ntk = -1;
3263     jj_gen = 0;
3264     for (int i = 0; i < 62; i++) jj_la1[i] = -1;
3265     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
3266   }
3267 
3268   public void ReInit(CharStream stream) {
3269     token_source.ReInit(stream);
3270     token = new Token();
3271     jj_ntk = -1;
3272     jjtree.reset();
3273     jj_gen = 0;
3274     for (int i = 0; i < 62; i++) jj_la1[i] = -1;
3275     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
3276   }
3277 
3278   public Parser(ParserTokenManager tm) {
3279     token_source = tm;
3280     token = new Token();
3281     jj_ntk = -1;
3282     jj_gen = 0;
3283     for (int i = 0; i < 62; i++) jj_la1[i] = -1;
3284     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
3285   }
3286 
3287   public void ReInit(ParserTokenManager tm) {
3288     token_source = tm;
3289     token = new Token();
3290     jj_ntk = -1;
3291     jjtree.reset();
3292     jj_gen = 0;
3293     for (int i = 0; i < 62; i++) jj_la1[i] = -1;
3294     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
3295   }
3296 
3297   final private Token jj_consume_token(int kind) throws ParseException {
3298     Token oldToken;
3299     if ((oldToken = token).next != null) token = token.next;
3300     else token = token.next = token_source.getNextToken();
3301     jj_ntk = -1;
3302     if (token.kind == kind) {
3303       jj_gen++;
3304       if (++jj_gc > 100) {
3305         jj_gc = 0;
3306         for (int i = 0; i < jj_2_rtns.length; i++) {
3307           JJCalls c = jj_2_rtns[i];
3308           while (c != null) {
3309             if (c.gen < jj_gen) c.first = null;
3310             c = c.next;
3311           }
3312         }
3313       }
3314       return token;
3315     }
3316     token = oldToken;
3317     jj_kind = kind;
3318     throw generateParseException();
3319   }
3320 
3321   static private final class LookaheadSuccess extends java.lang.Error { }
3322   final private LookaheadSuccess jj_ls = new LookaheadSuccess();
3323   final private boolean jj_scan_token(int kind) {
3324     if (jj_scanpos == jj_lastpos) {
3325       jj_la--;
3326       if (jj_scanpos.next == null) {
3327         jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
3328       } else {
3329         jj_lastpos = jj_scanpos = jj_scanpos.next;
3330       }
3331     } else {
3332       jj_scanpos = jj_scanpos.next;
3333     }
3334     if (jj_rescan) {
3335       int i = 0; Token tok = token;
3336       while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
3337       if (tok != null) jj_add_error_token(kind, i);
3338     }
3339     if (jj_scanpos.kind != kind) return true;
3340     if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
3341     return false;
3342   }
3343 
3344   final public Token getNextToken() {
3345     if (token.next != null) token = token.next;
3346     else token = token.next = token_source.getNextToken();
3347     jj_ntk = -1;
3348     jj_gen++;
3349     return token;
3350   }
3351 
3352   final public Token getToken(int index) {
3353     Token t = lookingAhead ? jj_scanpos : token;
3354     for (int i = 0; i < index; i++) {
3355       if (t.next != null) t = t.next;
3356       else t = t.next = token_source.getNextToken();
3357     }
3358     return t;
3359   }
3360 
3361   final private int jj_ntk() {
3362     if ((jj_nt=token.next) == null)
3363       return (jj_ntk = (token.next=token_source.getNextToken()).kind);
3364     else
3365       return (jj_ntk = jj_nt.kind);
3366   }
3367 
3368   private java.util.Vector jj_expentries = new java.util.Vector();
3369   private int[] jj_expentry;
3370   private int jj_kind = -1;
3371   private int[] jj_lasttokens = new int[100];
3372   private int jj_endpos;
3373 
3374   private void jj_add_error_token(int kind, int pos) {
3375     if (pos >= 100) return;
3376     if (pos == jj_endpos + 1) {
3377       jj_lasttokens[jj_endpos++] = kind;
3378     } else if (jj_endpos != 0) {
3379       jj_expentry = new int[jj_endpos];
3380       for (int i = 0; i < jj_endpos; i++) {
3381         jj_expentry[i] = jj_lasttokens[i];
3382       }
3383       boolean exists = false;
3384       for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) {
3385         int[] oldentry = (int[])(e.nextElement());
3386         if (oldentry.length == jj_expentry.length) {
3387           exists = true;
3388           for (int i = 0; i < jj_expentry.length; i++) {
3389             if (oldentry[i] != jj_expentry[i]) {
3390               exists = false;
3391               break;
3392             }
3393           }
3394           if (exists) break;
3395         }
3396       }
3397       if (!exists) jj_expentries.addElement(jj_expentry);
3398       if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
3399     }
3400   }
3401 
3402   public ParseException generateParseException() {
3403     jj_expentries.removeAllElements();
3404     boolean[] la1tokens = new boolean[68];
3405     for (int i = 0; i < 68; i++) {
3406       la1tokens[i] = false;
3407     }
3408     if (jj_kind >= 0) {
3409       la1tokens[jj_kind] = true;
3410       jj_kind = -1;
3411     }
3412     for (int i = 0; i < 62; i++) {
3413       if (jj_la1[i] == jj_gen) {
3414         for (int j = 0; j < 32; j++) {
3415           if ((jj_la1_0[i] & (1<<j)) != 0) {
3416             la1tokens[j] = true;
3417           }
3418           if ((jj_la1_1[i] & (1<<j)) != 0) {
3419             la1tokens[32+j] = true;
3420           }
3421           if ((jj_la1_2[i] & (1<<j)) != 0) {
3422             la1tokens[64+j] = true;
3423           }
3424         }
3425       }
3426     }
3427     for (int i = 0; i < 68; i++) {
3428       if (la1tokens[i]) {
3429         jj_expentry = new int[1];
3430         jj_expentry[0] = i;
3431         jj_expentries.addElement(jj_expentry);
3432       }
3433     }
3434     jj_endpos = 0;
3435     jj_rescan_token();
3436     jj_add_error_token(0, 0);
3437     int[][] exptokseq = new int[jj_expentries.size()][];
3438     for (int i = 0; i < jj_expentries.size(); i++) {
3439       exptokseq[i] = (int[])jj_expentries.elementAt(i);
3440     }
3441     return new ParseException(token, exptokseq, tokenImage);
3442   }
3443 
3444   final public void enable_tracing() {
3445   }
3446 
3447   final public void disable_tracing() {
3448   }
3449 
3450   final private void jj_rescan_token() {
3451     jj_rescan = true;
3452     for (int i = 0; i < 12; i++) {
3453       JJCalls p = jj_2_rtns[i];
3454       do {
3455         if (p.gen > jj_gen) {
3456           jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
3457           switch (i) {
3458             case 0: jj_3_1(); break;
3459             case 1: jj_3_2(); break;
3460             case 2: jj_3_3(); break;
3461             case 3: jj_3_4(); break;
3462             case 4: jj_3_5(); break;
3463             case 5: jj_3_6(); break;
3464             case 6: jj_3_7(); break;
3465             case 7: jj_3_8(); break;
3466             case 8: jj_3_9(); break;
3467             case 9: jj_3_10(); break;
3468             case 10: jj_3_11(); break;
3469             case 11: jj_3_12(); break;
3470           }
3471         }
3472         p = p.next;
3473       } while (p != null);
3474     }
3475     jj_rescan = false;
3476   }
3477 
3478   final private void jj_save(int index, int xla) {
3479     JJCalls p = jj_2_rtns[index];
3480     while (p.gen > jj_gen) {
3481       if (p.next == null) { p = p.next = new JJCalls(); break; }
3482       p = p.next;
3483     }
3484     p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
3485   }
3486 
3487   static final class JJCalls {
3488     int gen;
3489     Token first;
3490     int arg;
3491     JJCalls next;
3492   }
3493 
3494 }