Class: Antlr4::Runtime::ATNConfigSet::ConfigEqualityComparator

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/antlr4/runtime/atn_config_set.rb

Instance Method Summary collapse

Instance Method Details

#equals(a, b) ⇒ Object



135
136
137
138
139
140
# File 'lib/antlr4/runtime/atn_config_set.rb', line 135

def equals(a, b)
  return true if a == b
  return false if a.nil? || b.nil?

  a.state.state_number == b.state.state_number && a.alt == b.alt && a.semantic_context.eql?(b.semantic_context)
end

#hash(o) ⇒ Object



131
132
133
# File 'lib/antlr4/runtime/atn_config_set.rb', line 131

def hash(o)
  o.bucket_hash
end