Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ runtime changes for high warning levels #1902

Merged
merged 19 commits into from
Jun 26, 2017
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9845382
Implement IntervalSet::operator=() using the same semantics as the copy
jm-mikkelsen Jun 10, 2017
092afb2
C++ runtime changes for high warning levels
jm-mikkelsen Jun 10, 2017
e030163
Add myself to contributors.txt.
jm-mikkelsen Jun 10, 2017
2d011c8
Remove C++14 auto return type on utf8_to_utf32
jm-mikkelsen Jun 10, 2017
eb02a05
Possible fix for max_align_t breakage in Travis CI
jm-mikkelsen Jun 10, 2017
4a359c1
ATN: Handle empty, read-only, nextTokenWithinRule
jm-mikkelsen Jun 10, 2017
70402f8
ATN: Remove race condition in addState(ATNState*)
jm-mikkelsen Jun 11, 2017
dde893d
Merge https://github.com/antlr/antlr4
jm-mikkelsen Jun 12, 2017
6e46b16
Naming convention fix for qualifing shadowed args
jm-mikkelsen Jun 12, 2017
274e3c2
Change Lexer::{MORE,SKIP} def back to negative
jm-mikkelsen Jun 12, 2017
8fd4bcf
Add defined() before #if SYM > val evaluations
jm-mikkelsen Jun 12, 2017
577b1d6
Comply with curly brace conventions.
jm-mikkelsen Jun 12, 2017
8c45d71
Undo remove cast to same type in generated code
jm-mikkelsen Jun 12, 2017
aab2c04
Fix missed curly brace convention fix.
jm-mikkelsen Jun 12, 2017
63fc7cb
LexerActionType.h: Use antlr4-common.h for size_t
jm-mikkelsen Jun 12, 2017
fad0488
SemanticContext::Operator: explicit virtual dtor
jm-mikkelsen Jun 12, 2017
fdcfefa
Convention: Change virtual dtor to empty bodies
jm-mikkelsen Jun 12, 2017
cdfe310
Merge branch 'optimizations' of https://github.com/mike-lischke/antlr4
jm-mikkelsen Jun 13, 2017
0c4473e
Merge https://github.com/antlr/antlr4
jm-mikkelsen Jun 26, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contributors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,4 @@ YYYY/MM/DD, github id, Full name, email
2017/05/11, jimallman, Jim Allman, [email protected]
2017/05/26, waf, Will Fuqua, [email protected]
2017/05/29, kosak, Corey Kosak, [email protected]
2017/06/10, jm-mikkelsen, Jan Martin Mikkelsen, [email protected]
5 changes: 5 additions & 0 deletions runtime/Cpp/runtime/src/ANTLRErrorListener.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "ANTLRErrorListener.h"

