Skip to content

Commit

Permalink
use antlr4-4.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ncbd committed Sep 6, 2024
1 parent e8e3ae0 commit ba6ecfe
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/cypher/grammar/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export PROJECT_SOURCE_DIR=${SCRIPT_DIR}/../../../
cd ${PROJECT_SOURCE_DIR}/deps/antlr4
mvn clean
MAVEN_OPTS="-Xmx1G" mvn -DskipTests package
LOCATION=${PROJECT_SOURCE_DIR}/deps/antlr4/tool/target/antlr4-4.12.0-complete.jar
LOCATION=${PROJECT_SOURCE_DIR}/deps/antlr4/tool/target/antlr4-4.13.0-complete.jar
GENERATED_DIR=${PROJECT_SOURCE_DIR}/src/cypher/parser/generated
if [ -d "$GENERATED_DIR" ]; then
echo "directory '$GENERATED_DIR' already exists!" && exit 1
Expand Down
15 changes: 14 additions & 1 deletion src/cypher/parser/generated/LcypherLexer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// Generated from src/cypher/grammar/Lcypher.g4 by ANTLR 4.12.0
// Generated from src/cypher/grammar/Lcypher.g4 by ANTLR 4.13.0


#include "LcypherLexer.h"
Expand Down Expand Up @@ -43,10 +43,19 @@ struct LcypherLexerStaticData final {
};

::antlr4::internal::OnceFlag lcypherlexerLexerOnceFlag;
#if ANTLR4_USE_THREAD_LOCAL_CACHE
static thread_local
#endif
LcypherLexerStaticData *lcypherlexerLexerStaticData = nullptr;

void lcypherlexerLexerInitialize() {
#if ANTLR4_USE_THREAD_LOCAL_CACHE
if (lcypherlexerLexerStaticData != nullptr) {
return;
}
#else
assert(lcypherlexerLexerStaticData == nullptr);
#endif
auto staticData = std::make_unique<LcypherLexerStaticData>(
std::vector<std::string>{
"T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8",
Expand Down Expand Up @@ -649,5 +658,9 @@ const atn::ATN& LcypherLexer::getATN() const {


void LcypherLexer::initialize() {
#if ANTLR4_USE_THREAD_LOCAL_CACHE
lcypherlexerLexerInitialize();
#else
::antlr4::internal::call_once(lcypherlexerLexerOnceFlag, lcypherlexerLexerInitialize);
#endif
}
2 changes: 1 addition & 1 deletion src/cypher/parser/generated/LcypherLexer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// Generated from src/cypher/grammar/Lcypher.g4 by ANTLR 4.12.0
// Generated from src/cypher/grammar/Lcypher.g4 by ANTLR 4.13.0

#pragma once

Expand Down
15 changes: 14 additions & 1 deletion src/cypher/parser/generated/LcypherParser.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// Generated from src/cypher/grammar/Lcypher.g4 by ANTLR 4.12.0
// Generated from src/cypher/grammar/Lcypher.g4 by ANTLR 4.13.0


#include "LcypherVisitor.h"
Expand Down Expand Up @@ -38,10 +38,19 @@ struct LcypherParserStaticData final {
};

::antlr4::internal::OnceFlag lcypherParserOnceFlag;
#if ANTLR4_USE_THREAD_LOCAL_CACHE
static thread_local
#endif
LcypherParserStaticData *lcypherParserStaticData = nullptr;

void lcypherParserInitialize() {
#if ANTLR4_USE_THREAD_LOCAL_CACHE
if (lcypherParserStaticData != nullptr) {
return;
}
#else
assert(lcypherParserStaticData == nullptr);
#endif
auto staticData = std::make_unique<LcypherParserStaticData>(
std::vector<std::string>{
"oC_Cypher", "oC_Statement", "oC_Query", "oC_RegularQuery", "oC_Union",
Expand Down Expand Up @@ -11117,5 +11126,9 @@ LcypherParser::OC_DashContext* LcypherParser::oC_Dash() {
}

void LcypherParser::initialize() {
#if ANTLR4_USE_THREAD_LOCAL_CACHE
lcypherParserInitialize();
#else
::antlr4::internal::call_once(lcypherParserOnceFlag, lcypherParserInitialize);
#endif
}
2 changes: 1 addition & 1 deletion src/cypher/parser/generated/LcypherParser.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// Generated from src/cypher/grammar/Lcypher.g4 by ANTLR 4.12.0
// Generated from src/cypher/grammar/Lcypher.g4 by ANTLR 4.13.0

#pragma once

Expand Down
2 changes: 1 addition & 1 deletion src/cypher/parser/generated/LcypherVisitor.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// Generated from src/cypher/grammar/Lcypher.g4 by ANTLR 4.12.0
// Generated from src/cypher/grammar/Lcypher.g4 by ANTLR 4.13.0


#include "LcypherVisitor.h"
Expand Down
2 changes: 1 addition & 1 deletion src/cypher/parser/generated/LcypherVisitor.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// Generated from src/cypher/grammar/Lcypher.g4 by ANTLR 4.12.0
// Generated from src/cypher/grammar/Lcypher.g4 by ANTLR 4.13.0

#pragma once

Expand Down

0 comments on commit ba6ecfe

Please sign in to comment.