Class: RubyLexer

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

### Methods

advance arg_ambiguous comments expr_beg_push fix_arg_lex_state heredoc heredoc_identifier int_with_base lex_state= lineno new parse_number parse_quote parse_string process_token rb_compile_error read_escape regx_options reset src= tokadd_escape tokadd_string unescape warning yylex yylex_string

### 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

new()

### Public Instance methods

advance()

How the parser advances to the next token.

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

arg_ambiguous()
comments()
expr_beg_push(val)
fix_arg_lex_state()
heredoc(here
heredoc_identifier(
int_with_base(base)
lex_state=(o)
lineno()
parse_number()

     Parse a number from the input stream.

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

parse_quote(
parse_string(quote)
process_token(command_state)
rb_compile_error(msg)
read_escape(
regx_options(
reset()
src=(src)
tokadd_escape(term
tokadd_string(func, term, paren)
unescape(s)
warning(s)
yylex(

Returns the next token. Also sets yy_val is needed.

@return Description of the Returned Value

yylex_string(

[Validate]