Class: Racc::RRconflict

Inherits:
Object show all
Defined in:
lib/racc/state.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sid, high, low, tok) ⇒ RRconflict

Returns a new instance of RRconflict.



951
952
953
954
955
956
# File 'lib/racc/state.rb', line 951

def initialize(sid, high, low, tok)
  @stateid   = sid
  @high_prec = high
  @low_prec  = low
  @token     = tok
end

Instance Attribute Details

#high_precObject (readonly)

Returns the value of attribute high_prec.



959
960
961
# File 'lib/racc/state.rb', line 959

def high_prec
  @high_prec
end

#low_precObject (readonly)

Returns the value of attribute low_prec.



960
961
962
# File 'lib/racc/state.rb', line 960

def low_prec
  @low_prec
end

#stateidObject (readonly)

Returns the value of attribute stateid.



958
959
960
# File 'lib/racc/state.rb', line 958

def stateid
  @stateid
end

#tokenObject (readonly)

Returns the value of attribute token.



961
962
963
# File 'lib/racc/state.rb', line 961

def token
  @token
end

Instance Method Details

#to_sObject



963
964
965
966
# File 'lib/racc/state.rb', line 963

def to_s
  sprintf('state %d: R/R conflict with rule %d and %d on %s',
          @stateid, @high_prec.ident, @low_prec.ident, @token.to_s)
end