Sha256: 082609fdda361dea6d9fe443098b01800f3091d5eda4fd20b09fb9daf340bb0a

Contents?: true

Size: 456 Bytes

Versions: 19

Compression:

Stored size: 456 Bytes

Contents

module Lrama
  class Counterexamples
    # s: state
    # itm: item within s
    # l: precise lookahead set
    class Triple < Struct.new(:s, :itm, :l)
      alias :state :s
      alias :item :itm
      alias :precise_lookahead_set :l

      def state_item
        StateItem.new(state, item)
      end

      def inspect
        "#{state.inspect}. #{item.display_name}. #{l.map(&:id).map(&:s_value)}"
      end
      alias :to_s :inspect
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
lrama-0.6.9 lib/lrama/counterexamples/triple.rb
lrama-0.6.8 lib/lrama/counterexamples/triple.rb
lrama-0.6.7 lib/lrama/counterexamples/triple.rb
lrama-0.6.6 lib/lrama/counterexamples/triple.rb
lrama-0.6.5 lib/lrama/counterexamples/triple.rb
lrama-0.6.4 lib/lrama/counterexamples/triple.rb
lrama-0.6.3 lib/lrama/counterexamples/triple.rb
lrama-0.6.2 lib/lrama/counterexamples/triple.rb
lrama-0.6.1 lib/lrama/counterexamples/triple.rb
lrama-0.6.0 lib/lrama/counterexamples/triple.rb
lrama-0.5.12 lib/lrama/counterexamples/triple.rb
lrama-0.5.11 lib/lrama/counterexamples/triple.rb
lrama-0.5.10 lib/lrama/counterexamples/triple.rb
lrama-0.5.9 lib/lrama/counterexamples/triple.rb
lrama-0.5.8 lib/lrama/counterexamples/triple.rb
lrama-0.5.7 lib/lrama/counterexamples/triple.rb
lrama-0.5.6 lib/lrama/counterexamples/triple.rb
lrama-0.5.5 lib/lrama/counterexamples/triple.rb
lrama-0.5.4 lib/lrama/counterexamples/triple.rb