123456789_123456789_123456789_123456789_123456789_

Class: Racc::SRconflict

Relationships & Source Files
Inherits: Object
Defined in: lib/racc/state.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(sid, shift, reduce) ⇒ SRconflict

[ GitHub ]

  
# File 'lib/racc/state.rb', line 937

def initialize(sid, shift, reduce)
  @stateid = sid
  @shift   = shift
  @reduce  = reduce
end

Instance Attribute Details

#reduce (readonly)

[ GitHub ]

  
# File 'lib/racc/state.rb', line 945

attr_reader :reduce

#shift (readonly)

[ GitHub ]

  
# File 'lib/racc/state.rb', line 944

attr_reader :shift

#stateid (readonly)

[ GitHub ]

  
# File 'lib/racc/state.rb', line 943

attr_reader :stateid

Instance Method Details

#to_s

[ GitHub ]

  
# File 'lib/racc/state.rb', line 947

def to_s
  sprintf('state %d: S/R conflict rule %d reduce and shift %s',
          @stateid, @reduce.ruleid, @shift.to_s)
end