Class: Racc::StateTransitionTable
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Struct
|
|
Instance Chain:
self,
Struct
|
|
Inherits: |
Struct
|
Defined in: | lib/racc/statetransitiontable.rb, lib/racc/statetransitiontable.rb |
Overview
reopen
Class Method Summary
- .generate(states)
- .new(states) ⇒ StateTransitionTable constructor
Instance Attribute Summary
- #action_check rw
- #action_default rw
- #action_pointer rw
- #action_table rw
- #debug_parser rw
- #goto_check rw
- #goto_default rw
- #goto_pointer rw
- #goto_table rw
- #grammar readonly
- #nt_base rw
- #reduce_n rw
- #reduce_table rw
- #shift_n rw
- #states readonly
- #token_table rw
- #token_to_s_table rw
- #use_result_var rw
Instance Method Summary
Constructor Details
.new(states) ⇒ StateTransitionTable
# File 'lib/racc/statetransitiontable.rb', line 44
def initialize(states) super() @states = states @grammar = states.grammar self.use_result_var = true self.debug_parser = true end
Class Method Details
.generate(states)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 40
def StateTransitionTable.generate(states) StateTransitionTableGenerator.new(states).generate end
Instance Attribute Details
#action_check (rw)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 23
StateTransitionTable = Struct.new(:action_table, :action_check, :action_default, :action_pointer, :goto_table, :goto_check, :goto_default, :goto_pointer, :token_table, :reduce_table, :reduce_n, :shift_n, :nt_base, :token_to_s_table, :use_result_var, :debug_parser)
#action_default (rw)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 23
StateTransitionTable = Struct.new(:action_table, :action_check, :action_default, :action_pointer, :goto_table, :goto_check, :goto_default, :goto_pointer, :token_table, :reduce_table, :reduce_n, :shift_n, :nt_base, :token_to_s_table, :use_result_var, :debug_parser)
#action_pointer (rw)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 23
StateTransitionTable = Struct.new(:action_table, :action_check, :action_default, :action_pointer, :goto_table, :goto_check, :goto_default, :goto_pointer, :token_table, :reduce_table, :reduce_n, :shift_n, :nt_base, :token_to_s_table, :use_result_var, :debug_parser)
#action_table (rw)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 23
StateTransitionTable = Struct.new(:action_table, :action_check, :action_default, :action_pointer, :goto_table, :goto_check, :goto_default, :goto_pointer, :token_table, :reduce_table, :reduce_n, :shift_n, :nt_base, :token_to_s_table, :use_result_var, :debug_parser)
#debug_parser (rw)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 23
StateTransitionTable = Struct.new(:action_table, :action_check, :action_default, :action_pointer, :goto_table, :goto_check, :goto_default, :goto_pointer, :token_table, :reduce_table, :reduce_n, :shift_n, :nt_base, :token_to_s_table, :use_result_var, :debug_parser)
#goto_check (rw)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 23
StateTransitionTable = Struct.new(:action_table, :action_check, :action_default, :action_pointer, :goto_table, :goto_check, :goto_default, :goto_pointer, :token_table, :reduce_table, :reduce_n, :shift_n, :nt_base, :token_to_s_table, :use_result_var, :debug_parser)
#goto_default (rw)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 23
StateTransitionTable = Struct.new(:action_table, :action_check, :action_default, :action_pointer, :goto_table, :goto_check, :goto_default, :goto_pointer, :token_table, :reduce_table, :reduce_n, :shift_n, :nt_base, :token_to_s_table, :use_result_var, :debug_parser)
#goto_pointer (rw)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 23
StateTransitionTable = Struct.new(:action_table, :action_check, :action_default, :action_pointer, :goto_table, :goto_check, :goto_default, :goto_pointer, :token_table, :reduce_table, :reduce_n, :shift_n, :nt_base, :token_to_s_table, :use_result_var, :debug_parser)
#goto_table (rw)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 23
StateTransitionTable = Struct.new(:action_table, :action_check, :action_default, :action_pointer, :goto_table, :goto_check, :goto_default, :goto_pointer, :token_table, :reduce_table, :reduce_n, :shift_n, :nt_base, :token_to_s_table, :use_result_var, :debug_parser)
#grammar (readonly)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 53
attr_reader :grammar
#nt_base (rw)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 23
StateTransitionTable = Struct.new(:action_table, :action_check, :action_default, :action_pointer, :goto_table, :goto_check, :goto_default, :goto_pointer, :token_table, :reduce_table, :reduce_n, :shift_n, :nt_base, :token_to_s_table, :use_result_var, :debug_parser)
#reduce_n (rw)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 23
StateTransitionTable = Struct.new(:action_table, :action_check, :action_default, :action_pointer, :goto_table, :goto_check, :goto_default, :goto_pointer, :token_table, :reduce_table, :reduce_n, :shift_n, :nt_base, :token_to_s_table, :use_result_var, :debug_parser)
#reduce_table (rw)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 23
StateTransitionTable = Struct.new(:action_table, :action_check, :action_default, :action_pointer, :goto_table, :goto_check, :goto_default, :goto_pointer, :token_table, :reduce_table, :reduce_n, :shift_n, :nt_base, :token_to_s_table, :use_result_var, :debug_parser)
#shift_n (rw)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 23
StateTransitionTable = Struct.new(:action_table, :action_check, :action_default, :action_pointer, :goto_table, :goto_check, :goto_default, :goto_pointer, :token_table, :reduce_table, :reduce_n, :shift_n, :nt_base, :token_to_s_table, :use_result_var, :debug_parser)
#states (readonly)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 52
attr_reader :states
#token_table (rw)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 23
StateTransitionTable = Struct.new(:action_table, :action_check, :action_default, :action_pointer, :goto_table, :goto_check, :goto_default, :goto_pointer, :token_table, :reduce_table, :reduce_n, :shift_n, :nt_base, :token_to_s_table, :use_result_var, :debug_parser)
#token_to_s_table (rw)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 23
StateTransitionTable = Struct.new(:action_table, :action_check, :action_default, :action_pointer, :goto_table, :goto_check, :goto_default, :goto_pointer, :token_table, :reduce_table, :reduce_n, :shift_n, :nt_base, :token_to_s_table, :use_result_var, :debug_parser)
#use_result_var (rw)
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 23
StateTransitionTable = Struct.new(:action_table, :action_check, :action_default, :action_pointer, :goto_table, :goto_check, :goto_default, :goto_pointer, :token_table, :reduce_table, :reduce_n, :shift_n, :nt_base, :token_to_s_table, :use_result_var, :debug_parser)
Instance Method Details
#parser_class
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 55
def parser_class ParserClassGenerator.new(@states).generate end
#token_value_table
[ GitHub ]# File 'lib/racc/statetransitiontable.rb', line 59
def token_value_table h = {} token_table().each do |sym, i| h[sym.value] = i end h end