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

- (Rule) initialize(pattern, action, state, flags)

Instantiates a new Rule object.



290
291
292
293
294
295
# File 'lib/rltk/lexer.rb', line 290

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

Instance Attribute Details

- (Object) action (readonly)

Returns the value of attribute action



285
286
287
# File 'lib/rltk/lexer.rb', line 285

def action
  @action
end

- (Object) flags (readonly)

Returns the value of attribute flags



287
288
289
# File 'lib/rltk/lexer.rb', line 287

def flags
  @flags
end

- (Object) pattern (readonly)

Returns the value of attribute pattern



286
287
288
# File 'lib/rltk/lexer.rb', line 286

def pattern
  @pattern
end