Class: Lrama::Grammar::Reference
- Inherits:
-
Struct
- Object
- Struct
- Lrama::Grammar::Reference
- Defined in:
- lib/lrama/grammar/reference.rb
Overview
type: :dollar or :at name: String (e.g. $$, $foo, $expr.right) number: Integer (e.g. $1) index: Integer ex_tag: “$<tag>1” (Optional)
Instance Attribute Summary collapse
-
#ex_tag ⇒ Object
Returns the value of attribute ex_tag.
-
#first_column ⇒ Object
Returns the value of attribute first_column.
-
#index ⇒ Object
Returns the value of attribute index.
-
#last_column ⇒ Object
Returns the value of attribute last_column.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#ex_tag ⇒ Object
Returns the value of attribute ex_tag
10 11 12 |
# File 'lib/lrama/grammar/reference.rb', line 10 def ex_tag @ex_tag end |
#first_column ⇒ Object
Returns the value of attribute first_column
10 11 12 |
# File 'lib/lrama/grammar/reference.rb', line 10 def first_column @first_column end |
#index ⇒ Object
Returns the value of attribute index
10 11 12 |
# File 'lib/lrama/grammar/reference.rb', line 10 def index @index end |
#last_column ⇒ Object
Returns the value of attribute last_column
10 11 12 |
# File 'lib/lrama/grammar/reference.rb', line 10 def last_column @last_column end |
#name ⇒ Object
Returns the value of attribute name
10 11 12 |
# File 'lib/lrama/grammar/reference.rb', line 10 def name @name end |
#number ⇒ Object
Returns the value of attribute number
10 11 12 |
# File 'lib/lrama/grammar/reference.rb', line 10 def number @number end |
#type ⇒ Object
Returns the value of attribute type
10 11 12 |
# File 'lib/lrama/grammar/reference.rb', line 10 def type @type end |
Instance Method Details
#value ⇒ Object
11 12 13 |
# File 'lib/lrama/grammar/reference.rb', line 11 def value name || number end |