Class

RubyLex

Inheritance
< Object
Included Modules
RubyToken, RubyToken, IRB

Lexical analyzer for Ruby source

Classes & Modules

Constants

Name   Description
DEINDENT_CLAUSE = ["end"
DEINDENT_CLAUSE = ["end"
DLtype2Token = { "\"" => TkDSTRING, "\`" => TkDXSTRING, "/" => TkDREGEXP, }
DLtype2Token = { "\"" => TkDSTRING, "\`" => TkDXSTRING, "/" => TkDREGEXP, }
ENINDENT_CLAUSE = [ "case", "class", "def", "do", "for", "if", "module", "unless", "until", "while", "begin"
ENINDENT_CLAUSE = [ "case", "class", "def", "do", "for", "if", "module", "unless", "until", "while", "begin"
Ltype2Token = { "\'" => TkSTRING, "\"" => TkSTRING, "\`" => TkXSTRING, "/" => TkREGEXP, "]" => TkDSTRING, ":" => TkSYMBOL
Ltype2Token = { "\'" => TkSTRING, "\"" => TkSTRING, "\`" => TkXSTRING, "/" => TkREGEXP, "]" => TkDSTRING
PERCENT_LTYPE = { "q" => "\'", "Q" => "\"", "x" => "\`", "r" => "/", "w" => "]", "W" => "]", "s" => ":"
PERCENT_LTYPE = { "q" => "\'", "Q" => "\"", "x" => "\`", "r" => "/", "w" => "]"
PERCENT_PAREN = { "{" => "}", "[" => "]", "<" => ">", "(" => ")"
PERCENT_PAREN = { "{" => "}", "[" => "]", "<" => ">", "(" => ")"

Attributes

Name Visibility R/W Description
char_no public R
continue public R
debug_level public RW
exception_on_syntax_error public RW
exception_on_syntax_error public RW
indent public R
indent public R
lex_state public R
line_no public R
read_auto_clean_up public RW
readed_auto_clean_up public RW
seek public R
skip_space public RW
skip_space public RW

Methods

Class

Visibility Signature
public debug? ()
public debug? ()
public new ()
public new (content)

Instance

Visibility Signature
public char_no ()
public each_top_level_statement () {|@line, @exp_line_no| ...}
public eof? ()
public get_read ()
public get_readed ()
public getc ()
public getc ()
public getc_of_rests ()
public getc_of_rests ()
public gets ()
public gets ()
public identify_comment ()
public identify_comment ()
public identify_gvar ()
public identify_gvar ()
public identify_here_document ()
public identify_here_document ()
public identify_identifier ()
public identify_identifier ()
public identify_number (start)
public identify_number ()
public identify_quotation (initial_char)
public identify_quotation ()
public identify_string (ltype, quoted = ltype)
public identify_string (ltype, quoted = ltype, opener=nil, initial_char = nil)
public initialize_input ()
public lex ()
public lex ()
public lex_init ()
public lex_init ()
public lex_int2 ()
public lex_int2 ()
public line_no ()
public peek (i = 0)
public peek (i = 0)
public peek_equal? (str)
public peek_equal? (str)
public peek_match? (regexp)
public prompt ()
public read_escape ()
public read_escape ()
public set_input (io, p = nil, &block)
public set_prompt (p = nil, &block)
public skip_inner_expression ()
public token ()
public token ()
public ungetc (c = nil)
public ungetc (c = nil)

Class Method Detail

debug?()

debug?()

new()

new(content)

Instance Method Detail

char_no()

each_top_level_statement() {|@line, @exp_line_no| ...}

eof?()

get_read()

get_readed()

getc()

getc()

getc_of_rests()

getc_of_rests()

gets()

gets()

identify_comment()

identify_comment()

identify_gvar()

identify_gvar()

identify_here_document()

identify_here_document()

identify_identifier()

identify_identifier()

identify_number(start)

identify_number()

identify_quotation(initial_char)

identify_quotation()

identify_string(ltype, quoted = ltype)

identify_string(ltype, quoted = ltype, opener=nil, initial_char = nil)

initialize_input()

lex()

lex()

lex_init()

lex_init()

lex_int2()

lex_int2()

line_no()

io functions

peek(i = 0)

peek(i = 0)

peek_equal?(str)

peek_equal?(str)

peek_match?(regexp)

prompt()

read_escape()

read_escape()

set_input(io, p = nil, &block)

io functions

set_prompt(p = nil, &block)

skip_inner_expression()

token()

token()

ungetc(c = nil)

ungetc(c = nil)