Class: Ruco::Token

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, prodset) ⇒ Token

Returns a new instance of Token.



45
46
47
# File 'lib/ruco.rb', line 45

def initialize(name, prodset)
	@name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



44
45
46
# File 'lib/ruco.rb', line 44

def name
  @name
end

Instance Method Details

#generate(indent = 0) ⇒ Object



49
50
51
# File 'lib/ruco.rb', line 49

def generate(indent=0)
	"#{("\t"*indent)}#{name} (. production->content = t->val; .)"
end