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.
8 #include "atn/Transition.h"
13 class ANTLR4CPP_PUBLIC RuleTransition : public Transition {
15 /// Ptr to the rule definition object for this rule ref.
16 const size_t ruleIndex; // no Rule object at runtime
20 /// What node to begin computations following ref to rule.
21 ATNState *followState;
24 /// <seealso cref="#RuleTransition(RuleStartState, size_t, int, ATNState)"/> instead.
25 RuleTransition(RuleStartState *ruleStart, size_t ruleIndex, ATNState *followState);
27 RuleTransition(RuleStartState *ruleStart, size_t ruleIndex, int precedence, ATNState *followState);
28 RuleTransition(RuleTransition const&) = delete;
29 RuleTransition& operator=(RuleTransition const&) = delete;
31 virtual SerializationType getSerializationType() const override;
33 virtual bool isEpsilon() const override;
34 virtual bool matches(size_t symbol, size_t minVocabSymbol, size_t maxVocabSymbol) const override;
36 virtual std::string toString() const override;