Method: RLTK::Lexer::Environment#initialize

Defined in:
lib/rltk/lexer.rb

#initialize(start_state, match = nil) ⇒ Environment

Instantiates a new Environment object.

Parameters:

  • start_state (Symbol)

    Lexer’s start state.

  • match (Match) (defaults to: nil)

    Match object for matching text.



251
252
253
254
255
# File 'lib/rltk/lexer.rb', line 251

def initialize(start_state, match = nil)
	@state	= [start_state]
	@match	= match
	@flags	= Array.new
end