public class RubyLexer extends LexingCommon
| Modifier and Type | Class and Description |
|---|---|
static class |
RubyLexer.Keyword |
__end__seen, AMPERSAND, AMPERSAND_AMPERSAND, AMPERSAND_DOT, ASCII8BIT_ENCODING, BACKSLASH, BACKTICK, BANG, BANG_EQ, BANG_TILDE, BEGIN_DOC_MARKER, braceNest, CALL, CARET, cmdArgumentState, CODING, COLON, COLON_COLON, COMMA, commandStart, conditionState, DOLLAR_BANG, DOLLAR_DOT, DOLLAR_UNDERSCORE, DOT, DOT_DOT, DOT_DOT_DOT, end, END_DOC_MARKER, END_MARKER, EOF, eofp, EQ, EQ_EQ, EQ_EQ_EQ, EQ_GT, EQ_TILDE, 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_FITEM, EXPR_FNAME, EXPR_LABEL, EXPR_LABELED, EXPR_MID, EXPR_VALUE, GT, GT_EQ, GT_GT, has_shebang, heredoc_end, heredoc_indent, heredoc_line_indent, KWNOREST, last_cr_line, last_state, LBRACKET, LBRACKET_RBRACKET, LBRACKET_RBRACKET_EQ, LCURLY, lex_lastline, lex_nextline, lex_p, lex_pbeg, lex_pend, lex_state, lexb, line_count, line_offset, LT, LT_EQ, LT_EQ_RT, LT_LT, MINUS, MINUS_AT, MINUS_GT, NIL, OR, OR_OR, parenNest, PERCENT, PLUS, PLUS_AT, Q, QQ, QUESTION, RBRACKET, RCURLY, RPAREN, ruby_sourceline, SEMICOLON, SLASH, src, STAR, STAR_STAR, start, str_dquote, str_dsym, str_dword, STR_FUNC_ESCAPE, STR_FUNC_EXPAND, STR_FUNC_INDENT, STR_FUNC_LABEL, STR_FUNC_LIST, STR_FUNC_QWORDS, STR_FUNC_REGEXP, STR_FUNC_SYMBOL, STR_FUNC_TERM, str_label, str_regexp, str_squote, str_ssym, str_sword, str_xquote, SUFFIX_ALL, SUFFIX_I, SUFFIX_R, TAB_WIDTH, TILDE, token, tokenSeen, tokline, tokp, USASCII_ENCODING, UTF8_ENCODING, yaccValue| Constructor and Description |
|---|
RubyLexer(RubyParserBase parser,
LexerSource source,
IRubyWarnings warnings) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ambiguousOperator(java.lang.String op,
java.lang.String syn) |
protected int |
asTruth(java.lang.String name,
ByteList value) |
void |
compile_error(java.lang.String message) |
void |
compile_error(java.lang.String message,
long start,
long end) |
StrNode |
createStr(ByteList buffer,
int flags) |
static RubyLexer.Keyword |
getKeyword(ByteList str) |
static RubyLexer.Keyword |
getKeyword(java.lang.String str) |
Ruby |
getRuntime() |
StrTerm |
getStrTerm() |
void |
heredoc_dedent(Node root) |
void |
heredoc_restore(HeredocTerm here) |
protected void |
mismatchedRegexpEncodingError(org.jcodings.Encoding optionEncoding,
org.jcodings.Encoding encoding) |
int |
nextc() |
int |
nextToken() |
void |
parse_error(java.lang.String message) |
protected RegexpOptions |
parseRegexpFlags() |
void |
reset() |
protected void |
setCompileOptionFlag(java.lang.String name,
ByteList value) |
protected void |
setEncoding(ByteList name) |
void |
setStrTerm(StrTerm strterm) |
protected void |
setTokenInfo(java.lang.String name,
ByteList value) |
void |
setWarnings(IRubyWarnings warnings) |
int |
tokenize_ident(int result) |
checkRegexpFragment, checkRegexpSyntax, column, comment_at_top, compile_error_pos, createAsEncodedString, createTokenByteList, createTokenByteList, createTokenString, createTokenString, dedent_string, flush, getBraceNest, getCmdArgumentState, getConditionState, getCurrentArg, getCurrentLine, getEncoding, getFile, getHeredocIndent, getHeredocLineIndent, getLeftParenBegin, getLexContext, getLineOffset, getParenNest, getRubySourceline, getState, getTokenCR, id, incrementParenNest, isAfterOperator, isARG, isASCII, isASCII, isBEG, isEND, isEndSeen, isGlobalCharPunct, isHexChar, isIdentifierChar, isLabelPossible, isLabelSuffix, isLambdaBeginning, isLexState, isLexStateAll, isLookingAtEOL, isNext_identchar, isOctChar, isSpace, isSpaceArg, lex_goto_eol, lineno, magicCommentEncoding, magicCommentMarker, newtok, numberLiteralSuffix, onMagicComment, optionsEncodingChar, p, parser_magic_comment, parser_prepare, parseRegexpFlags, peek, peek, peekVariableName, precise_mbclen, printState, pushback, readEscape, readUTF8EscapeIntoBuffer, readUTFEscape, readUTFEscapeRegexpLiteral, resetStacks, scanHex, scanHexLiteral, scanOct, set_file_encoding, set_yylval_id, set_yylval_name, setBraceNest, setCurrentArg, setCurrentEncoding, setEncoding, setHeredocIndent, setHeredocLineIndent, setLeftParenBegin, setRegexpEncoding, setRubySourceline, setSource, setState, setValue, strncmp, tokadd_ident, tokadd_mbchar, tokadd_mbchar, tokAdd, tokaddmbc, tokCopy, token, tokHex, update_heredoc_indent, updateStartPosition, updateTokenPosition, validateFormalIdentifier, validateFormalIdentifier, value, warn_balanced, was_bol, whole_match_ppublic RubyLexer(RubyParserBase parser, LexerSource source, IRubyWarnings warnings)
protected void ambiguousOperator(java.lang.String op,
java.lang.String syn)
ambiguousOperator in class LexingCommonpublic static RubyLexer.Keyword getKeyword(ByteList str)
public static RubyLexer.Keyword getKeyword(java.lang.String str)
public Ruby getRuntime()
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(java.lang.String message,
long start,
long end)
public void compile_error(java.lang.String message)
compile_error in class LexingCommonpublic void parse_error(java.lang.String message)
parse_error in class LexingCommonpublic void heredoc_restore(HeredocTerm here)
public int nextToken()
throws java.io.IOException
java.io.IOExceptionprotected void setCompileOptionFlag(java.lang.String name,
ByteList value)
setCompileOptionFlag in class LexingCommonprotected RegexpOptions parseRegexpFlags() throws java.io.IOException
parseRegexpFlags in class LexingCommonjava.io.IOExceptionprotected void mismatchedRegexpEncodingError(org.jcodings.Encoding optionEncoding,
org.jcodings.Encoding encoding)
mismatchedRegexpEncodingError in class LexingCommonprotected int asTruth(java.lang.String name,
ByteList value)
protected void setTokenInfo(java.lang.String name,
ByteList value)
setTokenInfo in class LexingCommonprotected void setEncoding(ByteList name)
setEncoding in class LexingCommonpublic StrTerm getStrTerm()
public void setStrTerm(StrTerm strterm)
public void setWarnings(IRubyWarnings warnings)
Copyright © 2001-2023 JRuby. All Rights Reserved.