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 720228 2008-11-24 16:58:33Z nbubna $
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         /**
840          * Not a directive
841          */
842         token_source.stateStackPop();
843         token_source.inDirective = false;
844         {if (true) return jjtn000;}
845       }
846       ASTBlock jjtn001 = new ASTBlock(this, JJTBLOCK);
847       boolean jjtc001 = true;
848       jjtree.openNodeScope(jjtn001);
849       try {
850         label_4:
851         while (true) {
852           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
853           case LPAREN:
854           case RPAREN:
855           case ESCAPE_DIRECTIVE:
856           case SET_DIRECTIVE:
857           case SINGLE_LINE_COMMENT_START:
858           case DOUBLE_ESCAPE:
859           case ESCAPE:
860           case TEXT:
861           case FORMAL_COMMENT:
862           case MULTI_LINE_COMMENT:
863           case STRING_LITERAL:
864           case IF_DIRECTIVE:
865           case STOP_DIRECTIVE:
866           case INTEGER_LITERAL:
867           case FLOATING_POINT_LITERAL:
868           case WORD:
869           case BRACKETED_WORD:
870           case IDENTIFIER:
871           case DOT:
872           case LCURLY:
873           case RCURLY:
874             ;
875             break;
876           default:
877             jj_la1[13] = jj_gen;
878             break label_4;
879           }
880           Statement();
881         }
882       } catch (Throwable jjte001) {
883       if (jjtc001) {
884         jjtree.clearNodeScope(jjtn001);
885         jjtc001 = false;
886       } else {
887         jjtree.popNode();
888       }
889       if (jjte001 instanceof RuntimeException) {
890         {if (true) throw (RuntimeException)jjte001;}
891       }
892       if (jjte001 instanceof ParseException) {
893         {if (true) throw (ParseException)jjte001;}
894       }
895       {if (true) throw (Error)jjte001;}
896       } finally {
897       if (jjtc001) {
898         jjtree.closeNodeScope(jjtn001, true);
899       }
900       }
901       jj_consume_token(END);
902       jjtree.closeNodeScope(jjtn000, true);
903       jjtc000 = false;
904         /*
905          *  VM : if we are processing a #macro directive, we need to
906          *     process the block.  In truth, I can just register the name
907          *     and do the work later when init-ing.  That would work
908          *     as long as things were always defined before use.  This way
909          *     we don't have to worry about forward references and such...
910          */
911 
912         if (doItNow)
913         {
914             Macro.processAndRegister(rsvc, t, jjtn000, currentTemplateName);
915         }
916 
917         /*
918          *  VM : end
919          */
920 
921         {if (true) return jjtn000;}
922     } catch (Throwable jjte000) {
923       if (jjtc000) {
924         jjtree.clearNodeScope(jjtn000);
925         jjtc000 = false;
926       } else {
927         jjtree.popNode();
928       }
929       if (jjte000 instanceof RuntimeException) {
930         {if (true) throw (RuntimeException)jjte000;}
931       }
932       if (jjte000 instanceof ParseException) {
933         {if (true) throw (ParseException)jjte000;}
934       }
935       {if (true) throw (Error)jjte000;}
936     } finally {
937       if (jjtc000) {
938         jjtree.closeNodeScope(jjtn000, true);
939       }
940     }
941     throw new Error("Missing return statement in function");
942   }
943 
944 /**
945  * for creating a map in a #set
946  *
947  *  #set($foo = {$foo : $bar, $blargh : $thingy})
948  */
949   final public void Map() throws ParseException {
950               /*@bgen(jjtree) Map */
951   ASTMap jjtn000 = new ASTMap(this, JJTMAP);
952   boolean jjtc000 = true;
953   jjtree.openNodeScope(jjtn000);
954     try {
955       jj_consume_token(LEFT_CURLEY);
956       if (jj_2_5(2)) {
957         Parameter();
958         jj_consume_token(COLON);
959         Parameter();
960         label_5:
961         while (true) {
962           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
963           case COMMA:
964             ;
965             break;
966           default:
967             jj_la1[14] = jj_gen;
968             break label_5;
969           }
970           jj_consume_token(COMMA);
971           Parameter();
972           jj_consume_token(COLON);
973           Parameter();
974         }
975       } else {
976         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
977         case WHITESPACE:
978           jj_consume_token(WHITESPACE);
979           break;
980         default:
981           jj_la1[15] = jj_gen;
982           ;
983         }
984       }
985       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
986       case RIGHT_CURLEY:
987         jj_consume_token(RIGHT_CURLEY);
988         break;
989       case RCURLY:
990         jj_consume_token(RCURLY);
991         break;
992       default:
993         jj_la1[16] = jj_gen;
994         jj_consume_token(-1);
995         throw new ParseException();
996       }
997     } catch (Throwable jjte000) {
998       if (jjtc000) {
999         jjtree.clearNodeScope(jjtn000);
1000         jjtc000 = false;
1001       } else {
1002         jjtree.popNode();
1003       }
1004       if (jjte000 instanceof RuntimeException) {
1005         {if (true) throw (RuntimeException)jjte000;}
1006       }
1007       if (jjte000 instanceof ParseException) {
1008         {if (true) throw (ParseException)jjte000;}
1009       }
1010       {if (true) throw (Error)jjte000;}
1011     } finally {
1012       if (jjtc000) {
1013         jjtree.closeNodeScope(jjtn000, true);
1014       }
1015     }
1016   }
1017 
1018   final public void ObjectArray() throws ParseException {
1019                       /*@bgen(jjtree) ObjectArray */
1020   ASTObjectArray jjtn000 = new ASTObjectArray(this, JJTOBJECTARRAY);
1021   boolean jjtc000 = true;
1022   jjtree.openNodeScope(jjtn000);
1023     try {
1024       jj_consume_token(LBRACKET);
1025       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1026       case LBRACKET:
1027       case LEFT_CURLEY:
1028       case WHITESPACE:
1029       case STRING_LITERAL:
1030       case TRUE:
1031       case FALSE:
1032       case INTEGER_LITERAL:
1033       case FLOATING_POINT_LITERAL:
1034       case IDENTIFIER:
1035       case LCURLY:
1036         Parameter();
1037         label_6:
1038         while (true) {
1039           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1040           case COMMA:
1041             ;
1042             break;
1043           default:
1044             jj_la1[17] = jj_gen;
1045             break label_6;
1046           }
1047           jj_consume_token(COMMA);
1048           Parameter();
1049         }
1050         break;
1051       default:
1052         jj_la1[18] = jj_gen;
1053         ;
1054       }
1055       jj_consume_token(RBRACKET);
1056     } catch (Throwable jjte000) {
1057       if (jjtc000) {
1058         jjtree.clearNodeScope(jjtn000);
1059         jjtc000 = false;
1060       } else {
1061         jjtree.popNode();
1062       }
1063       if (jjte000 instanceof RuntimeException) {
1064         {if (true) throw (RuntimeException)jjte000;}
1065       }
1066       if (jjte000 instanceof ParseException) {
1067         {if (true) throw (ParseException)jjte000;}
1068       }
1069       {if (true) throw (Error)jjte000;}
1070     } finally {
1071       if (jjtc000) {
1072         jjtree.closeNodeScope(jjtn000, true);
1073       }
1074     }
1075   }
1076 
1077 /**
1078  *  supports the [n..m] vector generator for use in
1079  *  the #foreach() to generate measured ranges w/o
1080  *  needing explicit support from the app/servlet
1081  */
1082   final public void IntegerRange() throws ParseException {
1083                        /*@bgen(jjtree) IntegerRange */
1084   ASTIntegerRange jjtn000 = new ASTIntegerRange(this, JJTINTEGERRANGE);
1085   boolean jjtc000 = true;
1086   jjtree.openNodeScope(jjtn000);
1087     try {
1088       jj_consume_token(LBRACKET);
1089       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1090       case WHITESPACE:
1091         jj_consume_token(WHITESPACE);
1092         break;
1093       default:
1094         jj_la1[19] = jj_gen;
1095         ;
1096       }
1097       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1098       case IDENTIFIER:
1099       case LCURLY:
1100         Reference();
1101         break;
1102       case INTEGER_LITERAL:
1103         IntegerLiteral();
1104         break;
1105       default:
1106         jj_la1[20] = jj_gen;
1107         jj_consume_token(-1);
1108         throw new ParseException();
1109       }
1110       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1111       case WHITESPACE:
1112         jj_consume_token(WHITESPACE);
1113         break;
1114       default:
1115         jj_la1[21] = jj_gen;
1116         ;
1117       }
1118       jj_consume_token(DOUBLEDOT);
1119       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1120       case WHITESPACE:
1121         jj_consume_token(WHITESPACE);
1122         break;
1123       default:
1124         jj_la1[22] = jj_gen;
1125         ;
1126       }
1127       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1128       case IDENTIFIER:
1129       case LCURLY:
1130         Reference();
1131         break;
1132       case INTEGER_LITERAL:
1133         IntegerLiteral();
1134         break;
1135       default:
1136         jj_la1[23] = jj_gen;
1137         jj_consume_token(-1);
1138         throw new ParseException();
1139       }
1140       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1141       case WHITESPACE:
1142         jj_consume_token(WHITESPACE);
1143         break;
1144       default:
1145         jj_la1[24] = jj_gen;
1146         ;
1147       }
1148       jj_consume_token(RBRACKET);
1149     } catch (Throwable jjte000) {
1150       if (jjtc000) {
1151         jjtree.clearNodeScope(jjtn000);
1152         jjtc000 = false;
1153       } else {
1154         jjtree.popNode();
1155       }
1156       if (jjte000 instanceof RuntimeException) {
1157         {if (true) throw (RuntimeException)jjte000;}
1158       }
1159       if (jjte000 instanceof ParseException) {
1160         {if (true) throw (ParseException)jjte000;}
1161       }
1162       {if (true) throw (Error)jjte000;}
1163     } finally {
1164       if (jjtc000) {
1165         jjtree.closeNodeScope(jjtn000, true);
1166       }
1167     }
1168   }
1169 
1170 /**
1171  * This method has yet to be fully implemented
1172  * but will allow arbitrarily nested method
1173  * calls
1174  */
1175   final public void Parameter() throws ParseException {
1176     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1177     case WHITESPACE:
1178       jj_consume_token(WHITESPACE);
1179       break;
1180     default:
1181       jj_la1[25] = jj_gen;
1182       ;
1183     }
1184     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1185     case STRING_LITERAL:
1186       StringLiteral();
1187       break;
1188     case INTEGER_LITERAL:
1189       IntegerLiteral();
1190       break;
1191     default:
1192       jj_la1[26] = jj_gen;
1193       if (jj_2_6(2147483647)) {
1194         IntegerRange();
1195       } else {
1196         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1197         case LEFT_CURLEY:
1198           Map();
1199           break;
1200         case LBRACKET:
1201           ObjectArray();
1202           break;
1203         case TRUE:
1204           True();
1205           break;
1206         case FALSE:
1207           False();
1208           break;
1209         case IDENTIFIER:
1210         case LCURLY:
1211           Reference();
1212           break;
1213         case FLOATING_POINT_LITERAL:
1214           FloatingPointLiteral();
1215           break;
1216         default:
1217           jj_la1[27] = jj_gen;
1218           jj_consume_token(-1);
1219           throw new ParseException();
1220         }
1221       }
1222     }
1223     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1224     case WHITESPACE:
1225       jj_consume_token(WHITESPACE);
1226       break;
1227     default:
1228       jj_la1[28] = jj_gen;
1229       ;
1230     }
1231   }
1232 
1233 /**
1234  * This method has yet to be fully implemented
1235  * but will allow arbitrarily nested method
1236  * calls
1237  */
1238   final public void Method() throws ParseException {
1239                  /*@bgen(jjtree) Method */
1240   ASTMethod jjtn000 = new ASTMethod(this, JJTMETHOD);
1241   boolean jjtc000 = true;
1242   jjtree.openNodeScope(jjtn000);
1243     try {
1244       Identifier();
1245       jj_consume_token(LPAREN);
1246       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1247       case LBRACKET:
1248       case LEFT_CURLEY:
1249       case WHITESPACE:
1250       case STRING_LITERAL:
1251       case TRUE:
1252       case FALSE:
1253       case INTEGER_LITERAL:
1254       case FLOATING_POINT_LITERAL:
1255       case IDENTIFIER:
1256       case LCURLY:
1257         Parameter();
1258         label_7:
1259         while (true) {
1260           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1261           case COMMA:
1262             ;
1263             break;
1264           default:
1265             jj_la1[29] = jj_gen;
1266             break label_7;
1267           }
1268           jj_consume_token(COMMA);
1269           Parameter();
1270         }
1271         break;
1272       default:
1273         jj_la1[30] = jj_gen;
1274         ;
1275       }
1276       jj_consume_token(REFMOD2_RPAREN);
1277     } catch (Throwable jjte000) {
1278      if (jjtc000) {
1279        jjtree.clearNodeScope(jjtn000);
1280        jjtc000 = false;
1281      } else {
1282        jjtree.popNode();
1283      }
1284      if (jjte000 instanceof RuntimeException) {
1285        {if (true) throw (RuntimeException)jjte000;}
1286      }
1287      if (jjte000 instanceof ParseException) {
1288        {if (true) throw (ParseException)jjte000;}
1289      }
1290      {if (true) throw (Error)jjte000;}
1291     } finally {
1292      if (jjtc000) {
1293        jjtree.closeNodeScope(jjtn000, true);
1294      }
1295     }
1296   }
1297 
1298   final public void Reference() throws ParseException {
1299                     /*@bgen(jjtree) Reference */
1300   ASTReference jjtn000 = new ASTReference(this, JJTREFERENCE);
1301   boolean jjtc000 = true;
1302   jjtree.openNodeScope(jjtn000);
1303     try {
1304       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1305       case IDENTIFIER:
1306         jj_consume_token(IDENTIFIER);
1307         label_8:
1308         while (true) {
1309           if (jj_2_7(2)) {
1310             ;
1311           } else {
1312             break label_8;
1313           }
1314           jj_consume_token(DOT);
1315           if (jj_2_8(3)) {
1316             Method();
1317           } else {
1318             switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1319             case IDENTIFIER:
1320               Identifier();
1321               break;
1322             default:
1323               jj_la1[31] = jj_gen;
1324               jj_consume_token(-1);
1325               throw new ParseException();
1326             }
1327           }
1328         }
1329         break;
1330       case LCURLY:
1331         jj_consume_token(LCURLY);
1332         jj_consume_token(IDENTIFIER);
1333         label_9:
1334         while (true) {
1335           if (jj_2_9(2)) {
1336             ;
1337           } else {
1338             break label_9;
1339           }
1340           jj_consume_token(DOT);
1341           if (jj_2_10(3)) {
1342             Method();
1343           } else {
1344             switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1345             case IDENTIFIER:
1346               Identifier();
1347               break;
1348             default:
1349               jj_la1[32] = jj_gen;
1350               jj_consume_token(-1);
1351               throw new ParseException();
1352             }
1353           }
1354         }
1355         jj_consume_token(RCURLY);
1356         break;
1357       default:
1358         jj_la1[33] = jj_gen;
1359         jj_consume_token(-1);
1360         throw new ParseException();
1361       }
1362     } catch (Throwable jjte000) {
1363         if (jjtc000) {
1364           jjtree.clearNodeScope(jjtn000);
1365           jjtc000 = false;
1366         } else {
1367           jjtree.popNode();
1368         }
1369         if (jjte000 instanceof RuntimeException) {
1370           {if (true) throw (RuntimeException)jjte000;}
1371         }
1372         if (jjte000 instanceof ParseException) {
1373           {if (true) throw (ParseException)jjte000;}
1374         }
1375         {if (true) throw (Error)jjte000;}
1376     } finally {
1377         if (jjtc000) {
1378           jjtree.closeNodeScope(jjtn000, true);
1379         }
1380     }
1381   }
1382 
1383   final public void True() throws ParseException {
1384                /*@bgen(jjtree) True */
1385   ASTTrue jjtn000 = new ASTTrue(this, JJTTRUE);
1386   boolean jjtc000 = true;
1387   jjtree.openNodeScope(jjtn000);
1388     try {
1389       jj_consume_token(TRUE);
1390     } finally {
1391       if (jjtc000) {
1392         jjtree.closeNodeScope(jjtn000, true);
1393       }
1394     }
1395   }
1396 
1397   final public void False() throws ParseException {
1398                 /*@bgen(jjtree) False */
1399   ASTFalse jjtn000 = new ASTFalse(this, JJTFALSE);
1400   boolean jjtc000 = true;
1401   jjtree.openNodeScope(jjtn000);
1402     try {
1403       jj_consume_token(FALSE);
1404     } finally {
1405       if (jjtc000) {
1406         jjtree.closeNodeScope(jjtn000, true);
1407       }
1408     }
1409   }
1410 
1411 /**
1412  * This method is responsible for allowing
1413  * all non-grammar text to pass through
1414  * unscathed.
1415  */
1416   final public void Text() throws ParseException {
1417                /*@bgen(jjtree) Text */
1418   ASTText jjtn000 = new ASTText(this, JJTTEXT);
1419   boolean jjtc000 = true;
1420   jjtree.openNodeScope(jjtn000);
1421     try {
1422       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1423       case TEXT:
1424         jj_consume_token(TEXT);
1425         break;
1426       case DOT:
1427         jj_consume_token(DOT);
1428         break;
1429       case RPAREN:
1430         jj_consume_token(RPAREN);
1431         break;
1432       case LPAREN:
1433         jj_consume_token(LPAREN);
1434         break;
1435       case INTEGER_LITERAL:
1436         jj_consume_token(INTEGER_LITERAL);
1437         break;
1438       case FLOATING_POINT_LITERAL:
1439         jj_consume_token(FLOATING_POINT_LITERAL);
1440         break;
1441       case STRING_LITERAL:
1442         jj_consume_token(STRING_LITERAL);
1443         break;
1444       case ESCAPE:
1445         jj_consume_token(ESCAPE);
1446         break;
1447       case LCURLY:
1448         jj_consume_token(LCURLY);
1449         break;
1450       case RCURLY:
1451         jj_consume_token(RCURLY);
1452         break;
1453       default:
1454         jj_la1[34] = jj_gen;
1455         jj_consume_token(-1);
1456         throw new ParseException();
1457       }
1458     } finally {
1459       if (jjtc000) {
1460         jjtree.closeNodeScope(jjtn000, true);
1461       }
1462     }
1463   }
1464 
1465 /* -----------------------------------------------------------------------
1466  *
1467  *  Defined Directive Syntax
1468  *
1469  * ----------------------------------------------------------------------*/
1470   final public void IfStatement() throws ParseException {
1471                       /*@bgen(jjtree) IfStatement */
1472   ASTIfStatement jjtn000 = new ASTIfStatement(this, JJTIFSTATEMENT);
1473   boolean jjtc000 = true;
1474   jjtree.openNodeScope(jjtn000);
1475     try {
1476       jj_consume_token(IF_DIRECTIVE);
1477       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1478       case WHITESPACE:
1479         jj_consume_token(WHITESPACE);
1480         break;
1481       default:
1482         jj_la1[35] = jj_gen;
1483         ;
1484       }
1485       jj_consume_token(LPAREN);
1486       Expression();
1487       jj_consume_token(RPAREN);
1488       ASTBlock jjtn001 = new ASTBlock(this, JJTBLOCK);
1489       boolean jjtc001 = true;
1490       jjtree.openNodeScope(jjtn001);
1491       try {
1492         label_10:
1493         while (true) {
1494           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1495           case LPAREN:
1496           case RPAREN:
1497           case ESCAPE_DIRECTIVE:
1498           case SET_DIRECTIVE:
1499           case SINGLE_LINE_COMMENT_START:
1500           case DOUBLE_ESCAPE:
1501           case ESCAPE:
1502           case TEXT:
1503           case FORMAL_COMMENT:
1504           case MULTI_LINE_COMMENT:
1505           case STRING_LITERAL:
1506           case IF_DIRECTIVE:
1507           case STOP_DIRECTIVE:
1508           case INTEGER_LITERAL:
1509           case FLOATING_POINT_LITERAL:
1510           case WORD:
1511           case BRACKETED_WORD:
1512           case IDENTIFIER:
1513           case DOT:
1514           case LCURLY:
1515           case RCURLY:
1516             ;
1517             break;
1518           default:
1519             jj_la1[36] = jj_gen;
1520             break label_10;
1521           }
1522           Statement();
1523         }
1524       } catch (Throwable jjte001) {
1525       if (jjtc001) {
1526         jjtree.clearNodeScope(jjtn001);
1527         jjtc001 = false;
1528       } else {
1529         jjtree.popNode();
1530       }
1531       if (jjte001 instanceof RuntimeException) {
1532         {if (true) throw (RuntimeException)jjte001;}
1533       }
1534       if (jjte001 instanceof ParseException) {
1535         {if (true) throw (ParseException)jjte001;}
1536       }
1537       {if (true) throw (Error)jjte001;}
1538       } finally {
1539       if (jjtc001) {
1540         jjtree.closeNodeScope(jjtn001, true);
1541       }
1542       }
1543       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1544       case ELSEIF_DIRECTIVE:
1545         label_11:
1546         while (true) {
1547           ElseIfStatement();
1548           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1549           case ELSEIF_DIRECTIVE:
1550             ;
1551             break;
1552           default:
1553             jj_la1[37] = jj_gen;
1554             break label_11;
1555           }
1556         }
1557         break;
1558       default:
1559         jj_la1[38] = jj_gen;
1560         ;
1561       }
1562       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1563       case ELSE_DIRECTIVE:
1564         ElseStatement();
1565         break;
1566       default:
1567         jj_la1[39] = jj_gen;
1568         ;
1569       }
1570       jj_consume_token(END);
1571     } catch (Throwable jjte000) {
1572       if (jjtc000) {
1573         jjtree.clearNodeScope(jjtn000);
1574         jjtc000 = false;
1575       } else {
1576         jjtree.popNode();
1577       }
1578       if (jjte000 instanceof RuntimeException) {
1579         {if (true) throw (RuntimeException)jjte000;}
1580       }
1581       if (jjte000 instanceof ParseException) {
1582         {if (true) throw (ParseException)jjte000;}
1583       }
1584       {if (true) throw (Error)jjte000;}
1585     } finally {
1586       if (jjtc000) {
1587         jjtree.closeNodeScope(jjtn000, true);
1588       }
1589     }
1590   }
1591 
1592   final public void ElseStatement() throws ParseException {
1593                         /*@bgen(jjtree) ElseStatement */
1594   ASTElseStatement jjtn000 = new ASTElseStatement(this, JJTELSESTATEMENT);
1595   boolean jjtc000 = true;
1596   jjtree.openNodeScope(jjtn000);
1597     try {
1598       jj_consume_token(ELSE_DIRECTIVE);
1599       ASTBlock jjtn001 = new ASTBlock(this, JJTBLOCK);
1600       boolean jjtc001 = true;
1601       jjtree.openNodeScope(jjtn001);
1602       try {
1603         label_12:
1604         while (true) {
1605           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1606           case LPAREN:
1607           case RPAREN:
1608           case ESCAPE_DIRECTIVE:
1609           case SET_DIRECTIVE:
1610           case SINGLE_LINE_COMMENT_START:
1611           case DOUBLE_ESCAPE:
1612           case ESCAPE:
1613           case TEXT:
1614           case FORMAL_COMMENT:
1615           case MULTI_LINE_COMMENT:
1616           case STRING_LITERAL:
1617           case IF_DIRECTIVE:
1618           case STOP_DIRECTIVE:
1619           case INTEGER_LITERAL:
1620           case FLOATING_POINT_LITERAL:
1621           case WORD:
1622           case BRACKETED_WORD:
1623           case IDENTIFIER:
1624           case DOT:
1625           case LCURLY:
1626           case RCURLY:
1627             ;
1628             break;
1629           default:
1630             jj_la1[40] = jj_gen;
1631             break label_12;
1632           }
1633           Statement();
1634         }
1635       } catch (Throwable jjte001) {
1636       if (jjtc001) {
1637         jjtree.clearNodeScope(jjtn001);
1638         jjtc001 = false;
1639       } else {
1640         jjtree.popNode();
1641       }
1642       if (jjte001 instanceof RuntimeException) {
1643         {if (true) throw (RuntimeException)jjte001;}
1644       }
1645       if (jjte001 instanceof ParseException) {
1646         {if (true) throw (ParseException)jjte001;}
1647       }
1648       {if (true) throw (Error)jjte001;}
1649       } finally {
1650       if (jjtc001) {
1651         jjtree.closeNodeScope(jjtn001, true);
1652       }
1653       }
1654     } catch (Throwable jjte000) {
1655      if (jjtc000) {
1656        jjtree.clearNodeScope(jjtn000);
1657        jjtc000 = false;
1658      } else {
1659        jjtree.popNode();
1660      }
1661      if (jjte000 instanceof RuntimeException) {
1662        {if (true) throw (RuntimeException)jjte000;}
1663      }
1664      if (jjte000 instanceof ParseException) {
1665        {if (true) throw (ParseException)jjte000;}
1666      }
1667      {if (true) throw (Error)jjte000;}
1668     } finally {
1669      if (jjtc000) {
1670        jjtree.closeNodeScope(jjtn000, true);
1671      }
1672     }
1673   }
1674 
1675   final public void ElseIfStatement() throws ParseException {
1676                           /*@bgen(jjtree) ElseIfStatement */
1677   ASTElseIfStatement jjtn000 = new ASTElseIfStatement(this, JJTELSEIFSTATEMENT);
1678   boolean jjtc000 = true;
1679   jjtree.openNodeScope(jjtn000);
1680     try {
1681       jj_consume_token(ELSEIF_DIRECTIVE);
1682       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1683       case WHITESPACE:
1684         jj_consume_token(WHITESPACE);
1685         break;
1686       default:
1687         jj_la1[41] = jj_gen;
1688         ;
1689       }
1690       jj_consume_token(LPAREN);
1691       Expression();
1692       jj_consume_token(RPAREN);
1693       ASTBlock jjtn001 = new ASTBlock(this, JJTBLOCK);
1694       boolean jjtc001 = true;
1695       jjtree.openNodeScope(jjtn001);
1696       try {
1697         label_13:
1698         while (true) {
1699           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1700           case LPAREN:
1701           case RPAREN:
1702           case ESCAPE_DIRECTIVE:
1703           case SET_DIRECTIVE:
1704           case SINGLE_LINE_COMMENT_START:
1705           case DOUBLE_ESCAPE:
1706           case ESCAPE:
1707           case TEXT:
1708           case FORMAL_COMMENT:
1709           case MULTI_LINE_COMMENT:
1710           case STRING_LITERAL:
1711           case IF_DIRECTIVE:
1712           case STOP_DIRECTIVE:
1713           case INTEGER_LITERAL:
1714           case FLOATING_POINT_LITERAL:
1715           case WORD:
1716           case BRACKETED_WORD:
1717           case IDENTIFIER:
1718           case DOT:
1719           case LCURLY:
1720           case RCURLY:
1721             ;
1722             break;
1723           default:
1724             jj_la1[42] = jj_gen;
1725             break label_13;
1726           }
1727           Statement();
1728         }
1729       } catch (Throwable jjte001) {
1730       if (jjtc001) {
1731         jjtree.clearNodeScope(jjtn001);
1732         jjtc001 = false;
1733       } else {
1734         jjtree.popNode();
1735       }
1736       if (jjte001 instanceof RuntimeException) {
1737         {if (true) throw (RuntimeException)jjte001;}
1738       }
1739       if (jjte001 instanceof ParseException) {
1740         {if (true) throw (ParseException)jjte001;}
1741       }
1742       {if (true) throw (Error)jjte001;}
1743       } finally {
1744       if (jjtc001) {
1745         jjtree.closeNodeScope(jjtn001, true);
1746       }
1747       }
1748     } catch (Throwable jjte000) {
1749       if (jjtc000) {
1750         jjtree.clearNodeScope(jjtn000);
1751         jjtc000 = false;
1752       } else {
1753         jjtree.popNode();
1754       }
1755       if (jjte000 instanceof RuntimeException) {
1756         {if (true) throw (RuntimeException)jjte000;}
1757       }
1758       if (jjte000 instanceof ParseException) {
1759         {if (true) throw (ParseException)jjte000;}
1760       }
1761       {if (true) throw (Error)jjte000;}
1762     } finally {
1763       if (jjtc000) {
1764         jjtree.closeNodeScope(jjtn000, true);
1765       }
1766     }
1767   }
1768 
1769 /**
1770  *  Currently support both types of set :
1771  *   #set( expr )
1772  *   #set expr
1773  */
1774   final public void SetDirective() throws ParseException {
1775                        /*@bgen(jjtree) SetDirective */
1776   ASTSetDirective jjtn000 = new ASTSetDirective(this, JJTSETDIRECTIVE);
1777   boolean jjtc000 = true;
1778   jjtree.openNodeScope(jjtn000);
1779     try {
1780       jj_consume_token(SET_DIRECTIVE);
1781       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1782       case WHITESPACE:
1783         jj_consume_token(WHITESPACE);
1784         break;
1785       default:
1786         jj_la1[43] = jj_gen;
1787         ;
1788       }
1789       Reference();
1790       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1791       case WHITESPACE:
1792         jj_consume_token(WHITESPACE);
1793         break;
1794       default:
1795         jj_la1[44] = jj_gen;
1796         ;
1797       }
1798       jj_consume_token(EQUALS);
1799       Expression();
1800       jj_consume_token(RPAREN);
1801         /*
1802          * ensure that inSet is false.  Leads to some amusing bugs...
1803          */
1804 
1805         token_source.inSet = false;
1806       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1807       case NEWLINE:
1808         jj_consume_token(NEWLINE);
1809         break;
1810       default:
1811         jj_la1[45] = jj_gen;
1812         ;
1813       }
1814     } catch (Throwable jjte000) {
1815       if (jjtc000) {
1816         jjtree.clearNodeScope(jjtn000);
1817         jjtc000 = false;
1818       } else {
1819         jjtree.popNode();
1820       }
1821       if (jjte000 instanceof RuntimeException) {
1822         {if (true) throw (RuntimeException)jjte000;}
1823       }
1824       if (jjte000 instanceof ParseException) {
1825         {if (true) throw (ParseException)jjte000;}
1826       }
1827       {if (true) throw (Error)jjte000;}
1828     } finally {
1829       if (jjtc000) {
1830         jjtree.closeNodeScope(jjtn000, true);
1831       }
1832     }
1833   }
1834 
1835 /**
1836  * This method corresponds to the #stop
1837  * directive which just simulates and EOF
1838  * so that parsing stops. The #stop directive
1839  * is useful for end-user debugging
1840  * purposes.
1841  */
1842   final public void StopStatement() throws ParseException {
1843                                 /*@bgen(jjtree) #Stop( 0) */
1844   ASTStop jjtn000 = new ASTStop(this, JJTSTOP);
1845   boolean jjtc000 = true;
1846   jjtree.openNodeScope(jjtn000);
1847     try {
1848       jj_consume_token(STOP_DIRECTIVE);
1849     } finally {
1850       if (jjtc000) {
1851         jjtree.closeNodeScope(jjtn000,  0);
1852       }
1853     }
1854   }
1855 
1856 /* -----------------------------------------------------------------------
1857  *
1858  *  Expression Syntax
1859  *
1860  * ----------------------------------------------------------------------*/
1861   final public void Expression() throws ParseException {
1862                      /*@bgen(jjtree) Expression */
1863   ASTExpression jjtn000 = new ASTExpression(this, JJTEXPRESSION);
1864   boolean jjtc000 = true;
1865   jjtree.openNodeScope(jjtn000);
1866     try {
1867       ConditionalOrExpression();
1868     } catch (Throwable jjte000) {
1869   if (jjtc000) {
1870     jjtree.clearNodeScope(jjtn000);
1871     jjtc000 = false;
1872   } else {
1873     jjtree.popNode();
1874   }
1875   if (jjte000 instanceof RuntimeException) {
1876     {if (true) throw (RuntimeException)jjte000;}
1877   }
1878   if (jjte000 instanceof ParseException) {
1879     {if (true) throw (ParseException)jjte000;}
1880   }
1881   {if (true) throw (Error)jjte000;}
1882     } finally {
1883   if (jjtc000) {
1884     jjtree.closeNodeScope(jjtn000, true);
1885   }
1886     }
1887   }
1888 
1889   final public void Assignment() throws ParseException {
1890                                     /*@bgen(jjtree) #Assignment( 2) */
1891   ASTAssignment jjtn000 = new ASTAssignment(this, JJTASSIGNMENT);
1892   boolean jjtc000 = true;
1893   jjtree.openNodeScope(jjtn000);
1894     try {
1895       PrimaryExpression();
1896       jj_consume_token(EQUALS);
1897       Expression();
1898     } catch (Throwable jjte000) {
1899       if (jjtc000) {
1900         jjtree.clearNodeScope(jjtn000);
1901         jjtc000 = false;
1902       } else {
1903         jjtree.popNode();
1904       }
1905       if (jjte000 instanceof RuntimeException) {
1906         {if (true) throw (RuntimeException)jjte000;}
1907       }
1908       if (jjte000 instanceof ParseException) {
1909         {if (true) throw (ParseException)jjte000;}
1910       }
1911       {if (true) throw (Error)jjte000;}
1912     } finally {
1913       if (jjtc000) {
1914         jjtree.closeNodeScope(jjtn000,  2);
1915       }
1916     }
1917   }
1918 
1919   final public void ConditionalOrExpression() throws ParseException {
1920     ConditionalAndExpression();
1921     label_14:
1922     while (true) {
1923       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1924       case LOGICAL_OR:
1925         ;
1926         break;
1927       default:
1928         jj_la1[46] = jj_gen;
1929         break label_14;
1930       }
1931       jj_consume_token(LOGICAL_OR);
1932                      ASTOrNode jjtn001 = new ASTOrNode(this, JJTORNODE);
1933                      boolean jjtc001 = true;
1934                      jjtree.openNodeScope(jjtn001);
1935       try {
1936         ConditionalAndExpression();
1937       } catch (Throwable jjte001) {
1938                      if (jjtc001) {
1939                        jjtree.clearNodeScope(jjtn001);
1940                        jjtc001 = false;
1941                      } else {
1942                        jjtree.popNode();
1943                      }
1944                      if (jjte001 instanceof RuntimeException) {
1945                        {if (true) throw (RuntimeException)jjte001;}
1946                      }
1947                      if (jjte001 instanceof ParseException) {
1948                        {if (true) throw (ParseException)jjte001;}
1949                      }
1950                      {if (true) throw (Error)jjte001;}
1951       } finally {
1952                      if (jjtc001) {
1953                        jjtree.closeNodeScope(jjtn001,  2);
1954                      }
1955       }
1956     }
1957   }
1958 
1959   final public void ConditionalAndExpression() throws ParseException {
1960     EqualityExpression();
1961     label_15:
1962     while (true) {
1963       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1964       case LOGICAL_AND:
1965         ;
1966         break;
1967       default:
1968         jj_la1[47] = jj_gen;
1969         break label_15;
1970       }
1971       jj_consume_token(LOGICAL_AND);
1972                     ASTAndNode jjtn001 = new ASTAndNode(this, JJTANDNODE);
1973                     boolean jjtc001 = true;
1974                     jjtree.openNodeScope(jjtn001);
1975       try {
1976         EqualityExpression();
1977       } catch (Throwable jjte001) {
1978                     if (jjtc001) {
1979                       jjtree.clearNodeScope(jjtn001);
1980                       jjtc001 = false;
1981                     } else {
1982                       jjtree.popNode();
1983                     }
1984                     if (jjte001 instanceof RuntimeException) {
1985                       {if (true) throw (RuntimeException)jjte001;}
1986                     }
1987                     if (jjte001 instanceof ParseException) {
1988                       {if (true) throw (ParseException)jjte001;}
1989                     }
1990                     {if (true) throw (Error)jjte001;}
1991       } finally {
1992                     if (jjtc001) {
1993                       jjtree.closeNodeScope(jjtn001,  2);
1994                     }
1995       }
1996     }
1997   }
1998 
1999   final public void EqualityExpression() throws ParseException {
2000     RelationalExpression();
2001     label_16:
2002     while (true) {
2003       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2004       case LOGICAL_EQUALS:
2005       case LOGICAL_NOT_EQUALS:
2006         ;
2007         break;
2008       default:
2009         jj_la1[48] = jj_gen;
2010         break label_16;
2011       }
2012       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2013       case LOGICAL_EQUALS:
2014         jj_consume_token(LOGICAL_EQUALS);
2015                           ASTEQNode jjtn001 = new ASTEQNode(this, JJTEQNODE);
2016                           boolean jjtc001 = true;
2017                           jjtree.openNodeScope(jjtn001);
2018         try {
2019           RelationalExpression();
2020         } catch (Throwable jjte001) {
2021                           if (jjtc001) {
2022                             jjtree.clearNodeScope(jjtn001);
2023                             jjtc001 = false;
2024                           } else {
2025                             jjtree.popNode();
2026                           }
2027                           if (jjte001 instanceof RuntimeException) {
2028                             {if (true) throw (RuntimeException)jjte001;}
2029                           }
2030                           if (jjte001 instanceof ParseException) {
2031                             {if (true) throw (ParseException)jjte001;}
2032                           }
2033                           {if (true) throw (Error)jjte001;}
2034         } finally {
2035                           if (jjtc001) {
2036                             jjtree.closeNodeScope(jjtn001,  2);
2037                           }
2038         }
2039         break;
2040       case LOGICAL_NOT_EQUALS:
2041         jj_consume_token(LOGICAL_NOT_EQUALS);
2042                               ASTNENode jjtn002 = new ASTNENode(this, JJTNENODE);
2043                               boolean jjtc002 = true;
2044                               jjtree.openNodeScope(jjtn002);
2045         try {
2046           RelationalExpression();
2047         } catch (Throwable jjte002) {
2048                               if (jjtc002) {
2049                                 jjtree.clearNodeScope(jjtn002);
2050                                 jjtc002 = false;
2051                               } else {
2052                                 jjtree.popNode();
2053                               }
2054                               if (jjte002 instanceof RuntimeException) {
2055                                 {if (true) throw (RuntimeException)jjte002;}
2056                               }
2057                               if (jjte002 instanceof ParseException) {
2058                                 {if (true) throw (ParseException)jjte002;}
2059                               }
2060                               {if (true) throw (Error)jjte002;}
2061         } finally {
2062                               if (jjtc002) {
2063                                 jjtree.closeNodeScope(jjtn002,  2);
2064                               }
2065         }
2066         break;
2067       default:
2068         jj_la1[49] = jj_gen;
2069         jj_consume_token(-1);
2070         throw new ParseException();
2071       }
2072     }
2073   }
2074 
2075   final public void RelationalExpression() throws ParseException {
2076     AdditiveExpression();
2077     label_17:
2078     while (true) {
2079       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2080       case LOGICAL_LT:
2081       case LOGICAL_LE:
2082       case LOGICAL_GT:
2083       case LOGICAL_GE:
2084         ;
2085         break;
2086       default:
2087         jj_la1[50] = jj_gen;
2088         break label_17;
2089       }
2090       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2091       case LOGICAL_LT:
2092         jj_consume_token(LOGICAL_LT);
2093                         ASTLTNode jjtn001 = new ASTLTNode(this, JJTLTNODE);
2094                         boolean jjtc001 = true;
2095                         jjtree.openNodeScope(jjtn001);
2096         try {
2097           AdditiveExpression();
2098         } catch (Throwable jjte001) {
2099                         if (jjtc001) {
2100                           jjtree.clearNodeScope(jjtn001);
2101                           jjtc001 = false;
2102                         } else {
2103                           jjtree.popNode();
2104                         }
2105                         if (jjte001 instanceof RuntimeException) {
2106                           {if (true) throw (RuntimeException)jjte001;}
2107                         }
2108                         if (jjte001 instanceof ParseException) {
2109                           {if (true) throw (ParseException)jjte001;}
2110                         }
2111                         {if (true) throw (Error)jjte001;}
2112         } finally {
2113                         if (jjtc001) {
2114                           jjtree.closeNodeScope(jjtn001,  2);
2115                         }
2116         }
2117         break;
2118       case LOGICAL_GT:
2119         jj_consume_token(LOGICAL_GT);
2120                         ASTGTNode jjtn002 = new ASTGTNode(this, JJTGTNODE);
2121                         boolean jjtc002 = true;
2122                         jjtree.openNodeScope(jjtn002);
2123         try {
2124           AdditiveExpression();
2125         } catch (Throwable jjte002) {
2126                         if (jjtc002) {
2127                           jjtree.clearNodeScope(jjtn002);
2128                           jjtc002 = false;
2129                         } else {
2130                           jjtree.popNode();
2131                         }
2132                         if (jjte002 instanceof RuntimeException) {
2133                           {if (true) throw (RuntimeException)jjte002;}
2134                         }
2135                         if (jjte002 instanceof ParseException) {
2136                           {if (true) throw (ParseException)jjte002;}
2137                         }
2138                         {if (true) throw (Error)jjte002;}
2139         } finally {
2140                         if (jjtc002) {
2141                           jjtree.closeNodeScope(jjtn002,  2);
2142                         }
2143         }
2144         break;
2145       case LOGICAL_LE:
2146         jj_consume_token(LOGICAL_LE);
2147                         ASTLENode jjtn003 = new ASTLENode(this, JJTLENODE);
2148                         boolean jjtc003 = true;
2149                         jjtree.openNodeScope(jjtn003);
2150         try {
2151           AdditiveExpression();
2152         } catch (Throwable jjte003) {
2153                         if (jjtc003) {
2154                           jjtree.clearNodeScope(jjtn003);
2155                           jjtc003 = false;
2156                         } else {
2157                           jjtree.popNode();
2158                         }
2159                         if (jjte003 instanceof RuntimeException) {
2160                           {if (true) throw (RuntimeException)jjte003;}
2161                         }
2162                         if (jjte003 instanceof ParseException) {
2163                           {if (true) throw (ParseException)jjte003;}
2164                         }
2165                         {if (true) throw (Error)jjte003;}
2166         } finally {
2167                         if (jjtc003) {
2168                           jjtree.closeNodeScope(jjtn003,  2);
2169                         }
2170         }
2171         break;
2172       case LOGICAL_GE:
2173         jj_consume_token(LOGICAL_GE);
2174                         ASTGENode jjtn004 = new ASTGENode(this, JJTGENODE);
2175                         boolean jjtc004 = true;
2176                         jjtree.openNodeScope(jjtn004);
2177         try {
2178           AdditiveExpression();
2179         } catch (Throwable jjte004) {
2180                         if (jjtc004) {
2181                           jjtree.clearNodeScope(jjtn004);
2182                           jjtc004 = false;
2183                         } else {
2184                           jjtree.popNode();
2185                         }
2186                         if (jjte004 instanceof RuntimeException) {
2187                           {if (true) throw (RuntimeException)jjte004;}
2188                         }
2189                         if (jjte004 instanceof ParseException) {
2190                           {if (true) throw (ParseException)jjte004;}
2191                         }
2192                         {if (true) throw (Error)jjte004;}
2193         } finally {
2194                         if (jjtc004) {
2195                           jjtree.closeNodeScope(jjtn004,  2);
2196                         }
2197         }
2198         break;
2199       default:
2200         jj_la1[51] = jj_gen;
2201         jj_consume_token(-1);
2202         throw new ParseException();
2203       }
2204     }
2205   }
2206 
2207   final public void AdditiveExpression() throws ParseException {
2208     MultiplicativeExpression();
2209     label_18:
2210     while (true) {
2211       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2212       case MINUS:
2213       case PLUS:
2214         ;
2215         break;
2216       default:
2217         jj_la1[52] = jj_gen;
2218         break label_18;
2219       }
2220       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2221       case PLUS:
2222         jj_consume_token(PLUS);
2223                   ASTAddNode jjtn001 = new ASTAddNode(this, JJTADDNODE);
2224                   boolean jjtc001 = true;
2225                   jjtree.openNodeScope(jjtn001);
2226         try {
2227           MultiplicativeExpression();
2228         } catch (Throwable jjte001) {
2229                   if (jjtc001) {
2230                     jjtree.clearNodeScope(jjtn001);
2231                     jjtc001 = false;
2232                   } else {
2233                     jjtree.popNode();
2234                   }
2235                   if (jjte001 instanceof RuntimeException) {
2236                     {if (true) throw (RuntimeException)jjte001;}
2237                   }
2238                   if (jjte001 instanceof ParseException) {
2239                     {if (true) throw (ParseException)jjte001;}
2240                   }
2241                   {if (true) throw (Error)jjte001;}
2242         } finally {
2243                   if (jjtc001) {
2244                     jjtree.closeNodeScope(jjtn001,  2);
2245                   }
2246         }
2247         break;
2248       case MINUS:
2249         jj_consume_token(MINUS);
2250                   ASTSubtractNode jjtn002 = new ASTSubtractNode(this, JJTSUBTRACTNODE);
2251                   boolean jjtc002 = true;
2252                   jjtree.openNodeScope(jjtn002);
2253         try {
2254           MultiplicativeExpression();
2255         } catch (Throwable jjte002) {
2256                   if (jjtc002) {
2257                     jjtree.clearNodeScope(jjtn002);
2258                     jjtc002 = false;
2259                   } else {
2260                     jjtree.popNode();
2261                   }
2262                   if (jjte002 instanceof RuntimeException) {
2263                     {if (true) throw (RuntimeException)jjte002;}
2264                   }
2265                   if (jjte002 instanceof ParseException) {
2266                     {if (true) throw (ParseException)jjte002;}
2267                   }
2268                   {if (true) throw (Error)jjte002;}
2269         } finally {
2270                   if (jjtc002) {
2271                     jjtree.closeNodeScope(jjtn002,  2);
2272                   }
2273         }
2274         break;
2275       default:
2276         jj_la1[53] = jj_gen;
2277         jj_consume_token(-1);
2278         throw new ParseException();
2279       }
2280     }
2281   }
2282 
2283   final public void MultiplicativeExpression() throws ParseException {
2284     UnaryExpression();
2285     label_19:
2286     while (true) {
2287       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2288       case MULTIPLY:
2289       case DIVIDE:
2290       case MODULUS:
2291         ;
2292         break;
2293       default:
2294         jj_la1[54] = jj_gen;
2295         break label_19;
2296       }
2297       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2298       case MULTIPLY:
2299         jj_consume_token(MULTIPLY);
2300                           ASTMulNode jjtn001 = new ASTMulNode(this, JJTMULNODE);
2301                           boolean jjtc001 = true;
2302                           jjtree.openNodeScope(jjtn001);
2303         try {
2304           UnaryExpression();
2305         } catch (Throwable jjte001) {
2306                           if (jjtc001) {
2307                             jjtree.clearNodeScope(jjtn001);
2308                             jjtc001 = false;
2309                           } else {
2310                             jjtree.popNode();
2311                           }
2312                           if (jjte001 instanceof RuntimeException) {
2313                             {if (true) throw (RuntimeException)jjte001;}
2314                           }
2315                           if (jjte001 instanceof ParseException) {
2316                             {if (true) throw (ParseException)jjte001;}
2317                           }
2318                           {if (true) throw (Error)jjte001;}
2319         } finally {
2320                           if (jjtc001) {
2321                             jjtree.closeNodeScope(jjtn001,  2);
2322                           }
2323         }
2324         break;
2325       case DIVIDE:
2326         jj_consume_token(DIVIDE);
2327                         ASTDivNode jjtn002 = new ASTDivNode(this, JJTDIVNODE);
2328                         boolean jjtc002 = true;
2329                         jjtree.openNodeScope(jjtn002);
2330         try {
2331           UnaryExpression();
2332         } catch (Throwable jjte002) {
2333                         if (jjtc002) {
2334                           jjtree.clearNodeScope(jjtn002);
2335                           jjtc002 = false;
2336                         } else {
2337                           jjtree.popNode();
2338                         }
2339                         if (jjte002 instanceof RuntimeException) {
2340                           {if (true) throw (RuntimeException)jjte002;}
2341                         }
2342                         if (jjte002 instanceof ParseException) {
2343                           {if (true) throw (ParseException)jjte002;}
2344                         }
2345                         {if (true) throw (Error)jjte002;}
2346         } finally {
2347                         if (jjtc002) {
2348                           jjtree.closeNodeScope(jjtn002,  2);
2349                         }
2350         }
2351         break;
2352       case MODULUS:
2353         jj_consume_token(MODULUS);
2354                          ASTModNode jjtn003 = new ASTModNode(this, JJTMODNODE);
2355                          boolean jjtc003 = true;
2356                          jjtree.openNodeScope(jjtn003);
2357         try {
2358           UnaryExpression();
2359         } catch (Throwable jjte003) {
2360                          if (jjtc003) {
2361                            jjtree.clearNodeScope(jjtn003);
2362                            jjtc003 = false;
2363                          } else {
2364                            jjtree.popNode();
2365                          }
2366                          if (jjte003 instanceof RuntimeException) {
2367                            {if (true) throw (RuntimeException)jjte003;}
2368                          }
2369                          if (jjte003 instanceof ParseException) {
2370                            {if (true) throw (ParseException)jjte003;}
2371                          }
2372                          {if (true) throw (Error)jjte003;}
2373         } finally {
2374                          if (jjtc003) {
2375                            jjtree.closeNodeScope(jjtn003,  2);
2376                          }
2377         }
2378         break;
2379       default:
2380         jj_la1[55] = jj_gen;
2381         jj_consume_token(-1);
2382         throw new ParseException();
2383       }
2384     }
2385   }
2386 
2387   final public void UnaryExpression() throws ParseException {
2388     if (jj_2_11(2)) {
2389       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2390       case WHITESPACE:
2391         jj_consume_token(WHITESPACE);
2392         break;
2393       default:
2394         jj_la1[56] = jj_gen;
2395         ;
2396       }
2397       jj_consume_token(LOGICAL_NOT);
2398                                                     ASTNotNode jjtn001 = new ASTNotNode(this, JJTNOTNODE);
2399                                                     boolean jjtc001 = true;
2400                                                     jjtree.openNodeScope(jjtn001);
2401       try {
2402         UnaryExpression();
2403       } catch (Throwable jjte001) {
2404                                                     if (jjtc001) {
2405                                                       jjtree.clearNodeScope(jjtn001);
2406                                                       jjtc001 = false;
2407                                                     } else {
2408                                                       jjtree.popNode();
2409                                                     }
2410                                                     if (jjte001 instanceof RuntimeException) {
2411                                                       {if (true) throw (RuntimeException)jjte001;}
2412                                                     }
2413                                                     if (jjte001 instanceof ParseException) {
2414                                                       {if (true) throw (ParseException)jjte001;}
2415                                                     }
2416                                                     {if (true) throw (Error)jjte001;}
2417       } finally {
2418                                                     if (jjtc001) {
2419                                                       jjtree.closeNodeScope(jjtn001,  1);
2420                                                     }
2421       }
2422     } else {
2423       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2424       case LBRACKET:
2425       case LEFT_CURLEY:
2426       case LPAREN:
2427       case WHITESPACE:
2428       case STRING_LITERAL:
2429       case TRUE:
2430       case FALSE:
2431       case INTEGER_LITERAL:
2432       case FLOATING_POINT_LITERAL:
2433       case IDENTIFIER:
2434       case LCURLY:
2435         PrimaryExpression();
2436         break;
2437       default:
2438         jj_la1[57] = jj_gen;
2439         jj_consume_token(-1);
2440         throw new ParseException();
2441       }
2442     }
2443   }
2444 
2445   final public void PrimaryExpression() throws ParseException {
2446     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2447     case WHITESPACE:
2448       jj_consume_token(WHITESPACE);
2449       break;
2450     default:
2451       jj_la1[58] = jj_gen;
2452       ;
2453     }
2454     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2455     case STRING_LITERAL:
2456       StringLiteral();
2457       break;
2458     case IDENTIFIER:
2459     case LCURLY:
2460       Reference();
2461       break;
2462     case INTEGER_LITERAL:
2463       IntegerLiteral();
2464       break;
2465     default:
2466       jj_la1[59] = jj_gen;
2467       if (jj_2_12(2147483647)) {
2468         IntegerRange();
2469       } else {
2470         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2471         case FLOATING_POINT_LITERAL:
2472           FloatingPointLiteral();
2473           break;
2474         case LEFT_CURLEY:
2475           Map();
2476           break;
2477         case LBRACKET:
2478           ObjectArray();
2479           break;
2480         case TRUE:
2481           True();
2482           break;
2483         case FALSE:
2484           False();
2485           break;
2486         case LPAREN:
2487           jj_consume_token(LPAREN);
2488           Expression();
2489           jj_consume_token(RPAREN);
2490           break;
2491         default:
2492           jj_la1[60] = jj_gen;
2493           jj_consume_token(-1);
2494           throw new ParseException();
2495         }
2496       }
2497     }
2498     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2499     case WHITESPACE:
2500       jj_consume_token(WHITESPACE);
2501       break;
2502     default:
2503       jj_la1[61] = jj_gen;
2504       ;
2505     }
2506   }
2507 
2508   private boolean jj_2_1(int xla) {
2509     jj_la = xla; jj_lastpos = jj_scanpos = token;
2510     try { return !jj_3_1(); }
2511     catch(LookaheadSuccess ls) { return true; }
2512     finally { jj_save(0, xla); }
2513   }
2514 
2515   private boolean jj_2_2(int xla) {
2516     jj_la = xla; jj_lastpos = jj_scanpos = token;
2517     try { return !jj_3_2(); }
2518     catch(LookaheadSuccess ls) { return true; }
2519     finally { jj_save(1, xla); }
2520   }
2521 
2522   private boolean jj_2_3(int xla) {
2523     jj_la = xla; jj_lastpos = jj_scanpos = token;
2524     try { return !jj_3_3(); }
2525     catch(LookaheadSuccess ls) { return true; }
2526     finally { jj_save(2, xla); }
2527   }
2528 
2529   private boolean jj_2_4(int xla) {
2530     jj_la = xla; jj_lastpos = jj_scanpos = token;
2531     try { return !jj_3_4(); }
2532     catch(LookaheadSuccess ls) { return true; }
2533     finally { jj_save(3, xla); }
2534   }
2535 
2536   private boolean jj_2_5(int xla) {
2537     jj_la = xla; jj_lastpos = jj_scanpos = token;
2538     try { return !jj_3_5(); }
2539     catch(LookaheadSuccess ls) { return true; }
2540     finally { jj_save(4, xla); }
2541   }
2542 
2543   private boolean jj_2_6(int xla) {
2544     jj_la = xla; jj_lastpos = jj_scanpos = token;
2545     try { return !jj_3_6(); }
2546     catch(LookaheadSuccess ls) { return true; }
2547     finally { jj_save(5, xla); }
2548   }
2549 
2550   private boolean jj_2_7(int xla) {
2551     jj_la = xla; jj_lastpos = jj_scanpos = token;
2552     try { return !jj_3_7(); }
2553     catch(LookaheadSuccess ls) { return true; }
2554     finally { jj_save(6, xla); }
2555   }
2556 
2557   private boolean jj_2_8(int xla) {
2558     jj_la = xla; jj_lastpos = jj_scanpos = token;
2559     try { return !jj_3_8(); }
2560     catch(LookaheadSuccess ls) { return true; }
2561     finally { jj_save(7, xla); }
2562   }
2563 
2564   private boolean jj_2_9(int xla) {
2565     jj_la = xla; jj_lastpos = jj_scanpos = token;
2566     try { return !jj_3_9(); }
2567     catch(LookaheadSuccess ls) { return true; }
2568     finally { jj_save(8, xla); }
2569   }
2570 
2571   private boolean jj_2_10(int xla) {
2572     jj_la = xla; jj_lastpos = jj_scanpos = token;
2573     try { return !jj_3_10(); }
2574     catch(LookaheadSuccess ls) { return true; }
2575     finally { jj_save(9, xla); }
2576   }
2577 
2578   private boolean jj_2_11(int xla) {
2579     jj_la = xla; jj_lastpos = jj_scanpos = token;
2580     try { return !jj_3_11(); }
2581     catch(LookaheadSuccess ls) { return true; }
2582     finally { jj_save(10, xla); }
2583   }
2584 
2585   private boolean jj_2_12(int xla) {
2586     jj_la = xla; jj_lastpos = jj_scanpos = token;
2587     try { return !jj_3_12(); }
2588     catch(LookaheadSuccess ls) { return true; }
2589     finally { jj_save(11, xla); }
2590   }
2591 
2592   private boolean jj_3R_45() {
2593     if (jj_3R_65()) return true;
2594     return false;
2595   }
2596 
2597   private boolean jj_3_3() {
2598     if (jj_scan_token(LBRACKET)) return true;
2599     Token xsp;
2600     xsp = jj_scanpos;
2601     if (jj_scan_token(26)) jj_scanpos = xsp;
2602     xsp = jj_scanpos;
2603     if (jj_3R_21()) {
2604     jj_scanpos = xsp;
2605     if (jj_3R_22()) return true;
2606     }
2607     xsp = jj_scanpos;
2608     if (jj_scan_token(26)) jj_scanpos = xsp;
2609     if (jj_scan_token(DOUBLEDOT)) return true;
2610     return false;
2611   }
2612 
2613   private boolean jj_3R_44() {
2614     if (jj_3R_64()) return true;
2615     return false;
2616   }
2617 
2618   private boolean jj_3R_43() {
2619     if (jj_3R_63()) return true;
2620     return false;
2621   }
2622 
2623   private boolean jj_3R_42() {
2624     if (jj_3R_62()) return true;
2625     return false;
2626   }
2627 
2628   private boolean jj_3R_41() {
2629     if (jj_3R_61()) return true;
2630     return false;
2631   }
2632 
2633   private boolean jj_3R_40() {
2634     if (jj_3R_36()) return true;
2635     return false;
2636   }
2637 
2638   private boolean jj_3R_39() {
2639     if (jj_3R_60()) return true;
2640     return false;
2641   }
2642 
2643   private boolean jj_3R_38() {
2644     if (jj_3R_59()) return true;
2645     return false;
2646   }
2647 
2648   private boolean jj_3R_23() {
2649     if (jj_scan_token(COMMA)) return true;
2650     Token xsp;
2651     xsp = jj_scanpos;
2652     if (jj_scan_token(26)) jj_scanpos = xsp;
2653     return false;
2654   }
2655 
2656   private boolean jj_3R_37() {
2657     if (jj_3R_20()) return true;
2658     return false;
2659   }
2660 
2661   private boolean jj_3R_24() {
2662     Token xsp;
2663     xsp = jj_scanpos;
2664     if (jj_3R_37()) {
2665     jj_scanpos = xsp;
2666     if (jj_3R_38()) {
2667     jj_scanpos = xsp;
2668     if (jj_3R_39()) {
2669     jj_scanpos = xsp;
2670     if (jj_3R_40()) {
2671     jj_scanpos = xsp;
2672     if (jj_3R_41()) {
2673     jj_scanpos = xsp;
2674     if (jj_3R_42()) {
2675     jj_scanpos = xsp;
2676     if (jj_3R_43()) {
2677     jj_scanpos = xsp;
2678     if (jj_3R_44()) {
2679     jj_scanpos = xsp;
2680     if (jj_3R_45()) {
2681     jj_scanpos = xsp;
2682     if (jj_3R_46()) return true;
2683     }
2684     }
2685     }
2686     }
2687     }
2688     }
2689     }
2690     }
2691     }
2692     return false;
2693   }
2694 
2695   private boolean jj_3R_59() {
2696     if (jj_scan_token(WORD)) return true;
2697     return false;
2698   }
2699 
2700   private boolean jj_3R_56() {
2701     if (jj_scan_token(IDENTIFIER)) return true;
2702     return false;
2703   }
2704 
2705   private boolean jj_3R_30() {
2706     if (jj_3R_56()) return true;
2707     return false;
2708   }
2709 
2710   private boolean jj_3_4() {
2711     Token xsp;
2712     xsp = jj_scanpos;
2713     if (jj_scan_token(26)) jj_scanpos = xsp;
2714     xsp = jj_scanpos;
2715     if (jj_3R_23()) jj_scanpos = xsp;
2716     if (jj_3R_24()) return true;
2717     return false;
2718   }
2719 
2720   private boolean jj_3R_60() {
2721     if (jj_scan_token(STRING_LITERAL)) return true;
2722     return false;
2723   }
2724 
2725   private boolean jj_3R_28() {
2726     if (jj_3R_56()) return true;
2727     return false;
2728   }
2729 
2730   private boolean jj_3R_33() {
2731     if (jj_3R_36()) return true;
2732     return false;
2733   }
2734 
2735   private boolean jj_3R_36() {
2736     if (jj_scan_token(INTEGER_LITERAL)) return true;
2737     return false;
2738   }
2739 
2740   private boolean jj_3R_62() {
2741     if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
2742     return false;
2743   }
2744 
2745   private boolean jj_3R_32() {
2746     if (jj_3R_20()) return true;
2747     return false;
2748   }
2749 
2750   private boolean jj_3R_27() {
2751     if (jj_3R_36()) return true;
2752     return false;
2753   }
2754 
2755   private boolean jj_3_10() {
2756     if (jj_3R_29()) return true;
2757     return false;
2758   }
2759 
2760   private boolean jj_3R_82() {
2761     if (jj_scan_token(COMMA)) return true;
2762     if (jj_3R_25()) return true;
2763     return false;
2764   }
2765 
2766   private boolean jj_3_8() {
2767     if (jj_3R_29()) return true;
2768     return false;
2769   }
2770 
2771   private boolean jj_3R_26() {
2772     if (jj_3R_20()) return true;
2773     return false;
2774   }
2775 
2776   private boolean jj_3R_66() {
2777     if (jj_scan_token(FALSE)) return true;
2778     return false;
2779   }
2780 
2781   private boolean jj_3R_65() {
2782     if (jj_scan_token(TRUE)) return true;
2783     return false;
2784   }
2785 
2786   private boolean jj_3_9() {
2787     if (jj_scan_token(DOT)) return true;
2788     Token xsp;
2789     xsp = jj_scanpos;
2790     if (jj_3_10()) {
2791     jj_scanpos = xsp;
2792     if (jj_3R_30()) return true;
2793     }
2794     return false;
2795   }
2796 
2797   private boolean jj_3R_57() {
2798     if (jj_3R_25()) return true;
2799     Token xsp;
2800     while (true) {
2801       xsp = jj_scanpos;
2802       if (jj_3R_82()) { jj_scanpos = xsp; break; }
2803     }
2804     return false;
2805   }
2806 
2807   private boolean jj_3_7() {
2808     if (jj_scan_token(DOT)) return true;
2809     Token xsp;
2810     xsp = jj_scanpos;
2811     if (jj_3_8()) {
2812     jj_scanpos = xsp;
2813     if (jj_3R_28()) return true;
2814     }
2815     return false;
2816   }
2817 
2818   private boolean jj_3R_35() {
2819     if (jj_scan_token(LCURLY)) return true;
2820     if (jj_scan_token(IDENTIFIER)) return true;
2821     Token xsp;
2822     while (true) {
2823       xsp = jj_scanpos;
2824       if (jj_3_9()) { jj_scanpos = xsp; break; }
2825     }
2826     if (jj_scan_token(RCURLY)) return true;
2827     return false;
2828   }
2829 
2830   private boolean jj_3_12() {
2831     if (jj_scan_token(LBRACKET)) return true;
2832     Token xsp;
2833     xsp = jj_scanpos;
2834     if (jj_scan_token(26)) jj_scanpos = xsp;
2835     xsp = jj_scanpos;
2836     if (jj_3R_32()) {
2837     jj_scanpos = xsp;
2838     if (jj_3R_33()) return true;
2839     }
2840     xsp = jj_scanpos;
2841     if (jj_scan_token(26)) jj_scanpos = xsp;
2842     if (jj_scan_token(DOUBLEDOT)) return true;
2843     return false;
2844   }
2845 
2846   private boolean jj_3R_34() {
2847     if (jj_scan_token(IDENTIFIER)) return true;
2848     Token xsp;
2849     while (true) {
2850       xsp = jj_scanpos;
2851       if (jj_3_7()) { jj_scanpos = xsp; break; }
2852     }
2853     return false;
2854   }
2855 
2856   private boolean jj_3R_81() {
2857     if (jj_scan_token(LPAREN)) return true;
2858     return false;
2859   }
2860 
2861   private boolean jj_3R_80() {
2862     if (jj_3R_66()) return true;
2863     return false;
2864   }
2865 
2866   private boolean jj_3R_79() {
2867     if (jj_3R_65()) return true;
2868     return false;
2869   }
2870 
2871   private boolean jj_3_2() {
2872     if (jj_scan_token(DOUBLE_ESCAPE)) return true;
2873     return false;
2874   }
2875 
2876   private boolean jj_3R_20() {
2877     Token xsp;
2878     xsp = jj_scanpos;
2879     if (jj_3R_34()) {
2880     jj_scanpos = xsp;
2881     if (jj_3R_35()) return true;
2882     }
2883     return false;
2884   }
2885 
2886   private boolean jj_3R_78() {
2887     if (jj_3R_64()) return true;
2888     return false;
2889   }
2890 
2891   private boolean jj_3R_77() {
2892     if (jj_3R_63()) return true;
2893     return false;
2894   }
2895 
2896   private boolean jj_3R_76() {
2897     if (jj_3R_62()) return true;
2898     return false;
2899   }
2900 
2901   private boolean jj_3R_75() {
2902     if (jj_3R_61()) return true;
2903     return false;
2904   }
2905 
2906   private boolean jj_3R_74() {
2907     if (jj_3R_36()) return true;
2908     return false;
2909   }
2910 
2911   private boolean jj_3R_73() {
2912     if (jj_3R_20()) return true;
2913     return false;
2914   }
2915 
2916   private boolean jj_3_6() {
2917     if (jj_scan_token(LBRACKET)) return true;
2918     Token xsp;
2919     xsp = jj_scanpos;
2920     if (jj_scan_token(26)) jj_scanpos = xsp;
2921     xsp = jj_scanpos;
2922     if (jj_3R_26()) {
2923     jj_scanpos = xsp;
2924     if (jj_3R_27()) return true;
2925     }
2926     xsp = jj_scanpos;
2927     if (jj_scan_token(26)) jj_scanpos = xsp;
2928     if (jj_scan_token(DOUBLEDOT)) return true;
2929     return false;
2930   }
2931 
2932   private boolean jj_3R_29() {
2933     if (jj_3R_56()) return true;
2934     if (jj_scan_token(LPAREN)) return true;
2935     Token xsp;
2936     xsp = jj_scanpos;
2937     if (jj_3R_57()) jj_scanpos = xsp;
2938     if (jj_scan_token(REFMOD2_RPAREN)) return true;
2939     return false;
2940   }
2941 
2942   private boolean jj_3R_72() {
2943     if (jj_3R_60()) return true;
2944     return false;
2945   }
2946 
2947   private boolean jj_3R_67() {
2948     Token xsp;
2949     xsp = jj_scanpos;
2950     if (jj_scan_token(26)) jj_scanpos = xsp;
2951     xsp = jj_scanpos;
2952     if (jj_3R_72()) {
2953     jj_scanpos = xsp;
2954     if (jj_3R_73()) {
2955     jj_scanpos = xsp;
2956     if (jj_3R_74()) {
2957     jj_scanpos = xsp;
2958     if (jj_3R_75()) {
2959     jj_scanpos = xsp;
2960     if (jj_3R_76()) {
2961     jj_scanpos = xsp;
2962     if (jj_3R_77()) {
2963     jj_scanpos = xsp;
2964     if (jj_3R_78()) {
2965     jj_scanpos = xsp;
2966     if (jj_3R_79()) {
2967     jj_scanpos = xsp;
2968     if (jj_3R_80()) {
2969     jj_scanpos = xsp;
2970     if (jj_3R_81()) return true;
2971     }
2972     }
2973     }
2974     }
2975     }
2976     }
2977     }
2978     }
2979     }
2980     return false;
2981   }
2982 
2983   private boolean jj_3R_55() {
2984     if (jj_3R_62()) return true;
2985     return false;
2986   }
2987 
2988   private boolean jj_3R_54() {
2989     if (jj_3R_20()) return true;
2990     return false;
2991   }
2992 
2993   private boolean jj_3R_53() {
2994     if (jj_3R_66()) return true;
2995     return false;
2996   }
2997 
2998   private boolean jj_3R_52() {
2999     if (jj_3R_65()) return true;
3000     return false;
3001   }
3002 
3003   private boolean jj_3R_31() {
3004     Token xsp;
3005     xsp = jj_scanpos;
3006     if (jj_3_11()) {
3007     jj_scanpos = xsp;
3008     if (jj_3R_58()) return true;
3009     }
3010     return false;
3011   }
3012 
3013   private boolean jj_3_11() {
3014     Token xsp;
3015     xsp = jj_scanpos;
3016     if (jj_scan_token(26)) jj_scanpos = xsp;
3017     if (jj_scan_token(LOGICAL_NOT)) return true;
3018     if (jj_3R_31()) return true;
3019     return false;
3020   }
3021 
3022   private boolean jj_3R_58() {
3023     if (jj_3R_67()) return true;
3024     return false;
3025   }
3026 
3027   private boolean jj_3R_51() {
3028     if (jj_3R_64()) return true;
3029     return false;
3030   }
3031 
3032   private boolean jj_3R_85() {
3033     if (jj_scan_token(COMMA)) return true;
3034     if (jj_3R_25()) return true;
3035     if (jj_scan_token(COLON)) return true;
3036     if (jj_3R_25()) return true;
3037     return false;
3038   }
3039 
3040   private boolean jj_3R_50() {
3041     if (jj_3R_63()) return true;
3042     return false;
3043   }
3044 
3045   private boolean jj_3R_49() {
3046     if (jj_3R_61()) return true;
3047     return false;
3048   }
3049 
3050   private boolean jj_3R_48() {
3051     if (jj_3R_36()) return true;
3052     return false;
3053   }
3054 
3055   private boolean jj_3R_47() {
3056     if (jj_3R_60()) return true;
3057     return false;
3058   }
3059 
3060   private boolean jj_3R_84() {
3061     if (jj_3R_36()) return true;
3062     return false;
3063   }
3064 
3065   private boolean jj_3R_69() {
3066     if (jj_3R_36()) return true;
3067     return false;
3068   }
3069 
3070   private boolean jj_3R_86() {
3071     if (jj_scan_token(COMMA)) return true;
3072     if (jj_3R_25()) return true;
3073     return false;
3074   }
3075 
3076   private boolean jj_3R_25() {
3077     Token xsp;
3078     xsp = jj_scanpos;
3079     if (jj_scan_token(26)) jj_scanpos = xsp;
3080     xsp = jj_scanpos;
3081     if (jj_3R_47()) {
3082     jj_scanpos = xsp;
3083     if (jj_3R_48()) {
3084     jj_scanpos = xsp;
3085     if (jj_3R_49()) {
3086     jj_scanpos = xsp;
3087     if (jj_3R_50()) {
3088     jj_scanpos = xsp;
3089     if (jj_3R_51()) {
3090     jj_scanpos = xsp;
3091     if (jj_3R_52()) {
3092     jj_scanpos = xsp;
3093     if (jj_3R_53()) {
3094     jj_scanpos = xsp;
3095     if (jj_3R_54()) {
3096     jj_scanpos = xsp;
3097     if (jj_3R_55()) return true;
3098     }
3099     }
3100     }
3101     }
3102     }
3103     }
3104     }
3105     }
3106     xsp = jj_scanpos;
3107     if (jj_scan_token(26)) jj_scanpos = xsp;
3108     return false;
3109   }
3110 
3111   private boolean jj_3R_22() {
3112     if (jj_3R_36()) return true;
3113     return false;
3114   }
3115 
3116   private boolean jj_3R_83() {
3117     if (jj_3R_20()) return true;
3118     return false;
3119   }
3120 
3121   private boolean jj_3R_68() {
3122     if (jj_3R_20()) return true;
3123     return false;
3124   }
3125 
3126   private boolean jj_3R_71() {
3127     if (jj_3R_25()) return true;
3128     Token xsp;
3129     while (true) {
3130       xsp = jj_scanpos;
3131       if (jj_3R_86()) { jj_scanpos = xsp; break; }
3132     }
3133     return false;
3134   }
3135 
3136   private boolean jj_3R_61() {
3137     if (jj_scan_token(LBRACKET)) return true;
3138     Token xsp;
3139     xsp = jj_scanpos;
3140     if (jj_scan_token(26)) jj_scanpos = xsp;
3141     xsp = jj_scanpos;
3142     if (jj_3R_68()) {
3143     jj_scanpos = xsp;
3144     if (jj_3R_69()) return true;
3145     }
3146     xsp = jj_scanpos;
3147     if (jj_scan_token(26)) jj_scanpos = xsp;
3148     if (jj_scan_token(DOUBLEDOT)) return true;
3149     xsp = jj_scanpos;
3150     if (jj_scan_token(26)) jj_scanpos = xsp;
3151     xsp = jj_scanpos;
3152     if (jj_3R_83()) {
3153     jj_scanpos = xsp;
3154     if (jj_3R_84()) return true;
3155     }
3156     xsp = jj_scanpos;
3157     if (jj_scan_token(26)) jj_scanpos = xsp;
3158     if (jj_scan_token(RBRACKET)) return true;
3159     return false;
3160   }
3161 
3162   private boolean jj_3_1() {
3163     if (jj_3R_20()) return true;
3164     return false;
3165   }
3166 
3167   private boolean jj_3R_21() {
3168     if (jj_3R_20()) return true;
3169     return false;
3170   }
3171 
3172   private boolean jj_3R_64() {
3173     if (jj_scan_token(LBRACKET)) return true;
3174     Token xsp;
3175     xsp = jj_scanpos;
3176     if (jj_3R_71()) jj_scanpos = xsp;
3177     if (jj_scan_token(RBRACKET)) return true;
3178     return false;
3179   }
3180 
3181   private boolean jj_3R_70() {
3182     Token xsp;
3183     xsp = jj_scanpos;
3184     if (jj_scan_token(26)) jj_scanpos = xsp;
3185     return false;
3186   }
3187 
3188   private boolean jj_3_5() {
3189     if (jj_3R_25()) return true;
3190     if (jj_scan_token(COLON)) return true;
3191     if (jj_3R_25()) return true;
3192     Token xsp;
3193     while (true) {
3194       xsp = jj_scanpos;
3195       if (jj_3R_85()) { jj_scanpos = xsp; break; }
3196     }
3197     return false;
3198   }
3199 
3200   private boolean jj_3R_46() {
3201     if (jj_3R_66()) return true;
3202     return false;
3203   }
3204 
3205   private boolean jj_3R_63() {
3206     if (jj_scan_token(LEFT_CURLEY)) return true;
3207     Token xsp;
3208     xsp = jj_scanpos;
3209     if (jj_3_5()) {
3210     jj_scanpos = xsp;
3211     if (jj_3R_70()) return true;
3212     }
3213     xsp = jj_scanpos;
3214     if (jj_scan_token(7)) {
3215     jj_scanpos = xsp;
3216     if (jj_scan_token(65)) return true;
3217     }
3218     return false;
3219   }
3220 
3221   /** Generated Token Manager. */
3222   public ParserTokenManager token_source;
3223   /** Current token. */
3224   public Token token;
3225   /** Next token. */
3226   public Token jj_nt;
3227   private int jj_ntk;
3228   private Token jj_scanpos, jj_lastpos;
3229   private int jj_la;
3230   private int jj_gen;
3231   final private int[] jj_la1 = new int[62];
3232   static private int[] jj_la1_0;
3233   static private int[] jj_la1_1;
3234   static private int[] jj_la1_2;
3235   static {
3236       jj_la1_init_0();
3237       jj_la1_init_1();
3238       jj_la1_init_2();
3239    }
3240    private static void jj_la1_init_0() {
3241       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,};
3242    }
3243    private static void jj_la1_init_1() {
3244       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,};
3245    }
3246    private static void jj_la1_init_2() {
3247       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,};
3248    }
3249   final private JJCalls[] jj_2_rtns = new JJCalls[12];
3250   private boolean jj_rescan = false;
3251   private int jj_gc = 0;
3252 
3253   /** Constructor with user supplied CharStream. */
3254   public Parser(CharStream stream) {
3255     token_source = new ParserTokenManager(stream);
3256     token = new Token();
3257     jj_ntk = -1;
3258     jj_gen = 0;
3259     for (int i = 0; i < 62; i++) jj_la1[i] = -1;
3260     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
3261   }
3262 
3263   /** Reinitialise. */
3264   public void ReInit(CharStream stream) {
3265     token_source.ReInit(stream);
3266     token = new Token();
3267     jj_ntk = -1;
3268     jjtree.reset();
3269     jj_gen = 0;
3270     for (int i = 0; i < 62; i++) jj_la1[i] = -1;
3271     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
3272   }
3273 
3274   /** Constructor with generated Token Manager. */
3275   public Parser(ParserTokenManager tm) {
3276     token_source = tm;
3277     token = new Token();
3278     jj_ntk = -1;
3279     jj_gen = 0;
3280     for (int i = 0; i < 62; i++) jj_la1[i] = -1;
3281     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
3282   }
3283 
3284   /** Reinitialise. */
3285   public void ReInit(ParserTokenManager tm) {
3286     token_source = tm;
3287     token = new Token();
3288     jj_ntk = -1;
3289     jjtree.reset();
3290     jj_gen = 0;
3291     for (int i = 0; i < 62; i++) jj_la1[i] = -1;
3292     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
3293   }
3294 
3295   private Token jj_consume_token(int kind) throws ParseException {
3296     Token oldToken;
3297     if ((oldToken = token).next != null) token = token.next;
3298     else token = token.next = token_source.getNextToken();
3299     jj_ntk = -1;
3300     if (token.kind == kind) {
3301       jj_gen++;
3302       if (++jj_gc > 100) {
3303         jj_gc = 0;
3304         for (int i = 0; i < jj_2_rtns.length; i++) {
3305           JJCalls c = jj_2_rtns[i];
3306           while (c != null) {
3307             if (c.gen < jj_gen) c.first = null;
3308             c = c.next;
3309           }
3310         }
3311       }
3312       return token;
3313     }
3314     token = oldToken;
3315     jj_kind = kind;
3316     throw generateParseException();
3317   }
3318 
3319   static private final class LookaheadSuccess extends java.lang.Error { }
3320   final private LookaheadSuccess jj_ls = new LookaheadSuccess();
3321   private boolean jj_scan_token(int kind) {
3322     if (jj_scanpos == jj_lastpos) {
3323       jj_la--;
3324       if (jj_scanpos.next == null) {
3325         jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
3326       } else {
3327         jj_lastpos = jj_scanpos = jj_scanpos.next;
3328       }
3329     } else {
3330       jj_scanpos = jj_scanpos.next;
3331     }
3332     if (jj_rescan) {
3333       int i = 0; Token tok = token;
3334       while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
3335       if (tok != null) jj_add_error_token(kind, i);
3336     }
3337     if (jj_scanpos.kind != kind) return true;
3338     if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
3339     return false;
3340   }
3341 
3342 
3343 /** Get the next Token. */
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 /** Get the specific Token. */
3353   final public Token getToken(int index) {
3354     Token t = token;
3355     for (int i = 0; i < index; i++) {
3356       if (t.next != null) t = t.next;
3357       else t = t.next = token_source.getNextToken();
3358     }
3359     return t;
3360   }
3361 
3362   private int jj_ntk() {
3363     if ((jj_nt=token.next) == null)
3364       return (jj_ntk = (token.next=token_source.getNextToken()).kind);
3365     else
3366       return (jj_ntk = jj_nt.kind);
3367   }
3368 
3369   private java.util.List jj_expentries = new java.util.ArrayList();
3370   private int[] jj_expentry;
3371   private int jj_kind = -1;
3372   private int[] jj_lasttokens = new int[100];
3373   private int jj_endpos;
3374 
3375   private void jj_add_error_token(int kind, int pos) {
3376     if (pos >= 100) return;
3377     if (pos == jj_endpos + 1) {
3378       jj_lasttokens[jj_endpos++] = kind;
3379     } else if (jj_endpos != 0) {
3380       jj_expentry = new int[jj_endpos];
3381       for (int i = 0; i < jj_endpos; i++) {
3382         jj_expentry[i] = jj_lasttokens[i];
3383       }
3384       jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) {
3385         int[] oldentry = (int[])(it.next());
3386         if (oldentry.length == jj_expentry.length) {
3387           for (int i = 0; i < jj_expentry.length; i++) {
3388             if (oldentry[i] != jj_expentry[i]) {
3389               continue jj_entries_loop;
3390             }
3391           }
3392           jj_expentries.add(jj_expentry);
3393           break jj_entries_loop;
3394         }
3395       }
3396       if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
3397     }
3398   }
3399 
3400   /** Generate ParseException. */
3401   public ParseException generateParseException() {
3402     jj_expentries.clear();
3403     boolean[] la1tokens = new boolean[68];
3404     if (jj_kind >= 0) {
3405       la1tokens[jj_kind] = true;
3406       jj_kind = -1;
3407     }
3408     for (int i = 0; i < 62; i++) {
3409       if (jj_la1[i] == jj_gen) {
3410         for (int j = 0; j < 32; j++) {
3411           if ((jj_la1_0[i] & (1<<j)) != 0) {
3412             la1tokens[j] = true;
3413           }
3414           if ((jj_la1_1[i] & (1<<j)) != 0) {
3415             la1tokens[32+j] = true;
3416           }
3417           if ((jj_la1_2[i] & (1<<j)) != 0) {
3418             la1tokens[64+j] = true;
3419           }
3420         }
3421       }
3422     }
3423     for (int i = 0; i < 68; i++) {
3424       if (la1tokens[i]) {
3425         jj_expentry = new int[1];
3426         jj_expentry[0] = i;
3427         jj_expentries.add(jj_expentry);
3428       }
3429     }
3430     jj_endpos = 0;
3431     jj_rescan_token();
3432     jj_add_error_token(0, 0);
3433     int[][] exptokseq = new int[jj_expentries.size()][];
3434     for (int i = 0; i < jj_expentries.size(); i++) {
3435       exptokseq[i] = (int[])jj_expentries.get(i);
3436     }
3437     return new ParseException(token, exptokseq, tokenImage);
3438   }
3439 
3440   /** Enable tracing. */
3441   final public void enable_tracing() {
3442   }
3443 
3444   /** Disable tracing. */
3445   final public void disable_tracing() {
3446   }
3447 
3448   private void jj_rescan_token() {
3449     jj_rescan = true;
3450     for (int i = 0; i < 12; i++) {
3451     try {
3452       JJCalls p = jj_2_rtns[i];
3453       do {
3454         if (p.gen > jj_gen) {
3455           jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
3456           switch (i) {
3457             case 0: jj_3_1(); break;
3458             case 1: jj_3_2(); break;
3459             case 2: jj_3_3(); break;
3460             case 3: jj_3_4(); break;
3461             case 4: jj_3_5(); break;
3462             case 5: jj_3_6(); break;
3463             case 6: jj_3_7(); break;
3464             case 7: jj_3_8(); break;
3465             case 8: jj_3_9(); break;
3466             case 9: jj_3_10(); break;
3467             case 10: jj_3_11(); break;
3468             case 11: jj_3_12(); break;
3469           }
3470         }
3471         p = p.next;
3472       } while (p != null);
3473       } catch(LookaheadSuccess ls) { }
3474     }
3475     jj_rescan = false;
3476   }
3477 
3478   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 }