Class: Ibex::LALR::IELR::Annotation

Inherits:
Struct
  • Object
show all
Defined in:
lib/ibex/lalr/ielr/inadequacy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(inadequacy:, matrix:) ⇒ Annotation

Returns a new instance of Annotation.



19
20
21
22
# File 'lib/ibex/lalr/ielr/inadequacy.rb', line 19

def initialize(inadequacy:, matrix:)
  super(inadequacy: inadequacy, matrix: matrix.freeze)
  freeze
end

Instance Attribute Details

#inadequacyObject

Returns the value of attribute inadequacy

Returns:

  • (Object)

    the current value of inadequacy



18
19
20
# File 'lib/ibex/lalr/ielr/inadequacy.rb', line 18

def inadequacy
  @inadequacy
end

#matrixObject

Returns the value of attribute matrix

Returns:

  • (Object)

    the current value of matrix



18
19
20
# File 'lib/ibex/lalr/ielr/inadequacy.rb', line 18

def matrix
  @matrix
end

Instance Method Details

#keyObject



24
25
26
# File 'lib/ibex/lalr/ielr/inadequacy.rb', line 24

def key
  [inadequacy.id, matrix]
end