View Javadoc

    1   /* Generated By:JJTree&JavaCC: Do not edit this line. JspParser.java */
    2   /**
    3    * JSP Parser for PMD.
    4    * @author Pieter ? Application Engineers NV/SA ? http://www.ae.be
    5    */
    6
    7   package net.sourceforge.pmd.jsp.ast;
    8
    9   public class JspParser/*@bgen(jjtree)*/implements JspParserTreeConstants, JspParserConstants {/*@bgen(jjtree)*/
    10    protected JJTJspParserState jjtree = new JJTJspParserState();
    11          /**
    12  	 * Return the contents of a quote.
    13  	 * @param quote String - starting and ending with " or '
    14  	 * @return String a substring of quote: quote without the first and list
    15  	 * character.
    16  	 */
    17          private static String quoteContent(String quote) {
    18                  return quote.substring(1, quote.length()-1);
    19          }
    20
    21          /**
    22  	 * Return the contents of a EL expression or a Value Binding expression.
    23  	 * @param expression String - starting with ${ or #{ and ending with }
    24  	 * @return String a substring of expression: expression without the first two and list
    25  	 * characters.
    26  	 */
    27          private static String expressionContent(String expression) {
    28                  return expression.substring(2, expression.length()-1).trim();
    29          }
    30
    31  /** ******************************************************************** */
    32  /** *************************  JSP GRAMMAR  **************************** */
    33  /** ******************************************************************** */
    34
    35  /**
    36   * The root of the AST of a JSP.
    37   */
    38    final public ASTCompilationUnit CompilationUnit() throws ParseException {
    39   /*@bgen(jjtree) CompilationUnit */
    40    ASTCompilationUnit jjtn000 = new ASTCompilationUnit(this, JJTCOMPILATIONUNIT);
    41    boolean jjtc000 = true;
    42    jjtree.openNodeScope(jjtn000);
    43      try {
    44        Prolog();
    45        Content();
    46        jj_consume_token(0);
    47      jjtree.closeNodeScope(jjtn000, true);
    48      jjtc000 = false;
    49      {if (true) return jjtn000;}
    50      } catch (Throwable jjte000) {
    51      if (jjtc000) {
    52        jjtree.clearNodeScope(jjtn000);
    53        jjtc000 = false;
    54      } else {
    55        jjtree.popNode();
    56      }
    57      if (jjte000 instanceof RuntimeException) {
    58        {if (true) throw (RuntimeException)jjte000;}
    59      }
    60      if (jjte000 instanceof ParseException) {
    61        {if (true) throw (ParseException)jjte000;}
    62      }
    63      {if (true) throw (Error)jjte000;}
    64      } finally {
    65      if (jjtc000) {
    66        jjtree.closeNodeScope(jjtn000, true);
    67      }
    68      }
    69      throw new RuntimeException("Missing return statement in function");
    70    }
    71
    72  /**
    73   * The optional prolog of a JSP, including (xml) declarations and DTD.
    74   */
    75    final public void Prolog() throws ParseException {
    76      if (jj_2_1(2147483647)) {
    77        label_1:
    78        while (true) {
    79          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    80          case COMMENT_START:
    81          case JSP_COMMENT_START:
    82            ;
    83            break;
    84          default:
    85            jj_la1[0] = jj_gen;
    86            break label_1;
    87          }
    88          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    89          case COMMENT_START:
    90            CommentTag();
    91            break;
    92          case JSP_COMMENT_START:
    93            JspComment();
    94            break;
    95          default:
    96            jj_la1[1] = jj_gen;
    97            jj_consume_token(-1);
    98            throw new ParseException();
    99          }
    100       }
    101       Declaration();
    102     } else {
    103       ;
    104     }
    105     if (jj_2_2(2147483647)) {
    106       label_2:
    107       while (true) {
    108         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    109         case COMMENT_START:
    110         case JSP_COMMENT_START:
    111           ;
    112           break;
    113         default:
    114           jj_la1[2] = jj_gen;
    115           break label_2;
    116         }
    117         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    118         case COMMENT_START:
    119           CommentTag();
    120           break;
    121         case JSP_COMMENT_START:
    122           JspComment();
    123           break;
    124         default:
    125           jj_la1[3] = jj_gen;
    126           jj_consume_token(-1);
    127           throw new ParseException();
    128         }
    129       }
    130       DoctypeDeclaration();
    131     } else {
    132       ;
    133     }
    134   }
    135
    136 /**
    137  * Everything between a start-tag and the corresponding end-tag of an element.
    138  */
    139   final public void Content() throws ParseException {
    140  /*@bgen(jjtree) Content */
    141   ASTContent jjtn000 = new ASTContent(this, JJTCONTENT);
    142   boolean jjtc000 = true;
    143   jjtree.openNodeScope(jjtn000);
    144     try {
    145       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    146       case EL_EXPRESSION:
    147       case UNPARSED_TEXT:
    148         Text();
    149         break;
    150       case TAG_START:
    151       case COMMENT_START:
    152       case CDATA_START:
    153       case JSP_COMMENT_START:
    154       case JSP_DECLARATION_START:
    155       case JSP_EXPRESSION_START:
    156       case JSP_SCRIPTLET_START:
    157       case JSP_DIRECTIVE_START:
    158         ContentElementPossiblyWithText();
    159         break;
    160       default:
    161         jj_la1[4] = jj_gen;
    162         jj_consume_token(-1);
    163         throw new ParseException();
    164       }
    165       label_3:
    166       while (true) {
    167         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    168         case TAG_START:
    169         case COMMENT_START:
    170         case CDATA_START:
    171         case JSP_COMMENT_START:
    172         case JSP_DECLARATION_START:
    173         case JSP_EXPRESSION_START:
    174         case JSP_SCRIPTLET_START:
    175         case JSP_DIRECTIVE_START:
    176           ;
    177           break;
    178         default:
    179           jj_la1[5] = jj_gen;
    180           break label_3;
    181         }
    182         ContentElementPossiblyWithText();
    183       }
    184     } catch (Throwable jjte000) {
    185           if (jjtc000) {
    186             jjtree.clearNodeScope(jjtn000);
    187             jjtc000 = false;
    188           } else {
    189             jjtree.popNode();
    190           }
    191           if (jjte000 instanceof RuntimeException) {
    192             {if (true) throw (RuntimeException)jjte000;}
    193           }
    194           if (jjte000 instanceof ParseException) {
    195             {if (true) throw (ParseException)jjte000;}
    196           }
    197           {if (true) throw (Error)jjte000;}
    198     } finally {
    199           if (jjtc000) {
    200             jjtree.closeNodeScope(jjtn000, true);
    201           }
    202     }
    203   }
    204
    205 /**
    206  * A single (non-text) element that can occur between a start- and end-tag of an element.
    207  * Possibly followed by text.
    208  */
    209   final public void ContentElementPossiblyWithText() throws ParseException {
    210     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    211     case COMMENT_START:
    212       CommentTag();
    213       break;
    214     case TAG_START:
    215       Element();
    216       break;
    217     case CDATA_START:
    218       CData();
    219       break;
    220     case JSP_COMMENT_START:
    221       JspComment();
    222       break;
    223     case JSP_DECLARATION_START:
    224       JspDeclaration();
    225       break;
    226     case JSP_EXPRESSION_START:
    227       JspExpression();
    228       break;
    229     case JSP_SCRIPTLET_START:
    230       JspScriptlet();
    231       break;
    232     case JSP_DIRECTIVE_START:
    233       JspDirective();
    234       break;
    235     default:
    236       jj_la1[6] = jj_gen;
    237       jj_consume_token(-1);
    238       throw new ParseException();
    239     }
    240     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    241     case EL_EXPRESSION:
    242     case UNPARSED_TEXT:
    243       Text();
    244       break;
    245     default:
    246       jj_la1[7] = jj_gen;
    247       ;
    248     }
    249   }
    250
    251   final public void JspDirective() throws ParseException {
    252  /*@bgen(jjtree) JspDirective */
    253         ASTJspDirective jjtn000 = new ASTJspDirective(this, JJTJSPDIRECTIVE);
    254         boolean jjtc000 = true;
    255         jjtree.openNodeScope(jjtn000);Token t;
    256     try {
    257       jj_consume_token(JSP_DIRECTIVE_START);
    258       t = jj_consume_token(JSP_DIRECTIVE_NAME);
    259                                    jjtn000.setName(t.image);
    260       label_4:
    261       while (true) {
    262         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    263         case JSP_DIRECTIVE_ATTRIBUTE_NAME:
    264           ;
    265           break;
    266         default:
    267           jj_la1[8] = jj_gen;
    268           break label_4;
    269         }
    270         JspDirectiveAttribute();
    271       }
    272       jj_consume_token(JSP_DIRECTIVE_END);
    273     } catch (Throwable jjte000) {
    274           if (jjtc000) {
    275             jjtree.clearNodeScope(jjtn000);
    276             jjtc000 = false;
    277           } else {
    278             jjtree.popNode();
    279           }
    280           if (jjte000 instanceof RuntimeException) {
    281             {if (true) throw (RuntimeException)jjte000;}
    282           }
    283           if (jjte000 instanceof ParseException) {
    284             {if (true) throw (ParseException)jjte000;}
    285           }
    286           {if (true) throw (Error)jjte000;}
    287     } finally {
    288           if (jjtc000) {
    289             jjtree.closeNodeScope(jjtn000, true);
    290           }
    291     }
    292   }
    293
    294   final public void JspDirectiveAttribute() throws ParseException {
    295  /*@bgen(jjtree) JspDirectiveAttribute */
    296         ASTJspDirectiveAttribute jjtn000 = new ASTJspDirectiveAttribute(this, JJTJSPDIRECTIVEATTRIBUTE);
    297         boolean jjtc000 = true;
    298         jjtree.openNodeScope(jjtn000);Token t;
    299     try {
    300       t = jj_consume_token(JSP_DIRECTIVE_ATTRIBUTE_NAME);
    301                                              jjtn000.setName(t.image);
    302       jj_consume_token(JSP_DIRECTIVE_ATTRIBUTE_EQUALS);
    303       t = jj_consume_token(JSP_DIRECTIVE_ATTRIBUTE_VALUE);
    304                                               jjtree.closeNodeScope(jjtn000, true);
    305                                               jjtc000 = false;
    306                                               jjtn000.setValue(quoteContent(t.image));
    307     } finally {
    308           if (jjtc000) {
    309             jjtree.closeNodeScope(jjtn000, true);
    310           }
    311     }
    312   }
    313
    314   final public void JspScriptlet() throws ParseException {
    315  /*@bgen(jjtree) JspScriptlet */
    316         ASTJspScriptlet jjtn000 = new ASTJspScriptlet(this, JJTJSPSCRIPTLET);
    317         boolean jjtc000 = true;
    318         jjtree.openNodeScope(jjtn000);Token t;
    319     try {
    320       jj_consume_token(JSP_SCRIPTLET_START);
    321       t = jj_consume_token(JSP_SCRIPTLET);
    322                               jjtn000.setImage(t.image.trim());
    323       jj_consume_token(JSP_SCRIPTLET_END);
    324     } finally {
    325           if (jjtc000) {
    326             jjtree.closeNodeScope(jjtn000, true);
    327           }
    328     }
    329   }
    330
    331   final public void JspExpression() throws ParseException {
    332  /*@bgen(jjtree) JspExpression */
    333         ASTJspExpression jjtn000 = new ASTJspExpression(this, JJTJSPEXPRESSION);
    334         boolean jjtc000 = true;
    335         jjtree.openNodeScope(jjtn000);Token t;
    336     try {
    337       jj_consume_token(JSP_EXPRESSION_START);
    338       t = jj_consume_token(JSP_EXPRESSION);
    339                                jjtn000.setImage(t.image.trim());
    340       jj_consume_token(JSP_EXPRESSION_END);
    341     } finally {
    342           if (jjtc000) {
    343             jjtree.closeNodeScope(jjtn000, true);
    344           }
    345     }
    346   }
    347
    348   final public void JspDeclaration() throws ParseException {
    349  /*@bgen(jjtree) JspDeclaration */
    350         ASTJspDeclaration jjtn000 = new ASTJspDeclaration(this, JJTJSPDECLARATION);
    351         boolean jjtc000 = true;
    352         jjtree.openNodeScope(jjtn000);Token t;
    353     try {
    354       jj_consume_token(JSP_DECLARATION_START);
    355       t = jj_consume_token(JSP_DECLARATION);
    356                                 jjtn000.setImage(t.image.trim());
    357       jj_consume_token(JSP_DECLARATION_END);
    358     } finally {
    359           if (jjtc000) {
    360             jjtree.closeNodeScope(jjtn000, true);
    361           }
    362     }
    363   }
    364
    365   final public void JspComment() throws ParseException {
    366  /*@bgen(jjtree) JspComment */
    367         ASTJspComment jjtn000 = new ASTJspComment(this, JJTJSPCOMMENT);
    368         boolean jjtc000 = true;
    369         jjtree.openNodeScope(jjtn000);Token t;
    370     try {
    371       jj_consume_token(JSP_COMMENT_START);
    372       t = jj_consume_token(JSP_COMMENT_CONTENT);
    373                                     jjtn000.setImage(t.image.trim());
    374       jj_consume_token(JSP_COMMENT_END);
    375     } finally {
    376           if (jjtc000) {
    377             jjtree.closeNodeScope(jjtn000, true);
    378           }
    379     }
    380   }
    381
    382 /**
    383  * This production groups all characters between two tags, where
    384  * tag is an xml-tag "<...>" or a jsp-page-tag "<%...%>" or CDATA "<![CDATA[...]]>".
    385  * Text consists of unparsed text and/or Expression Language expressions.
    386  */
    387   final public void Text() throws ParseException {
    388  /*@bgen(jjtree) Text */
    389         ASTText jjtn000 = new ASTText(this, JJTTEXT);
    390         boolean jjtc000 = true;
    391         jjtree.openNodeScope(jjtn000);StringBuffer content = new StringBuffer();
    392         String tmp;
    393     try {
    394       label_5:
    395       while (true) {
    396         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    397         case UNPARSED_TEXT:
    398           tmp = UnparsedText();
    399                                        content.append(tmp);
    400           break;
    401         case EL_EXPRESSION:
    402           tmp = ElExpression();
    403                                        content.append(tmp);
    404           break;
    405         default:
    406           jj_la1[9] = jj_gen;
    407           jj_consume_token(-1);
    408           throw new ParseException();
    409         }
    410         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    411         case EL_EXPRESSION:
    412         case UNPARSED_TEXT:
    413           ;
    414           break;
    415         default:
    416           jj_la1[10] = jj_gen;
    417           break label_5;
    418         }
    419       }
    420           jjtree.closeNodeScope(jjtn000, true);
    421           jjtc000 = false;
    422           jjtn000.setImage(content.toString());
    423     } catch (Throwable jjte000) {
    424           if (jjtc000) {
    425             jjtree.clearNodeScope(jjtn000);
    426             jjtc000 = false;
    427           } else {
    428             jjtree.popNode();
    429           }
    430           if (jjte000 instanceof RuntimeException) {
    431             {if (true) throw (RuntimeException)jjte000;}
    432           }
    433           if (jjte000 instanceof ParseException) {
    434             {if (true) throw (ParseException)jjte000;}
    435           }
    436           {if (true) throw (Error)jjte000;}
    437     } finally {
    438           if (jjtc000) {
    439             jjtree.closeNodeScope(jjtn000, true);
    440           }
    441     }
    442   }
    443
    444   final public String UnparsedText() throws ParseException {
    445  /*@bgen(jjtree) UnparsedText */
    446   ASTUnparsedText jjtn000 = new ASTUnparsedText(this, JJTUNPARSEDTEXT);
    447   boolean jjtc000 = true;
    448   jjtree.openNodeScope(jjtn000);Token t;
    449     try {
    450       t = jj_consume_token(UNPARSED_TEXT);
    451           jjtree.closeNodeScope(jjtn000, true);
    452           jjtc000 = false;
    453                 jjtn000.setImage(t.image);
    454                 {if (true) return t.image;}
    455     } finally {
    456           if (jjtc000) {
    457             jjtree.closeNodeScope(jjtn000, true);
    458           }
    459     }
    460     throw new RuntimeException("Missing return statement in function");
    461   }
    462
    463 /**
    464  * Text that contains no single quotes, and that does not contain the start
    465  * of a EL expression or value binding.
    466  */
    467   final public String UnparsedTextNoSingleQuotes() throws ParseException {
    468  /*@bgen(jjtree) UnparsedText */
    469   ASTUnparsedText jjtn000 = new ASTUnparsedText(this, JJTUNPARSEDTEXT);
    470   boolean jjtc000 = true;
    471   jjtree.openNodeScope(jjtn000);Token t;
    472     try {
    473       t = jj_consume_token(UNPARSED_TEXT_NO_SINGLE_QUOTES);
    474           jjtree.closeNodeScope(jjtn000, true);
    475           jjtc000 = false;
    476                 jjtn000.setImage(t.image);
    477                 {if (true) return t.image;}
    478     } finally {
    479           if (jjtc000) {
    480             jjtree.closeNodeScope(jjtn000, true);
    481           }
    482     }
    483     throw new RuntimeException("Missing return statement in function");
    484   }
    485
    486 /**
    487  * Text that contains no double quotes, and that does not contain the start
    488  * of a EL expression or value binding.
    489  */
    490   final public String UnparsedTextNoDoubleQuotes() throws ParseException {
    491  /*@bgen(jjtree) UnparsedText */
    492   ASTUnparsedText jjtn000 = new ASTUnparsedText(this, JJTUNPARSEDTEXT);
    493   boolean jjtc000 = true;
    494   jjtree.openNodeScope(jjtn000);Token t;
    495     try {
    496       t = jj_consume_token(UNPARSED_TEXT_NO_DOUBLE_QUOTES);
    497           jjtree.closeNodeScope(jjtn000, true);
    498           jjtc000 = false;
    499                 jjtn000.setImage(t.image);
    500                 {if (true) return t.image;}
    501     } finally {
    502           if (jjtc000) {
    503             jjtree.closeNodeScope(jjtn000, true);
    504           }
    505     }
    506     throw new RuntimeException("Missing return statement in function");
    507   }
    508
    509 /**
    510  * An EL expression, not within an attribute value.
    511  */
    512   final public String ElExpression() throws ParseException {
    513  /*@bgen(jjtree) ElExpression */
    514         ASTElExpression jjtn000 = new ASTElExpression(this, JJTELEXPRESSION);
    515         boolean jjtc000 = true;
    516         jjtree.openNodeScope(jjtn000);Token t;
    517     try {
    518       t = jj_consume_token(EL_EXPRESSION);
    519           jjtree.closeNodeScope(jjtn000, true);
    520           jjtc000 = false;
    521                 jjtn000.setImage(expressionContent(t.image));
    522                 {if (true) return t.image;}
    523     } finally {
    524           if (jjtc000) {
    525             jjtree.closeNodeScope(jjtn000, true);
    526           }
    527     }
    528     throw new RuntimeException("Missing return statement in function");
    529   }
    530
    531   final public String ValueBindingInAttribute() throws ParseException {
    532  /*@bgen(jjtree) ValueBinding */
    533         ASTValueBinding jjtn000 = new ASTValueBinding(this, JJTVALUEBINDING);
    534         boolean jjtc000 = true;
    535         jjtree.openNodeScope(jjtn000);Token t;
    536     try {
    537       t = jj_consume_token(VALUE_BINDING_IN_ATTRIBUTE);
    538           jjtree.closeNodeScope(jjtn000, true);
    539           jjtc000 = false;
    540                 jjtn000.setImage(expressionContent(t.image));
    541                 {if (true) return t.image;}
    542     } finally {
    543           if (jjtc000) {
    544             jjtree.closeNodeScope(jjtn000, true);
    545           }
    546     }
    547     throw new RuntimeException("Missing return statement in function");
    548   }
    549
    550   final public String ElExpressionInAttribute() throws ParseException {
    551  /*@bgen(jjtree) ElExpression */
    552         ASTElExpression jjtn000 = new ASTElExpression(this, JJTELEXPRESSION);
    553         boolean jjtc000 = true;
    554         jjtree.openNodeScope(jjtn000);Token t;
    555     try {
    556       t = jj_consume_token(EL_EXPRESSION_IN_ATTRIBUTE);
    557           jjtree.closeNodeScope(jjtn000, true);
    558           jjtc000 = false;
    559                 jjtn000.setImage(expressionContent(t.image));
    560                 {if (true) return t.image;}
    561     } finally {
    562           if (jjtc000) {
    563             jjtree.closeNodeScope(jjtn000, true);
    564           }
    565     }
    566     throw new RuntimeException("Missing return statement in function");
    567   }
    568
    569   final public void CData() throws ParseException {
    570  /*@bgen(jjtree) CData */
    571         ASTCData jjtn000 = new ASTCData(this, JJTCDATA);
    572         boolean jjtc000 = true;
    573         jjtree.openNodeScope(jjtn000);StringBuffer content = new StringBuffer();
    574         Token t;
    575     try {
    576       jj_consume_token(CDATA_START);
    577       label_6:
    578       while (true) {
    579         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    580         case UNPARSED:
    581           ;
    582           break;
    583         default:
    584           jj_la1[11] = jj_gen;
    585           break label_6;
    586         }
    587         t = jj_consume_token(UNPARSED);
    588                                           content.append(t.image);
    589       }
    590       jj_consume_token(CDATA_END);
    591           jjtree.closeNodeScope(jjtn000, true);
    592           jjtc000 = false;
    593                 jjtn000.setImage(content.toString());
    594     } finally {
    595           if (jjtc000) {
    596             jjtree.closeNodeScope(jjtn000, true);
    597           }
    598     }
    599   }
    600
    601 /**
    602  * A XML element, either with a single empty tag, or with a starting and closing tag
    603  * with optional contained content.
    604  */
    605   final public void Element() throws ParseException {
    606  /*@bgen(jjtree) Element */
    607         ASTElement jjtn000 = new ASTElement(this, JJTELEMENT);
    608         boolean jjtc000 = true;
    609         jjtree.openNodeScope(jjtn000);Token startTagName;
    610         Token endTagName;
    611         String tagName;
    612     try {
    613       jj_consume_token(TAG_START);
    614       startTagName = jj_consume_token(TAG_NAME);
    615                                 tagName = startTagName.image; jjtn000.setName(tagName);
    616       label_7:
    617       while (true) {
    618         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    619         case ATTR_NAME:
    620           ;
    621           break;
    622         default:
    623           jj_la1[12] = jj_gen;
    624           break label_7;
    625         }
    626         Attribute();
    627       }
    628       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    629       case TAG_END:
    630         jj_consume_token(TAG_END);
    631                   jjtn000.setEmpty(false);
    632         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    633         case TAG_START:
    634         case COMMENT_START:
    635         case CDATA_START:
    636         case JSP_COMMENT_START:
    637         case JSP_DECLARATION_START:
    638         case JSP_EXPRESSION_START:
    639         case JSP_SCRIPTLET_START:
    640         case JSP_DIRECTIVE_START:
    641         case EL_EXPRESSION:
    642         case UNPARSED_TEXT:
    643           Content();
    644           break;
    645         default:
    646           jj_la1[13] = jj_gen;
    647           ;
    648         }
    649         jj_consume_token(ENDTAG_START);
    650         endTagName = jj_consume_token(TAG_NAME);
    651                         if (! tagName.equalsIgnoreCase(endTagName.image)) {
    652                                 {if (true) throw new StartAndEndTagMismatchException(
    653                                         startTagName.beginLine, startTagName.beginColumn,
    654                                         startTagName.image,
    655                                         endTagName.beginLine, endTagName.beginColumn,
    656                                         endTagName.image  );}
    657                         }
    658         jj_consume_token(TAG_END);
    659         break;
    660       case TAG_SLASHEND:
    661         jj_consume_token(TAG_SLASHEND);
    662                           jjtree.closeNodeScope(jjtn000, true);
    663                           jjtc000 = false;
    664                           jjtn000.setEmpty(true);
    665         break;
    666       default:
    667         jj_la1[14] = jj_gen;
    668         jj_consume_token(-1);
    669         throw new ParseException();
    670       }
    671     } catch (Throwable jjte000) {
    672       if (jjtc000) {
    673         jjtree.clearNodeScope(jjtn000);
    674         jjtc000 = false;
    675       } else {
    676         jjtree.popNode();
    677       }
    678       if (jjte000 instanceof RuntimeException) {
    679         {if (true) throw (RuntimeException)jjte000;}
    680       }
    681       if (jjte000 instanceof ParseException) {
    682         {if (true) throw (ParseException)jjte000;}
    683       }
    684       {if (true) throw (Error)jjte000;}
    685     } finally {
    686       if (jjtc000) {
    687         jjtree.closeNodeScope(jjtn000, true);
    688       }
    689     }
    690   }
    691
    692   final public void Attribute() throws ParseException {
    693  /*@bgen(jjtree) Attribute */
    694         ASTAttribute jjtn000 = new ASTAttribute(this, JJTATTRIBUTE);
    695         boolean jjtc000 = true;
    696         jjtree.openNodeScope(jjtn000);Token t;
    697     try {
    698       t = jj_consume_token(ATTR_NAME);
    699                     jjtn000.setName(t.image);
    700       jj_consume_token(ATTR_EQ);
    701       AttributeValue();
    702     } catch (Throwable jjte000) {
    703     if (jjtc000) {
    704       jjtree.clearNodeScope(jjtn000);
    705       jjtc000 = false;
    706     } else {
    707       jjtree.popNode();
    708     }
    709     if (jjte000 instanceof RuntimeException) {
    710       {if (true) throw (RuntimeException)jjte000;}
    711     }
    712     if (jjte000 instanceof ParseException) {
    713       {if (true) throw (ParseException)jjte000;}
    714     }
    715     {if (true) throw (Error)jjte000;}
    716     } finally {
    717     if (jjtc000) {
    718       jjtree.closeNodeScope(jjtn000, true);
    719     }
    720     }
    721   }
    722
    723 /**
    724  * The value of an attribute of an element.
    725  * EL expressions, JSF value bindings, and JSP expressions
    726  * are parsed as sub-nodes of the AttributeValue node.
    727  */
    728   final public void AttributeValue() throws ParseException {
    729  /*@bgen(jjtree) AttributeValue */
    730         ASTAttributeValue jjtn000 = new ASTAttributeValue(this, JJTATTRIBUTEVALUE);
    731         boolean jjtc000 = true;
    732         jjtree.openNodeScope(jjtn000);StringBuffer content = new StringBuffer();
    733         String tmp;
    734         Token t;
    735     try {
    736       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    737       case DOUBLE_QUOTE:
    738         jj_consume_token(DOUBLE_QUOTE);
    739         label_8:
    740         while (true) {
    741           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    742           case EL_EXPRESSION_IN_ATTRIBUTE:
    743           case VALUE_BINDING_IN_ATTRIBUTE:
    744           case JSP_EXPRESSION_IN_ATTRIBUTE:
    745           case UNPARSED_TEXT_NO_DOUBLE_QUOTES:
    746             ;
    747             break;
    748           default:
    749             jj_la1[15] = jj_gen;
    750             break label_8;
    751           }
    752           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    753           case UNPARSED_TEXT_NO_DOUBLE_QUOTES:
    754             tmp = UnparsedTextNoDoubleQuotes();
    755             break;
    756           case EL_EXPRESSION_IN_ATTRIBUTE:
    757           case VALUE_BINDING_IN_ATTRIBUTE:
    758           case JSP_EXPRESSION_IN_ATTRIBUTE:
    759             tmp = QuoteIndependentAttributeValueContent();
    760             break;
    761           default:
    762             jj_la1[16] = jj_gen;
    763             jj_consume_token(-1);
    764             throw new ParseException();
    765           }
    766                             content.append(tmp);
    767         }
    768         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    769         case ENDING_DOUBLE_QUOTE:
    770           jj_consume_token(ENDING_DOUBLE_QUOTE);
    771           break;
    772         case DOLLAR_OR_HASH_DOUBLE_QUOTE:
    773           t = jj_consume_token(DOLLAR_OR_HASH_DOUBLE_QUOTE);
    774                                                                     content.append(t.image.substring(0, 1));
    775           break;
    776         default:
    777           jj_la1[17] = jj_gen;
    778           jj_consume_token(-1);
    779           throw new ParseException();
    780         }
    781         break;
    782       case SINGLE_QUOTE:
    783         jj_consume_token(SINGLE_QUOTE);
    784         label_9:
    785         while (true) {
    786           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    787           case EL_EXPRESSION_IN_ATTRIBUTE:
    788           case VALUE_BINDING_IN_ATTRIBUTE:
    789           case JSP_EXPRESSION_IN_ATTRIBUTE:
    790           case UNPARSED_TEXT_NO_SINGLE_QUOTES:
    791             ;
    792             break;
    793           default:
    794             jj_la1[18] = jj_gen;
    795             break label_9;
    796           }
    797           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    798           case UNPARSED_TEXT_NO_SINGLE_QUOTES:
    799             tmp = UnparsedTextNoSingleQuotes();
    800             break;
    801           case EL_EXPRESSION_IN_ATTRIBUTE:
    802           case VALUE_BINDING_IN_ATTRIBUTE:
    803           case JSP_EXPRESSION_IN_ATTRIBUTE:
    804             tmp = QuoteIndependentAttributeValueContent();
    805             break;
    806           default:
    807             jj_la1[19] = jj_gen;
    808             jj_consume_token(-1);
    809             throw new ParseException();
    810           }
    811                             content.append(tmp);
    812         }
    813         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    814         case ENDING_SINGLE_QUOTE:
    815           jj_consume_token(ENDING_SINGLE_QUOTE);
    816           break;
    817         case DOLLAR_OR_HASH_SINGLE_QUOTE:
    818           t = jj_consume_token(DOLLAR_OR_HASH_SINGLE_QUOTE);
    819                                                                  content.append(t.image.substring(0, 1));
    820           break;
    821         default:
    822           jj_la1[20] = jj_gen;
    823           jj_consume_token(-1);
    824           throw new ParseException();
    825         }
    826         break;
    827       default:
    828         jj_la1[21] = jj_gen;
    829         jj_consume_token(-1);
    830         throw new ParseException();
    831       }
    832           jjtree.closeNodeScope(jjtn000, true);
    833           jjtc000 = false;
    834           jjtn000.setImage( content.toString() );
    835     } catch (Throwable jjte000) {
    836           if (jjtc000) {
    837             jjtree.clearNodeScope(jjtn000);
    838             jjtc000 = false;
    839           } else {
    840             jjtree.popNode();
    841           }
    842           if (jjte000 instanceof RuntimeException) {
    843             {if (true) throw (RuntimeException)jjte000;}
    844           }
    845           if (jjte000 instanceof ParseException) {
    846             {if (true) throw (ParseException)jjte000;}
    847           }
    848           {if (true) throw (Error)jjte000;}
    849     } finally {
    850           if (jjtc000) {
    851             jjtree.closeNodeScope(jjtn000, true);
    852           }
    853     }
    854   }
    855
    856 /**
    857  * Partial content of an attribute value that can contain all quotes.
    858  * This groups EL expressions, value bindings, and JSP expressions.
    859  */
    860   final public String QuoteIndependentAttributeValueContent() throws ParseException {
    861         String tmp;
    862     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    863     case EL_EXPRESSION_IN_ATTRIBUTE:
    864       tmp = ElExpressionInAttribute();
    865       break;
    866     case VALUE_BINDING_IN_ATTRIBUTE:
    867       tmp = ValueBindingInAttribute();
    868       break;
    869     case JSP_EXPRESSION_IN_ATTRIBUTE:
    870       tmp = JspExpressionInAttribute();
    871       break;
    872     default:
    873       jj_la1[22] = jj_gen;
    874       jj_consume_token(-1);
    875       throw new ParseException();
    876     }
    877           {if (true) return tmp;}
    878     throw new RuntimeException("Missing return statement in function");
    879   }
    880
    881   final public String JspExpressionInAttribute() throws ParseException {
    882  /*@bgen(jjtree) JspExpressionInAttribute */
    883         ASTJspExpressionInAttribute jjtn000 = new ASTJspExpressionInAttribute(this, JJTJSPEXPRESSIONINATTRIBUTE);
    884         boolean jjtc000 = true;
    885         jjtree.openNodeScope(jjtn000);Token t;
    886     try {
    887       t = jj_consume_token(JSP_EXPRESSION_IN_ATTRIBUTE);
    888           jjtree.closeNodeScope(jjtn000, true);
    889           jjtc000 = false;
    890                 jjtn000.setImage(t.image.substring(3, t.image.length()-2).trim()); // without <% and %>
    891                 {if (true) return t.image;}
    892     } finally {
    893           if (jjtc000) {
    894             jjtree.closeNodeScope(jjtn000, true);
    895           }
    896     }
    897     throw new RuntimeException("Missing return statement in function");
    898   }
    899
    900   final public void CommentTag() throws ParseException {
    901  /*@bgen(jjtree) CommentTag */
    902         ASTCommentTag jjtn000 = new ASTCommentTag(this, JJTCOMMENTTAG);
    903         boolean jjtc000 = true;
    904         jjtree.openNodeScope(jjtn000);StringBuffer content = new StringBuffer();
    905         Token t;
    906     try {
    907       jj_consume_token(COMMENT_START);
    908       label_10:
    909       while (true) {
    910         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    911         case COMMENT_TEXT:
    912           ;
    913           break;
    914         default:
    915           jj_la1[23] = jj_gen;
    916           break label_10;
    917         }
    918         t = jj_consume_token(COMMENT_TEXT);
    919                          content.append(t.image);
    920       }
    921       jj_consume_token(COMMENT_END);
    922           jjtree.closeNodeScope(jjtn000, true);
    923           jjtc000 = false;
    924                 jjtn000.setImage(content.toString().trim());
    925     } finally {
    926     if (jjtc000) {
    927       jjtree.closeNodeScope(jjtn000, true);
    928     }
    929     }
    930   }
    931
    932   final public void Declaration() throws ParseException {
    933  /*@bgen(jjtree) Declaration */
    934         ASTDeclaration jjtn000 = new ASTDeclaration(this, JJTDECLARATION);
    935         boolean jjtc000 = true;
    936         jjtree.openNodeScope(jjtn000);Token t;
    937     try {
    938       jj_consume_token(DECL_START);
    939       t = jj_consume_token(TAG_NAME);
    940                    jjtn000.setName(t.image);
    941       label_11:
    942       while (true) {
    943         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    944         case ATTR_NAME:
    945           ;
    946           break;
    947         default:
    948           jj_la1[24] = jj_gen;
    949           break label_11;
    950         }
    951         Attribute();
    952       }
    953       jj_consume_token(DECL_END);
    954     } catch (Throwable jjte000) {
    955     if (jjtc000) {
    956       jjtree.clearNodeScope(jjtn000);
    957       jjtc000 = false;
    958     } else {
    959       jjtree.popNode();
    960     }
    961     if (jjte000 instanceof RuntimeException) {
    962       {if (true) throw (RuntimeException)jjte000;}
    963     }
    964     if (jjte000 instanceof ParseException) {
    965       {if (true) throw (ParseException)jjte000;}
    966     }
    967     {if (true) throw (Error)jjte000;}
    968     } finally {
    969     if (jjtc000) {
    970       jjtree.closeNodeScope(jjtn000, true);
    971     }
    972     }
    973   }
    974
    975   final public void DoctypeDeclaration() throws ParseException {
    976  /*@bgen(jjtree) DoctypeDeclaration */
    977         ASTDoctypeDeclaration jjtn000 = new ASTDoctypeDeclaration(this, JJTDOCTYPEDECLARATION);
    978         boolean jjtc000 = true;
    979         jjtree.openNodeScope(jjtn000);Token t;
    980     try {
    981       jj_consume_token(DOCTYPE_DECL_START);
    982       jj_consume_token(WHITESPACES);
    983       t = jj_consume_token(NAME);
    984                       jjtn000.setName(t.image);
    985       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    986       case WHITESPACES:
    987         jj_consume_token(WHITESPACES);
    988         break;
    989       default:
    990         jj_la1[25] = jj_gen;
    991         ;
    992       }
    993       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    994       case PUBLIC:
    995       case SYSTEM:
    996         DoctypeExternalId();
    997         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    998         case WHITESPACES:
    999           jj_consume_token(WHITESPACES);
    1000           break;
    1001         default:
    1002           jj_la1[26] = jj_gen;
    1003           ;
    1004         }
    1005         break;
    1006       default:
    1007         jj_la1[27] = jj_gen;
    1008         ;
    1009       }
    1010       jj_consume_token(DOCTYPE_DECL_END);
    1011     } catch (Throwable jjte000) {
    1012           if (jjtc000) {
    1013             jjtree.clearNodeScope(jjtn000);
    1014             jjtc000 = false;
    1015           } else {
    1016             jjtree.popNode();
    1017           }
    1018           if (jjte000 instanceof RuntimeException) {
    1019             {if (true) throw (RuntimeException)jjte000;}
    1020           }
    1021           if (jjte000 instanceof ParseException) {
    1022             {if (true) throw (ParseException)jjte000;}
    1023           }
    1024           {if (true) throw (Error)jjte000;}
    1025     } finally {
    1026           if (jjtc000) {
    1027             jjtree.closeNodeScope(jjtn000, true);
    1028           }
    1029     }
    1030   }
    1031
    1032   final public void DoctypeExternalId() throws ParseException {
    1033  /*@bgen(jjtree) DoctypeExternalId */
    1034         ASTDoctypeExternalId jjtn000 = new ASTDoctypeExternalId(this, JJTDOCTYPEEXTERNALID);
    1035         boolean jjtc000 = true;
    1036         jjtree.openNodeScope(jjtn000);Token systemLiteral;
    1037         Token pubIdLiteral;
    1038     try {
    1039       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    1040       case SYSTEM:
    1041         jj_consume_token(SYSTEM);
    1042         jj_consume_token(WHITESPACES);
    1043         systemLiteral = jj_consume_token(QUOTED_LITERAL);
    1044                                   jjtree.closeNodeScope(jjtn000, true);
    1045                                   jjtc000 = false;
    1046                                   jjtn000.setUri(quoteContent(systemLiteral.image));
    1047         break;
    1048       case PUBLIC:
    1049         jj_consume_token(PUBLIC);
    1050         jj_consume_token(WHITESPACES);
    1051         pubIdLiteral = jj_consume_token(QUOTED_LITERAL);
    1052                                   jjtn000.setPublicId(quoteContent(pubIdLiteral.image));
    1053         jj_consume_token(WHITESPACES);
    1054         systemLiteral = jj_consume_token(QUOTED_LITERAL);
    1055                                   jjtree.closeNodeScope(jjtn000, true);
    1056                                   jjtc000 = false;
    1057                                   jjtn000.setUri(quoteContent(systemLiteral.image));
    1058         break;
    1059       default:
    1060         jj_la1[28] = jj_gen;
    1061         jj_consume_token(-1);
    1062         throw new ParseException();
    1063       }
    1064     } finally {
    1065                   if (jjtc000) {
    1066                     jjtree.closeNodeScope(jjtn000, true);
    1067                   }
    1068     }
    1069   }
    1070
    1071   private boolean jj_2_1(int xla) {
    1072     jj_la = xla; jj_lastpos = jj_scanpos = token;
    1073     try { return !jj_3_1(); }
    1074     catch(LookaheadSuccess ls) { return true; }
    1075     finally { jj_save(0, xla); }
    1076   }
    1077
    1078   private boolean jj_2_2(int xla) {
    1079     jj_la = xla; jj_lastpos = jj_scanpos = token;
    1080     try { return !jj_3_2(); }
    1081     catch(LookaheadSuccess ls) { return true; }
    1082     finally { jj_save(1, xla); }
    1083   }
    1084
    1085   private boolean jj_3R_30() {
    1086     if (jj_scan_token(DOUBLE_QUOTE)) return true;
    1087     Token xsp;
    1088     while (true) {
    1089       xsp = jj_scanpos;
    1090       if (jj_3R_32()) { jj_scanpos = xsp; break; }
    1091     }
    1092     xsp = jj_scanpos;
    1093     if (jj_scan_token(72)) {
    1094     jj_scanpos = xsp;
    1095     if (jj_3R_33()) return true;
    1096     }
    1097     return false;
    1098   }
    1099
    1100   private boolean jj_3R_29() {
    1101     if (jj_scan_token(PUBLIC)) return true;
    1102     if (jj_scan_token(WHITESPACES)) return true;
    1103     if (jj_scan_token(QUOTED_LITERAL)) return true;
    1104     if (jj_scan_token(WHITESPACES)) return true;
    1105     if (jj_scan_token(QUOTED_LITERAL)) return true;
    1106     return false;
    1107   }
    1108
    1109   private boolean jj_3R_47() {
    1110     if (jj_scan_token(VALUE_BINDING_IN_ATTRIBUTE)) return true;
    1111     return false;
    1112   }
    1113
    1114   private boolean jj_3R_27() {
    1115     Token xsp;
    1116     xsp = jj_scanpos;
    1117     if (jj_3R_30()) {
    1118     jj_scanpos = xsp;
    1119     if (jj_3R_31()) return true;
    1120     }
    1121     return false;
    1122   }
    1123
    1124   private boolean jj_3R_25() {
    1125     Token xsp;
    1126     xsp = jj_scanpos;
    1127     if (jj_3R_28()) {
    1128     jj_scanpos = xsp;
    1129     if (jj_3R_29()) return true;
    1130     }
    1131     return false;
    1132   }
    1133
    1134   private boolean jj_3R_28() {
    1135     if (jj_scan_token(SYSTEM)) return true;
    1136     if (jj_scan_token(WHITESPACES)) return true;
    1137     if (jj_scan_token(QUOTED_LITERAL)) return true;
    1138     return false;
    1139   }
    1140
    1141   private boolean jj_3R_21() {
    1142     if (jj_3R_25()) return true;
    1143     Token xsp;
    1144     xsp = jj_scanpos;
    1145     if (jj_scan_token(48)) jj_scanpos = xsp;
    1146     return false;
    1147   }
    1148
    1149   private boolean jj_3R_40() {
    1150     if (jj_scan_token(UNPARSED_TEXT_NO_DOUBLE_QUOTES)) return true;
    1151     return false;
    1152   }
    1153
    1154   private boolean jj_3R_15() {
    1155     if (jj_scan_token(DOCTYPE_DECL_START)) return true;
    1156     if (jj_scan_token(WHITESPACES)) return true;
    1157     if (jj_scan_token(NAME)) return true;
    1158     Token xsp;
    1159     xsp = jj_scanpos;
    1160     if (jj_scan_token(48)) jj_scanpos = xsp;
    1161     xsp = jj_scanpos;
    1162     if (jj_3R_21()) jj_scanpos = xsp;
    1163     if (jj_scan_token(DOCTYPE_DECL_END)) return true;
    1164     return false;
    1165   }
    1166
    1167   private boolean jj_3R_24() {
    1168     if (jj_scan_token(ATTR_NAME)) return true;
    1169     if (jj_scan_token(ATTR_EQ)) return true;
    1170     if (jj_3R_27()) return true;
    1171     return false;
    1172   }
    1173
    1174   private boolean jj_3R_20() {
    1175     if (jj_3R_23()) return true;
    1176     return false;
    1177   }
    1178
    1179   private boolean jj_3R_42() {
    1180     if (jj_scan_token(UNPARSED_TEXT_NO_SINGLE_QUOTES)) return true;
    1181     return false;
    1182   }
    1183
    1184   private boolean jj_3R_18() {
    1185     if (jj_3R_24()) return true;
    1186     return false;
    1187   }
    1188
    1189   private boolean jj_3R_13() {
    1190     if (jj_scan_token(DECL_START)) return true;
    1191     if (jj_scan_token(TAG_NAME)) return true;
    1192     Token xsp;
    1193     while (true) {
    1194       xsp = jj_scanpos;
    1195       if (jj_3R_18()) { jj_scanpos = xsp; break; }
    1196     }
    1197     if (jj_scan_token(DECL_END)) return true;
    1198     return false;
    1199   }
    1200
    1201   private boolean jj_3R_17() {
    1202     if (jj_3R_23()) return true;
    1203     return false;
    1204   }
    1205
    1206   private boolean jj_3R_26() {
    1207     if (jj_scan_token(COMMENT_TEXT)) return true;
    1208     return false;
    1209   }
    1210
    1211   private boolean jj_3R_19() {
    1212     if (jj_3R_22()) return true;
    1213     return false;
    1214   }
    1215
    1216   private boolean jj_3R_14() {
    1217     Token xsp;
    1218     xsp = jj_scanpos;
    1219     if (jj_3R_19()) {
    1220     jj_scanpos = xsp;
    1221     if (jj_3R_20()) return true;
    1222     }
    1223     return false;
    1224   }
    1225
    1226   private boolean jj_3R_22() {
    1227     if (jj_scan_token(COMMENT_START)) return true;
    1228     Token xsp;
    1229     while (true) {
    1230       xsp = jj_scanpos;
    1231       if (jj_3R_26()) { jj_scanpos = xsp; break; }
    1232     }
    1233     if (jj_scan_token(COMMENT_END)) return true;
    1234     return false;
    1235   }
    1236
    1237   private boolean jj_3_2() {
    1238     Token xsp;
    1239     while (true) {
    1240       xsp = jj_scanpos;
    1241       if (jj_3R_14()) { jj_scanpos = xsp; break; }
    1242     }
    1243     if (jj_3R_15()) return true;
    1244     return false;
    1245   }
    1246
    1247   private boolean jj_3R_12() {
    1248     Token xsp;
    1249     xsp = jj_scanpos;
    1250     if (jj_3R_16()) {
    1251     jj_scanpos = xsp;
    1252     if (jj_3R_17()) return true;
    1253     }
    1254     return false;
    1255   }
    1256
    1257   private boolean jj_3R_16() {
    1258     if (jj_3R_22()) return true;
    1259     return false;
    1260   }
    1261
    1262   private boolean jj_3R_48() {
    1263     if (jj_scan_token(JSP_EXPRESSION_IN_ATTRIBUTE)) return true;
    1264     return false;
    1265   }
    1266
    1267   private boolean jj_3R_45() {
    1268     if (jj_3R_48()) return true;
    1269     return false;
    1270   }
    1271
    1272   private boolean jj_3_1() {
    1273     Token xsp;
    1274     while (true) {
    1275       xsp = jj_scanpos;
    1276       if (jj_3R_12()) { jj_scanpos = xsp; break; }
    1277     }
    1278     if (jj_3R_13()) return true;
    1279     return false;
    1280   }
    1281
    1282   private boolean jj_3R_44() {
    1283     if (jj_3R_47()) return true;
    1284     return false;
    1285   }
    1286
    1287   private boolean jj_3R_43() {
    1288     if (jj_3R_46()) return true;
    1289     return false;
    1290   }
    1291
    1292   private boolean jj_3R_39() {
    1293     if (jj_3R_41()) return true;
    1294     return false;
    1295   }
    1296
    1297   private boolean jj_3R_35() {
    1298     if (jj_scan_token(DOLLAR_OR_HASH_SINGLE_QUOTE)) return true;
    1299     return false;
    1300   }
    1301
    1302   private boolean jj_3R_38() {
    1303     if (jj_3R_42()) return true;
    1304     return false;
    1305   }
    1306
    1307   private boolean jj_3R_33() {
    1308     if (jj_scan_token(DOLLAR_OR_HASH_DOUBLE_QUOTE)) return true;
    1309     return false;
    1310   }
    1311
    1312   private boolean jj_3R_41() {
    1313     Token xsp;
    1314     xsp = jj_scanpos;
    1315     if (jj_3R_43()) {
    1316     jj_scanpos = xsp;
    1317     if (jj_3R_44()) {
    1318     jj_scanpos = xsp;
    1319     if (jj_3R_45()) return true;
    1320     }
    1321     }
    1322     return false;
    1323   }
    1324
    1325   private boolean jj_3R_34() {
    1326     Token xsp;
    1327     xsp = jj_scanpos;
    1328     if (jj_3R_38()) {
    1329     jj_scanpos = xsp;
    1330     if (jj_3R_39()) return true;
    1331     }
    1332     return false;
    1333   }
    1334
    1335   private boolean jj_3R_37() {
    1336     if (jj_3R_41()) return true;
    1337     return false;
    1338   }
    1339
    1340   private boolean jj_3R_36() {
    1341     if (jj_3R_40()) return true;
    1342     return false;
    1343   }
    1344
    1345   private boolean jj_3R_23() {
    1346     if (jj_scan_token(JSP_COMMENT_START)) return true;
    1347     if (jj_scan_token(JSP_COMMENT_CONTENT)) return true;
    1348     if (jj_scan_token(JSP_COMMENT_END)) return true;
    1349     return false;
    1350   }
    1351
    1352   private boolean jj_3R_32() {
    1353     Token xsp;
    1354     xsp = jj_scanpos;
    1355     if (jj_3R_36()) {
    1356     jj_scanpos = xsp;
    1357     if (jj_3R_37()) return true;
    1358     }
    1359     return false;
    1360   }
    1361
    1362   private boolean jj_3R_31() {
    1363     if (jj_scan_token(SINGLE_QUOTE)) return true;
    1364     Token xsp;
    1365     while (true) {
    1366       xsp = jj_scanpos;
    1367       if (jj_3R_34()) { jj_scanpos = xsp; break; }
    1368     }
    1369     xsp = jj_scanpos;
    1370     if (jj_scan_token(69)) {
    1371     jj_scanpos = xsp;
    1372     if (jj_3R_35()) return true;
    1373     }
    1374     return false;
    1375   }
    1376
    1377   private boolean jj_3R_46() {
    1378     if (jj_scan_token(EL_EXPRESSION_IN_ATTRIBUTE)) return true;
    1379     return false;
    1380   }
    1381
    1382   /** Generated Token Manager. */
    1383   public JspParserTokenManager token_source;
    1384   /** Current token. */
    1385   public Token token;
    1386   /** Next token. */
    1387   public Token jj_nt;
    1388   private int jj_ntk;
    1389   private Token jj_scanpos, jj_lastpos;
    1390   private int jj_la;
    1391   private int jj_gen;
    1392   final private int[] jj_la1 = new int[29];
    1393   static private int[] jj_la1_0;
    1394   static private int[] jj_la1_1;
    1395   static private int[] jj_la1_2;
    1396   static {
    1397       jj_la1_init_0();
    1398       jj_la1_init_1();
    1399       jj_la1_init_2();
    1400    }
    1401    private static void jj_la1_init_0() {
    1402       jj_la1_0 = new int[] {0x11000000,0x11000000,0x11000000,0x11000000,0xf9400000,0xf9400000,0xf9400000,0x0,0x0,0x0,0x0,0x0,0x0,0xf9400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
    1403    }
    1404    private static void jj_la1_init_1() {
    1405       jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x7,0x1,0x1,0x6,0x10,0x6,0x6,0x400000,0x4000000,0x7,0x28000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x10000,0x10000,0xc0000,0xc0000,};
    1406    }
    1407    private static void jj_la1_init_2() {
    1408       jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x21c,0x21c,0x500,0x5c,0x5c,0xa0,0x3,0x1c,0x1000,0x0,0x0,0x0,0x0,0x0,};
    1409    }
    1410   final private JJCalls[] jj_2_rtns = new JJCalls[2];
    1411   private boolean jj_rescan = false;
    1412   private int jj_gc = 0;
    1413
    1414   /** Constructor with user supplied CharStream. */
    1415   public JspParser(CharStream stream) {
    1416     token_source = new JspParserTokenManager(stream);
    1417     token = new Token();
    1418     jj_ntk = -1;
    1419     jj_gen = 0;
    1420     for (int i = 0; i < 29; i++) jj_la1[i] = -1;
    1421     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
    1422   }
    1423
    1424   /** Reinitialise. */
    1425   public void ReInit(CharStream stream) {
    1426     token_source.ReInit(stream);
    1427     token = new Token();
    1428     jj_ntk = -1;
    1429     jjtree.reset();
    1430     jj_gen = 0;
    1431     for (int i = 0; i < 29; i++) jj_la1[i] = -1;
    1432     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
    1433   }
    1434
    1435   /** Constructor with generated Token Manager. */
    1436   public JspParser(JspParserTokenManager tm) {
    1437     token_source = tm;
    1438     token = new Token();
    1439     jj_ntk = -1;
    1440     jj_gen = 0;
    1441     for (int i = 0; i < 29; i++) jj_la1[i] = -1;
    1442     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
    1443   }
    1444
    1445   /** Reinitialise. */
    1446   public void ReInit(JspParserTokenManager tm) {
    1447     token_source = tm;
    1448     token = new Token();
    1449     jj_ntk = -1;
    1450     jjtree.reset();
    1451     jj_gen = 0;
    1452     for (int i = 0; i < 29; i++) jj_la1[i] = -1;
    1453     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
    1454   }
    1455
    1456   private Token jj_consume_token(int kind) throws ParseException {
    1457     Token oldToken;
    1458     if ((oldToken = token).next != null) token = token.next;
    1459     else token = token.next = token_source.getNextToken();
    1460     jj_ntk = -1;
    1461     if (token.kind == kind) {
    1462       jj_gen++;
    1463       if (++jj_gc > 100) {
    1464         jj_gc = 0;
    1465         for (int i = 0; i < jj_2_rtns.length; i++) {
    1466           JJCalls c = jj_2_rtns[i];
    1467           while (c != null) {
    1468             if (c.gen < jj_gen) c.first = null;
    1469             c = c.next;
    1470           }
    1471         }
    1472       }
    1473       return token;
    1474     }
    1475     token = oldToken;
    1476     jj_kind = kind;
    1477     throw generateParseException();
    1478   }
    1479
    1480   static private final class LookaheadSuccess extends java.lang.Error { }
    1481   final private LookaheadSuccess jj_ls = new LookaheadSuccess();
    1482   private boolean jj_scan_token(int kind) {
    1483     if (jj_scanpos == jj_lastpos) {
    1484       jj_la--;
    1485       if (jj_scanpos.next == null) {
    1486         jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
    1487       } else {
    1488         jj_lastpos = jj_scanpos = jj_scanpos.next;
    1489       }
    1490     } else {
    1491       jj_scanpos = jj_scanpos.next;
    1492     }
    1493     if (jj_rescan) {
    1494       int i = 0; Token tok = token;
    1495       while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
    1496       if (tok != null) jj_add_error_token(kind, i);
    1497     }
    1498     if (jj_scanpos.kind != kind) return true;
    1499     if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
    1500     return false;
    1501   }
    1502
    1503
    1504 /** Get the next Token. */
    1505   final public Token getNextToken() {
    1506     if (token.next != null) token = token.next;
    1507     else token = token.next = token_source.getNextToken();
    1508     jj_ntk = -1;
    1509     jj_gen++;
    1510     return token;
    1511   }
    1512
    1513 /** Get the specific Token. */
    1514   final public Token getToken(int index) {
    1515     Token t = token;
    1516     for (int i = 0; i < index; i++) {
    1517       if (t.next != null) t = t.next;
    1518       else t = t.next = token_source.getNextToken();
    1519     }
    1520     return t;
    1521   }
    1522
    1523   private int jj_ntk() {
    1524     if ((jj_nt=token.next) == null)
    1525       return (jj_ntk = (token.next=token_source.getNextToken()).kind);
    1526     else
    1527       return (jj_ntk = jj_nt.kind);
    1528   }
    1529
    1530   private java.util.List jj_expentries = new java.util.ArrayList();
    1531   private int[] jj_expentry;
    1532   private int jj_kind = -1;
    1533   private int[] jj_lasttokens = new int[100];
    1534   private int jj_endpos;
    1535
    1536   private void jj_add_error_token(int kind, int pos) {
    1537     if (pos >= 100) return;
    1538     if (pos == jj_endpos + 1) {
    1539       jj_lasttokens[jj_endpos++] = kind;
    1540     } else if (jj_endpos != 0) {
    1541       jj_expentry = new int[jj_endpos];
    1542       for (int i = 0; i < jj_endpos; i++) {
    1543         jj_expentry[i] = jj_lasttokens[i];
    1544       }
    1545       jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) {
    1546         int[] oldentry = (int[])(it.next());
    1547         if (oldentry.length == jj_expentry.length) {
    1548           for (int i = 0; i < jj_expentry.length; i++) {
    1549             if (oldentry[i] != jj_expentry[i]) {
    1550               continue jj_entries_loop;
    1551             }
    1552           }
    1553           jj_expentries.add(jj_expentry);
    1554           break jj_entries_loop;
    1555         }
    1556       }
    1557       if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
    1558     }
    1559   }
    1560
    1561   /** Generate ParseException. */
    1562   public ParseException generateParseException() {
    1563     jj_expentries.clear();
    1564     boolean[] la1tokens = new boolean[77];
    1565     if (jj_kind >= 0) {
    1566       la1tokens[jj_kind] = true;
    1567       jj_kind = -1;
    1568     }
    1569     for (int i = 0; i < 29; i++) {
    1570       if (jj_la1[i] == jj_gen) {
    1571         for (int j = 0; j < 32; j++) {
    1572           if ((jj_la1_0[i] & (1<<j)) != 0) {
    1573             la1tokens[j] = true;
    1574           }
    1575           if ((jj_la1_1[i] & (1<<j)) != 0) {
    1576             la1tokens[32+j] = true;
    1577           }
    1578           if ((jj_la1_2[i] & (1<<j)) != 0) {
    1579             la1tokens[64+j] = true;
    1580           }
    1581         }
    1582       }
    1583     }
    1584     for (int i = 0; i < 77; i++) {
    1585       if (la1tokens[i]) {
    1586         jj_expentry = new int[1];
    1587         jj_expentry[0] = i;
    1588         jj_expentries.add(jj_expentry);
    1589       }
    1590     }
    1591     jj_endpos = 0;
    1592     jj_rescan_token();
    1593     jj_add_error_token(0, 0);
    1594     int[][] exptokseq = new int[jj_expentries.size()][];
    1595     for (int i = 0; i < jj_expentries.size(); i++) {
    1596       exptokseq[i] = (int[])jj_expentries.get(i);
    1597     }
    1598     return new ParseException(token, exptokseq, tokenImage);
    1599   }
    1600
    1601   /** Enable tracing. */
    1602   final public void enable_tracing() {
    1603   }
    1604
    1605   /** Disable tracing. */
    1606   final public void disable_tracing() {
    1607   }
    1608
    1609   private void jj_rescan_token() {
    1610     jj_rescan = true;
    1611     for (int i = 0; i < 2; i++) {
    1612     try {
    1613       JJCalls p = jj_2_rtns[i];
    1614       do {
    1615         if (p.gen > jj_gen) {
    1616           jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
    1617           switch (i) {
    1618             case 0: jj_3_1(); break;
    1619             case 1: jj_3_2(); break;
    1620           }
    1621         }
    1622         p = p.next;
    1623       } while (p != null);
    1624       } catch(LookaheadSuccess ls) { }
    1625     }
    1626     jj_rescan = false;
    1627   }
    1628
    1629   private void jj_save(int index, int xla) {
    1630     JJCalls p = jj_2_rtns[index];
    1631     while (p.gen > jj_gen) {
    1632       if (p.next == null) { p = p.next = new JJCalls(); break; }
    1633       p = p.next;
    1634     }
    1635     p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
    1636   }
    1637
    1638   static final class JJCalls {
    1639     int gen;
    1640     Token first;
    1641     int arg;
    1642     JJCalls next;
    1643   }
    1644
    1645 }