0001: /*
0002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
0003: *
0004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
0005: *
0006: * The contents of this file are subject to the terms of either the GNU
0007: * General Public License Version 2 only ("GPL") or the Common
0008: * Development and Distribution License("CDDL") (collectively, the
0009: * "License"). You may not use this file except in compliance with the
0010: * License. You can obtain a copy of the License at
0011: * http://www.netbeans.org/cddl-gplv2.html
0012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
0013: * specific language governing permissions and limitations under the
0014: * License. When distributing the software, include this License Header
0015: * Notice in each file and include the License file at
0016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
0017: * particular file as subject to the "Classpath" exception as provided
0018: * by Sun in the GPL Version 2 section of the License file that
0019: * accompanied this code. If applicable, add the following below the
0020: * License Header, with the fields enclosed by brackets [] replaced by
0021: * your own identifying information:
0022: * "Portions Copyrighted [year] [name of copyright owner]"
0023: *
0024: * Contributor(s):
0025: *
0026: * The Original Software is NetBeans. The Initial Developer of the Original
0027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
0028: * Microsystems, Inc. All Rights Reserved.
0029: *
0030: * If you wish your version of this file to be governed by only the CDDL
0031: * or only the GPL Version 2, indicate your decision by adding
0032: * "[Contributor] elects to include this software in this distribution
0033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
0034: * single choice of license, a recipient has the option to distribute
0035: * your version of this file under either the CDDL, the GPL Version 2 or
0036: * to extend the choice of license to its licensees as provided above.
0037: * However, if you add GPL Version 2 code and therefore, elected the GPL
0038: * Version 2 license, then the option applies only if the new code is
0039: * made subject to such option by the copyright holder.
0040: */
0041:
0042: package org.netbeans.modules.uml.core.reverseengineering.parsers.javaparser;
0043:
0044: import java.util.HashMap;
0045: import org.netbeans.modules.uml.core.reverseengineering.reframework.parsingframework.ParserEventController; //$ANTLR 2.7.2: "java.g" -> "JavaLexer.java"$
0046:
0047: import antlr.TokenBuffer;
0048: import antlr.TokenStreamException;
0049: import antlr.TokenStreamIOException;
0050: import antlr.ANTLRException;
0051: import antlr.LLkParser;
0052: import antlr.Token;
0053: import antlr.TokenStream;
0054: import antlr.RecognitionException;
0055: import antlr.NoViableAltException;
0056: import antlr.MismatchedTokenException;
0057: import antlr.SemanticException;
0058: import antlr.ParserSharedInputState;
0059: import antlr.collections.impl.BitSet;
0060: import antlr.collections.AST;
0061: import java.util.Hashtable;
0062: import antlr.ASTFactory;
0063: import antlr.ASTPair;
0064: import antlr.collections.impl.ASTArray;
0065:
0066: /** Java 1.3 Recognizer
0067: *
0068: * Run 'java Main [-showtree] directory-full-of-java-files'
0069: *
0070: * [The -showtree option pops up a Swing frame that shows
0071: * the AST constructed from the parser.]
0072: *
0073: * Run 'java Main <directory full of java files>'
0074: *
0075: * Contributing authors:
0076: * John Mitchell johnm@non.net
0077: * Terence Parr parrt@magelang.com
0078: * John Lilley jlilley@empathy.com
0079: * Scott Stanchfield thetick@magelang.com
0080: * Markus Mohnen mohnen@informatik.rwth-aachen.de
0081: * Peter Williams pete.williams@sun.com
0082: * Allan Jacobs Allan.Jacobs@eng.sun.com
0083: * Steve Messick messick@redhills.com
0084: *
0085: * Version 1.00 December 9, 1997 -- initial release
0086: * Version 1.01 December 10, 1997
0087: * fixed bug in octal def (0..7 not 0..8)
0088: * Version 1.10 August 1998 (parrt)
0089: * added tree construction
0090: * fixed definition of WS,comments for mac,pc,unix newlines
0091: * added unary plus
0092: * Version 1.11 (Nov 20, 1998)
0093: * Added "shutup" option to turn off last ambig warning.
0094: * Fixed inner class def to allow named class defs as statements
0095: * synchronized requires compound not simple statement
0096: * add [] after builtInType DOT class in primaryExpression
0097: * "const" is reserved but not valid..removed from modifiers
0098: * Version 1.12 (Feb 2, 1999)
0099: * Changed LITERAL_xxx to xxx in tree grammar.
0100: * Updated java.g to use tokens {...} now for 2.6.0 (new feature).
0101: *
0102: * Version 1.13 (Apr 23, 1999)
0103: * Didn't have (stat)? for else clause in tree parser.
0104: * Didn't gen ASTs for interface extends. Updated tree parser too.
0105: * Updated to 2.6.0.
0106: * Version 1.14 (Jun 20, 1999)
0107: * Allowed final/abstract on local classes.
0108: * Removed local interfaces from methods
0109: * Put instanceof precedence where it belongs...in relationalExpr
0110: * It also had expr not type as arg; fixed it.
0111: * Missing ! on SEMI in classBlock
0112: * fixed: (expr) + "string" was parsed incorrectly (+ as unary plus).
0113: * fixed: didn't like Object[].class in parser or tree parser
0114: * Version 1.15 (Jun 26, 1999)
0115: * Screwed up rule with instanceof in it. :( Fixed.
0116: * Tree parser didn't like (expr).something; fixed.
0117: * Allowed multiple inheritance in tree grammar. oops.
0118: * Version 1.16 (August 22, 1999)
0119: * Extending an interface built a wacky tree: had extra EXTENDS.
0120: * Tree grammar didn't allow multiple superinterfaces.
0121: * Tree grammar didn't allow empty var initializer: {}
0122: * Version 1.17 (October 12, 1999)
0123: * ESC lexer rule allowed 399 max not 377 max.
0124: * java.tree.g didn't handle the expression of synchronized
0125: * statements.
0126: * Version 1.18 (August 12, 2001)
0127: * Terence updated to Java 2 Version 1.3 by observing/combining work of
0128: * Allan Jacobs and Steve Messick. Handles 1.3 src.
0129: * Summary:
0130: * o primary didn't include boolean.class kind of thing
0131: * o constructor calls parsed explicitly now:
0132: * see explicitConstructorInvocation
0133: * o add strictfp modifier
0134: * o missing objBlock after new expression in tree grammar
0135: * o merged local class definition alternatives, moved after declaration
0136: * o fixed problem with ClassName.super.field
0137: * o reordered some alternatives to make things more efficient
0138: * o long and double constants were not differentiated from int/float
0139: * o whitespace rule was inefficient: matched only one char
0140: * o add an examples directory with some nasty 1.3 cases
0141: * o made Main.java use buffered IO and a Reader for Unicode support
0142: * o supports UNICODE?
0143: * Using Unicode charVocabulay makes code file big, but only
0144: * in the bitsets at the end. I need to make ANTLR generate
0145: * unicode bitsets more efficiently.
0146: *
0147: * class Test {
0148: * public static void main( String args[] ) {
0149: * if (boolean.class.equals(boolean.class)) {
0150: * ETSystem.out.println("works");
0151: * }
0152: * }
0153: * }
0154: *
0155: * This grammar is in the PUBLIC DOMAIN
0156: */
0157: public class JavaRecognizer extends antlr.LLkParser implements
0158: JavaTokenTypes {
0159:
0160: public void setEventController(ParserEventController newVal) {
0161: mController = newVal;
0162: }
0163:
0164: /**
0165: * Parser error-reporting function can be overridden in subclass.
0166: * @param ex The exception that occured.
0167: */
0168: public void reportError(RecognitionException ex) {
0169: mController.errorFound(ex.getMessage(), ex.getLine(), ex
0170: .getColumn(), ex.getFilename());
0171: }
0172:
0173: void ParseOperations(boolean flag) {
0174: m_ParseOperations = flag;
0175: }
0176:
0177: /**
0178: * CheckForScarf handles token consumption within
0179: * operations when doing normal reverse engineering.
0180: * This operation will have no effect if being called
0181: * during the reverse engineering of an operation directly.
0182: */
0183: protected boolean CheckForScarf(boolean inMethod) {
0184: boolean scarfed = false;
0185: try {
0186: if (inMethod && !m_ParseOperations) {
0187: ParserSharedInputState state = getInputState();
0188:
0189: long index = 1;
0190: TokenBuffer buffer = state.getInput();
0191:
0192: boolean consume = true;
0193:
0194: int tokenType = LA(1);
0195:
0196: while (index != 0 && (!(tokenType == Token.EOF_TYPE))) {
0197: if (tokenType == LCURLY) {
0198: index++;
0199: } else if (tokenType == RCURLY) {
0200: index--;
0201: if (index == 0) {
0202: consume = false;
0203: }
0204: }
0205:
0206: if (consume) {
0207: buffer.consume();
0208: tokenType = LA(1);
0209: }
0210: }
0211:
0212: scarfed = true;
0213: }
0214: } catch (Exception e) {
0215: e.printStackTrace();
0216: }
0217: return scarfed;
0218: }
0219:
0220: private ParserEventController mController;
0221: private boolean m_ParseOperations;
0222:
0223: protected JavaRecognizer(TokenBuffer tokenBuf, int k) {
0224: super (tokenBuf, k);
0225: tokenNames = _tokenNames;
0226: buildTokenTypeASTClassMap();
0227: astFactory = new ASTFactory(getTokenTypeToASTClassMap());
0228: }
0229:
0230: public JavaRecognizer(TokenBuffer tokenBuf) {
0231: this (tokenBuf, 2);
0232: }
0233:
0234: protected JavaRecognizer(TokenStream lexer, int k) {
0235: super (lexer, k);
0236: tokenNames = _tokenNames;
0237: buildTokenTypeASTClassMap();
0238: astFactory = new ASTFactory(getTokenTypeToASTClassMap());
0239: }
0240:
0241: public JavaRecognizer(TokenStream lexer) {
0242: this (lexer, 2);
0243: }
0244:
0245: public JavaRecognizer(ParserSharedInputState state) {
0246: super (state, 2);
0247: tokenNames = _tokenNames;
0248: buildTokenTypeASTClassMap();
0249: astFactory = new ASTFactory(getTokenTypeToASTClassMap());
0250: }
0251:
0252: public final void compilationUnit() throws RecognitionException,
0253: TokenStreamException {
0254:
0255: returnAST = null;
0256: ASTPair currentAST = new ASTPair();
0257: AST compilationUnit_AST = null;
0258: m_ParseOperations = false;
0259:
0260: {
0261: switch (LA(1)) {
0262: case LITERAL_package: {
0263: packageDefinition();
0264: astFactory.addASTChild(currentAST, returnAST);
0265: break;
0266: }
0267: case EOF:
0268: case FINAL:
0269: case ABSTRACT:
0270: case STRICTFP:
0271: case SEMI:
0272: case LITERAL_import:
0273: case LITERAL_private:
0274: case LITERAL_public:
0275: case LITERAL_protected:
0276: case LITERAL_static:
0277: case LITERAL_transient:
0278: case LITERAL_native:
0279: case LITERAL_synchronized:
0280: case LITERAL_volatile:
0281: case LITERAL_class:
0282: case LITERAL_interface: {
0283: break;
0284: }
0285: default: {
0286: throw new NoViableAltException(LT(1), getFilename());
0287: }
0288: }
0289: }
0290: {
0291: _loop4: do {
0292: if ((LA(1) == LITERAL_import)) {
0293: importDefinition();
0294: astFactory.addASTChild(currentAST, returnAST);
0295: } else {
0296: break _loop4;
0297: }
0298:
0299: } while (true);
0300: }
0301: {
0302: _loop6: do {
0303: if ((_tokenSet_0.member(LA(1)))) {
0304: typeDefinition();
0305: astFactory.addASTChild(currentAST, returnAST);
0306: } else {
0307: break _loop6;
0308: }
0309:
0310: } while (true);
0311: }
0312: match(Token.EOF_TYPE);
0313: compilationUnit_AST = (AST) currentAST.root;
0314: returnAST = compilationUnit_AST;
0315: }
0316:
0317: public final void packageDefinition() throws RecognitionException,
0318: TokenStreamException {
0319:
0320: returnAST = null;
0321: ASTPair currentAST = new ASTPair();
0322: AST packageDefinition_AST = null;
0323: Token p = null;
0324: AST p_AST = null;
0325:
0326: try { // for error handling
0327: p = LT(1);
0328: p_AST = astFactory.create(p);
0329: astFactory.makeASTRoot(currentAST, p_AST);
0330: match(LITERAL_package);
0331: if (inputState.guessing == 0) {
0332: p_AST.setType(PACKAGE_DEF);
0333: }
0334: identifier();
0335: astFactory.addASTChild(currentAST, returnAST);
0336: AST tmp2_AST = null;
0337: tmp2_AST = astFactory.create(LT(1));
0338: astFactory.addASTChild(currentAST, tmp2_AST);
0339: match(SEMI);
0340: packageDefinition_AST = (AST) currentAST.root;
0341: } catch (RecognitionException ex) {
0342: if (inputState.guessing == 0) {
0343: reportError(ex);
0344: consume();
0345: consumeUntil(_tokenSet_1);
0346: } else {
0347: throw ex;
0348: }
0349: }
0350: returnAST = packageDefinition_AST;
0351: }
0352:
0353: public final void importDefinition() throws RecognitionException,
0354: TokenStreamException {
0355:
0356: returnAST = null;
0357: ASTPair currentAST = new ASTPair();
0358: AST importDefinition_AST = null;
0359: Token i = null;
0360: AST i_AST = null;
0361:
0362: try { // for error handling
0363: i = LT(1);
0364: i_AST = astFactory.create(i);
0365: astFactory.makeASTRoot(currentAST, i_AST);
0366: match(LITERAL_import);
0367: if (inputState.guessing == 0) {
0368: i_AST.setType(IMPORT);
0369: }
0370: identifierStar();
0371: astFactory.addASTChild(currentAST, returnAST);
0372: AST tmp3_AST = null;
0373: tmp3_AST = astFactory.create(LT(1));
0374: astFactory.addASTChild(currentAST, tmp3_AST);
0375: match(SEMI);
0376: importDefinition_AST = (AST) currentAST.root;
0377: } catch (RecognitionException ex) {
0378: if (inputState.guessing == 0) {
0379: reportError(ex);
0380: consume();
0381: consumeUntil(_tokenSet_1);
0382: } else {
0383: throw ex;
0384: }
0385: }
0386: returnAST = importDefinition_AST;
0387: }
0388:
0389: public final void typeDefinition() throws RecognitionException,
0390: TokenStreamException {
0391:
0392: returnAST = null;
0393: ASTPair currentAST = new ASTPair();
0394: AST typeDefinition_AST = null;
0395: AST m_AST = null;
0396:
0397: try { // for error handling
0398: switch (LA(1)) {
0399: case FINAL:
0400: case ABSTRACT:
0401: case STRICTFP:
0402: case LITERAL_private:
0403: case LITERAL_public:
0404: case LITERAL_protected:
0405: case LITERAL_static:
0406: case LITERAL_transient:
0407: case LITERAL_native:
0408: case LITERAL_synchronized:
0409: case LITERAL_volatile:
0410: case LITERAL_class:
0411: case LITERAL_interface: {
0412: modifiers();
0413: m_AST = (AST) returnAST;
0414: {
0415: switch (LA(1)) {
0416: case LITERAL_class: {
0417: classDefinition(m_AST);
0418: astFactory.addASTChild(currentAST, returnAST);
0419: break;
0420: }
0421: case LITERAL_interface: {
0422: interfaceDefinition(m_AST);
0423: astFactory.addASTChild(currentAST, returnAST);
0424: break;
0425: }
0426: default: {
0427: throw new NoViableAltException(LT(1),
0428: getFilename());
0429: }
0430: }
0431: }
0432: typeDefinition_AST = (AST) currentAST.root;
0433: break;
0434: }
0435: case SEMI: {
0436: match(SEMI);
0437: typeDefinition_AST = (AST) currentAST.root;
0438: break;
0439: }
0440: default: {
0441: throw new NoViableAltException(LT(1), getFilename());
0442: }
0443: }
0444: } catch (RecognitionException ex) {
0445: if (inputState.guessing == 0) {
0446: reportError(ex);
0447: consume();
0448: consumeUntil(_tokenSet_2);
0449: } else {
0450: throw ex;
0451: }
0452: }
0453: returnAST = typeDefinition_AST;
0454: }
0455:
0456: public final void methodCompilationUnit()
0457: throws RecognitionException, TokenStreamException {
0458:
0459: returnAST = null;
0460: ASTPair currentAST = new ASTPair();
0461: AST methodCompilationUnit_AST = null;
0462: m_ParseOperations = true;
0463:
0464: {
0465: _loop9: do {
0466: switch (LA(1)) {
0467: case FINAL:
0468: case ABSTRACT:
0469: case STRICTFP:
0470: case LITERAL_void:
0471: case LITERAL_boolean:
0472: case LITERAL_byte:
0473: case LITERAL_char:
0474: case LITERAL_short:
0475: case LITERAL_int:
0476: case LITERAL_float:
0477: case LITERAL_long:
0478: case LITERAL_double:
0479: case IDENT:
0480: case LITERAL_private:
0481: case LITERAL_public:
0482: case LITERAL_protected:
0483: case LITERAL_static:
0484: case LITERAL_transient:
0485: case LITERAL_native:
0486: case LITERAL_synchronized:
0487: case LITERAL_volatile:
0488: case LITERAL_class:
0489: case LITERAL_interface:
0490: case LCURLY: {
0491: field();
0492: astFactory.addASTChild(currentAST, returnAST);
0493: break;
0494: }
0495: case LITERAL_import: {
0496: importDefinition();
0497: astFactory.addASTChild(currentAST, returnAST);
0498: break;
0499: }
0500: case LITERAL_package: {
0501: packageDefinition();
0502: astFactory.addASTChild(currentAST, returnAST);
0503: break;
0504: }
0505: default: {
0506: break _loop9;
0507: }
0508: }
0509: } while (true);
0510: }
0511: match(Token.EOF_TYPE);
0512: methodCompilationUnit_AST = (AST) currentAST.root;
0513: returnAST = methodCompilationUnit_AST;
0514: }
0515:
0516: public final void field() throws RecognitionException,
0517: TokenStreamException {
0518:
0519: returnAST = null;
0520: ASTPair currentAST = new ASTPair();
0521: AST field_AST = null;
0522: AST mods_AST = null;
0523: AST h_AST = null;
0524: AST s_AST = null;
0525: AST cd_AST = null;
0526: AST id_AST = null;
0527: AST t_AST = null;
0528: Token methodName = null;
0529: AST methodName_AST = null;
0530: Token mlp = null;
0531: AST mlp_AST = null;
0532: AST param_AST = null;
0533: Token mrp = null;
0534: AST mrp_AST = null;
0535: AST rt_AST = null;
0536: AST tc_AST = null;
0537: AST s2_AST = null;
0538: Token ms = null;
0539: AST ms_AST = null;
0540: AST v_AST = null;
0541: Token vs = null;
0542: AST vs_AST = null;
0543: AST s3_AST = null;
0544: AST s4_AST = null;
0545:
0546: if ((_tokenSet_3.member(LA(1))) && (_tokenSet_4.member(LA(2)))) {
0547: modifiers();
0548: mods_AST = (AST) returnAST;
0549: {
0550: switch (LA(1)) {
0551: case LITERAL_class: {
0552: classDefinition(mods_AST);
0553: cd_AST = (AST) returnAST;
0554: if (inputState.guessing == 0) {
0555: field_AST = (AST) currentAST.root;
0556: field_AST = cd_AST;
0557: currentAST.root = field_AST;
0558: currentAST.child = field_AST != null
0559: && field_AST.getFirstChild() != null ? field_AST
0560: .getFirstChild()
0561: : field_AST;
0562: currentAST.advanceChildToEnd();
0563: }
0564: break;
0565: }
0566: case LITERAL_interface: {
0567: interfaceDefinition(mods_AST);
0568: id_AST = (AST) returnAST;
0569: if (inputState.guessing == 0) {
0570: field_AST = (AST) currentAST.root;
0571: field_AST = id_AST;
0572: currentAST.root = field_AST;
0573: currentAST.child = field_AST != null
0574: && field_AST.getFirstChild() != null ? field_AST
0575: .getFirstChild()
0576: : field_AST;
0577: currentAST.advanceChildToEnd();
0578: }
0579: break;
0580: }
0581: default:
0582: if ((LA(1) == IDENT) && (LA(2) == LPAREN)) {
0583: ctorHead();
0584: h_AST = (AST) returnAST;
0585: constructorBody();
0586: s_AST = (AST) returnAST;
0587: if (inputState.guessing == 0) {
0588: field_AST = (AST) currentAST.root;
0589: field_AST = (AST) astFactory
0590: .make((new ASTArray(4)).add(
0591: astFactory.create(CTOR_DEF,
0592: "CTOR_DEF")).add(
0593: mods_AST).add(h_AST).add(
0594: s_AST));
0595: currentAST.root = field_AST;
0596: currentAST.child = field_AST != null
0597: && field_AST.getFirstChild() != null ? field_AST
0598: .getFirstChild()
0599: : field_AST;
0600: currentAST.advanceChildToEnd();
0601: }
0602: } else if (((LA(1) >= LITERAL_void && LA(1) <= IDENT))
0603: && (_tokenSet_5.member(LA(2)))) {
0604: typeSpec(false);
0605: t_AST = (AST) returnAST;
0606: {
0607: if ((LA(1) == IDENT) && (LA(2) == LPAREN)) {
0608: methodName = LT(1);
0609: methodName_AST = astFactory
0610: .create(methodName);
0611: match(IDENT);
0612: mlp = LT(1);
0613: mlp_AST = astFactory.create(mlp);
0614: match(LPAREN);
0615: parameterDeclarationList();
0616: param_AST = (AST) returnAST;
0617: mrp = LT(1);
0618: mrp_AST = astFactory.create(mrp);
0619: match(RPAREN);
0620: declaratorBrackets(t_AST);
0621: rt_AST = (AST) returnAST;
0622: {
0623: switch (LA(1)) {
0624: case LITERAL_throws: {
0625: throwsClause();
0626: tc_AST = (AST) returnAST;
0627: break;
0628: }
0629: case SEMI:
0630: case LCURLY: {
0631: break;
0632: }
0633: default: {
0634: throw new NoViableAltException(
0635: LT(1), getFilename());
0636: }
0637: }
0638: }
0639: {
0640: switch (LA(1)) {
0641: case LCURLY: {
0642: compoundStatement(true);
0643: s2_AST = (AST) returnAST;
0644: break;
0645: }
0646: case SEMI: {
0647: ms = LT(1);
0648: ms_AST = astFactory.create(ms);
0649: match(SEMI);
0650: break;
0651: }
0652: default: {
0653: throw new NoViableAltException(
0654: LT(1), getFilename());
0655: }
0656: }
0657: }
0658: if (inputState.guessing == 0) {
0659: field_AST = (AST) currentAST.root;
0660:
0661: if ("finalize".equals(methodName
0662: .getText())) {
0663: field_AST = (AST) astFactory
0664: .make((new ASTArray(9))
0665: .add(
0666: astFactory
0667: .create(
0668: DESTRUCTOR_DEF,
0669: "DESTRUCTOR_DEF"))
0670: .add(mods_AST)
0671: .add(
0672: (AST) astFactory
0673: .make((new ASTArray(
0674: 2))
0675: .add(
0676: astFactory
0677: .create(
0678: TYPE,
0679: "TYPE"))
0680: .add(
0681: rt_AST)))
0682: .add(
0683: methodName_AST)
0684: .add(mlp_AST)
0685: .add(param_AST)
0686: .add(mrp_AST)
0687: .add(tc_AST)
0688: .add(s2_AST));
0689: } else {
0690: if (ms_AST != null) {
0691: field_AST = (AST) astFactory
0692: .make((new ASTArray(
0693: 9))
0694: .add(
0695: astFactory
0696: .create(
0697: METHOD_DEF,
0698: "METHOD_DEF"))
0699: .add(
0700: mods_AST)
0701: .add(
0702: (AST) astFactory
0703: .make((new ASTArray(
0704: 2))
0705: .add(
0706: astFactory
0707: .create(
0708: TYPE,
0709: "TYPE"))
0710: .add(
0711: rt_AST)))
0712: .add(
0713: methodName_AST)
0714: .add(
0715: mlp_AST)
0716: .add(
0717: param_AST)
0718: .add(
0719: mrp_AST)
0720: .add(tc_AST)
0721: .add(ms_AST));
0722: } else {
0723: field_AST = (AST) astFactory
0724: .make((new ASTArray(
0725: 9))
0726: .add(
0727: astFactory
0728: .create(
0729: METHOD_DEF,
0730: "METHOD_DEF"))
0731: .add(
0732: mods_AST)
0733: .add(
0734: (AST) astFactory
0735: .make((new ASTArray(
0736: 2))
0737: .add(
0738: astFactory
0739: .create(
0740: TYPE,
0741: "TYPE"))
0742: .add(
0743: rt_AST)))
0744: .add(
0745: methodName_AST)
0746: .add(
0747: mlp_AST)
0748: .add(
0749: param_AST)
0750: .add(
0751: mrp_AST)
0752: .add(tc_AST)
0753: .add(s2_AST));
0754: }
0755: }
0756:
0757: currentAST.root = field_AST;
0758: currentAST.child = field_AST != null
0759: && field_AST
0760: .getFirstChild() != null ? field_AST
0761: .getFirstChild()
0762: : field_AST;
0763: currentAST.advanceChildToEnd();
0764: }
0765: } else if ((LA(1) == IDENT)
0766: && (_tokenSet_6.member(LA(2)))) {
0767: variableDefinitions(mods_AST, t_AST);
0768: v_AST = (AST) returnAST;
0769: vs = LT(1);
0770: vs_AST = astFactory.create(vs);
0771: match(SEMI);
0772: if (inputState.guessing == 0) {
0773: field_AST = (AST) currentAST.root;
0774: v_AST.addChild(vs_AST);
0775: field_AST = v_AST;
0776: currentAST.root = field_AST;
0777: currentAST.child = field_AST != null
0778: && field_AST
0779: .getFirstChild() != null ? field_AST
0780: .getFirstChild()
0781: : field_AST;
0782: currentAST.advanceChildToEnd();
0783: }
0784: } else {
0785: throw new NoViableAltException(LT(1),
0786: getFilename());
0787: }
0788:
0789: }
0790: } else {
0791: throw new NoViableAltException(LT(1),
0792: getFilename());
0793: }
0794: }
0795: }
0796: } else if ((LA(1) == LITERAL_static) && (LA(2) == LCURLY)) {
0797: match(LITERAL_static);
0798: compoundStatement(true);
0799: s3_AST = (AST) returnAST;
0800: if (inputState.guessing == 0) {
0801: field_AST = (AST) currentAST.root;
0802: field_AST = (AST) astFactory.make((new ASTArray(2))
0803: .add(
0804: astFactory.create(STATIC_INIT,
0805: "STATIC_INIT")).add(s3_AST));
0806: currentAST.root = field_AST;
0807: currentAST.child = field_AST != null
0808: && field_AST.getFirstChild() != null ? field_AST
0809: .getFirstChild()
0810: : field_AST;
0811: currentAST.advanceChildToEnd();
0812: }
0813: } else if ((LA(1) == LCURLY)) {
0814: compoundStatement(true);
0815: s4_AST = (AST) returnAST;
0816: if (inputState.guessing == 0) {
0817: field_AST = (AST) currentAST.root;
0818: field_AST = (AST) astFactory.make((new ASTArray(2))
0819: .add(
0820: astFactory.create(INSTANCE_INIT,
0821: "INSTANCE_INIT")).add(s4_AST));
0822: currentAST.root = field_AST;
0823: currentAST.child = field_AST != null
0824: && field_AST.getFirstChild() != null ? field_AST
0825: .getFirstChild()
0826: : field_AST;
0827: currentAST.advanceChildToEnd();
0828: }
0829: } else {
0830: throw new NoViableAltException(LT(1), getFilename());
0831: }
0832:
0833: returnAST = field_AST;
0834: }
0835:
0836: public final void identifier() throws RecognitionException,
0837: TokenStreamException {
0838:
0839: returnAST = null;
0840: ASTPair currentAST = new ASTPair();
0841: AST identifier_AST = null;
0842:
0843: AST tmp7_AST = null;
0844: tmp7_AST = astFactory.create(LT(1));
0845: astFactory.addASTChild(currentAST, tmp7_AST);
0846: match(IDENT);
0847: {
0848: _loop26: do {
0849: if ((LA(1) == DOT)) {
0850: AST tmp8_AST = null;
0851: tmp8_AST = astFactory.create(LT(1));
0852: astFactory.makeASTRoot(currentAST, tmp8_AST);
0853: match(DOT);
0854: AST tmp9_AST = null;
0855: tmp9_AST = astFactory.create(LT(1));
0856: astFactory.addASTChild(currentAST, tmp9_AST);
0857: match(IDENT);
0858: } else {
0859: break _loop26;
0860: }
0861:
0862: } while (true);
0863: }
0864: identifier_AST = (AST) currentAST.root;
0865: returnAST = identifier_AST;
0866: }
0867:
0868: public final void identifierStar() throws RecognitionException,
0869: TokenStreamException {
0870:
0871: returnAST = null;
0872: ASTPair currentAST = new ASTPair();
0873: AST identifierStar_AST = null;
0874:
0875: AST tmp10_AST = null;
0876: tmp10_AST = astFactory.create(LT(1));
0877: astFactory.addASTChild(currentAST, tmp10_AST);
0878: match(IDENT);
0879: {
0880: _loop29: do {
0881: if ((LA(1) == DOT) && (LA(2) == IDENT)) {
0882: AST tmp11_AST = null;
0883: tmp11_AST = astFactory.create(LT(1));
0884: astFactory.makeASTRoot(currentAST, tmp11_AST);
0885: match(DOT);
0886: AST tmp12_AST = null;
0887: tmp12_AST = astFactory.create(LT(1));
0888: astFactory.addASTChild(currentAST, tmp12_AST);
0889: match(IDENT);
0890: } else {
0891: break _loop29;
0892: }
0893:
0894: } while (true);
0895: }
0896: {
0897: switch (LA(1)) {
0898: case DOT: {
0899: AST tmp13_AST = null;
0900: tmp13_AST = astFactory.create(LT(1));
0901: astFactory.makeASTRoot(currentAST, tmp13_AST);
0902: match(DOT);
0903: AST tmp14_AST = null;
0904: tmp14_AST = astFactory.create(LT(1));
0905: astFactory.addASTChild(currentAST, tmp14_AST);
0906: match(STAR);
0907: break;
0908: }
0909: case SEMI: {
0910: break;
0911: }
0912: default: {
0913: throw new NoViableAltException(LT(1), getFilename());
0914: }
0915: }
0916: }
0917: identifierStar_AST = (AST) currentAST.root;
0918: returnAST = identifierStar_AST;
0919: }
0920:
0921: public final void modifiers() throws RecognitionException,
0922: TokenStreamException {
0923:
0924: returnAST = null;
0925: ASTPair currentAST = new ASTPair();
0926: AST modifiers_AST = null;
0927:
0928: {
0929: _loop33: do {
0930: if ((_tokenSet_7.member(LA(1)))) {
0931: modifier();
0932: astFactory.addASTChild(currentAST, returnAST);
0933: } else {
0934: break _loop33;
0935: }
0936:
0937: } while (true);
0938: }
0939: if (inputState.guessing == 0) {
0940: modifiers_AST = (AST) currentAST.root;
0941: modifiers_AST = (AST) astFactory.make((new ASTArray(2))
0942: .add(astFactory.create(MODIFIERS, "MODIFIERS"))
0943: .add(modifiers_AST));
0944: currentAST.root = modifiers_AST;
0945: currentAST.child = modifiers_AST != null
0946: && modifiers_AST.getFirstChild() != null ? modifiers_AST
0947: .getFirstChild()
0948: : modifiers_AST;
0949: currentAST.advanceChildToEnd();
0950: }
0951: modifiers_AST = (AST) currentAST.root;
0952: returnAST = modifiers_AST;
0953: }
0954:
0955: public final void classDefinition(AST modifiers)
0956: throws RecognitionException, TokenStreamException {
0957:
0958: returnAST = null;
0959: ASTPair currentAST = new ASTPair();
0960: AST classDefinition_AST = null;
0961: Token key = null;
0962: AST key_AST = null;
0963: AST sc_AST = null;
0964: AST ic_AST = null;
0965: AST cb_AST = null;
0966:
0967: key = LT(1);
0968: key_AST = astFactory.create(key);
0969: match(LITERAL_class);
0970: AST tmp15_AST = null;
0971: tmp15_AST = astFactory.create(LT(1));
0972: match(IDENT);
0973: super ClassClause();
0974: sc_AST = (AST) returnAST;
0975: implements Clause();
0976: ic_AST = (AST) returnAST;
0977: classBlock();
0978: cb_AST = (AST) returnAST;
0979: if (inputState.guessing == 0) {
0980: classDefinition_AST = (AST) currentAST.root;
0981: classDefinition_AST = (AST) astFactory
0982: .make((new ASTArray(7)).add(
0983: astFactory.create(CLASS_DEF, "CLASS_DEF"))
0984: .add(key_AST).add(modifiers).add(tmp15_AST)
0985: .add(sc_AST).add(ic_AST).add(cb_AST));
0986: currentAST.root = classDefinition_AST;
0987: currentAST.child = classDefinition_AST != null
0988: && classDefinition_AST.getFirstChild() != null ? classDefinition_AST
0989: .getFirstChild()
0990: : classDefinition_AST;
0991: currentAST.advanceChildToEnd();
0992: }
0993: returnAST = classDefinition_AST;
0994: }
0995:
0996: public final void interfaceDefinition(AST modifiers)
0997: throws RecognitionException, TokenStreamException {
0998:
0999: returnAST = null;
1000: ASTPair currentAST = new ASTPair();
1001: AST interfaceDefinition_AST = null;
1002: Token key = null;
1003: AST key_AST = null;
1004: AST ie_AST = null;
1005: AST cb_AST = null;
1006:
1007: key = LT(1);
1008: key_AST = astFactory.create(key);
1009: match(LITERAL_interface);
1010: AST tmp16_AST = null;
1011: tmp16_AST = astFactory.create(LT(1));
1012: match(IDENT);
1013: interfaceExtends();
1014: ie_AST = (AST) returnAST;
1015: classBlock();
1016: cb_AST = (AST) returnAST;
1017: if (inputState.guessing == 0) {
1018: interfaceDefinition_AST = (AST) currentAST.root;
1019: interfaceDefinition_AST = (AST) astFactory
1020: .make((new ASTArray(6)).add(
1021: astFactory.create(INTERFACE_DEF,
1022: "INTERFACE_DEF")).add(key_AST).add(
1023: modifiers).add(tmp16_AST).add(ie_AST).add(
1024: cb_AST));
1025: currentAST.root = interfaceDefinition_AST;
1026: currentAST.child = interfaceDefinition_AST != null
1027: && interfaceDefinition_AST.getFirstChild() != null ? interfaceDefinition_AST
1028: .getFirstChild()
1029: : interfaceDefinition_AST;
1030: currentAST.advanceChildToEnd();
1031: }
1032: returnAST = interfaceDefinition_AST;
1033: }
1034:
1035: /** A declaration is the creation of a reference or primitive-type variable
1036: * Create a separate Type/Var tree for each var in the var list.
1037: */
1038: public final void declaration() throws RecognitionException,
1039: TokenStreamException {
1040:
1041: returnAST = null;
1042: ASTPair currentAST = new ASTPair();
1043: AST declaration_AST = null;
1044: AST m_AST = null;
1045: AST t_AST = null;
1046: AST v_AST = null;
1047:
1048: modifiers();
1049: m_AST = (AST) returnAST;
1050: typeSpec(false);
1051: t_AST = (AST) returnAST;
1052: variableDefinitions(m_AST, t_AST);
1053: v_AST = (AST) returnAST;
1054: if (inputState.guessing == 0) {
1055: declaration_AST = (AST) currentAST.root;
1056: declaration_AST = v_AST;
1057: currentAST.root = declaration_AST;
1058: currentAST.child = declaration_AST != null
1059: && declaration_AST.getFirstChild() != null ? declaration_AST
1060: .getFirstChild()
1061: : declaration_AST;
1062: currentAST.advanceChildToEnd();
1063: }
1064: returnAST = declaration_AST;
1065: }
1066:
1067: public final void typeSpec(boolean addImagNode)
1068: throws RecognitionException, TokenStreamException {
1069:
1070: returnAST = null;
1071: ASTPair currentAST = new ASTPair();
1072: AST typeSpec_AST = null;
1073:
1074: switch (LA(1)) {
1075: case IDENT: {
1076: classTypeSpec(addImagNode);
1077: astFactory.addASTChild(currentAST, returnAST);
1078: typeSpec_AST = (AST) currentAST.root;
1079: break;
1080: }
1081: case LITERAL_void:
1082: case LITERAL_boolean:
1083: case LITERAL_byte:
1084: case LITERAL_char:
1085: case LITERAL_short:
1086: case LITERAL_int:
1087: case LITERAL_float:
1088: case LITERAL_long:
1089: case LITERAL_double: {
1090: builtInTypeSpec(addImagNode);
1091: astFactory.addASTChild(currentAST, returnAST);
1092: typeSpec_AST = (AST) currentAST.root;
1093: break;
1094: }
1095: default: {
1096: throw new NoViableAltException(LT(1), getFilename());
1097: }
1098: }
1099: returnAST = typeSpec_AST;
1100: }
1101:
1102: public final void variableDefinitions(AST mods, AST t)
1103: throws RecognitionException, TokenStreamException {
1104:
1105: returnAST = null;
1106: ASTPair currentAST = new ASTPair();
1107: AST variableDefinitions_AST = null;
1108:
1109: variableDeclarator(getASTFactory().dupTree(mods),
1110: getASTFactory().dupTree(t));
1111: astFactory.addASTChild(currentAST, returnAST);
1112: {
1113: _loop65: do {
1114: if ((LA(1) == COMMA)) {
1115: match(COMMA);
1116: variableDeclarator(getASTFactory().dupTree(mods),
1117: getASTFactory().dupTree(t));
1118: astFactory.addASTChild(currentAST, returnAST);
1119: } else {
1120: break _loop65;
1121: }
1122:
1123: } while (true);
1124: }
1125: variableDefinitions_AST = (AST) currentAST.root;
1126: returnAST = variableDefinitions_AST;
1127: }
1128:
1129: public final void classTypeSpec(boolean addImagNode)
1130: throws RecognitionException, TokenStreamException {
1131:
1132: returnAST = null;
1133: ASTPair currentAST = new ASTPair();
1134: AST classTypeSpec_AST = null;
1135: Token lb = null;
1136: AST lb_AST = null;
1137:
1138: identifier();
1139: astFactory.addASTChild(currentAST, returnAST);
1140: {
1141: _loop18: do {
1142: if ((LA(1) == LBRACK)) {
1143: lb = LT(1);
1144: lb_AST = astFactory.create(lb);
1145: astFactory.makeASTRoot(currentAST, lb_AST);
1146: match(LBRACK);
1147: if (inputState.guessing == 0) {
1148: lb_AST.setType(ARRAY_DECLARATOR);
1149: }
1150: AST tmp18_AST = null;
1151: tmp18_AST = astFactory.create(LT(1));
1152: astFactory.addASTChild(currentAST, tmp18_AST);
1153: match(RBRACK);
1154: } else {
1155: break _loop18;
1156: }
1157:
1158: } while (true);
1159: }
1160: if (inputState.guessing == 0) {
1161: classTypeSpec_AST = (AST) currentAST.root;
1162:
1163: if (addImagNode) {
1164: classTypeSpec_AST = (AST) astFactory
1165: .make((new ASTArray(2)).add(
1166: astFactory.create(TYPE, "TYPE")).add(
1167: classTypeSpec_AST));
1168: }
1169:
1170: currentAST.root = classTypeSpec_AST;
1171: currentAST.child = classTypeSpec_AST != null
1172: && classTypeSpec_AST.getFirstChild() != null ? classTypeSpec_AST
1173: .getFirstChild()
1174: : classTypeSpec_AST;
1175: currentAST.advanceChildToEnd();
1176: }
1177: classTypeSpec_AST = (AST) currentAST.root;
1178: returnAST = classTypeSpec_AST;
1179: }
1180:
1181: public final void builtInTypeSpec(boolean addImagNode)
1182: throws RecognitionException, TokenStreamException {
1183:
1184: returnAST = null;
1185: ASTPair currentAST = new ASTPair();
1186: AST builtInTypeSpec_AST = null;
1187: Token lb = null;
1188: AST lb_AST = null;
1189:
1190: builtInType();
1191: astFactory.addASTChild(currentAST, returnAST);
1192: {
1193: _loop21: do {
1194: if ((LA(1) == LBRACK)) {
1195: lb = LT(1);
1196: lb_AST = astFactory.create(lb);
1197: astFactory.makeASTRoot(currentAST, lb_AST);
1198: match(LBRACK);
1199: if (inputState.guessing == 0) {
1200: lb_AST.setType(ARRAY_DECLARATOR);
1201: }
1202: AST tmp19_AST = null;
1203: tmp19_AST = astFactory.create(LT(1));
1204: astFactory.addASTChild(currentAST, tmp19_AST);
1205: match(RBRACK);
1206: } else {
1207: break _loop21;
1208: }
1209:
1210: } while (true);
1211: }
1212: if (inputState.guessing == 0) {
1213: builtInTypeSpec_AST = (AST) currentAST.root;
1214:
1215: if (addImagNode) {
1216: builtInTypeSpec_AST = (AST) astFactory
1217: .make((new ASTArray(2)).add(
1218: astFactory.create(TYPE, "TYPE")).add(
1219: builtInTypeSpec_AST));
1220: }
1221:
1222: currentAST.root = builtInTypeSpec_AST;
1223: currentAST.child = builtInTypeSpec_AST != null
1224: && builtInTypeSpec_AST.getFirstChild() != null ? builtInTypeSpec_AST
1225: .getFirstChild()
1226: : builtInTypeSpec_AST;
1227: currentAST.advanceChildToEnd();
1228: }
1229: builtInTypeSpec_AST = (AST) currentAST.root;
1230: returnAST = builtInTypeSpec_AST;
1231: }
1232:
1233: public final void builtInType() throws RecognitionException,
1234: TokenStreamException {
1235:
1236: returnAST = null;
1237: ASTPair currentAST = new ASTPair();
1238: AST builtInType_AST = null;
1239:
1240: switch (LA(1)) {
1241: case LITERAL_void: {
1242: AST tmp20_AST = null;
1243: tmp20_AST = astFactory.create(LT(1));
1244: astFactory.addASTChild(currentAST, tmp20_AST);
1245: match(LITERAL_void);
1246: builtInType_AST = (AST) currentAST.root;
1247: break;
1248: }
1249: case LITERAL_boolean: {
1250: AST tmp21_AST = null;
1251: tmp21_AST = astFactory.create(LT(1));
1252: astFactory.addASTChild(currentAST, tmp21_AST);
1253: match(LITERAL_boolean);
1254: builtInType_AST = (AST) currentAST.root;
1255: break;
1256: }
1257: case LITERAL_byte: {
1258: AST tmp22_AST = null;
1259: tmp22_AST = astFactory.create(LT(1));
1260: astFactory.addASTChild(currentAST, tmp22_AST);
1261: match(LITERAL_byte);
1262: builtInType_AST = (AST) currentAST.root;
1263: break;
1264: }
1265: case LITERAL_char: {
1266: AST tmp23_AST = null;
1267: tmp23_AST = astFactory.create(LT(1));
1268: astFactory.addASTChild(currentAST, tmp23_AST);
1269: match(LITERAL_char);
1270: builtInType_AST = (AST) currentAST.root;
1271: break;
1272: }
1273: case LITERAL_short: {
1274: AST tmp24_AST = null;
1275: tmp24_AST = astFactory.create(LT(1));
1276: astFactory.addASTChild(currentAST, tmp24_AST);
1277: match(LITERAL_short);
1278: builtInType_AST = (AST) currentAST.root;
1279: break;
1280: }
1281: case LITERAL_int: {
1282: AST tmp25_AST = null;
1283: tmp25_AST = astFactory.create(LT(1));
1284: astFactory.addASTChild(currentAST, tmp25_AST);
1285: match(LITERAL_int);
1286: builtInType_AST = (AST) currentAST.root;
1287: break;
1288: }
1289: case LITERAL_float: {
1290: AST tmp26_AST = null;
1291: tmp26_AST = astFactory.create(LT(1));
1292: astFactory.addASTChild(currentAST, tmp26_AST);
1293: match(LITERAL_float);
1294: builtInType_AST = (AST) currentAST.root;
1295: break;
1296: }
1297: case LITERAL_long: {
1298: AST tmp27_AST = null;
1299: tmp27_AST = astFactory.create(LT(1));
1300: astFactory.addASTChild(currentAST, tmp27_AST);
1301: match(LITERAL_long);
1302: builtInType_AST = (AST) currentAST.root;
1303: break;
1304: }
1305: case LITERAL_double: {
1306: AST tmp28_AST = null;
1307: tmp28_AST = astFactory.create(LT(1));
1308: astFactory.addASTChild(currentAST, tmp28_AST);
1309: match(LITERAL_double);
1310: builtInType_AST = (AST) currentAST.root;
1311: break;
1312: }
1313: default: {
1314: throw new NoViableAltException(LT(1), getFilename());
1315: }
1316: }
1317: returnAST = builtInType_AST;
1318: }
1319:
1320: public final void type() throws RecognitionException,
1321: TokenStreamException {
1322:
1323: returnAST = null;
1324: ASTPair currentAST = new ASTPair();
1325: AST type_AST = null;
1326:
1327: switch (LA(1)) {
1328: case IDENT: {
1329: identifier();
1330: astFactory.addASTChild(currentAST, returnAST);
1331: type_AST = (AST) currentAST.root;
1332: break;
1333: }
1334: case LITERAL_void:
1335: case LITERAL_boolean:
1336: case LITERAL_byte:
1337: case LITERAL_char:
1338: case LITERAL_short:
1339: case LITERAL_int:
1340: case LITERAL_float:
1341: case LITERAL_long:
1342: case LITERAL_double: {
1343: builtInType();
1344: astFactory.addASTChild(currentAST, returnAST);
1345: type_AST = (AST) currentAST.root;
1346: break;
1347: }
1348: default: {
1349: throw new NoViableAltException(LT(1), getFilename());
1350: }
1351: }
1352: returnAST = type_AST;
1353: }
1354:
1355: public final void modifier() throws RecognitionException,
1356: TokenStreamException {
1357:
1358: returnAST = null;
1359: ASTPair currentAST = new ASTPair();
1360: AST modifier_AST = null;
1361:
1362: switch (LA(1)) {
1363: case LITERAL_private: {
1364: AST tmp29_AST = null;
1365: tmp29_AST = astFactory.create(LT(1));
1366: astFactory.addASTChild(currentAST, tmp29_AST);
1367: match(LITERAL_private);
1368: modifier_AST = (AST) currentAST.root;
1369: break;
1370: }
1371: case LITERAL_public: {
1372: AST tmp30_AST = null;
1373: tmp30_AST = astFactory.create(LT(1));
1374: astFactory.addASTChild(currentAST, tmp30_AST);
1375: match(LITERAL_public);
1376: modifier_AST = (AST) currentAST.root;
1377: break;
1378: }
1379: case LITERAL_protected: {
1380: AST tmp31_AST = null;
1381: tmp31_AST = astFactory.create(LT(1));
1382: astFactory.addASTChild(currentAST, tmp31_AST);
1383: match(LITERAL_protected);
1384: modifier_AST = (AST) currentAST.root;
1385: break;
1386: }
1387: case LITERAL_static: {
1388: AST tmp32_AST = null;
1389: tmp32_AST = astFactory.create(LT(1));
1390: astFactory.addASTChild(currentAST, tmp32_AST);
1391: match(LITERAL_static);
1392: modifier_AST = (AST) currentAST.root;
1393: break;
1394: }
1395: case LITERAL_transient: {
1396: AST tmp33_AST = null;
1397: tmp33_AST = astFactory.create(LT(1));
1398: astFactory.addASTChild(currentAST, tmp33_AST);
1399: match(LITERAL_transient);
1400: modifier_AST = (AST) currentAST.root;
1401: break;
1402: }
1403: case FINAL: {
1404: AST tmp34_AST = null;
1405: tmp34_AST = astFactory.create(LT(1));
1406: astFactory.addASTChild(currentAST, tmp34_AST);
1407: match(FINAL);
1408: modifier_AST = (AST) currentAST.root;
1409: break;
1410: }
1411: case ABSTRACT: {
1412: AST tmp35_AST = null;
1413: tmp35_AST = astFactory.create(LT(1));
1414: astFactory.addASTChild(currentAST, tmp35_AST);
1415: match(ABSTRACT);
1416: modifier_AST = (AST) currentAST.root;
1417: break;
1418: }
1419: case LITERAL_native: {
1420: AST tmp36_AST = null;
1421: tmp36_AST = astFactory.create(LT(1));
1422: astFactory.addASTChild(currentAST, tmp36_AST);
1423: match(LITERAL_native);
1424: modifier_AST = (AST) currentAST.root;
1425: break;
1426: }
1427: case LITERAL_synchronized: {
1428: AST tmp37_AST = null;
1429: tmp37_AST = astFactory.create(LT(1));
1430: astFactory.addASTChild(currentAST, tmp37_AST);
1431: match(LITERAL_synchronized);
1432: modifier_AST = (AST) currentAST.root;
1433: break;
1434: }
1435: case LITERAL_volatile: {
1436: AST tmp38_AST = null;
1437: tmp38_AST = astFactory.create(LT(1));
1438: astFactory.addASTChild(currentAST, tmp38_AST);
1439: match(LITERAL_volatile);
1440: modifier_AST = (AST) currentAST.root;
1441: break;
1442: }
1443: case STRICTFP: {
1444: AST tmp39_AST = null;
1445: tmp39_AST = astFactory.create(LT(1));
1446: astFactory.addASTChild(currentAST, tmp39_AST);
1447: match(STRICTFP);
1448: modifier_AST = (AST) currentAST.root;
1449: break;
1450: }
1451: default: {
1452: throw new NoViableAltException(LT(1), getFilename());
1453: }
1454: }
1455: returnAST = modifier_AST;
1456: }
1457:
1458: public final void super ClassClause() throws RecognitionException,
1459: TokenStreamException {
1460:
1461: returnAST = null;
1462: ASTPair currentAST = new ASTPair();
1463: AST super ClassClause_AST = null;
1464: Token key = null;
1465: AST key_AST = null;
1466: AST id_AST = null;
1467:
1468: {
1469: switch (LA(1)) {
1470: case LITERAL_extends: {
1471: key = LT(1);
1472: key_AST = astFactory.create(key);
1473: match(LITERAL_extends);
1474: identifier();
1475: id_AST = (AST) returnAST;
1476: break;
1477: }
1478: case LCURLY:
1479: case LITERAL_implements : {
1480: break;
1481: }
1482: default: {
1483: throw new NoViableAltException(LT(1), getFilename());
1484: }
1485: }
1486: }
1487: if (inputState.guessing == 0) {
1488: super ClassClause_AST = (AST) currentAST.root;
1489: super ClassClause_AST = (AST) astFactory.make((new ASTArray(
1490: 3))
1491: .add(
1492: astFactory.create(EXTENDS_CLAUSE,
1493: "EXTENDS_CLAUSE")).add(key_AST)
1494: .add(id_AST));
1495: currentAST.root = super ClassClause_AST;
1496: currentAST.child = super ClassClause_AST != null
1497: && super ClassClause_AST.getFirstChild() != null ? super ClassClause_AST
1498: .getFirstChild()
1499: : super ClassClause_AST;
1500: currentAST.advanceChildToEnd();
1501: }
1502: returnAST = super ClassClause_AST;
1503: }
1504:
1505: public final void implements Clause() throws RecognitionException,
1506: TokenStreamException {
1507:
1508: returnAST = null;
1509: ASTPair currentAST = new ASTPair();
1510: AST implements Clause_AST = null;
1511:
1512: {
1513: switch (LA(1)) {
1514: case LITERAL_implements : {
1515: AST tmp40_AST = null;
1516: tmp40_AST = astFactory.create(LT(1));
1517: astFactory.addASTChild(currentAST, tmp40_AST);
1518: match(LITERAL_implements );
1519: identifier();
1520: astFactory.addASTChild(currentAST, returnAST);
1521: {
1522: _loop49: do {
1523: if ((LA(1) == COMMA)) {
1524: match(COMMA);
1525: identifier();
1526: astFactory.addASTChild(currentAST,
1527: returnAST);
1528: } else {
1529: break _loop49;
1530: }
1531:
1532: } while (true);
1533: }
1534: break;
1535: }
1536: case LCURLY: {
1537: break;
1538: }
1539: default: {
1540: throw new NoViableAltException(LT(1), getFilename());
1541: }
1542: }
1543: }
1544: if (inputState.guessing == 0) {
1545: implements Clause_AST = (AST) currentAST.root;
1546: implements Clause_AST = (AST) astFactory.make((new ASTArray(
1547: 2)).add(
1548: astFactory.create(IMPLEMENTS_CLAUSE,
1549: "IMPLEMENTS_CLAUSE")).add(
1550: implements Clause_AST));
1551: currentAST.root = implements Clause_AST;
1552: currentAST.child = implements Clause_AST != null
1553: && implements Clause_AST.getFirstChild() != null ? implements Clause_AST
1554: .getFirstChild()
1555: : implements Clause_AST;
1556: currentAST.advanceChildToEnd();
1557: }
1558: implements Clause_AST = (AST) currentAST.root;
1559: returnAST = implements Clause_AST;
1560: }
1561:
1562: public final void classBlock() throws RecognitionException,
1563: TokenStreamException {
1564:
1565: returnAST = null;
1566: ASTPair currentAST = new ASTPair();
1567: AST classBlock_AST = null;
1568: Token l = null;
1569: AST l_AST = null;
1570: Token r = null;
1571: AST r_AST = null;
1572:
1573: l = LT(1);
1574: l_AST = astFactory.create(l);
1575: astFactory.addASTChild(currentAST, l_AST);
1576: match(LCURLY);
1577: if (inputState.guessing == 0) {
1578: l_AST.setType(START_CLASS_BODY);
1579: }
1580: {
1581: _loop41: do {
1582: switch (LA(1)) {
1583: case FINAL:
1584: case ABSTRACT:
1585: case STRICTFP:
1586: case LITERAL_void:
1587: case LITERAL_boolean:
1588: case LITERAL_byte:
1589: case LITERAL_char:
1590: case LITERAL_short:
1591: case LITERAL_int:
1592: case LITERAL_float:
1593: case LITERAL_long:
1594: case LITERAL_double:
1595: case IDENT:
1596: case LITERAL_private:
1597: case LITERAL_public:
1598: case LITERAL_protected:
1599: case LITERAL_static:
1600: case LITERAL_transient:
1601: case LITERAL_native:
1602: case LITERAL_synchronized:
1603: case LITERAL_volatile:
1604: case LITERAL_class:
1605: case LITERAL_interface:
1606: case LCURLY: {
1607: field();
1608: astFactory.addASTChild(currentAST, returnAST);
1609: break;
1610: }
1611: case SEMI: {
1612: match(SEMI);
1613: break;
1614: }
1615: default: {
1616: break _loop41;
1617: }
1618: }
1619: } while (true);
1620: }
1621: r = LT(1);
1622: r_AST = astFactory.create(r);
1623: astFactory.addASTChild(currentAST, r_AST);
1624: match(RCURLY);
1625: if (inputState.guessing == 0) {
1626: r_AST.setType(END_CLASS_BODY);
1627: }
1628: if (inputState.guessing == 0) {
1629: classBlock_AST = (AST) currentAST.root;
1630: classBlock_AST = (AST) astFactory.make((new ASTArray(2))
1631: .add(astFactory.create(OBJBLOCK, "OBJBLOCK")).add(
1632: classBlock_AST));
1633: currentAST.root = classBlock_AST;
1634: currentAST.child = classBlock_AST != null
1635: && classBlock_AST.getFirstChild() != null ? classBlock_AST
1636: .getFirstChild()
1637: : classBlock_AST;
1638: currentAST.advanceChildToEnd();
1639: }
1640: classBlock_AST = (AST) currentAST.root;
1641: returnAST = classBlock_AST;
1642: }
1643:
1644: public final void interfaceExtends() throws RecognitionException,
1645: TokenStreamException {
1646:
1647: returnAST = null;
1648: ASTPair currentAST = new ASTPair();
1649: AST interfaceExtends_AST = null;
1650:
1651: {
1652: switch (LA(1)) {
1653: case LITERAL_extends: {
1654: AST tmp43_AST = null;
1655: tmp43_AST = astFactory.create(LT(1));
1656: astFactory.addASTChild(currentAST, tmp43_AST);
1657: match(LITERAL_extends);
1658: identifier();
1659: astFactory.addASTChild(currentAST, returnAST);
1660: {
1661: _loop45: do {
1662: if ((LA(1) == COMMA)) {
1663: match(COMMA);
1664: identifier();
1665: astFactory.addASTChild(currentAST,
1666: returnAST);
1667: } else {
1668: break _loop45;
1669: }
1670:
1671: } while (true);
1672: }
1673: break;
1674: }
1675: case LCURLY: {
1676: break;
1677: }
1678: default: {
1679: throw new NoViableAltException(LT(1), getFilename());
1680: }
1681: }
1682: }
1683: if (inputState.guessing == 0) {
1684: interfaceExtends_AST = (AST) currentAST.root;
1685: interfaceExtends_AST = (AST) astFactory.make((new ASTArray(
1686: 2))
1687: .add(
1688: astFactory.create(EXTENDS_CLAUSE,
1689: "EXTENDS_CLAUSE")).add(
1690: interfaceExtends_AST));
1691: currentAST.root = interfaceExtends_AST;
1692: currentAST.child = interfaceExtends_AST != null
1693: && interfaceExtends_AST.getFirstChild() != null ? interfaceExtends_AST
1694: .getFirstChild()
1695: : interfaceExtends_AST;
1696: currentAST.advanceChildToEnd();
1697: }
1698: interfaceExtends_AST = (AST) currentAST.root;
1699: returnAST = interfaceExtends_AST;
1700: }
1701:
1702: public final void ctorHead() throws RecognitionException,
1703: TokenStreamException {
1704:
1705: returnAST = null;
1706: ASTPair currentAST = new ASTPair();
1707: AST ctorHead_AST = null;
1708:
1709: AST tmp45_AST = null;
1710: tmp45_AST = astFactory.create(LT(1));
1711: astFactory.addASTChild(currentAST, tmp45_AST);
1712: match(IDENT);
1713: AST tmp46_AST = null;
1714: tmp46_AST = astFactory.create(LT(1));
1715: astFactory.addASTChild(currentAST, tmp46_AST);
1716: match(LPAREN);
1717: parameterDeclarationList();
1718: astFactory.addASTChild(currentAST, returnAST);
1719: AST tmp47_AST = null;
1720: tmp47_AST = astFactory.create(LT(1));
1721: astFactory.addASTChild(currentAST, tmp47_AST);
1722: match(RPAREN);
1723: {
1724: switch (LA(1)) {
1725: case LITERAL_throws: {
1726: throwsClause();
1727: astFactory.addASTChild(currentAST, returnAST);
1728: break;
1729: }
1730: case LCURLY: {
1731: break;
1732: }
1733: default: {
1734: throw new NoViableAltException(LT(1), getFilename());
1735: }
1736: }
1737: }
1738: ctorHead_AST = (AST) currentAST.root;
1739: returnAST = ctorHead_AST;
1740: }
1741:
1742: public final void constructorBody() throws RecognitionException,
1743: TokenStreamException {
1744:
1745: returnAST = null;
1746: ASTPair currentAST = new ASTPair();
1747: AST constructorBody_AST = null;
1748: Token lc = null;
1749: AST lc_AST = null;
1750: Token rc = null;
1751: AST rc_AST = null;
1752:
1753: lc = LT(1);
1754: lc_AST = astFactory.create(lc);
1755: astFactory.makeASTRoot(currentAST, lc_AST);
1756: match(LCURLY);
1757: if (inputState.guessing == 0) {
1758: lc_AST.setType(SLIST);
1759: }
1760: if (inputState.guessing == 0) {
1761: CheckForScarf(true);
1762: }
1763: {
1764: boolean synPredMatched58 = false;
1765: if (((_tokenSet_8.member(LA(1))) && (_tokenSet_9
1766: .member(LA(2))))) {
1767: int _m58 = mark();
1768: synPredMatched58 = true;
1769: inputState.guessing++;
1770: try {
1771: {
1772: explicitConstructorInvocation();
1773: }
1774: } catch (RecognitionException pe) {
1775: synPredMatched58 = false;
1776: }
1777: rewind(_m58);
1778: inputState.guessing--;
1779: }
1780: if (synPredMatched58) {
1781: explicitConstructorInvocation();
1782: astFactory.addASTChild(currentAST, returnAST);
1783: } else if ((_tokenSet_10.member(LA(1)))
1784: && (_tokenSet_11.member(LA(2)))) {
1785: } else {
1786: throw new NoViableAltException(LT(1), getFilename());
1787: }
1788:
1789: }
1790: {
1791: _loop60: do {
1792: if ((_tokenSet_12.member(LA(1)))) {
1793: statement();
1794: astFactory.addASTChild(currentAST, returnAST);
1795: } else {
1796: break _loop60;
1797: }
1798:
1799: } while (true);
1800: }
1801: rc = LT(1);
1802: rc_AST = astFactory.create(rc);
1803: astFactory.addASTChild(currentAST, rc_AST);
1804: match(RCURLY);
1805: if (inputState.guessing == 0) {
1806: rc_AST.setType(END_SLIST);
1807: }
1808: constructorBody_AST = (AST) currentAST.root;
1809: returnAST = constructorBody_AST;
1810: }
1811:
1812: public final void parameterDeclarationList()
1813: throws RecognitionException, TokenStreamException {
1814:
1815: returnAST = null;
1816: ASTPair currentAST = new ASTPair();
1817: AST parameterDeclarationList_AST = null;
1818:
1819: {
1820: switch (LA(1)) {
1821: case FINAL:
1822: case LITERAL_void:
1823: case LITERAL_boolean:
1824: case LITERAL_byte:
1825: case LITERAL_char:
1826: case LITERAL_short:
1827: case LITERAL_int:
1828: case LITERAL_float:
1829: case LITERAL_long:
1830: case LITERAL_double:
1831: case IDENT: {
1832: parameterDeclaration();
1833: astFactory.addASTChild(currentAST, returnAST);
1834: {
1835: _loop86: do {
1836: if ((LA(1) == COMMA)) {
1837: match(COMMA);
1838: parameterDeclaration();
1839: astFactory.addASTChild(currentAST,
1840: returnAST);
1841: } else {
1842: break _loop86;
1843: }
1844:
1845: } while (true);
1846: }
1847: break;
1848: }
1849: case RPAREN: {
1850: break;
1851: }
1852: default: {
1853: throw new NoViableAltException(LT(1), getFilename());
1854: }
1855: }
1856: }
1857: if (inputState.guessing == 0) {
1858: parameterDeclarationList_AST = (AST) currentAST.root;
1859: parameterDeclarationList_AST = (AST) astFactory
1860: .make((new ASTArray(2))
1861: .add(
1862: astFactory.create(PARAMETERS,
1863: "PARAMETERS")).add(
1864: parameterDeclarationList_AST));
1865: currentAST.root = parameterDeclarationList_AST;
1866: currentAST.child = parameterDeclarationList_AST != null
1867: && parameterDeclarationList_AST.getFirstChild() != null ? parameterDeclarationList_AST
1868: .getFirstChild()
1869: : parameterDeclarationList_AST;
1870: currentAST.advanceChildToEnd();
1871: }
1872: parameterDeclarationList_AST = (AST) currentAST.root;
1873: returnAST = parameterDeclarationList_AST;
1874: }
1875:
1876: public final void declaratorBrackets(AST typ)
1877: throws RecognitionException, TokenStreamException {
1878:
1879: returnAST = null;
1880: ASTPair currentAST = new ASTPair();
1881: AST declaratorBrackets_AST = null;
1882: Token lb = null;
1883: AST lb_AST = null;
1884:
1885: if (inputState.guessing == 0) {
1886: declaratorBrackets_AST = (AST) currentAST.root;
1887: declaratorBrackets_AST = typ;
1888: currentAST.root = declaratorBrackets_AST;
1889: currentAST.child = declaratorBrackets_AST != null
1890: && declaratorBrackets_AST.getFirstChild() != null ? declaratorBrackets_AST
1891: .getFirstChild()
1892: : declaratorBrackets_AST;
1893: currentAST.advanceChildToEnd();
1894: }
1895: {
1896: _loop69: do {
1897: if ((LA(1) == LBRACK)) {
1898: lb = LT(1);
1899: lb_AST = astFactory.create(lb);
1900: astFactory.makeASTRoot(currentAST, lb_AST);
1901: match(LBRACK);
1902: if (inputState.guessing == 0) {
1903: lb_AST.setType(ARRAY_DECLARATOR);
1904: }
1905: AST tmp49_AST = null;
1906: tmp49_AST = astFactory.create(LT(1));
1907: astFactory.addASTChild(currentAST, tmp49_AST);
1908: match(RBRACK);
1909: } else {
1910: break _loop69;
1911: }
1912:
1913: } while (true);
1914: }
1915: declaratorBrackets_AST = (AST) currentAST.root;
1916: returnAST = declaratorBrackets_AST;
1917: }
1918:
1919: public final void throwsClause() throws RecognitionException,
1920: TokenStreamException {
1921:
1922: returnAST = null;
1923: ASTPair currentAST = new ASTPair();
1924: AST throwsClause_AST = null;
1925:
1926: AST tmp50_AST = null;
1927: tmp50_AST = astFactory.create(LT(1));
1928: astFactory.makeASTRoot(currentAST, tmp50_AST);
1929: match(LITERAL_throws);
1930: identifier();
1931: astFactory.addASTChild(currentAST, returnAST);
1932: {
1933: _loop82: do {
1934: if ((LA(1) == COMMA)) {
1935: match(COMMA);
1936: identifier();
1937: astFactory.addASTChild(currentAST, returnAST);
1938: } else {
1939: break _loop82;
1940: }
1941:
1942: } while (true);
1943: }
1944: throwsClause_AST = (AST) currentAST.root;
1945: returnAST = throwsClause_AST;
1946: }
1947:
1948: public final void compoundStatement(boolean isMethod)
1949: throws RecognitionException, TokenStreamException {
1950:
1951: returnAST = null;
1952: ASTPair currentAST = new ASTPair();
1953: AST compoundStatement_AST = null;
1954: Token lc = null;
1955: AST lc_AST = null;
1956: Token rc = null;
1957: AST rc_AST = null;
1958:
1959: lc = LT(1);
1960: lc_AST = astFactory.create(lc);
1961: astFactory.makeASTRoot(currentAST, lc_AST);
1962: match(LCURLY);
1963: if (inputState.guessing == 0) {
1964: lc_AST.setType(SLIST);
1965: }
1966: if (inputState.guessing == 0) {
1967: CheckForScarf(isMethod);
1968: }
1969: {
1970: _loop92: do {
1971: if ((_tokenSet_12.member(LA(1)))) {
1972: statement();
1973: astFactory.addASTChild(currentAST, returnAST);
1974: } else {
1975: break _loop92;
1976: }
1977:
1978: } while (true);
1979: }
1980: rc = LT(1);
1981: rc_AST = astFactory.create(rc);
1982: astFactory.addASTChild(currentAST, rc_AST);
1983: match(RCURLY);
1984: if (inputState.guessing == 0) {
1985: rc_AST.setType(END_SLIST);
1986: }
1987: compoundStatement_AST = (AST) currentAST.root;
1988: returnAST = compoundStatement_AST;
1989: }
1990:
1991: public final void explicitConstructorInvocation()
1992: throws RecognitionException, TokenStreamException {
1993:
1994: returnAST = null;
1995: ASTPair currentAST = new ASTPair();
1996: AST explicitConstructorInvocation_AST = null;
1997: Token lp1 = null;
1998: AST lp1_AST = null;
1999: Token lp2 = null;
2000: AST lp2_AST = null;
2001: Token lp3 = null;
2002: AST lp3_AST = null;
2003:
2004: {
2005: if ((LA(1) == LITERAL_this ) && (LA(2) == LPAREN)) {
2006: match(LITERAL_this );
2007: lp1 = LT(1);
2008: lp1_AST = astFactory.create(lp1);
2009: astFactory.makeASTRoot(currentAST, lp1_AST);
2010: match(LPAREN);
2011: argList();
2012: astFactory.addASTChild(currentAST, returnAST);
2013: match(RPAREN);
2014: match(SEMI);
2015: if (inputState.guessing == 0) {
2016: lp1_AST.setType(CTOR_CALL);
2017: }
2018: } else if ((LA(1) == LITERAL_super ) && (LA(2) == LPAREN)) {
2019: match(LITERAL_super );
2020: lp2 = LT(1);
2021: lp2_AST = astFactory.create(lp2);
2022: astFactory.makeASTRoot(currentAST, lp2_AST);
2023: match(LPAREN);
2024: argList();
2025: astFactory.addASTChild(currentAST, returnAST);
2026: match(RPAREN);
2027: match(SEMI);
2028: if (inputState.guessing == 0) {
2029: lp2_AST.setType(SUPER_CTOR_CALL);
2030: }
2031: } else if ((_tokenSet_8.member(LA(1)))
2032: && (_tokenSet_9.member(LA(2)))) {
2033: primaryExpression();
2034: astFactory.addASTChild(currentAST, returnAST);
2035: match(DOT);
2036: match(LITERAL_super );
2037: lp3 = LT(1);
2038: lp3_AST = astFactory.create(lp3);
2039: astFactory.makeASTRoot(currentAST, lp3_AST);
2040: match(LPAREN);
2041: argList();
2042: astFactory.addASTChild(currentAST, returnAST);
2043: match(RPAREN);
2044: match(SEMI);
2045: if (inputState.guessing == 0) {
2046: lp3_AST.setType(SUPER_CTOR_CALL);
2047: }
2048: } else {
2049: throw new NoViableAltException(LT(1), getFilename());
2050: }
2051:
2052: }
2053: explicitConstructorInvocation_AST = (AST) currentAST.root;
2054: returnAST = explicitConstructorInvocation_AST;
2055: }
2056:
2057: public final void statement() throws RecognitionException,
2058: TokenStreamException {
2059:
2060: returnAST = null;
2061: ASTPair currentAST = new ASTPair();
2062: AST statement_AST = null;
2063: AST d_AST = null;
2064: Token ds = null;
2065: AST ds_AST = null;
2066: AST m_AST = null;
2067: Token c = null;
2068: AST c_AST = null;
2069: Token s = null;
2070: AST s_AST = null;
2071:
2072: switch (LA(1)) {
2073: case LCURLY: {
2074: compoundStatement(false);
2075: astFactory.addASTChild(currentAST, returnAST);
2076: statement_AST = (AST) currentAST.root;
2077: break;
2078: }
2079: case LITERAL_if: {
2080: AST tmp62_AST = null;
2081: tmp62_AST = astFactory.create(LT(1));
2082: astFactory.makeASTRoot(currentAST, tmp62_AST);
2083: match(LITERAL_if);
2084: match(LPAREN);
2085: expression();
2086: astFactory.addASTChild(currentAST, returnAST);
2087: match(RPAREN);
2088: statement();
2089: astFactory.addASTChild(currentAST, returnAST);
2090: {
2091: if ((LA(1) == LITERAL_else)
2092: && (_tokenSet_12.member(LA(2)))) {
2093: AST tmp65_AST = null;
2094: tmp65_AST = astFactory.create(LT(1));
2095: astFactory.addASTChild(currentAST, tmp65_AST);
2096: match(LITERAL_else);
2097: statement();
2098: astFactory.addASTChild(currentAST, returnAST);
2099: } else if ((_tokenSet_13.member(LA(1)))
2100: && (_tokenSet_14.member(LA(2)))) {
2101: } else {
2102: throw new NoViableAltException(LT(1), getFilename());
2103: }
2104:
2105: }
2106: statement_AST = (AST) currentAST.root;
2107: break;
2108: }
2109: case LITERAL_for: {
2110: AST tmp66_AST = null;
2111: tmp66_AST = astFactory.create(LT(1));
2112: astFactory.makeASTRoot(currentAST, tmp66_AST);
2113: match(LITERAL_for);
2114: match(LPAREN);
2115: forInit();
2116: astFactory.addASTChild(currentAST, returnAST);
2117: AST tmp68_AST = null;
2118: tmp68_AST = astFactory.create(LT(1));
2119: astFactory.addASTChild(currentAST, tmp68_AST);
2120: match(SEMI);
2121: forCond();
2122: astFactory.addASTChild(currentAST, returnAST);
2123: AST tmp69_AST = null;
2124: tmp69_AST = astFactory.create(LT(1));
2125: astFactory.addASTChild(currentAST, tmp69_AST);
2126: match(SEMI);
2127: forIter();
2128: astFactory.addASTChild(currentAST, returnAST);
2129: match(RPAREN);
2130: statement();
2131: astFactory.addASTChild(currentAST, returnAST);
2132: statement_AST = (AST) currentAST.root;
2133: break;
2134: }
2135: case LITERAL_while: {
2136: AST tmp71_AST = null;
2137: tmp71_AST = astFactory.create(LT(1));
2138: astFactory.makeASTRoot(currentAST, tmp71_AST);
2139: match(LITERAL_while);
2140: match(LPAREN);
2141: expression();
2142: astFactory.addASTChild(currentAST, returnAST);
2143: match(RPAREN);
2144: statement();
2145: astFactory.addASTChild(currentAST, returnAST);
2146: statement_AST = (AST) currentAST.root;
2147: break;
2148: }
2149: case LITERAL_do: {
2150: AST tmp74_AST = null;
2151: tmp74_AST = astFactory.create(LT(1));
2152: astFactory.makeASTRoot(currentAST, tmp74_AST);
2153: match(LITERAL_do);
2154: statement();
2155: astFactory.addASTChild(currentAST, returnAST);
2156: match(LITERAL_while);
2157: match(LPAREN);
2158: expression();
2159: astFactory.addASTChild(currentAST, returnAST);
2160: match(RPAREN);
2161: match(SEMI);
2162: statement_AST = (AST) currentAST.root;
2163: break;
2164: }
2165: case LITERAL_break: {
2166: AST tmp79_AST = null;
2167: tmp79_AST = astFactory.create(LT(1));
2168: astFactory.makeASTRoot(currentAST, tmp79_AST);
2169: match(LITERAL_break);
2170: {
2171: switch (LA(1)) {
2172: case IDENT: {
2173: AST tmp80_AST = null;
2174: tmp80_AST = astFactory.create(LT(1));
2175: astFactory.addASTChild(currentAST, tmp80_AST);
2176: match(IDENT);
2177: break;
2178: }
2179: case SEMI: {
2180: break;
2181: }
2182: default: {
2183: throw new NoViableAltException(LT(1), getFilename());
2184: }
2185: }
2186: }
2187: match(SEMI);
2188: statement_AST = (AST) currentAST.root;
2189: break;
2190: }
2191: case LITERAL_continue: {
2192: AST tmp82_AST = null;
2193: tmp82_AST = astFactory.create(LT(1));
2194: astFactory.makeASTRoot(currentAST, tmp82_AST);
2195: match(LITERAL_continue);
2196: {
2197: switch (LA(1)) {
2198: case IDENT: {
2199: AST tmp83_AST = null;
2200: tmp83_AST = astFactory.create(LT(1));
2201: astFactory.addASTChild(currentAST, tmp83_AST);
2202: match(IDENT);
2203: break;
2204: }
2205: case SEMI: {
2206: break;
2207: }
2208: default: {
2209: throw new NoViableAltException(LT(1), getFilename());
2210: }
2211: }
2212: }
2213: match(SEMI);
2214: statement_AST = (AST) currentAST.root;
2215: break;
2216: }
2217: case LITERAL_return: {
2218: AST tmp85_AST = null;
2219: tmp85_AST = astFactory.create(LT(1));
2220: astFactory.makeASTRoot(currentAST, tmp85_AST);
2221: match(LITERAL_return);
2222: {
2223: switch (LA(1)) {
2224: case LITERAL_void:
2225: case LITERAL_boolean:
2226: case LITERAL_byte:
2227: case LITERAL_char:
2228: case LITERAL_short:
2229: case LITERAL_int:
2230: case LITERAL_float:
2231: case LITERAL_long:
2232: case LITERAL_double:
2233: case IDENT:
2234: case LPAREN:
2235: case LITERAL_this :
2236: case LITERAL_super :
2237: case PLUS:
2238: case MINUS:
2239: case INC:
2240: case DEC:
2241: case BNOT:
2242: case LNOT:
2243: case LITERAL_true:
2244: case LITERAL_false:
2245: case LITERAL_null:
2246: case LITERAL_new:
2247: case NUM_INT:
2248: case CHAR_LITERAL:
2249: case STRING_LITERAL:
2250: case NUM_FLOAT:
2251: case NUM_LONG:
2252: case NUM_DOUBLE: {
2253: expression();
2254: astFactory.addASTChild(currentAST, returnAST);
2255: break;
2256: }
2257: case SEMI: {
2258: break;
2259: }
2260: default: {
2261: throw new NoViableAltException(LT(1), getFilename());
2262: }
2263: }
2264: }
2265: match(SEMI);
2266: statement_AST = (AST) currentAST.root;
2267: break;
2268: }
2269: case LITERAL_switch: {
2270: AST tmp87_AST = null;
2271: tmp87_AST = astFactory.create(LT(1));
2272: astFactory.makeASTRoot(currentAST, tmp87_AST);
2273: match(LITERAL_switch);
2274: match(LPAREN);
2275: expression();
2276: astFactory.addASTChild(currentAST, returnAST);
2277: match(RPAREN);
2278: match(LCURLY);
2279: {
2280: _loop101: do {
2281: if ((LA(1) == LITERAL_case || LA(1) == LITERAL_default)) {
2282: casesGroup();
2283: astFactory.addASTChild(currentAST, returnAST);
2284: } else {
2285: break _loop101;
2286: }
2287:
2288: } while (true);
2289: }
2290: match(RCURLY);
2291: statement_AST = (AST) currentAST.root;
2292: break;
2293: }
2294: case LITERAL_try: {
2295: tryBlock();
2296: astFactory.addASTChild(currentAST, returnAST);
2297: statement_AST = (AST) currentAST.root;
2298: break;
2299: }
2300: case LITERAL_throw: {
2301: AST tmp92_AST = null;
2302: tmp92_AST = astFactory.create(LT(1));
2303: astFactory.makeASTRoot(currentAST, tmp92_AST);
2304: match(LITERAL_throw);
2305: expression();
2306: astFactory.addASTChild(currentAST, returnAST);
2307: match(SEMI);
2308: statement_AST = (AST) currentAST.root;
2309: break;
2310: }
2311: case SEMI: {
2312: s = LT(1);
2313: s_AST = astFactory.create(s);
2314: astFactory.addASTChild(currentAST, s_AST);
2315: match(SEMI);
2316: if (inputState.guessing == 0) {
2317: s_AST.setType(EMPTY_STAT);
2318: }
2319: statement_AST = (AST) currentAST.root;
2320: break;
2321: }
2322: default:
2323: boolean synPredMatched95 = false;
2324: if (((_tokenSet_15.member(LA(1))) && (_tokenSet_16
2325: .member(LA(2))))) {
2326: int _m95 = mark();
2327: synPredMatched95 = true;
2328: inputState.guessing++;
2329: try {
2330: {
2331: declaration();
2332: }
2333: } catch (RecognitionException pe) {
2334: synPredMatched95 = false;
2335: }
2336: rewind(_m95);
2337: inputState.guessing--;
2338: }
2339: if (synPredMatched95) {
2340: declaration();
2341: d_AST = (AST) returnAST;
2342: astFactory.addASTChild(currentAST, returnAST);
2343: ds = LT(1);
2344: ds_AST = astFactory.create(ds);
2345: match(SEMI);
2346: if (inputState.guessing == 0) {
2347: d_AST.addChild(ds_AST);
2348: }
2349: statement_AST = (AST) currentAST.root;
2350: } else if ((_tokenSet_17.member(LA(1)))
2351: && (_tokenSet_18.member(LA(2)))) {
2352: expression();
2353: astFactory.addASTChild(currentAST, returnAST);
2354: match(SEMI);
2355: statement_AST = (AST) currentAST.root;
2356: } else if ((_tokenSet_19.member(LA(1)))
2357: && (_tokenSet_20.member(LA(2)))) {
2358: modifiers();
2359: m_AST = (AST) returnAST;
2360: classDefinition(m_AST);
2361: astFactory.addASTChild(currentAST, returnAST);
2362: statement_AST = (AST) currentAST.root;
2363: } else if ((LA(1) == IDENT) && (LA(2) == COLON)) {
2364: AST tmp95_AST = null;
2365: tmp95_AST = astFactory.create(LT(1));
2366: astFactory.addASTChild(currentAST, tmp95_AST);
2367: match(IDENT);
2368: c = LT(1);
2369: c_AST = astFactory.create(c);
2370: astFactory.makeASTRoot(currentAST, c_AST);
2371: match(COLON);
2372: if (inputState.guessing == 0) {
2373: c_AST.setType(LABELED_STAT);
2374: }
2375: statement();
2376: astFactory.addASTChild(currentAST, returnAST);
2377: statement_AST = (AST) currentAST.root;
2378: } else if ((LA(1) == LITERAL_synchronized)
2379: && (LA(2) == LPAREN)) {
2380: AST tmp96_AST = null;
2381: tmp96_AST = astFactory.create(LT(1));
2382: astFactory.makeASTRoot(currentAST, tmp96_AST);
2383: match(LITERAL_synchronized);
2384: match(LPAREN);
2385: expression();
2386: astFactory.addASTChild(currentAST, returnAST);
2387: match(RPAREN);
2388: compoundStatement(false);
2389: astFactory.addASTChild(currentAST, returnAST);
2390: statement_AST = (AST) currentAST.root;
2391: } else {
2392: throw new NoViableAltException(LT(1), getFilename());
2393: }
2394: }
2395: returnAST = statement_AST;
2396: }
2397:
2398: public final void argList() throws RecognitionException,
2399: TokenStreamException {
2400:
2401: returnAST = null;
2402: ASTPair currentAST = new ASTPair();
2403: AST argList_AST = null;
2404:
2405: {
2406: switch (LA(1)) {
2407: case LITERAL_void:
2408: case LITERAL_boolean:
2409: case LITERAL_byte:
2410: case LITERAL_char:
2411: case LITERAL_short:
2412: case LITERAL_int:
2413: case LITERAL_float:
2414: case LITERAL_long:
2415: case LITERAL_double:
2416: case IDENT:
2417: case LPAREN:
2418: case LITERAL_this :
2419: case LITERAL_super :
2420: case PLUS:
2421: case MINUS:
2422: case INC:
2423: case DEC:
2424: case BNOT:
2425: case LNOT:
2426: case LITERAL_true:
2427: case LITERAL_false:
2428: case LITERAL_null:
2429: case LITERAL_new:
2430: case NUM_INT:
2431: case CHAR_LITERAL:
2432: case STRING_LITERAL:
2433: case NUM_FLOAT:
2434: case NUM_LONG:
2435: case NUM_DOUBLE: {
2436: expressionList();
2437: astFactory.addASTChild(currentAST, returnAST);
2438: break;
2439: }
2440: case RPAREN: {
2441: if (inputState.guessing == 0) {
2442: argList_AST = (AST) currentAST.root;
2443: argList_AST = astFactory.create(ELIST, "ELIST");
2444: currentAST.root = argList_AST;
2445: currentAST.child = argList_AST != null
2446: && argList_AST.getFirstChild() != null ? argList_AST
2447: .getFirstChild()
2448: : argList_AST;
2449: currentAST.advanceChildToEnd();
2450: }
2451: break;
2452: }
2453: default: {
2454: throw new NoViableAltException(LT(1), getFilename());
2455: }
2456: }
2457: }
2458: argList_AST = (AST) currentAST.root;
2459: returnAST = argList_AST;
2460: }
2461:
2462: public final void primaryExpression() throws RecognitionException,
2463: TokenStreamException {
2464:
2465: returnAST = null;
2466: ASTPair currentAST = new ASTPair();
2467: AST primaryExpression_AST = null;
2468: Token lp = null;
2469: AST lp_AST = null;
2470: AST a_AST = null;
2471: Token rp = null;
2472: AST rp_AST = null;
2473: Token lbt = null;
2474: AST lbt_AST = null;
2475:
2476: switch (LA(1)) {
2477: case IDENT: {
2478: AST tmp99_AST = null;
2479: tmp99_AST = astFactory.create(LT(1));
2480: astFactory.addASTChild(currentAST, tmp99_AST);
2481: match(IDENT);
2482: primaryExpression_AST = (AST) currentAST.root;
2483: break;
2484: }
2485: case NUM_INT:
2486: case CHAR_LITERAL:
2487: case STRING_LITERAL:
2488: case NUM_FLOAT:
2489: case NUM_LONG:
2490: case NUM_DOUBLE: {
2491: constant();
2492: astFactory.addASTChild(currentAST, returnAST);
2493: primaryExpression_AST = (AST) currentAST.root;
2494: break;
2495: }
2496: case LITERAL_true: {
2497: AST tmp100_AST = null;
2498: tmp100_AST = astFactory.create(LT(1));
2499: astFactory.addASTChild(currentAST, tmp100_AST);
2500: match(LITERAL_true);
2501: primaryExpression_AST = (AST) currentAST.root;
2502: break;
2503: }
2504: case LITERAL_false: {
2505: AST tmp101_AST = null;
2506: tmp101_AST = astFactory.create(LT(1));
2507: astFactory.addASTChild(currentAST, tmp101_AST);
2508: match(LITERAL_false);
2509: primaryExpression_AST = (AST) currentAST.root;
2510: break;
2511: }
2512: case LITERAL_this : {
2513: AST tmp102_AST = null;
2514: tmp102_AST = astFactory.create(LT(1));
2515: astFactory.addASTChild(currentAST, tmp102_AST);
2516: match(LITERAL_this );
2517: primaryExpression_AST = (AST) currentAST.root;
2518: break;
2519: }
2520: case LITERAL_null: {
2521: AST tmp103_AST = null;
2522: tmp103_AST = astFactory.create(LT(1));
2523: astFactory.addASTChild(currentAST, tmp103_AST);
2524: match(LITERAL_null);
2525: primaryExpression_AST = (AST) currentAST.root;
2526: break;
2527: }
2528: case LITERAL_new: {
2529: newExpression();
2530: astFactory.addASTChild(currentAST, returnAST);
2531: primaryExpression_AST = (AST) currentAST.root;
2532: break;
2533: }
2534: case LPAREN: {
2535: lp = LT(1);
2536: lp_AST = astFactory.create(lp);
2537: astFactory.makeASTRoot(currentAST, lp_AST);
2538: match(LPAREN);
2539: assignmentExpression();
2540: a_AST = (AST) returnAST;
2541: astFactory.addASTChild(currentAST, returnAST);
2542: rp = LT(1);
2543: rp_AST = astFactory.create(rp);
2544: astFactory.addASTChild(currentAST, rp_AST);
2545: match(RPAREN);
2546: primaryExpression_AST = (AST) currentAST.root;
2547: break;
2548: }
2549: case LITERAL_super : {
2550: AST tmp104_AST = null;
2551: tmp104_AST = astFactory.create(LT(1));
2552: astFactory.addASTChild(currentAST, tmp104_AST);
2553: match(LITERAL_super );
2554: primaryExpression_AST = (AST) currentAST.root;
2555: break;
2556: }
2557: case LITERAL_void:
2558: case LITERAL_boolean:
2559: case LITERAL_byte:
2560: case LITERAL_char:
2561: case LITERAL_short:
2562: case LITERAL_int:
2563: case LITERAL_float:
2564: case LITERAL_long:
2565: case LITERAL_double: {
2566: builtInType();
2567: astFactory.addASTChild(currentAST, returnAST);
2568: {
2569: _loop183: do {
2570: if ((LA(1) == LBRACK)) {
2571: lbt = LT(1);
2572: lbt_AST = astFactory.create(lbt);
2573: astFactory.makeASTRoot(currentAST, lbt_AST);
2574: match(LBRACK);
2575: if (inputState.guessing == 0) {
2576: lbt_AST.setType(ARRAY_DECLARATOR);
2577: }
2578: AST tmp105_AST = null;
2579: tmp105_AST = astFactory.create(LT(1));
2580: astFactory.addASTChild(currentAST, tmp105_AST);
2581: match(RBRACK);
2582: } else {
2583: break _loop183;
2584: }
2585:
2586: } while (true);
2587: }
2588: AST tmp106_AST = null;
2589: tmp106_AST = astFactory.create(LT(1));
2590: astFactory.makeASTRoot(currentAST, tmp106_AST);
2591: match(DOT);
2592: AST tmp107_AST = null;
2593: tmp107_AST = astFactory.create(LT(1));
2594: astFactory.addASTChild(currentAST, tmp107_AST);
2595: match(LITERAL_class);
2596: primaryExpression_AST = (AST) currentAST.root;
2597: break;
2598: }
2599: default: {
2600: throw new NoViableAltException(LT(1), getFilename());
2601: }
2602: }
2603: returnAST = primaryExpression_AST;
2604: }
2605:
2606: /** Declaration of a variable. This can be a class/instance variable,
2607: * or a local variable in a method
2608: * It can also include possible initialization.
2609: */
2610: public final void variableDeclarator(AST mods, AST t)
2611: throws RecognitionException, TokenStreamException {
2612:
2613: returnAST = null;
2614: ASTPair currentAST = new ASTPair();
2615: AST variableDeclarator_AST = null;
2616: Token id = null;
2617: AST id_AST = null;
2618: AST d_AST = null;
2619: AST v_AST = null;
2620:
2621: id = LT(1);
2622: id_AST = astFactory.create(id);
2623: match(IDENT);
2624: declaratorBrackets(t);
2625: d_AST = (AST) returnAST;
2626: varInitializer();
2627: v_AST = (AST) returnAST;
2628: if (inputState.guessing == 0) {
2629: variableDeclarator_AST = (AST) currentAST.root;
2630: variableDeclarator_AST = (AST) astFactory
2631: .make((new ASTArray(5))
2632: .add(
2633: astFactory.create(VARIABLE_DEF,
2634: "VARIABLE_DEF"))
2635: .add(mods)
2636: .add(
2637: (AST) astFactory
2638: .make((new ASTArray(2))
2639: .add(
2640: astFactory
2641: .create(
2642: TYPE,
2643: "TYPE"))
2644: .add(d_AST))).add(
2645: id_AST).add(v_AST));
2646: currentAST.root = variableDeclarator_AST;
2647: currentAST.child = variableDeclarator_AST != null
2648: && variableDeclarator_AST.getFirstChild() != null ? variableDeclarator_AST
2649: .getFirstChild()
2650: : variableDeclarator_AST;
2651: currentAST.advanceChildToEnd();
2652: }
2653: returnAST = variableDeclarator_AST;
2654: }
2655:
2656: public final void varInitializer() throws RecognitionException,
2657: TokenStreamException {
2658:
2659: returnAST = null;
2660: ASTPair currentAST = new ASTPair();
2661: AST varInitializer_AST = null;
2662:
2663: {
2664: switch (LA(1)) {
2665: case ASSIGN: {
2666: AST tmp108_AST = null;
2667: tmp108_AST = astFactory.create(LT(1));
2668: astFactory.makeASTRoot(currentAST, tmp108_AST);
2669: match(ASSIGN);
2670: initializer();
2671: astFactory.addASTChild(currentAST, returnAST);
2672: break;
2673: }
2674: case SEMI:
2675: case COMMA: {
2676: break;
2677: }
2678: default: {
2679: throw new NoViableAltException(LT(1), getFilename());
2680: }
2681: }
2682: }
2683: varInitializer_AST = (AST) currentAST.root;
2684: returnAST = varInitializer_AST;
2685: }
2686:
2687: public final void initializer() throws RecognitionException,
2688: TokenStreamException {
2689:
2690: returnAST = null;
2691: ASTPair currentAST = new ASTPair();
2692: AST initializer_AST = null;
2693:
2694: switch (LA(1)) {
2695: case LITERAL_void:
2696: case LITERAL_boolean:
2697: case LITERAL_byte:
2698: case LITERAL_char:
2699: case LITERAL_short:
2700: case LITERAL_int:
2701: case LITERAL_float:
2702: case LITERAL_long:
2703: case LITERAL_double:
2704: case IDENT:
2705: case LPAREN:
2706: case LITERAL_this :
2707: case LITERAL_super :
2708: case PLUS:
2709: case MINUS:
2710: case INC:
2711: case DEC:
2712: case BNOT:
2713: case LNOT:
2714: case LITERAL_true:
2715: case LITERAL_false:
2716: case LITERAL_null:
2717: case LITERAL_new:
2718: case NUM_INT:
2719: case CHAR_LITERAL:
2720: case STRING_LITERAL:
2721: case NUM_FLOAT:
2722: case NUM_LONG:
2723: case NUM_DOUBLE: {
2724: expression();
2725: astFactory.addASTChild(currentAST, returnAST);
2726: initializer_AST = (AST) currentAST.root;
2727: break;
2728: }
2729: case LCURLY: {
2730: arrayInitializer();
2731: astFactory.addASTChild(currentAST, returnAST);
2732: initializer_AST = (AST) currentAST.root;
2733: break;
2734: }
2735: default: {
2736: throw new NoViableAltException(LT(1), getFilename());
2737: }
2738: }
2739: returnAST = initializer_AST;
2740: }
2741:
2742: public final void arrayInitializer() throws RecognitionException,
2743: TokenStreamException {
2744:
2745: returnAST = null;
2746: ASTPair currentAST = new ASTPair();
2747: AST arrayInitializer_AST = null;
2748: Token lc = null;
2749: AST lc_AST = null;
2750:
2751: lc = LT(1);
2752: lc_AST = astFactory.create(lc);
2753: astFactory.makeASTRoot(currentAST, lc_AST);
2754: match(LCURLY);
2755: if (inputState.guessing == 0) {
2756: lc_AST.setType(ARRAY_INIT);
2757: }
2758: {
2759: switch (LA(1)) {
2760: case LITERAL_void:
2761: case LITERAL_boolean:
2762: case LITERAL_byte:
2763: case LITERAL_char:
2764: case LITERAL_short:
2765: case LITERAL_int:
2766: case LITERAL_float:
2767: case LITERAL_long:
2768: case LITERAL_double:
2769: case IDENT:
2770: case LCURLY:
2771: case LPAREN:
2772: case LITERAL_this :
2773: case LITERAL_super :
2774: case PLUS:
2775: case MINUS:
2776: case INC:
2777: case DEC:
2778: case BNOT:
2779: case LNOT:
2780: case LITERAL_true:
2781: case LITERAL_false:
2782: case LITERAL_null:
2783: case LITERAL_new:
2784: case NUM_INT:
2785: case CHAR_LITERAL:
2786: case STRING_LITERAL:
2787: case NUM_FLOAT:
2788: case NUM_LONG:
2789: case NUM_DOUBLE: {
2790: initializer();
2791: astFactory.addASTChild(currentAST, returnAST);
2792: {
2793: _loop75: do {
2794: if ((LA(1) == COMMA)
2795: && (_tokenSet_21.member(LA(2)))) {
2796: match(COMMA);
2797: initializer();
2798: astFactory.addASTChild(currentAST,
2799: returnAST);
2800: } else {
2801: break _loop75;
2802: }
2803:
2804: } while (true);
2805: }
2806: {
2807: switch (LA(1)) {
2808: case COMMA: {
2809: match(COMMA);
2810: break;
2811: }
2812: case RCURLY: {
2813: break;
2814: }
2815: default: {
2816: throw new NoViableAltException(LT(1),
2817: getFilename());
2818: }
2819: }
2820: }
2821: break;
2822: }
2823: case RCURLY: {
2824: break;
2825: }
2826: default: {
2827: throw new NoViableAltException(LT(1), getFilename());
2828: }
2829: }
2830: }
2831: AST tmp111_AST = null;
2832: tmp111_AST = astFactory.create(LT(1));
2833: astFactory.addASTChild(currentAST, tmp111_AST);
2834: match(RCURLY);
2835: arrayInitializer_AST = (AST) currentAST.root;
2836: returnAST = arrayInitializer_AST;
2837: }
2838:
2839: public final void expression() throws RecognitionException,
2840: TokenStreamException {
2841:
2842: returnAST = null;
2843: ASTPair currentAST = new ASTPair();
2844: AST expression_AST = null;
2845:
2846: assignmentExpression();
2847: astFactory.addASTChild(currentAST, returnAST);
2848: if (inputState.guessing == 0) {
2849: expression_AST = (AST) currentAST.root;
2850: expression_AST = (AST) astFactory.make((new ASTArray(2))
2851: .add(astFactory.create(EXPR, "EXPR")).add(
2852: expression_AST));
2853: currentAST.root = expression_AST;
2854: currentAST.child = expression_AST != null
2855: && expression_AST.getFirstChild() != null ? expression_AST
2856: .getFirstChild()
2857: : expression_AST;
2858: currentAST.advanceChildToEnd();
2859: }
2860: expression_AST = (AST) currentAST.root;
2861: returnAST = expression_AST;
2862: }
2863:
2864: public final void parameterDeclaration()
2865: throws RecognitionException, TokenStreamException {
2866:
2867: returnAST = null;
2868: ASTPair currentAST = new ASTPair();
2869: AST parameterDeclaration_AST = null;
2870: AST pm_AST = null;
2871: AST t_AST = null;
2872: Token id = null;
2873: AST id_AST = null;
2874: AST pd_AST = null;
2875:
2876: parameterModifier();
2877: pm_AST = (AST) returnAST;
2878: typeSpec(false);
2879: t_AST = (AST) returnAST;
2880: id = LT(1);
2881: id_AST = astFactory.create(id);
2882: match(IDENT);
2883: declaratorBrackets(t_AST);
2884: pd_AST = (AST) returnAST;
2885: if (inputState.guessing == 0) {
2886: parameterDeclaration_AST = (AST) currentAST.root;
2887: parameterDeclaration_AST = (AST) astFactory
2888: .make((new ASTArray(4)).add(
2889: astFactory.create(PARAMETER_DEF,
2890: "PARAMETER_DEF")).add(pm_AST).add(
2891: (AST) astFactory.make((new ASTArray(2))
2892: .add(
2893: astFactory.create(TYPE,
2894: "TYPE"))
2895: .add(pd_AST))).add(id_AST));
2896: currentAST.root = parameterDeclaration_AST;
2897: currentAST.child = parameterDeclaration_AST != null
2898: && parameterDeclaration_AST.getFirstChild() != null ? parameterDeclaration_AST
2899: .getFirstChild()
2900: : parameterDeclaration_AST;
2901: currentAST.advanceChildToEnd();
2902: }
2903: returnAST = parameterDeclaration_AST;
2904: }
2905:
2906: public final void parameterModifier() throws RecognitionException,
2907: TokenStreamException {
2908:
2909: returnAST = null;
2910: ASTPair currentAST = new ASTPair();
2911: AST parameterModifier_AST = null;
2912: Token f = null;
2913: AST f_AST = null;
2914:
2915: {
2916: switch (LA(1)) {
2917: case FINAL: {
2918: f = LT(1);
2919: f_AST = astFactory.create(f);
2920: astFactory.addASTChild(currentAST, f_AST);
2921: match(FINAL);
2922: break;
2923: }
2924: case LITERAL_void:
2925: case LITERAL_boolean:
2926: case LITERAL_byte:
2927: case LITERAL_char:
2928: case LITERAL_short:
2929: case LITERAL_int:
2930: case LITERAL_float:
2931: case LITERAL_long:
2932: case LITERAL_double:
2933: case IDENT: {
2934: break;
2935: }
2936: default: {
2937: throw new NoViableAltException(LT(1), getFilename());
2938: }
2939: }
2940: }
2941: if (inputState.guessing == 0) {
2942: parameterModifier_AST = (AST) currentAST.root;
2943: parameterModifier_AST = (AST) astFactory
2944: .make((new ASTArray(2)).add(
2945: astFactory.create(MODIFIERS, "MODIFIERS"))
2946: .add(f_AST));
2947: currentAST.root = parameterModifier_AST;
2948: currentAST.child = parameterModifier_AST != null
2949: && parameterModifier_AST.getFirstChild() != null ? parameterModifier_AST
2950: .getFirstChild()
2951: : parameterModifier_AST;
2952: currentAST.advanceChildToEnd();
2953: }
2954: parameterModifier_AST = (AST) currentAST.root;
2955: returnAST = parameterModifier_AST;
2956: }
2957:
2958: public final void forInit() throws RecognitionException,
2959: TokenStreamException {
2960:
2961: returnAST = null;
2962: ASTPair currentAST = new ASTPair();
2963: AST forInit_AST = null;
2964:
2965: {
2966: boolean synPredMatched113 = false;
2967: if (((_tokenSet_15.member(LA(1))) && (_tokenSet_16
2968: .member(LA(2))))) {
2969: int _m113 = mark();
2970: synPredMatched113 = true;
2971: inputState.guessing++;
2972: try {
2973: {
2974: declaration();
2975: }
2976: } catch (RecognitionException pe) {
2977: synPredMatched113 = false;
2978: }
2979: rewind(_m113);
2980: inputState.guessing--;
2981: }
2982: if (synPredMatched113) {
2983: declaration();
2984: astFactory.addASTChild(currentAST, returnAST);
2985: } else if ((_tokenSet_17.member(LA(1)))
2986: && (_tokenSet_22.member(LA(2)))) {
2987: expressionList();
2988: astFactory.addASTChild(currentAST, returnAST);
2989: } else if ((LA(1) == SEMI)) {
2990: } else {
2991: throw new NoViableAltException(LT(1), getFilename());
2992: }
2993:
2994: }
2995: if (inputState.guessing == 0) {
2996: forInit_AST = (AST) currentAST.root;
2997: forInit_AST = (AST) astFactory.make((new ASTArray(2)).add(
2998: astFactory.create(FOR_INIT, "FOR_INIT")).add(
2999: forInit_AST));
3000: currentAST.root = forInit_AST;
3001: currentAST.child = forInit_AST != null
3002: && forInit_AST.getFirstChild() != null ? forInit_AST
3003: .getFirstChild()
3004: : forInit_AST;
3005: currentAST.advanceChildToEnd();
3006: }
3007: forInit_AST = (AST) currentAST.root;
3008: returnAST = forInit_AST;
3009: }
3010:
3011: public final void forCond() throws RecognitionException,
3012: TokenStreamException {
3013:
3014: returnAST = null;
3015: ASTPair currentAST = new ASTPair();
3016: AST forCond_AST = null;
3017:
3018: {
3019: switch (LA(1)) {
3020: case LITERAL_void:
3021: case LITERAL_boolean:
3022: case LITERAL_byte:
3023: case LITERAL_char:
3024: case LITERAL_short:
3025: case LITERAL_int:
3026: case LITERAL_float:
3027: case LITERAL_long:
3028: case LITERAL_double:
3029: case IDENT:
3030: case LPAREN:
3031: case LITERAL_this :
3032: case LITERAL_super :
3033: case PLUS:
3034: case MINUS:
3035: case INC:
3036: case DEC:
3037: case BNOT:
3038: case LNOT:
3039: case LITERAL_true:
3040: case LITERAL_false:
3041: case LITERAL_null:
3042: case LITERAL_new:
3043: case NUM_INT:
3044: case CHAR_LITERAL:
3045: case STRING_LITERAL:
3046: case NUM_FLOAT:
3047: case NUM_LONG:
3048: case NUM_DOUBLE: {
3049: expression();
3050: astFactory.addASTChild(currentAST, returnAST);
3051: break;
3052: }
3053: case SEMI: {
3054: break;
3055: }
3056: default: {
3057: throw new NoViableAltException(LT(1), getFilename());
3058: }
3059: }
3060: }
3061: if (inputState.guessing == 0) {
3062: forCond_AST = (AST) currentAST.root;
3063: forCond_AST = (AST) astFactory.make((new ASTArray(2)).add(
3064: astFactory.create(FOR_CONDITION, "FOR_CONDITION"))
3065: .add(forCond_AST));
3066: currentAST.root = forCond_AST;
3067: currentAST.child = forCond_AST != null
3068: && forCond_AST.getFirstChild() != null ? forCond_AST
3069: .getFirstChild()
3070: : forCond_AST;
3071: currentAST.advanceChildToEnd();
3072: }
3073: forCond_AST = (AST) currentAST.root;
3074: returnAST = forCond_AST;
3075: }
3076:
3077: public final void forIter() throws RecognitionException,
3078: TokenStreamException {
3079:
3080: returnAST = null;
3081: ASTPair currentAST = new ASTPair();
3082: AST forIter_AST = null;
3083:
3084: {
3085: switch (LA(1)) {
3086: case LITERAL_void:
3087: case LITERAL_boolean:
3088: case LITERAL_byte:
3089: case LITERAL_char:
3090: case LITERAL_short:
3091: case LITERAL_int:
3092: case LITERAL_float:
3093: case LITERAL_long:
3094: case LITERAL_double:
3095: case IDENT:
3096: case LPAREN:
3097: case LITERAL_this :
3098: case LITERAL_super :
3099: case PLUS:
3100: case MINUS:
3101: case INC:
3102: case DEC:
3103: case BNOT:
3104: case LNOT:
3105: case LITERAL_true:
3106: case LITERAL_false:
3107: case LITERAL_null:
3108: case LITERAL_new:
3109: case NUM_INT:
3110: case CHAR_LITERAL:
3111: case STRING_LITERAL:
3112: case NUM_FLOAT:
3113: case NUM_LONG:
3114: case NUM_DOUBLE: {
3115: expressionList();
3116: astFactory.addASTChild(currentAST, returnAST);
3117: break;
3118: }
3119: case RPAREN: {
3120: break;
3121: }
3122: default: {
3123: throw new NoViableAltException(LT(1), getFilename());
3124: }
3125: }
3126: }
3127: if (inputState.guessing == 0) {
3128: forIter_AST = (AST) currentAST.root;
3129: forIter_AST = (AST) astFactory.make((new ASTArray(2)).add(
3130: astFactory.create(FOR_ITERATOR, "FOR_ITERATOR"))
3131: .add(forIter_AST));
3132: currentAST.root = forIter_AST;
3133: currentAST.child = forIter_AST != null
3134: && forIter_AST.getFirstChild() != null ? forIter_AST
3135: .getFirstChild()
3136: : forIter_AST;
3137: currentAST.advanceChildToEnd();
3138: }
3139: forIter_AST = (AST) currentAST.root;
3140: returnAST = forIter_AST;
3141: }
3142:
3143: public final void casesGroup() throws RecognitionException,
3144: TokenStreamException {
3145:
3146: returnAST = null;
3147: ASTPair currentAST = new ASTPair();
3148: AST casesGroup_AST = null;
3149:
3150: {
3151: int _cnt104 = 0;
3152: _loop104: do {
3153: if ((LA(1) == LITERAL_case || LA(1) == LITERAL_default)
3154: && (_tokenSet_23.member(LA(2)))) {
3155: aCase();
3156: astFactory.addASTChild(currentAST, returnAST);
3157: } else {
3158: if (_cnt104 >= 1) {
3159: break _loop104;
3160: } else {
3161: throw new NoViableAltException(LT(1),
3162: getFilename());
3163: }
3164: }
3165:
3166: _cnt104++;
3167: } while (true);
3168: }
3169: caseSList();
3170: astFactory.addASTChild(currentAST, returnAST);
3171: if (inputState.guessing == 0) {
3172: casesGroup_AST = (AST) currentAST.root;
3173: casesGroup_AST = (AST) astFactory.make((new ASTArray(2))
3174: .add(astFactory.create(CASE_GROUP, "CASE_GROUP"))
3175: .add(casesGroup_AST));
3176: currentAST.root = casesGroup_AST;
3177: currentAST.child = casesGroup_AST != null
3178: && casesGroup_AST.getFirstChild() != null ? casesGroup_AST
3179: .getFirstChild()
3180: : casesGroup_AST;
3181: currentAST.advanceChildToEnd();
3182: }
3183: casesGroup_AST = (AST) currentAST.root;
3184: returnAST = casesGroup_AST;
3185: }
3186:
3187: public final void tryBlock() throws RecognitionException,
3188: TokenStreamException {
3189:
3190: returnAST = null;
3191: ASTPair currentAST = new ASTPair();
3192: AST tryBlock_AST = null;
3193: Token t = null;
3194: AST t_AST = null;
3195:
3196: t = LT(1);
3197: t_AST = astFactory.create(t);
3198: astFactory.makeASTRoot(currentAST, t_AST);
3199: match(LITERAL_try);
3200: compoundStatement(false);
3201: astFactory.addASTChild(currentAST, returnAST);
3202: {
3203: _loop120: do {
3204: if ((LA(1) == LITERAL_catch)) {
3205: handler();
3206: astFactory.addASTChild(currentAST, returnAST);
3207: } else {
3208: break _loop120;
3209: }
3210:
3211: } while (true);
3212: }
3213: {
3214: switch (LA(1)) {
3215: case LITERAL_finally: {
3216: finallyHandler();
3217: astFactory.addASTChild(currentAST, returnAST);
3218: break;
3219: }
3220: case FINAL:
3221: case ABSTRACT:
3222: case STRICTFP:
3223: case SEMI:
3224: case LITERAL_void:
3225: case LITERAL_boolean:
3226: case LITERAL_byte:
3227: case LITERAL_char:
3228: case LITERAL_short:
3229: case LITERAL_int:
3230: case LITERAL_float:
3231: case LITERAL_long:
3232: case LITERAL_double:
3233: case IDENT:
3234: case LITERAL_private:
3235: case LITERAL_public:
3236: case LITERAL_protected:
3237: case LITERAL_static:
3238: case LITERAL_transient:
3239: case LITERAL_native:
3240: case LITERAL_synchronized:
3241: case LITERAL_volatile:
3242: case LITERAL_class:
3243: case LCURLY:
3244: case RCURLY:
3245: case LPAREN:
3246: case LITERAL_this :
3247: case LITERAL_super :
3248: case LITERAL_if:
3249: case LITERAL_else:
3250: case LITERAL_for:
3251: case LITERAL_while:
3252: case LITERAL_do:
3253: case LITERAL_break:
3254: case LITERAL_continue:
3255: case LITERAL_return:
3256: case LITERAL_switch:
3257: case LITERAL_throw:
3258: case LITERAL_case:
3259: case LITERAL_default:
3260: case LITERAL_try:
3261: case PLUS:
3262: case MINUS:
3263: case INC:
3264: case DEC:
3265: case BNOT:
3266: case LNOT:
3267: case LITERAL_true:
3268: case LITERAL_false:
3269: case LITERAL_null:
3270: case LITERAL_new:
3271: case NUM_INT:
3272: case CHAR_LITERAL:
3273: case STRING_LITERAL:
3274: case NUM_FLOAT:
3275: case NUM_LONG:
3276: case NUM_DOUBLE: {
3277: break;
3278: }
3279: default: {
3280: throw new NoViableAltException(LT(1), getFilename());
3281: }
3282: }
3283: }
3284: tryBlock_AST = (AST) currentAST.root;
3285: returnAST = tryBlock_AST;
3286: }
3287:
3288: public final void aCase() throws RecognitionException,
3289: TokenStreamException {
3290:
3291: returnAST = null;
3292: ASTPair currentAST = new ASTPair();
3293: AST aCase_AST = null;
3294:
3295: {
3296: switch (LA(1)) {
3297: case LITERAL_case: {
3298: AST tmp112_AST = null;
3299: tmp112_AST = astFactory.create(LT(1));
3300: astFactory.makeASTRoot(currentAST, tmp112_AST);
3301: match(LITERAL_case);
3302: expression();
3303: astFactory.addASTChild(currentAST, returnAST);
3304: break;
3305: }
3306: case LITERAL_default: {
3307: AST tmp113_AST = null;
3308: tmp113_AST = astFactory.create(LT(1));
3309: astFactory.addASTChild(currentAST, tmp113_AST);
3310: match(LITERAL_default);
3311: break;
3312: }
3313: default: {
3314: throw new NoViableAltException(LT(1), getFilename());
3315: }
3316: }
3317: }
3318: match(COLON);
3319: aCase_AST = (AST) currentAST.root;
3320: returnAST = aCase_AST;
3321: }
3322:
3323: public final void caseSList() throws RecognitionException,
3324: TokenStreamException {
3325:
3326: returnAST = null;
3327: ASTPair currentAST = new ASTPair();
3328: AST caseSList_AST = null;
3329:
3330: {
3331: _loop109: do {
3332: if ((_tokenSet_12.member(LA(1)))) {
3333: statement();
3334: astFactory.addASTChild(currentAST, returnAST);
3335: } else {
3336: break _loop109;
3337: }
3338:
3339: } while (true);
3340: }
3341: if (inputState.guessing == 0) {
3342: caseSList_AST = (AST) currentAST.root;
3343: caseSList_AST = (AST) astFactory.make((new ASTArray(2))
3344: .add(astFactory.create(SLIST, "SLIST")).add(
3345: caseSList_AST));
3346: currentAST.root = caseSList_AST;
3347: currentAST.child = caseSList_AST != null
3348: && caseSList_AST.getFirstChild() != null ? caseSList_AST
3349: .getFirstChild()
3350: : caseSList_AST;
3351: currentAST.advanceChildToEnd();
3352: }
3353: caseSList_AST = (AST) currentAST.root;
3354: returnAST = caseSList_AST;
3355: }
3356:
3357: public final void expressionList() throws RecognitionException,
3358: TokenStreamException {
3359:
3360: returnAST = null;
3361: ASTPair currentAST = new ASTPair();
3362: AST expressionList_AST = null;
3363:
3364: expression();
3365: astFactory.addASTChild(currentAST, returnAST);
3366: {
3367: _loop127: do {
3368: if ((LA(1) == COMMA)) {
3369: match(COMMA);
3370: expression();
3371: astFactory.addASTChild(currentAST, returnAST);
3372: } else {
3373: break _loop127;
3374: }
3375:
3376: } while (true);
3377: }
3378: if (inputState.guessing == 0) {
3379: expressionList_AST = (AST) currentAST.root;
3380: expressionList_AST = (AST) astFactory
3381: .make((new ASTArray(2)).add(
3382: astFactory.create(ELIST, "ELIST")).add(
3383: expressionList_AST));
3384: currentAST.root = expressionList_AST;
3385: currentAST.child = expressionList_AST != null
3386: && expressionList_AST.getFirstChild() != null ? expressionList_AST
3387: .getFirstChild()
3388: : expressionList_AST;
3389: currentAST.advanceChildToEnd();
3390: }
3391: expressionList_AST = (AST) currentAST.root;
3392: returnAST = expressionList_AST;
3393: }
3394:
3395: public final void handler() throws RecognitionException,
3396: TokenStreamException {
3397:
3398: returnAST = null;
3399: ASTPair currentAST = new ASTPair();
3400: AST handler_AST = null;
3401:
3402: AST tmp116_AST = null;
3403: tmp116_AST = astFactory.create(LT(1));
3404: astFactory.makeASTRoot(currentAST, tmp116_AST);
3405: match(LITERAL_catch);
3406: match(LPAREN);
3407: parameterDeclaration();
3408: astFactory.addASTChild(currentAST, returnAST);
3409: match(RPAREN);
3410: compoundStatement(false);
3411: astFactory.addASTChild(currentAST, returnAST);
3412: handler_AST = (AST) currentAST.root;
3413: returnAST = handler_AST;
3414: }
3415:
3416: public final void finallyHandler() throws RecognitionException,
3417: TokenStreamException {
3418:
3419: returnAST = null;
3420: ASTPair currentAST = new ASTPair();
3421: AST finallyHandler_AST = null;
3422:
3423: AST tmp119_AST = null;
3424: tmp119_AST = astFactory.create(LT(1));
3425: astFactory.makeASTRoot(currentAST, tmp119_AST);
3426: match(LITERAL_finally);
3427: compoundStatement(false);
3428: astFactory.addASTChild(currentAST, returnAST);
3429: finallyHandler_AST = (AST) currentAST.root;
3430: returnAST = finallyHandler_AST;
3431: }
3432:
3433: public final void assignmentExpression()
3434: throws RecognitionException, TokenStreamException {
3435:
3436: returnAST = null;
3437: ASTPair currentAST = new ASTPair();
3438: AST assignmentExpression_AST = null;
3439:
3440: conditionalExpression();
3441: astFactory.addASTChild(currentAST, returnAST);
3442: {
3443: switch (LA(1)) {
3444: case ASSIGN:
3445: case PLUS_ASSIGN:
3446: case MINUS_ASSIGN:
3447: case STAR_ASSIGN:
3448: case DIV_ASSIGN:
3449: case MOD_ASSIGN:
3450: case SR_ASSIGN:
3451: case BSR_ASSIGN:
3452: case SL_ASSIGN:
3453: case BAND_ASSIGN:
3454: case BXOR_ASSIGN:
3455: case BOR_ASSIGN: {
3456: {
3457: switch (LA(1)) {
3458: case ASSIGN: {
3459: AST tmp120_AST = null;
3460: tmp120_AST = astFactory.create(LT(1));
3461: astFactory.makeASTRoot(currentAST, tmp120_AST);
3462: match(ASSIGN);
3463: break;
3464: }
3465: case PLUS_ASSIGN: {
3466: AST tmp121_AST = null;
3467: tmp121_AST = astFactory.create(LT(1));
3468: astFactory.makeASTRoot(currentAST, tmp121_AST);
3469: match(PLUS_ASSIGN);
3470: break;
3471: }
3472: case MINUS_ASSIGN: {
3473: AST tmp122_AST = null;
3474: tmp122_AST = astFactory.create(LT(1));
3475: astFactory.makeASTRoot(currentAST, tmp122_AST);
3476: match(MINUS_ASSIGN);
3477: break;
3478: }
3479: case STAR_ASSIGN: {
3480: AST tmp123_AST = null;
3481: tmp123_AST = astFactory.create(LT(1));
3482: astFactory.makeASTRoot(currentAST, tmp123_AST);
3483: match(STAR_ASSIGN);
3484: break;
3485: }
3486: case DIV_ASSIGN: {
3487: AST tmp124_AST = null;
3488: tmp124_AST = astFactory.create(LT(1));
3489: astFactory.makeASTRoot(currentAST, tmp124_AST);
3490: match(DIV_ASSIGN);
3491: break;
3492: }
3493: case MOD_ASSIGN: {
3494: AST tmp125_AST = null;
3495: tmp125_AST = astFactory.create(LT(1));
3496: astFactory.makeASTRoot(currentAST, tmp125_AST);
3497: match(MOD_ASSIGN);
3498: break;
3499: }
3500: case SR_ASSIGN: {
3501: AST tmp126_AST = null;
3502: tmp126_AST = astFactory.create(LT(1));
3503: astFactory.makeASTRoot(currentAST, tmp126_AST);
3504: match(SR_ASSIGN);
3505: break;
3506: }
3507: case BSR_ASSIGN: {
3508: AST tmp127_AST = null;
3509: tmp127_AST = astFactory.create(LT(1));
3510: astFactory.makeASTRoot(currentAST, tmp127_AST);
3511: match(BSR_ASSIGN);
3512: break;
3513: }
3514: case SL_ASSIGN: {
3515: AST tmp128_AST = null;
3516: tmp128_AST = astFactory.create(LT(1));
3517: astFactory.makeASTRoot(currentAST, tmp128_AST);
3518: match(SL_ASSIGN);
3519: break;
3520: }
3521: case BAND_ASSIGN: {
3522: AST tmp129_AST = null;
3523: tmp129_AST = astFactory.create(LT(1));
3524: astFactory.makeASTRoot(currentAST, tmp129_AST);
3525: match(BAND_ASSIGN);
3526: break;
3527: }
3528: case BXOR_ASSIGN: {
3529: AST tmp130_AST = null;
3530: tmp130_AST = astFactory.create(LT(1));
3531: astFactory.makeASTRoot(currentAST, tmp130_AST);
3532: match(BXOR_ASSIGN);
3533: break;
3534: }
3535: case BOR_ASSIGN: {
3536: AST tmp131_AST = null;
3537: tmp131_AST = astFactory.create(LT(1));
3538: astFactory.makeASTRoot(currentAST, tmp131_AST);
3539: match(BOR_ASSIGN);
3540: break;
3541: }
3542: default: {
3543: throw new NoViableAltException(LT(1),
3544: getFilename());
3545: }
3546: }
3547: }
3548: assignmentExpression();
3549: astFactory.addASTChild(currentAST, returnAST);
3550: break;
3551: }
3552: case SEMI:
3553: case RBRACK:
3554: case RCURLY:
3555: case COMMA:
3556: case RPAREN:
3557: case COLON: {
3558: break;
3559: }
3560: default: {
3561: throw new NoViableAltException(LT(1), getFilename());
3562: }
3563: }
3564: }
3565: assignmentExpression_AST = (AST) currentAST.root;
3566: returnAST = assignmentExpression_AST;
3567: }
3568:
3569: public final void conditionalExpression()
3570: throws RecognitionException, TokenStreamException {
3571:
3572: returnAST = null;
3573: ASTPair currentAST = new ASTPair();
3574: AST conditionalExpression_AST = null;
3575:
3576: logicalOrExpression();
3577: astFactory.addASTChild(currentAST, returnAST);
3578: {
3579: switch (LA(1)) {
3580: case QUESTION: {
3581: AST tmp132_AST = null;
3582: tmp132_AST = astFactory.create(LT(1));
3583: astFactory.makeASTRoot(currentAST, tmp132_AST);
3584: match(QUESTION);
3585: assignmentExpression();
3586: astFactory.addASTChild(currentAST, returnAST);
3587: AST tmp133_AST = null;
3588: tmp133_AST = astFactory.create(LT(1));
3589: astFactory.addASTChild(currentAST, tmp133_AST);
3590: match(COLON);
3591: conditionalExpression();
3592: astFactory.addASTChild(currentAST, returnAST);
3593: break;
3594: }
3595: case SEMI:
3596: case RBRACK:
3597: case RCURLY:
3598: case COMMA:
3599: case RPAREN:
3600: case ASSIGN:
3601: case COLON:
3602: case PLUS_ASSIGN:
3603: case MINUS_ASSIGN:
3604: case STAR_ASSIGN:
3605: case DIV_ASSIGN:
3606: case MOD_ASSIGN:
3607: case SR_ASSIGN:
3608: case BSR_ASSIGN:
3609: case SL_ASSIGN:
3610: case BAND_ASSIGN:
3611: case BXOR_ASSIGN:
3612: case BOR_ASSIGN: {
3613: break;
3614: }
3615: default: {
3616: throw new NoViableAltException(LT(1), getFilename());
3617: }
3618: }
3619: }
3620: conditionalExpression_AST = (AST) currentAST.root;
3621: returnAST = conditionalExpression_AST;
3622: }
3623:
3624: public final void logicalOrExpression()
3625: throws RecognitionException, TokenStreamException {
3626:
3627: returnAST = null;
3628: ASTPair currentAST = new ASTPair();
3629: AST logicalOrExpression_AST = null;
3630:
3631: logicalAndExpression();
3632: astFactory.addASTChild(currentAST, returnAST);
3633: {
3634: _loop135: do {
3635: if ((LA(1) == LOR)) {
3636: AST tmp134_AST = null;
3637: tmp134_AST = astFactory.create(LT(1));
3638: astFactory.makeASTRoot(currentAST, tmp134_AST);
3639: match(LOR);
3640: logicalAndExpression();
3641: astFactory.addASTChild(currentAST, returnAST);
3642: } else {
3643: break _loop135;
3644: }
3645:
3646: } while (true);
3647: }
3648: logicalOrExpression_AST = (AST) currentAST.root;
3649: returnAST = logicalOrExpression_AST;
3650: }
3651:
3652: public final void logicalAndExpression()
3653: throws RecognitionException, TokenStreamException {
3654:
3655: returnAST = null;
3656: ASTPair currentAST = new ASTPair();
3657: AST logicalAndExpression_AST = null;
3658:
3659: inclusiveOrExpression();
3660: astFactory.addASTChild(currentAST, returnAST);
3661: {
3662: _loop138: do {
3663: if ((LA(1) == LAND)) {
3664: AST tmp135_AST = null;
3665: tmp135_AST = astFactory.create(LT(1));
3666: astFactory.makeASTRoot(currentAST, tmp135_AST);
3667: match(LAND);
3668: inclusiveOrExpression();
3669: astFactory.addASTChild(currentAST, returnAST);
3670: } else {
3671: break _loop138;
3672: }
3673:
3674: } while (true);
3675: }
3676: logicalAndExpression_AST = (AST) currentAST.root;
3677: returnAST = logicalAndExpression_AST;
3678: }
3679:
3680: public final void inclusiveOrExpression()
3681: throws RecognitionException, TokenStreamException {
3682:
3683: returnAST = null;
3684: ASTPair currentAST = new ASTPair();
3685: AST inclusiveOrExpression_AST = null;
3686:
3687: exclusiveOrExpression();
3688: astFactory.addASTChild(currentAST, returnAST);
3689: {
3690: _loop141: do {
3691: if ((LA(1) == BOR)) {
3692: AST tmp136_AST = null;
3693: tmp136_AST = astFactory.create(LT(1));
3694: astFactory.makeASTRoot(currentAST, tmp136_AST);
3695: match(BOR);
3696: exclusiveOrExpression();
3697: astFactory.addASTChild(currentAST, returnAST);
3698: } else {
3699: break _loop141;
3700: }
3701:
3702: } while (true);
3703: }
3704: inclusiveOrExpression_AST = (AST) currentAST.root;
3705: returnAST = inclusiveOrExpression_AST;
3706: }
3707:
3708: public final void exclusiveOrExpression()
3709: throws RecognitionException, TokenStreamException {
3710:
3711: returnAST = null;
3712: ASTPair currentAST = new ASTPair();
3713: AST exclusiveOrExpression_AST = null;
3714:
3715: andExpression();
3716: astFactory.addASTChild(currentAST, returnAST);
3717: {
3718: _loop144: do {
3719: if ((LA(1) == BXOR)) {
3720: AST tmp137_AST = null;
3721: tmp137_AST = astFactory.create(LT(1));
3722: astFactory.makeASTRoot(currentAST, tmp137_AST);
3723: match(BXOR);
3724: andExpression();
3725: astFactory.addASTChild(currentAST, returnAST);
3726: } else {
3727: break _loop144;
3728: }
3729:
3730: } while (true);
3731: }
3732: exclusiveOrExpression_AST = (AST) currentAST.root;
3733: returnAST = exclusiveOrExpression_AST;
3734: }
3735:
3736: public final void andExpression() throws RecognitionException,
3737: TokenStreamException {
3738:
3739: returnAST = null;
3740: ASTPair currentAST = new ASTPair();
3741: AST andExpression_AST = null;
3742:
3743: equalityExpression();
3744: astFactory.addASTChild(currentAST, returnAST);
3745: {
3746: _loop147: do {
3747: if ((LA(1) == BAND)) {
3748: AST tmp138_AST = null;
3749: tmp138_AST = astFactory.create(LT(1));
3750: astFactory.makeASTRoot(currentAST, tmp138_AST);
3751: match(BAND);
3752: equalityExpression();
3753: astFactory.addASTChild(currentAST, returnAST);
3754: } else {
3755: break _loop147;
3756: }
3757:
3758: } while (true);
3759: }
3760: andExpression_AST = (AST) currentAST.root;
3761: returnAST = andExpression_AST;
3762: }
3763:
3764: public final void equalityExpression() throws RecognitionException,
3765: TokenStreamException {
3766:
3767: returnAST = null;
3768: ASTPair currentAST = new ASTPair();
3769: AST equalityExpression_AST = null;
3770:
3771: relationalExpression();
3772: astFactory.addASTChild(currentAST, returnAST);
3773: {
3774: _loop151: do {
3775: if ((LA(1) == NOT_EQUAL || LA(1) == EQUAL)) {
3776: {
3777: switch (LA(1)) {
3778: case NOT_EQUAL: {
3779: AST tmp139_AST = null;
3780: tmp139_AST = astFactory.create(LT(1));
3781: astFactory.makeASTRoot(currentAST,
3782: tmp139_AST);
3783: match(NOT_EQUAL);
3784: break;
3785: }
3786: case EQUAL: {
3787: AST tmp140_AST = null;
3788: tmp140_AST = astFactory.create(LT(1));
3789: astFactory.makeASTRoot(currentAST,
3790: tmp140_AST);
3791: match(EQUAL);
3792: break;
3793: }
3794: default: {
3795: throw new NoViableAltException(LT(1),
3796: getFilename());
3797: }
3798: }
3799: }
3800: relationalExpression();
3801: astFactory.addASTChild(currentAST, returnAST);
3802: } else {
3803: break _loop151;
3804: }
3805:
3806: } while (true);
3807: }
3808: equalityExpression_AST = (AST) currentAST.root;
3809: returnAST = equalityExpression_AST;
3810: }
3811:
3812: public final void relationalExpression()
3813: throws RecognitionException, TokenStreamException {
3814:
3815: returnAST = null;
3816: ASTPair currentAST = new ASTPair();
3817: AST relationalExpression_AST = null;
3818:
3819: shiftExpression();
3820: astFactory.addASTChild(currentAST, returnAST);
3821: {
3822: switch (LA(1)) {
3823: case SEMI:
3824: case RBRACK:
3825: case RCURLY:
3826: case COMMA:
3827: case RPAREN:
3828: case ASSIGN:
3829: case COLON:
3830: case PLUS_ASSIGN:
3831: case MINUS_ASSIGN:
3832: case STAR_ASSIGN:
3833: case DIV_ASSIGN:
3834: case MOD_ASSIGN:
3835: case SR_ASSIGN:
3836: case BSR_ASSIGN:
3837: case SL_ASSIGN:
3838: case BAND_ASSIGN:
3839: case BXOR_ASSIGN:
3840: case BOR_ASSIGN:
3841: case QUESTION:
3842: case LOR:
3843: case LAND:
3844: case BOR:
3845: case BXOR:
3846: case BAND:
3847: case NOT_EQUAL:
3848: case EQUAL:
3849: case LT_:
3850: case GT:
3851: case LE:
3852: case GE: {
3853: {
3854: _loop156: do {
3855: if (((LA(1) >= LT_ && LA(1) <= GE))) {
3856: {
3857: switch (LA(1)) {
3858: case LT_: {
3859: AST tmp141_AST = null;
3860: tmp141_AST = astFactory
3861: .create(LT(1));
3862: astFactory.makeASTRoot(currentAST,
3863: tmp141_AST);
3864: match(LT_);
3865: break;
3866: }
3867: case GT: {
3868: AST tmp142_AST = null;
3869: tmp142_AST = astFactory
3870: .create(LT(1));
3871: astFactory.makeASTRoot(currentAST,
3872: tmp142_AST);
3873: match(GT);
3874: break;
3875: }
3876: case LE: {
3877: AST tmp143_AST = null;
3878: tmp143_AST = astFactory
3879: .create(LT(1));
3880: astFactory.makeASTRoot(currentAST,
3881: tmp143_AST);
3882: match(LE);
3883: break;
3884: }
3885: case GE: {
3886: AST tmp144_AST = null;
3887: tmp144_AST = astFactory
3888: .create(LT(1));
3889: astFactory.makeASTRoot(currentAST,
3890: tmp144_AST);
3891: match(GE);
3892: break;
3893: }
3894: default: {
3895: throw new NoViableAltException(
3896: LT(1), getFilename());
3897: }
3898: }
3899: }
3900: shiftExpression();
3901: astFactory.addASTChild(currentAST,
3902: returnAST);
3903: } else {
3904: break _loop156;
3905: }
3906:
3907: } while (true);
3908: }
3909: break;
3910: }
3911: case LITERAL_instanceof : {
3912: AST tmp145_AST = null;
3913: tmp145_AST = astFactory.create(LT(1));
3914: astFactory.makeASTRoot(currentAST, tmp145_AST);
3915: match(LITERAL_instanceof );
3916: typeSpec(true);
3917: astFactory.addASTChild(currentAST, returnAST);
3918: break;
3919: }
3920: default: {
3921: throw new NoViableAltException(LT(1), getFilename());
3922: }
3923: }
3924: }
3925: relationalExpression_AST = (AST) currentAST.root;
3926: returnAST = relationalExpression_AST;
3927: }
3928:
3929: public final void shiftExpression() throws RecognitionException,
3930: TokenStreamException {
3931:
3932: returnAST = null;
3933: ASTPair currentAST = new ASTPair();
3934: AST shiftExpression_AST = null;
3935:
3936: additiveExpression();
3937: astFactory.addASTChild(currentAST, returnAST);
3938: {
3939: _loop160: do {
3940: if (((LA(1) >= SL && LA(1) <= BSR))) {
3941: {
3942: switch (LA(1)) {
3943: case SL: {
3944: AST tmp146_AST = null;
3945: tmp146_AST = astFactory.create(LT(1));
3946: astFactory.makeASTRoot(currentAST,
3947: tmp146_AST);
3948: match(SL);
3949: break;
3950: }
3951: case SR: {
3952: AST tmp147_AST = null;
3953: tmp147_AST = astFactory.create(LT(1));
3954: astFactory.makeASTRoot(currentAST,
3955: tmp147_AST);
3956: match(SR);
3957: break;
3958: }
3959: case BSR: {
3960: AST tmp148_AST = null;
3961: tmp148_AST = astFactory.create(LT(1));
3962: astFactory.makeASTRoot(currentAST,
3963: tmp148_AST);
3964: match(BSR);
3965: break;
3966: }
3967: default: {
3968: throw new NoViableAltException(LT(1),
3969: getFilename());
3970: }
3971: }
3972: }
3973: additiveExpression();
3974: astFactory.addASTChild(currentAST, returnAST);
3975: } else {
3976: break _loop160;
3977: }
3978:
3979: } while (true);
3980: }
3981: shiftExpression_AST = (AST) currentAST.root;
3982: returnAST = shiftExpression_AST;
3983: }
3984:
3985: public final void additiveExpression() throws RecognitionException,
3986: TokenStreamException {
3987:
3988: returnAST = null;
3989: ASTPair currentAST = new ASTPair();
3990: AST additiveExpression_AST = null;
3991:
3992: multiplicativeExpression();
3993: astFactory.addASTChild(currentAST, returnAST);
3994: {
3995: _loop164: do {
3996: if ((LA(1) == PLUS || LA(1) == MINUS)) {
3997: {
3998: switch (LA(1)) {
3999: case PLUS: {
4000: AST tmp149_AST = null;
4001: tmp149_AST = astFactory.create(LT(1));
4002: astFactory.makeASTRoot(currentAST,
4003: tmp149_AST);
4004: match(PLUS);
4005: break;
4006: }
4007: case MINUS: {
4008: AST tmp150_AST = null;
4009: tmp150_AST = astFactory.create(LT(1));
4010: astFactory.makeASTRoot(currentAST,
4011: tmp150_AST);
4012: match(MINUS);
4013: break;
4014: }
4015: default: {
4016: throw new NoViableAltException(LT(1),
4017: getFilename());
4018: }
4019: }
4020: }
4021: multiplicativeExpression();
4022: astFactory.addASTChild(currentAST, returnAST);
4023: } else {
4024: break _loop164;
4025: }
4026:
4027: } while (true);
4028: }
4029: additiveExpression_AST = (AST) currentAST.root;
4030: returnAST = additiveExpression_AST;
4031: }
4032:
4033: public final void multiplicativeExpression()
4034: throws RecognitionException, TokenStreamException {
4035:
4036: returnAST = null;
4037: ASTPair currentAST = new ASTPair();
4038: AST multiplicativeExpression_AST = null;
4039:
4040: unaryExpression();
4041: astFactory.addASTChild(currentAST, returnAST);
4042: {
4043: _loop168: do {
4044: if ((_tokenSet_24.member(LA(1)))) {
4045: {
4046: switch (LA(1)) {
4047: case STAR: {
4048: AST tmp151_AST = null;
4049: tmp151_AST = astFactory.create(LT(1));
4050: astFactory.makeASTRoot(currentAST,
4051: tmp151_AST);
4052: match(STAR);
4053: break;
4054: }
4055: case DIV: {
4056: AST tmp152_AST = null;
4057: tmp152_AST = astFactory.create(LT(1));
4058: astFactory.makeASTRoot(currentAST,
4059: tmp152_AST);
4060: match(DIV);
4061: break;
4062: }
4063: case MOD: {
4064: AST tmp153_AST = null;
4065: tmp153_AST = astFactory.create(LT(1));
4066: astFactory.makeASTRoot(currentAST,
4067: tmp153_AST);
4068: match(MOD);
4069: break;
4070: }
4071: default: {
4072: throw new NoViableAltException(LT(1),
4073: getFilename());
4074: }
4075: }
4076: }
4077: unaryExpression();
4078: astFactory.addASTChild(currentAST, returnAST);
4079: } else {
4080: break _loop168;
4081: }
4082:
4083: } while (true);
4084: }
4085: multiplicativeExpression_AST = (AST) currentAST.root;
4086: returnAST = multiplicativeExpression_AST;
4087: }
4088:
4089: public final void unaryExpression() throws RecognitionException,
4090: TokenStreamException {
4091:
4092: returnAST = null;
4093: ASTPair currentAST = new ASTPair();
4094: AST unaryExpression_AST = null;
4095:
4096: switch (LA(1)) {
4097: case INC: {
4098: AST tmp154_AST = null;
4099: tmp154_AST = astFactory.create(LT(1));
4100: astFactory.makeASTRoot(currentAST, tmp154_AST);
4101: match(INC);
4102: unaryExpression();
4103: astFactory.addASTChild(currentAST, returnAST);
4104: unaryExpression_AST = (AST) currentAST.root;
4105: break;
4106: }
4107: case DEC: {
4108: AST tmp155_AST = null;
4109: tmp155_AST = astFactory.create(LT(1));
4110: astFactory.makeASTRoot(currentAST, tmp155_AST);
4111: match(DEC);
4112: unaryExpression();
4113: astFactory.addASTChild(currentAST, returnAST);
4114: unaryExpression_AST = (AST) currentAST.root;
4115: break;
4116: }
4117: case MINUS: {
4118: AST tmp156_AST = null;
4119: tmp156_AST = astFactory.create(LT(1));
4120: astFactory.makeASTRoot(currentAST, tmp156_AST);
4121: match(MINUS);
4122: if (inputState.guessing == 0) {
4123: tmp156_AST.setType(UNARY_MINUS);
4124: }
4125: unaryExpression();
4126: astFactory.addASTChild(currentAST, returnAST);
4127: unaryExpression_AST = (AST) currentAST.root;
4128: break;
4129: }
4130: case PLUS: {
4131: AST tmp157_AST = null;
4132: tmp157_AST = astFactory.create(LT(1));
4133: astFactory.makeASTRoot(currentAST, tmp157_AST);
4134: match(PLUS);
4135: if (inputState.guessing == 0) {
4136: tmp157_AST.setType(UNARY_PLUS);
4137: }
4138: unaryExpression();
4139: astFactory.addASTChild(currentAST, returnAST);
4140: unaryExpression_AST = (AST) currentAST.root;
4141: break;
4142: }
4143: case LITERAL_void:
4144: case LITERAL_boolean:
4145: case LITERAL_byte:
4146: case LITERAL_char:
4147: case LITERAL_short:
4148: case LITERAL_int:
4149: case LITERAL_float:
4150: case LITERAL_long:
4151: case LITERAL_double:
4152: case IDENT:
4153: case LPAREN:
4154: case LITERAL_this :
4155: case LITERAL_super :
4156: case BNOT:
4157: case LNOT:
4158: case LITERAL_true:
4159: case LITERAL_false:
4160: case LITERAL_null:
4161: case LITERAL_new:
4162: case NUM_INT:
4163: case CHAR_LITERAL:
4164: case STRING_LITERAL:
4165: case NUM_FLOAT:
4166: case NUM_LONG:
4167: case NUM_DOUBLE: {
4168: unaryExpressionNotPlusMinus();
4169: astFactory.addASTChild(currentAST, returnAST);
4170: unaryExpression_AST = (AST) currentAST.root;
4171: break;
4172: }
4173: default: {
4174: throw new NoViableAltException(LT(1), getFilename());
4175: }
4176: }
4177: returnAST = unaryExpression_AST;
4178: }
4179:
4180: public final void unaryExpressionNotPlusMinus()
4181: throws RecognitionException, TokenStreamException {
4182:
4183: returnAST = null;
4184: ASTPair currentAST = new ASTPair();
4185: AST unaryExpressionNotPlusMinus_AST = null;
4186: Token lpb = null;
4187: AST lpb_AST = null;
4188: Token lp = null;
4189: AST lp_AST = null;
4190:
4191: switch (LA(1)) {
4192: case BNOT: {
4193: AST tmp158_AST = null;
4194: tmp158_AST = astFactory.create(LT(1));
4195: astFactory.makeASTRoot(currentAST, tmp158_AST);
4196: match(BNOT);
4197: unaryExpression();
4198: astFactory.addASTChild(currentAST, returnAST);
4199: unaryExpressionNotPlusMinus_AST = (AST) currentAST.root;
4200: break;
4201: }
4202: case LNOT: {
4203: AST tmp159_AST = null;
4204: tmp159_AST = astFactory.create(LT(1));
4205: astFactory.makeASTRoot(currentAST, tmp159_AST);
4206: match(LNOT);
4207: unaryExpression();
4208: astFactory.addASTChild(currentAST, returnAST);
4209: unaryExpressionNotPlusMinus_AST = (AST) currentAST.root;
4210: break;
4211: }
4212: case LITERAL_void:
4213: case LITERAL_boolean:
4214: case LITERAL_byte:
4215: case LITERAL_char:
4216: case LITERAL_short:
4217: case LITERAL_int:
4218: case LITERAL_float:
4219: case LITERAL_long:
4220: case LITERAL_double:
4221: case IDENT:
4222: case LPAREN:
4223: case LITERAL_this :
4224: case LITERAL_super :
4225: case LITERAL_true:
4226: case LITERAL_false:
4227: case LITERAL_null:
4228: case LITERAL_new:
4229: case NUM_INT:
4230: case CHAR_LITERAL:
4231: case STRING_LITERAL:
4232: case NUM_FLOAT:
4233: case NUM_LONG:
4234: case NUM_DOUBLE: {
4235: {
4236: if ((LA(1) == LPAREN)
4237: && ((LA(2) >= LITERAL_void && LA(2) <= LITERAL_double))) {
4238: lpb = LT(1);
4239: lpb_AST = astFactory.create(lpb);
4240: astFactory.makeASTRoot(currentAST, lpb_AST);
4241: match(LPAREN);
4242: if (inputState.guessing == 0) {
4243: lpb_AST.setType(TYPECAST);
4244: }
4245: builtInTypeSpec(true);
4246: astFactory.addASTChild(currentAST, returnAST);
4247: AST tmp160_AST = null;
4248: tmp160_AST = astFactory.create(LT(1));
4249: astFactory.addASTChild(currentAST, tmp160_AST);
4250: match(RPAREN);
4251: unaryExpression();
4252: astFactory.addASTChild(currentAST, returnAST);
4253: } else {
4254: boolean synPredMatched173 = false;
4255: if (((LA(1) == LPAREN) && (LA(2) == IDENT))) {
4256: int _m173 = mark();
4257: synPredMatched173 = true;
4258: inputState.guessing++;
4259: try {
4260: {
4261: match(LPAREN);
4262: classTypeSpec(true);
4263: match(RPAREN);
4264: unaryExpressionNotPlusMinus();
4265: }
4266: } catch (RecognitionException pe) {
4267: synPredMatched173 = false;
4268: }
4269: rewind(_m173);
4270: inputState.guessing--;
4271: }
4272: if (synPredMatched173) {
4273: lp = LT(1);
4274: lp_AST = astFactory.create(lp);
4275: astFactory.makeASTRoot(currentAST, lp_AST);
4276: match(LPAREN);
4277: if (inputState.guessing == 0) {
4278: lp_AST.setType(TYPECAST);
4279: }
4280: classTypeSpec(true);
4281: astFactory.addASTChild(currentAST, returnAST);
4282: AST tmp161_AST = null;
4283: tmp161_AST = astFactory.create(LT(1));
4284: astFactory.addASTChild(currentAST, tmp161_AST);
4285: match(RPAREN);
4286: unaryExpressionNotPlusMinus();
4287: astFactory.addASTChild(currentAST, returnAST);
4288: } else if ((_tokenSet_8.member(LA(1)))
4289: && (_tokenSet_25.member(LA(2)))) {
4290: postfixExpression();
4291: astFactory.addASTChild(currentAST, returnAST);
4292: } else {
4293: throw new NoViableAltException(LT(1),
4294: getFilename());
4295: }
4296: }
4297: }
4298: unaryExpressionNotPlusMinus_AST = (AST) currentAST.root;
4299: break;
4300: }
4301: default: {
4302: throw new NoViableAltException(LT(1), getFilename());
4303: }
4304: }
4305: returnAST = unaryExpressionNotPlusMinus_AST;
4306: }
4307:
4308: public final void postfixExpression() throws RecognitionException,
4309: TokenStreamException {
4310:
4311: returnAST = null;
4312: ASTPair currentAST = new ASTPair();
4313: AST postfixExpression_AST = null;
4314: Token lbc = null;
4315: AST lbc_AST = null;
4316: Token lb = null;
4317: AST lb_AST = null;
4318: Token lp = null;
4319: AST lp_AST = null;
4320: Token in = null;
4321: AST in_AST = null;
4322: Token de = null;
4323: AST de_AST = null;
4324:
4325: primaryExpression();
4326: astFactory.addASTChild(currentAST, returnAST);
4327: {
4328: _loop179: do {
4329: switch (LA(1)) {
4330: case DOT: {
4331: AST tmp162_AST = null;
4332: tmp162_AST = astFactory.create(LT(1));
4333: astFactory.makeASTRoot(currentAST, tmp162_AST);
4334: match(DOT);
4335: {
4336: switch (LA(1)) {
4337: case IDENT: {
4338: AST tmp163_AST = null;
4339: tmp163_AST = astFactory.create(LT(1));
4340: astFactory.addASTChild(currentAST,
4341: tmp163_AST);
4342: match(IDENT);
4343: break;
4344: }
4345: case LITERAL_this : {
4346: AST tmp164_AST = null;
4347: tmp164_AST = astFactory.create(LT(1));
4348: astFactory.addASTChild(currentAST,
4349: tmp164_AST);
4350: match(LITERAL_this );
4351: break;
4352: }
4353: case LITERAL_class: {
4354: AST tmp165_AST = null;
4355: tmp165_AST = astFactory.create(LT(1));
4356: astFactory.addASTChild(currentAST,
4357: tmp165_AST);
4358: match(LITERAL_class);
4359: break;
4360: }
4361: case LITERAL_new: {
4362: newExpression();
4363: astFactory.addASTChild(currentAST,
4364: returnAST);
4365: break;
4366: }
4367: case LITERAL_super : {
4368: AST tmp166_AST = null;
4369: tmp166_AST = astFactory.create(LT(1));
4370: astFactory.addASTChild(currentAST,
4371: tmp166_AST);
4372: match(LITERAL_super );
4373: break;
4374: }
4375: default: {
4376: throw new NoViableAltException(LT(1),
4377: getFilename());
4378: }
4379: }
4380: }
4381: break;
4382: }
4383: case LPAREN: {
4384: lp = LT(1);
4385: lp_AST = astFactory.create(lp);
4386: astFactory.makeASTRoot(currentAST, lp_AST);
4387: match(LPAREN);
4388: if (inputState.guessing == 0) {
4389: lp_AST.setType(METHOD_CALL);
4390: }
4391: argList();
4392: astFactory.addASTChild(currentAST, returnAST);
4393: AST tmp167_AST = null;
4394: tmp167_AST = astFactory.create(LT(1));
4395: astFactory.addASTChild(currentAST, tmp167_AST);
4396: match(RPAREN);
4397: break;
4398: }
4399: default:
4400: if ((LA(1) == LBRACK) && (LA(2) == RBRACK)) {
4401: {
4402: int _cnt178 = 0;
4403: _loop178: do {
4404: if ((LA(1) == LBRACK)) {
4405: lbc = LT(1);
4406: lbc_AST = astFactory.create(lbc);
4407: astFactory.makeASTRoot(currentAST,
4408: lbc_AST);
4409: match(LBRACK);
4410: if (inputState.guessing == 0) {
4411: lbc_AST
4412: .setType(ARRAY_DECLARATOR);
4413: }
4414: AST tmp168_AST = null;
4415: tmp168_AST = astFactory
4416: .create(LT(1));
4417: astFactory.addASTChild(currentAST,
4418: tmp168_AST);
4419: match(RBRACK);
4420: } else {
4421: if (_cnt178 >= 1) {
4422: break _loop178;
4423: } else {
4424: throw new NoViableAltException(
4425: LT(1), getFilename());
4426: }
4427: }
4428:
4429: _cnt178++;
4430: } while (true);
4431: }
4432: AST tmp169_AST = null;
4433: tmp169_AST = astFactory.create(LT(1));
4434: astFactory.makeASTRoot(currentAST, tmp169_AST);
4435: match(DOT);
4436: AST tmp170_AST = null;
4437: tmp170_AST = astFactory.create(LT(1));
4438: astFactory.addASTChild(currentAST, tmp170_AST);
4439: match(LITERAL_class);
4440: } else if ((LA(1) == LBRACK)
4441: && (_tokenSet_17.member(LA(2)))) {
4442: lb = LT(1);
4443: lb_AST = astFactory.create(lb);
4444: astFactory.makeASTRoot(currentAST, lb_AST);
4445: match(LBRACK);
4446: if (inputState.guessing == 0) {
4447: lb_AST.setType(INDEX_OP);
4448: }
4449: expression();
4450: astFactory.addASTChild(currentAST, returnAST);
4451: AST tmp171_AST = null;
4452: tmp171_AST = astFactory.create(LT(1));
4453: astFactory.addASTChild(currentAST, tmp171_AST);
4454: match(RBRACK);
4455: } else {
4456: break _loop179;
4457: }
4458: }
4459: } while (true);
4460: }
4461: {
4462: switch (LA(1)) {
4463: case INC: {
4464: in = LT(1);
4465: in_AST = astFactory.create(in);
4466: astFactory.makeASTRoot(currentAST, in_AST);
4467: match(INC);
4468: if (inputState.guessing == 0) {
4469: in_AST.setType(POST_INC);
4470: }
4471: break;
4472: }
4473: case DEC: {
4474: de = LT(1);
4475: de_AST = astFactory.create(de);
4476: astFactory.makeASTRoot(currentAST, de_AST);
4477: match(DEC);
4478: if (inputState.guessing == 0) {
4479: de_AST.setType(POST_DEC);
4480: }
4481: break;
4482: }
4483: case SEMI:
4484: case RBRACK:
4485: case STAR:
4486: case RCURLY:
4487: case COMMA:
4488: case RPAREN:
4489: case ASSIGN:
4490: case COLON:
4491: case PLUS_ASSIGN:
4492: case MINUS_ASSIGN:
4493: case STAR_ASSIGN:
4494: case DIV_ASSIGN:
4495: case MOD_ASSIGN:
4496: case SR_ASSIGN:
4497: case BSR_ASSIGN:
4498: case SL_ASSIGN:
4499: case BAND_ASSIGN:
4500: case BXOR_ASSIGN:
4501: case BOR_ASSIGN:
4502: case QUESTION:
4503: case LOR:
4504: case LAND:
4505: case BOR:
4506: case BXOR:
4507: case BAND:
4508: case NOT_EQUAL:
4509: case EQUAL:
4510: case LT_:
4511: case GT:
4512: case LE:
4513: case GE:
4514: case LITERAL_instanceof :
4515: case SL:
4516: case SR:
4517: case BSR:
4518: case PLUS:
4519: case MINUS:
4520: case DIV:
4521: case MOD: {
4522: break;
4523: }
4524: default: {
4525: throw new NoViableAltException(LT(1), getFilename());
4526: }
4527: }
4528: }
4529: postfixExpression_AST = (AST) currentAST.root;
4530: returnAST = postfixExpression_AST;
4531: }
4532:
4533: /** object instantiation.
4534: * Trees are built as illustrated by the following input/tree pairs:
4535: *
4536: * new T()
4537: *
4538: * new
4539: * |
4540: * T -- ELIST
4541: * |
4542: * arg1 -- arg2 -- .. -- argn
4543: *
4544: * new int[]
4545: *
4546: * new
4547: * |
4548: * int -- ARRAY_DECLARATOR
4549: *
4550: * new int[] {1,2}
4551: *
4552: * new
4553: * |
4554: * int -- ARRAY_DECLARATOR -- ARRAY_INIT
4555: * |
4556: * EXPR -- EXPR
4557: * | |
4558: * 1 2
4559: *
4560: * new int[3]
4561: * new
4562: * |
4563: * int -- ARRAY_DECLARATOR
4564: * |
4565: * EXPR
4566: * |
4567: * 3
4568: *
4569: * new int[1][2]
4570: *
4571: * new
4572: * |
4573: * int -- ARRAY_DECLARATOR
4574: * |
4575: * ARRAY_DECLARATOR -- EXPR
4576: * | |
4577: * EXPR 1
4578: * |
4579: * 2
4580: *
4581: */
4582: public final void newExpression() throws RecognitionException,
4583: TokenStreamException {
4584:
4585: returnAST = null;
4586: ASTPair currentAST = new ASTPair();
4587: AST newExpression_AST = null;
4588:
4589: AST tmp172_AST = null;
4590: tmp172_AST = astFactory.create(LT(1));
4591: astFactory.makeASTRoot(currentAST, tmp172_AST);
4592: match(LITERAL_new);
4593: type();
4594: astFactory.addASTChild(currentAST, returnAST);
4595: {
4596: switch (LA(1)) {
4597: case LPAREN: {
4598: AST tmp173_AST = null;
4599: tmp173_AST = astFactory.create(LT(1));
4600: astFactory.addASTChild(currentAST, tmp173_AST);
4601: match(LPAREN);
4602: argList();
4603: astFactory.addASTChild(currentAST, returnAST);
4604: AST tmp174_AST = null;
4605: tmp174_AST = astFactory.create(LT(1));
4606: astFactory.addASTChild(currentAST, tmp174_AST);
4607: match(RPAREN);
4608: {
4609: switch (LA(1)) {
4610: case LCURLY: {
4611: classBlock();
4612: astFactory.addASTChild(currentAST, returnAST);
4613: break;
4614: }
4615: case SEMI:
4616: case LBRACK:
4617: case RBRACK:
4618: case DOT:
4619: case STAR:
4620: case RCURLY:
4621: case COMMA:
4622: case LPAREN:
4623: case RPAREN:
4624: case ASSIGN:
4625: case COLON:
4626: case PLUS_ASSIGN:
4627: case MINUS_ASSIGN:
4628: case STAR_ASSIGN:
4629: case DIV_ASSIGN:
4630: case MOD_ASSIGN:
4631: case SR_ASSIGN:
4632: case BSR_ASSIGN:
4633: case SL_ASSIGN:
4634: case BAND_ASSIGN:
4635: case BXOR_ASSIGN:
4636: case BOR_ASSIGN:
4637: case QUESTION:
4638: case LOR:
4639: case LAND:
4640: case BOR:
4641: case BXOR:
4642: case BAND:
4643: case NOT_EQUAL:
4644: case EQUAL:
4645: case LT_:
4646: case GT:
4647: case LE:
4648: case GE:
4649: case LITERAL_instanceof :
4650: case SL:
4651: case SR:
4652: case BSR:
4653: case PLUS:
4654: case MINUS:
4655: case DIV:
4656: case MOD:
4657: case INC:
4658: case DEC: {
4659: break;
4660: }
4661: default: {
4662: throw new NoViableAltException(LT(1),
4663: getFilename());
4664: }
4665: }
4666: }
4667: break;
4668: }
4669: case LBRACK: {
4670: newArrayDeclarator();
4671: astFactory.addASTChild(currentAST, returnAST);
4672: {
4673: switch (LA(1)) {
4674: case LCURLY: {
4675: arrayInitializer();
4676: astFactory.addASTChild(currentAST, returnAST);
4677: break;
4678: }
4679: case SEMI:
4680: case LBRACK:
4681: case RBRACK:
4682: case DOT:
4683: case STAR:
4684: case RCURLY:
4685: case COMMA:
4686: case LPAREN:
4687: case RPAREN:
4688: case ASSIGN:
4689: case COLON:
4690: case PLUS_ASSIGN:
4691: case MINUS_ASSIGN:
4692: case STAR_ASSIGN:
4693: case DIV_ASSIGN:
4694: case MOD_ASSIGN:
4695: case SR_ASSIGN:
4696: case BSR_ASSIGN:
4697: case SL_ASSIGN:
4698: case BAND_ASSIGN:
4699: case BXOR_ASSIGN:
4700: case BOR_ASSIGN:
4701: case QUESTION:
4702: case LOR:
4703: case LAND:
4704: case BOR:
4705: case BXOR:
4706: case BAND:
4707: case NOT_EQUAL:
4708: case EQUAL:
4709: case LT_:
4710: case GT:
4711: case LE:
4712: case GE:
4713: case LITERAL_instanceof :
4714: case SL:
4715: case SR:
4716: case BSR:
4717: case PLUS:
4718: case MINUS:
4719: case DIV:
4720: case MOD:
4721: case INC:
4722: case DEC: {
4723: break;
4724: }
4725: default: {
4726: throw new NoViableAltException(LT(1),
4727: getFilename());
4728: }
4729: }
4730: }
4731: break;
4732: }
4733: default: {
4734: throw new NoViableAltException(LT(1), getFilename());
4735: }
4736: }
4737: }
4738: newExpression_AST = (AST) currentAST.root;
4739: returnAST = newExpression_AST;
4740: }
4741:
4742: public final void constant() throws RecognitionException,
4743: TokenStreamException {
4744:
4745: returnAST = null;
4746: ASTPair currentAST = new ASTPair();
4747: AST constant_AST = null;
4748:
4749: switch (LA(1)) {
4750: case NUM_INT: {
4751: AST tmp175_AST = null;
4752: tmp175_AST = astFactory.create(LT(1));
4753: astFactory.addASTChild(currentAST, tmp175_AST);
4754: match(NUM_INT);
4755: constant_AST = (AST) currentAST.root;
4756: break;
4757: }
4758: case CHAR_LITERAL: {
4759: AST tmp176_AST = null;
4760: tmp176_AST = astFactory.create(LT(1));
4761: astFactory.addASTChild(currentAST, tmp176_AST);
4762: match(CHAR_LITERAL);
4763: constant_AST = (AST) currentAST.root;
4764: break;
4765: }
4766: case STRING_LITERAL: {
4767: AST tmp177_AST = null;
4768: tmp177_AST = astFactory.create(LT(1));
4769: astFactory.addASTChild(currentAST, tmp177_AST);
4770: match(STRING_LITERAL);
4771: constant_AST = (AST) currentAST.root;
4772: break;
4773: }
4774: case NUM_FLOAT: {
4775: AST tmp178_AST = null;
4776: tmp178_AST = astFactory.create(LT(1));
4777: astFactory.addASTChild(currentAST, tmp178_AST);
4778: match(NUM_FLOAT);
4779: constant_AST = (AST) currentAST.root;
4780: break;
4781: }
4782: case NUM_LONG: {
4783: AST tmp179_AST = null;
4784: tmp179_AST = astFactory.create(LT(1));
4785: astFactory.addASTChild(currentAST, tmp179_AST);
4786: match(NUM_LONG);
4787: constant_AST = (AST) currentAST.root;
4788: break;
4789: }
4790: case NUM_DOUBLE: {
4791: AST tmp180_AST = null;
4792: tmp180_AST = astFactory.create(LT(1));
4793: astFactory.addASTChild(currentAST, tmp180_AST);
4794: match(NUM_DOUBLE);
4795: constant_AST = (AST) currentAST.root;
4796: break;
4797: }
4798: default: {
4799: throw new NoViableAltException(LT(1), getFilename());
4800: }
4801: }
4802: returnAST = constant_AST;
4803: }
4804:
4805: public final void newArrayDeclarator() throws RecognitionException,
4806: TokenStreamException {
4807:
4808: returnAST = null;
4809: ASTPair currentAST = new ASTPair();
4810: AST newArrayDeclarator_AST = null;
4811: Token lb = null;
4812: AST lb_AST = null;
4813:
4814: {
4815: int _cnt193 = 0;
4816: _loop193: do {
4817: if ((LA(1) == LBRACK) && (_tokenSet_26.member(LA(2)))) {
4818: lb = LT(1);
4819: lb_AST = astFactory.create(lb);
4820: astFactory.makeASTRoot(currentAST, lb_AST);
4821: match(LBRACK);
4822: if (inputState.guessing == 0) {
4823: lb_AST.setType(ARRAY_DECLARATOR);
4824: }
4825: {
4826: switch (LA(1)) {
4827: case LITERAL_void:
4828: case LITERAL_boolean:
4829: case LITERAL_byte:
4830: case LITERAL_char:
4831: case LITERAL_short:
4832: case LITERAL_int:
4833: case LITERAL_float:
4834: case LITERAL_long:
4835: case LITERAL_double:
4836: case IDENT:
4837: case LPAREN:
4838: case LITERAL_this :
4839: case LITERAL_super :
4840: case PLUS:
4841: case MINUS:
4842: case INC:
4843: case DEC:
4844: case BNOT:
4845: case LNOT:
4846: case LITERAL_true:
4847: case LITERAL_false:
4848: case LITERAL_null:
4849: case LITERAL_new:
4850: case NUM_INT:
4851: case CHAR_LITERAL:
4852: case STRING_LITERAL:
4853: case NUM_FLOAT:
4854: case NUM_LONG:
4855: case NUM_DOUBLE: {
4856: expression();
4857: astFactory.addASTChild(currentAST,
4858: returnAST);
4859: break;
4860: }
4861: case RBRACK: {
4862: break;
4863: }
4864: default: {
4865: throw new NoViableAltException(LT(1),
4866: getFilename());
4867: }
4868: }
4869: }
4870: AST tmp181_AST = null;
4871: tmp181_AST = astFactory.create(LT(1));
4872: astFactory.addASTChild(currentAST, tmp181_AST);
4873: match(RBRACK);
4874: } else {
4875: if (_cnt193 >= 1) {
4876: break _loop193;
4877: } else {
4878: throw new NoViableAltException(LT(1),
4879: getFilename());
4880: }
4881: }
4882:
4883: _cnt193++;
4884: } while (true);
4885: }
4886: newArrayDeclarator_AST = (AST) currentAST.root;
4887: returnAST = newArrayDeclarator_AST;
4888: }
4889:
4890: public static final String[] _tokenNames = { "<0>", "EOF", "<2>",
4891: "NULL_TREE_LOOKAHEAD", "BLOCK", "MODIFIERS", "OBJBLOCK",
4892: "SLIST", "END_SLIST", "CTOR_DEF", "METHOD_DEF",
4893: "DESTRUCTOR_DEF", "VARIABLE_DEF", "INSTANCE_INIT",
4894: "STATIC_INIT", "TYPE", "CLASS_DEF", "INTERFACE_DEF",
4895: "PACKAGE_DEF", "ARRAY_DECLARATOR", "EXTENDS_CLAUSE",
4896: "IMPLEMENTS_CLAUSE", "PARAMETERS", "PARAMETER_DEF",
4897: "LABELED_STAT", "TYPECAST", "INDEX_OP", "POST_INC",
4898: "POST_DEC", "METHOD_CALL", "EXPR", "ARRAY_INIT", "IMPORT",
4899: "UNARY_MINUS", "UNARY_PLUS", "CASE_GROUP", "ELIST",
4900: "FOR_INIT", "FOR_CONDITION", "FOR_ITERATOR", "EMPTY_STAT",
4901: "\"final\"", "\"abstract\"", "\"strictfp\"",
4902: "SUPER_CTOR_CALL", "CTOR_CALL", "START_CLASS_BODY",
4903: "END_CLASS_BODY", "\"package\"", "SEMI", "\"import\"",
4904: "LBRACK", "RBRACK", "\"void\"", "\"boolean\"", "\"byte\"",
4905: "\"char\"", "\"short\"", "\"int\"", "\"float\"",
4906: "\"long\"", "\"double\"", "IDENT", "DOT", "STAR",
4907: "\"private\"", "\"public\"", "\"protected\"", "\"static\"",
4908: "\"transient\"", "\"native\"", "\"synchronized\"",
4909: "\"volatile\"", "\"class\"", "\"extends\"",
4910: "\"interface\"", "LCURLY", "RCURLY", "COMMA",
4911: "\"implements\"", "LPAREN", "RPAREN", "\"this\"",
4912: "\"super\"", "ASSIGN", "\"throws\"", "COLON", "\"if\"",
4913: "\"else\"", "\"for\"", "\"while\"", "\"do\"", "\"break\"",
4914: "\"continue\"", "\"return\"", "\"switch\"", "\"throw\"",
4915: "\"case\"", "\"default\"", "\"try\"", "\"catch\"",
4916: "\"finally\"", "PLUS_ASSIGN", "MINUS_ASSIGN",
4917: "STAR_ASSIGN", "DIV_ASSIGN", "MOD_ASSIGN", "SR_ASSIGN",
4918: "BSR_ASSIGN", "SL_ASSIGN", "BAND_ASSIGN", "BXOR_ASSIGN",
4919: "BOR_ASSIGN", "QUESTION", "LOR", "LAND", "BOR", "BXOR",
4920: "BAND", "NOT_EQUAL", "EQUAL", "LT_", "GT", "LE", "GE",
4921: "\"instanceof\"", "SL", "SR", "BSR", "PLUS", "MINUS",
4922: "DIV", "MOD", "INC", "DEC", "BNOT", "LNOT", "\"true\"",
4923: "\"false\"", "\"null\"", "\"new\"", "NUM_INT",
4924: "CHAR_LITERAL", "STRING_LITERAL", "NUM_FLOAT", "NUM_LONG",
4925: "NUM_DOUBLE", "WS", "SL_COMMENT", "ML_COMMENT", "ESC",
4926: "HEX_DIGIT", "VOCAB", "EXPONENT", "FLOAT_SUFFIX" };
4927:
4928: protected void buildTokenTypeASTClassMap() {
4929: tokenTypeToASTClassMap = null;
4930: };
4931:
4932: private static final long[] mk_tokenSet_0() {
4933: long[] data = { 578343116210176L, 3070L, 0L, 0L };
4934: return data;
4935: }
4936:
4937: public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
4938:
4939: private static final long[] mk_tokenSet_1() {
4940: long[] data = { 9216350555599798274L, 7166L, 0L, 0L };
4941: return data;
4942: }
4943:
4944: public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
4945:
4946: private static final long[] mk_tokenSet_2() {
4947: long[] data = { 578343116210178L, 3070L, 0L, 0L };
4948: return data;
4949: }
4950:
4951: public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
4952:
4953: private static final long[] mk_tokenSet_3() {
4954: long[] data = { 9214380230762823680L, 3070L, 0L, 0L };
4955: return data;
4956: }
4957:
4958: public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
4959:
4960: private static final long[] mk_tokenSet_4() {
4961: long[] data = { -6740006278266880L, 68606L, 0L, 0L };
4962: return data;
4963: }
4964:
4965: public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
4966:
4967: private static final long[] mk_tokenSet_5() {
4968: long[] data = { -4609434218613702656L, 0L, 0L };
4969: return data;
4970: }
4971:
4972: public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
4973:
4974: private static final long[] mk_tokenSet_6() {
4975: long[] data = { 2814749767106560L, 1064960L, 0L, 0L };
4976: return data;
4977: }
4978:
4979: public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
4980:
4981: private static final long[] mk_tokenSet_7() {
4982: long[] data = { 15393162788864L, 510L, 0L, 0L };
4983: return data;
4984: }
4985:
4986: public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
4987:
4988: private static final long[] mk_tokenSet_8() {
4989: long[] data = { 9214364837600034816L, 851968L, 523776L, 0L, 0L,
4990: 0L };
4991: return data;
4992: }
4993:
4994: public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
4995:
4996: private static final long[] mk_tokenSet_9() {
4997: long[] data = { -6755399441055744L, 851968L, 524262L, 0L, 0L,
4998: 0L };
4999: return data;
5000: }
5001:
5002: public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
5003:
5004: private static final long[] mk_tokenSet_10() {
5005: long[] data = { 9214943180716244992L, 42925372414L, 524262L,
5006: 0L, 0L, 0L };
5007: return data;
5008: }
5009:
5010: public static final BitSet _tokenSet_10 = new BitSet(
5011: mk_tokenSet_10());
5012:
5013: private static final long[] mk_tokenSet_11() {
5014: long[] data = { -4769681441292286L, -231947289601L, 524287L,
5015: 0L, 0L, 0L };
5016: return data;
5017: }
5018:
5019: public static final BitSet _tokenSet_11 = new BitSet(
5020: mk_tokenSet_11());
5021:
5022: private static final long[] mk_tokenSet_12() {
5023: long[] data = { 9214943180716244992L, 42925364222L, 524262L,
5024: 0L, 0L, 0L };
5025: return data;
5026: }
5027:
5028: public static final BitSet _tokenSet_12 = new BitSet(
5029: mk_tokenSet_12());
5030:
5031: private static final long[] mk_tokenSet_13() {
5032: long[] data = { 9214943180716244992L, 68711953406L, 524262L,
5033: 0L, 0L, 0L };
5034: return data;
5035: }
5036:
5037: public static final BitSet _tokenSet_13 = new BitSet(
5038: mk_tokenSet_13());
5039:
5040: private static final long[] mk_tokenSet_14() {
5041: long[] data = { -4769681441292286L, -2278401L, 524287L, 0L, 0L,
5042: 0L };
5043: return data;
5044: }
5045:
5046: public static final BitSet _tokenSet_14 = new BitSet(
5047: mk_tokenSet_14());
5048:
5049: private static final long[] mk_tokenSet_15() {
5050: long[] data = { 9214380230762823680L, 510L, 0L, 0L };
5051: return data;
5052: }
5053:
5054: public static final BitSet _tokenSet_15 = new BitSet(
5055: mk_tokenSet_15());
5056:
5057: private static final long[] mk_tokenSet_16() {
5058: long[] data = { -6740006278266880L, 510L, 0L, 0L };
5059: return data;
5060: }
5061:
5062: public static final BitSet _tokenSet_16 = new BitSet(
5063: mk_tokenSet_16());
5064:
5065: private static final long[] mk_tokenSet_17() {
5066: long[] data = { 9214364837600034816L, 851968L, 524262L, 0L, 0L,
5067: 0L };
5068: return data;
5069: }
5070:
5071: public static final BitSet _tokenSet_17 = new BitSet(
5072: mk_tokenSet_17());
5073:
5074: private static final long[] mk_tokenSet_18() {
5075: long[] data = { -6192449487634432L, -274876006399L, 524287L,
5076: 0L, 0L, 0L };
5077: return data;
5078: }
5079:
5080: public static final BitSet _tokenSet_18 = new BitSet(
5081: mk_tokenSet_18());
5082:
5083: private static final long[] mk_tokenSet_19() {
5084: long[] data = { 15393162788864L, 1022L, 0L, 0L };
5085: return data;
5086: }
5087:
5088: public static final BitSet _tokenSet_19 = new BitSet(
5089: mk_tokenSet_19());
5090:
5091: private static final long[] mk_tokenSet_20() {
5092: long[] data = { 4611701411590176768L, 1022L, 0L, 0L };
5093: return data;
5094: }
5095:
5096: public static final BitSet _tokenSet_20 = new BitSet(
5097: mk_tokenSet_20());
5098:
5099: private static final long[] mk_tokenSet_21() {
5100: long[] data = { 9214364837600034816L, 856064L, 524262L, 0L, 0L,
5101: 0L };
5102: return data;
5103: }
5104:
5105: public static final BitSet _tokenSet_21 = new BitSet(
5106: mk_tokenSet_21());
5107:
5108: private static final long[] mk_tokenSet_22() {
5109: long[] data = { -6192449487634432L, -274875990015L, 524287L,
5110: 0L, 0L, 0L };
5111: return data;
5112: }
5113:
5114: public static final BitSet _tokenSet_22 = new BitSet(
5115: mk_tokenSet_22());
5116:
5117: private static final long[] mk_tokenSet_23() {
5118: long[] data = { 9214364837600034816L, 5046272L, 524262L, 0L,
5119: 0L, 0L };
5120: return data;
5121: }
5122:
5123: public static final BitSet _tokenSet_23 = new BitSet(
5124: mk_tokenSet_23());
5125:
5126: private static final long[] mk_tokenSet_24() {
5127: long[] data = { 0L, 1L, 24L, 0L, 0L, 0L };
5128: return data;
5129: }
5130:
5131: public static final BitSet _tokenSet_24 = new BitSet(
5132: mk_tokenSet_24());
5133:
5134: private static final long[] mk_tokenSet_25() {
5135: long[] data = { -1688849860263936L, -274871656447L, 524287L,
5136: 0L, 0L, 0L };
5137: return data;
5138: }
5139:
5140: public static final BitSet _tokenSet_25 = new BitSet(
5141: mk_tokenSet_25());
5142:
5143: private static final long[] mk_tokenSet_26() {
5144: long[] data = { 9218868437227405312L, 851968L, 524262L, 0L, 0L,
5145: 0L };
5146: return data;
5147: }
5148:
5149: public static final BitSet _tokenSet_26 = new BitSet(
5150: mk_tokenSet_26());
5151:
5152: }
|