]> gitweb.ps.run Git - toc/blob - antlr4-cpp-runtime-4.9.2-source/runtime/src/atn/DecisionInfo.cpp
add antlr source code and ReadMe
[toc] / antlr4-cpp-runtime-4.9.2-source / runtime / src / atn / DecisionInfo.cpp
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 #include "atn/ErrorInfo.h"
7 #include "atn/LookaheadEventInfo.h"
8
9 #include "atn/DecisionInfo.h"
10
11 using namespace antlr4::atn;
12
13 DecisionInfo::DecisionInfo(size_t decision) : decision(decision) {
14 }
15
16 std::string DecisionInfo::toString() const {
17   std::stringstream ss;
18
19   ss << "{decision=" << decision << ", contextSensitivities=" << contextSensitivities.size() << ", errors=";
20   ss << errors.size() << ", ambiguities=" << ambiguities.size() << ", SLL_lookahead=" << SLL_TotalLook;
21   ss << ", SLL_ATNTransitions=" << SLL_ATNTransitions << ", SLL_DFATransitions=" << SLL_DFATransitions;
22   ss << ", LL_Fallback=" << LL_Fallback << ", LL_lookahead=" << LL_TotalLook << ", LL_ATNTransitions=" << LL_ATNTransitions << '}';
23
24   return ss.str();
25 }