Class: Antlr4::Runtime::Transition

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

Constant Summary collapse

EPSILON =
1
RANGE =
2
RULE =
3
PREDICATE =
4
ATOM =
5
ACTION =
6
SET =
7
NOT_SET =
8
WILDCARD =
9
PRECEDENCE =
10
@@serialization_names =
%w[INVALID EPSILON RANGE RULE PREDICATE ATOM ACTION SET NOT_SET WILDCARD PRECEDENCE]
@@serialization_types =
{}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target) ⇒ Transition

Returns a new instance of Transition



34
35
36
37
38
# File 'lib/antlr4/runtime/transition.rb', line 34

def initialize(target)
  raise 'target cannot be null.' if target.nil?

  @target = target
end

Instance Attribute Details

#targetObject

Returns the value of attribute target



32
33
34
# File 'lib/antlr4/runtime/transition.rb', line 32

def target
  @target
end

Instance Method Details

#epsilon?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/antlr4/runtime/transition.rb', line 40

def epsilon?
  false
end

#labelObject



44
45
46
# File 'lib/antlr4/runtime/transition.rb', line 44

def label
  nil
end

#matches(symbol, min_vocab_symbol, max_vocab_symbol) ⇒ Object



48
49
# File 'lib/antlr4/runtime/transition.rb', line 48

def matches(symbol, min_vocab_symbol, max_vocab_symbol)
end