antlr4::ANTLRErrorListener::~ANTLRErrorListener()
{
}
2 changes: 1 addition & 1 deletion runtime/Cpp/runtime/src/ANTLRErrorListener.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace antlr4 {
/// How to emit recognition errors (an interface in Java).
class ANTLR4CPP_PUBLIC ANTLRErrorListener {
public:
virtual ~ANTLRErrorListener() {};
virtual ~ANTLRErrorListener();

/// <summary>
/// Upon syntax error, notify any interested parties. This is not how to
Expand Down
5 changes: 5 additions & 0 deletions runtime/Cpp/runtime/src/ANTLRErrorStrategy.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "ANTLRErrorStrategy.h"

antlr4::ANTLRErrorStrategy::~ANTLRErrorStrategy()
{
}
2 changes: 1 addition & 1 deletion runtime/Cpp/runtime/src/ANTLRErrorStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace antlr4 {
/// <summary>
/// Reset the error handler state for the specified {@code recognizer}. </summary>
/// <param name="recognizer"> the parser instance </param>
virtual ~ANTLRErrorStrategy() {};
virtual ~ANTLRErrorStrategy();

virtual void reset(Parser *recognizer) = 0;

Expand Down
10 changes: 5 additions & 5 deletions runtime/Cpp/runtime/src/ANTLRInputStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,19 @@ size_t ANTLRInputStream::LA(ssize_t i) {
return 0; // undefined
}

ssize_t position = (ssize_t)p;
ssize_t position = static_cast<ssize_t>(p);
if (i < 0) {
i++; // e.g., translate LA(-1) to use offset i=0; then _data[p+0-1]
if ((position + i - 1) < 0) {
return IntStream::EOF; // invalid; no char before first char
}
}

if ((position + i - 1) >= (ssize_t)_data.size()) {
if ((position + i - 1) >= static_cast<ssize_t>(_data.size())) {
return IntStream::EOF;
}

return _data[(size_t)(position + i - 1)];
return _data[static_cast<size_t>((position + i - 1))];
}

size_t ANTLRInputStream::LT(ssize_t i) {
Expand Down Expand Up @@ -123,8 +123,8 @@ std::string ANTLRInputStream::getText(const Interval &interval) {
return "";
}

size_t start = interval.a;
size_t stop = interval.b;
size_t start = static_cast<size_t>(interval.a);
size_t stop = static_cast<size_t>(interval.b);


if (stop >= _data.size()) {
Expand Down
4 changes: 2 additions & 2 deletions runtime/Cpp/runtime/src/BailErrorStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void BailErrorStrategy::recover(Parser *recognizer, std::exception_ptr e) {
context->exception = e;
if (context->parent == nullptr)
break;
context = (ParserRuleContext *)context->parent;
context = static_cast<ParserRuleContext *>(context->parent);
} while (true);

try {
Expand All @@ -42,7 +42,7 @@ Token* BailErrorStrategy::recoverInline(Parser *recognizer) {
context->exception = exception;
if (context->parent == nullptr)
break;
context = (ParserRuleContext *)context->parent;
context = static_cast<ParserRuleContext *>(context->parent);
} while (true);

try {
Expand Down
12 changes: 6 additions & 6 deletions runtime/Cpp/runtime/src/BufferedTokenStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ size_t BufferedTokenStream::fetch(size_t n) {
std::unique_ptr<Token> t(_tokenSource->nextToken());

if (is<WritableToken *>(t.get())) {
(static_cast<WritableToken *>(t.get()))->setTokenIndex((int)_tokens.size());
(static_cast<WritableToken *>(t.get()))->setTokenIndex(_tokens.size());
}

_tokens.push_back(std::move(t));
Expand Down Expand Up @@ -272,7 +272,7 @@ ssize_t BufferedTokenStream::previousTokenOnChannel(size_t i, size_t channel) {
}

if (i == 0)
return i;
break;
i--;
}
return i;
Expand All @@ -289,7 +289,7 @@ std::vector<Token *> BufferedTokenStream::getHiddenTokensToRight(size_t tokenInd
size_t from = tokenIndex + 1;
// if none onchannel to right, nextOnChannel=-1 so set to = last token
if (nextOnChannel == -1) {
to = (ssize_t)size() - 1;
to = static_cast<ssize_t>(size() - 1);
} else {
to = nextOnChannel;
}
Expand All @@ -313,11 +313,11 @@ std::vector<Token *> BufferedTokenStream::getHiddenTokensToLeft(size_t tokenInde
}

ssize_t prevOnChannel = previousTokenOnChannel(tokenIndex - 1, Lexer::DEFAULT_TOKEN_CHANNEL);
if (prevOnChannel == (ssize_t)tokenIndex - 1) {
if (prevOnChannel == static_cast<ssize_t>(tokenIndex - 1)) {
return { };
}
// if none onchannel to left, prevOnChannel=-1 then from=0
size_t from = (size_t)(prevOnChannel + 1);
size_t from = static_cast<size_t>(prevOnChannel + 1);
size_t to = tokenIndex - 1;

return filterForChannel(from, to, channel);
Expand All @@ -336,7 +336,7 @@ std::vector<Token *> BufferedTokenStream::filterForChannel(size_t from, size_t t
hidden.push_back(t);
}
} else {
if (t->getChannel() == (size_t)channel) {
if (t->getChannel() == static_cast<size_t>(channel)) {
hidden.push_back(t);
}
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/Cpp/runtime/src/CharStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace antlr4 {
/// A source of characters for an ANTLR lexer.
class ANTLR4CPP_PUBLIC CharStream : public IntStream {
public:
virtual ~CharStream() = 0;
virtual ~CharStream();

/// This method returns the text for a range of characters within this input
/// stream. This method is guaranteed to not throw an exception if the
Expand Down
2 changes: 1 addition & 1 deletion runtime/Cpp/runtime/src/CommonToken.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ CommonToken::CommonToken(std::pair<TokenSource*, CharStream*> source, size_t typ
_start = start;
_stop = stop;
if (_source.first != nullptr) {
_line = (int)source.first->getLine();
_line = static_cast<int>(source.first->getLine());
_charPositionInLine = source.first->getCharPositionInLine();
}
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/Cpp/runtime/src/CommonTokenFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using namespace antlr4;

const Ref<TokenFactory<CommonToken>> CommonTokenFactory::DEFAULT = std::make_shared<CommonTokenFactory>();

CommonTokenFactory::CommonTokenFactory(bool copyText) : copyText(copyText) {
CommonTokenFactory::CommonTokenFactory(bool copyText_) : copyText(copyText_) {
}

CommonTokenFactory::CommonTokenFactory() : CommonTokenFactory(false) {
Expand Down
8 changes: 4 additions & 4 deletions runtime/Cpp/runtime/src/CommonTokenStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ using namespace antlr4;
CommonTokenStream::CommonTokenStream(TokenSource *tokenSource) : CommonTokenStream(tokenSource, Token::DEFAULT_CHANNEL) {
}

CommonTokenStream::CommonTokenStream(TokenSource *tokenSource, size_t channel)
: BufferedTokenStream(tokenSource), channel(channel) {
CommonTokenStream::CommonTokenStream(TokenSource *tokenSource, size_t channel_)
: BufferedTokenStream(tokenSource), channel(channel_) {
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a number of similar changes already and use a simple trailing underscore. Having names like channel_in violates the camel case coding style. Can you please change that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update


ssize_t CommonTokenStream::adjustSeekIndex(size_t i) {
Expand All @@ -25,7 +25,7 @@ Token* CommonTokenStream::LB(size_t k) {
return nullptr;
}

ssize_t i = (ssize_t)_p;
ssize_t i = static_cast<ssize_t>(_p);
size_t n = 1;
// find k good tokens looking backwards
while (n <= k) {
Expand All @@ -46,7 +46,7 @@ Token* CommonTokenStream::LT(ssize_t k) {
return nullptr;
}
if (k < 0) {
return LB((size_t)-k);
return LB(static_cast<size_t>(-k));
}
size_t i = _p;
ssize_t n = 1; // we know tokens[p] is a good one
Expand Down
12 changes: 6 additions & 6 deletions runtime/Cpp/runtime/src/DefaultErrorStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ void DefaultErrorStrategy::reportError(Parser *recognizer, const RecognitionExce

beginErrorCondition(recognizer);
if (is<const NoViableAltException *>(&e)) {
reportNoViableAlternative(recognizer, (const NoViableAltException &)e);
reportNoViableAlternative(recognizer, static_cast<const NoViableAltException &>(e));
} else if (is<const InputMismatchException *>(&e)) {
reportInputMismatch(recognizer, (const InputMismatchException &)e);
reportInputMismatch(recognizer, static_cast<const InputMismatchException &>(e));
} else if (is<const FailedPredicateException *>(&e)) {
reportFailedPredicate(recognizer, (const FailedPredicateException &)e);
reportFailedPredicate(recognizer, static_cast<const FailedPredicateException &>(e));
} else if (is<const RecognitionException *>(&e)) {
recognizer->notifyErrorListeners(e.getOffendingToken(), e.what(), std::current_exception());
}
}

void DefaultErrorStrategy::recover(Parser *recognizer, std::exception_ptr /*e*/) {
if (lastErrorIndex == (int)recognizer->getInputStream()->index() &&
if (lastErrorIndex == static_cast<int>(recognizer->getInputStream()->index()) &&
lastErrorStates.contains(recognizer->getState())) {

// uh oh, another error at same token index and previously-visited
Expand All @@ -82,7 +82,7 @@ void DefaultErrorStrategy::recover(Parser *recognizer, std::exception_ptr /*e*/)
// at least to prevent an infinite loop; this is a failsafe.
recognizer->consume();
}
lastErrorIndex = (int)recognizer->getInputStream()->index();
lastErrorIndex = static_cast<int>(recognizer->getInputStream()->index());
lastErrorStates.add(recognizer->getState());
misc::IntervalSet followSet = getErrorRecoverySet(recognizer);
consumeUntil(recognizer, followSet);
Expand Down Expand Up @@ -312,7 +312,7 @@ misc::IntervalSet DefaultErrorStrategy::getErrorRecoverySet(Parser *recognizer)

if (ctx->parent == nullptr)
break;
ctx = (RuleContext *)ctx->parent;
ctx = static_cast<RuleContext *>(ctx->parent);
}
recoverSet.remove(Token::EPSILON);

Expand Down
4 changes: 2 additions & 2 deletions runtime/Cpp/runtime/src/DiagnosticErrorListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ using namespace antlr4;
DiagnosticErrorListener::DiagnosticErrorListener() : DiagnosticErrorListener(true) {
}

DiagnosticErrorListener::DiagnosticErrorListener(bool exactOnly) : exactOnly(exactOnly) {
DiagnosticErrorListener::DiagnosticErrorListener(bool exactOnly_) : exactOnly(exactOnly_) {
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here


void DiagnosticErrorListener::reportAmbiguity(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex, size_t stopIndex,
Expand Down Expand Up @@ -53,7 +53,7 @@ void DiagnosticErrorListener::reportContextSensitivity(Parser *recognizer, const

std::string DiagnosticErrorListener::getDecisionDescription(Parser *recognizer, const dfa::DFA &dfa) {
size_t decision = dfa.decision;
size_t ruleIndex = ((atn::ATNState*)dfa.atnStartState)->ruleIndex;
size_t ruleIndex = (reinterpret_cast<atn::ATNState*>(dfa.atnStartState))->ruleIndex;

const std::vector<std::string>& ruleNames = recognizer->getRuleNames();
if (ruleIndex == INVALID_INDEX || ruleIndex >= ruleNames.size()) {
Expand Down
40 changes: 40 additions & 0 deletions runtime/Cpp/runtime/src/Exceptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,43 @@ IOException::IOException(const std::string &msg) : std::exception(), _message(ms
const char* IOException::what() const NOEXCEPT {
return _message.c_str();
}

//------------------ IllegalStateException -----------------------------------------------------------------------------

IllegalStateException::~IllegalStateException() {
}

//------------------ IllegalArgumentException --------------------------------------------------------------------------

IllegalArgumentException::~IllegalArgumentException() {
}

//------------------ NullPointerException ------------------------------------------------------------------------------

NullPointerException::~NullPointerException() {
}

//------------------ IndexOutOfBoundsException -------------------------------------------------------------------------

IndexOutOfBoundsException::~IndexOutOfBoundsException() {
}

//------------------ UnsupportedOperationException ---------------------------------------------------------------------

UnsupportedOperationException::~UnsupportedOperationException() {
}

//------------------ EmptyStackException -------------------------------------------------------------------------------

EmptyStackException::~EmptyStackException() {
}

//------------------ CancellationException -----------------------------------------------------------------------------

CancellationException::~CancellationException() {
}

//------------------ ParseCancellationException ------------------------------------------------------------------------

ParseCancellationException::~ParseCancellationException() {
}
41 changes: 33 additions & 8 deletions runtime/Cpp/runtime/src/Exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,51 @@ namespace antlr4 {

class ANTLR4CPP_PUBLIC IllegalStateException : public RuntimeException {
public:
IllegalStateException(const std::string &msg = "") : RuntimeException(msg) {};
IllegalStateException(const std::string &msg = "") : RuntimeException(msg) {}
IllegalStateException(IllegalStateException const&) = default;
~IllegalStateException();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~IllegalStateException() = default;

Similar for all other exceptions. However, I wonder why you introduced the d-tor on all the exceptions if you use the default implementation anyway?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in the previous comment. To make sure that the vtable for the class with virtual functions is only generated in one translation unit.

Copy link
Member

@mike-lischke mike-lischke Jun 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, I never had problems with v-table creation so far. Is this something that changed in a newer compiler? Neither clang nor msc seem to have a problem with that either. Can you point me to an online resource, so I can read up the details?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The vtables are created OK, and will work. The problem is that there are too many of them.

That has been part of my coding standard for so long, I assumed everyone did it that way. However, finding an online reference that gives this advice has been surprisingly difficult in about half an hour of searching.

The best origin reference I found with a quick look around the office from John Lakos's "Large-Scale C++ Software Design" (from 1996), which has the "minor design rule":

"In every class that declares or is derived from a class that declares a virtual function, explicitly declare the destructor as the first virtual function in the class and define it out of line."

It goes on to describe the reasons, including an anecdote of thousands of instances of the same functions in different translation units caused by duplicated vtables. Locality of reference will probably also suffer (ie. different instances of the same function will lead to less code fitting into the CPU's instruction cache.)

(I read that in 1997 and pretty much adopted all of it, so I have probably been doing this for at least 20 years.)

Item 24 in Scott Meyers' "More Effective C++" also cautions against inline virtual function definitions with the quote "In large systems, this can lead to programs containing hundreds or thousands of copies of a class's vtbl!"

And, of course, Clang has a warning to let you know you're making your object too big:

-Wweak-vtables

Diagnostic text:

warning: A has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes a lot of sense. Something new learned. Thanks a lot.

IllegalStateException& operator=(IllegalStateException const&) = default;
};

class ANTLR4CPP_PUBLIC IllegalArgumentException : public RuntimeException {
public:
IllegalArgumentException(const std::string &msg = "") : RuntimeException(msg) {};
IllegalArgumentException(IllegalArgumentException const&) = default;
IllegalArgumentException(const std::string &msg = "") : RuntimeException(msg) {}
~IllegalArgumentException();
IllegalArgumentException& operator=(IllegalArgumentException const&) = default;
};

class ANTLR4CPP_PUBLIC NullPointerException : public RuntimeException {
public:
NullPointerException(const std::string &msg = "") : RuntimeException(msg) {};
NullPointerException(const std::string &msg = "") : RuntimeException(msg) {}
NullPointerException(NullPointerException const&) = default;
~NullPointerException();
NullPointerException& operator=(NullPointerException const&) = default;
};

class ANTLR4CPP_PUBLIC IndexOutOfBoundsException : public RuntimeException {
public:
IndexOutOfBoundsException(const std::string &msg = "") : RuntimeException(msg) {};
IndexOutOfBoundsException(const std::string &msg = "") : RuntimeException(msg) {}
IndexOutOfBoundsException(IndexOutOfBoundsException const&) = default;
~IndexOutOfBoundsException();
IndexOutOfBoundsException& operator=(IndexOutOfBoundsException const&) = default;
};

class ANTLR4CPP_PUBLIC UnsupportedOperationException : public RuntimeException {
public:
UnsupportedOperationException(const std::string &msg = "") : RuntimeException(msg) {};
UnsupportedOperationException(const std::string &msg = "") : RuntimeException(msg) {}
UnsupportedOperationException(UnsupportedOperationException const&) = default;
~UnsupportedOperationException();
UnsupportedOperationException& operator=(UnsupportedOperationException const&) = default;

};

class ANTLR4CPP_PUBLIC EmptyStackException : public RuntimeException {
public:
EmptyStackException(const std::string &msg = "") : RuntimeException(msg) {};
EmptyStackException(const std::string &msg = "") : RuntimeException(msg) {}
EmptyStackException(EmptyStackException const&) = default;
~EmptyStackException();
EmptyStackException& operator=(EmptyStackException const&) = default;
};

// IOException is not a runtime exception (in the java hierarchy).
Expand All @@ -63,12 +82,18 @@ namespace antlr4 {

class ANTLR4CPP_PUBLIC CancellationException : public IllegalStateException {
public:
CancellationException(const std::string &msg = "") : IllegalStateException(msg) {};
CancellationException(const std::string &msg = "") : IllegalStateException(msg) {}
CancellationException(CancellationException const&) = default;
~CancellationException();
CancellationException& operator=(CancellationException const&) = default;
};

class ANTLR4CPP_PUBLIC ParseCancellationException : public CancellationException {
public:
ParseCancellationException(const std::string &msg = "") : CancellationException(msg) {};
ParseCancellationException(const std::string &msg = "") : CancellationException(msg) {}
ParseCancellationException(ParseCancellationException const&) = default;
~ParseCancellationException();
ParseCancellationException& operator=(ParseCancellationException const&) = default;
};

} // namespace antlr4
4 changes: 2 additions & 2 deletions runtime/Cpp/runtime/src/FailedPredicateException.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ FailedPredicateException::FailedPredicateException(Parser *recognizer, const std
atn::ATNState *s = recognizer->getInterpreter<atn::ATNSimulator>()->atn.states[recognizer->getState()];
atn::Transition *transition = s->transitions[0];
if (is<atn::PredicateTransition*>(transition)) {
_ruleIndex = ((atn::PredicateTransition *)transition)->ruleIndex;
_predicateIndex = ((atn::PredicateTransition *)transition)->predIndex;
_ruleIndex = static_cast<atn::PredicateTransition *>(transition)->ruleIndex;
_predicateIndex = static_cast<atn::PredicateTransition *>(transition)->predIndex;
} else {
_ruleIndex = 0;
_predicateIndex = 0;
Expand Down
3 changes: 3 additions & 0 deletions runtime/Cpp/runtime/src/InputMismatchException.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ InputMismatchException::InputMismatchException(Parser *recognizer)
: RecognitionException(recognizer, recognizer->getInputStream(), recognizer->getContext(),
recognizer->getCurrentToken()) {
}

InputMismatchException::~InputMismatchException() {
}
Loading