Sha256: 306b1bb6f745a854bdb9f13f2947630e0dfa0511d37bb099bca9ff7e0bee6077

Contents?: true

Size: 913 Bytes

Versions: 28

Compression:

Stored size: 913 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

28 entries across 28 versions & 2 rubygems

Version Path
expressir-0.2.10 ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp
expressir-0.2.9 ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp
expressir-0.2.8 ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp
expressir-0.2.7 ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp
expressir-0.2.5-x86_64-linux ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp
expressir-0.2.5-x86_64-darwin-19 ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp
expressir-0.2.5 ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp
python3-parser-1.0.0 ext/python3-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp