Package org.jruby.ext.ripper
Class RipperParserBase
java.lang.Object
org.jruby.ext.ripper.RipperParserBase
- Direct Known Subclasses:
RipperParser
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ThreadContext
protected StaticScope
protected boolean
protected boolean
protected int
protected boolean
protected RubyLexer
static final ByteList
protected IRubyObject
protected ScopedParserState
protected boolean
-
Constructor Summary
ConstructorsConstructorDescriptionRipperParserBase
(ThreadContext context, IRubyObject ripper, LexerSource source) -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected NodeExits
arg_add_optblock
(IRubyObject arg1, IRubyObject arg2) protected IRubyObject
assignable
(ByteList name, IRubyObject value) assignableConstant
(IRubyObject value) assignableIdentifier
(IRubyObject value) protected IRubyObject
backref_error
(IRubyObject ref, IRubyObject expr) protected void
begin_definition
(String name) protected IRubyObject
call_bin_op
(IRubyObject left, IRubyObject id, IRubyObject right, int line) protected IRubyObject
call_bin_op
(IRubyObject left, ByteList id, IRubyObject right, int line) protected IRubyObject
call_uni_op
(IRubyObject recv, IRubyObject id) protected IRubyObject
call_uni_op
(IRubyObject recv, ByteList id) boolean
protected void
clear_block_exit
(boolean value) compile_error
(String message) protected IRubyObject
const_decl
(IRubyObject path) dispatch
(String method_name, IRubyObject arg1) dispatch
(String method_name, IRubyObject arg1, IRubyObject arg2) dispatch
(String method_name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) dispatch
(String method_name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4) dispatch
(String method_name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, IRubyObject arg5) dispatch
(String method_name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, IRubyObject arg5, IRubyObject arg6, IRubyObject arg7) protected boolean
org.jcodings.Encoding
encoding()
void
endless_method_name
(DefHolder holder, ProductionState loc) void
error()
void
protected void
error_duplicate_pattern_variable
(ByteList variable) escape
(IRubyObject arg) protected ByteList
extractByteList
(Object value) fals()
formal_argument
(ByteList identifier, IRubyObject lhs) protected void
forwarding_arg_check
(ByteList rest, ByteList all, String var) get_id
(IRubyObject _ignored) protected Set
protected IRubyObject
protected IRubyObject
protected IRubyObject
get_value
(IRubyObject value) int
long
org.jcodings.Encoding
int
int
protected LexContext
long
protected int
int
getState()
protected void
getterIdentifierError
(ByteList identifier) boolean
boolean
heredoc_dedent
(IRubyObject array) boolean
static RubyParserBase.IDType
protected NodeExits
void
boolean
is_local_id
(ByteList name) boolean
is_private_local_id
(ByteList name) boolean
boolean
isError()
protected boolean
isEval()
boolean
boolean
isInDef()
protected IRubyObject
it_id()
keyword_arg
(IRubyObject key, IRubyObject value) boolean
protected IRubyObject
logop
(IRubyObject left, ByteList id, IRubyObject right) makeNullNil
(IRubyObject value) protected IRubyObject
match_op
(IRubyObject left, IRubyObject right) method_add_block
(IRubyObject method, IRubyObject block) method_cond
(IRubyObject value) method_optarg
(IRubyObject method, IRubyObject arg) new_args
(int _line, IRubyObject f, IRubyObject o, IRubyObject r, IRubyObject p, ArgsTailHolder tail) new_args_tail
(int _line, IRubyObject kwarg, IRubyObject kwargRest, IRubyObject block) new_args_tail
(int line, IRubyObject kwarg, IRubyObject kwargRest, ByteList block) new_args_tail
(int _line, IRubyObject kwarg, ByteList kwargRest, IRubyObject block) protected ArgsTailHolder
new_args_tail
(int line, IRubyObject keywordArg, ByteList keywordRestArgName, ByteList block) new_array
(IRubyObject... args) new_array_pattern
(int _line, IRubyObject constant, IRubyObject preArg, RubyArray arrayPattern) new_array_pattern_tail
(int _line, IRubyObject preArgs, boolean hasRest, IRubyObject restArg, RubyArray postArgs) new_assoc
(IRubyObject key, IRubyObject value) protected IRubyObject
new_defined
(long _line, IRubyObject value) protected IRubyObject
NEW_ERROR
(ProductionState value) new_find_pattern
(IRubyObject constant, RubyArray findPattern) new_find_pattern_tail
(int _line, IRubyObject preRestArg, IRubyObject args, IRubyObject postRestArg) new_hash_pattern
(IRubyObject constant, RubyArray hashPattern) new_hash_pattern_tail
(int _line, IRubyObject keywordArgs, IRubyObject keywordRestValue) new_regexp
(int line, IRubyObject contents, IRubyObject end) protected void
next_rescue_context
(LexContext context, LexContext.InRescue value) nil()
none()
void
numparam_name
(ByteList name) void
numparam_pop
(Node previousInner) void
parse
(boolean isDebug) The parse method use an lexer stream and parse it to an AST node structureprotected void
protected void
void
protected void
push_end_expect_token_locations
(int line) void
void
remove_begin
(IRubyObject value) void
reset()
int
protected void
restore_block_exit
(NodeExits nodeExits) void
restore_defun
(DefHolder holder) int
restoreMaxNumParam
(int maxNum) protected IRubyObject
ripper_new_yylval
(IRubyObject id, IRubyObject b, IRubyObject c) protected void
set_it_id
(IRubyObject node) void
setBraceNest
(int braceNest) void
setCommandStart
(boolean value) void
setCurrentArg
(IRubyObject arg) void
setHeredocIndent
(int indent) protected void
setHeredocLineIndent
(int value) void
setInDef
(boolean inDefinition) void
setInSingle
(int inSingleton) void
setIsInClass
(boolean inClass) void
setLeftParenBegin
(Integer integer) protected void
setLexContext
(LexContext lexContext) void
setState
(int lexState) void
setStrTerm
(StrTerm object) void
setYYDebug
(boolean yydebug) shadowing_lvar
(ByteList nameBytes) protected int
src_line()
symbolID
(IRubyObject ident) protected void
token_info_drop
(String value, ProductionState loc) protected void
token_info_pop
(String value, ProductionState loc) protected void
token_info_push
(String value, ProductionState loc) protected void
token_info_setup
(String value, ProductionState loc) protected void
token_info_warn
(String name, int same, ProductionState loc) protected IRubyObject
value_expr
(IRubyObject value) var_field
(IRubyObject value) void_stmts
(IRubyObject value) void
void
protected void
void
warn_experimental
(int line, String message) void
void
void
void
-
Field Details
-
ripper
-
context
-
lexer
-
currentScope
-
inDefinition
protected boolean inDefinition -
inClass
protected boolean inClass -
yydebug
protected boolean yydebug -
isError
protected boolean isError -
inSingleton
protected int inSingleton -
scopedParserState
-
case_labels
-
NOT
-
-
Constructor Details
-
RipperParserBase
-
-
Method Details
-
initTopLocalVariables
public void initTopLocalVariables() -
reset
public void reset() -
yyparse
- Throws:
IOException
-
yyparse
- Throws:
IOException
-
parse
The parse method use an lexer stream and parse it to an AST node structure- Throws:
IOException
-
arg_add_optblock
-
arg_var
-
assignableConstant
-
assignableIdentifier
-
dispatch
-
dispatch
-
dispatch
-
dispatch
public IRubyObject dispatch(String method_name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) -
dispatch
public IRubyObject dispatch(String method_name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4) -
dispatch
public IRubyObject dispatch(String method_name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, IRubyObject arg5) -
dispatch
public IRubyObject dispatch(String method_name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, IRubyObject arg5, IRubyObject arg6, IRubyObject arg7) -
escape
-
formal_argument
-
getterIdentifierError
-
id_is_var
-
intern
-
intern
-
new_defined
-
new_regexp
-
match_op
-
call_bin_op
-
call_bin_op
-
call_uni_op
-
call_uni_op
-
logop
-
push_pvtbl
-
pop_pvtbl
-
push_pktbl
-
pop_pktbl
-
numparam_push
-
numparam_pop
-
resetMaxNumParam
public int resetMaxNumParam() -
restoreMaxNumParam
public int restoreMaxNumParam(int maxNum) -
ordinalMaxNumParam
public void ordinalMaxNumParam() -
src_line
protected int src_line() -
value_expr
-
assignable
-
backref_error
-
getParenNest
protected int getParenNest() -
add_forwarding_args
public void add_forwarding_args() -
method_optarg
-
keyword_arg
-
new_args
public IRubyObject new_args(int _line, IRubyObject f, IRubyObject o, IRubyObject r, IRubyObject p, ArgsTailHolder tail) -
new_args_tail
public ArgsTailHolder new_args_tail(int line, IRubyObject kwarg, IRubyObject kwargRest, ByteList block) -
new_args_tail
public ArgsTailHolder new_args_tail(int _line, IRubyObject kwarg, IRubyObject kwargRest, IRubyObject block) -
new_args_tail
public ArgsTailHolder new_args_tail(int _line, IRubyObject kwarg, ByteList kwargRest, IRubyObject block) -
new_args_tail
protected ArgsTailHolder new_args_tail(int line, IRubyObject keywordArg, ByteList keywordRestArgName, ByteList block) -
method_add_block
-
getEncoding
public org.jcodings.Encoding getEncoding() -
createStr
-
internalId
-
new_array
-
new_assoc
-
new_bv
-
popCurrentScope
public void popCurrentScope() -
pushBlockScope
public void pushBlockScope() -
pushLocalScope
public void pushLocalScope() -
getHeredocIndent
public int getHeredocIndent() -
setHeredocIndent
public void setHeredocIndent(int indent) -
heredoc_dedent
-
setCommandStart
public void setCommandStart(boolean value) -
shadowing_lvar
-
getConditionState
-
isInDef
public boolean isInDef() -
isInClass
public boolean isInClass() -
setIsInClass
public void setIsInClass(boolean inClass) -
getStrTerm
-
setStrTerm
-
getCmdArgumentState
-
compile_error
-
yyerror
-
yyerror
-
error
public void error() -
getLexContext
-
getLeftParenBegin
-
setLeftParenBegin
-
setInDef
public void setInDef(boolean inDefinition) -
setInSingle
public void setInSingle(int inSingleton) -
getInSingle
public int getInSingle() -
getBraceNest
public int getBraceNest() -
getState
public int getState() -
setBraceNest
public void setBraceNest(int braceNest) -
setState
public void setState(int lexState) -
warning
-
warning
-
warn
-
warn
-
get_value
-
ripper_new_yylval
-
get_value
-
get_value
-
get_value
-
endless_method_name
-
restore_defun
-
symbolID
-
symbolID
-
numparam_name
-
new_array_pattern
public IRubyObject new_array_pattern(int _line, IRubyObject constant, IRubyObject preArg, RubyArray arrayPattern) -
new_array_pattern_tail
public RubyArray new_array_pattern_tail(int _line, IRubyObject preArgs, boolean hasRest, IRubyObject restArg, RubyArray postArgs) -
new_find_pattern
-
new_find_pattern_tail
public RubyArray new_find_pattern_tail(int _line, IRubyObject preRestArg, IRubyObject args, IRubyObject postRestArg) -
const_decl
-
new_hash_pattern
-
none
-
new_hash_pattern_tail
public RubyArray new_hash_pattern_tail(int _line, IRubyObject keywordArgs, IRubyObject keywordRestValue) -
makeNullNil
-
local_id
-
check_forwarding_args
public boolean check_forwarding_args() -
method_cond
-
error_duplicate_pattern_key
-
error_duplicate_pattern_variable
-
is_private_local_id
-
is_local_id
-
extractByteList
-
incrementParenNest
-
getCurrentScope
-
getRuntime
-
getColumn
public long getColumn() -
getLineno
public long getLineno() -
hasStarted
public boolean hasStarted() -
encoding
public org.jcodings.Encoding encoding() -
getCurrentArg
-
setCurrentArg
-
getYYDebug
public boolean getYYDebug() -
setYYDebug
public void setYYDebug(boolean yydebug) -
isEndSeen
public boolean isEndSeen() -
isError
public boolean isError() -
nil
-
fals
-
var_field
-
remove_begin
-
void_stmts
-
setHeredocLineIndent
protected void setHeredocLineIndent(int value) -
warn_experimental
-
getContext
-
get_id
-
get_id
-
allow_block_exit
-
clear_block_exit
protected void clear_block_exit(boolean value) -
next_rescue_context
-
init_block_exit
-
restore_block_exit
-
begin_definition
-
push_end_expect_token_locations
protected void push_end_expect_token_locations(int line) -
token_info_setup
-
token_info_push
-
token_info_pop
-
token_info_drop
-
token_info_warn
-
isEval
protected boolean isEval() -
WARN_EOL
-
id_type
-
it_id
-
set_it_id
-
forwarding_arg_check
-
setLexContext
-
NEW_ERROR
-
dyna_in_block
protected boolean dyna_in_block()
-