#include "atn/RuleStartState.h"
#include "atn/RuleTransition.h"
using namespace antlr4::atn;
RuleTransition::RuleTransition(RuleStartState *ruleStart, size_t ruleIndex, ATNState *followState)
: RuleTransition(ruleStart, ruleIndex, 0, followState) {
}
RuleTransition::RuleTransition(RuleStartState *ruleStart, size_t ruleIndex, int precedence, ATNState *followState)
: Transition(TransitionType::RULE, ruleStart), ruleIndex(ruleIndex), precedence(precedence) {
this->followState = followState;
}
bool RuleTransition::isEpsilon() const {
return true;
}
bool RuleTransition::matches(size_t , size_t , size_t ) const {
return false;
}
std::string RuleTransition::toString() const {
std::stringstream ss;
ss << "RULE " << Transition::toString() << " { ruleIndex: " << ruleIndex << ", precedence: " << precedence <<
", followState: " << std::hex << followState << " }";
return ss.str();
}