public class RipperLexer extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RipperLexer.Keyword |
static class |
RipperLexer.LexState |
Modifier and Type | Field and Description |
---|---|
boolean |
commandStart |
protected org.jruby.util.ByteList |
delayed |
protected boolean |
eofp |
boolean |
ignoreNextScanEvent |
boolean |
inKwarg |
protected org.jruby.util.ByteList |
lex_lastline |
protected int |
lex_p |
protected int |
lex_pbeg |
protected int |
lex_pend |
protected org.jruby.util.ByteList |
lexb |
protected int |
tokp |
Constructor and Description |
---|
RipperLexer(RipperParserBase parser,
LexerSource src) |
Modifier and Type | Method and Description |
---|---|
int |
column() |
void |
compile_error(String message) |
IRubyObject |
createStr(org.jruby.util.ByteList buffer,
int flags) |
void |
dispatchDelayedToken(int token) |
void |
dispatchHeredocEnd() |
void |
dispatchIgnoredScanEvent(int token) |
void |
dispatchScanEvent(int token) |
protected void |
flush_string_content(org.jcodings.Encoding encoding) |
int |
getBraceNest() |
StackState |
getCmdArgumentState() |
StackState |
getConditionState() |
org.jcodings.Encoding |
getEncoding() |
String |
getIdent() |
static RipperLexer.Keyword |
getKeyword(String str) |
int |
getLeftParenBegin() |
Ruby |
getRuntime() |
RipperLexer.LexState |
getState() |
StrTerm |
getStrTerm() |
StringBuilder |
getTokenBuffer() |
boolean |
hasScanEvent() |
boolean |
hasStarted()
Has lexing started yet?
|
void |
heredoc_restore(HeredocTerm here) |
int |
incrementParenNest() |
boolean |
isASCII() |
boolean |
isEndSeen() |
boolean |
isIdentifierChar(int c)
This is a valid character for an identifier?
|
protected boolean |
isMultiByteChar(int c)
Is this a multibyte character from a multibyte encoding?
|
boolean |
isVerbose() |
protected void |
lex_goto_eol() |
int |
lineno() |
int |
nextc() |
int |
nextToken() |
int |
p(int offset) |
void |
parser_prepare() |
boolean |
peek(int c) |
int |
precise_mbclen() |
void |
pushback(int c) |
int |
readCodepoint(int first,
org.jcodings.Encoding encoding) |
int |
readEscape() |
int |
readUTFEscape(org.jruby.util.ByteList buffer,
boolean stringLiteral,
boolean symbolLiteral) |
void |
readUTFEscapeRegexpLiteral(org.jruby.util.ByteList buffer) |
void |
resetStacks() |
protected void |
set_file_encoding(int str,
int send) |
void |
setBraceNest(int nest) |
void |
setEncoding(org.jcodings.Encoding encoding) |
void |
setLeftParenBegin(int value) |
void |
setParser(RipperParserBase parserSupport)
Parse must pass its support object for some check at bottom of
yylex().
|
void |
setState(RipperLexer.LexState state) |
void |
setStrTerm(StrTerm strterm) |
void |
setValue(Object yaccValue) |
void |
tokAdd(int value,
org.jruby.util.ByteList buffer) |
void |
tokCopy(int length,
org.jruby.util.ByteList buffer) |
int |
token()
Last token read from the lexer at the end of a call to yylex()
|
boolean |
tokenAddMBC(int first_byte,
org.jruby.util.ByteList buffer) |
void |
tokenAddMBCFromSrc(int c,
org.jruby.util.ByteList buffer) |
Object |
value()
Value of last token (if it is a token which has a value).
|
void |
warn(String message) |
void |
warning(String message) |
boolean |
was_bol() |
boolean |
whole_match_p(org.jruby.util.ByteList eos,
boolean indent) |
public boolean ignoreNextScanEvent
public boolean commandStart
public boolean inKwarg
protected int tokp
protected org.jruby.util.ByteList lexb
protected int lex_p
protected int lex_pbeg
protected int lex_pend
protected org.jruby.util.ByteList lex_lastline
protected boolean eofp
protected org.jruby.util.ByteList delayed
public RipperLexer(RipperParserBase parser, LexerSource src)
public org.jcodings.Encoding getEncoding()
public boolean isVerbose()
public void warn(String message)
public void warning(String message)
public static RipperLexer.Keyword getKeyword(String str)
public int incrementParenNest()
public int getBraceNest()
public void setBraceNest(int nest)
public int getLeftParenBegin()
public void setLeftParenBegin(int value)
public boolean hasStarted()
public boolean isEndSeen()
protected void flush_string_content(org.jcodings.Encoding encoding)
public int p(int offset)
public int nextc()
public boolean peek(int c)
protected void lex_goto_eol()
public int column()
public int lineno()
public void dispatchHeredocEnd()
public boolean was_bol()
public void pushback(int c)
public void compile_error(String message)
public int readCodepoint(int first, org.jcodings.Encoding encoding) throws IOException
IOException
public void heredoc_restore(HeredocTerm here)
public void parser_prepare()
public int nextToken() throws IOException
IOException
public String getIdent()
public int token()
public StringBuilder getTokenBuffer()
public Object value()
public boolean whole_match_p(org.jruby.util.ByteList eos, boolean indent)
public Ruby getRuntime()
public void setParser(RipperParserBase parserSupport)
parserSupport
- public void setEncoding(org.jcodings.Encoding encoding)
public StrTerm getStrTerm()
public void setStrTerm(StrTerm strterm)
public void resetStacks()
public RipperLexer.LexState getState()
public void setState(RipperLexer.LexState state)
public StackState getCmdArgumentState()
public StackState getConditionState()
public void setValue(Object yaccValue)
public boolean isASCII()
public boolean isIdentifierChar(int c)
c
- is character to be comparedprotected boolean isMultiByteChar(int c)
c
- public IRubyObject createStr(org.jruby.util.ByteList buffer, int flags)
protected void set_file_encoding(int str, int send)
public boolean hasScanEvent()
public void dispatchDelayedToken(int token)
public void dispatchIgnoredScanEvent(int token)
public void dispatchScanEvent(int token)
public void readUTFEscapeRegexpLiteral(org.jruby.util.ByteList buffer) throws IOException
IOException
public boolean tokenAddMBC(int first_byte, org.jruby.util.ByteList buffer)
public void tokCopy(int length, org.jruby.util.ByteList buffer)
public void tokAdd(int value, org.jruby.util.ByteList buffer)
public int precise_mbclen()
public void tokenAddMBCFromSrc(int c, org.jruby.util.ByteList buffer) throws IOException
IOException
public int readUTFEscape(org.jruby.util.ByteList buffer, boolean stringLiteral, boolean symbolLiteral) throws IOException
IOException
public int readEscape() throws IOException
IOException
Copyright © 2001-2015 JRuby. All Rights Reserved.