public class RubyParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
keyword__ENCODING__ |
static int |
keyword__FILE__ |
static int |
keyword__LINE__ |
static int |
keyword_alias |
static int |
keyword_and |
static int |
keyword_begin |
static int |
keyword_BEGIN |
static int |
keyword_break |
static int |
keyword_case |
static int |
keyword_class |
static int |
keyword_def |
static int |
keyword_defined |
static int |
keyword_do |
static int |
keyword_do_block |
static int |
keyword_do_cond |
static int |
keyword_do_lambda |
static int |
keyword_else |
static int |
keyword_elsif |
static int |
keyword_end |
static int |
keyword_END |
static int |
keyword_ensure |
static int |
keyword_false |
static int |
keyword_for |
static int |
keyword_if |
static int |
keyword_in |
static int |
keyword_module |
static int |
keyword_next |
static int |
keyword_nil |
static int |
keyword_not |
static int |
keyword_or |
static int |
keyword_redo |
static int |
keyword_rescue |
static int |
keyword_retry |
static int |
keyword_return |
static int |
keyword_self |
static int |
keyword_super |
static int |
keyword_then |
static int |
keyword_true |
static int |
keyword_undef |
static int |
keyword_unless |
static int |
keyword_until |
static int |
keyword_when |
static int |
keyword_while |
static int |
keyword_yield |
protected RubyLexer |
lexer |
static int |
modifier_if |
static int |
modifier_rescue |
static int |
modifier_unless |
static int |
modifier_until |
static int |
modifier_while |
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 java.lang.String[] |
yyNames
maps symbol value to printable name.
|
protected static short[] |
yyRindex
parser tables.
|
protected static java.lang.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 java.lang.Object |
yyDefault(java.lang.Object first)
executed at the beginning of a reduce action.
|
protected java.lang.String[] |
yyExpecting(int state)
computes list of expected tokens on error by tracing the tables.
|
static java.lang.String |
yyName(int token)
index-checked interface to
yyNames . |
java.lang.Object |
yyparse(RubyLexer yyLex)
the generated parser.
|
java.lang.Object |
yyparse(RubyLexer yyLex,
java.lang.Object ayydebug)
the generated parser, with debugging messages.
|
protected ParserSupport support
protected RubyLexer lexer
public static final int keyword_class
public static final int keyword_module
public static final int keyword_def
public static final int keyword_undef
public static final int keyword_begin
public static final int keyword_rescue
public static final int keyword_ensure
public static final int keyword_end
public static final int keyword_if
public static final int keyword_unless
public static final int keyword_then
public static final int keyword_elsif
public static final int keyword_else
public static final int keyword_case
public static final int keyword_when
public static final int keyword_while
public static final int keyword_until
public static final int keyword_for
public static final int keyword_break
public static final int keyword_next
public static final int keyword_redo
public static final int keyword_retry
public static final int keyword_in
public static final int keyword_do
public static final int keyword_do_cond
public static final int keyword_do_block
public static final int keyword_return
public static final int keyword_yield
public static final int keyword_super
public static final int keyword_self
public static final int keyword_nil
public static final int keyword_true
public static final int keyword_false
public static final int keyword_and
public static final int keyword_or
public static final int keyword_not
public static final int modifier_if
public static final int modifier_unless
public static final int modifier_while
public static final int modifier_until
public static final int modifier_rescue
public static final int keyword_alias
public static final int keyword_defined
public static final int keyword_BEGIN
public static final int keyword_END
public static final int keyword__LINE__
public static final int keyword__FILE__
public static final int keyword__ENCODING__
public static final int keyword_do_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 java.lang.String[] yyNames
yyExpecting(int)
protected static final java.lang.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 java.lang.String yyName(int token)
yyNames
.token
- single character or %token value.protected java.lang.String[] yyExpecting(int state)
state
- for which to compute the list.public java.lang.Object yyparse(RubyLexer yyLex, java.lang.Object ayydebug) throws java.io.IOException
yyLex
- scanner.ayydebug
- debug message writer implementing yyDebug, or null.java.io.IOException
protected java.lang.Object yyDefault(java.lang.Object first)
first
- value for $1, or null.public java.lang.Object yyparse(RubyLexer yyLex) throws java.io.IOException
yyLex
- scanner.java.io.IOException
public RubyParserResult parse(ParserConfiguration configuration) throws java.io.IOException
java.io.IOException
Copyright © 2001-2018 JRuby. All Rights Reserved.