0001 /* Copyright (c) 2006, Sun Microsystems, Inc.
0002  * All rights reserved.
0003  *
0004  * Redistribution and use in source and binary forms, with or without
0005  * modification, are permitted provided that the following conditions are met:
0006  *
0007  *     * Redistributions of source code must retain the above copyright notice,
0008  *       this list of conditions and the following disclaimer.
0009  *     * Redistributions in binary form must reproduce the above copyright
0010  *       notice, this list of conditions and the following disclaimer in the
0011  *       documentation and/or other materials provided with the distribution.
0012  *     * Neither the name of the Sun Microsystems, Inc. nor the names of its
0013  *       contributors may be used to endorse or promote products derived from
0014  *       this software without specific prior written permission.
0015  *
0016  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
0017  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0018  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0019  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
0020  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
0021  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
0022  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0023  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
0024  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
0025  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
0026  * THE POSSIBILITY OF SUCH DAMAGE.
0027  */
0028 
0029 /*
0030  * Modified by Jianjun Liu for JavaDoq (last modified 2011/09/10)
0031  */
0032 
0033 /*
0034  *  JavaDoq 1.0 - DOCUment JAVA In Source
0035  *  Copyright (C) 2008-2011  J.J.Liu<jianjunliu@126.com> <http://www.javadoq.com>
0036  *  
0037  *  This program is free software: you can redistribute it and/or modify
0038  *  it under the terms of the GNU Affero General Public License as published by
0039  *  the Free Software Foundation, either version 3 of the License, or
0040  *  (at your option) any later version.
0041  *  
0042  *  This program is distributed in the hope that it will be useful,
0043  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0044  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0045  *  GNU Affero General Public License for more details.
0046  *  
0047  *  You should have received a copy of the GNU Affero General Public License
0048  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
0049  */
0050 
0051 options {
0052   JDK_VERSION = "1.5";
0053   JAVA_UNICODE_ESCAPE = true;
0054   MULTI = true;
0055   NODE_CLASS = "ASTNode";
0056   NODE_DEFAULT_VOID = true;
0057   NODE_SCOPE_HOOK = true;
0058   NODE_USES_PARSER = true;
0059   STATIC = false;
0060   TOKEN_EXTENDS = "AbstractToken";
0061   UNICODE_INPUT = true;
0062   VISITOR = true;
0063 }
0064 
0065 PARSER_BEGIN(JJTreeParser)
0066 
0067 package com.javadoq.jjtree;
0068 
0069 public class JJTreeParser {
0070 
0071     void jjtreeOpenNodeScope(Node n) {
0072         ((ASTNode)n).firstToken = getToken(1);
0073     }
0074 
0075     void jjtreeCloseNodeScope(Node n) {
0076         ((ASTNode)n).lastToken = getToken(0);
0077     }
0078 
0079 
0080   /**
0081    * Returns true if the next token is not in the FOLLOW list of "expansion".
0082    * It is used to decide when the end of an "expansion" has been reached.
0083    */
0084   private boolean notTailOfExpansionUnit() {
0085     Token t;
0086     t = getToken(1);
0087     if (t.kind == BIT_OR || t.kind == COMMA || t.kind == RPAREN || t.kind == RBRACE || t.kind == RBRACKET) return false;
0088     return true;
0089   }
0090 
0091 }
0092 
0093 PARSER_END(JJTreeParser)
0094 
0095 
0096 /**********************************************
0097  * THE JAVACC TOKEN SPECIFICATION STARTS HERE *
0098  **********************************************/
0099 
0100 /* JAVACC RESERVED WORDS: These are the only tokens in JavaCC but not in Java */
0101 
0102 TOKEN :
0103 {
0104 //  Options is no longer a reserved word (Issue 126)
0105 //  < _OPTIONS: "options" >
0106   < _LOOKAHEAD: "LOOKAHEAD" >
0107 | < _IGNORE_CASE: "IGNORE_CASE" >
0108 | < _PARSER_BEGIN: "PARSER_BEGIN" >
0109 | < _PARSER_END: "PARSER_END" >
0110 | < _JAVACODE: "JAVACODE" >
0111 | < _TOKEN: "TOKEN" >
0112 | < _SPECIAL_TOKEN: "SPECIAL_TOKEN" >
0113 | < _MORE: "MORE" >
0114 | < _SKIP: "SKIP" >
0115 | < _TOKEN_MGR_DECLS: "TOKEN_MGR_DECLS" >
0116 | < _EOF: "EOF" >
0117 }
0118 
0119 /*
0120  * The remainder of the tokens are exactly (except for the removal of tokens
0121  * containing ">>" and "<<") as in the Java grammar and must be diff equivalent
0122  * (again with the exceptions above) to it.
0123  */
0124 
0125 /* WHITE SPACE */
0126 
0127 SPECIAL_TOKEN :
0128 {
0129   " "
0130 | "\t"
0131 | "\n"
0132 | "\r"
0133 | "\f"
0134 }
0135 
0136 /* COMMENTS */
0137 
0138 MORE :
0139 {
0140   "//" : IN_SINGLE_LINE_COMMENT
0141 |
0142   <"/**" ~["/"]> { input_stream.backup(1); } : IN_FORMAL_COMMENT
0143 |
0144   "/*" : IN_MULTI_LINE_COMMENT
0145 }
0146 
0147 
0148 <IN_SINGLE_LINE_COMMENT>
0149 SPECIAL_TOKEN :
0150 {
0151   <SINGLE_LINE_COMMENT: "\n" | "\r" | "\r\n" > : DEFAULT
0152 }
0153 
0154 <IN_FORMAL_COMMENT>
0155 SPECIAL_TOKEN :
0156 {
0157   <FORMAL_COMMENT: "*/" > : DEFAULT
0158 }
0159 
0160 <IN_MULTI_LINE_COMMENT>
0161 SPECIAL_TOKEN :
0162 {
0163   <MULTI_LINE_COMMENT: "*/" > : DEFAULT
0164 }
0165 
0166 <IN_SINGLE_LINE_COMMENT,IN_FORMAL_COMMENT,IN_MULTI_LINE_COMMENT>
0167 MORE :
0168 {
0169   < ~[] >
0170 }
0171 
0172 /* JAVA RESERVED WORDS AND LITERALS */
0173 
0174 TOKEN :
0175 {
0176   < ABSTRACT: "abstract" >
0177 | < BOOLEAN: "boolean" >
0178 | < BREAK: "break" >
0179 | < BYTE: "byte" >
0180 | < CASE: "case" >
0181 | < CATCH: "catch" >
0182 | < CHAR: "char" >
0183 | < CLASS: "class" >
0184 | < CONST: "const" >
0185 | < CONTINUE: "continue" >
0186 | < _DEFAULT: "default" >
0187 | < DO: "do" >
0188 | < DOUBLE: "double" >
0189 | < ELSE: "else" >
0190 | < EXTENDS: "extends" >
0191 | < FALSE: "false" >
0192 | < FINAL: "final" >
0193 | < FINALLY: "finally" >
0194 | < FLOAT: "float" >
0195 | < FOR: "for" >
0196 | < GOTO: "goto" >
0197 | < IF: "if" >
0198 | < IMPLEMENTS: "implements" >
0199 | < IMPORT: "import" >
0200 | < INSTANCEOF: "instanceof" >
0201 | < INT: "int" >
0202 | < INTERFACE: "interface" >
0203 | < LONG: "long" >
0204 | < NATIVE: "native" >
0205 | < NEW: "new" >
0206 | < NULL: "null" >
0207 | < PACKAGE: "package">
0208 | < PRIVATE: "private" >
0209 | < PROTECTED: "protected" >
0210 | < PUBLIC: "public" >
0211 | < RETURN: "return" >
0212 | < SHORT: "short" >
0213 | < STATIC: "static" >
0214 | < STRICTFP: "strictfp" >
0215 | < SUPER: "super" >
0216 | < SWITCH: "switch" >
0217 | < SYNCHRONIZED: "synchronized" >
0218 | < THIS: "this" >
0219 | < THROW: "throw" >
0220 | < THROWS: "throws" >
0221 | < TRANSIENT: "transient" >
0222 | < TRUE: "true" >
0223 | < TRY: "try" >
0224 | < VOID: "void" >
0225 | < VOLATILE: "volatile" >
0226 | < WHILE: "while" >
0227 }
0228 
0229 /* JAVA LITERALS */
0230 
0231 TOKEN :
0232 {
0233   < INTEGER_LITERAL:
0234         <DECIMAL_LITERAL> (["l","L"])?
0235       | <HEX_LITERAL> (["l","L"])?
0236       | <OCTAL_LITERAL> (["l","L"])?
0237   >
0238 |
0239   < #DECIMAL_LITERAL: ["1"-"9"] (["0"-"9"])* >
0240 |
0241   < #HEX_LITERAL: "0" ["x","X"] (["0"-"9","a"-"f","A"-"F"])+ >
0242 |
0243   < #OCTAL_LITERAL: "0" (["0"-"7"])* >
0244 |
0245   < FLOATING_POINT_LITERAL:
0246         <DECIMAL_FLOATING_POINT_LITERAL>
0247       | <HEXADECIMAL_FLOATING_POINT_LITERAL>
0248   >
0249 |
0250   < #DECIMAL_FLOATING_POINT_LITERAL:
0251         (["0"-"9"])+ "." (["0"-"9"])* (<DECIMAL_EXPONENT>)? (["f","F","d","D"])?
0252       | "." (["0"-"9"])+ (<DECIMAL_EXPONENT>)? (["f","F","d","D"])?
0253       | (["0"-"9"])+ <DECIMAL_EXPONENT> (["f","F","d","D"])?
0254       | (["0"-"9"])+ (<DECIMAL_EXPONENT>)? ["f","F","d","D"]
0255   >
0256 |
0257   < #DECIMAL_EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ >
0258 |
0259   < #HEXADECIMAL_FLOATING_POINT_LITERAL:
0260         "0" ["x", "X"] (["0"-"9","a"-"f","A"-"F"])+ (".")? <HEXADECIMAL_EXPONENT> (["f","F","d","D"])?
0261       | "0" ["x", "X"] (["0"-"9","a"-"f","A"-"F"])* "." (["0"-"9","a"-"f","A"-"F"])+ <HEXADECIMAL_EXPONENT> (["f","F","d","D"])?
0262   >
0263 |
0264   < #HEXADECIMAL_EXPONENT: ["p","P"] (["+","-"])? (["0"-"9"])+ >
0265 |
0266   < CHARACTER_LITERAL:
0267       "'"
0268       (   (~["'","\\","\n","\r"])
0269         | ("\\"
0270             ( ["n","t","b","r","f","\\","'","\""]
0271             | ["0"-"7"] ( ["0"-"7"] )?
0272             | ["0"-"3"] ["0"-"7"] ["0"-"7"]
0273             )
0274           )
0275       )
0276       "'"
0277   >
0278 |
0279   < STRING_LITERAL:
0280       "\""
0281       (   (~["\"","\\","\n","\r"])
0282         | ("\\"
0283             ( ["n","t","b","r","f","\\","'","\""]
0284             | ["0"-"7"] ( ["0"-"7"] )?
0285             | ["0"-"3"] ["0"-"7"] ["0"-"7"]
0286             )
0287           )
0288       )*
0289       "\""
0290   >
0291 }
0292 
0293 /* SEPARATORS */
0294 
0295 TOKEN :
0296 {
0297   < LPAREN: "(" >
0298 | < RPAREN: ")" >
0299 | < LBRACE: "{" >
0300 | < RBRACE: "}" >
0301 | < LBRACKET: "[" >
0302 | < RBRACKET: "]" >
0303 | < SEMICOLON: ";" >
0304 | < COMMA: "," >
0305 | < DOT: "." >
0306 | < AT: "@" >
0307 }
0308 
0309 /* OPERATORS */
0310 
0311 TOKEN :
0312 {
0313   < ASSIGN: "=" >
0314 //| < GT: ">" >
0315 | < LT: "<" >
0316 | < BANG: "!" >
0317 | < TILDE: "~" >
0318 | < HOOK: "?" >
0319 | < COLON: ":" >
0320 | < EQ: "==" >
0321 | < LE: "<=" >
0322 | < GE: ">=" >
0323 | < NE: "!=" >
0324 | < SC_OR: "||" >
0325 | < SC_AND: "&&" >
0326 | < INCR: "++" >
0327 | < DECR: "--" >
0328 | < PLUS: "+" >
0329 | < MINUS: "-" >
0330 | < STAR: "*" >
0331 | < SLASH: "/" >
0332 | < BIT_AND: "&" >
0333 | < BIT_OR: "|" >
0334 | < XOR: "^" >
0335 | < REM: "%" >
0336 //  | < LSHIFT: "<<" >
0337 //  | < RSIGNEDSHIFT: ">>" >
0338 //  | < RUNSIGNEDSHIFT: ">>>" >
0339 | < PLUSASSIGN: "+=" >
0340 | < MINUSASSIGN: "-=" >
0341 | < STARASSIGN: "*=" >
0342 | < SLASHASSIGN: "/=" >
0343 | < ANDASSIGN: "&=" >
0344 | < ORASSIGN: "|=" >
0345 | < XORASSIGN: "^=" >
0346 | < REMASSIGN: "%=" >
0347 //  | < LSHIFTASSIGN: "<<=" >
0348 //  | < RSIGNEDSHIFTASSIGN: ">>=" >
0349 //  | < RUNSIGNEDSHIFTASSIGN: ">>>=" >
0350 | < ELLIPSIS: "..." >
0351 }
0352 
0353 
0354 /* >'s need special attention due to generics syntax. */
0355 TOKEN :
0356 {
0357   < RUNSIGNEDSHIFT: ">>>" >
0358   {
0359      matchedToken.kind = GT;
0360      matchedToken.realKind = RUNSIGNEDSHIFT;
0361      input_stream.backup(2);
0362      matchedToken.image = ">";
0363   }
0364 | < RSIGNEDSHIFT: ">>" >
0365   {
0366      matchedToken.kind = GT;
0367      matchedToken.realKind = RSIGNEDSHIFT;
0368      input_stream.backup(1);
0369      matchedToken.image = ">";
0370   }
0371 | < GT: ">" >
0372 }
0373 
0374 
0375 /************************************************
0376  * THE JAVACC GRAMMAR SPECIFICATION STARTS HERE *
0377  ************************************************/
0378 
0379 ASTGrammar javacc_input() #Grammar :
0380 {}
0381 {
0382   javacc_options()
0383   (
0384     "PARSER_BEGIN" "(" identifier() ")"
0385     CompilationUnit()
0386     "PARSER_END" "(" identifier() ")"
0387   )
0388   (
0389     ( production() )+
0390   )
0391   <EOF>
0392   {
0393     return jjtThis;
0394   }
0395 }
0396 
0397 void javacc_options() :
0398 {}
0399 {
0400   [ LOOKAHEAD( { getToken(1).image.equals("options") }) ( <IDENTIFIER> "{" ( option_binding() )* "}" ) ]
0401 }
0402 
0403 void option_binding() :
0404 {}
0405 {
0406   ( <IDENTIFIER> | "LOOKAHEAD" | "IGNORE_CASE" | "static" )
0407   "="
0408   (
0409      IntegerLiteral()
0410    | BooleanLiteral()
0411    | StringLiteral()
0412   ) ";"
0413 }
0414 
0415 void production() :
0416 {}
0417 {
0418   LOOKAHEAD(1)
0419   /*
0420    * Since JAVACODE is both a JavaCC reserved word and a Java identifier,
0421    * we need to give preference to "javacode_production" over
0422    * "bnf_production".
0423    */
0424   javacode_production()
0425 |
0426   LOOKAHEAD(1)
0427   /*
0428    * Since SKIP, TOKEN, etc. are both JavaCC reserved words and Java
0429    * identifiers, we need to give preference to "regular_expression_production"
0430    * over "bnf_production".
0431    */
0432   regular_expr_production()
0433 |
0434   LOOKAHEAD(1)
0435   /*
0436    * Since TOKEN_MGR_DECLS is both a JavaCC reserved word and a Java identifier,
0437    * we need to give preference to "token_manager_decls" over
0438    * "bnf_production".
0439    */
0440   token_manager_decls()
0441 |
0442   bnf_production()
0443 }
0444 
0445 void javacode_production() :
0446 {}
0447 {
0448   "JAVACODE"
0449   AccessModifier() ResultType() identifier() FormalParameters()
0450     [
0451       "throws" Name()
0452       ( "," Name()
0453       )*
0454     ]
0455     [ node_descriptor() ]
0456 
0457     // This is really a Block()
0458     "{"
0459     (
0460       ( BlockStatement() )*
0461     )
0462     "}"
0463 }
0464 
0465 void bnf_production() :
0466 {}
0467 {
0468   AccessModifier() ResultType() identifier() FormalParameters()
0469   [
0470     "throws" Name()
0471     ( "," Name()
0472     )*
0473   ]
0474   [ node_descriptor() ]
0475   ":"
0476 
0477   // This is really a Block()
0478   "{"
0479   (
0480     ( BlockStatement() )*
0481   )
0482   "}"
0483 
0484   "{"
0485   (
0486     expansion_choices()
0487   )
0488  "}"
0489 }
0490 
0491 void AccessModifier() :
0492 {}
0493 {
0494     ( "public" | "protected" | "private" )?
0495 }
0496 
0497 void regular_expr_production() :
0498 {}
0499 {
0500   [
0501     LOOKAHEAD(2) "<" "*" ">"
0502   |
0503     "<" <IDENTIFIER> ( "," <IDENTIFIER> )* ">"
0504   ]
0505   regexpr_kind() [ "[" "IGNORE_CASE" "]" ] ":"
0506   "{" regexpr_spec() ( "|" regexpr_spec() )* "}"
0507 }
0508 
0509 void token_manager_decls() :
0510 {}
0511 {
0512   "TOKEN_MGR_DECLS" ":" ClassOrInterfaceBody(false)
0513 }
0514 
0515 void regexpr_kind() :
0516 {}
0517 {
0518   "TOKEN"
0519 |
0520   "SPECIAL_TOKEN"
0521 |
0522   "SKIP"
0523 |
0524   "MORE"
0525 }
0526 
0527 void regexpr_spec() :
0528 {}
0529 {
0530   regular_expression() [ Block() ] [ ":" <IDENTIFIER> ]
0531 }
0532 
0533 void expansion_choices() :
0534 {}
0535 {
0536   expansion() ( "|" expansion() )*
0537 }
0538 
0539 void expansion() :
0540 {}
0541 {
0542   (
0543     LOOKAHEAD(1)
0544     ( "LOOKAHEAD" "(" local_lookahead() ")" )
0545   )?
0546   (
0547    LOOKAHEAD(0, { notTailOfExpansionUnit() } )
0548    (
0549      expansion_unit()
0550      [ node_descriptor() ]
0551    )
0552   )+
0553 }
0554 
0555 void local_lookahead() :
0556 {
0557   boolean commaAtEnd = false, emptyLA = true;
0558 }
0559 {
0560   [
0561     /*
0562      * The lookahead of 1 is to turn off the warning message that lets
0563      * us know that an expansion choice can also start with an integer
0564      * literal because a primary expression can do the same.  But we
0565      * know that this is what we want.
0566      */
0567     LOOKAHEAD(1)
0568     IntegerLiteral()
0569     {
0570       emptyLA = false;
0571     }
0572   ]
0573   [ LOOKAHEAD(0, { !emptyLA && (getToken(1).kind != RPAREN) } )
0574     ","
0575     {
0576       commaAtEnd = true;
0577     }
0578   ]
0579   [ LOOKAHEAD(0, { getToken(1).kind != RPAREN && getToken(1).kind != LBRACE } )
0580     expansion_choices()
0581     {
0582       emptyLA = false; commaAtEnd = false;
0583     }
0584   ]
0585   [ LOOKAHEAD(0, { !emptyLA && !commaAtEnd && (getToken(1).kind != RPAREN) } )
0586     ","
0587     {
0588       commaAtEnd = true;
0589     }
0590   ]
0591   [ LOOKAHEAD(0, { emptyLA || commaAtEnd } )
0592     "{" Expression() "}"
0593   ]
0594 }
0595 
0596 void expansion_unit() :
0597 {}
0598 {
0599 (
0600   LOOKAHEAD(1)
0601   /*
0602    * We give this priority over primary expressions which use LOOKAHEAD as the
0603    * name of its identifier.
0604    */
0605   (
0606     "LOOKAHEAD" "(" local_lookahead() ")"
0607   )
0608 |
0609   Block()
0610 |
0611   (
0612     "[" expansion_choices() "]"
0613   )
0614 |
0615   (
0616     "try" "{" expansion_choices() "}"
0617     ( "catch" "(" Name() <IDENTIFIER> ")" Block() )*
0618     [ "finally" Block() ]
0619   )
0620 |
0621   LOOKAHEAD( identifier() | StringLiteral() | "<" | PrimaryExpression() "=" )
0622 (
0623   [
0624     LOOKAHEAD(PrimaryExpression() "=")
0625     PrimaryExpression() "="
0626   ]
0627   (
0628     regular_expression() [ "." <IDENTIFIER>  ]
0629   | ( identifier() Arguments() )
0630   )
0631     
0632 )
0633 |
0634   "(" expansion_choices() ")"
0635   (
0636     "+"
0637   |
0638     "*"
0639   |
0640     "?"
0641   |
0642     {}
0643   )
0644 )
0645 }
0646 
0647 void regular_expression() :
0648 {}
0649 {
0650   StringLiteral()
0651 |
0652   LOOKAHEAD(3)
0653   (
0654     "<" [ [ "#" ] identifier() ":" ] complex_regular_expression_choices() ">"
0655   )
0656 |
0657   LOOKAHEAD(2)
0658   (
0659     "<" identifier() ">"
0660   )
0661 |
0662   (
0663     "<" "EOF" ">"
0664   )
0665 }
0666 
0667 void complex_regular_expression_choices() :
0668 {}
0669 {
0670   complex_regular_expression() ( "|" complex_regular_expression() )*
0671 }
0672 
0673 void complex_regular_expression() :
0674 {}
0675 {
0676   ( complex_regular_expression_unit() )+
0677 }
0678 
0679 void complex_regular_expression_unit() :
0680 {}
0681 {
0682   StringLiteral()
0683 |
0684   ( "<" identifier() ">" )
0685 |
0686   character_list()
0687 |
0688   "(" complex_regular_expression_choices() ")"
0689   (
0690     "+"
0691   |
0692     "*"
0693   |
0694     "?"
0695   |  "{" IntegerLiteral() [ ","  [ IntegerLiteral() ] ] "}"
0696   |
0697     {}
0698   )
0699 }
0700 
0701 void character_list() :
0702 {}
0703 {
0704   [ "~" ] "[" [ character_descriptor() ( "," character_descriptor() )* ] "]"
0705 }
0706 
0707 void character_descriptor() :
0708 {}
0709 {
0710   StringLiteral() [ "-" StringLiteral() ]
0711 }
0712 
0713 Token identifier() :
0714 {
0715   Token t;
0716 }
0717 {
0718   t=<IDENTIFIER>
0719   {
0720       return t;
0721   }
0722 }
0723 
0724 
0725 /**********************************************
0726  * THE JJTREE PRODUCTIONS START HERE          *
0727  **********************************************/
0728 
0729 void node_descriptor() :
0730 {}
0731 {
0732   "#"
0733   (
0734     Name() | <VOID>
0735   )
0736   [
0737    LOOKAHEAD(1)
0738    "("
0739       [ ">" ]
0740       node_descriptor_expression()
0741    ")"
0742   ]
0743 }
0744 
0745 
0746 JAVACODE
0747 void node_descriptor_expression()
0748 {
0749   Token tok;
0750   int nesting = 1;
0751   while (true) {
0752     tok = getToken(1);
0753     if (tok.kind == 0) {
0754       throw new ParseException();
0755     }
0756     if (tok.kind == LPAREN) nesting++;
0757     if (tok.kind == RPAREN) {
0758       nesting--;
0759       if (nesting == 0) break;
0760     }
0761     tok = getNextToken();
0762   }
0763 }
0764 
0765 
0766 /**********************************************
0767  * THE JAVA GRAMMAR SPECIFICATION STARTS HERE *
0768  **********************************************/
0769 
0770 /*
0771  * The Java grammar is modified to use sequences of tokens
0772  * for the missing tokens - those that include "<<" and ">>".
0773  */
0774 
0775 /*
0776  * The following production defines Java identifiers - it
0777  * includes the reserved words of JavaCC also.
0778  */
0779 
0780 String JavaIdentifier() :
0781 {}
0782 {
0783 (  <IDENTIFIER>
0784 | "LOOKAHEAD"
0785 | "IGNORE_CASE"
0786 | "PARSER_BEGIN"
0787 | "PARSER_END"
0788 | "JAVACODE"
0789 | "TOKEN"
0790 | "SPECIAL_TOKEN"
0791 | "MORE"
0792 | "SKIP"
0793 | "TOKEN_MGR_DECLS"
0794 | "EOF"
0795 )
0796   {
0797           return token.image;
0798   }
0799 }
0800 
0801 /*
0802  * Program structuring syntax follows.
0803  */
0804 
0805 ASTCompilationUnit CompilationUnit() #CompilationUnit :
0806 {String s = "";}
0807 {
0808   [ LOOKAHEAD( ( Annotation() )* "package" ) s=PackageDeclaration() ]
0809   ( ImportDeclaration() )*
0810   ( TypeDeclaration() )*
0811   {
0812     jjtThis.packageName = s;
0813     return jjtThis;
0814   }
0815 }
0816 
0817 String PackageDeclaration() :
0818 {
0819   String s=null;
0820 }
0821 {
0822   Modifiers() "package" s=PackageName() ";"
0823   {
0824     return s;
0825   }
0826 }
0827 
0828 String PackageName() #PackageName :
0829 /*
0830  * A lookahead of 2 is required below since "Name" can be followed
0831  * by a ".*" when used in the context of an "ImportDeclaration".
0832  */
0833 {
0834   String s, ss;
0835 }
0836 {
0837   s=JavaIdentifier()
0838   ( LOOKAHEAD(2) "." ss=JavaIdentifier() { s += "." + ss; } )*
0839         {
0840           return jjtThis.text = s;
0841         }
0842 }
0843 
0844 void ImportDeclaration() :
0845 {
0846     String s = "";
0847 }
0848 {
0849   "import" [ "static" ] s = ImportName() ";"
0850 }
0851 
0852 String ImportName() #ImportName:
0853 /*
0854  * A lookahead of 2 is required below since "Name" can be followed
0855  * by a ".*" when used in the context of an "ImportDeclaration".
0856  */
0857 {
0858   Token t1=null,t2=null;
0859   String s, ss;
0860 }
0861 {
0862   s=JavaIdentifier()
0863   ( LOOKAHEAD(2) "." ss=JavaIdentifier() { s += "." + ss; } )*
0864   [ t1="." t2="*" ]
0865         {
0866           if (t1!= null) s += t1.image + t2.image;
0867           return jjtThis.text = s;
0868         }
0869 }
0870 
0871 /*
0872  * Modifiers. We match all modifiers in a single rule to reduce the chances of
0873  * syntax errors for simple modifier mistakes. It will also enable us to give
0874  * better error messages.
0875  */
0876 
0877 void Modifiers():
0878 {}
0879 {
0880  (
0881   LOOKAHEAD(2)
0882   (
0883    "public"
0884   |
0885    "static"
0886   |
0887    "protected"
0888   |
0889    "private"
0890   |
0891    "final"
0892   |
0893    "abstract"
0894   |
0895    "synchronized"
0896   |
0897    "native"
0898   |
0899    "transient"
0900   |
0901    "volatile"
0902   |
0903    "strictfp"
0904   |
0905    Annotation()
0906   )
0907  )*
0908 }
0909 
0910 /*
0911  * Declaration syntax follows.
0912  */
0913 void TypeDeclaration():
0914 {
0915    ;
0916 }
0917 {
0918   ";"
0919 |
0920   Modifiers()
0921   (
0922      ClassOrInterfaceDeclaration()
0923    |
0924      EnumDeclaration()
0925    |
0926      AnnotationTypeDeclaration()
0927   )
0928 }
0929 
0930 
0931 String NewName() #NewName :
0932 /*
0933  * A lookahead of 2 is required below since "Name" can be followed
0934  * by a ".*" when used in the context of an "ImportDeclaration".
0935  */
0936 {
0937   String s, ss;
0938 }
0939 {
0940   s=JavaIdentifier()
0941   ( LOOKAHEAD(2) "." ss=JavaIdentifier() { s += "." + ss; } )*
0942         {
0943           return jjtThis.text = s;
0944         }
0945 }
0946 
0947 void ClassOrInterfaceDeclaration() #NewType:
0948 {
0949   boolean isInterface = false;
0950   String name;
0951 }
0952 {
0953   ( "class" | "interface" { isInterface = true; } )
0954   name = NewName() { jjtThis.name = name; }
0955   [ TypeParameters() ]
0956   [ ExtendsList(isInterface) ]
0957   [ ImplementsList(isInterface) ]
0958   ClassOrInterfaceBody(isInterface)
0959 }
0960 
0961 void ExtendsList(boolean isInterface) #SuperList:
0962 {
0963    boolean extendsMoreThanOne = false;
0964    String s;
0965 }
0966 {
0967    "extends" s = ClassOrInterfaceType() { jjtThis.list.add(s);}
0968    ( "," s = ClassOrInterfaceType() { extendsMoreThanOne = true; jjtThis.list.add(s); } )*
0969    {
0970       if (extendsMoreThanOne && !isInterface)
0971          throw new ParseException("A class cannot extend more than one other class");
0972    }
0973 }
0974 
0975 void ImplementsList(boolean isInterface) #SuperList:
0976 {
0977    String s;
0978 }
0979 {
0980    "implements" s = ClassOrInterfaceType() { jjtThis.list.add(s);}
0981    ( "," s = ClassOrInterfaceType() { jjtThis.list.add(s);} )*
0982    {
0983       if (isInterface)
0984          throw new ParseException("An interface cannot implement other interfaces");
0985    }
0986 }
0987 
0988 void EnumDeclaration() #NewType :
0989 { String name; }
0990 {
0991   "enum" name = NewName() { jjtThis.name = name; }
0992   [ ImplementsList(false) ]
0993   EnumBody()
0994 }
0995 
0996 void EnumBody():
0997 {}
0998 {
0999    "{"
1000    [ EnumConstant() ( LOOKAHEAD(2) "," EnumConstant() )* ]
1001    [ "," ]
1002    [ ";" ( ClassOrInterfaceBodyDeclaration(false) )* ]
1003    "}"
1004 }
1005 
1006 void EnumConstant():
1007 {}
1008 {
1009   Modifiers() JavaIdentifier() [ Arguments() ] [ ClassOrInterfaceBody(false) ]
1010 }
1011 
1012 void TypeParameters():
1013 {}
1014 {
1015    "<" TypeParameter() ( "," TypeParameter() )* ">"
1016 }
1017 
1018 void TypeParameter():
1019 {}
1020 {
1021    JavaIdentifier() [ TypeBound() ]
1022 }
1023 
1024 void TypeBound():
1025 {}
1026 {
1027    "extends" ClassOrInterfaceType() ( "&" ClassOrInterfaceType() )*
1028 }
1029 
1030 void ClassOrInterfaceBody(boolean isInterface):
1031 /*
1032  * Parsing this fills "tokens" with all tokens of the block
1033  * excluding the braces at each end.
1034  */
1035 {}
1036 {
1037   "{"
1038   ( ClassOrInterfaceBodyDeclaration(isInterface) )*
1039   "}"
1040 }
1041 
1042 void ClassOrInterfaceBodyDeclaration(boolean isInterface):
1043 {
1044    boolean isNestedInterface = false;
1045    int modifiers;
1046 }
1047 {
1048   LOOKAHEAD(2)
1049   Initializer()
1050   {
1051      if (isInterface)
1052         throw new ParseException("An interface cannot have initializers");
1053   }
1054 |
1055   Modifiers() // Just get all the modifiers out of the way. If you want to do
1056               // more checks, pass the modifiers down to the member
1057   (
1058       ClassOrInterfaceDeclaration()
1059     |
1060       EnumDeclaration()
1061     |
1062       LOOKAHEAD( [ TypeParameters() ] JavaIdentifier() "(" )
1063       ConstructorDeclaration()
1064     |
1065       LOOKAHEAD( Type() JavaIdentifier() ( "[" "]" )* ( "," | "=" | ";" ) )
1066       FieldDeclaration()
1067     |
1068       MethodDeclaration()
1069   )
1070 |
1071   ";"
1072 }
1073 
1074 void FieldDeclaration():
1075 {}
1076 {
1077   // Modifiers are already matched in the caller
1078   Type() VariableDeclarator() ( "," VariableDeclarator() )* ";"
1079 }
1080 
1081 void FieldVariableDeclarator():
1082 {}
1083 {
1084   FieldVariableDeclaratorId() [ "=" VariableInitializer() ]
1085 }
1086 
1087 void FieldVariableDeclaratorId():
1088 {}
1089 {
1090   NewName() ( "[" "]" )*
1091 }
1092 
1093 void VariableDeclarator():
1094 {}
1095 {
1096   VariableDeclaratorId() [ "=" VariableInitializer() ]
1097 }
1098 
1099 void VariableDeclaratorId():
1100 {}
1101 {
1102   JavaIdentifier() ( "[" "]" )*
1103 }
1104 
1105 void VariableInitializer():
1106 {}
1107 {
1108   ArrayInitializer()
1109 |
1110   Expression()
1111 }
1112 
1113 void ArrayInitializer():
1114 {}
1115 {
1116   "{" [ VariableInitializer() ( LOOKAHEAD(2) "," VariableInitializer() )* ] [ "," ] "}"
1117 }
1118 
1119 void MethodDeclaration():
1120 {}
1121 {
1122   // Modifiers already matched in the caller!
1123   [ TypeParameters() ]
1124   ResultType()
1125   MethodDeclarator() [ "throws" NameList() ]
1126   ( Block() | ";" )
1127 }
1128 
1129 void MethodDeclarator():
1130 {}
1131 {
1132   NewName() FormalParameters() ( "[" "]" )*
1133 }
1134 
1135 void FormalParameters() :
1136 /*
1137  * Parsing this fills "tokens" with all tokens of the formal
1138  * parameters excluding the parentheses at each end.
1139  */
1140 {}
1141 {
1142   "("
1143   [ FormalParameter() ( "," FormalParameter() )* ]
1144   ")"
1145 }
1146 
1147 void FormalParameter():
1148 {}
1149 {
1150   Modifiers() Type() [ "..." ] VariableDeclaratorId()
1151 }
1152 
1153 void ConstructorDeclaration():
1154 {}
1155 {
1156   [ TypeParameters() ]
1157   // Modifiers matched in the caller
1158   JavaIdentifier() FormalParameters() [ "throws" NameList() ]
1159   "{"
1160     [ LOOKAHEAD(ExplicitConstructorInvocation()) ExplicitConstructorInvocation() ]
1161     ( BlockStatement() )*
1162   "}"
1163 }
1164 
1165 void ExplicitConstructorInvocation():
1166 {}
1167 {
1168   LOOKAHEAD("this" Arguments() ";")
1169   "this" Arguments() ";"
1170 |
1171   [ LOOKAHEAD(2) PrimaryExpression() "." ] "super" Arguments() ";"
1172 }
1173 
1174 void Initializer():
1175 {}
1176 {
1177   [ "static" ] Block()
1178 }
1179 
1180 
1181 /*
1182  * Type, name and expression syntax follows.
1183  */
1184 
1185 void Type():
1186 {}
1187 {
1188    LOOKAHEAD(2) ReferenceType()
1189  |
1190    PrimitiveType()
1191 }
1192 
1193 void ReferenceType():
1194 {}
1195 {
1196    PrimitiveType() ( LOOKAHEAD(2) "[" "]" )+
1197   |
1198    ( ClassOrInterfaceType() ) ( LOOKAHEAD(2) "[" "]" )*
1199 }
1200 
1201 String ClassOrInterfaceType():
1202 {
1203   String s, s1;
1204   StringBuilder sb = new StringBuilder();
1205 }
1206 {
1207   s = Name() [ LOOKAHEAD(2) TypeArguments() ]
1208   ( LOOKAHEAD(2) "." s1 = Name() { sb.append("."); sb.append(s1);}
1209   [ LOOKAHEAD(2) TypeArguments() ] )*
1210   {
1211     return s + sb.toString();
1212   }
1213 }
1214 
1215 void TypeArguments():
1216 {}
1217 {
1218    "<" TypeArgument() ( "," TypeArgument() )* ">"
1219 }
1220 
1221 void TypeArgument():
1222 {}
1223 {
1224    ReferenceType()
1225  |
1226    "?" [ WildcardBounds() ]
1227 }
1228 
1229 void WildcardBounds():
1230 {}
1231 {
1232    "extends" ReferenceType()
1233  |
1234    "super" ReferenceType()
1235 }
1236 
1237 
1238 void PrimitiveType():
1239 {}
1240 {
1241   "boolean"
1242 |
1243   "char"
1244 |
1245   "byte"
1246 |
1247   "short"
1248 |
1249   "int"
1250 |
1251   "long"
1252 |
1253   "float"
1254 |
1255   "double"
1256 }
1257 
1258 
1259 void ResultType() :
1260 {}
1261 {
1262 (
1263   "void"
1264 |
1265   Type()
1266 )
1267 }
1268 
1269 String Name() #Name :
1270 /*
1271  * A lookahead of 2 is required below since "Name" can be followed
1272  * by a ".*" when used in the context of an "ImportDeclaration".
1273  */
1274 {
1275   String s, ss;
1276 }
1277 {
1278   s=JavaIdentifier()
1279   ( LOOKAHEAD(2) "." ss=JavaIdentifier() { s += "." + ss; } )*
1280         {
1281           return jjtThis.text = s;
1282         }
1283 }
1284 
1285 void NameList():
1286 {}
1287 {
1288   Name() ( "," Name() )*
1289 }
1290 
1291 
1292 /*
1293  * Expression syntax follows.
1294  */
1295 
1296 void Expression() :
1297 /*
1298  * This expansion has been written this way instead of:
1299  *   Assignment() | ConditionalExpression()
1300  * for performance reasons.
1301  * However, it is a weakening of the grammar for it allows the LHS of
1302  * assignments to be any conditional expression whereas it can only be
1303  * a primary expression.  Consider adding a semantic predicate to work
1304  * around this.
1305  */
1306 {}
1307 {
1308   ConditionalExpression()
1309   [
1310     LOOKAHEAD(2)
1311     AssignmentOperator() Expression()
1312   ]
1313 }
1314 
1315 
1316 void AssignmentOperator():
1317 {}
1318 {
1319   "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "<<=" | ">>=" | ">>>=" | "&=" | "^=" | "|="
1320 }
1321 
1322 void ConditionalExpression():
1323 {}
1324 {
1325   ConditionalOrExpression() [ "?" Expression() ":" Expression() ]
1326 }
1327 
1328 void ConditionalOrExpression():
1329 {}
1330 {
1331   ConditionalAndExpression() ( "||" ConditionalAndExpression() )*
1332 }
1333 
1334 void ConditionalAndExpression():
1335 {}
1336 {
1337   InclusiveOrExpression() ( "&&" InclusiveOrExpression() )*
1338 }
1339 
1340 void InclusiveOrExpression():
1341 {}
1342 {
1343   ExclusiveOrExpression() ( "|" ExclusiveOrExpression() )*
1344 }
1345 
1346 void ExclusiveOrExpression():
1347 {}
1348 {
1349   AndExpression() ( "^" AndExpression() )*
1350 }
1351 
1352 void AndExpression():
1353 {}
1354 {
1355   EqualityExpression() ( "&" EqualityExpression() )*
1356 }
1357 
1358 void EqualityExpression():
1359 {}
1360 {
1361   InstanceOfExpression() ( ( "==" | "!=" ) InstanceOfExpression() )*
1362 }
1363 
1364 void InstanceOfExpression():
1365 {}
1366 {
1367   RelationalExpression() [ "instanceof" Type() ]
1368 }
1369 
1370 void RelationalExpression():
1371 {}
1372 {
1373   ShiftExpression() ( ( "<" | ">" | "<=" | ">=" ) ShiftExpression() )*
1374 }
1375 
1376 void ShiftExpression():
1377 {}
1378 {
1379   AdditiveExpression() ( ( "<<" | RSIGNEDSHIFT() | RUNSIGNEDSHIFT() ) AdditiveExpression() )*
1380 }
1381 
1382 void AdditiveExpression():
1383 {}
1384 {
1385   MultiplicativeExpression() ( ( "+" | "-" ) MultiplicativeExpression() )*
1386 }
1387 
1388 void MultiplicativeExpression():
1389 {}
1390 {
1391   UnaryExpression() ( ( "*" | "/" | "%" ) UnaryExpression() )*
1392 }
1393 
1394 void UnaryExpression():
1395 {}
1396 {
1397   ( "+" | "-" ) UnaryExpression()
1398 |
1399   PreIncrementExpression()
1400 |
1401   PreDecrementExpression()
1402 |
1403   UnaryExpressionNotPlusMinus()
1404 }
1405 
1406 void PreIncrementExpression():
1407 {}
1408 {
1409   "++" PrimaryExpression()
1410 }
1411 
1412 void PreDecrementExpression():
1413 {}
1414 {
1415   "--" PrimaryExpression()
1416 }
1417 
1418 void UnaryExpressionNotPlusMinus():
1419 {}
1420 {
1421   ( "~" | "!" ) UnaryExpression()
1422 |
1423   LOOKAHEAD( CastLookahead() )
1424   CastExpression()
1425 |
1426   PostfixExpression()
1427 }
1428 
1429 // This production is to determine lookahead only.  The LOOKAHEAD specifications
1430 // below are not used, but they are there just to indicate that we know about
1431 // this.
1432 void CastLookahead():
1433 {}
1434 {
1435   LOOKAHEAD(2)
1436   "(" PrimitiveType()
1437 |
1438   LOOKAHEAD("(" Type() "[")
1439   "(" Type() "[" "]"
1440 |
1441   "(" Type() ")" ( "~" | "!" | "(" | JavaIdentifier() | "this" | "super" | "new" | Literal() )
1442 }
1443 
1444 void PostfixExpression():
1445 {}
1446 {
1447   PrimaryExpression() [ "++" | "--" ]
1448 }
1449 
1450 void CastExpression():
1451 {}
1452 {
1453   LOOKAHEAD("(" PrimitiveType())
1454   "(" Type() ")" UnaryExpression()
1455 |
1456   "(" Type() ")" UnaryExpressionNotPlusMinus()
1457 }
1458 
1459 void PrimaryExpression() :
1460 {}
1461 {
1462   PrimaryPrefix() ( LOOKAHEAD(2) PrimarySuffix() )*
1463 }
1464 
1465 void MemberSelector():
1466 {}
1467 {
1468   "." TypeArguments() JavaIdentifier()
1469 }
1470 
1471 void PrimaryPrefix():
1472 {}
1473 {
1474   Literal()
1475 |
1476   "this"
1477 |
1478   "super" "." JavaIdentifier()
1479 |
1480   "(" Expression() ")"
1481 |
1482   AllocationExpression()
1483 |
1484   LOOKAHEAD( ResultType() "." "class" )
1485   ResultType() "." "class"
1486 |
1487   Name()
1488 }
1489 
1490 void PrimarySuffix():
1491 {}
1492 {
1493   LOOKAHEAD(2)
1494   "." "this"
1495 |
1496   LOOKAHEAD(2)
1497   "." AllocationExpression()
1498 |
1499   LOOKAHEAD(3)
1500   MemberSelector()
1501 |
1502   "[" Expression() "]"
1503 |
1504   "." JavaIdentifier()
1505 |
1506   Arguments()
1507 }
1508 
1509 void Literal():
1510 {}
1511 {
1512   <INTEGER_LITERAL>
1513 |
1514   <FLOATING_POINT_LITERAL>
1515 |
1516   <CHARACTER_LITERAL>
1517 |
1518   <STRING_LITERAL>
1519 |
1520   BooleanLiteral()
1521 |
1522   NullLiteral()
1523 }
1524 
1525 Token IntegerLiteral() :
1526 {
1527   Token t;
1528 }
1529 {
1530   t=<INTEGER_LITERAL>
1531                 {
1532           return t;
1533         }
1534 }
1535 
1536 Token BooleanLiteral() :
1537 {
1538   Token t;
1539 }
1540 {
1541   t="true"
1542                 {
1543           return t;
1544         }
1545 |
1546   t="false"
1547                 {
1548           return t;
1549         }
1550 }
1551 
1552 Token StringLiteral() :
1553 {
1554   Token t;
1555 }
1556 {
1557   t=<STRING_LITERAL>
1558                 {
1559           return t;
1560         }
1561 }
1562 
1563 void NullLiteral() :
1564 {}
1565 {
1566   "null"
1567 }
1568 
1569 void Arguments() :
1570 /*
1571  * Parsing this fills "tokens" with all tokens of the arguments
1572  * excluding the parentheses at each end.
1573 */
1574 {}
1575 {
1576   "("
1577   [ ArgumentList() ]
1578   ")"
1579 }
1580 
1581 void ArgumentList():
1582 {}
1583 {
1584   Expression() ( "," Expression() )*
1585 }
1586 
1587 void AllocationExpression():
1588 {}
1589 {
1590   LOOKAHEAD(2)
1591   "new" PrimitiveType() ArrayDimsAndInits()
1592 |
1593   "new" ClassOrInterfaceType() [ TypeArguments() ]
1594     (
1595       ArrayDimsAndInits()
1596     |
1597       Arguments() [ ClassOrInterfaceBody(false) ]
1598     )
1599 }
1600 
1601 /*
1602  * The third LOOKAHEAD specification below is to parse to PrimarySuffix
1603  * if there is an expression between the "[...]".
1604  */
1605 void ArrayDimsAndInits():
1606 {}
1607 {
1608   LOOKAHEAD(2)
1609   ( LOOKAHEAD(2) "[" Expression() "]" )+ ( LOOKAHEAD(2) "[" "]" )*
1610 |
1611   ( "[" "]" )+ ArrayInitializer()
1612 }
1613 
1614 
1615 /*
1616  * Statement syntax follows.
1617  */
1618 
1619 void Statement():
1620 {}
1621 {
1622   LOOKAHEAD(2)
1623   LabeledStatement()
1624 |
1625   AssertStatement()
1626 |
1627   Block()
1628 |
1629   EmptyStatement()
1630 |
1631   StatementExpression() ";"
1632 |
1633   SwitchStatement()
1634 |
1635   IfStatement()
1636 |
1637   WhileStatement()
1638 |
1639   DoStatement()
1640 |
1641   ForStatement()
1642 |
1643   BreakStatement()
1644 |
1645   ContinueStatement()
1646 |
1647   ReturnStatement()
1648 |
1649   ThrowStatement()
1650 |
1651   SynchronizedStatement()
1652 |
1653   TryStatement()
1654 }
1655 
1656 void AssertStatement():
1657 {}
1658 {
1659   "assert" Expression() [ ":" Expression() ] ";"
1660 }
1661 
1662 void LabeledStatement():
1663 {}
1664 {
1665   JavaIdentifier() ":" Statement()
1666 }
1667 
1668 void Block() :
1669 /*
1670  * Parsing this fills "tokens" with all tokens of the block
1671  * excluding the braces at each end.
1672  */
1673 {}
1674 {
1675   "{"
1676   ( BlockStatement() )*
1677   "}"
1678 }
1679 
1680 void BlockStatement():
1681 {}
1682 {
1683   LOOKAHEAD( Modifiers() Type() JavaIdentifier() )
1684   LocalVariableDeclaration() ";"
1685 |
1686   Statement()
1687 |
1688   ClassOrInterfaceDeclaration( )
1689 }
1690 
1691 void LocalVariableDeclaration():
1692 {}
1693 {
1694   Modifiers() Type() VariableDeclarator() ( "," VariableDeclarator() )*
1695 }
1696 
1697 void EmptyStatement():
1698 {}
1699 {
1700   ";"
1701 }
1702 
1703 void StatementExpression():
1704 /*
1705  * The last expansion of this production accepts more than the legal
1706  * Java expansions for StatementExpression.  This expansion does not
1707  * use PostfixExpression for performance reasons.
1708  */
1709 {}
1710 {
1711   PreIncrementExpression()
1712 |
1713   PreDecrementExpression()
1714 |
1715   PrimaryExpression()
1716   [
1717     "++"
1718   |
1719     "--"
1720   |
1721     AssignmentOperator() Expression()
1722   ]
1723 }
1724 
1725 void SwitchStatement():
1726 {}
1727 {
1728   "switch" "(" Expression() ")" "{"
1729     ( SwitchLabel() ( BlockStatement() )* )*
1730   "}"
1731 }
1732 
1733 void SwitchLabel():
1734 {}
1735 {
1736   "case" Expression() ":"
1737 |
1738   "default" ":"
1739 }
1740 
1741 void IfStatement():
1742 /*
1743  * The disambiguating algorithm of JavaCC automatically binds dangling
1744  * else's to the innermost if statement.  The LOOKAHEAD specification
1745  * is to tell JavaCC that we know what we are doing.
1746  */
1747 {}
1748 {
1749   "if" "(" Expression() ")" Statement() [ LOOKAHEAD(1) "else" Statement() ]
1750 }
1751 
1752 void WhileStatement():
1753 {}
1754 {
1755   "while" "(" Expression() ")" Statement()
1756 }
1757 
1758 void DoStatement():
1759 {}
1760 {
1761   "do" Statement() "while" "(" Expression() ")" ";"
1762 }
1763 
1764 void ForStatement():
1765 {}
1766 {
1767   "for" "("
1768 
1769   (
1770       LOOKAHEAD(Modifiers() Type() JavaIdentifier() ":")
1771       Modifiers() Type() JavaIdentifier() ":" Expression()
1772     |
1773      [ ForInit() ] ";" [ Expression() ] ";" [ ForUpdate() ]
1774   )
1775 
1776   ")" Statement()
1777 }
1778 
1779 void ForInit():
1780 {}
1781 {
1782   LOOKAHEAD( Modifiers() Type() JavaIdentifier() )
1783   LocalVariableDeclaration()
1784 |
1785   StatementExpressionList()
1786 }
1787 
1788 void StatementExpressionList():
1789 {}
1790 {
1791   StatementExpression() ( "," StatementExpression() )*
1792 }
1793 
1794 void ForUpdate():
1795 {}
1796 {
1797   StatementExpressionList()
1798 }
1799 
1800 void BreakStatement():
1801 {}
1802 {
1803   "break" [ JavaIdentifier() ] ";"
1804 }
1805 
1806 void ContinueStatement():
1807 {}
1808 {
1809   "continue" [ JavaIdentifier() ] ";"
1810 }
1811 
1812 void ReturnStatement() :
1813 {}
1814 {
1815   "return" [ Expression() ] ";"
1816 }
1817 
1818 void ThrowStatement() :
1819 {}
1820 {
1821   "throw" Expression() ";"
1822 }
1823 
1824 void SynchronizedStatement():
1825 {}
1826 {
1827   "synchronized" "(" Expression() ")" Block()
1828 }
1829 
1830 void TryStatement():
1831 /*
1832  * Semantic check required here to make sure that at least one
1833  * finally/catch is present.
1834  */
1835 {}
1836 {
1837   "try" Block()
1838   ( "catch" "(" FormalParameter() ")" Block() )*
1839   [ "finally" Block() ]
1840 }
1841 
1842 /* We use productions to match >>>, >> and > so that we can keep the
1843  * type declaration syntax with generics clean
1844  */
1845 
1846 void RUNSIGNEDSHIFT():
1847 {}
1848 {
1849   ( LOOKAHEAD({ getToken(1).kind == GT &&
1850                 getToken(1).realKind == RUNSIGNEDSHIFT} )
1851    ">" ">" ">"
1852   )
1853 }
1854 
1855 void RSIGNEDSHIFT():
1856 {}
1857 {
1858   ( LOOKAHEAD({ getToken(1).kind == GT &&
1859                 getToken(1).realKind == RSIGNEDSHIFT} )
1860   ">" ">"
1861   )
1862 }
1863 
1864 /* Annotation syntax follows. */
1865 
1866 void Annotation():
1867 {}
1868 {
1869    LOOKAHEAD( "@" Name() "(" ( JavaIdentifier() "=" | ")" ))
1870    NormalAnnotation()
1871  |
1872    LOOKAHEAD( "@" Name() "(" )
1873    SingleMemberAnnotation()
1874  |
1875    MarkerAnnotation()
1876 }
1877 
1878 void NormalAnnotation():
1879 {}
1880 {
1881    "@" Name() "(" [ MemberValuePairs() ] ")"
1882 }
1883 
1884 void MarkerAnnotation():
1885 {}
1886 {
1887   "@" Name()
1888 }
1889 
1890 void SingleMemberAnnotation():
1891 {}
1892 {
1893   "@" Name() "(" MemberValue() ")"
1894 }
1895 
1896 void MemberValuePairs():
1897 {}
1898 {
1899    MemberValuePair() ( "," MemberValuePair() )*
1900 }
1901 
1902 void MemberValuePair():
1903 {}
1904 {
1905     JavaIdentifier() "=" MemberValue()
1906 }
1907 
1908 void MemberValue():
1909 {}
1910 {
1911    Annotation()
1912  |
1913    MemberValueArrayInitializer()
1914  |
1915    ConditionalExpression()
1916 }
1917 
1918 void  MemberValueArrayInitializer():
1919 {}
1920 {
1921   "{" MemberValue() ( LOOKAHEAD(2) "," MemberValue() )* [ "," ] "}"
1922 }
1923 
1924 
1925 /* Annotation Types. */
1926 
1927 void AnnotationTypeDeclaration():
1928 {}
1929 {
1930   "@" "interface" JavaIdentifier() AnnotationTypeBody()
1931 }
1932 
1933 void AnnotationTypeBody():
1934 {}
1935 {
1936   "{" ( AnnotationTypeMemberDeclaration() )* "}"
1937 }
1938 
1939 void AnnotationTypeMemberDeclaration():
1940 {}
1941 {
1942  Modifiers()
1943  (
1944    LOOKAHEAD(Type() JavaIdentifier() "(")
1945    Type() JavaIdentifier() "(" ")" [ DefaultValue() ] ";"
1946   |
1947    ClassOrInterfaceDeclaration()
1948   |
1949    EnumDeclaration()
1950   |
1951    AnnotationTypeDeclaration()
1952   |
1953    FieldDeclaration()
1954  )
1955  |
1956    ( ";" )
1957 }
1958 
1959 void DefaultValue():
1960 {}
1961 {
1962   "default" MemberValue()
1963 }
1964 
1965 /* IDENTIFIERS */
1966 
1967 TOKEN :
1968 {
1969   < IDENTIFIER: <LETTER> (<PART_LETTER>)* >
1970 |
1971   < #LETTER:
1972       [  // all chars for which Character.isIdentifierStart is true
1973          "$",
1974          "A"-"Z",
1975          "_",
1976          "a"-"z",
1977          "\u00a2"-"\u00a5",
1978          "\u00aa",
1979          "\u00b5",
1980          "\u00ba",
1981          "\u00c0"-"\u00d6",
1982          "\u00d8"-"\u00f6",
1983          "\u00f8"-"\u021f",
1984          "\u0222"-"\u0233",
1985          "\u0250"-"\u02ad",
1986          "\u02b0"-"\u02b8",
1987          "\u02bb"-"\u02c1",
1988          "\u02d0"-"\u02d1",
1989          "\u02e0"-"\u02e4",
1990          "\u02ee",
1991          "\u037a",
1992          "\u0386",
1993          "\u0388"-"\u038a",
1994          "\u038c",
1995          "\u038e"-"\u03a1",
1996          "\u03a3"-"\u03ce",
1997          "\u03d0"-"\u03d7",
1998          "\u03da"-"\u03f3",
1999          "\u0400"-"\u0481",
2000          "\u048c"-"\u04c4",
2001          "\u04c7"-"\u04c8",
2002          "\u04cb"-"\u04cc",
2003          "\u04d0"-"\u04f5",
2004          "\u04f8"-"\u04f9",
2005          "\u0531"-"\u0556",
2006          "\u0559",
2007          "\u0561"-"\u0587",
2008          "\u05d0"-"\u05ea",
2009          "\u05f0"-"\u05f2",
2010          "\u0621"-"\u063a",
2011          "\u0640"-"\u064a",
2012          "\u0671"-"\u06d3",
2013          "\u06d5",
2014          "\u06e5"-"\u06e6",
2015          "\u06fa"-"\u06fc",
2016          "\u0710",
2017          "\u0712"-"\u072c",
2018          "\u0780"-"\u07a5",
2019          "\u0905"-"\u0939",
2020          "\u093d",
2021          "\u0950",
2022          "\u0958"-"\u0961",
2023          "\u0985"-"\u098c",
2024          "\u098f"-"\u0990",
2025          "\u0993"-"\u09a8",
2026          "\u09aa"-"\u09b0",
2027          "\u09b2",
2028          "\u09b6"-"\u09b9",
2029          "\u09dc"-"\u09dd",
2030          "\u09df"-"\u09e1",
2031          "\u09f0"-"\u09f3",
2032          "\u0a05"-"\u0a0a",
2033          "\u0a0f"-"\u0a10",
2034          "\u0a13"-"\u0a28",
2035          "\u0a2a"-"\u0a30",
2036          "\u0a32"-"\u0a33",
2037          "\u0a35"-"\u0a36",
2038          "\u0a38"-"\u0a39",
2039          "\u0a59"-"\u0a5c",
2040          "\u0a5e",
2041          "\u0a72"-"\u0a74",
2042          "\u0a85"-"\u0a8b",
2043          "\u0a8d",
2044          "\u0a8f"-"\u0a91",
2045          "\u0a93"-"\u0aa8",
2046          "\u0aaa"-"\u0ab0",
2047          "\u0ab2"-"\u0ab3",
2048          "\u0ab5"-"\u0ab9",
2049          "\u0abd",
2050          "\u0ad0",
2051          "\u0ae0",
2052          "\u0b05"-"\u0b0c",
2053          "\u0b0f"-"\u0b10",
2054          "\u0b13"-"\u0b28",
2055          "\u0b2a"-"\u0b30",
2056          "\u0b32"-"\u0b33",
2057          "\u0b36"-"\u0b39",
2058          "\u0b3d",
2059          "\u0b5c"-"\u0b5d",
2060          "\u0b5f"-"\u0b61",
2061          "\u0b85"-"\u0b8a",
2062          "\u0b8e"-"\u0b90",
2063          "\u0b92"-"\u0b95",
2064          "\u0b99"-"\u0b9a",
2065          "\u0b9c",
2066          "\u0b9e"-"\u0b9f",
2067          "\u0ba3"-"\u0ba4",
2068          "\u0ba8"-"\u0baa",
2069          "\u0bae"-"\u0bb5",
2070          "\u0bb7"-"\u0bb9",
2071          "\u0c05"-"\u0c0c",
2072          "\u0c0e"-"\u0c10",
2073          "\u0c12"-"\u0c28",
2074          "\u0c2a"-"\u0c33",
2075          "\u0c35"-"\u0c39",
2076          "\u0c60"-"\u0c61",
2077          "\u0c85"-"\u0c8c",
2078          "\u0c8e"-"\u0c90",
2079          "\u0c92"-"\u0ca8",
2080          "\u0caa"-"\u0cb3",
2081          "\u0cb5"-"\u0cb9",
2082          "\u0cde",
2083          "\u0ce0"-"\u0ce1",
2084          "\u0d05"-"\u0d0c",
2085          "\u0d0e"-"\u0d10",
2086          "\u0d12"-"\u0d28",
2087          "\u0d2a"-"\u0d39",
2088          "\u0d60"-"\u0d61",
2089          "\u0d85"-"\u0d96",
2090          "\u0d9a"-"\u0db1",
2091          "\u0db3"-"\u0dbb",
2092          "\u0dbd",
2093          "\u0dc0"-"\u0dc6",
2094          "\u0e01"-"\u0e30",
2095          "\u0e32"-"\u0e33",
2096          "\u0e3f"-"\u0e46",
2097          "\u0e81"-"\u0e82",
2098          "\u0e84",
2099          "\u0e87"-"\u0e88",
2100          "\u0e8a",
2101          "\u0e8d",
2102          "\u0e94"-"\u0e97",
2103          "\u0e99"-"\u0e9f",
2104          "\u0ea1"-"\u0ea3",
2105          "\u0ea5",
2106          "\u0ea7",
2107          "\u0eaa"-"\u0eab",
2108          "\u0ead"-"\u0eb0",
2109          "\u0eb2"-"\u0eb3",
2110          "\u0ebd",
2111          "\u0ec0"-"\u0ec4",
2112          "\u0ec6",
2113          "\u0edc"-"\u0edd",
2114          "\u0f00",
2115          "\u0f40"-"\u0f47",
2116          "\u0f49"-"\u0f6a",
2117          "\u0f88"-"\u0f8b",
2118          "\u1000"-"\u1021",
2119          "\u1023"-"\u1027",
2120          "\u1029"-"\u102a",
2121          "\u1050"-"\u1055",
2122          "\u10a0"-"\u10c5",
2123          "\u10d0"-"\u10f6",
2124          "\u1100"-"\u1159",
2125          "\u115f"-"\u11a2",
2126          "\u11a8"-"\u11f9",
2127          "\u1200"-"\u1206",
2128          "\u1208"-"\u1246",
2129          "\u1248",
2130          "\u124a"-"\u124d",
2131          "\u1250"-"\u1256",
2132          "\u1258",
2133          "\u125a"-"\u125d",
2134          "\u1260"-"\u1286",
2135          "\u1288",
2136          "\u128a"-"\u128d",
2137          "\u1290"-"\u12ae",
2138          "\u12b0",
2139          "\u12b2"-"\u12b5",
2140          "\u12b8"-"\u12be",
2141          "\u12c0",
2142          "\u12c2"-"\u12c5",
2143          "\u12c8"-"\u12ce",
2144          "\u12d0"-"\u12d6",
2145          "\u12d8"-"\u12ee",
2146          "\u12f0"-"\u130e",
2147          "\u1310",
2148          "\u1312"-"\u1315",
2149          "\u1318"-"\u131e",
2150          "\u1320"-"\u1346",
2151          "\u1348"-"\u135a",
2152          "\u13a0"-"\u13f4",
2153          "\u1401"-"\u166c",
2154          "\u166f"-"\u1676",
2155          "\u1681"-"\u169a",
2156          "\u16a0"-"\u16ea",
2157          "\u1780"-"\u17b3",
2158          "\u17db",
2159          "\u1820"-"\u1877",
2160          "\u1880"-"\u18a8",
2161          "\u1e00"-"\u1e9b",
2162          "\u1ea0"-"\u1ef9",
2163          "\u1f00"-"\u1f15",
2164          "\u1f18"-"\u1f1d",
2165          "\u1f20"-"\u1f45",
2166          "\u1f48"-"\u1f4d",
2167          "\u1f50"-"\u1f57",
2168          "\u1f59",
2169          "\u1f5b",
2170          "\u1f5d",
2171          "\u1f5f"-"\u1f7d",
2172          "\u1f80"-"\u1fb4",
2173          "\u1fb6"-"\u1fbc",
2174          "\u1fbe",
2175          "\u1fc2"-"\u1fc4",
2176          "\u1fc6"-"\u1fcc",
2177          "\u1fd0"-"\u1fd3",
2178          "\u1fd6"-"\u1fdb",
2179          "\u1fe0"-"\u1fec",
2180          "\u1ff2"-"\u1ff4",
2181          "\u1ff6"-"\u1ffc",
2182          "\u203f"-"\u2040",
2183          "\u207f",
2184          "\u20a0"-"\u20af",
2185          "\u2102",
2186          "\u2107",
2187          "\u210a"-"\u2113",
2188          "\u2115",
2189          "\u2119"-"\u211d",
2190          "\u2124",
2191          "\u2126",
2192          "\u2128",
2193          "\u212a"-"\u212d",
2194          "\u212f"-"\u2131",
2195          "\u2133"-"\u2139",
2196          "\u2160"-"\u2183",
2197          "\u3005"-"\u3007",
2198          "\u3021"-"\u3029",
2199          "\u3031"-"\u3035",
2200          "\u3038"-"\u303a",
2201          "\u3041"-"\u3094",
2202          "\u309d"-"\u309e",
2203          "\u30a1"-"\u30fe",
2204          "\u3105"-"\u312c",
2205          "\u3131"-"\u318e",
2206          "\u31a0"-"\u31b7",
2207          "\u3400"-"\u4db5",
2208          "\u4e00"-"\u9fa5",
2209          "\ua000"-"\ua48c",
2210          "\uac00"-"\ud7a3",
2211          "\uf900"-"\ufa2d",
2212          "\ufb00"-"\ufb06",
2213          "\ufb13"-"\ufb17",
2214          "\ufb1d",
2215          "\ufb1f"-"\ufb28",
2216          "\ufb2a"-"\ufb36",
2217          "\ufb38"-"\ufb3c",
2218          "\ufb3e",
2219          "\ufb40"-"\ufb41",
2220          "\ufb43"-"\ufb44",
2221          "\ufb46"-"\ufbb1",
2222          "\ufbd3"-"\ufd3d",
2223          "\ufd50"-"\ufd8f",
2224          "\ufd92"-"\ufdc7",
2225          "\ufdf0"-"\ufdfb",
2226          "\ufe33"-"\ufe34",
2227          "\ufe4d"-"\ufe4f",
2228          "\ufe69",
2229          "\ufe70"-"\ufe72",
2230          "\ufe74",
2231          "\ufe76"-"\ufefc",
2232          "\uff04",
2233          "\uff21"-"\uff3a",
2234          "\uff3f",
2235          "\uff41"-"\uff5a",
2236          "\uff65"-"\uffbe",
2237          "\uffc2"-"\uffc7",
2238          "\uffca"-"\uffcf",
2239          "\uffd2"-"\uffd7",
2240          "\uffda"-"\uffdc",
2241          "\uffe0"-"\uffe1",
2242          "\uffe5"-"\uffe6"
2243       ]
2244   >
2245 |
2246   < #PART_LETTER:
2247       [  // all chars for which Character.isIdentifierPart is true
2248          "\u0000"-"\u0008",
2249          "\u000e"-"\u001b",
2250          "$",
2251          "0"-"9",
2252          "A"-"Z",
2253          "_",
2254          "a"-"z",
2255          "\u007f"-"\u009f",
2256          "\u00a2"-"\u00a5",
2257          "\u00aa",
2258          "\u00b5",
2259          "\u00ba",
2260          "\u00c0"-"\u00d6",
2261          "\u00d8"-"\u00f6",
2262          "\u00f8"-"\u021f",
2263          "\u0222"-"\u0233",
2264          "\u0250"-"\u02ad",
2265          "\u02b0"-"\u02b8",
2266          "\u02bb"-"\u02c1",
2267          "\u02d0"-"\u02d1",
2268          "\u02e0"-"\u02e4",
2269          "\u02ee",
2270          "\u0300"-"\u034e",
2271          "\u0360"-"\u0362",
2272          "\u037a",
2273          "\u0386",
2274          "\u0388"-"\u038a",
2275          "\u038c",
2276          "\u038e"-"\u03a1",
2277          "\u03a3"-"\u03ce",
2278          "\u03d0"-"\u03d7",
2279          "\u03da"-"\u03f3",
2280          "\u0400"-"\u0481",
2281          "\u0483"-"\u0486",
2282          "\u048c"-"\u04c4",
2283          "\u04c7"-"\u04c8",
2284          "\u04cb"-"\u04cc",
2285          "\u04d0"-"\u04f5",
2286          "\u04f8"-"\u04f9",
2287          "\u0531"-"\u0556",
2288          "\u0559",
2289          "\u0561"-"\u0587",
2290          "\u0591"-"\u05a1",
2291          "\u05a3"-"\u05b9",
2292          "\u05bb"-"\u05bd",
2293          "\u05bf",
2294          "\u05c1"-"\u05c2",
2295          "\u05c4",
2296          "\u05d0"-"\u05ea",
2297          "\u05f0"-"\u05f2",
2298          "\u0621"-"\u063a",
2299          "\u0640"-"\u0655",
2300          "\u0660"-"\u0669",
2301          "\u0670"-"\u06d3",
2302          "\u06d5"-"\u06dc",
2303          "\u06df"-"\u06e8",
2304          "\u06ea"-"\u06ed",
2305          "\u06f0"-"\u06fc",
2306          "\u070f"-"\u072c",
2307          "\u0730"-"\u074a",
2308          "\u0780"-"\u07b0",
2309          "\u0901"-"\u0903",
2310          "\u0905"-"\u0939",
2311          "\u093c"-"\u094d",
2312          "\u0950"-"\u0954",
2313          "\u0958"-"\u0963",
2314          "\u0966"-"\u096f",
2315          "\u0981"-"\u0983",
2316          "\u0985"-"\u098c",
2317          "\u098f"-"\u0990",
2318          "\u0993"-"\u09a8",
2319          "\u09aa"-"\u09b0",
2320          "\u09b2",
2321          "\u09b6"-"\u09b9",
2322          "\u09bc",
2323          "\u09be"-"\u09c4",
2324          "\u09c7"-"\u09c8",
2325          "\u09cb"-"\u09cd",
2326          "\u09d7",
2327          "\u09dc"-"\u09dd",
2328          "\u09df"-"\u09e3",
2329          "\u09e6"-"\u09f3",
2330          "\u0a02",
2331          "\u0a05"-"\u0a0a",
2332          "\u0a0f"-"\u0a10",
2333          "\u0a13"-"\u0a28",
2334          "\u0a2a"-"\u0a30",
2335          "\u0a32"-"\u0a33",
2336          "\u0a35"-"\u0a36",
2337          "\u0a38"-"\u0a39",
2338          "\u0a3c",
2339          "\u0a3e"-"\u0a42",
2340          "\u0a47"-"\u0a48",
2341          "\u0a4b"-"\u0a4d",
2342          "\u0a59"-"\u0a5c",
2343          "\u0a5e",
2344          "\u0a66"-"\u0a74",
2345          "\u0a81"-"\u0a83",
2346          "\u0a85"-"\u0a8b",
2347          "\u0a8d",
2348          "\u0a8f"-"\u0a91",
2349          "\u0a93"-"\u0aa8",
2350          "\u0aaa"-"\u0ab0",
2351          "\u0ab2"-"\u0ab3",
2352          "\u0ab5"-"\u0ab9",
2353          "\u0abc"-"\u0ac5",
2354          "\u0ac7"-"\u0ac9",
2355          "\u0acb"-"\u0acd",
2356          "\u0ad0",
2357          "\u0ae0",
2358          "\u0ae6"-"\u0aef",
2359          "\u0b01"-"\u0b03",
2360          "\u0b05"-"\u0b0c",
2361          "\u0b0f"-"\u0b10",
2362          "\u0b13"-"\u0b28",
2363          "\u0b2a"-"\u0b30",
2364          "\u0b32"-"\u0b33",
2365          "\u0b36"-"\u0b39",
2366          "\u0b3c"-"\u0b43",
2367          "\u0b47"-"\u0b48",
2368          "\u0b4b"-"\u0b4d",
2369          "\u0b56"-"\u0b57",
2370          "\u0b5c"-"\u0b5d",
2371          "\u0b5f"-"\u0b61",
2372          "\u0b66"-"\u0b6f",
2373          "\u0b82"-"\u0b83",
2374          "\u0b85"-"\u0b8a",
2375          "\u0b8e"-"\u0b90",
2376          "\u0b92"-"\u0b95",
2377          "\u0b99"-"\u0b9a",
2378          "\u0b9c",
2379          "\u0b9e"-"\u0b9f",
2380          "\u0ba3"-"\u0ba4",
2381          "\u0ba8"-"\u0baa",
2382          "\u0bae"-"\u0bb5",
2383          "\u0bb7"-"\u0bb9",
2384          "\u0bbe"-"\u0bc2",
2385          "\u0bc6"-"\u0bc8",
2386          "\u0bca"-"\u0bcd",
2387          "\u0bd7",
2388          "\u0be7"-"\u0bef",
2389          "\u0c01"-"\u0c03",
2390          "\u0c05"-"\u0c0c",
2391          "\u0c0e"-"\u0c10",
2392          "\u0c12"-"\u0c28",
2393          "\u0c2a"-"\u0c33",
2394          "\u0c35"-"\u0c39",
2395          "\u0c3e"-"\u0c44",
2396          "\u0c46"-"\u0c48",
2397          "\u0c4a"-"\u0c4d",
2398          "\u0c55"-"\u0c56",
2399          "\u0c60"-"\u0c61",
2400          "\u0c66"-"\u0c6f",
2401          "\u0c82"-"\u0c83",
2402          "\u0c85"-"\u0c8c",
2403          "\u0c8e"-"\u0c90",
2404          "\u0c92"-"\u0ca8",
2405          "\u0caa"-"\u0cb3",
2406          "\u0cb5"-"\u0cb9",
2407          "\u0cbe"-"\u0cc4",
2408          "\u0cc6"-"\u0cc8",
2409          "\u0cca"-"\u0ccd",
2410          "\u0cd5"-"\u0cd6",
2411          "\u0cde",
2412          "\u0ce0"-"\u0ce1",
2413          "\u0ce6"-"\u0cef",
2414          "\u0d02"-"\u0d03",
2415          "\u0d05"-"\u0d0c",
2416          "\u0d0e"-"\u0d10",
2417          "\u0d12"-"\u0d28",
2418          "\u0d2a"-"\u0d39",
2419          "\u0d3e"-"\u0d43",
2420          "\u0d46"-"\u0d48",
2421          "\u0d4a"-"\u0d4d",
2422          "\u0d57",
2423          "\u0d60"-"\u0d61",
2424          "\u0d66"-"\u0d6f",
2425          "\u0d82"-"\u0d83",
2426          "\u0d85"-"\u0d96",
2427          "\u0d9a"-"\u0db1",
2428          "\u0db3"-"\u0dbb",
2429          "\u0dbd",
2430          "\u0dc0"-"\u0dc6",
2431          "\u0dca",
2432          "\u0dcf"-"\u0dd4",
2433          "\u0dd6",
2434          "\u0dd8"-"\u0ddf",
2435          "\u0df2"-"\u0df3",
2436          "\u0e01"-"\u0e3a",
2437          "\u0e3f"-"\u0e4e",
2438          "\u0e50"-"\u0e59",
2439          "\u0e81"-"\u0e82",
2440          "\u0e84",
2441          "\u0e87"-"\u0e88",
2442          "\u0e8a",
2443          "\u0e8d",
2444          "\u0e94"-"\u0e97",
2445          "\u0e99"-"\u0e9f",
2446          "\u0ea1"-"\u0ea3",
2447          "\u0ea5",
2448          "\u0ea7",
2449          "\u0eaa"-"\u0eab",
2450          "\u0ead"-"\u0eb9",
2451          "\u0ebb"-"\u0ebd",
2452          "\u0ec0"-"\u0ec4",
2453          "\u0ec6",
2454          "\u0ec8"-"\u0ecd",
2455          "\u0ed0"-"\u0ed9",
2456          "\u0edc"-"\u0edd",
2457          "\u0f00",
2458          "\u0f18"-"\u0f19",
2459          "\u0f20"-"\u0f29",
2460          "\u0f35",
2461          "\u0f37",
2462          "\u0f39",
2463          "\u0f3e"-"\u0f47",
2464          "\u0f49"-"\u0f6a",
2465          "\u0f71"-"\u0f84",
2466          "\u0f86"-"\u0f8b",
2467          "\u0f90"-"\u0f97",
2468          "\u0f99"-"\u0fbc",
2469          "\u0fc6",
2470          "\u1000"-"\u1021",
2471          "\u1023"-"\u1027",
2472          "\u1029"-"\u102a",
2473          "\u102c"-"\u1032",
2474          "\u1036"-"\u1039",
2475          "\u1040"-"\u1049",
2476          "\u1050"-"\u1059",
2477          "\u10a0"-"\u10c5",
2478          "\u10d0"-"\u10f6",
2479          "\u1100"-"\u1159",
2480          "\u115f"-"\u11a2",
2481          "\u11a8"-"\u11f9",
2482          "\u1200"-"\u1206",
2483          "\u1208"-"\u1246",
2484          "\u1248",
2485          "\u124a"-"\u124d",
2486          "\u1250"-"\u1256",
2487          "\u1258",
2488          "\u125a"-"\u125d",
2489          "\u1260"-"\u1286",
2490          "\u1288",
2491          "\u128a"-"\u128d",
2492          "\u1290"-"\u12ae",
2493          "\u12b0",
2494          "\u12b2"-"\u12b5",
2495          "\u12b8"-"\u12be",
2496          "\u12c0",
2497          "\u12c2"-"\u12c5",
2498          "\u12c8"-"\u12ce",
2499          "\u12d0"-"\u12d6",
2500          "\u12d8"-"\u12ee",
2501          "\u12f0"-"\u130e",
2502          "\u1310",
2503          "\u1312"-"\u1315",
2504          "\u1318"-"\u131e",
2505          "\u1320"-"\u1346",
2506          "\u1348"-"\u135a",
2507          "\u1369"-"\u1371",
2508          "\u13a0"-"\u13f4",
2509          "\u1401"-"\u166c",
2510          "\u166f"-"\u1676",
2511          "\u1681"-"\u169a",
2512          "\u16a0"-"\u16ea",
2513          "\u1780"-"\u17d3",
2514          "\u17db",
2515          "\u17e0"-"\u17e9",
2516          "\u180b"-"\u180e",
2517          "\u1810"-"\u1819",
2518          "\u1820"-"\u1877",
2519          "\u1880"-"\u18a9",
2520          "\u1e00"-"\u1e9b",
2521          "\u1ea0"-"\u1ef9",
2522          "\u1f00"-"\u1f15",
2523          "\u1f18"-"\u1f1d",
2524          "\u1f20"-"\u1f45",
2525          "\u1f48"-"\u1f4d",
2526          "\u1f50"-"\u1f57",
2527          "\u1f59",
2528          "\u1f5b",
2529          "\u1f5d",
2530          "\u1f5f"-"\u1f7d",
2531          "\u1f80"-"\u1fb4",
2532          "\u1fb6"-"\u1fbc",
2533          "\u1fbe",
2534          "\u1fc2"-"\u1fc4",
2535          "\u1fc6"-"\u1fcc",
2536          "\u1fd0"-"\u1fd3",
2537          "\u1fd6"-"\u1fdb",
2538          "\u1fe0"-"\u1fec",
2539          "\u1ff2"-"\u1ff4",
2540          "\u1ff6"-"\u1ffc",
2541          "\u200c"-"\u200f",
2542          "\u202a"-"\u202e",
2543          "\u203f"-"\u2040",
2544          "\u206a"-"\u206f",
2545          "\u207f",
2546          "\u20a0"-"\u20af",
2547          "\u20d0"-"\u20dc",
2548          "\u20e1",
2549          "\u2102",
2550          "\u2107",
2551          "\u210a"-"\u2113",
2552          "\u2115",
2553          "\u2119"-"\u211d",
2554          "\u2124",
2555          "\u2126",
2556          "\u2128",
2557          "\u212a"-"\u212d",
2558          "\u212f"-"\u2131",
2559          "\u2133"-"\u2139",
2560          "\u2160"-"\u2183",
2561          "\u3005"-"\u3007",
2562          "\u3021"-"\u302f",
2563          "\u3031"-"\u3035",
2564          "\u3038"-"\u303a",
2565          "\u3041"-"\u3094",
2566          "\u3099"-"\u309a",
2567          "\u309d"-"\u309e",
2568          "\u30a1"-"\u30fe",
2569          "\u3105"-"\u312c",
2570          "\u3131"-"\u318e",
2571          "\u31a0"-"\u31b7",
2572          "\u3400"-"\u4db5",
2573          "\u4e00"-"\u9fa5",
2574          "\ua000"-"\ua48c",
2575          "\uac00"-"\ud7a3",
2576          "\uf900"-"\ufa2d",
2577          "\ufb00"-"\ufb06",
2578          "\ufb13"-"\ufb17",
2579          "\ufb1d"-"\ufb28",
2580          "\ufb2a"-"\ufb36",
2581          "\ufb38"-"\ufb3c",
2582          "\ufb3e",
2583          "\ufb40"-"\ufb41",
2584          "\ufb43"-"\ufb44",
2585          "\ufb46"-"\ufbb1",
2586          "\ufbd3"-"\ufd3d",
2587          "\ufd50"-"\ufd8f",
2588          "\ufd92"-"\ufdc7",
2589          "\ufdf0"-"\ufdfb",
2590          "\ufe20"-"\ufe23",
2591          "\ufe33"-"\ufe34",
2592          "\ufe4d"-"\ufe4f",
2593          "\ufe69",
2594          "\ufe70"-"\ufe72",
2595          "\ufe74",
2596          "\ufe76"-"\ufefc",
2597          "\ufeff",
2598          "\uff04",
2599          "\uff10"-"\uff19",
2600          "\uff21"-"\uff3a",
2601          "\uff3f",
2602          "\uff41"-"\uff5a",
2603          "\uff65"-"\uffbe",
2604          "\uffc2"-"\uffc7",
2605          "\uffca"-"\uffcf",
2606          "\uffd2"-"\uffd7",
2607          "\uffda"-"\uffdc",
2608          "\uffe0"-"\uffe1",
2609          "\uffe5"-"\uffe6",
2610          "\ufff9"-"\ufffb"
2611       ]
2612   >
2613 }
2614