Package org.jruby.ext.ripper
Class RipperParserBase
java.lang.Object
org.jruby.ext.ripper.RipperParserBase
- Direct Known Subclasses:
RipperParser
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ThreadContextprivate IRubyObjectprotected StaticScopeprotected booleanprotected booleanprotected intprotected booleanprotected RipperLexerprotected IRubyObjectprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionRipperParserBase(ThreadContext context, IRubyObject ripper, LexerSource source) -
Method Summary
Modifier and TypeMethodDescriptionarg_add_optblock(IRubyObject arg1, IRubyObject arg2) arg_var(IRubyObject identifier) assignableConstant(IRubyObject value) assignableIdentifier(IRubyObject value) voidcompile_error(String message) 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) org.jcodings.Encodingencoding()voiderror()escape(IRubyObject arg) formal_argument(IRubyObject identifier) intlongintintlongintgetState()protected voidgetterIdentifierError(String identifier) booleanbooleanvoidheredoc_dedent(IRubyObject array) booleanbooleanis_local_id(String identifier) booleanbooleanisError()booleanbooleanisInDef()keyword_arg(IRubyObject key, IRubyObject value) method_add_block(IRubyObject method, IRubyObject block) method_optarg(IRubyObject method, IRubyObject arg) new_args(IRubyObject f, IRubyObject o, IRubyObject r, IRubyObject p, ArgsTailHolder tail) new_args_tail(IRubyObject kwarg, IRubyObject kwargRest, IRubyObject block) new_array(IRubyObject arg) new_assoc(IRubyObject key, IRubyObject value) new_bv(IRubyObject identifier) (package private) IRubyObjectparse(boolean isDebug) The parse method use an lexer stream and parse it to an AST node structurevoidvoidvoidvoidreset()voidsetBraceNest(int braceNest) voidsetCommandStart(boolean value) voidsetCurrentArg(IRubyObject arg) voidsetHeredocIndent(int indent) voidsetInDef(boolean inDefinition) voidsetInSingle(int inSingleton) voidsetIsInClass(boolean inClass) voidsetLeftParenBegin(Integer integer) voidsetState(int lexState) voidsetStrTerm(StrTerm object) voidsetYYDebug(boolean yydebug) shadowing_lvar(IRubyObject identifier) voidvoidvoidvoidyyparse(RipperLexer yyLex) yyparse(RipperLexer yyLex, Object debugger)
-
Field Details
-
currentArg
-
ripper
-
context
-
lexer
-
currentScope
-
inDefinition
protected boolean inDefinition -
inClass
protected boolean inClass -
yydebug
protected boolean yydebug -
isError
protected boolean isError -
inSingleton
protected int inSingleton
-
-
Constructor Details
-
RipperParserBase
-
-
Method Details
-
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
-
new_nil_at
IRubyObject new_nil_at() -
formal_argument
-
getterIdentifierError
-
is_id_var
public boolean is_id_var() -
is_local_id
-
intern
-
method_optarg
-
keyword_arg
-
new_args
public IRubyObject new_args(IRubyObject f, IRubyObject o, IRubyObject r, IRubyObject p, ArgsTailHolder tail) -
new_args_tail
-
method_add_block
-
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() -
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
-
warn
-
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() -
getContext
-