Sha256: 36ca9bf60d36fcc2a600172dbc015c4314ed1de1f15166765fa3a8e7853047ee

Contents?: true

Size: 944 Bytes

Versions: 3

Compression:

Stored size: 944 Bytes

Contents

/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
 * Use of this file is governed by the BSD 3-clause license that
 * can be found in the LICENSE.txt file in the project root.
 */

#include "misc/IntervalSet.h"
#include "atn/Transition.h"

#include "atn/AtomTransition.h"

using namespace antlr4::misc;
using namespace antlr4::atn;

AtomTransition::AtomTransition(ATNState *target, size_t label) : Transition(target), _label(label) {
}

Transition::SerializationType AtomTransition::getSerializationType() const {
  return ATOM;
}

IntervalSet AtomTransition::label() const {
  return IntervalSet::of((int)_label);
}

bool AtomTransition::matches(size_t symbol, size_t /*minVocabSymbol*/, size_t /*maxVocabSymbol*/) const {
  return _label == symbol;
}

std::string AtomTransition::toString() const {
  return "ATOM " + Transition::toString() + " { label: " + std::to_string(_label) + " }";
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
expressir-0.2.6 ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp
expressir-0.2.5-x64-mingw32 ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp
expressir-0.2.4-x64-mingw32 ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp