Class: Bison::Nonterminal
- Inherits:
-
Object
- Object
- Bison::Nonterminal
- Defined in:
- lib/bison/nonterminal.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#sequence ⇒ Object
Returns the value of attribute sequence.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize(name, tag = nil) ⇒ Nonterminal
constructor
A new instance of Nonterminal.
- #to_bison ⇒ Object
Constructor Details
#initialize(name, tag = nil) ⇒ Nonterminal
Returns a new instance of Nonterminal.
8 9 10 11 |
# File 'lib/bison/nonterminal.rb', line 8 def initialize(name, tag=nil) @name = name @tag = tag end |
Instance Attribute Details
#location ⇒ Object
Returns the value of attribute location.
5 6 7 |
# File 'lib/bison/nonterminal.rb', line 5 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/bison/nonterminal.rb', line 3 def name @name end |
#sequence ⇒ Object
Returns the value of attribute sequence.
6 7 8 |
# File 'lib/bison/nonterminal.rb', line 6 def sequence @sequence end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
4 5 6 |
# File 'lib/bison/nonterminal.rb', line 4 def tag @tag end |
Instance Method Details
#to_bison ⇒ Object
13 14 15 |
# File 'lib/bison/nonterminal.rb', line 13 def to_bison name end |