Class: LL::CompiledConfiguration

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

Overview

Class for storing the compiled state/lookup/action tables and the likes.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (CompiledConfiguration) initialize(options = {})

Returns a new instance of CompiledConfiguration

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :name (String)
  • :namespace (Array)
  • :inner (String)
  • :header (String)
  • :terminals (Array)
  • :rules (Array)
  • :table (Array)
  • :actions (Array)
  • :action_bodies (Hash)


22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/ll/compiled_configuration.rb', line 22

def initialize(options = {})
  options.each do |key, value|
    instance_variable_set("@#{key}", value) if respond_to?(key)
  end

  @namespace     ||= []
  @terminals     ||= []
  @rules         ||= []
  @table         ||= []
  @actions       ||= []
  @action_bodies ||= {}
end

Instance Attribute Details

- (Object) action_bodies (readonly)

Returns the value of attribute action_bodies



6
7
8
# File 'lib/ll/compiled_configuration.rb', line 6

def action_bodies
  @action_bodies
end

- (Object) actions (readonly)

Returns the value of attribute actions



6
7
8
# File 'lib/ll/compiled_configuration.rb', line 6

def actions
  @actions
end

- (Object) header (readonly)

Returns the value of attribute header



6
7
8
# File 'lib/ll/compiled_configuration.rb', line 6

def header
  @header
end

- (Object) inner (readonly)

Returns the value of attribute inner



6
7
8
# File 'lib/ll/compiled_configuration.rb', line 6

def inner
  @inner
end

- (Object) name (readonly)

Returns the value of attribute name



6
7
8
# File 'lib/ll/compiled_configuration.rb', line 6

def name
  @name
end

- (Object) namespace (readonly)

Returns the value of attribute namespace



6
7
8
# File 'lib/ll/compiled_configuration.rb', line 6

def namespace
  @namespace
end

- (Object) rules (readonly)

Returns the value of attribute rules



6
7
8
# File 'lib/ll/compiled_configuration.rb', line 6

def rules
  @rules
end

- (Object) table (readonly)

Returns the value of attribute table



6
7
8
# File 'lib/ll/compiled_configuration.rb', line 6

def table
  @table
end

- (Object) terminals (readonly)

Returns the value of attribute terminals



6
7
8
# File 'lib/ll/compiled_configuration.rb', line 6

def terminals
  @terminals
end