public class RubyLexer extends LexingCommon
| Modifier and Type | Class and Description |
|---|---|
static class |
RubyLexer.Keyword |
__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_INDENT, 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 |
|---|
RubyLexer(ParserSupport support,
LexerSource source)
Deprecated.
|
RubyLexer(ParserSupport support,
LexerSource source,
IRubyWarnings warnings) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ambiguousOperator(String op,
String syn) |
protected int |
asTruth(String name,
org.jruby.util.ByteList value) |
void |
compile_error(String message) |
void |
compile_error(SyntaxException.PID pid,
String message) |
StrNode |
createStr(org.jruby.util.ByteList buffer,
int flags) |
static RubyLexer.Keyword |
getKeyword(String str) |
ISourcePosition |
getPosition(ISourcePosition startPosition) |
StrTerm |
getStrTerm() |
void |
heredoc_dedent(Node root) |
void |
heredoc_restore(HeredocTerm here) |
int |
nextc() |
int |
nextToken() |
int |
readEscape() |
int |
readUTFEscape(org.jruby.util.ByteList buffer,
boolean stringLiteral,
boolean symbolLiteral) |
void |
readUTFEscapeRegexpLiteral(org.jruby.util.ByteList buffer) |
void |
reset() |
protected void |
setCompileOptionFlag(String name,
org.jruby.util.ByteList value) |
protected void |
setEncoding(org.jruby.util.ByteList name) |
void |
setParserSupport(ParserSupport 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) |
void |
setWarnings(IRubyWarnings warnings) |
int |
tokenize_ident(int result) |
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, 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_ppublic RubyLexer(ParserSupport support, LexerSource source, IRubyWarnings warnings)
@Deprecated public RubyLexer(ParserSupport support, LexerSource source)
protected void ambiguousOperator(String op, String syn)
ambiguousOperator in class LexingCommonpublic static RubyLexer.Keyword getKeyword(String str)
public int tokenize_ident(int result)
tokenize_ident in class LexingCommonpublic void reset()
reset in class LexingCommonpublic int nextc()
nextc in class LexingCommonpublic void heredoc_dedent(Node root)
public void compile_error(String message)
compile_error in class LexingCommonpublic void compile_error(SyntaxException.PID pid, String message)
public void heredoc_restore(HeredocTerm here)
public int nextToken()
throws IOException
IOExceptionpublic ISourcePosition getPosition(ISourcePosition startPosition)
public void setParserSupport(ParserSupport parserSupport)
parserSupport - protected void setCompileOptionFlag(String name, org.jruby.util.ByteList value)
setCompileOptionFlag in class LexingCommonprotected int asTruth(String name, org.jruby.util.ByteList value)
protected void setTokenInfo(String name, org.jruby.util.ByteList value)
setTokenInfo in class LexingCommonprotected void setEncoding(org.jruby.util.ByteList name)
setEncoding in class LexingCommonpublic StrTerm getStrTerm()
public void setStrTerm(StrTerm strterm)
public void setWarnings(IRubyWarnings warnings)
public StrNode createStr(org.jruby.util.ByteList buffer, int flags)
public void readUTFEscapeRegexpLiteral(org.jruby.util.ByteList buffer)
throws IOException
IOExceptionpublic int readUTFEscape(org.jruby.util.ByteList buffer,
boolean stringLiteral,
boolean symbolLiteral)
throws IOException
IOExceptionpublic int readEscape()
throws IOException
IOExceptionCopyright © 2001-2016 JRuby. All Rights Reserved.