📄 javarecognizer.java
字号:
else
{
break _loop10;
}
}
while ( true );
}
ruleSet();
astFactory.addASTChild( currentAST,
returnAST );
ruleFile_AST = (AST) currentAST.root;
returnAST = ruleFile_AST;
}
public final void ruleSet() throws RecognitionException,
TokenStreamException
{
returnAST = null;
ASTPair currentAST = new ASTPair();
AST ruleSet_AST = null;
AST tmp5_AST = null;
tmp5_AST = astFactory.create( LT( 1 ) );
astFactory.makeASTRoot( currentAST,
tmp5_AST );
match( RULE_SET );
AST tmp6_AST = null;
tmp6_AST = astFactory.create( LT( 1 ) );
astFactory.addASTChild( currentAST,
tmp6_AST );
match( IDENT );
match( LCURLY );
{
int _cnt13 = 0;
_loop13 : do
{
if ( (LA( 1 ) == RULE) )
{
rule();
astFactory.addASTChild( currentAST,
returnAST );
}
else
{
if ( _cnt13 >= 1 )
{
break _loop13;
}
else
{
throw new NoViableAltException( LT( 1 ),
getFilename() );
}
}
_cnt13++;
}
while ( true );
}
match( RCURLY );
ruleSet_AST = (AST) currentAST.root;
returnAST = ruleSet_AST;
}
public final void rule() throws RecognitionException,
TokenStreamException
{
returnAST = null;
ASTPair currentAST = new ASTPair();
AST rule_AST = null;
AST param_AST = null;
AST tmp9_AST = null;
tmp9_AST = astFactory.create( LT( 1 ) );
astFactory.makeASTRoot( currentAST,
tmp9_AST );
match( RULE );
AST tmp10_AST = null;
tmp10_AST = astFactory.create( LT( 1 ) );
astFactory.addASTChild( currentAST,
tmp10_AST );
match( IDENT );
match( LPAREN );
parameterDeclarationList();
param_AST = (AST) returnAST;
astFactory.addASTChild( currentAST,
returnAST );
match( RPAREN );
match( LCURLY );
{
_loop16 : do
{
if ( (_tokenSet_3.member( LA( 1 ) )) )
{
parameterDeclaration();
astFactory.addASTChild( currentAST,
returnAST );
}
else
{
break _loop16;
}
}
while ( true );
}
whenBlock();
astFactory.addASTChild( currentAST,
returnAST );
thenBlock();
astFactory.addASTChild( currentAST,
returnAST );
match( RCURLY );
rule_AST = (AST) currentAST.root;
returnAST = rule_AST;
}
public final void parameterDeclarationList() throws RecognitionException,
TokenStreamException
{
returnAST = null;
ASTPair currentAST = new ASTPair();
AST parameterDeclarationList_AST = null;
{
switch ( LA( 1 ) )
{
case FINAL :
case IDENT :
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 :
{
parameterDeclaration();
astFactory.addASTChild( currentAST,
returnAST );
{
_loop100 : do
{
if ( (LA( 1 ) == COMMA) )
{
match( COMMA );
parameterDeclaration();
astFactory.addASTChild( currentAST,
returnAST );
}
else
{
break _loop100;
}
}
while ( true );
}
break;
}
case RPAREN :
{
break;
}
default :
{
throw new NoViableAltException( LT( 1 ),
getFilename() );
}
}
}
if ( inputState.guessing == 0 )
{
parameterDeclarationList_AST = (AST) currentAST.root;
parameterDeclarationList_AST = (AST) astFactory.make( (new ASTArray( 2 )).add( astFactory.create( PARAMETERS,
"PARAMETERS" ) ).add( parameterDeclarationList_AST ) );
currentAST.root = parameterDeclarationList_AST;
currentAST.child = parameterDeclarationList_AST != null && parameterDeclarationList_AST.getFirstChild() != null ? parameterDeclarationList_AST.getFirstChild() : parameterDeclarationList_AST;
currentAST.advanceChildToEnd();
}
parameterDeclarationList_AST = (AST) currentAST.root;
returnAST = parameterDeclarationList_AST;
}
public final void parameterDeclaration() throws RecognitionException,
TokenStreamException
{
returnAST = null;
ASTPair currentAST = new ASTPair();
AST parameterDeclaration_AST = null;
AST pm_AST = null;
AST t_AST = null;
Token id = null;
AST id_AST = null;
AST pd_AST = null;
parameterModifier();
pm_AST = (AST) returnAST;
typeSpec( false );
t_AST = (AST) returnAST;
id = LT( 1 );
id_AST = astFactory.create( id );
match( IDENT );
declaratorBrackets( t_AST );
pd_AST = (AST) returnAST;
if ( inputState.guessing == 0 )
{
parameterDeclaration_AST = (AST) currentAST.root;
parameterDeclaration_AST = (AST) astFactory.make( (new ASTArray( 4 )).add( astFactory.create( PARAMETER_DEF,
"PARAMETER_DEF" ) ).add( pm_AST ).add( (AST) astFactory.make( (new ASTArray( 2 )).add( astFactory.create( TYPE,
"TYPE" ) ).add( pd_AST ) ) ).add( id_AST ) );
currentAST.root = parameterDeclaration_AST;
currentAST.child = parameterDeclaration_AST != null && parameterDeclaration_AST.getFirstChild() != null ? parameterDeclaration_AST.getFirstChild() : parameterDeclaration_AST;
currentAST.advanceChildToEnd();
}
returnAST = parameterDeclaration_AST;
}
public final void whenBlock() throws RecognitionException,
TokenStreamException
{
returnAST = null;
ASTPair currentAST = new ASTPair();
AST whenBlock_AST = null;
AST tmp16_AST = null;
tmp16_AST = astFactory.create( LT( 1 ) );
astFactory.makeASTRoot( currentAST,
tmp16_AST );
match( WHEN );
match( LCURLY );
{
int _cnt20 = 0;
_loop20 : do
{
if ( (_tokenSet_4.member( LA( 1 ) )) )
{
{
if ( (LA( 1 ) == IDENT) && (LA( 2 ) == ASSIGN) )
{
consistentAssignmentExpression();
astFactory.addASTChild( currentAST,
returnAST );
}
else if ( (_tokenSet_4.member( LA( 1 ) )) && (_tokenSet_5.member( LA( 2 ) )) )
{
inclusiveOrExpression();
astFactory.addASTChild( currentAST,
returnAST );
}
else
{
throw new NoViableAltException( LT( 1 ),
getFilename() );
}
}
match( SEMI );
}
else
{
if ( _cnt20 >= 1 )
{
break _loop20;
}
else
{
throw new NoViableAltException( LT( 1 ),
getFilename() );
}
}
_cnt20++;
}
while ( true );
}
match( RCURLY );
whenBlock_AST = (AST) currentAST.root;
returnAST = whenBlock_AST;
}
public final void thenBlock() throws RecognitionException,
TokenStreamException
{
returnAST = null;
ASTPair currentAST = new ASTPair();
AST thenBlock_AST = null;
AST tmp20_AST = null;
tmp20_AST = astFactory.create( LT( 1 ) );
astFactory.makeASTRoot( currentAST,
tmp20_AST );
match( THEN );
compoundStatement();
astFactory.addASTChild( currentAST,
returnAST );
thenBlock_AST = (AST) currentAST.root;
returnAST = thenBlock_AST;
}
public final void consistentAssignmentExpression() throws RecognitionException,
TokenStreamException
{
returnAST = null;
ASTPair currentAST = new ASTPair();
AST consistentAssignmentExpression_AST = null;
AST tmp21_AST = null;
tmp21_AST = astFactory.create( LT( 1 ) );
astFactory.addASTChild( currentAST,
tmp21_AST );
match( IDENT );
AST tmp22_AST = null;
tmp22_AST = astFactory.create( LT( 1 ) );
astFactory.makeASTRoot( currentAST,
tmp22_AST );
match( ASSIGN );
inclusiveOrExpression();
astFactory.addASTChild( currentAST,
returnAST );
consistentAssignmentExpression_AST = (AST) currentAST.root;
returnAST = consistentAssignmentExpression_AST;
}
public final void inclusiveOrExpression() throws RecognitionException,
TokenStreamException
{
returnAST = null;
ASTPair currentAST = new ASTPair();
AST inclusiveOrExpression_AST = null;
exclusiveOrExpression();
astFactory.addASTChild( currentAST,
returnAST );
{
_loop154 : do
{
if ( (LA( 1 ) == BOR) )
{
AST tmp23_AST = null;
tmp23_AST = astFactory.create( LT( 1 ) );
astFactory.makeASTRoot( currentAST,
tmp23_AST );
match( BOR );
exclusiveOrExpression();
astFactory.addASTChild( currentAST,
returnAST );
}
else
{
break _loop154;
}
}
while ( true );
}
inclusiveOrExpression_AST = (AST) currentAST.root;
returnAST = inclusiveOrExpression_AST;
}
public final void compoundStatement() throws RecognitionException,
TokenStreamException
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -