javarecognizer.java
来自「Groovy动态语言 运行在JVM中的动态语言 可以方便的处理业务逻辑变化大的业」· Java 代码 · 共 2,519 行 · 第 1/5 页
JAVA
2,519 行
} case LITERAL_super: { match(LITERAL_super); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } classOrInterfaceType(false); astFactory.addASTChild(currentAST, returnAST); if ( inputState.guessing==0 ) { typeArgumentBounds_AST = (AST)currentAST.root; if (isUpperBounds) { typeArgumentBounds_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_UPPER_BOUNDS,"TYPE_UPPER_BOUNDS",first,LT(1))).add(typeArgumentBounds_AST)); } else { typeArgumentBounds_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_LOWER_BOUNDS,"TYPE_LOWER_BOUNDS",first,LT(1))).add(typeArgumentBounds_AST)); } currentAST.root = typeArgumentBounds_AST; currentAST.child = typeArgumentBounds_AST!=null &&typeArgumentBounds_AST.getFirstChild()!=null ? typeArgumentBounds_AST.getFirstChild() : typeArgumentBounds_AST; currentAST.advanceChildToEnd(); } typeArgumentBounds_AST = (AST)currentAST.root; returnAST = typeArgumentBounds_AST; } protected final void typeArgumentsOrParametersEnd() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST typeArgumentsOrParametersEnd_AST = null; switch ( LA(1)) { case GT: { match(GT); if ( inputState.guessing==0 ) { ltCounter-=1; } typeArgumentsOrParametersEnd_AST = (AST)currentAST.root; break; } case SR: { match(SR); if ( inputState.guessing==0 ) { ltCounter-=2; } typeArgumentsOrParametersEnd_AST = (AST)currentAST.root; break; } case BSR: { match(BSR); if ( inputState.guessing==0 ) { ltCounter-=3; } typeArgumentsOrParametersEnd_AST = (AST)currentAST.root; break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } returnAST = typeArgumentsOrParametersEnd_AST; } public final void builtInType() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST builtInType_AST = null; switch ( LA(1)) { case LITERAL_void: { AST tmp37_AST = null; tmp37_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp37_AST); match(LITERAL_void); builtInType_AST = (AST)currentAST.root; break; } case LITERAL_boolean: { AST tmp38_AST = null; tmp38_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp38_AST); match(LITERAL_boolean); builtInType_AST = (AST)currentAST.root; break; } case LITERAL_byte: { AST tmp39_AST = null; tmp39_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp39_AST); match(LITERAL_byte); builtInType_AST = (AST)currentAST.root; break; } case LITERAL_char: { AST tmp40_AST = null; tmp40_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp40_AST); match(LITERAL_char); builtInType_AST = (AST)currentAST.root; break; } case LITERAL_short: { AST tmp41_AST = null; tmp41_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp41_AST); match(LITERAL_short); builtInType_AST = (AST)currentAST.root; break; } case LITERAL_int: { AST tmp42_AST = null; tmp42_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp42_AST); match(LITERAL_int); builtInType_AST = (AST)currentAST.root; break; } case LITERAL_float: { AST tmp43_AST = null; tmp43_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp43_AST); match(LITERAL_float); builtInType_AST = (AST)currentAST.root; break; } case LITERAL_long: { AST tmp44_AST = null; tmp44_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp44_AST); match(LITERAL_long); builtInType_AST = (AST)currentAST.root; break; } case LITERAL_double: { AST tmp45_AST = null; tmp45_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp45_AST); match(LITERAL_double); builtInType_AST = (AST)currentAST.root; break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } returnAST = builtInType_AST; } public final void type() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST type_AST = null; switch ( LA(1)) { case IDENT: { classOrInterfaceType(false); astFactory.addASTChild(currentAST, returnAST); type_AST = (AST)currentAST.root; break; } 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: { builtInType(); astFactory.addASTChild(currentAST, returnAST); type_AST = (AST)currentAST.root; break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } returnAST = type_AST; } public final void modifier() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST modifier_AST = null; switch ( LA(1)) { case LITERAL_private: { AST tmp46_AST = null; tmp46_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp46_AST); match(LITERAL_private); modifier_AST = (AST)currentAST.root; break; } case LITERAL_public: { AST tmp47_AST = null; tmp47_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp47_AST); match(LITERAL_public); modifier_AST = (AST)currentAST.root; break; } case LITERAL_protected: { AST tmp48_AST = null; tmp48_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp48_AST); match(LITERAL_protected); modifier_AST = (AST)currentAST.root; break; } case LITERAL_static: { AST tmp49_AST = null; tmp49_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp49_AST); match(LITERAL_static); modifier_AST = (AST)currentAST.root; break; } case LITERAL_transient: { AST tmp50_AST = null; tmp50_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp50_AST); match(LITERAL_transient); modifier_AST = (AST)currentAST.root; break; } case FINAL: { AST tmp51_AST = null; tmp51_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp51_AST); match(FINAL); modifier_AST = (AST)currentAST.root; break; } case ABSTRACT: { AST tmp52_AST = null; tmp52_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp52_AST); match(ABSTRACT); modifier_AST = (AST)currentAST.root; break; } case LITERAL_native: { AST tmp53_AST = null; tmp53_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp53_AST); match(LITERAL_native); modifier_AST = (AST)currentAST.root; break; } case LITERAL_threadsafe: { AST tmp54_AST = null; tmp54_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp54_AST); match(LITERAL_threadsafe); modifier_AST = (AST)currentAST.root; break; } case LITERAL_synchronized: { AST tmp55_AST = null; tmp55_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp55_AST); match(LITERAL_synchronized); modifier_AST = (AST)currentAST.root; break; } case LITERAL_volatile: { AST tmp56_AST = null; tmp56_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp56_AST); match(LITERAL_volatile); modifier_AST = (AST)currentAST.root; break; } case STRICTFP: { AST tmp57_AST = null; tmp57_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp57_AST); match(STRICTFP); modifier_AST = (AST)currentAST.root; break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } returnAST = modifier_AST; } public final void annotation() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST annotation_AST = null; AST i_AST = null; AST args_AST = null; Token first = LT(1); match(AT); identifier(); i_AST = (AST)returnAST; { switch ( LA(1)) { case LPAREN: { match(LPAREN); { switch ( LA(1)) { case IDENT: case LITERAL_super: case LT: 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 AT: case LPAREN: case LCURLY: case LITERAL_this: case PLUS: case MINUS: case INC: case DEC: case BNOT: case LNOT: case LITERAL_true: case LITERAL_false: case LITERAL_null: case LITERAL_new: case NUM_INT: case STRING_LITERAL: case NUM_FLOAT: case NUM_LONG: case NUM_DOUBLE: { annotationArguments(); args_AST = (AST)returnAST; break; } case RPAREN: { break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } match(RPAREN); break; } case FINAL: case ABSTRACT: case STRICTFP: case LITERAL_package: case SEMI: case LITERAL_static: case IDENT: case LT: case COMMA: 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_private: case LITERAL_public: case LITERAL_protected: case LITERAL_transient: case LITERAL_native: case LITERAL_threadsafe: case LITERAL_synchronized: case LITERAL_volatile: case AT: case RPAREN: case RCURLY: case LITERAL_class: case LITERAL_interface: case LITERAL_enum: { break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } if ( inputState.guessing==0 ) { annotation_AST = (AST)currentAST.root; annotation_AST = (AST)astFactory.make( (new ASTArray(3)).add(create(ANNOTATION,"ANNOTATION",first,LT(1))).add(i_AST).add(args_AST)); currentAST.root = annotation_AST; currentAST.child = annotation_AST!=null &&annotation_AST.getFirstChild()!=null ? annotation_AST.getFirstChild() : annotation_AST; currentAST.advanceChildToEnd(); } returnAST = annotation_AST; } public final void annotationArguments() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST annotationArguments_AST = null; if ((_tokenSet_10.member(LA(1))) && (_tokenSet_11.member(LA(2)))) { annotationMemberValueInitializer(); astFactory.addASTChild(currentAST, returnAST); annotationArguments_AST = (AST)currentAST.root; } else if ((LA(1)==IDENT) && (LA(2)==ASSIGN)) { anntotationMemberValuePairs(); astFactory.addASTChild(currentAST, returnAST); annotationArguments_AST = (AST)currentAST.root; } else { throw new NoViableAltException(LT(1), getFilename()); } returnAST = annotationArguments_AST; } public final void annotationMemberValueInitializer() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST annotationMemberValueInitializer_AST = null; switch ( LA(1)) { case IDENT: case LITERAL_super: case LT: 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 LPAREN: case LITERAL_this: case PLUS: case MINUS: case INC: case DEC: case BNOT: case LNOT: case LITERAL_true:
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?