Update to version num 4.9 in code / projects

This commit is contained in:
parrt 2020-11-24 11:42:42 -08:00
parent e07a6fa778
commit d27e6cad09
42 changed files with 47 additions and 45 deletions

View File

@ -57,6 +57,7 @@ Edit the repository looking for 4.5 or whatever and update it. Bump version in t
* runtime/Python3/src/antlr4/Recognizer.py
* runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Properties/AssemblyInfo.cs
* runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.dotnet.csproj
* runtime/PHP/src/RuntimeMetaData.php
* runtime/JavaScript/package.json
* runtime/JavaScript/src/antlr4/Recognizer.js
* runtime/Cpp/VERSION

View File

@ -43,7 +43,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.8.jar -Dlanguage=CSharp grammar.g4``
At minimal, the cmd line should look as follows: ``java -jar antlr4-4.9.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.

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Company>The ANTLR Organization</Company>
<Version>4.8</Version>
<Version>4.9</Version>
<NeutralLanguage>en-US</NeutralLanguage>
<TargetFrameworks>netstandard1.3;net35</TargetFrameworks>
<NoWarn>$(NoWarn);CS1591;CS1574;CS1580</NoWarn>

View File

@ -42,8 +42,8 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4.8")]
[assembly: AssemblyVersion("4.9")]
#if !COMPACT
[assembly: AssemblyFileVersion("4.8")]
[assembly: AssemblyInformationalVersion("4.8")]
[assembly: AssemblyFileVersion("4.9")]
[assembly: AssemblyInformationalVersion("4.9")]
#endif

View File

@ -24,7 +24,7 @@ using Antlr4.Runtime.Atn;
using Antlr4.Runtime.Misc;
using DFA = Antlr4.Runtime.Dfa.DFA;
[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.8")]
[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.9")]
[System.CLSCompliant(false)]
public partial class XPathLexer : Lexer
{

View File

@ -1 +1 @@
4.8
4.9

View File

@ -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.8-complete.jar)
set(ANTLR4_JAR_LOCATION ${PROJECT_SOURCE_DIR}/thirdparty/antlr/antlr-4.9-complete.jar)
# generate lexer
antlr4_generate(

View File

@ -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.8.dll)
${ANTLR4_OUTPUT_DIR}/cygantlr4-runtime-4.9.dll)
elseif(APPLE)
set(ANTLR4_RUNTIME_LIBRARIES
${ANTLR4_OUTPUT_DIR}/libantlr4-runtime.dylib)

View File

@ -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.8-complete.jar)
NAMES antlr.jar antlr4.jar antlr-4.jar antlr-4.9-complete.jar)
endif()
if(ANTLR_EXECUTABLE AND Java_JAVA_EXECUTABLE)

View File

@ -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.8-complete.jar)
set(ANTLR_EXECUTABLE /home/user/antlr-4.9-complete.jar)
# add macros to generate ANTLR Cpp code from grammar
find_package(ANTLR REQUIRED)

View File

@ -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.8-complete.jar
set LOCATION=antlr-4.9-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

View File

