Class RubyLex

Object
  |
  +--RubyLex

All Included Modules:
       RubyToken, IRB


Attributes

continue [R]
exception_on_syntax_error [R]
indent [R]
lex_state [R]
read_auto_clean_up [R]
skip_space [R]

Constants

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

Constants included from RubyToken
TkSymbol2Token, EXPR_MID, EXPR_DOT, EXPR_ARG, TkReading2Token, NEWLINE_TOKEN, TokenDefinitions, EXPR_CLASS, EXPR_FNAME, EXPR_BEG, EXPR_END

Constructor Summary

initialize(content)

Public Class Method Summary

Object debug?

Public class methods included from RubyToken
def_token

Public Instance Method Summary

Object char_no
Object continue
      Returns the value of attribute continue .
Object continue=(value)
      Sets the attribute continue .
Object exception_on_syntax_error
      Returns the value of attribute exception_on_syntax_error .
Object exception_on_syntax_error=(value)
      Sets the attribute exception_on_syntax_error .
Object get_read
Object getc
Object getc_of_rests
Object gets
Object identify_comment
Object identify_gvar
Object identify_here_document
Object identify_identifier
Object identify_number(start)
Object identify_quotation(initial_char)
Object identify_string(ltype, quoted = ltype, opener=nil, initial_char = nil)
Object indent
      Returns the value of attribute indent .
Object indent=(value)
      Sets the attribute indent .
Object lex
Object lex_init()
Object lex_int2
Object lex_state
      Returns the value of attribute lex_state .
Object lex_state=(value)
      Sets the attribute lex_state .
Object line_no
      io functions .
Object peek(i = 0)
Object peek_equal?(str)
Object read_auto_clean_up
      Returns the value of attribute read_auto_clean_up .
Object read_auto_clean_up=(value)
      Sets the attribute read_auto_clean_up .
Object read_escape
Object skip_inner_expression
Object skip_space
      Returns the value of attribute skip_space .
Object skip_space=(value)
      Sets the attribute skip_space .
Object token
Object ungetc(c = nil)

Public instance methods included from RubyToken
set_token_position, Token

Public Class Method Details

debug?

public Object RubyLex.debug?


Public Instance Method Details

char_no

public Object char_no


continue

public Object continue

Returns the value of attribute continue


continue=

public Object continue=(value)

Sets the attribute continue

Parameters:
value - the value to set the attribute continue to.

exception_on_syntax_error

public Object exception_on_syntax_error

Returns the value of attribute exception_on_syntax_error


exception_on_syntax_error=

public Object exception_on_syntax_error=(value)

Sets the attribute exception_on_syntax_error

Parameters:
value - the value to set the attribute exception_on_syntax_error to.

get_read

public Object get_read


getc

public Object getc


getc_of_rests

public Object getc_of_rests


gets

public Object gets


identify_comment

public Object identify_comment


identify_gvar

public Object identify_gvar


identify_here_document

public Object identify_here_document


identify_identifier

public Object identify_identifier


identify_number

public Object identify_number(start)


identify_quotation

public Object identify_quotation(initial_char)


identify_string

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


indent

public Object indent

Returns the value of attribute indent


indent=

public Object indent=(value)

Sets the attribute indent

Parameters:
value - the value to set the attribute indent to.

lex

public Object lex


lex_init

public Object lex_init()


lex_int2

public Object lex_int2


lex_state

public Object lex_state

Returns the value of attribute lex_state


lex_state=

public Object lex_state=(value)

Sets the attribute lex_state

Parameters:
value - the value to set the attribute lex_state to.

line_no

public Object line_no

io functions


peek

public Object peek(i = 0)


peek_equal?

public Object peek_equal?(str)


read_auto_clean_up

public Object read_auto_clean_up

Returns the value of attribute read_auto_clean_up


read_auto_clean_up=

public Object read_auto_clean_up=(value)

Sets the attribute read_auto_clean_up

Parameters:
value - the value to set the attribute read_auto_clean_up to.

read_escape

public Object read_escape


skip_inner_expression

public Object skip_inner_expression


skip_space

public Object skip_space

Returns the value of attribute skip_space


skip_space=

public Object skip_space=(value)

Sets the attribute skip_space

Parameters:
value - the value to set the attribute skip_space to.

token

public Object token


ungetc

public Object ungetc(c = nil)