]> gitweb.ps.run Git - toc/blob - antlr4-cpp-runtime-4.9.2-source/runtime/src/atn/PrecedencePredicateTransition.h
add antlr source code and ReadMe
[toc] / antlr4-cpp-runtime-4.9.2-source / runtime / src / atn / PrecedencePredicateTransition.h
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.
4  */
5
6 #pragma once
7
8 #include "atn/AbstractPredicateTransition.h"
9 #include "SemanticContext.h"
10
11 namespace antlr4 {
12 namespace atn {
13
14   class ANTLR4CPP_PUBLIC PrecedencePredicateTransition final : public AbstractPredicateTransition {
15   public:
16     const int precedence;
17
18     PrecedencePredicateTransition(ATNState *target, int precedence);
19
20     virtual SerializationType getSerializationType() const override;
21     virtual bool isEpsilon() const override;
22     virtual bool matches(size_t symbol, size_t minVocabSymbol, size_t maxVocabSymbol) const override;
23     Ref<SemanticContext::PrecedencePredicate> getPredicate() const;
24     virtual std::string toString() const override;
25
26   };
27
28 } // namespace atn
29 } // namespace antlr4