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 
633                         // Content in a <script> element needs special treatment (like a comment or CDataSection).
634                         // Tell the TokenManager to start looking for the body of a script element.  In this
635                         // state all text will be consumed by the next token up to the closing </script> tag.
636                         // This is a context sensitive switch for the token manager, not something one can
637                         // express using normal JavaCC syntax.  Hence the hoop jumping.
638                                 if ("script".equalsIgnoreCase(startTagName.image)) {
639                                         token_source.SwitchTo(HtmlScriptContentState);
640                                 }
641         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
642         case TAG_START:
643         case COMMENT_START:
644         case CDATA_START:
645         case JSP_COMMENT_START:
646         case JSP_DECLARATION_START:
647         case JSP_EXPRESSION_START:
648         case JSP_SCRIPTLET_START:
649         case JSP_DIRECTIVE_START:
650         case EL_EXPRESSION:
651         case UNPARSED_TEXT:
652         case HTML_SCRIPT_CONTENT:
653         case HTML_SCRIPT_END_TAG:
654           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
655           case HTML_SCRIPT_CONTENT:
656           case HTML_SCRIPT_END_TAG:
657             HtmlScript();
658             break;
659           case TAG_START:
660           case COMMENT_START:
661           case CDATA_START:
662           case JSP_COMMENT_START:
663           case JSP_DECLARATION_START:
664           case JSP_EXPRESSION_START:
665           case JSP_SCRIPTLET_START:
666           case JSP_DIRECTIVE_START:
667           case EL_EXPRESSION:
668           case UNPARSED_TEXT:
669             Content();
670             break;
671           default:
672             jj_la1[13] = jj_gen;
673             jj_consume_token(-1);
674             throw new ParseException();
675           }
676           break;
677         default:
678           jj_la1[14] = jj_gen;
679           ;
680         }
681         jj_consume_token(ENDTAG_START);
682         endTagName = jj_consume_token(TAG_NAME);
683                         if (! tagName.equalsIgnoreCase(endTagName.image)) {
684                                 {if (true) throw new StartAndEndTagMismatchException(
685                                         startTagName.beginLine, startTagName.beginColumn,
686                                         startTagName.image,
687                                         endTagName.beginLine, endTagName.beginColumn,
688                                         endTagName.image  );}
689                         }
690         jj_consume_token(TAG_END);
691         break;
692       case TAG_SLASHEND:
693         jj_consume_token(TAG_SLASHEND);
694                           jjtree.closeNodeScope(jjtn000, true);
695                           jjtc000 = false;
696                           jjtn000.setEmpty(true);
697         break;
698       default:
699         jj_la1[15] = jj_gen;
700         jj_consume_token(-1);
701         throw new ParseException();
702       }
703     } catch (Throwable jjte000) {
704       if (jjtc000) {
705         jjtree.clearNodeScope(jjtn000);
706         jjtc000 = false;
707       } else {
708         jjtree.popNode();
709       }
710       if (jjte000 instanceof RuntimeException) {
711         {if (true) throw (RuntimeException)jjte000;}
712       }
713       if (jjte000 instanceof ParseException) {
714         {if (true) throw (ParseException)jjte000;}
715       }
716       {if (true) throw (Error)jjte000;}
717     } finally {
718       if (jjtc000) {
719         jjtree.closeNodeScope(jjtn000, true);
720       }
721     }
722   }
723 
724   final public void Attribute() throws ParseException {
725  /*@bgen(jjtree) Attribute */
726         ASTAttribute jjtn000 = new ASTAttribute(this, JJTATTRIBUTE);
727         boolean jjtc000 = true;
728         jjtree.openNodeScope(jjtn000);Token t;
729     try {
730       t = jj_consume_token(ATTR_NAME);
731                     jjtn000.setName(t.image);
732       jj_consume_token(ATTR_EQ);
733       AttributeValue();
734     } catch (Throwable jjte000) {
735     if (jjtc000) {
736       jjtree.clearNodeScope(jjtn000);
737       jjtc000 = false;
738     } else {
739       jjtree.popNode();
740     }
741     if (jjte000 instanceof RuntimeException) {
742       {if (true) throw (RuntimeException)jjte000;}
743     }
744     if (jjte000 instanceof ParseException) {
745       {if (true) throw (ParseException)jjte000;}
746     }
747     {if (true) throw (Error)jjte000;}
748     } finally {
749     if (jjtc000) {
750       jjtree.closeNodeScope(jjtn000, true);
751     }
752     }
753   }
754 
755 /**
756  * The value of an attribute of an element.
757  * EL expressions, JSF value bindings, and JSP expressions
758  * are parsed as sub-nodes of the AttributeValue node.
759  */
760   final public void AttributeValue() throws ParseException {
761  /*@bgen(jjtree) AttributeValue */
762         ASTAttributeValue jjtn000 = new ASTAttributeValue(this, JJTATTRIBUTEVALUE);
763         boolean jjtc000 = true;
764         jjtree.openNodeScope(jjtn000);StringBuffer content = new StringBuffer();
765         String tmp;
766         Token t;
767     try {
768       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
769       case DOUBLE_QUOTE:
770         jj_consume_token(DOUBLE_QUOTE);
771         label_8:
772         while (true) {
773           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
774           case EL_EXPRESSION_IN_ATTRIBUTE:
775           case VALUE_BINDING_IN_ATTRIBUTE:
776           case JSP_EXPRESSION_IN_ATTRIBUTE:
777           case UNPARSED_TEXT_NO_DOUBLE_QUOTES:
778             ;
779             break;
780           default:
781             jj_la1[16] = jj_gen;
782             break label_8;
783           }
784           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
785           case UNPARSED_TEXT_NO_DOUBLE_QUOTES:
786             tmp = UnparsedTextNoDoubleQuotes();
787             break;
788           case EL_EXPRESSION_IN_ATTRIBUTE:
789           case VALUE_BINDING_IN_ATTRIBUTE:
790           case JSP_EXPRESSION_IN_ATTRIBUTE:
791             tmp = QuoteIndependentAttributeValueContent();
792             break;
793           default:
794             jj_la1[17] = jj_gen;
795             jj_consume_token(-1);
796             throw new ParseException();
797           }
798                             content.append(tmp);
799         }
800         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
801         case ENDING_DOUBLE_QUOTE:
802           jj_consume_token(ENDING_DOUBLE_QUOTE);
803           break;
804         case DOLLAR_OR_HASH_DOUBLE_QUOTE:
805           t = jj_consume_token(DOLLAR_OR_HASH_DOUBLE_QUOTE);
806                                                                     content.append(t.image.substring(0, 1));
807           break;
808         default:
809           jj_la1[18] = jj_gen;
810           jj_consume_token(-1);
811           throw new ParseException();
812         }
813         break;
814       case SINGLE_QUOTE:
815         jj_consume_token(SINGLE_QUOTE);
816         label_9:
817         while (true) {
818           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
819           case EL_EXPRESSION_IN_ATTRIBUTE:
820           case VALUE_BINDING_IN_ATTRIBUTE:
821           case JSP_EXPRESSION_IN_ATTRIBUTE:
822           case UNPARSED_TEXT_NO_SINGLE_QUOTES:
823             ;
824             break;
825           default:
826             jj_la1[19] = jj_gen;
827             break label_9;
828           }
829           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
830           case UNPARSED_TEXT_NO_SINGLE_QUOTES:
831             tmp = UnparsedTextNoSingleQuotes();
832             break;
833           case EL_EXPRESSION_IN_ATTRIBUTE:
834           case VALUE_BINDING_IN_ATTRIBUTE:
835           case JSP_EXPRESSION_IN_ATTRIBUTE:
836             tmp = QuoteIndependentAttributeValueContent();
837             break;
838           default:
839             jj_la1[20] = jj_gen;
840             jj_consume_token(-1);
841             throw new ParseException();
842           }
843                             content.append(tmp);
844         }
845         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
846         case ENDING_SINGLE_QUOTE:
847           jj_consume_token(ENDING_SINGLE_QUOTE);
848           break;
849         case DOLLAR_OR_HASH_SINGLE_QUOTE:
850           t = jj_consume_token(DOLLAR_OR_HASH_SINGLE_QUOTE);
851                                                                  content.append(t.image.substring(0, 1));
852           break;
853         default:
854           jj_la1[21] = jj_gen;
855           jj_consume_token(-1);
856           throw new ParseException();
857         }
858         break;
859       default:
860         jj_la1[22] = jj_gen;
861         jj_consume_token(-1);
862         throw new ParseException();
863       }
864           jjtree.closeNodeScope(jjtn000, true);
865           jjtc000 = false;
866           jjtn000.setImage( content.toString() );
867     } catch (Throwable jjte000) {
868           if (jjtc000) {
869             jjtree.clearNodeScope(jjtn000);
870             jjtc000 = false;
871           } else {
872             jjtree.popNode();
873           }
874           if (jjte000 instanceof RuntimeException) {
875             {if (true) throw (RuntimeException)jjte000;}
876           }
877           if (jjte000 instanceof ParseException) {
878             {if (true) throw (ParseException)jjte000;}
879           }
880           {if (true) throw (Error)jjte000;}
881     } finally {
882           if (jjtc000) {
883             jjtree.closeNodeScope(jjtn000, true);
884           }
885     }
886   }
887 
888 /**
889  * Partial content of an attribute value that can contain all quotes.
890  * This groups EL expressions, value bindings, and JSP expressions.
891  */
892   final public String QuoteIndependentAttributeValueContent() throws ParseException {
893         String tmp;
894     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
895     case EL_EXPRESSION_IN_ATTRIBUTE:
896       tmp = ElExpressionInAttribute();
897       break;
898     case VALUE_BINDING_IN_ATTRIBUTE:
899       tmp = ValueBindingInAttribute();
900       break;
901     case JSP_EXPRESSION_IN_ATTRIBUTE:
902       tmp = JspExpressionInAttribute();
903       break;
904     default:
905       jj_la1[23] = jj_gen;
906       jj_consume_token(-1);
907       throw new ParseException();
908     }
909           {if (true) return tmp;}
910     throw new RuntimeException("Missing return statement in function");
911   }
912 
913   final public String JspExpressionInAttribute() throws ParseException {
914  /*@bgen(jjtree) JspExpressionInAttribute */
915         ASTJspExpressionInAttribute jjtn000 = new ASTJspExpressionInAttribute(this, JJTJSPEXPRESSIONINATTRIBUTE);
916         boolean jjtc000 = true;
917         jjtree.openNodeScope(jjtn000);Token t;
918     try {
919       t = jj_consume_token(JSP_EXPRESSION_IN_ATTRIBUTE);
920           jjtree.closeNodeScope(jjtn000, true);
921           jjtc000 = false;
922                 jjtn000.setImage(t.image.substring(3, t.image.length()-2).trim()); // without <% and %>
923                 {if (true) return t.image;}
924     } finally {
925           if (jjtc000) {
926             jjtree.closeNodeScope(jjtn000, true);
927           }
928     }
929     throw new RuntimeException("Missing return statement in function");
930   }
931 
932   final public void CommentTag() throws ParseException {
933  /*@bgen(jjtree) CommentTag */
934         ASTCommentTag jjtn000 = new ASTCommentTag(this, JJTCOMMENTTAG);
935         boolean jjtc000 = true;
936         jjtree.openNodeScope(jjtn000);StringBuffer content = new StringBuffer();
937         Token t;
938     try {
939       jj_consume_token(COMMENT_START);
940       label_10:
941       while (true) {
942         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
943         case COMMENT_TEXT:
944           ;
945           break;
946         default:
947           jj_la1[24] = jj_gen;
948           break label_10;
949         }
950         t = jj_consume_token(COMMENT_TEXT);
951                          content.append(t.image);
952       }
953       jj_consume_token(COMMENT_END);
954           jjtree.closeNodeScope(jjtn000, true);
955           jjtc000 = false;
956                 jjtn000.setImage(content.toString().trim());
957     } finally {
958     if (jjtc000) {
959       jjtree.closeNodeScope(jjtn000, true);
960     }
961     }
962   }
963 
964   final public void Declaration() throws ParseException {
965  /*@bgen(jjtree) Declaration */
966         ASTDeclaration jjtn000 = new ASTDeclaration(this, JJTDECLARATION);
967         boolean jjtc000 = true;
968         jjtree.openNodeScope(jjtn000);Token t;
969     try {
970       jj_consume_token(DECL_START);
971       t = jj_consume_token(TAG_NAME);
972                    jjtn000.setName(t.image);
973       label_11:
974       while (true) {
975         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
976         case ATTR_NAME:
977           ;
978           break;
979         default:
980           jj_la1[25] = jj_gen;
981           break label_11;
982         }
983         Attribute();
984       }
985       jj_consume_token(DECL_END);
986     } catch (Throwable jjte000) {
987     if (jjtc000) {
988       jjtree.clearNodeScope(jjtn000);
989       jjtc000 = false;
990     } else {
991       jjtree.popNode();
992     }
993     if (jjte000 instanceof RuntimeException) {
994       {if (true) throw (RuntimeException)jjte000;}
995     }
996     if (jjte000 instanceof ParseException) {
997       {if (true) throw (ParseException)jjte000;}
998     }
999     {if (true) throw (Error)jjte000;}
1000     } finally {
1001     if (jjtc000) {
1002       jjtree.closeNodeScope(jjtn000, true);
1003     }
1004     }
1005   }
1006 
1007   final public void DoctypeDeclaration() throws ParseException {
1008  /*@bgen(jjtree) DoctypeDeclaration */
1009         ASTDoctypeDeclaration jjtn000 = new ASTDoctypeDeclaration(this, JJTDOCTYPEDECLARATION);
1010         boolean jjtc000 = true;
1011         jjtree.openNodeScope(jjtn000);Token t;
1012     try {
1013       jj_consume_token(DOCTYPE_DECL_START);
1014       jj_consume_token(WHITESPACES);
1015       t = jj_consume_token(NAME);
1016                       jjtn000.setName(t.image);
1017       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1018       case WHITESPACES:
1019         jj_consume_token(WHITESPACES);
1020         break;
1021       default:
1022         jj_la1[26] = jj_gen;
1023         ;
1024       }
1025       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1026       case PUBLIC:
1027       case SYSTEM:
1028         DoctypeExternalId();
1029         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1030         case WHITESPACES:
1031           jj_consume_token(WHITESPACES);
1032           break;
1033         default:
1034           jj_la1[27] = jj_gen;
1035           ;
1036         }
1037         break;
1038       default:
1039         jj_la1[28] = jj_gen;
1040         ;
1041       }
1042       jj_consume_token(DOCTYPE_DECL_END);
1043     } catch (Throwable jjte000) {
1044           if (jjtc000) {
1045             jjtree.clearNodeScope(jjtn000);
1046             jjtc000 = false;
1047           } else {
1048             jjtree.popNode();
1049           }
1050           if (jjte000 instanceof RuntimeException) {
1051             {if (true) throw (RuntimeException)jjte000;}
1052           }
1053           if (jjte000 instanceof ParseException) {
1054             {if (true) throw (ParseException)jjte000;}
1055           }
1056           {if (true) throw (Error)jjte000;}
1057     } finally {
1058           if (jjtc000) {
1059             jjtree.closeNodeScope(jjtn000, true);
1060           }
1061     }
1062   }
1063 
1064   final public void DoctypeExternalId() throws ParseException {
1065  /*@bgen(jjtree) DoctypeExternalId */
1066         ASTDoctypeExternalId jjtn000 = new ASTDoctypeExternalId(this, JJTDOCTYPEEXTERNALID);
1067         boolean jjtc000 = true;
1068         jjtree.openNodeScope(jjtn000);Token systemLiteral;
1069         Token pubIdLiteral;
1070     try {
1071       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1072       case SYSTEM:
1073         jj_consume_token(SYSTEM);
1074         jj_consume_token(WHITESPACES);
1075         systemLiteral = jj_consume_token(QUOTED_LITERAL);
1076                                   jjtree.closeNodeScope(jjtn000, true);
1077                                   jjtc000 = false;
1078                                   jjtn000.setUri(quoteContent(systemLiteral.image));
1079         break;
1080       case PUBLIC:
1081         jj_consume_token(PUBLIC);
1082         jj_consume_token(WHITESPACES);
1083         pubIdLiteral = jj_consume_token(QUOTED_LITERAL);
1084                                   jjtn000.setPublicId(quoteContent(pubIdLiteral.image));
1085         jj_consume_token(WHITESPACES);
1086         systemLiteral = jj_consume_token(QUOTED_LITERAL);
1087                                   jjtree.closeNodeScope(jjtn000, true);
1088                                   jjtc000 = false;
1089                                   jjtn000.setUri(quoteContent(systemLiteral.image));
1090         break;
1091       default:
1092         jj_la1[29] = jj_gen;
1093         jj_consume_token(-1);
1094         throw new ParseException();
1095       }
1096     } finally {
1097                   if (jjtc000) {
1098                     jjtree.closeNodeScope(jjtn000, true);
1099                   }
1100     }
1101   }
1102 
1103   final public void HtmlScript() throws ParseException {
1104  /*@bgen(jjtree) HtmlScript */
1105         ASTHtmlScript jjtn000 = new ASTHtmlScript(this, JJTHTMLSCRIPT);
1106         boolean jjtc000 = true;
1107         jjtree.openNodeScope(jjtn000);StringBuffer content = new StringBuffer();
1108         Token t;
1109     try {
1110       label_12:
1111       while (true) {
1112         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1113         case HTML_SCRIPT_CONTENT:
1114           ;
1115           break;
1116         default:
1117           jj_la1[30] = jj_gen;
1118           break label_12;
1119         }
1120         t = jj_consume_token(HTML_SCRIPT_CONTENT);
1121                                       content.append(t.image);
1122       }
1123       jj_consume_token(HTML_SCRIPT_END_TAG);
1124                   jjtree.closeNodeScope(jjtn000, true);
1125                   jjtc000 = false;
1126                         jjtn000.setImage(content.toString().trim());
1127     } finally {
1128           if (jjtc000) {
1129             jjtree.closeNodeScope(jjtn000, true);
1130           }
1131     }
1132   }
1133 
1134   private boolean jj_2_1(int xla) {
1135     jj_la = xla; jj_lastpos = jj_scanpos = token;
1136     try { return !jj_3_1(); }
1137     catch(LookaheadSuccess ls) { return true; }
1138     finally { jj_save(0, xla); }
1139   }
1140 
1141   private boolean jj_2_2(int xla) {
1142     jj_la = xla; jj_lastpos = jj_scanpos = token;
1143     try { return !jj_3_2(); }
1144     catch(LookaheadSuccess ls) { return true; }
1145     finally { jj_save(1, xla); }
1146   }
1147 
1148   private boolean jj_3R_22() {
1149     if (jj_3R_26()) return true;
1150     Token xsp;
1151     xsp = jj_scanpos;
1152     if (jj_scan_token(48)) jj_scanpos = xsp;
1153     return false;
1154   }
1155 
1156   private boolean jj_3R_16() {
1157     if (jj_scan_token(DOCTYPE_DECL_START)) return true;
1158     if (jj_scan_token(WHITESPACES)) return true;
1159     if (jj_scan_token(NAME)) return true;
1160     Token xsp;
1161     xsp = jj_scanpos;
1162     if (jj_scan_token(48)) jj_scanpos = xsp;
1163     xsp = jj_scanpos;
1164     if (jj_3R_22()) jj_scanpos = xsp;
1165     if (jj_scan_token(DOCTYPE_DECL_END)) return true;
1166     return false;
1167   }
1168 
1169   private boolean jj_3R_25() {
1170     if (jj_scan_token(ATTR_NAME)) return true;
1171     if (jj_scan_token(ATTR_EQ)) return true;
1172     if (jj_3R_28()) return true;
1173     return false;
1174   }
1175 
1176   private boolean jj_3R_41() {
1177     if (jj_scan_token(UNPARSED_TEXT_NO_DOUBLE_QUOTES)) return true;
1178     return false;
1179   }
1180 
1181   private boolean jj_3R_19() {
1182     if (jj_3R_25()) return true;
1183     return false;
1184   }
1185 
1186   private boolean jj_3R_14() {
1187     if (jj_scan_token(DECL_START)) return true;
1188     if (jj_scan_token(TAG_NAME)) return true;
1189     Token xsp;
1190     while (true) {
1191       xsp = jj_scanpos;
1192       if (jj_3R_19()) { jj_scanpos = xsp; break; }
1193     }
1194     if (jj_scan_token(DECL_END)) return true;
1195     return false;
1196   }
1197 
1198   private boolean jj_3R_21() {
1199     if (jj_3R_24()) return true;
1200     return false;
1201   }
1202 
1203   private boolean jj_3R_43() {
1204     if (jj_scan_token(UNPARSED_TEXT_NO_SINGLE_QUOTES)) return true;
1205     return false;
1206   }
1207 
1208   private boolean jj_3R_27() {
1209     if (jj_scan_token(COMMENT_TEXT)) return true;
1210     return false;
1211   }
1212 
1213   private boolean jj_3R_23() {
1214     if (jj_scan_token(COMMENT_START)) return true;
1215     Token xsp;
1216     while (true) {
1217       xsp = jj_scanpos;
1218       if (jj_3R_27()) { jj_scanpos = xsp; break; }
1219     }
1220     if (jj_scan_token(COMMENT_END)) return true;
1221     return false;
1222   }
1223 
1224   private boolean jj_3R_18() {
1225     if (jj_3R_24()) return true;
1226     return false;
1227   }
1228 
1229   private boolean jj_3R_49() {
1230     if (jj_scan_token(JSP_EXPRESSION_IN_ATTRIBUTE)) return true;
1231     return false;
1232   }
1233 
1234   private boolean jj_3R_46() {
1235     if (jj_3R_49()) return true;
1236     return false;
1237   }
1238 
1239   private boolean jj_3R_45() {
1240     if (jj_3R_48()) return true;
1241     return false;
1242   }
1243 
1244   private boolean jj_3R_44() {
1245     if (jj_3R_47()) return true;
1246     return false;
1247   }
1248 
1249   private boolean jj_3R_20() {
1250     if (jj_3R_23()) return true;
1251     return false;
1252   }
1253 
1254   private boolean jj_3R_15() {
1255     Token xsp;
1256     xsp = jj_scanpos;
1257     if (jj_3R_20()) {
1258     jj_scanpos = xsp;
1259     if (jj_3R_21()) return true;
1260     }
1261     return false;
1262   }
1263 
1264   private boolean jj_3R_40() {
1265     if (jj_3R_42()) return true;
1266     return false;
1267   }
1268 
1269   private boolean jj_3_2() {
1270     Token xsp;
1271     while (true) {
1272       xsp = jj_scanpos;
1273       if (jj_3R_15()) { jj_scanpos = xsp; break; }
1274     }
1275     if (jj_3R_16()) return true;
1276     return false;
1277   }
1278 
1279   private boolean jj_3R_36() {
1280     if (jj_scan_token(DOLLAR_OR_HASH_SINGLE_QUOTE)) return true;
1281     return false;
1282   }
1283 
1284   private boolean jj_3R_39() {
1285     if (jj_3R_43()) return true;
1286     return false;
1287   }
1288 
1289   private boolean jj_3R_13() {
1290     Token xsp;
1291     xsp = jj_scanpos;
1292     if (jj_3R_17()) {
1293     jj_scanpos = xsp;
1294     if (jj_3R_18()) return true;
1295     }
1296     return false;
1297   }
1298 
1299   private boolean jj_3R_17() {
1300     if (jj_3R_23()) return true;
1301     return false;
1302   }
1303 
1304   private boolean jj_3R_34() {
1305     if (jj_scan_token(DOLLAR_OR_HASH_DOUBLE_QUOTE)) return true;
1306     return false;
1307   }
1308 
1309   private boolean jj_3R_42() {
1310     Token xsp;
1311     xsp = jj_scanpos;
1312     if (jj_3R_44()) {
1313     jj_scanpos = xsp;
1314     if (jj_3R_45()) {
1315     jj_scanpos = xsp;
1316     if (jj_3R_46()) return true;
1317     }
1318     }
1319     return false;
1320   }
1321 
1322   private boolean jj_3_1() {
1323     Token xsp;
1324     while (true) {
1325       xsp = jj_scanpos;
1326       if (jj_3R_13()) { jj_scanpos = xsp; break; }
1327     }
1328     if (jj_3R_14()) return true;
1329     return false;
1330   }
1331 
1332   private boolean jj_3R_35() {
1333     Token xsp;
1334     xsp = jj_scanpos;
1335     if (jj_3R_39()) {
1336     jj_scanpos = xsp;
1337     if (jj_3R_40()) return true;
1338     }
1339     return false;
1340   }
1341 
1342   private boolean jj_3R_38() {
1343     if (jj_3R_42()) return true;
1344     return false;
1345   }
1346 
1347   private boolean jj_3R_37() {
1348     if (jj_3R_41()) return true;
1349     return false;
1350   }
1351 
1352   private boolean jj_3R_33() {
1353     Token xsp;
1354     xsp = jj_scanpos;
1355     if (jj_3R_37()) {
1356     jj_scanpos = xsp;
1357     if (jj_3R_38()) return true;
1358     }
1359     return false;
1360   }
1361 
1362   private boolean jj_3R_32() {
1363     if (jj_scan_token(SINGLE_QUOTE)) return true;
1364     Token xsp;
1365     while (true) {
1366       xsp = jj_scanpos;
1367       if (jj_3R_35()) { jj_scanpos = xsp; break; }
1368     }
1369     xsp = jj_scanpos;
1370     if (jj_scan_token(69)) {
1371     jj_scanpos = xsp;
1372     if (jj_3R_36()) return true;
1373     }
1374     return false;
1375   }
1376 
1377   private boolean jj_3R_24() {
1378     if (jj_scan_token(JSP_COMMENT_START)) return true;
1379     if (jj_scan_token(JSP_COMMENT_CONTENT)) return true;
1380     if (jj_scan_token(JSP_COMMENT_END)) return true;
1381     return false;
1382   }
1383 
1384   private boolean jj_3R_31() {
1385     if (jj_scan_token(DOUBLE_QUOTE)) return true;
1386     Token xsp;
1387     while (true) {
1388       xsp = jj_scanpos;
1389       if (jj_3R_33()) { jj_scanpos = xsp; break; }
1390     }
1391     xsp = jj_scanpos;
1392     if (jj_scan_token(72)) {
1393     jj_scanpos = xsp;
1394     if (jj_3R_34()) return true;
1395     }
1396     return false;
1397   }
1398 
1399   private boolean jj_3R_30() {
1400     if (jj_scan_token(PUBLIC)) return true;
1401     if (jj_scan_token(WHITESPACES)) return true;
1402     if (jj_scan_token(QUOTED_LITERAL)) return true;
1403     if (jj_scan_token(WHITESPACES)) return true;
1404     if (jj_scan_token(QUOTED_LITERAL)) return true;
1405     return false;
1406   }
1407 
1408   private boolean jj_3R_47() {
1409     if (jj_scan_token(EL_EXPRESSION_IN_ATTRIBUTE)) return true;
1410     return false;
1411   }
1412 
1413   private boolean jj_3R_28() {
1414     Token xsp;
1415     xsp = jj_scanpos;
1416     if (jj_3R_31()) {
1417     jj_scanpos = xsp;
1418     if (jj_3R_32()) return true;
1419     }
1420     return false;
1421   }
1422 
1423   private boolean jj_3R_26() {
1424     Token xsp;
1425     xsp = jj_scanpos;
1426     if (jj_3R_29()) {
1427     jj_scanpos = xsp;
1428     if (jj_3R_30()) return true;
1429     }
1430     return false;
1431   }
1432 
1433   private boolean jj_3R_29() {
1434     if (jj_scan_token(SYSTEM)) return true;
1435     if (jj_scan_token(WHITESPACES)) return true;
1436     if (jj_scan_token(QUOTED_LITERAL)) return true;
1437     return false;
1438   }
1439 
1440   private boolean jj_3R_48() {
1441     if (jj_scan_token(VALUE_BINDING_IN_ATTRIBUTE)) return true;
1442     return false;
1443   }
1444 
1445   /** Generated Token Manager. */
1446   public JspParserTokenManager token_source;
1447   /** Current token. */
1448   public Token token;
1449   /** Next token. */
1450   public Token jj_nt;
1451   private int jj_ntk;
1452   private Token jj_scanpos, jj_lastpos;
1453   private int jj_la;
1454   private int jj_gen;
1455   final private int[] jj_la1 = new int[31];
1456   static private int[] jj_la1_0;
1457   static private int[] jj_la1_1;
1458   static private int[] jj_la1_2;
1459   static {
1460       jj_la1_init_0();
1461       jj_la1_init_1();
1462       jj_la1_init_2();
1463    }
1464    private static void jj_la1_init_0() {
1465       jj_la1_0 = new int[] {0x11000000,0x11000000,0x11000000,0x11000000,0xf9400000,0xf9400000,0xf9400000,0x0,0x0,0x0,0x0,0x0,0x0,0xf9400000,0xf9400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
1466    }
1467    private static void jj_la1_init_1() {
1468       jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x7,0x1,0x1,0x6,0x10,0x6,0x6,0x400000,0x4000000,0x7,0x7,0x28000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x10000,0x10000,0xc0000,0xc0000,0x0,};
1469    }
1470    private static void jj_la1_init_2() {
1471       jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x6000,0x0,0x21c,0x21c,0x500,0x5c,0x5c,0xa0,0x3,0x1c,0x1000,0x0,0x0,0x0,0x0,0x0,0x2000,};
1472    }
1473   final private JJCalls[] jj_2_rtns = new JJCalls[2];
1474   private boolean jj_rescan = false;
1475   private int jj_gc = 0;
1476 
1477   /** Constructor with user supplied CharStream. */
1478   public JspParser(CharStream stream) {
1479     token_source = new JspParserTokenManager(stream);
1480     token = new Token();
1481     jj_ntk = -1;
1482     jj_gen = 0;
1483     for (int i = 0; i < 31; i++) jj_la1[i] = -1;
1484     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
1485   }
1486 
1487   /** Reinitialise. */
1488   public void ReInit(CharStream stream) {
1489     token_source.ReInit(stream);
1490     token = new Token();
1491     jj_ntk = -1;
1492     jjtree.reset();
1493     jj_gen = 0;
1494     for (int i = 0; i < 31; i++) jj_la1[i] = -1;
1495     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
1496   }
1497 
1498   /** Constructor with generated Token Manager. */
1499   public JspParser(JspParserTokenManager tm) {
1500     token_source = tm;
1501     token = new Token();
1502     jj_ntk = -1;
1503     jj_gen = 0;
1504     for (int i = 0; i < 31; i++) jj_la1[i] = -1;
1505     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
1506   }
1507 
1508   /** Reinitialise. */
1509   public void ReInit(JspParserTokenManager tm) {
1510     token_source = tm;
1511     token = new Token();
1512     jj_ntk = -1;
1513     jjtree.reset();
1514     jj_gen = 0;
1515     for (int i = 0; i < 31; i++) jj_la1[i] = -1;
1516     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
1517   }
1518 
1519   private Token jj_consume_token(int kind) throws ParseException {
1520     Token oldToken;
1521     if ((oldToken = token).next != null) token = token.next;
1522     else token = token.next = token_source.getNextToken();
1523     jj_ntk = -1;
1524     if (token.kind == kind) {
1525       jj_gen++;
1526       if (++jj_gc > 100) {
1527         jj_gc = 0;
1528         for (int i = 0; i < jj_2_rtns.length; i++) {
1529           JJCalls c = jj_2_rtns[i];
1530           while (c != null) {
1531             if (c.gen < jj_gen) c.first = null;
1532             c = c.next;
1533           }
1534         }
1535       }
1536       return token;
1537     }
1538     token = oldToken;
1539     jj_kind = kind;
1540     throw generateParseException();
1541   }
1542 
1543   static private final class LookaheadSuccess extends java.lang.Error { }
1544   final private LookaheadSuccess jj_ls = new LookaheadSuccess();
1545   private boolean jj_scan_token(int kind) {
1546     if (jj_scanpos == jj_lastpos) {
1547       jj_la--;
1548       if (jj_scanpos.next == null) {
1549         jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
1550       } else {
1551         jj_lastpos = jj_scanpos = jj_scanpos.next;
1552       }
1553     } else {
1554       jj_scanpos = jj_scanpos.next;
1555     }
1556     if (jj_rescan) {
1557       int i = 0; Token tok = token;
1558       while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
1559       if (tok != null) jj_add_error_token(kind, i);
1560     }
1561     if (jj_scanpos.kind != kind) return true;
1562     if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
1563     return false;
1564   }
1565 
1566 
1567 /** Get the next Token. */
1568   final public Token getNextToken() {
1569     if (token.next != null) token = token.next;
1570     else token = token.next = token_source.getNextToken();
1571     jj_ntk = -1;
1572     jj_gen++;
1573     return token;
1574   }
1575 
1576 /** Get the specific Token. */
1577   final public Token getToken(int index) {
1578     Token t = token;
1579     for (int i = 0; i < index; i++) {
1580       if (t.next != null) t = t.next;
1581       else t = t.next = token_source.getNextToken();
1582     }
1583     return t;
1584   }
1585 
1586   private int jj_ntk() {
1587     if ((jj_nt=token.next) == null)
1588       return (jj_ntk = (token.next=token_source.getNextToken()).kind);
1589     else
1590       return (jj_ntk = jj_nt.kind);
1591   }
1592 
1593   private java.util.List jj_expentries = new java.util.ArrayList();
1594   private int[] jj_expentry;
1595   private int jj_kind = -1;
1596   private int[] jj_lasttokens = new int[100];
1597   private int jj_endpos;
1598 
1599   private void jj_add_error_token(int kind, int pos) {
1600     if (pos >= 100) return;
1601     if (pos == jj_endpos + 1) {
1602       jj_lasttokens[jj_endpos++] = kind;
1603     } else if (jj_endpos != 0) {
1604       jj_expentry = new int[jj_endpos];
1605       for (int i = 0; i < jj_endpos; i++) {
1606         jj_expentry[i] = jj_lasttokens[i];
1607       }
1608       jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) {
1609         int[] oldentry = (int[])(it.next());
1610         if (oldentry.length == jj_expentry.length) {
1611           for (int i = 0; i < jj_expentry.length; i++) {
1612             if (oldentry[i] != jj_expentry[i]) {
1613               continue jj_entries_loop;
1614             }
1615           }
1616           jj_expentries.add(jj_expentry);
1617           break jj_entries_loop;
1618         }
1619       }
1620       if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
1621     }
1622   }
1623 
1624   /** Generate ParseException. */
1625   public ParseException generateParseException() {
1626     jj_expentries.clear();
1627     boolean[] la1tokens = new boolean[79];
1628     if (jj_kind >= 0) {
1629       la1tokens[jj_kind] = true;
1630       jj_kind = -1;
1631     }
1632     for (int i = 0; i < 31; i++) {
1633       if (jj_la1[i] == jj_gen) {
1634         for (int j = 0; j < 32; j++) {
1635           if ((jj_la1_0[i] & (1<<j)) != 0) {
1636             la1tokens[j] = true;
1637           }
1638           if ((jj_la1_1[i] & (1<<j)) != 0) {
1639             la1tokens[32+j] = true;
1640           }
1641           if ((jj_la1_2[i] & (1<<j)) != 0) {
1642             la1tokens[64+j] = true;
1643           }
1644         }
1645       }
1646     }
1647     for (int i = 0; i < 79; i++) {
1648       if (la1tokens[i]) {
1649         jj_expentry = new int[1];
1650         jj_expentry[0] = i;
1651         jj_expentries.add(jj_expentry);
1652       }
1653     }
1654     jj_endpos = 0;
1655     jj_rescan_token();
1656     jj_add_error_token(0, 0);
1657     int[][] exptokseq = new int[jj_expentries.size()][];
1658     for (int i = 0; i < jj_expentries.size(); i++) {
1659       exptokseq[i] = (int[])jj_expentries.get(i);
1660     }
1661     return new ParseException(token, exptokseq, tokenImage);
1662   }
1663 
1664   /** Enable tracing. */
1665   final public void enable_tracing() {
1666   }
1667 
1668   /** Disable tracing. */
1669   final public void disable_tracing() {
1670   }
1671 
1672   private void jj_rescan_token() {
1673     jj_rescan = true;
1674     for (int i = 0; i < 2; i++) {
1675     try {
1676       JJCalls p = jj_2_rtns[i];
1677       do {
1678         if (p.gen > jj_gen) {
1679           jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
1680           switch (i) {
1681             case 0: jj_3_1(); break;
1682             case 1: jj_3_2(); break;
1683           }
1684         }
1685         p = p.next;
1686       } while (p != null);
1687       } catch(LookaheadSuccess ls) { }
1688     }
1689     jj_rescan = false;
1690   }
1691 
1692   private void jj_save(int index, int xla) {
1693     JJCalls p = jj_2_rtns[index];
1694     while (p.gen > jj_gen) {
1695       if (p.next == null) { p = p.next = new JJCalls(); break; }
1696       p = p.next;
1697     }
1698     p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
1699   }
1700 
1701   static final class JJCalls {
1702     int gen;
1703     Token first;
1704     int arg;
1705     JJCalls next;
1706   }
1707 
1708 }