public class RipperLexer extends LexingCommon
Modifier and Type | Class and Description |
---|---|
static class |
RipperLexer.Keyword |
Modifier and Type | Field and Description |
---|---|
protected org.jruby.util.ByteList |
delayed |
boolean |
ignoreNextScanEvent |
__end__seen, ASCII8BIT_ENCODING, BEGIN_DOC_MARKER, braceNest, cmdArgumentState, CODING, commandStart, conditionState, END_DOC_MARKER, END_MARKER, EOF, eofp, EXPR_ARG, EXPR_ARG_ANY, EXPR_BEG, EXPR_BEG_ANY, EXPR_CLASS, EXPR_CMDARG, EXPR_DOT, EXPR_END, EXPR_END_ANY, EXPR_ENDARG, EXPR_ENDFN, EXPR_FNAME, EXPR_LABEL, EXPR_LABELED, EXPR_MID, EXPR_VALUE, has_shebang, heredoc_end, heredoc_indent, heredoc_line_indent, inKwarg, last_cr_line, last_state, lex_lastline, lex_nextline, lex_p, lex_pbeg, lex_pend, lex_state, lexb, line_count, line_offset, magicRegexp, magicString, parenNest, ruby_sourceline, src, str_dquote, str_dsym, STR_FUNC_ESCAPE, STR_FUNC_EXPAND, STR_FUNC_LABEL, STR_FUNC_QWORDS, STR_FUNC_REGEXP, STR_FUNC_SYMBOL, str_label, str_regexp, str_squote, str_ssym, str_xquote, SUFFIX_ALL, SUFFIX_I, SUFFIX_R, TAB_WIDTH, token, tokenSeen, tokline, tokp, USASCII_ENCODING, UTF8_ENCODING, yaccValue
Constructor and Description |
---|
RipperLexer(RipperParserBase parser,
LexerSource src) |
Modifier and Type | Method and Description |
---|---|
protected void |
ambiguousOperator(String op,
String syn) |
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) |
String |
getIdent() |
static RipperLexer.Keyword |
getKeyword(String str) |
Ruby |
getRuntime() |
StrTerm |
getStrTerm() |
boolean |
hasScanEvent() |
boolean |
hasStarted()
Has lexing started yet?
|
void |
heredoc_restore(HeredocTerm here) |
boolean |
isVerbose() |
int |
nextc() |
int |
nextToken() |
int |
readEscape() |
int |
readUTFEscape(org.jruby.util.ByteList buffer,
boolean stringLiteral,
boolean symbolLiteral) |
void |
readUTFEscapeRegexpLiteral(org.jruby.util.ByteList buffer) |
protected void |
setCompileOptionFlag(String name,
org.jruby.util.ByteList value) |
protected void |
setEncoding(org.jruby.util.ByteList name) |
void |
setParser(RipperParserBase parserSupport)
Parse must pass its support object for some check at bottom of
yylex().
|
void |
setStrTerm(StrTerm strterm) |
protected void |
setTokenInfo(String name,
org.jruby.util.ByteList value) |
boolean |
tokenAddMBC(int first_byte,
org.jruby.util.ByteList buffer) |
int |
tokenize_ident(int result) |
void |
warn(String message) |
void |
warning(String fmt) |
void |
warning(String fmt,
String arg) |
column, comment_at_top, createAsEncodedString, createTokenByteList, createTokenString, createTokenString, dedent_string, flush, getBraceNest, getCmdArgumentState, getConditionState, getCurrentArg, getCurrentLine, getEncoding, getFile, getHeredocIndent, getLeftParenBegin, getLineOffset, getPosition, getState, getTokenCR, incrementParenNest, isAfterOperator, isARG, isASCII, isASCII, isBEG, isEND, isEndSeen, isGlobalCharPunct, isHexChar, isIdentifierChar, isLabelPossible, isLabelSuffix, isLexState, isLexStateAll, isNext_identchar, isOctChar, isSpaceArg, lex_goto_eol, lineno, magicCommentEncoding, magicCommentMarker, newtok, numberLiteralSuffix, p, parseMagicComment, parser_prepare, peek, peek, precise_mbclen, printState, pushback, reset, resetStacks, scanOct, set_file_encoding, setBraceNest, setCurrentArg, setCurrentEncoding, setEncoding, setHeredocIndent, setHeredocLineIndent, setLeftParenBegin, setSource, setState, setValue, strncmp, tokadd_ident, tokadd_mbchar, tokadd_mbchar, tokAdd, tokaddmbc, tokCopy, token, update_heredoc_indent, validateFormalIdentifier, value, warn_balanced, was_bol, whole_match_p
public boolean ignoreNextScanEvent
protected org.jruby.util.ByteList delayed
public RipperLexer(RipperParserBase parser, LexerSource src)
protected void ambiguousOperator(String op, String syn)
ambiguousOperator
in class LexingCommon
public boolean isVerbose()
public void warn(String message)
public void warning(String fmt)
public static RipperLexer.Keyword getKeyword(String str)
public boolean hasStarted()
protected void flush_string_content(org.jcodings.Encoding encoding)
public int nextc()
nextc
in class LexingCommon
public void dispatchHeredocEnd()
public void compile_error(String message)
compile_error
in class LexingCommon
public int tokenize_ident(int result)
tokenize_ident
in class LexingCommon
public void heredoc_restore(HeredocTerm here)
public int nextToken() throws IOException
IOException
public String getIdent()
public Ruby getRuntime()
public void setParser(RipperParserBase parserSupport)
parserSupport
- protected void setCompileOptionFlag(String name, org.jruby.util.ByteList value)
setCompileOptionFlag
in class LexingCommon
protected void setTokenInfo(String name, org.jruby.util.ByteList value)
setTokenInfo
in class LexingCommon
protected void setEncoding(org.jruby.util.ByteList name)
setEncoding
in class LexingCommon
public StrTerm getStrTerm()
public void setStrTerm(StrTerm strterm)
public IRubyObject createStr(org.jruby.util.ByteList buffer, int flags)
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 int readUTFEscape(org.jruby.util.ByteList buffer, boolean stringLiteral, boolean symbolLiteral) throws IOException
IOException
public int readEscape() throws IOException
IOException
Copyright © 2001-2016 JRuby. All Rights Reserved.