Class: Treetop::Compiler::LexicalAddressSpace

Inherits:
Object
  • Object
show all
Defined in:
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/treetop/compiler/lexical_address_space.rb', line 4

def initialize
  reset_addresses
end

Instance Method Details

#next_addressObject



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

def next_address
  @next_address += 1
end

#reset_addressesObject



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

def reset_addresses
  @next_address = -1
end