Class: RLTK::Parser::Action

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

Overview

The Action class is used to indicate what action the parser should take given a current state and input token.

Direct Known Subclasses

Accept, GoTo, Reduce, Shift

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id = nil) ⇒ Action

Returns a new instance of Action.

Parameters:

  • id (Integer) (defaults to: nil)

    ID of this action.



1525
1526
1527
# File 'lib/rltk/parser.rb', line 1525

def initialize(id = nil)
	@id = id
end

Instance Attribute Details

#idInteger (readonly)

Returns ID of this action.

Returns:



1522
1523
1524
# File 'lib/rltk/parser.rb', line 1522

def id
  @id
end