diff --git a/doc/swift-target.md b/doc/swift-target.md index 36620b1eb1..fc95913d86 100644 --- a/doc/swift-target.md +++ b/doc/swift-target.md @@ -139,7 +139,7 @@ and Swift is currently not ABI stable. We currently support SPM-based projects by creating temporary local repository. ```swift -.package(name: "Antlr4", url: "https://github.com/antlr/antlr4", from: "4.9.3" +.package(name: "Antlr4", url: "https://github.com/antlr/antlr4", from: "4.10" ``` ## Swift access levels diff --git a/runtime/CSharp/src/Antlr4.csproj b/runtime/CSharp/src/Antlr4.csproj index adbb5ee424..080c42c668 100644 --- a/runtime/CSharp/src/Antlr4.csproj +++ b/runtime/CSharp/src/Antlr4.csproj @@ -1,7 +1,7 @@  The ANTLR Organization - 4.9.3 + 4.10 en-US netstandard2.0 net45;netstandard2.0 diff --git a/runtime/CSharp/src/Properties/AssemblyInfo.cs b/runtime/CSharp/src/Properties/AssemblyInfo.cs index 352e2ce17a..6666031698 100644 --- a/runtime/CSharp/src/Properties/AssemblyInfo.cs +++ b/runtime/CSharp/src/Properties/AssemblyInfo.cs @@ -6,4 +6,4 @@ using System.Reflection; [assembly: CLSCompliant(true)] -[assembly: AssemblyVersion("4.9.3")] +[assembly: AssemblyVersion("4.10")] diff --git a/runtime/CSharp/src/README.md b/runtime/CSharp/src/README.md index 47aff0cd97..771253596f 100644 --- a/runtime/CSharp/src/README.md +++ b/runtime/CSharp/src/README.md @@ -41,7 +41,7 @@ See the docs and the book to learn about writing lexer and parser grammars. ### Step 4: Generate the C# code This can be done either from the cmd line, or by adding a custom pre-build command in your project. -At minimal, the cmd line should look as follows: ``java -jar antlr4-4.9.3.jar -Dlanguage=CSharp grammar.g4`` +At minimal, the cmd line should look as follows: ``java -jar antlr4-4.10.jar -Dlanguage=CSharp grammar.g4`` This will generate the files, which you can then integrate in your project. This is just a quick start. The tool has many useful options to control generation, please refer to its documentation. diff --git a/runtime/CSharp/src/Tree/Xpath/XPathLexer.cs b/runtime/CSharp/src/Tree/Xpath/XPathLexer.cs index eec5d4805c..e3cbb5491d 100644 --- a/runtime/CSharp/src/Tree/Xpath/XPathLexer.cs +++ b/runtime/CSharp/src/Tree/Xpath/XPathLexer.cs @@ -24,7 +24,7 @@ using Antlr4.Runtime.Misc; using DFA = Antlr4.Runtime.Dfa.DFA; -[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.9.3")] +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.10")] [System.CLSCompliant(false)] public partial class XPathLexer : Lexer { diff --git a/runtime/Cpp/VERSION b/runtime/Cpp/VERSION index c01c413359..8d39259a80 100644 --- a/runtime/Cpp/VERSION +++ b/runtime/Cpp/VERSION @@ -1 +1 @@ -4.9.3 +4.10 diff --git a/runtime/Cpp/cmake/Antlr4Package.md b/runtime/Cpp/cmake/Antlr4Package.md index 10e7752856..9b4d8584c3 100644 --- a/runtime/Cpp/cmake/Antlr4Package.md +++ b/runtime/Cpp/cmake/Antlr4Package.md @@ -96,7 +96,7 @@ target_link_libraries( Parsertest PRIVATE find_package(antlr4-generator REQUIRED) # Set path to generator - set(ANTLR4_JAR_LOCATION ${PROJECT_SOURCE_DIR}/thirdparty/antlr/antlr-4.9.3-complete.jar) + set(ANTLR4_JAR_LOCATION ${PROJECT_SOURCE_DIR}/thirdparty/antlr/antlr-4.10-complete.jar) # generate lexer antlr4_generate( diff --git a/runtime/Cpp/cmake/ExternalAntlr4Cpp.cmake b/runtime/Cpp/cmake/ExternalAntlr4Cpp.cmake index 2acc610ef0..6d07ba16cb 100644 --- a/runtime/Cpp/cmake/ExternalAntlr4Cpp.cmake +++ b/runtime/Cpp/cmake/ExternalAntlr4Cpp.cmake @@ -38,7 +38,7 @@ else() set(ANTLR4_SHARED_LIBRARIES ${ANTLR4_OUTPUT_DIR}/libantlr4-runtime.dll.a) set(ANTLR4_RUNTIME_LIBRARIES - ${ANTLR4_OUTPUT_DIR}/cygantlr4-runtime-4.9.3.dll) + ${ANTLR4_OUTPUT_DIR}/cygantlr4-runtime-4.10.dll) elseif(APPLE) set(ANTLR4_RUNTIME_LIBRARIES ${ANTLR4_OUTPUT_DIR}/libantlr4-runtime.dylib) diff --git a/runtime/Cpp/cmake/FindANTLR.cmake b/runtime/Cpp/cmake/FindANTLR.cmake index 2d204d7e9d..4a34d730d1 100644 --- a/runtime/Cpp/cmake/FindANTLR.cmake +++ b/runtime/Cpp/cmake/FindANTLR.cmake @@ -2,7 +2,7 @@ find_package(Java QUIET COMPONENTS Runtime) if(NOT ANTLR_EXECUTABLE) find_program(ANTLR_EXECUTABLE - NAMES antlr.jar antlr4.jar antlr-4.jar antlr-4.9.3-complete.jar) + NAMES antlr.jar antlr4.jar antlr-4.jar antlr-4.10-complete.jar) endif() if(ANTLR_EXECUTABLE AND Java_JAVA_EXECUTABLE) diff --git a/runtime/Cpp/cmake/README.md b/runtime/Cpp/cmake/README.md index 0ebe1dd51e..e2861d5593 100644 --- a/runtime/Cpp/cmake/README.md +++ b/runtime/Cpp/cmake/README.md @@ -31,7 +31,7 @@ include_directories(${ANTLR4_INCLUDE_DIRS}) # set variable pointing to the antlr tool that supports C++ # this is not required if the jar file can be found under PATH environment -set(ANTLR_EXECUTABLE /home/user/antlr-4.9.3-complete.jar) +set(ANTLR_EXECUTABLE /home/user/antlr-4.10-complete.jar) # add macros to generate ANTLR Cpp code from grammar find_package(ANTLR REQUIRED) diff --git a/runtime/Cpp/demo/generate.cmd b/runtime/Cpp/demo/generate.cmd index 5d74466a90..53619c742f 100644 --- a/runtime/Cpp/demo/generate.cmd +++ b/runtime/Cpp/demo/generate.cmd @@ -6,7 +6,7 @@ :: Download the ANLTR jar and place it in the same folder as this script (or adjust the LOCATION var accordingly). -set LOCATION=antlr-4.9.3-complete.jar +set LOCATION=antlr-4.10-complete.jar java -jar %LOCATION% -Dlanguage=Cpp -listener -visitor -o generated/ -package antlrcpptest TLexer.g4 TParser.g4 ::java -jar %LOCATION% -Dlanguage=Cpp -listener -visitor -o generated/ -package antlrcpptest -XdbgST TLexer.g4 TParser.g4 ::java -jar %LOCATION% -Dlanguage=Java -listener -visitor -o generated/ -package antlrcpptest TLexer.g4 TParser.g4 diff --git a/runtime/Cpp/runtime/src/RuntimeMetaData.cpp b/runtime/Cpp/runtime/src/RuntimeMetaData.cpp index 3c7f612dd6..3871ba357e 100755 --- a/runtime/Cpp/runtime/src/RuntimeMetaData.cpp +++ b/runtime/Cpp/runtime/src/RuntimeMetaData.cpp @@ -7,7 +7,7 @@ using namespace antlr4; -const std::string RuntimeMetaData::VERSION = "4.9.3"; +const std::string RuntimeMetaData::VERSION = "4.10"; std::string RuntimeMetaData::getRuntimeVersion() { return VERSION; diff --git a/runtime/Dart/lib/src/runtime_meta_data.dart b/runtime/Dart/lib/src/runtime_meta_data.dart index 8008b7d374..f0af12f3dc 100644 --- a/runtime/Dart/lib/src/runtime_meta_data.dart +++ b/runtime/Dart/lib/src/runtime_meta_data.dart @@ -66,7 +66,7 @@ class RuntimeMetaData { /// omitted, the {@code -} (hyphen-minus) appearing before it is also /// omitted. /// - static final String VERSION = '4.9.3'; + static final String VERSION = '4.10'; /// Gets the currently executing version of the ANTLR 4 runtime library. /// diff --git a/runtime/Dart/pubspec.yaml b/runtime/Dart/pubspec.yaml index 39ebadb8b0..aec9846f60 100644 --- a/runtime/Dart/pubspec.yaml +++ b/runtime/Dart/pubspec.yaml @@ -1,5 +1,5 @@ name: "antlr4" -version: "4.9.3" +version: "4.10" description: "New Dart runtime for ANTLR4." homepage: "https://github.com/antlr/antlr4" license: "BSD-3-Clause" diff --git a/runtime/Go/antlr/recognizer.go b/runtime/Go/antlr/recognizer.go index 12578cfb37..d7c1079b1e 100644 --- a/runtime/Go/antlr/recognizer.go +++ b/runtime/Go/antlr/recognizer.go @@ -49,7 +49,7 @@ var tokenTypeMapCache = make(map[string]int) var ruleIndexMapCache = make(map[string]int) func (b *BaseRecognizer) checkVersion(toolVersion string) { - runtimeVersion := "4.9.3" + runtimeVersion := "4.10" if runtimeVersion != toolVersion { fmt.Println("ANTLR runtime and generated code versions disagree: " + runtimeVersion + "!=" + toolVersion) } diff --git a/runtime/Java/src/org/antlr/v4/runtime/RuntimeMetaData.java b/runtime/Java/src/org/antlr/v4/runtime/RuntimeMetaData.java index b634a35072..3b18a98de7 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/RuntimeMetaData.java +++ b/runtime/Java/src/org/antlr/v4/runtime/RuntimeMetaData.java @@ -67,7 +67,7 @@ public class RuntimeMetaData { * omitted. * */ - public static final String VERSION = "4.9.3"; + public static final String VERSION = "4.10"; /** * Gets the currently executing version of the ANTLR 4 runtime library. diff --git a/runtime/JavaScript/package-lock.json b/runtime/JavaScript/package-lock.json index fef3f02bec..7c3465b034 100644 --- a/runtime/JavaScript/package-lock.json +++ b/runtime/JavaScript/package-lock.json @@ -1,12 +1,12 @@ { "name": "antlr4", - "version": "4.9.3", + "version": "4.10", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "antlr4", - "version": "4.9.3", + "version": "4.10", "license": "BSD-3-Clause", "devDependencies": { "@babel/core": "^7.13.10", diff --git a/runtime/JavaScript/package.json b/runtime/JavaScript/package.json index 61a657fa45..280be34350 100644 --- a/runtime/JavaScript/package.json +++ b/runtime/JavaScript/package.json @@ -1,6 +1,6 @@ { "name": "antlr4", - "version": "4.9.3", + "version": "4.10", "description": "JavaScript runtime for ANTLR4", "main": "src/antlr4/index.js", "repository": "antlr/antlr4.git", diff --git a/runtime/JavaScript/src/antlr4/Recognizer.js b/runtime/JavaScript/src/antlr4/Recognizer.js index 0a93402404..cc9ecf0ef6 100644 --- a/runtime/JavaScript/src/antlr4/Recognizer.js +++ b/runtime/JavaScript/src/antlr4/Recognizer.js @@ -15,7 +15,7 @@ class Recognizer { } checkVersion(toolVersion) { - const runtimeVersion = "4.9.3"; + const runtimeVersion = "4.10"; if (runtimeVersion!==toolVersion) { console.log("ANTLR runtime and generated code versions disagree: "+runtimeVersion+"!="+toolVersion); } diff --git a/runtime/Python2/setup.py b/runtime/Python2/setup.py index d7f9ece275..e8fa183d76 100644 --- a/runtime/Python2/setup.py +++ b/runtime/Python2/setup.py @@ -2,12 +2,12 @@ setup( name='antlr4-python2-runtime', - version='4.9.3', + version='4.10', url='http://www.antlr.org', license='BSD', packages=['antlr4', 'antlr4.atn', 'antlr4.dfa', 'antlr4.tree', 'antlr4.error', 'antlr4.xpath'], package_dir={'': 'src'}, author='Eric Vergnaud, Terence Parr, Sam Harwell', author_email='eric.vergnaud@wanadoo.fr', - description='ANTLR 4.9.3 runtime for Python 2.7.12' + description='ANTLR 4.10 runtime for Python 2.7.12' ) diff --git a/runtime/Python2/src/antlr4/Recognizer.py b/runtime/Python2/src/antlr4/Recognizer.py index ea9a8739fd..99462d409b 100644 --- a/runtime/Python2/src/antlr4/Recognizer.py +++ b/runtime/Python2/src/antlr4/Recognizer.py @@ -30,7 +30,7 @@ def extractVersion(self, version): return major, minor def checkVersion(self, toolVersion): - runtimeVersion = "4.9.3" + runtimeVersion = "4.10" rvmajor, rvminor = self.extractVersion(runtimeVersion) tvmajor, tvminor = self.extractVersion(toolVersion) if rvmajor!=tvmajor or rvminor!=tvminor: diff --git a/runtime/Python3/setup.py b/runtime/Python3/setup.py index 6ec1fd0bc5..731a26e4ac 100644 --- a/runtime/Python3/setup.py +++ b/runtime/Python3/setup.py @@ -2,7 +2,7 @@ setup( name='antlr4-python3-runtime', - version='4.9.3', + version='4.10', packages=['antlr4', 'antlr4.atn', 'antlr4.dfa', 'antlr4.tree', 'antlr4.error', 'antlr4.xpath'], package_dir={'': 'src'}, install_requires=[ @@ -13,5 +13,5 @@ author='Eric Vergnaud, Terence Parr, Sam Harwell', author_email='eric.vergnaud@wanadoo.fr', entry_points={'console_scripts': ['pygrun=antlr4._pygrun:main']}, - description='ANTLR 4.9.3 runtime for Python 3.7' + description='ANTLR 4.10 runtime for Python 3.7' ) diff --git a/runtime/Python3/src/antlr4/Recognizer.py b/runtime/Python3/src/antlr4/Recognizer.py index d87738be57..371d9aaa43 100644 --- a/runtime/Python3/src/antlr4/Recognizer.py +++ b/runtime/Python3/src/antlr4/Recognizer.py @@ -34,7 +34,7 @@ def extractVersion(self, version): return major, minor def checkVersion(self, toolVersion): - runtimeVersion = "4.9.3" + runtimeVersion = "4.10" rvmajor, rvminor = self.extractVersion(runtimeVersion) tvmajor, tvminor = self.extractVersion(toolVersion) if rvmajor!=tvmajor or rvminor!=tvminor: diff --git a/runtime/Swift/Sources/Antlr4/RuntimeMetaData.swift b/runtime/Swift/Sources/Antlr4/RuntimeMetaData.swift index 8607ed2147..eb7afa44d5 100644 --- a/runtime/Swift/Sources/Antlr4/RuntimeMetaData.swift +++ b/runtime/Swift/Sources/Antlr4/RuntimeMetaData.swift @@ -63,7 +63,7 @@ public class RuntimeMetaData { /// omitted, the `-` (hyphen-minus) appearing before it is also /// omitted. /// - public static let VERSION: String = "4.9.3" + public static let VERSION: String = "4.10" /// /// Gets the currently executing version of the ANTLR 4 runtime library. diff --git a/runtime/Swift/Tests/Antlr4Tests/RuntimeMetaDataTests.swift b/runtime/Swift/Tests/Antlr4Tests/RuntimeMetaDataTests.swift index d634488f5a..3c1f615ee1 100644 --- a/runtime/Swift/Tests/Antlr4Tests/RuntimeMetaDataTests.swift +++ b/runtime/Swift/Tests/Antlr4Tests/RuntimeMetaDataTests.swift @@ -20,6 +20,7 @@ class RuntimeMetaDataTests: XCTestCase { doGetMajorMinorVersionTest("4.9.1", "4.9") doGetMajorMinorVersionTest("4.9.2", "4.9") doGetMajorMinorVersionTest("4.9.3", "4.9") + doGetMajorMinorVersionTest("4.10", "4.10") doGetMajorMinorVersionTest("4-SNAPSHOT", "4") doGetMajorMinorVersionTest("4.-SNAPSHOT", "4.") doGetMajorMinorVersionTest("4.7-SNAPSHOT", "4.7") @@ -28,6 +29,7 @@ class RuntimeMetaDataTests: XCTestCase { doGetMajorMinorVersionTest("4.9.1-SNAPSHOT", "4.9") doGetMajorMinorVersionTest("4.9.2-SNAPSHOT", "4.9") doGetMajorMinorVersionTest("4.9.3-SNAPSHOT", "4.9") + doGetMajorMinorVersionTest("4.10-SNAPSHOT", "4.10") } } diff --git a/tool/resources/org/antlr/v4/tool/templates/codegen/Swift/Swift.stg b/tool/resources/org/antlr/v4/tool/templates/codegen/Swift/Swift.stg index 957a161a63..6b3f0395e2 100755 --- a/tool/resources/org/antlr/v4/tool/templates/codegen/Swift/Swift.stg +++ b/tool/resources/org/antlr/v4/tool/templates/codegen/Swift/Swift.stg @@ -356,7 +356,7 @@ func getVocabulary() -> Vocabulary { override init(_ input:TokenStream) throws { - RuntimeMetaData.checkVersion("4.9.3", RuntimeMetaData.VERSION) + RuntimeMetaData.checkVersion("4.10", RuntimeMetaData.VERSION) try super.init(input) _interp = ParserATNSimulator(self,._ATN,._decisionToDFA, ._sharedContextCache) }