def path(state, rule)
      rule.symbols.each_with_object([]) do |tok, path|
        goto = state.gotos[tok]
        path << goto
        state = goto.to_state
      end
    end
def path(state, rule)
      rule.symbols.each_with_object([]) do |tok, path|
        goto = state.gotos[tok]
        path << goto
        state = goto.to_state
      end
    end
Sequence of state transitions which would be taken when starting
 from 'state', then following the RHS of 'rule' right to the end