Top Inners Fields Constructors Methods
org.jruby.ext.ripper

public Class RubyLexer

extends LexingCommon
Class Inheritance
Imports
java.io.IOException, java.math.BigDecimal, java.util.HashMap, org.jcodings.Encoding, org.jruby.Ruby, .RubyString, .RubySymbol, org.jruby.common.IRubyWarnings, org.jruby.lexer.LexerSource, .LexingCommon, org.jruby.parser.RubyParserBase, org.jruby.runtime.builtin.IRubyObject, 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 boolean
protected ByteList
private int
private int
private ByteList
pack-priv String
private StrTerm
private static final HashMap<String, RubyLexer.Keyword>
private ByteList
private RipperParserBase
pack-priv static final int
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_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
public

Method Summary

Modifier and TypeMethod and Description
public void
addDelayedToken(int tok, int end)

protected void
private int
ampersand(boolean spaceSeen)

private boolean
arg_ambiguous(char c)

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
private int
considerComplex(int token, int suffix)

private int
cr(int c)

public IRubyObject
createStr(ByteList buffer, int flags)

public void
public void
public void
public void
dispatchScanEvent(int token)

private int
doKeyword(int state)

private int
private int
dot()

private int
doubleQuote(boolean commandState)

protected void
private int
getFloatToken(String number, int suffix)

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

public Ruby
public StrTerm
private int
public boolean
public boolean
hasStarted()

Has lexing started yet?

public void
private int
public ByteList
private int
identifier(int c, boolean commandState)

private int
identifierToken(int last_state, int result, String value)

public boolean
private int
leftBracket(boolean spaceSeen)

private int
private int
leftParen(boolean spaceSeen)

private int
lessThan(boolean spaceSeen)

private int
minus(boolean spaceSeen)

protected void
public int
private boolean
public int
protected boolean
public void
private int

Returns:

A 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 void
printToken(int token)

private int
private int
private int
private int
private IRubyObject
scanEventValue(int token)

protected void
protected void
protected void
protected void
protected void
protected void
private int
setIntegerLiteral(int suffix)

private int
setNumberLiteral(int type, int suffix)

public void
setParser(RipperParserBase parserSupport)

Parse must pass its support object for some check at bottom of yylex().

public void
protected void
private int
singleQuote(boolean commandState)

private int
slash(boolean spaceSeen)

protected int
private int
star(boolean spaceSeen)

private RubySymbol
private int
public ByteList
public int
private String
tokenToEventId(int token)

public void
warn(String message)

public void
public void
warning(String fmt, String arg)

private int

Returns:

the next token
yylex
()

Returns the next token.

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