Class: Antlr4::Runtime::RuleTransition

Inherits:
Transition
  • Object
show all
Defined in:
lib/antlr4/runtime/rule_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(rule_start, rule_index, precedence, follow_state) ⇒ RuleTransition

Returns a new instance of RuleTransition


10
11
12
13
14
15
# File 'lib/antlr4/runtime/rule_transition.rb', line 10

def initialize(rule_start, rule_index, precedence, follow_state)
  super(rule_start)
  @rule_index = rule_index
  @precedence = precedence
  @follow_state = follow_state
end

Instance Attribute Details

#follow_stateObject (readonly)

Returns the value of attribute follow_state


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

def follow_state
  @follow_state
end

#precedenceObject (readonly)

Returns the value of attribute precedence


6
7
8
# File 'lib/antlr4/runtime/rule_transition.rb', line 6

def precedence
  @precedence
end

#rule_indexObject (readonly)

no Rule object at runtime


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

def rule_index
  @rule_index
end

Instance Method Details

#epsilon?Boolean

Returns:

  • (Boolean)

21
22
23
# File 'lib/antlr4/runtime/rule_transition.rb', line 21

def epsilon?
  true
end

#matches(_symbol, _min_vocab_symbol, _max_vocab_symbol) ⇒ Object


25
26
27
# File 'lib/antlr4/runtime/rule_transition.rb', line 25

def matches(_symbol, _min_vocab_symbol, _max_vocab_symbol)
  false
end

#serialization_typeObject


17
18
19
# File 'lib/antlr4/runtime/rule_transition.rb', line 17

def serialization_type
  RULE
end