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 ThreadContextprotected StaticScopeprotected booleanprotected booleanprotected intprotected booleanprotected RubyLexerstatic final ByteListprotected IRubyObjectprotected ScopedParserStateprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionRipperParserBase(ThreadContext context, IRubyObject ripper, LexerSource source) -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected NodeExitsarg_add_optblock(IRubyObject arg1, IRubyObject arg2) protected IRubyObjectassignable(ByteList name, IRubyObject value) assignableConstant(IRubyObject value) assignableIdentifier(IRubyObject value) protected IRubyObjectbackref_error(IRubyObject ref, IRubyObject expr) protected voidbegin_definition(String name) protected IRubyObjectcall_bin_op(IRubyObject left, IRubyObject id, IRubyObject right, int line) protected IRubyObjectcall_bin_op(IRubyObject left, ByteList id, IRubyObject right, int line) protected IRubyObjectcall_uni_op(IRubyObject recv, IRubyObject id) protected IRubyObjectcall_uni_op(IRubyObject recv, ByteList id) booleanprotected voidclear_block_exit(boolean value) compile_error(String message) protected IRubyObjectconst_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 booleanorg.jcodings.Encodingencoding()voidendless_method_name(DefHolder holder, ProductionState loc) voiderror()voidprotected voiderror_duplicate_pattern_variable(ByteList variable) escape(IRubyObject arg) protected ByteListextractByteList(Object value) fals()formal_argument(ByteList identifier, IRubyObject lhs) protected voidforwarding_arg_check(ByteList rest, ByteList all, String var) get_id(IRubyObject _ignored) protected Setprotected IRubyObjectprotected IRubyObjectprotected IRubyObjectget_value(IRubyObject value) intlongorg.jcodings.Encodingintintprotected LexContextlongprotected intintgetState()protected voidgetterIdentifierError(ByteList identifier) booleanbooleanheredoc_dedent(IRubyObject array) booleanstatic RubyParserBase.IDTypeprotected NodeExitsvoidbooleanis_local_id(ByteList name) booleanis_private_local_id(ByteList name) booleanbooleanisError()protected booleanisEval()booleanbooleanisInDef()protected IRubyObjectit_id()keyword_arg(IRubyObject key, IRubyObject value) booleanprotected IRubyObjectlogop(IRubyObject left, ByteList id, IRubyObject right) makeNullNil(IRubyObject value) protected IRubyObjectmatch_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 ArgsTailHoldernew_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 IRubyObjectnew_defined(long _line, IRubyObject value) protected IRubyObjectNEW_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 voidnext_rescue_context(LexContext context, LexContext.InRescue value) nil()none()voidnumparam_name(ByteList name) voidnumparam_pop(Node previousInner) voidparse(boolean isDebug) The parse method use an lexer stream and parse it to an AST node structureprotected voidprotected voidvoidprotected voidpush_end_expect_token_locations(int line) voidvoidremove_begin(IRubyObject value) voidreset()intprotected voidrestore_block_exit(NodeExits nodeExits) voidrestore_defun(DefHolder holder) intrestoreMaxNumParam(int maxNum) protected IRubyObjectripper_new_yylval(IRubyObject id, IRubyObject b, IRubyObject c) protected voidset_it_id(IRubyObject node) voidsetBraceNest(int braceNest) voidsetCommandStart(boolean value) voidsetCurrentArg(IRubyObject arg) voidsetHeredocIndent(int indent) protected voidsetHeredocLineIndent(int value) voidsetInDef(boolean inDefinition) voidsetInSingle(int inSingleton) voidsetIsInClass(boolean inClass) voidsetLeftParenBegin(Integer integer) protected voidsetLexContext(LexContext lexContext) voidsetState(int lexState) voidsetStrTerm(StrTerm object) voidsetYYDebug(boolean yydebug) shadowing_lvar(ByteList nameBytes) protected intsrc_line()symbolID(IRubyObject ident) protected voidtoken_info_drop(String value, ProductionState loc) protected voidtoken_info_pop(String value, ProductionState loc) protected voidtoken_info_push(String value, ProductionState loc) protected voidtoken_info_setup(String value, ProductionState loc) protected voidtoken_info_warn(String name, int same, ProductionState loc) protected IRubyObjectvalue_expr(IRubyObject value) var_field(IRubyObject value) void_stmts(IRubyObject value) voidvoidprotected voidvoidwarn_experimental(int line, String message) voidvoidvoidvoid
-
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()
-