Class: Antlr4::Runtime::WildcardTransition

Inherits:
Transition
  • Object
show all
Defined in:
lib/antlr4/runtime/wildcard_transition.rb

Constant Summary

Constants inherited from Transition

Transition::ACTION, Transition::ATOM, Transition::EPSILON, Transition::NOT_SET, Transition::PRECEDENCE, Transition::PREDICATE, Transition::RANGE, Transition::RULE, Transition::SET, Transition::WILDCARD

Instance Attribute Summary

Attributes inherited from Transition

#target

Instance Method Summary collapse

Methods inherited from Transition

#epsilon?, #label

Constructor Details

#initialize(target) ⇒ WildcardTransition

Returns a new instance of WildcardTransition



4
5
6
# File 'lib/antlr4/runtime/wildcard_transition.rb', line 4

def initialize(target)
  super(target)
end

Instance Method Details

#matches(symbol, min_vocab_symbol, max_vocab_symbol) ⇒ Object



12
13
14
# File 'lib/antlr4/runtime/wildcard_transition.rb', line 12

def matches(symbol, min_vocab_symbol, max_vocab_symbol)
  symbol >= min_vocab_symbol && symbol <= max_vocab_symbol
end

#serialization_typeObject



8
9
10
# File 'lib/antlr4/runtime/wildcard_transition.rb', line 8

def serialization_type
  WILDCARD
end

#to_sObject



16
17
18
# File 'lib/antlr4/runtime/wildcard_transition.rb', line 16

def to_s
  '.'
end