Class: Graphlyte::Production
- Inherits:
-
Object
- Object
- Graphlyte::Production
- Defined in:
- lib/graphlyte/lexer.rb
Overview
A terminal production. May or may not produce a lexical token.
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token) ⇒ Production
constructor
A new instance of Production.
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
#token ⇒ Object (readonly)
Returns the value of attribute token.
23 24 25 |
# File 'lib/graphlyte/lexer.rb', line 23 def token @token end |