@ -7,7 +7,7 @@
using namespace antlr4;
const std::string RuntimeMetaData::VERSION = "4.8";
const std::string RuntimeMetaData::VERSION = "4.9";
std::string RuntimeMetaData::getRuntimeVersion() {
return VERSION;

View File

@ -1,4 +1,4 @@
## 4.8.0-dev.2
## 4.9.0
* Initial release
* Initial release

View File

@ -66,7 +66,7 @@ class RuntimeMetaData {
/// omitted, the {@code -} (hyphen-minus) appearing before it is also
/// omitted.</li>
/// </ul>
static final String VERSION = '4.8';
static final String VERSION = '4.9';
/// Gets the currently executing version of the ANTLR 4 runtime library.
///

View File

@ -1,5 +1,5 @@
name: "antlr4"
version: "4.8.0-dev.2"
version: "4.9.0"
description: "New Dart runtime for ANTLR4."
homepage: "https://github.com/antlr/antlr4"
license: "BSD-3-Clause"

View File

@ -49,7 +49,7 @@ var tokenTypeMapCache = make(map[string]int)
var ruleIndexMapCache = make(map[string]int)
func (b *BaseRecognizer) checkVersion(toolVersion string) {
runtimeVersion := "4.8"
runtimeVersion := "4.9"
if runtimeVersion != toolVersion {
fmt.Println("ANTLR runtime and generated code versions disagree: " + runtimeVersion + "!=" + toolVersion)
}

View File

@ -67,7 +67,7 @@ public class RuntimeMetaData {
* omitted.</li>
* </ul>
*/
public static final String VERSION = "4.8";
public static final String VERSION = "4.9";
/**
* Gets the currently executing version of the ANTLR 4 runtime library.

View File

@ -1,6 +1,6 @@
{
"name": "antlr4",
"version": "4.8.0",
"version": "4.9.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "antlr4",
"version": "4.8.0",
"version": "4.9.0",
"description": "JavaScript runtime for ANTLR4",
"main": "src/antlr4/index.js",
"repository": "antlr/antlr4.git",

View File

@ -15,7 +15,7 @@ class Recognizer {
}
checkVersion(toolVersion) {
const runtimeVersion = "4.8";
const runtimeVersion = "4.9";
if (runtimeVersion!==toolVersion) {
console.log("ANTLR runtime and generated code versions disagree: "+runtimeVersion+"!="+toolVersion);
}

View File

@ -2,12 +2,12 @@ from setuptools import setup
setup(
name='antlr4-python2-runtime',
version='4.8',
version='4.9',
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.8 runtime for Python 2.7.12'
description='ANTLR 4.9 runtime for Python 2.7.12'
)

View File

@ -30,7 +30,7 @@ class Recognizer(object):
return major, minor
def checkVersion(self, toolVersion):
runtimeVersion = "4.8"
runtimeVersion = "4.9"
rvmajor, rvminor = self.extractVersion(runtimeVersion)
tvmajor, tvminor = self.extractVersion(toolVersion)
if rvmajor!=tvmajor or rvminor!=tvminor:

View File

@ -39,7 +39,7 @@ class TestLexer(Lexer):
def __init__(self, input=None):
super(TestLexer, self).__init__(input)
self.checkVersion("4.8")
self.checkVersion("4.9")
self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
self._actions = None
self._predicates = None

View File

@ -2,7 +2,7 @@ from setuptools import setup
setup(
name='antlr4-python3-runtime',
version='4.8',
version='4.9',
packages=['antlr4', 'antlr4.atn', 'antlr4.dfa', 'antlr4.tree', 'antlr4.error', 'antlr4.xpath'],
package_dir={'': 'src'},
install_requires=[
@ -12,5 +12,5 @@ setup(
license='BSD',
author='Eric Vergnaud, Terence Parr, Sam Harwell',
author_email='eric.vergnaud@wanadoo.fr',
description='ANTLR 4.8 runtime for Python 3.7'
description='ANTLR 4.9 runtime for Python 3.7'
)

View File

@ -33,7 +33,7 @@ class Recognizer(object):
return major, minor
def checkVersion(self, toolVersion):
runtimeVersion = "4.8"
runtimeVersion = "4.9"
rvmajor, rvminor = self.extractVersion(runtimeVersion)
tvmajor, tvminor = self.extractVersion(toolVersion)
if rvmajor!=tvmajor or rvminor!=tvminor:

View File

@ -119,7 +119,7 @@ class XPathLexer(Lexer):
def __init__(self, input=None):
super().__init__(input)
self.checkVersion("4.8")
self.checkVersion("4.9")
self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
self._actions = None
self._predicates = None

View File

@ -86,7 +86,7 @@ class ExprLexer(Lexer):
def __init__(self, input=None, output:TextIO = sys.stdout):
super().__init__(input, output)
self.checkVersion("4.8")
self.checkVersion("4.9")
self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
self._actions = None
self._predicates = None

View File

@ -86,7 +86,7 @@ class ExprParser ( Parser ):
def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
super().__init__(input, output)
self.checkVersion("4.8")
self.checkVersion("4.9")
self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache)
self._predicates = None

View File

@ -39,7 +39,7 @@ class TestLexer(Lexer):
def __init__(self, input=None):
super(TestLexer, self).__init__(input)
self.checkVersion("4.8")
self.checkVersion("4.9")
self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
self._actions = None
self._predicates = None

View File

@ -792,7 +792,7 @@ class CLexer(Lexer):
def __init__(self, input=None):
super().__init__(input)
self.checkVersion("4.8")
self.checkVersion("4.9")
self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
self._actions = None
self._predicates = None

View File

@ -915,7 +915,7 @@ class CParser ( Parser ):
def __init__(self, input:TokenStream):
super().__init__(input)
self.checkVersion("4.8")
self.checkVersion("4.9")
self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache)
self._predicates = None

View File

@ -63,7 +63,7 @@ public class RuntimeMetaData {
/// omitted, the `-` (hyphen-minus) appearing before it is also
/// omitted.
///
public static let VERSION: String = "4.8"
public static let VERSION: String = "4.9"
///
/// Gets the currently executing version of the ANTLR 4 runtime library.

View File

@ -16,6 +16,7 @@ class RuntimeMetaDataTests: XCTestCase {
doGetMajorMinorVersionTest("4.7.1", "4.7")
doGetMajorMinorVersionTest("4.7.2", "4.7")
doGetMajorMinorVersionTest("4.8", "4.8")
doGetMajorMinorVersionTest("4.9", "4.9")
doGetMajorMinorVersionTest("4-SNAPSHOT", "4")
doGetMajorMinorVersionTest("4.-SNAPSHOT", "4.")
doGetMajorMinorVersionTest("4.7-SNAPSHOT", "4.7")

View File

@ -354,7 +354,7 @@ func getVocabulary() -> Vocabulary {
override <accessLevelNotOpen(parser)>
init(_ input:TokenStream) throws {
RuntimeMetaData.checkVersion("4.8", RuntimeMetaData.VERSION)
RuntimeMetaData.checkVersion("4.9", RuntimeMetaData.VERSION)
try super.init(input)
_interp = ParserATNSimulator(self,<p.name>._ATN,<p.name>._decisionToDFA, <parser.name>._sharedContextCache)
}

View File

@ -28,7 +28,7 @@ public class CSharpTarget extends Target {
@Override
public String getVersion() {
return "4.8";
return "4.9";
}
@Override

View File

@ -51,7 +51,7 @@ public class CppTarget extends Target {
}
public String getVersion() {
return "4.8";
return "4.9";
}
public boolean needsHeader() { return true; }

View File

@ -71,7 +71,7 @@ public class GoTarget extends Target {
@Override
public String getVersion() {
return "4.8";
return "4.9";
}
public Set<String> getBadWords() {

View File

@ -51,7 +51,7 @@ public class JavaScriptTarget extends Target {
@Override
public String getVersion() {
return "4.8";
return "4.9";
}
public Set<String> getBadWords() {

View File

@ -54,7 +54,7 @@ public class PHPTarget extends Target {
@Override
public String getVersion() {
return "4.8";
return "4.9";
}
@Override

View File

@ -95,7 +95,7 @@ public class Python2Target extends Target {
@Override
public String getVersion() {
return "4.8";
return "4.9";
}
public Set<String> getBadWords() {

View File

@ -97,7 +97,7 @@ public class Python3Target extends Target {
@Override
public String getVersion() {
return "4.8";
return "4.9";
}
/** Avoid grammar symbols in this set to prevent conflicts in gen'd code. */

View File

@ -87,7 +87,7 @@ public class SwiftTarget extends Target {
@Override
public String getVersion() {
return "4.8"; // Java and tool versions move in lock step
return "4.9"; // Java and tool versions move in lock step
}
public Set<String> getBadWords() {