⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 groovyrecognizer.java

📁 大名鼎鼎的java动态脚本语言。已经通过了sun的认证
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
			nlsWarn();			compoundStatement();			astFactory.addASTChild(currentAST, returnAST);			statement_AST = (AST)currentAST.root;			break;		}		case STAR:		{			sp = LT(1);			sp_AST = astFactory.create(sp);			astFactory.makeASTRoot(currentAST, sp_AST);			match(STAR);			nls();			if ( inputState.guessing==0 ) {				sp_AST.setType(SPREAD_ARG);			}			expressionStatement(EOF);			astFactory.addASTChild(currentAST, returnAST);			statement_AST = (AST)currentAST.root;			break;		}		case LITERAL_import:		{			importStatement();			astFactory.addASTChild(currentAST, returnAST);			statement_AST = (AST)currentAST.root;			break;		}		case LITERAL_switch:		{			AST tmp14_AST = null;			tmp14_AST = astFactory.create(LT(1));			astFactory.makeASTRoot(currentAST, tmp14_AST);			match(LITERAL_switch);			match(LPAREN);			strictContextExpression();			astFactory.addASTChild(currentAST, returnAST);			match(RPAREN);			nlsWarn();			match(LCURLY);			nls();			{			_loop275:			do {				if ((LA(1)==LITERAL_default||LA(1)==LITERAL_case)) {					casesGroup();					astFactory.addASTChild(currentAST, returnAST);				}				else {					break _loop275;				}							} while (true);			}			match(RCURLY);			statement_AST = (AST)currentAST.root;			break;		}		case LITERAL_try:		{			tryBlock();			astFactory.addASTChild(currentAST, returnAST);			statement_AST = (AST)currentAST.root;			break;		}		case LITERAL_return:		case LITERAL_break:		case LITERAL_continue:		case LITERAL_throw:		case LITERAL_assert:		{			branchStatement();			astFactory.addASTChild(currentAST, returnAST);			statement_AST = (AST)currentAST.root;			break;		}		default:			boolean synPredMatched263 = false;			if (((_tokenSet_12.member(LA(1))) && (_tokenSet_13.member(LA(2))) && (_tokenSet_14.member(LA(3))))) {				int _m263 = mark();				synPredMatched263 = true;				inputState.guessing++;				try {					{					declarationStart();					}				}				catch (RecognitionException pe) {					synPredMatched263 = false;				}				rewind(_m263);				inputState.guessing--;			}			if ( synPredMatched263 ) {				declaration();				astFactory.addASTChild(currentAST, returnAST);				statement_AST = (AST)currentAST.root;			}			else {				boolean synPredMatched265 = false;				if (((LA(1)==IDENT) && (LA(2)==COLON) && (_tokenSet_15.member(LA(3))))) {					int _m265 = mark();					synPredMatched265 = true;					inputState.guessing++;					try {						{						match(IDENT);						match(COLON);						}					}					catch (RecognitionException pe) {						synPredMatched265 = false;					}					rewind(_m265);					inputState.guessing--;				}				if ( synPredMatched265 ) {					statementLabelPrefix();					pfx_AST = (AST)returnAST;					if ( inputState.guessing==0 ) {						statement_AST = (AST)currentAST.root;						statement_AST = pfx_AST;						currentAST.root = statement_AST;						currentAST.child = statement_AST!=null &&statement_AST.getFirstChild()!=null ?							statement_AST.getFirstChild() : statement_AST;						currentAST.advanceChildToEnd();					}					{					boolean synPredMatched268 = false;					if (((LA(1)==LCURLY) && (_tokenSet_16.member(LA(2))) && (_tokenSet_17.member(LA(3))))) {						int _m268 = mark();						synPredMatched268 = true;						inputState.guessing++;						try {							{							match(LCURLY);							}						}						catch (RecognitionException pe) {							synPredMatched268 = false;						}						rewind(_m268);						inputState.guessing--;					}					if ( synPredMatched268 ) {						openOrClosedBlock();						astFactory.addASTChild(currentAST, returnAST);					}					else if ((_tokenSet_18.member(LA(1))) && (_tokenSet_8.member(LA(2))) && (_tokenSet_19.member(LA(3)))) {						statement(COLON);						astFactory.addASTChild(currentAST, returnAST);					}					else {						throw new NoViableAltException(LT(1), getFilename());					}										}					statement_AST = (AST)currentAST.root;				}				else if ((_tokenSet_20.member(LA(1))) && (_tokenSet_8.member(LA(2))) && (_tokenSet_21.member(LA(3)))) {					expressionStatement(prevToken);					astFactory.addASTChild(currentAST, returnAST);					statement_AST = (AST)currentAST.root;				}				else if ((_tokenSet_22.member(LA(1))) && (_tokenSet_23.member(LA(2))) && (_tokenSet_24.member(LA(3)))) {					modifiersOpt();					m_AST = (AST)returnAST;					typeDefinitionInternal(m_AST);					astFactory.addASTChild(currentAST, returnAST);					statement_AST = (AST)currentAST.root;				}				else if ((LA(1)==LITERAL_synchronized) && (LA(2)==LPAREN)) {					AST tmp19_AST = null;					tmp19_AST = astFactory.create(LT(1));					astFactory.makeASTRoot(currentAST, tmp19_AST);					match(LITERAL_synchronized);					match(LPAREN);					strictContextExpression();					astFactory.addASTChild(currentAST, returnAST);					match(RPAREN);					nlsWarn();					compoundStatement();					astFactory.addASTChild(currentAST, returnAST);					statement_AST = (AST)currentAST.root;				}			else {				throw new NoViableAltException(LT(1), getFilename());			}			}}			returnAST = statement_AST;		}		/** A statement separator is either a semicolon or a significant newline.  *  Any number of additional (insignificant) newlines may accompany it. */	public final void sep() throws RecognitionException, TokenStreamException {				returnAST = null;		ASTPair currentAST = new ASTPair();		AST sep_AST = null;				switch ( LA(1)) {		case SEMI:		{			match(SEMI);			{			_loop493:			do {				if ((LA(1)==NLS) && (_tokenSet_25.member(LA(2))) && (_tokenSet_21.member(LA(3)))) {					match(NLS);				}				else {					break _loop493;				}							} while (true);			}			if ( inputState.guessing==0 ) {				sepToken = SEMI;			}			break;		}		case NLS:		{			match(NLS);			if ( inputState.guessing==0 ) {				sepToken = NLS;			}			{			_loop497:			do {				if ((LA(1)==SEMI) && (_tokenSet_25.member(LA(2))) && (_tokenSet_21.member(LA(3)))) {					match(SEMI);					{					_loop496:					do {						if ((LA(1)==NLS) && (_tokenSet_25.member(LA(2))) && (_tokenSet_21.member(LA(3)))) {							match(NLS);						}						else {							break _loop496;						}											} while (true);					}					if ( inputState.guessing==0 ) {						sepToken = SEMI;					}				}				else {					break _loop497;				}							} while (true);			}			break;		}		default:		{			throw new NoViableAltException(LT(1), getFilename());		}		}		returnAST = sep_AST;	}	/** A Groovy script or simple expression.  Can be anything legal inside {...}. */	public final void snippetUnit() throws RecognitionException, TokenStreamException {				returnAST = null;		ASTPair currentAST = new ASTPair();		AST snippetUnit_AST = null;				nls();		blockBody(EOF);		astFactory.addASTChild(currentAST, returnAST);		snippetUnit_AST = (AST)currentAST.root;		returnAST = snippetUnit_AST;	}	/** A block body is a parade of zero or more statements or expressions. */	public final void blockBody(		int prevToken	) throws RecognitionException, TokenStreamException {				returnAST = null;		ASTPair currentAST = new ASTPair();		AST blockBody_AST = null;				{		switch ( LA(1)) {		case FINAL:		case ABSTRACT:		case STRICTFP:		case LITERAL_import:		case LITERAL_static:		case LITERAL_def:		case AT:		case IDENT:		case LBRACK:		case LPAREN:		case LITERAL_class:		case LITERAL_interface:		case LITERAL_enum:		case LITERAL_super:		case LITERAL_void:		case LITERAL_boolean:		case LITERAL_byte:		case LITERAL_char:		case LITERAL_short:		case LITERAL_int:		case LITERAL_float:		case LITERAL_long:		case LITERAL_double:		case LITERAL_any:		case STAR:		case LITERAL_private:		case LITERAL_public:		case LITERAL_protected:		case LITERAL_transient:		case LITERAL_native:		case LITERAL_threadsafe:		case LITERAL_synchronized:		case LITERAL_volatile:		case LCURLY:		case LITERAL_this:		case STRING_LITERAL:		case LITERAL_if:		case LITERAL_while:		case LITERAL_with:		case LITERAL_switch:		case LITERAL_for:		case LITERAL_return:		case LITERAL_break:		case LITERAL_continue:		case LITERAL_throw:		case LITERAL_assert:		case PLUS:		case MINUS:		case LITERAL_try:		case INC:		case DEC:		case BNOT:		case LNOT:		case DOLLAR:		case STRING_CTOR_START:		case LITERAL_new:		case LITERAL_true:		case LITERAL_false:		case LITERAL_null:		case NUM_INT:		case NUM_FLOAT:		case NUM_LONG:		case NUM_DOUBLE:		case NUM_BIG_INT:		case NUM_BIG_DECIMAL:		{			statement(prevToken);			astFactory.addASTChild(currentAST, returnAST);			break;		}		case EOF:		case RCURLY:		case SEMI:		case NLS:		{			break;		}		default:		{			throw new NoViableAltException(LT(1), getFilename());		}		}		}		{		_loop257:		do {			if ((LA(1)==SEMI||LA(1)==NLS)) {				sep();				{				switch ( LA(1)) {				case FINAL:				case ABSTRACT:				case STRICTFP:				case LITERAL_import:				case LITERAL_static:				case LITERAL_def:				case AT:				case IDENT:				case LBRACK:				case LPAREN:				case LITERAL_class:				case LITERAL_interface:				case LITERAL_enum:				case LITERAL_super:				case LITERAL_void:				case LITERAL_boolean:				case LITERAL_byte:				case LITERAL_char:				case LITERAL_short:				case LITERAL_int:				case LITERAL_float:				case LITERAL_long:				case LITERAL_double:				case LITERAL_any:				case STAR:				case LITERAL_private:				case LITERAL_public:				case LITERAL_protected:				case LITERAL_transient:				case LITERAL_native:				case LITERAL_threadsafe:				case LITERAL_synchronized:				case LITERAL_volatile:				case LCURLY:				case LITERAL_this:				case STRING_LITERAL:				case LITERAL_if:				case LITERAL_while:				case LITERAL_with:				case LITERAL_switch:				case LITERAL_for:				case LITERAL_return:				case LITERAL_break:				case LITERAL_continue:				case LITERAL_throw:				case LITERAL_assert:				case PLUS:				case MINUS:				case LITERAL_try:				case INC:				case DEC:				case BNOT:				case LNOT:				case DOLLAR:				case STRING_CTOR_START:				case LITERAL_new:				case LITERAL_true:				case LITERAL_false:				case LITERAL_null:				case NUM_INT:				case NUM_FLOAT:				case NUM_LONG:				case NUM_DOUBLE:				case NUM_BIG_INT:				case NUM_BIG_DECIMAL:				{					statement(sepToken);					astFactory.addASTChild(currentAST, returnAST);					break;				}				case EOF:				case RCURLY:				case SEMI:				case NLS:				{					break;				}				default:				{

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -