Class: RLTK::Lexer::Rule

Inherits:
Object
  • Object
show all
Defined in:
lib/rltk/lexer.rb

Overview

The Rule class is used simply for data encapsulation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pattern, action, state, flags) ⇒ Rule

Instantiates a new Rule object.



364
365
366
367
368
369
# File 'lib/rltk/lexer.rb', line 364

def initialize(pattern, action, state, flags)
	@pattern	= pattern
	@action	= action
	@state	= state
	@flags	= flags
end

Instance Attribute Details

#actionProc (readonly)



350
351
352
# File 'lib/rltk/lexer.rb', line 350

def action
  @action
end

#flagsArray<Symbol> (readonly)



356
357
358
# File 'lib/rltk/lexer.rb', line 356

def flags
  @flags
end

#patternRegexp (readonly)



353
354
355
# File 'lib/rltk/lexer.rb', line 353

def pattern
  @pattern
end