1 /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
2 * Use of this file is governed by the BSD 3-clause license that
3 * can be found in the LICENSE.txt file in the project root.
6 #include "atn/NotSetTransition.h"
7 #include "atn/ATNState.h"
8 #include "misc/IntervalSet.h"
10 using namespace antlr4;
11 using namespace antlr4::atn;
13 NotSetTransition::NotSetTransition(ATNState *target, const misc::IntervalSet &set) : SetTransition(target, set) {
16 Transition::SerializationType NotSetTransition::getSerializationType() const {
20 bool NotSetTransition::matches(size_t symbol, size_t minVocabSymbol, size_t maxVocabSymbol) const {
21 return symbol >= minVocabSymbol && symbol <= maxVocabSymbol
22 && !SetTransition::matches(symbol, minVocabSymbol, maxVocabSymbol);
25 std::string NotSetTransition::toString() const {
26 return "NOT_SET " + Transition::toString() + " { " + SetTransition::toString() + " }";