Top Inners Fields Constructors Methods
org.jruby.lexer.yacc

public Class RubyLexer

extends LexingCommon
Class Inheritance
Imports
java.io.IOException, java.math.BigDecimal, .BigInteger, java.util.Formatter, .HashMap, .Locale, .Map, org.jcodings.Encoding, org.jruby.Ruby, .RubySymbol, org.jruby.ast.BackRefNode, .BignumNode, .ComplexNode, .FixnumNode, .FloatNode, .ListNode, .Node, .NthRefNode, .NumericNode, .RationalNode, .StrNode, org.jruby.common.IRubyWarnings, .IRubyWarnings.ID, org.jruby.lexer.LexerSource, .LexingCommon, org.jruby.parser.RubyParserBase, .ProductionState, org.jruby.util.ByteList, .RegexpOptions, .SafeDoubleParser, .StringSupport, org.jruby.util.cli.Options

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private static final Map<ByteList, RubyLexer.Keyword>
private final ByteList
private StrTerm
private static final HashMap<String, RubyLexer.Keyword>
private ByteList
private RubyParserBase
private final ByteList
private IRubyWarnings
Inherited from org.jruby.lexer.LexingCommon:
__end__seenAMPERSANDAMPERSAND_AMPERSANDAMPERSAND_DOTAND_KEYWORDASCII8BIT_ENCODINGBACKSLASHBACKTICKBANGBANG_EQBANG_TILDEBEGIN_DOC_MARKERbraceNestCALLCARETcmdArgumentStateCODINGCOLONCOLON_COLONCOMMAcommandStartconditionStateDOLLAR_BANGDOLLAR_DOTDOLLAR_UNDERSCOREDOTDOT_DOTDOT_DOT_DOTendEND_DOC_MARKEREND_MARKEREOFeofpEQEQ_EQEQ_EQ_EQEQ_GTEQ_TILDEEXPR_ARGEXPR_ARG_ANYEXPR_BEGEXPR_BEG_ANYEXPR_CLASSEXPR_CMDARGEXPR_DOTEXPR_ENDEXPR_END_ANYEXPR_ENDARGEXPR_ENDFNEXPR_FITEMEXPR_FNAMEEXPR_LABELEXPR_LABELEDEXPR_MIDEXPR_VALUEGTGT_EQGT_GThas_shebangheredoc_endheredoc_indentheredoc_line_indentKWNORESTlast_cr_linelast_stateLBRACKETLBRACKET_RBRACKETLBRACKET_RBRACKET_EQLCURLYlex_lastlinelex_nextlinelex_plex_pbeglex_pendlex_statelexbline_countline_offsetLTLT_EQLT_EQ_RTLT_LTMINUSMINUS_ATMINUS_GTNILOROR_KEYWORDOR_ORparenNestPERCENTPLUSPLUS_ATQQQQUESTIONRBRACKETRCURLYRPARENruby_sourcelineSEMICOLONSLASHsrcSTARSTAR_STARstartstr_dquotestr_dsymstr_dwordSTR_FUNC_ESCAPESTR_FUNC_EXPANDSTR_FUNC_INDENTSTR_FUNC_LABELSTR_FUNC_LISTSTR_FUNC_QWORDSSTR_FUNC_REGEXPSTR_FUNC_SYMBOLSTR_FUNC_TERMstr_labelstr_regexpstr_squotestr_ssymstr_swordstr_xquoteSUFFIX_ALLSUFFIX_ISUFFIX_RTAB_WIDTHTILDEtokentokenSeentoklinetokpUSASCII_ENCODINGUTF8_ENCODINGyaccValue

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
private int
ampersand(boolean spaceSeen)

private boolean
protected int
asTruth(String name, ByteList value)

private int
at()

private int
backtick(boolean commandState)

private int
bang()

private int
private int
colon(boolean spaceSeen)

private int
comma(int c)

public void
compile_error(String message, long start, long end)

public void
private int
considerComplex(int token, int suffix)

public StrNode
createStr(ByteList buffer, int flags)

