Top Description Fields Constructors Methods
org.jruby.parser

public Class Parser

extends Object
Class Inheritance
Imports
java.io.FileInputStream, .IOException, .InputStream, java.nio.channels.Channels, org.jcodings.Encoding, org.jruby.ParseResult, .Ruby, .RubyArray, .RubyFile, .RubyHash, .RubyIO, .RubySymbol, org.jruby.api.Create, org.jruby.ast.ArrayNode, .BlockNode, .CallNode, .FCallNode, .GlobalAsgnNode, .GlobalVarNode, .LineStubVisitor, .Node, .RootNode, .VCallNode, .WhileNode, org.jruby.lexer.ByteListLexerSource, .GetsLexerSource, .LexerSource, org.jruby.lexer.yacc.SyntaxException, org.jruby.runtime.DynamicScope, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.load.LoadServiceResourceInputStream, org.jruby.util.ByteList, .CommonByteLists

Serves as a simple facade for all the parsing magic.

Field Summary

Modifier and TypeField and Description
protected final Ruby

Constructor Summary

AccessConstructor and Description
public
Parser(Ruby runtime)

Method Summary

Modifier and TypeMethod and Description
public ParseResult
addGetsLoop(Ruby runtime, ParseResult oldRoot, boolean printing, boolean processLineEndings, boolean split)

protected RubyArray<?>
getLines(boolean isEvalParse, String file, int length)

public IRubyObject
getLineStub(ThreadContext context, ParseResult result, int lineCount)

public ParseResult
parse(String fileName, int lineNumber, ByteList content, DynamicScope existingScope, ParserType type)

protected ParseResult
parse(String fileName, int lineNumber, InputStream in, Encoding encoding, DynamicScope existingScope, ParserType type)

private ParseResult
parse(LexerSource lexerSource, DynamicScope existingScope, ParserType type)

public Node
parse(String file, ByteList content, DynamicScope blockScope, ParserConfiguration configuration)
Deprecated

public Node
parse(String file, byte[] content, DynamicScope blockScope, ParserConfiguration configuration)
Deprecated

public Node
parse(String file, InputStream content, DynamicScope blockScope, ParserConfiguration configuration)
Deprecated

public Node
parse(String file, LexerSource lexerSource, DynamicScope blockScope, ParserConfiguration configuration)
Deprecated

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

runtimeback to summary
protected final Ruby runtime

Constructor Detail

Parserback to summary
public Parser(Ruby runtime)

Method Detail

addGetsLoopback to summary
public ParseResult addGetsLoop(Ruby runtime, ParseResult oldRoot, boolean printing, boolean processLineEndings, boolean split)
getLinesback to summary
protected RubyArray<?> getLines(boolean isEvalParse, String file, int length)
getLineStubback to summary
public IRubyObject getLineStub(ThreadContext context, ParseResult result, int lineCount)
parseback to summary
public ParseResult parse(String fileName, int lineNumber, ByteList content, DynamicScope existingScope, ParserType type)
parseback to summary
protected ParseResult parse(String fileName, int lineNumber, InputStream in, Encoding encoding, DynamicScope existingScope, ParserType type)
parseback to summary
private ParseResult parse(LexerSource lexerSource, DynamicScope existingScope, ParserType type)
parseback to summary
public Node parse(String file, ByteList content, DynamicScope blockScope, ParserConfiguration configuration)

Deprecated

Annotations
@Deprecated
parseback to summary
public Node parse(String file, byte[] content, DynamicScope blockScope, ParserConfiguration configuration)

Deprecated

Annotations
@Deprecated
parseback to summary
public Node parse(String file, InputStream content, DynamicScope blockScope, ParserConfiguration configuration)

Deprecated

Annotations
@Deprecated
parseback to summary
public Node parse(String file, LexerSource lexerSource, DynamicScope blockScope, ParserConfiguration configuration)

Deprecated

Annotations
@Deprecated