Sha256: 8fd703bfc37c1f80718d9ddbb0223911b55245f6db9877dcab0611fdc71195e9

Contents?: true

Size: 554 Bytes

Versions: 14

Compression:

Stored size: 554 Bytes

Contents

module Antlr4::Runtime

  class ActionTransition < Transition
    attr_reader :action_index

    def initialize(target, rule_index, action_index, is_ctx_dependent)
      super(target)
      @rule_index = rule_index
      @action_index = action_index
      @is_ctx_dependent = is_ctx_dependent
    end

    def serialization_type
      ACTION
    end

    def epsilon?
      true
    end

    def matches(_symbol, _min_vocab_symbol, _max_vocab_symbol)
      false
    end

    def to_s
      'action_' + @rule_index + ':' + @action_index
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
antlr4-runtime-0.2.12 lib/antlr4/runtime/action_transition.rb
antlr4-runtime-0.2.11 lib/antlr4/runtime/action_transition.rb
antlr4-runtime-0.2.10 lib/antlr4/runtime/action_transition.rb
antlr4-runtime-0.2.9 lib/antlr4/runtime/action_transition.rb
antlr4-runtime-0.2.8 lib/antlr4/runtime/action_transition.rb
antlr4-runtime-0.2.7 lib/antlr4/runtime/action_transition.rb
antlr4-runtime-0.2.6 lib/antlr4/runtime/action_transition.rb
antlr4-runtime-0.2.5 lib/antlr4/runtime/action_transition.rb
antlr4-runtime-0.2.4 lib/antlr4/runtime/action_transition.rb
antlr4-runtime-0.2.3 lib/antlr4/runtime/action_transition.rb
antlr4-runtime-0.2.2 lib/antlr4/runtime/action_transition.rb
antlr4-runtime-0.2.1 lib/antlr4/runtime/action_transition.rb
antlr4-runtime-0.2.0 lib/antlr4/runtime/action_transition.rb
antlr4-runtime-0.1.0 lib/antlr4/runtime/action_transition.rb