Class: RLTK::Parser::Action

Inherits:
Object
  • 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.



1633
1634
1635
# File 'lib/rltk/parser.rb', line 1633

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

Instance Attribute Details

#idInteger (readonly)

Returns ID of this action.

Returns:

  • (Integer)

    ID of this action.



1630
1631
1632
# File 'lib/rltk/parser.rb', line 1630

def id
  @id
end