Sha256: 0d9875cf34d9bef97aa9c05920b1e86ddce766754e6102f23ffd686953fe8ecd

Contents?: true

Size: 719 Bytes

Versions: 1

Compression:

Stored size: 719 Bytes

Contents

# finished
# 已完成

module Antlr4ruby
  # @final
  class ActionTransition < Transition
    attr_reader :rule_index, :action_index, :is_ctx_dependent

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

    def get_serialization_type
      ACTION
    end

    def is_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

1 entries across 1 versions & 1 rubygems

Version Path
antlr4ruby-0.1.0 lib/antlr4ruby/atn/transition/action_transition.rb