private int
doKeyword(int state)

private int
private int
dot()

private int
doubleQuote(boolean commandState)

private int
getFloatToken(String number, int suffix)

private int
getIntegerToken(String value, int radix, int suffix)

public static RubyLexer.Keyword
public static RubyLexer.Keyword
private int
getNumberToken(String number, boolean seen_e, boolean seen_point, int nondigit)

public Ruby
public StrTerm
private int
public void
public void
private int
private int
identifier(int c, boolean commandState)

private int
identifierToken(int result, ByteList value)

private int
leftBracket(boolean spaceSeen)

private int
private int
leftParen(boolean spaceSeen)

private int
lessThan(boolean spaceSeen)

private int
minus(boolean spaceSeen)

protected void
private BignumNode
newBignumNode(String value, int radix)

private ComplexNode
private FixnumNode
newFixnumNode(String value, int radix)

private RationalNode
newRationalNode(String value, int radix)

public int
public int
public void
private int

Returns:

An int constant which represents a token.
parseNumber
(int
The first character of the number.
c
)

Parse a number from the input stream.

private int

Returns:

a token that specifies the quote type
parseQuote
(int
first character the the quote construct
c
)

What type/kind of quote are we dealing with?

protected RegexpOptions
private int
percent(boolean spaceSeen)

private int
pipe()

private int
plus(boolean spaceSeen)

private String
prepareMessage(String message, ByteList line, long start, long end)

private void
printToken(int token)

private int
public void
private int
private int
private int
protected void
protected void
public void
protected void
public void
private int
singleQuote(boolean commandState)

private int
slash(boolean spaceSeen)

private int
star(boolean spaceSeen)

private int
public int
private void
warn(IRubyWarnings.ID id, String message)

private void
private void
warning(IRubyWarnings.ID id, String file, int line, String message)

private int

Returns:

Description of the Returned Value
yylex
()

Returns the next token.

private int
Inherited from org.jruby.lexer.LexingCommon:
checkRegexpFragmentcheckRegexpSyntaxcolumncomment_at_topcompile_error_poscreateAsEncodedStringcreateTokenByteListcreateTokenByteListcreateTokenStringcreateTokenStringdedent_stringflushgetBraceNestgetCmdArgumentStategetConditionStategetCurrentArggetCurrentLinegetEncodinggetFilegetHeredocIndentgetHeredocLineIndentgetLeftParenBegingetLexContextgetLineOffsetgetParenNestgetRubySourcelinegetStategetTokenCRidincrementParenNestIS_AFTER_OPERATORIS_ARGIS_BEGIS_ENDIS_LABEL_POSSIBLEIS_LABEL_SUFFIXIS_lex_stateIS_lex_state_allIS_SPCARGisASCIIisASCIIisEndSeenisGlobalCharPunctisHexCharisIdentifierCharisLambdaBeginningisLookingAtEOLisNext_identcharisOctCharISSPACEisSpacelex_goto_eollinenomagicCommentEncodingmagicCommentMarkernewtoknumberLiteralSuffixonMagicCommentoptionsEncodingCharpparser_magic_commentparser_prepareparseRegexpFlagspeekpeekpeekVariableNameprecise_mbclenprintStatepushbackreadEscapereadUTF8EscapeIntoBufferreadUTFEscapereadUTFEscapeRegexpLiteralresetStacksscanHexscanHexLiteralscanOctset_file_encodingset_yylval_idset_yylval_namesetBraceNestsetCurrentArgsetCurrentEncodingsetEncodingsetHeredocIndentsetHeredocLineIndentsetLeftParenBeginsetLexContextsetRegexpEncodingsetRubySourcelinesetSourcesetStatesetValuestrncmptokAddtokadd_identtokadd_mbchartokadd_mbchartokaddmbctokCopytokentokHexupdate_heredoc_indentupdateStartPositionupdateTokenPositionvalidateFormalIdentifiervalidateFormalIdentifiervaluewarn_balancedwas_bolwhole_match_p