Class RubyLexer
In: lib/ruby_lexer.rb
Parent: Object

Methods

Constants

ESC_RE = /\\([0-7]{1,3}|x[0-9a-fA-F]{1,2}|M-[^\\]|(C-|c)[^\\]|[^0-7xMCc])/
EOF = :eof_haha!
STR_FUNC_BORING = 0x00   ruby constants for strings (should this be moved somewhere else?)
STR_FUNC_ESCAPE = 0x01
STR_FUNC_EXPAND = 0x02
STR_FUNC_REGEXP = 0x04
STR_FUNC_AWORDS = 0x08
STR_FUNC_SYMBOL = 0x10
STR_FUNC_INDENT = 0x20
STR_SQUOTE = STR_FUNC_BORING
STR_DQUOTE = STR_FUNC_BORING | STR_FUNC_EXPAND
STR_XQUOTE = STR_FUNC_BORING | STR_FUNC_EXPAND
STR_REGEXP = STR_FUNC_REGEXP | STR_FUNC_ESCAPE | STR_FUNC_EXPAND
STR_SSYM = STR_FUNC_SYMBOL
STR_DSYM = STR_FUNC_SYMBOL | STR_FUNC_EXPAND

Attributes

cmdarg  [RW] 
command_start  [RW] 
cond  [RW] 
lex_state  [R]  Additional context surrounding tokens that both the lexer and grammar use.
lex_strterm  [RW] 
lineno  [W] 
nest  [RW] 
parser  [RW] 
src  [R]  Stream of data that yylex examines.
string_buffer  [RW] 
token  [RW]  Last token read via yylex.
warnings  [RW]  What handles warnings
yacc_value  [RW]  Value of last token which had a value associated with it.

Public Class methods

Public Instance methods

How the parser advances to the next token.

@return true if not at end of file (EOF).

 Parse a number from the input stream.

@param c The first character of the number. @return A int constant wich represents a token.

Returns the next token. Also sets yy_val is needed.

@return Description of the Returned Value

[Validate]