Class: Aurum::LexicalTableGenerator
- Inherits:
-
Object
- Object
- Aurum::LexicalTableGenerator
- Defined in:
- lib/aurum/lexical_table_generator.rb
Instance Attribute Summary collapse
-
#lexical_states ⇒ Object
readonly
Returns the value of attribute lexical_states.
Instance Method Summary collapse
-
#initialize(specification) ⇒ LexicalTableGenerator
constructor
A new instance of LexicalTableGenerator.
- #lexical_table ⇒ Object
Constructor Details
#initialize(specification) ⇒ LexicalTableGenerator
Returns a new instance of LexicalTableGenerator.
8 9 10 11 12 |
# File 'lib/aurum/lexical_table_generator.rb', line 8 def initialize specification @specification, @accept_states = specification, {} @lexical_states = @specification.keys - [:all] @patterns_for_all = specification[:all] ? specification[:all] : {} end |
Instance Attribute Details
#lexical_states ⇒ Object (readonly)
Returns the value of attribute lexical_states.
7 8 9 |
# File 'lib/aurum/lexical_table_generator.rb', line 7 def lexical_states @lexical_states end |
Instance Method Details
#lexical_table ⇒ Object
14 15 16 17 18 19 |
# File 'lib/aurum/lexical_table_generator.rb', line 14 def lexical_table construct_automata make_initial_partitions refine_partitions @partitions.size < @lexical_automata.table.size ? construct_minimize_automata : [@lexical_automata.table, @accept_states] end |