Class: Bison::Nonterminal

Inherits:
Object
  • Object
show all
Defined in:
lib/bison/nonterminal.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#locationObject

Returns the value of attribute location.



5
6
7
# File 'lib/bison/nonterminal.rb', line 5

def location
  @location
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/bison/nonterminal.rb', line 3

def name
  @name
end

#sequenceObject

Returns the value of attribute sequence.



6
7
8
# File 'lib/bison/nonterminal.rb', line 6

def sequence
  @sequence
end

#tagObject (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_bisonObject



13
14
15
# File 'lib/bison/nonterminal.rb', line 13

def to_bison
  name
end