Skip to content

Commit bf7421a

Browse files
Simplify the generation of parsers & bump antlr to 4.9.3 (#58)
**Motivation**: I tried to extend the grammar manually and found following all single steps to generate the parser(s) tediously. So, I would like to propose bundling the generation within one single Bash script. **Changes**: Add a Bash script in the fashion of [speedy-antlr-example](https://github.com/amykyta3/speedy-antlr-example/blob/master/src/spam/parser/generate_parsers.sh); update documentation accordingly. **Update**: I added `speedy-antlr-tool=1.3.1` to conda-forge, which requires `antlr=4.9.3` (instead of `.2`). So @SimeonStoykovQC & I decided to bump the entire used `antlr` version within this PR.
1 parent fde541b commit bf7421a

File tree

294 files changed

+509
-410
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

294 files changed

+509
-410
lines changed

docs/source/development.rst

+6-2

environment.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ dependencies:
1414
- sphinx_rtd_theme
1515
- sphinxcontrib-apidoc
1616
- sqlalchemy
17-
- antlr-python-runtime==4.9.2
1817
- pyodbc
18+
- speedy-antlr-tool==1.3.1
19+
- antlr4-python3-runtime==4.9.3

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ requires-python = ">=3.7.0"
3737

3838
dependencies = [
3939
"sqlalchemy >=1.4",
40-
"antlr4-python3-runtime ==4.9.2",
40+
"antlr4-python3-runtime ==4.9.3",
4141
"pyodbc >=4.0.30"
4242
]
4343

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/ANTLRErrorListener.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/ANTLRErrorStrategy.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/ANTLRFileStream.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/ANTLRFileStream.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/ANTLRInputStream.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/ANTLRInputStream.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/BailErrorStrategy.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/BailErrorStrategy.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/BaseErrorListener.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/BaseErrorListener.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/BufferedTokenStream.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/BufferedTokenStream.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/CharStream.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/CharStream.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/CommonToken.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/CommonToken.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/CommonTokenFactory.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/CommonTokenFactory.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/CommonTokenStream.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/CommonTokenStream.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/ConsoleErrorListener.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/ConsoleErrorListener.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/DefaultErrorStrategy.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/DefaultErrorStrategy.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/DiagnosticErrorListener.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/DiagnosticErrorListener.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/FailedPredicateException.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/FailedPredicateException.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/InputMismatchException.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/InputMismatchException.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/IntStream.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/IntStream.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/InterpreterRuleContext.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/InterpreterRuleContext.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/Lexer.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/Lexer.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/LexerInterpreter.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/LexerInterpreter.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/LexerNoViableAltException.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/LexerNoViableAltException.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/ListTokenSource.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/ListTokenSource.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/NoViableAltException.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/NoViableAltException.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/Parser.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/Parser.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/ParserInterpreter.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/ParserInterpreter.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/ParserRuleContext.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/ParserRuleContext.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/ProxyErrorListener.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/ProxyErrorListener.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/RecognitionException.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/RecognitionException.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/Recognizer.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/Recognizer.h

100644100755
+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#pragma once
77

88
#include "ProxyErrorListener.h"
9+
#include "support/Casts.h"
910

1011
namespace antlr4 {
1112

@@ -79,7 +80,7 @@ namespace antlr4 {
7980
/// @returns The ATN interpreter used by the recognizer for prediction.
8081
template <class T>
8182
T* getInterpreter() const {
82-
return dynamic_cast<T *>(_interpreter);
83+
return antlrcpp::downCast<T *>(_interpreter);
8384
}
8485

8586
/**

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/RuleContext.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/RuleContext.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/RuleContextWithAltNum.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/RuleContextWithAltNum.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/RuntimeMetaData.cpp

100644100755
+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
using namespace antlr4;
99

10-
const std::string RuntimeMetaData::VERSION = "4.9.2";
10+
const std::string RuntimeMetaData::VERSION = "4.9.3";
1111

1212
std::string RuntimeMetaData::getRuntimeVersion() {
1313
return VERSION;

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/RuntimeMetaData.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/Token.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/TokenFactory.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/TokenSource.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/TokenStream.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/TokenStream.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/TokenStreamRewriter.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/TokenStreamRewriter.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/UnbufferedCharStream.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/UnbufferedCharStream.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/UnbufferedTokenStream.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/UnbufferedTokenStream.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/Vocabulary.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/Vocabulary.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/WritableToken.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/antlr4-common.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#include <exception>
3535
#include <bitset>
3636
#include <condition_variable>
37-
#include <functional>
3837

3938
#ifndef USE_UTF8_INSTEAD_OF_CODECVT
4039
#include <codecvt>
@@ -108,7 +107,7 @@
108107
#endif
109108
#endif
110109

111-
#include "support/guid.h"
110+
#include "support/Guid.h"
112111
#include "support/Declarations.h"
113112

114113
#if !defined(HAS_NOEXCEPT)

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/antlr4-runtime.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,10 @@
131131
#include "support/Any.h"
132132
#include "support/Arrays.h"
133133
#include "support/BitSet.h"
134+
#include "support/Casts.h"
134135
#include "support/CPPUtils.h"
135136
#include "support/StringUtils.h"
136-
#include "support/guid.h"
137+
#include "support/Guid.h"
137138
#include "tree/AbstractParseTreeVisitor.h"
138139
#include "tree/ErrorNode.h"
139140
#include "tree/ErrorNodeImpl.h"

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATN.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATN.h

100644100755
+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
#include "RuleContext.h"
99

10+
// GCC generates a warning when forward-declaring ATN if ATN has already been
11+
// declared due to the attributes added by ANTLR4CPP_PUBLIC.
12+
// See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39159
13+
// Add constant that can be checked so forward-declarations can be omitted.
14+
#define ANTLR4CPP_ATN_DECLARED
15+
1016
namespace antlr4 {
1117
namespace atn {
1218

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATNConfig.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATNConfig.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATNConfigSet.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATNConfigSet.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATNDeserializationOptions.cpp

100644100755
+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
using namespace antlr4::atn;
99

10-
ATNDeserializationOptions ATNDeserializationOptions::defaultOptions;
10+
const ATNDeserializationOptions ATNDeserializationOptions::defaultOptions;
1111

1212
ATNDeserializationOptions::ATNDeserializationOptions() {
1313
InitializeInstanceFields();

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATNDeserializationOptions.h

100644100755
+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace atn {
1212

1313
class ANTLR4CPP_PUBLIC ATNDeserializationOptions {
1414
private:
15-
static ATNDeserializationOptions defaultOptions;
15+
static const ATNDeserializationOptions defaultOptions;
1616

1717
bool readOnly;
1818
bool verifyATN;

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATNDeserializer.cpp

100644100755
+15-15
Original file line numberDiff line numberDiff line change
@@ -115,32 +115,32 @@ ATNDeserializer::~ATNDeserializer() {
115115
* This value should never change. Updates following this version are
116116
* reflected as change in the unique ID SERIALIZED_UUID.
117117
*/
118-
Guid ATNDeserializer::ADDED_PRECEDENCE_TRANSITIONS() {
119-
return Guid("1DA0C57D-6C06-438A-9B27-10BCB3CE0F61");
118+
antlrcpp::Guid ATNDeserializer::ADDED_PRECEDENCE_TRANSITIONS() {
119+
return antlrcpp::Guid("1DA0C57D-6C06-438A-9B27-10BCB3CE0F61");
120120
}
121121

122-
Guid ATNDeserializer::ADDED_LEXER_ACTIONS() {
123-
return Guid("AADB8D7E-AEEF-4415-AD2B-8204D6CF042E");
122+
antlrcpp::Guid ATNDeserializer::ADDED_LEXER_ACTIONS() {
123+
return antlrcpp::Guid("AADB8D7E-AEEF-4415-AD2B-8204D6CF042E");
124124
}
125125

126-
Guid ATNDeserializer::ADDED_UNICODE_SMP() {
127-
return Guid("59627784-3BE5-417A-B9EB-8131A7286089");
126+
antlrcpp::Guid ATNDeserializer::ADDED_UNICODE_SMP() {
127+
return antlrcpp::Guid("59627784-3BE5-417A-B9EB-8131A7286089");
128128
}
129129

130-
Guid ATNDeserializer::SERIALIZED_UUID() {
130+
antlrcpp::Guid ATNDeserializer::SERIALIZED_UUID() {
131131
return ADDED_UNICODE_SMP();
132132
}
133133

134-
Guid ATNDeserializer::BASE_SERIALIZED_UUID() {
135-
return Guid("33761B2D-78BB-4A43-8B0B-4F5BEE8AACF3");
134+
antlrcpp::Guid ATNDeserializer::BASE_SERIALIZED_UUID() {
135+
return antlrcpp::Guid("33761B2D-78BB-4A43-8B0B-4F5BEE8AACF3");
136136
}
137137

138-
std::vector<Guid>& ATNDeserializer::SUPPORTED_UUIDS() {
139-
static std::vector<Guid> singleton = { BASE_SERIALIZED_UUID(), ADDED_PRECEDENCE_TRANSITIONS(), ADDED_LEXER_ACTIONS(), ADDED_UNICODE_SMP() };
138+
std::vector<antlrcpp::Guid>& ATNDeserializer::SUPPORTED_UUIDS() {
139+
static std::vector<antlrcpp::Guid> singleton = { BASE_SERIALIZED_UUID(), ADDED_PRECEDENCE_TRANSITIONS(), ADDED_LEXER_ACTIONS(), ADDED_UNICODE_SMP() };
140140
return singleton;
141141
}
142142

143-
bool ATNDeserializer::isFeatureSupported(const Guid &feature, const Guid &actualUuid) {
143+
bool ATNDeserializer::isFeatureSupported(const antlrcpp::Guid &feature, const antlrcpp::Guid &actualUuid) {
144144
auto featureIterator = std::find(SUPPORTED_UUIDS().begin(), SUPPORTED_UUIDS().end(), feature);
145145
if (featureIterator == SUPPORTED_UUIDS().end()) {
146146
return false;
@@ -169,7 +169,7 @@ ATN ATNDeserializer::deserialize(const std::vector<uint16_t>& input) {
169169
throw UnsupportedOperationException(reason);
170170
}
171171

172-
Guid uuid = toUUID(data.data(), p);
172+
antlrcpp::Guid uuid = toUUID(data.data(), p);
173173
p += 8;
174174
auto uuidIterator = std::find(SUPPORTED_UUIDS().begin(), SUPPORTED_UUIDS().end(), uuid);
175175
if (uuidIterator == SUPPORTED_UUIDS().end()) {
@@ -628,8 +628,8 @@ void ATNDeserializer::checkCondition(bool condition, const std::string &message)
628628
}
629629
}
630630

631-
Guid ATNDeserializer::toUUID(const unsigned short *data, size_t offset) {
632-
return Guid((uint16_t *)data + offset, true);
631+
antlrcpp::Guid ATNDeserializer::toUUID(const unsigned short *data, size_t offset) {
632+
return antlrcpp::Guid((uint16_t *)data + offset, true);
633633
}
634634

635635
/* mem check: all created instances are freed in the d-tor of the ATNState they are added to. */

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATNDeserializer.h

100644100755
+8-8
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ namespace atn {
2323

2424
/// This is the current serialized UUID.
2525
// ml: defined as function to avoid the “static initialization order fiasco”.
26-
static Guid SERIALIZED_UUID();
26+
static antlrcpp::Guid SERIALIZED_UUID();
2727

2828
ATNDeserializer();
2929
ATNDeserializer(const ATNDeserializationOptions& dso);
3030
virtual ~ATNDeserializer();
3131

32-
static Guid toUUID(const unsigned short *data, size_t offset);
32+
static antlrcpp::Guid toUUID(const unsigned short *data, size_t offset);
3333

3434
virtual ATN deserialize(const std::vector<uint16_t> &input);
3535
virtual void verifyATN(const ATN &atn);
@@ -54,35 +54,35 @@ namespace atn {
5454
/// <returns> {@code true} if the {@code actualUuid} value represents a
5555
/// serialized ATN at or after the feature identified by {@code feature} was
5656
/// introduced; otherwise, {@code false}. </returns>
57-
virtual bool isFeatureSupported(const Guid &feature, const Guid &actualUuid);
57+
virtual bool isFeatureSupported(const antlrcpp::Guid &feature, const antlrcpp::Guid &actualUuid);
5858
void markPrecedenceDecisions(const ATN &atn);
5959
Ref<LexerAction> lexerActionFactory(LexerActionType type, int data1, int data2);
6060

6161
private:
6262
/// This is the earliest supported serialized UUID.
63-
static Guid BASE_SERIALIZED_UUID();
63+
static antlrcpp::Guid BASE_SERIALIZED_UUID();
6464

6565
/// This UUID indicates an extension of <seealso cref="BASE_SERIALIZED_UUID"/> for the
6666
/// addition of precedence predicates.
67-
static Guid ADDED_PRECEDENCE_TRANSITIONS();
67+
static antlrcpp::Guid ADDED_PRECEDENCE_TRANSITIONS();
6868

6969
/**
7070
* This UUID indicates an extension of ADDED_PRECEDENCE_TRANSITIONS
7171
* for the addition of lexer actions encoded as a sequence of
7272
* LexerAction instances.
7373
*/
74-
static Guid ADDED_LEXER_ACTIONS();
74+
static antlrcpp::Guid ADDED_LEXER_ACTIONS();
7575

7676
/**
7777
* This UUID indicates the serialized ATN contains two sets of
7878
* IntervalSets, where the second set's values are encoded as
7979
* 32-bit integers to support the full Unicode SMP range up to U+10FFFF.
8080
*/
81-
static Guid ADDED_UNICODE_SMP();
81+
static antlrcpp::Guid ADDED_UNICODE_SMP();
8282

8383
/// This list contains all of the currently supported UUIDs, ordered by when
8484
/// the feature first appeared in this branch.
85-
static std::vector<Guid>& SUPPORTED_UUIDS();
85+
static std::vector<antlrcpp::Guid>& SUPPORTED_UUIDS();
8686

8787
ATNDeserializationOptions deserializationOptions;
8888
};

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATNSerializer.cpp

100644100755
+3-3
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ std::string ATNSerializer::decode(const std::wstring &inpdata) {
390390
throw UnsupportedOperationException("ATN Serializer" + reason);
391391
}
392392

393-
Guid uuid = ATNDeserializer::toUUID(data.data(), p);
393+
antlrcpp::Guid uuid = ATNDeserializer::toUUID(data.data(), p);
394394
p += 8;
395395
if (uuid != ATNDeserializer::SERIALIZED_UUID()) {
396396
std::string reason = "Could not deserialize ATN with UUID " + uuid.toString() + " (expected " +
@@ -602,10 +602,10 @@ std::string ATNSerializer::getDecoded(ATN *atn, std::vector<std::string> &tokenN
602602
return ATNSerializer(atn, tokenNames).decode(serialized);
603603
}
604604

605-
void ATNSerializer::serializeUUID(std::vector<size_t> &data, Guid uuid) {
605+
void ATNSerializer::serializeUUID(std::vector<size_t> &data, antlrcpp::Guid uuid) {
606606
unsigned int twoBytes = 0;
607607
bool firstByte = true;
608-
for( std::vector<unsigned char>::const_reverse_iterator rit = uuid.rbegin(); rit != uuid.rend(); ++rit )
608+
for(antlrcpp::Guid::const_reverse_iterator rit = uuid.rbegin(); rit != uuid.rend(); ++rit )
609609
{
610610
if (firstByte) {
611611
twoBytes = *rit;

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATNSerializer.h

100644100755
+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ namespace atn {
5454
private:
5555
std::vector<std::string> _tokenNames;
5656

57-
void serializeUUID(std::vector<size_t> &data, Guid uuid);
57+
void serializeUUID(std::vector<size_t> &data, antlrcpp::Guid uuid);
5858
};
5959

6060
} // namespace atn

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATNSimulator.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATNSimulator.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATNState.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATNState.h

100644100755
+7
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,14 @@ namespace atn {
7070
///
7171
/// <embed src="images/OptionalNonGreedy.svg" type="image/svg+xml"/>
7272
/// </summary>
73+
74+
// GCC generates a warning here if ATN has already been declared due to the
75+
// attributes added by ANTLR4CPP_PUBLIC.
76+
// See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39159
77+
// Only forward-declare if it hasn't already been declared.
78+
#ifndef ANTLR4CPP_ATN_DECLARED
7379
class ANTLR4CPP_PUBLIC ATN;
80+
#endif
7481

7582
class ANTLR4CPP_PUBLIC ATNState {
7683
public:

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ATNType.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/AbstractPredicateTransition.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/AbstractPredicateTransition.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ActionTransition.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ActionTransition.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/AmbiguityInfo.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/AmbiguityInfo.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ArrayPredictionContext.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ArrayPredictionContext.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/AtomTransition.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/AtomTransition.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/BasicBlockStartState.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/BasicBlockStartState.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/BasicState.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/BasicState.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/BlockEndState.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/BlockEndState.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/BlockStartState.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ContextSensitivityInfo.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ContextSensitivityInfo.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/DecisionEventInfo.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/DecisionEventInfo.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/DecisionInfo.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/DecisionInfo.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/DecisionState.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/DecisionState.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/EmptyPredictionContext.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/EmptyPredictionContext.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/EpsilonTransition.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/EpsilonTransition.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ErrorInfo.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ErrorInfo.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LL1Analyzer.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LL1Analyzer.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerATNConfig.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerATNConfig.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerATNSimulator.cpp

100644100755
+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void LexerATNSimulator::SimState::InitializeInstanceFields() {
4747
charPos = INVALID_INDEX;
4848
}
4949

50-
int LexerATNSimulator::match_calls = 0;
50+
std::atomic<int> LexerATNSimulator::match_calls(0);
5151

5252

5353
LexerATNSimulator::LexerATNSimulator(const ATN &atn, std::vector<dfa::DFA> &decisionToDFA,
@@ -69,7 +69,7 @@ void LexerATNSimulator::copyState(LexerATNSimulator *simulator) {
6969
}
7070

7171
size_t LexerATNSimulator::match(CharStream *input, size_t mode) {
72-
match_calls++;
72+
match_calls.fetch_add(1, std::memory_order_relaxed);
7373
_mode = mode;
7474
ssize_t mark = input->mark();
7575

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerATNSimulator.h

100644100755
+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#pragma once
77

8+
#include <atomic>
9+
810
#include "atn/ATNSimulator.h"
911
#include "atn/LexerATNConfig.h"
1012
#include "atn/ATNConfigSet.h"
@@ -89,7 +91,7 @@ namespace atn {
8991
SimState _prevAccept;
9092

9193
public:
92-
static int match_calls;
94+
static std::atomic<int> match_calls;
9395

9496
LexerATNSimulator(const ATN &atn, std::vector<dfa::DFA> &decisionToDFA, PredictionContextCache &sharedContextCache);
9597
LexerATNSimulator(Lexer *recog, const ATN &atn, std::vector<dfa::DFA> &decisionToDFA, PredictionContextCache &sharedContextCache);

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerAction.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerActionExecutor.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerActionExecutor.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerActionType.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerChannelAction.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerChannelAction.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerCustomAction.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerCustomAction.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerIndexedCustomAction.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerIndexedCustomAction.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerModeAction.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerModeAction.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerMoreAction.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerMoreAction.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerPopModeAction.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerPopModeAction.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerPushModeAction.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerPushModeAction.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerSkipAction.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerSkipAction.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerTypeAction.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LexerTypeAction.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LookaheadEventInfo.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LookaheadEventInfo.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LoopEndState.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/LoopEndState.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/NotSetTransition.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/NotSetTransition.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/OrderedATNConfigSet.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/OrderedATNConfigSet.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ParseInfo.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ParseInfo.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ParserATNSimulator.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ParserATNSimulator.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/PlusBlockStartState.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/PlusBlockStartState.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/PlusLoopbackState.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/PlusLoopbackState.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/PrecedencePredicateTransition.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/PrecedencePredicateTransition.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/PredicateEvalInfo.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/PredicateEvalInfo.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/PredicateTransition.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/PredicateTransition.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/PredictionContext.cpp

100644100755
+2-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ using namespace antlr4::atn;
2020

2121
using namespace antlrcpp;
2222

23-
size_t PredictionContext::globalNodeCount = 0;
23+
std::atomic<size_t> PredictionContext::globalNodeCount(0);
2424
const Ref<PredictionContext> PredictionContext::EMPTY = std::make_shared<EmptyPredictionContext>();
2525

2626
//----------------- PredictionContext ----------------------------------------------------------------------------------
2727

28-
PredictionContext::PredictionContext(size_t cachedHashCode) : id(globalNodeCount++), cachedHashCode(cachedHashCode) {
28+
PredictionContext::PredictionContext(size_t cachedHashCode) : id(globalNodeCount.fetch_add(1, std::memory_order_relaxed)), cachedHashCode(cachedHashCode) {
2929
}
3030

3131
PredictionContext::~PredictionContext() {

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/PredictionContext.h

100644100755
+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#pragma once
77

8+
#include <atomic>
9+
810
#include "Recognizer.h"
911
#include "atn/ATN.h"
1012
#include "atn/ATNState.h"
@@ -48,7 +50,7 @@ namespace atn {
4850
#endif
4951

5052
public:
51-
static size_t globalNodeCount;
53+
static std::atomic<size_t> globalNodeCount;
5254
const size_t id;
5355

5456
/// <summary>

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/PredictionMode.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/PredictionMode.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ProfilingATNSimulator.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ProfilingATNSimulator.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/RangeTransition.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/RangeTransition.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/RuleStartState.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/RuleStartState.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/RuleStopState.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/RuleStopState.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/RuleTransition.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/RuleTransition.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/SemanticContext.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/SemanticContext.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/SetTransition.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/SetTransition.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/SingletonPredictionContext.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/SingletonPredictionContext.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/StarBlockStartState.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/StarBlockStartState.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/StarLoopEntryState.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/StarLoopEntryState.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/StarLoopbackState.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/StarLoopbackState.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/TokensStartState.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/TokensStartState.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/Transition.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/Transition.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/WildcardTransition.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/WildcardTransition.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/dfa/DFA.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/dfa/DFA.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/dfa/DFASerializer.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/dfa/DFASerializer.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/dfa/DFAState.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/dfa/DFAState.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/dfa/LexerDFASerializer.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/dfa/LexerDFASerializer.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/misc/InterpreterDataReader.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/misc/InterpreterDataReader.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/misc/Interval.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/misc/Interval.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/misc/IntervalSet.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/misc/IntervalSet.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/misc/MurmurHash.cpp

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/misc/MurmurHash.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/misc/Predicate.h

100644100755
File mode changed.

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/support/Any.h

+13-3
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,26 @@ struct ANTLR4CPP_PUBLIC Any
6565
return derived->value;
6666
}
6767

68-
template<class U>
68+
template<class U, typename std::enable_if<std::is_copy_constructible<U>::value || std::is_copy_assignable<U>::value>::value>
6969
operator U() {
7070
return as<StorageType<U>>();
7171
}
7272

73-
template<class U>
73+
template<class U, typename std::enable_if<(!std::is_copy_constructible<U>::value && !std::is_copy_assignable<U>::value) && (std::is_move_constructible<U>::value || std::is_move_assignable<U>::value)>::value>
74+
operator U() {
75+
return std::move(as<StorageType<U>>());
76+
}
77+
78+
template<class U, typename std::enable_if<std::is_copy_constructible<U>::value || std::is_copy_assignable<U>::value>::value>
7479
operator const U() const {
7580
return as<const StorageType<U>>();
7681
}
7782

83+
template<class U, typename std::enable_if<!(!std::is_copy_constructible<U>::value && !std::is_copy_assignable<U>::value) && (std::is_move_constructible<U>::value || std::is_move_assignable<U>::value)>::value>
84+
operator const U() const {
85+
return std::move(as<const StorageType<U>>());
86+
}
87+
7888
Any& operator = (const Any& a) {
7989
if (_ptr == a._ptr)
8090
return *this;
@@ -99,7 +109,7 @@ struct ANTLR4CPP_PUBLIC Any
99109

100110
virtual ~Any();
101111

102-
virtual bool equals(Any other) const {
112+
virtual bool equals(const Any& other) const {
103113
return _ptr == other._ptr;
104114
}
105115

0 commit comments

Comments
 (0)