Class: Antlr4::Runtime::EpsilonTransition

Inherits:
Transition
  • Object
show all
Defined in:
lib/antlr4/runtime/epsilon_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 collapse

Attributes inherited from Transition

#target

Instance Method Summary collapse

Methods inherited from Transition

#label

Constructor Details

#initialize(target, outermost_precedence_return = -1)) ⇒ EpsilonTransition

Returns a new instance of EpsilonTransition



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

def initialize(target, outermost_precedence_return = -1)
  super(target)
  @outermost_precedence_return = outermost_precedence_return
end

Instance Attribute Details

#outermost_precedence_returnObject (readonly)

Returns the value of attribute outermost_precedence_return



9
10
11
# File 'lib/antlr4/runtime/epsilon_transition.rb', line 9

def outermost_precedence_return
  @outermost_precedence_return
end

Instance Method Details

#epsilon?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/antlr4/runtime/epsilon_transition.rb', line 15

def epsilon?
  true
end

#matches(_symbol, _min_vocab_symbol, _max_vocab_symbol) ⇒ Object



19
20
21
# File 'lib/antlr4/runtime/epsilon_transition.rb', line 19

def matches(_symbol, _min_vocab_symbol, _max_vocab_symbol)
  false
end

#serialization_typeObject



11
12
13
# File 'lib/antlr4/runtime/epsilon_transition.rb', line 11

def serialization_type
  EPSILON
end

#to_sObject



23
24
25
# File 'lib/antlr4/runtime/epsilon_transition.rb', line 23

def to_s
  'epsilon'
end