class Racc::StateTransitionTable

属性

grammar[R]
states[R]

公共类方法

generate(states) 点击切换源代码
# File racc-1.8.1/lib/racc/statetransitiontable.rb, line 34
def StateTransitionTable.generate(states)
  StateTransitionTableGenerator.new(states).generate
end
new(states) 点击切换源代码
调用父类方法
# File racc-1.8.1/lib/racc/statetransitiontable.rb, line 38
def initialize(states)
  super()
  @states = states
  @grammar = states.grammar
  self.use_result_var = true
  self.debug_parser = true
end

公共实例方法

parser_class() 点击切换源代码
# File racc-1.8.1/lib/racc/statetransitiontable.rb, line 49
def parser_class
  ParserClassGenerator.new(@states).generate
end
token_value_table() 点击切换源代码
# File racc-1.8.1/lib/racc/statetransitiontable.rb, line 53
def token_value_table
  h = {}
  token_table().each do |sym, i|
    h[sym.value] = i
  end
  h
end