public class RubyParser extends Object
Modifier and Type | Field and Description |
---|---|
static int |
k__ENCODING__ |
static int |
k__FILE__ |
static int |
k__LINE__ |
static int |
kALIAS |
static int |
kAND |
static int |
kBEGIN |
static int |
kBREAK |
static int |
kCASE |
static int |
kCLASS |
static int |
kDEF |
static int |
kDEFINED |
static int |
kDO |
static int |
kDO_BLOCK |
static int |
kDO_COND |
static int |
kDO_LAMBDA |
static int |
kELSE |
static int |
kELSIF |
static int |
kEND |
static int |
kENSURE |
static int |
kFALSE |
static int |
kFOR |
static int |
kIF |
static int |
kIF_MOD |
static int |
kIN |
static int |
klBEGIN |
static int |
klEND |
static int |
kMODULE |
static int |
kNEXT |
static int |
kNIL |
static int |
kNOT |
static int |
kOR |
static int |
kREDO |
static int |
kRESCUE |
static int |
kRESCUE_MOD |
static int |
kRETRY |
static int |
kRETURN |
static int |
kSELF |
static int |
kSUPER |
static int |
kTHEN |
static int |
kTRUE |
static int |
kUNDEF |
static int |
kUNLESS |
static int |
kUNLESS_MOD |
static int |
kUNTIL |
static int |
kUNTIL_MOD |
static int |
kWHEN |
static int |
kWHILE |
static int |
kWHILE_MOD |
static int |
kYIELD |
protected RubyLexer |
lexer |
protected ParserSupport |
support |
static int |
tAMPER |
static int |
tAMPER2 |
static int |
tANDDOT |
static int |
tANDOP |
static int |
tAREF |
static int |
tASET |
static int |
tASSOC |
static int |
tBACK_REF |
static int |
tBACK_REF2 |
static int |
tBANG |
static int |
tCARET |
static int |
tCHAR |
static int |
tCMP |
static int |
tCOLON2 |
static int |
tCOLON3 |
static int |
tCONSTANT |
static int |
tCVAR |
static int |
tDIVIDE |
static int |
tDOT |
static int |
tDOT2 |
static int |
tDOT3 |
static int |
tDSTAR |
static int |
tEQ |
static int |
tEQQ |
static int |
tFID |
static int |
tFLOAT |
static int |
tGEQ |
static int |
tGT |
static int |
tGVAR |
static int |
tIDENTIFIER |
static int |
tIMAGINARY |
static int |
tINTEGER |
static int |
tIVAR |
static int |
tLABEL |
static int |
tLABEL_END |
static int |
tLAMBDA |
static int |
tLAMBEG |
static int |
tLBRACE |
static int |
tLBRACE_ARG |
static int |
tLBRACK |
static int |
tLCURLY |
static int |
tLEQ |
static int |
tLOWEST |
static int |
tLPAREN |
static int |
tLPAREN_ARG |
static int |
tLPAREN2 |
static int |
tLSHFT |
static int |
tLT |
static int |
tMATCH |
static int |
tMINUS |
static int |
tNEQ |
static int |
tNMATCH |
static int |
tNTH_REF |
static int |
tOP_ASGN |
static int |
tOROP |
static int |
tPERCENT |
static int |
tPIPE |
static int |
tPLUS |
static int |
tPOW |
static int |
tQSYMBOLS_BEG |
static int |
tQWORDS_BEG |
static int |
tRATIONAL |
static int |
tRBRACK |
static int |
tRCURLY |
static int |
tREGEXP_BEG |
static int |
tREGEXP_END |
static int |
tRPAREN |
static int |
tRSHFT |
static int |
tSTAR |
static int |
tSTAR2 |
static int |
tSTRING_BEG |
static int |
tSTRING_CONTENT |
static int |
tSTRING_DBEG |
static int |
tSTRING_DEND |
static int |
tSTRING_DVAR |
static int |
tSTRING_END |
static int |
tSYMBEG |
static int |
tSYMBOLS_BEG |
static int |
tTILDE |
static int |
tUMINUS |
static int |
tUMINUS_NUM |
static int |
tUPLUS |
static int |
tWORDS_BEG |
static int |
tXSTRING_BEG |
protected static short[] |
yyCheck |
protected YYDebug |
yydebug |
protected static short[] |
yyDefRed
parser tables.
|
protected static short[] |
yyDgoto
parser tables.
|
static int |
yyErrorCode |
protected static int |
yyFinal
number of final state.
|
protected static short[] |
yyGindex
parser tables.
|
protected static short[] |
yyLen
parser tables.
|
protected static short[] |
yyLhs
parser tables.
|
protected int |
yyMax
initial size and increment of the state/value stack [default 256].
|
protected static String[] |
yyNames
maps symbol value to printable name.
|
protected static short[] |
yyRindex
parser tables.
|
protected static String[] |
yyRule
printable rules for debugging.
|
protected static short[] |
yySindex
parser tables.
|
protected static short[] |
yyTable |
Constructor and Description |
---|
RubyParser(LexerSource source)
Deprecated.
|
RubyParser(LexerSource source,
IRubyWarnings warnings) |
RubyParser(ParserSupport support,
LexerSource source)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
RubyParserResult |
parse(ParserConfiguration configuration)
The parse method use an lexer stream and parse it to an AST node
structure
|
void |
setWarnings(IRubyWarnings warnings) |
protected Object |
yyDefault(Object first)
executed at the beginning of a reduce action.
|
protected String[] |
yyExpecting(int state)
computes list of expected tokens on error by tracing the tables.
|
static String |
yyName(int token)
index-checked interface to
yyNames . |
Object |
yyparse(RubyLexer yyLex)
the generated parser.
|
Object |
yyparse(RubyLexer yyLex,
Object ayydebug)
the generated parser, with debugging messages.
|
protected ParserSupport support
protected RubyLexer lexer
public static final int kCLASS
public static final int kMODULE
public static final int kDEF
public static final int kUNDEF
public static final int kBEGIN
public static final int kRESCUE
public static final int kENSURE
public static final int kEND
public static final int kIF
public static final int kUNLESS
public static final int kTHEN
public static final int kELSIF
public static final int kELSE
public static final int kCASE
public static final int kWHEN
public static final int kWHILE
public static final int kUNTIL
public static final int kFOR
public static final int kBREAK
public static final int kNEXT
public static final int kREDO
public static final int kRETRY
public static final int kIN
public static final int kDO
public static final int kDO_COND
public static final int kDO_BLOCK
public static final int kRETURN
public static final int kYIELD
public static final int kSUPER
public static final int kSELF
public static final int kNIL
public static final int kTRUE
public static final int kFALSE
public static final int kAND
public static final int kOR
public static final int kNOT
public static final int kIF_MOD
public static final int kUNLESS_MOD
public static final int kWHILE_MOD
public static final int kUNTIL_MOD
public static final int kRESCUE_MOD
public static final int kALIAS
public static final int kDEFINED
public static final int klBEGIN
public static final int klEND
public static final int k__LINE__
public static final int k__FILE__
public static final int k__ENCODING__
public static final int kDO_LAMBDA
public static final int tIDENTIFIER
public static final int tFID
public static final int tGVAR
public static final int tIVAR
public static final int tCONSTANT
public static final int tCVAR
public static final int tLABEL
public static final int tCHAR
public static final int tUPLUS
public static final int tUMINUS
public static final int tUMINUS_NUM
public static final int tPOW
public static final int tCMP
public static final int tEQ
public static final int tEQQ
public static final int tNEQ
public static final int tGEQ
public static final int tLEQ
public static final int tANDOP
public static final int tOROP
public static final int tMATCH
public static final int tNMATCH
public static final int tDOT
public static final int tDOT2
public static final int tDOT3
public static final int tAREF
public static final int tASET
public static final int tLSHFT
public static final int tRSHFT
public static final int tANDDOT
public static final int tCOLON2
public static final int tCOLON3
public static final int tOP_ASGN
public static final int tASSOC
public static final int tLPAREN
public static final int tLPAREN2
public static final int tRPAREN
public static final int tLPAREN_ARG
public static final int tLBRACK
public static final int tRBRACK
public static final int tLBRACE
public static final int tLBRACE_ARG
public static final int tSTAR
public static final int tSTAR2
public static final int tAMPER
public static final int tAMPER2
public static final int tTILDE
public static final int tPERCENT
public static final int tDIVIDE
public static final int tPLUS
public static final int tMINUS
public static final int tLT
public static final int tGT
public static final int tPIPE
public static final int tBANG
public static final int tCARET
public static final int tLCURLY
public static final int tRCURLY
public static final int tBACK_REF2
public static final int tSYMBEG
public static final int tSTRING_BEG
public static final int tXSTRING_BEG
public static final int tREGEXP_BEG
public static final int tWORDS_BEG
public static final int tQWORDS_BEG
public static final int tSTRING_DBEG
public static final int tSTRING_DVAR
public static final int tSTRING_END
public static final int tLAMBDA
public static final int tLAMBEG
public static final int tNTH_REF
public static final int tBACK_REF
public static final int tSTRING_CONTENT
public static final int tINTEGER
public static final int tIMAGINARY
public static final int tFLOAT
public static final int tRATIONAL
public static final int tREGEXP_END
public static final int tSYMBOLS_BEG
public static final int tQSYMBOLS_BEG
public static final int tDSTAR
public static final int tSTRING_DEND
public static final int tLABEL_END
public static final int tLOWEST
public static final int yyErrorCode
protected static final int yyFinal
protected static final short[] yyLhs
protected static final short[] yyLen
protected static final short[] yyDefRed
protected static final short[] yyDgoto
protected static final short[] yySindex
protected static final short[] yyRindex
protected static final short[] yyGindex
protected static final short[] yyTable
protected static final short[] yyCheck
protected static final String[] yyNames
yyExpecting(int)
protected static final String[] yyRule
protected YYDebug yydebug
protected int yyMax
yyparse(org.jruby.lexer.yacc.RubyLexer, java.lang.Object)
.public RubyParser(LexerSource source, IRubyWarnings warnings)
@Deprecated public RubyParser(LexerSource source)
@Deprecated public RubyParser(ParserSupport support, LexerSource source)
public void setWarnings(IRubyWarnings warnings)
public static String yyName(int token)
yyNames
.token
- single character or %token value.protected String[] yyExpecting(int state)
state
- for which to compute the list.public Object yyparse(RubyLexer yyLex, Object ayydebug) throws IOException
yyLex
- scanner.ayydebug
- debug message writer implementing yyDebug, or null.IOException
protected Object yyDefault(Object first)
first
- value for $1, or null.public Object yyparse(RubyLexer yyLex) throws IOException
yyLex
- scanner.IOException
public RubyParserResult parse(ParserConfiguration configuration) throws IOException
IOException
Copyright © 2001-2017 JRuby. All Rights Reserved.