Class: Treetop::Compiler::LexicalAddressSpace

Inherits:
Object
  • Object
show all
Defined in:
lib/gems/treetop-1.2.4/lib/treetop/compiler/lexical_address_space.rb

Instance Method Summary collapse

Constructor Details

#initializeLexicalAddressSpace

Returns a new instance of LexicalAddressSpace.



4
5
6
# File 'lib/gems/treetop-1.2.4/lib/treetop/compiler/lexical_address_space.rb', line 4

def initialize
  reset_addresses
end

Instance Method Details

#next_addressObject



8
9
10
# File 'lib/gems/treetop-1.2.4/lib/treetop/compiler/lexical_address_space.rb', line 8

def next_address
  @next_address += 1
end

#reset_addressesObject



12
13
14
# File 'lib/gems/treetop-1.2.4/lib/treetop/compiler/lexical_address_space.rb', line 12

def reset_addresses
  @next_address = -1
end