forked from jasder/antlr
Comply with curly brace conventions.
This commit is contained in:
parent
8fd4bcfa33
commit
577b1d61bb
|
@ -14,6 +14,5 @@ InputMismatchException::InputMismatchException(Parser *recognizer)
|
|||
recognizer->getCurrentToken()) {
|
||||
}
|
||||
|
||||
InputMismatchException::~InputMismatchException()
|
||||
{
|
||||
InputMismatchException::~InputMismatchException() {
|
||||
}
|
||||
|
|
|
@ -36,8 +36,7 @@ std::map<std::vector<uint16_t>, atn::ATN> Parser::bypassAltsAtnCache;
|
|||
Parser::TraceListener::TraceListener(Parser *outerInstance_) : outerInstance(outerInstance_) {
|
||||
}
|
||||
|
||||
Parser::TraceListener::~TraceListener()
|
||||
{
|
||||
Parser::TraceListener::~TraceListener() {
|
||||
}
|
||||
|
||||
void Parser::TraceListener::enterEveryRule(ParserRuleContext *ctx) {
|
||||
|
@ -60,8 +59,7 @@ void Parser::TraceListener::exitEveryRule(ParserRuleContext *ctx) {
|
|||
|
||||
Parser::TrimToSizeListener Parser::TrimToSizeListener::INSTANCE;
|
||||
|
||||
Parser::TrimToSizeListener::~TrimToSizeListener()
|
||||
{
|
||||
Parser::TrimToSizeListener::~TrimToSizeListener() {
|
||||
}
|
||||
|
||||
void Parser::TrimToSizeListener::enterEveryRule(ParserRuleContext * /*ctx*/) {
|
||||
|
|
|
@ -27,8 +27,7 @@ RecognitionException::RecognitionException(const std::string &message, Recognize
|
|||
}
|
||||
}
|
||||
|
||||
RecognitionException::~RecognitionException()
|
||||
{
|
||||
RecognitionException::~RecognitionException() {
|
||||
}
|
||||
|
||||
size_t RecognitionException::getOffendingState() const {
|
||||
|
|
|
@ -27,8 +27,7 @@ Recognizer::Recognizer() {
|
|||
_proxListener.addErrorListener(&ConsoleErrorListener::INSTANCE);
|
||||
}
|
||||
|
||||
Recognizer::~Recognizer()
|
||||
{
|
||||
Recognizer::~Recognizer() {
|
||||
}
|
||||
|
||||
dfa::Vocabulary const& Recognizer::getVocabulary() const {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "Token.h"
|
||||
|
||||
antlr4::Token::~Token()
|
||||
{
|
||||
antlr4::Token::~Token() {
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "TokenSource.h"
|
||||
|
||||
antlr4::TokenSource::~TokenSource()
|
||||
{
|
||||
antlr4::TokenSource::~TokenSource() {
|
||||
}
|
||||
|
|
|
@ -22,8 +22,7 @@ Vocabulary::Vocabulary(const std::vector<std::string> &literalNames,
|
|||
// See note here on -1 part: https://github.com/antlr/antlr4/pull/1146
|
||||
}
|
||||
|
||||
Vocabulary::~Vocabulary()
|
||||
{
|
||||
Vocabulary::~Vocabulary() {
|
||||
}
|
||||
|
||||
Vocabulary Vocabulary::fromTokenNames(const std::vector<std::string> &tokenNames) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "WritableToken.h"
|
||||
|
||||
antlr4::WritableToken::~WritableToken()
|
||||
{
|
||||
antlr4::WritableToken::~WritableToken() {
|
||||
}
|
||||
|
|
|
@ -18,8 +18,7 @@ ATNDeserializationOptions::ATNDeserializationOptions(ATNDeserializationOptions *
|
|||
this->generateRuleBypassTransitions = options->generateRuleBypassTransitions;
|
||||
}
|
||||
|
||||
ATNDeserializationOptions::~ATNDeserializationOptions()
|
||||
{
|
||||
ATNDeserializationOptions::~ATNDeserializationOptions() {
|
||||
}
|
||||
|
||||
const ATNDeserializationOptions& ATNDeserializationOptions::getDefaultOptions() {
|
||||
|
|
|
@ -110,8 +110,7 @@ ATNDeserializer::ATNDeserializer(): ATNDeserializer(ATNDeserializationOptions::g
|
|||
ATNDeserializer::ATNDeserializer(const ATNDeserializationOptions& dso): deserializationOptions(dso) {
|
||||
}
|
||||
|
||||
ATNDeserializer::~ATNDeserializer()
|
||||
{
|
||||
ATNDeserializer::~ATNDeserializer() {
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,8 +23,7 @@ ATNSimulator::ATNSimulator(const ATN &atn, PredictionContextCache &sharedContext
|
|||
: atn(atn), _sharedContextCache(sharedContextCache) {
|
||||
}
|
||||
|
||||
ATNSimulator::~ATNSimulator()
|
||||
{
|
||||
ATNSimulator::~ATNSimulator() {
|
||||
}
|
||||
|
||||
void ATNSimulator::clearDFA() {
|
||||
|
|
|
@ -10,6 +10,5 @@ using namespace antlr4::atn;
|
|||
AbstractPredicateTransition::AbstractPredicateTransition(ATNState *target) : Transition(target) {
|
||||
}
|
||||
|
||||
AbstractPredicateTransition::~AbstractPredicateTransition()
|
||||
{
|
||||
AbstractPredicateTransition::~AbstractPredicateTransition() {
|
||||
}
|
||||
|
|
|
@ -21,8 +21,7 @@ ArrayPredictionContext::ArrayPredictionContext(std::vector<Ref<PredictionContext
|
|||
assert(returnStates.size() > 0);
|
||||
}
|
||||
|
||||
ArrayPredictionContext::~ArrayPredictionContext()
|
||||
{
|
||||
ArrayPredictionContext::~ArrayPredictionContext() {
|
||||
}
|
||||
|
||||
bool ArrayPredictionContext::isEmpty() const {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "BlockStartState.h"
|
||||
|
||||
antlr4::atn::BlockStartState::~BlockStartState()
|
||||
{
|
||||
antlr4::atn::BlockStartState::~BlockStartState() {
|
||||
}
|
||||
|
|
|
@ -25,8 +25,7 @@ using namespace antlrcpp;
|
|||
LL1Analyzer::LL1Analyzer(const ATN &atn) : _atn(atn) {
|
||||
}
|
||||
|
||||
LL1Analyzer::~LL1Analyzer()
|
||||
{
|
||||
LL1Analyzer::~LL1Analyzer() {
|
||||
}
|
||||
|
||||
std::vector<misc::IntervalSet> LL1Analyzer::getDecisionLookahead(ATNState *s) const {
|
||||
|
|
|
@ -31,8 +31,7 @@ using namespace antlr4;
|
|||
using namespace antlr4::atn;
|
||||
using namespace antlrcpp;
|
||||
|
||||
LexerATNSimulator::SimState::~SimState()
|
||||
{
|
||||
LexerATNSimulator::SimState::~SimState() {
|
||||
}
|
||||
|
||||
void LexerATNSimulator::SimState::reset() {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "LexerAction.h"
|
||||
|
||||
antlr4::atn::LexerAction::~LexerAction()
|
||||
{
|
||||
antlr4::atn::LexerAction::~LexerAction() {
|
||||
}
|
||||
|
|
|
@ -19,8 +19,7 @@ LexerActionExecutor::LexerActionExecutor(const std::vector<Ref<LexerAction>> &le
|
|||
: _lexerActions(lexerActions), _hashCode(generateHashCode()) {
|
||||
}
|
||||
|
||||
LexerActionExecutor::~LexerActionExecutor()
|
||||
{
|
||||
LexerActionExecutor::~LexerActionExecutor() {
|
||||
}
|
||||
|
||||
Ref<LexerActionExecutor> LexerActionExecutor::append(Ref<LexerActionExecutor> const& lexerActionExecutor,
|
||||
|
|
|
@ -13,8 +13,7 @@ using namespace antlr4::atn;
|
|||
ParseInfo::ParseInfo(ProfilingATNSimulator *atnSimulator) : _atnSimulator(atnSimulator) {
|
||||
}
|
||||
|
||||
ParseInfo::~ParseInfo()
|
||||
{
|
||||
ParseInfo::~ParseInfo() {
|
||||
}
|
||||
|
||||
std::vector<DecisionInfo> ParseInfo::getDecisionInfo() {
|
||||
|
|
|
@ -13,10 +13,6 @@ using namespace antlr4;
|
|||
using namespace antlr4::atn;
|
||||
using namespace antlrcpp;
|
||||
|
||||
SemanticContext::~SemanticContext()
|
||||
{
|
||||
}
|
||||
|
||||
//------------------ Predicate -----------------------------------------------------------------------------------------
|
||||
|
||||
SemanticContext::Predicate::Predicate() : Predicate(INVALID_INDEX, INVALID_INDEX, false) {
|
||||
|
@ -315,6 +311,9 @@ std::string SemanticContext::OR::toString() const {
|
|||
|
||||
const Ref<SemanticContext> SemanticContext::NONE = std::make_shared<Predicate>(INVALID_INDEX, INVALID_INDEX, false);
|
||||
|
||||
SemanticContext::~SemanticContext() {
|
||||
}
|
||||
|
||||
bool SemanticContext::operator != (const SemanticContext &other) const {
|
||||
return !(*this == other);
|
||||
}
|
||||
|
@ -371,6 +370,8 @@ std::vector<Ref<SemanticContext::PrecedencePredicate>> SemanticContext::filterPr
|
|||
return result;
|
||||
}
|
||||
|
||||
SemanticContext::Operator::~Operator()
|
||||
{
|
||||
|
||||
//------------------ Operator -----------------------------------------------------------------------------------------
|
||||
|
||||
SemanticContext::Operator::~Operator() {
|
||||
}
|
||||
|
|
|
@ -15,8 +15,7 @@ SingletonPredictionContext::SingletonPredictionContext(Ref<PredictionContext> co
|
|||
assert(returnState != ATNState::INVALID_STATE_NUMBER);
|
||||
}
|
||||
|
||||
SingletonPredictionContext::~SingletonPredictionContext()
|
||||
{
|
||||
SingletonPredictionContext::~SingletonPredictionContext() {
|
||||
}
|
||||
|
||||
Ref<SingletonPredictionContext> SingletonPredictionContext::create(Ref<PredictionContext> const& parent, size_t returnState) {
|
||||
|
|
|
@ -25,8 +25,7 @@ Transition::Transition(ATNState *target) {
|
|||
this->target = target;
|
||||
}
|
||||
|
||||
Transition::~Transition()
|
||||
{
|
||||
Transition::~Transition() {
|
||||
}
|
||||
|
||||
bool Transition::isEpsilon() const {
|
||||
|
|
|
@ -17,8 +17,7 @@ DFASerializer::DFASerializer(const DFA *dfa, const std::vector<std::string>& tok
|
|||
DFASerializer::DFASerializer(const DFA *dfa, const Vocabulary &vocabulary) : _dfa(dfa), _vocabulary(vocabulary) {
|
||||
}
|
||||
|
||||
DFASerializer::~DFASerializer()
|
||||
{
|
||||
DFASerializer::~DFASerializer() {
|
||||
}
|
||||
|
||||
std::string DFASerializer::toString() const {
|
||||
|
|
|
@ -18,8 +18,7 @@ DFAState::PredPrediction::PredPrediction(const Ref<SemanticContext> &pred, int a
|
|||
this->alt = alt;
|
||||
}
|
||||
|
||||
DFAState::PredPrediction::~PredPrediction()
|
||||
{
|
||||
DFAState::PredPrediction::~PredPrediction() {
|
||||
}
|
||||
|
||||
std::string DFAState::PredPrediction::toString() {
|
||||
|
|
|
@ -12,8 +12,7 @@ using namespace antlr4::dfa;
|
|||
LexerDFASerializer::LexerDFASerializer(DFA *dfa) : DFASerializer(dfa, Vocabulary::EMPTY_VOCABULARY) {
|
||||
}
|
||||
|
||||
LexerDFASerializer::~LexerDFASerializer()
|
||||
{
|
||||
LexerDFASerializer::~LexerDFASerializer() {
|
||||
}
|
||||
|
||||
std::string LexerDFASerializer::getEdgeLabel(size_t i) const {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "misc/Predicate.h"
|
||||
|
||||
antlr4::misc::Predicate::~Predicate()
|
||||
{
|
||||
antlr4::misc::Predicate::~Predicate() {
|
||||
}
|
||||
|
|
|
@ -5,6 +5,5 @@ antlrcpp::Any::~Any()
|
|||
delete _ptr;
|
||||
}
|
||||
|
||||
antlrcpp::Any::Base::~Base()
|
||||
{
|
||||
antlrcpp::Any::Base::~Base() {
|
||||
}
|
||||
|
|
|
@ -22,8 +22,7 @@ namespace antlrcpp {
|
|||
struct FinalAction {
|
||||
FinalAction(std::function<void ()> f) : _cleanUp { f } {}
|
||||
FinalAction(FinalAction &&other) :
|
||||
_cleanUp(std::move(other._cleanUp)), _enabled(other._enabled)
|
||||
{
|
||||
_cleanUp(std::move(other._cleanUp)), _enabled(other._enabled) {
|
||||
other._enabled = false; // Don't trigger the lambda after ownership has moved.
|
||||
}
|
||||
~FinalAction() { if (_enabled) _cleanUp(); }
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "tree/ErrorNode.h"
|
||||
|
||||
antlr4::tree::ErrorNode::~ErrorNode()
|
||||
{
|
||||
antlr4::tree::ErrorNode::~ErrorNode() {
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "ParseTreeListener.h"
|
||||
|
||||
antlr4::tree::ParseTreeListener::~ParseTreeListener()
|
||||
{
|
||||
antlr4::tree::ParseTreeListener::~ParseTreeListener() {
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "ParseTreeVisitor.h"
|
||||
|
||||
antlr4::tree::ParseTreeVisitor::~ParseTreeVisitor()
|
||||
{
|
||||
antlr4::tree::ParseTreeVisitor::~ParseTreeVisitor() {
|
||||
}
|
||||
|
|
|
@ -17,8 +17,7 @@ using namespace antlrcpp;
|
|||
static IterativeParseTreeWalker defaultWalker;
|
||||
ParseTreeWalker &ParseTreeWalker::DEFAULT = defaultWalker;
|
||||
|
||||
ParseTreeWalker::~ParseTreeWalker()
|
||||
{
|
||||
ParseTreeWalker::~ParseTreeWalker() {
|
||||
}
|
||||
|
||||
void ParseTreeWalker::walk(ParseTreeListener *listener, ParseTree *t) const {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "tree/TerminalNode.h"
|
||||
|
||||
antlr4::tree::TerminalNode::~TerminalNode()
|
||||
{
|
||||
antlr4::tree::TerminalNode::~TerminalNode() {
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "tree/pattern/Chunk.h"
|
||||
|
||||
antlr4::tree::pattern::Chunk::~Chunk()
|
||||
{
|
||||
antlr4::tree::pattern::Chunk::~Chunk() {
|
||||
}
|
||||
|
|
|
@ -19,8 +19,7 @@ ParseTreeMatch::ParseTreeMatch(ParseTree *tree, const ParseTreePattern &pattern,
|
|||
}
|
||||
}
|
||||
|
||||
ParseTreeMatch::~ParseTreeMatch()
|
||||
{
|
||||
ParseTreeMatch::~ParseTreeMatch() {
|
||||
}
|
||||
|
||||
ParseTree* ParseTreeMatch::get(const std::string &label) {
|
||||
|
|
|
@ -34,20 +34,17 @@ using namespace antlrcpp;
|
|||
ParseTreePatternMatcher::CannotInvokeStartRule::CannotInvokeStartRule(const RuntimeException &e) : RuntimeException(e.what()) {
|
||||
}
|
||||
|
||||
ParseTreePatternMatcher::CannotInvokeStartRule::~CannotInvokeStartRule()
|
||||
{
|
||||
ParseTreePatternMatcher::CannotInvokeStartRule::~CannotInvokeStartRule() {
|
||||
}
|
||||
|
||||
ParseTreePatternMatcher::StartRuleDoesNotConsumeFullPattern::~StartRuleDoesNotConsumeFullPattern()
|
||||
{
|
||||
ParseTreePatternMatcher::StartRuleDoesNotConsumeFullPattern::~StartRuleDoesNotConsumeFullPattern() {
|
||||
}
|
||||
|
||||
ParseTreePatternMatcher::ParseTreePatternMatcher(Lexer *lexer, Parser *parser) : _lexer(lexer), _parser(parser) {
|
||||
InitializeInstanceFields();
|
||||
}
|
||||
|
||||
ParseTreePatternMatcher::~ParseTreePatternMatcher()
|
||||
{
|
||||
ParseTreePatternMatcher::~ParseTreePatternMatcher() {
|
||||
}
|
||||
|
||||
void ParseTreePatternMatcher::setDelimiters(const std::string &start, const std::string &stop, const std::string &escapeLeft) {
|
||||
|
|
|
@ -19,8 +19,7 @@ TagChunk::TagChunk(const std::string &label, const std::string &tag) : _tag(tag)
|
|||
|
||||
}
|
||||
|
||||
TagChunk::~TagChunk()
|
||||
{
|
||||
TagChunk::~TagChunk() {
|
||||
}
|
||||
|
||||
std::string TagChunk::getTag() {
|
||||
|
|
|
@ -16,8 +16,7 @@ TextChunk::TextChunk(const std::string &text) : text(text) {
|
|||
|
||||
}
|
||||
|
||||
TextChunk::~TextChunk()
|
||||
{
|
||||
TextChunk::~TextChunk() {
|
||||
}
|
||||
|
||||
std::string TextChunk::getText() {
|
||||
|
|
Loading…
Reference in New Issue