Class: Graphlyte::Production

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

Overview

A terminal production. May or may not produce a lexical token.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token) ⇒ Production

Returns a new instance of Production.



25
26
27
# File 'lib/graphlyte/lexer.rb', line 25

def initialize(token)
  @token = token
end

Instance Attribute Details

#tokenObject (readonly)

Returns the value of attribute token.



23
24
25
# File 'lib/graphlyte/lexer.rb', line 23

def token
  @token
end