Skip to content

Commit

Permalink
Merge dev into master for 4.13.1
Browse files Browse the repository at this point in the history
  • Loading branch information
parrt committed Sep 4, 2023
2 parents 73b0dba + 1a96b1c commit a658835
Show file tree
Hide file tree
Showing 163 changed files with 954 additions and 14,201 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ jobs:
javascript,
typescript,
php,
python2,
python3,
# swift,
]
Expand Down Expand Up @@ -233,13 +232,6 @@ jobs:
if: startswith(matrix.os, 'windows') && (matrix.target == 'cpp')
uses: microsoft/setup-msbuild@v1.1

- name: Set up Python 2
if: matrix.target == 'python2'
uses: actions/setup-python@v4
with:
python-version: '2.x'
architecture: 'x64'

- name: Set up Python 3
if: matrix.target == 'python3'
uses: actions/setup-python@v4
Expand All @@ -257,7 +249,7 @@ jobs:
if: matrix.target == 'csharp'
uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: '6.0.x'
dotnet-version: '7.0.x'

- name: Setup Dart 2.12.1
if: matrix.target == 'dart'
Expand Down Expand Up @@ -316,7 +308,6 @@ jobs:
cd runtime-testsuite
switch ("${{ matrix.target }}")
{
python2 { mvn -X '-Dantlr-python2-exec="${{ env.pythonLocation }}\python.exe"' '-Dtest=python2.**' test }
python3 { mvn -X '-Dantlr-python3-exec="${{ env.pythonLocation }}\python.exe"' '-Dtest=python3.**' test }
default { mvn -X '-Dtest=${{ matrix.target }}.**' test }
}
Expand All @@ -331,7 +322,6 @@ jobs:
cd runtime-testsuite
case ${{ matrix.target }} in
python2) mvn -X '-Dantlr-python2-exec=${{ env.pythonLocation }}/bin/python' '-Dtest=python2.**' test ;;
python3) mvn -X '-Dantlr-python3-exec=${{ env.pythonLocation }}/bin/python' '-Dtest=python3.**' test ;;
*) mvn -X '-Dtest=${{ matrix.target }}.**' test ;;
esac
Expand Down
4 changes: 4 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ let package = Package(
name: "Antlr4Static",
type: .static,
targets: ["Antlr4"]),
.library(
name: "Antlr4Dynamic",
type: .dynamic,
targets: ["Antlr4"]),
],
targets: [
.target(
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@

## Versioning

ANTLR 4 supports 10 target languages, and ensuring consistency across these targets is a unique and highly valuable feature.
ANTLR 4 supports 10 target languages
(Cpp, CSharp, Dart, Java, JavaScript, PHP, Python3, Swift, TypeScript),
and ensuring consistency across these targets is a unique and highly valuable feature.
To ensure proper support of this feature, each release of ANTLR is a complete release of the tool and the 10 runtimes, all with the same version.
As such, ANTLR versioning does not strictly follow semver semantics:

Expand Down Expand Up @@ -75,7 +77,12 @@ ANTLR project lead and supreme dictator for life
* [Official site](http://www.antlr.org/)
* [Documentation](https://github.com/antlr/antlr4/blob/master/doc/index.md)
* [FAQ](https://github.com/antlr/antlr4/blob/master/doc/faq/index.md)
* [ANTLR code generation targets](https://github.com/antlr/antlr4/blob/master/doc/targets.md)<br>(Currently: Java, C#, Python2|3, JavaScript, Go, C++, Swift, Dart, PHP)
* [ANTLR code generation targets](https://github.com/antlr/antlr4/blob/master/doc/targets.md)<br>(Currently: Java, C#, Python3, JavaScript, Go, C++, Swift, Dart, PHP)
* _Note: As of version 4.14, we are dropping support for Python 2. We love the Python
community, but Python 2 support was officially halted in Jan 2020. More recently,
GiHub also dropped support for Python 2, which has made it impossible for us to
maintain a consistent level of quality across targets (we use GitHub for our CI).
Long live Python 3!_
* [Java API](http://www.antlr.org/api/Java/index.html)
* [ANTLR v3](http://www.antlr3.org/)
* [v3 to v4 Migration, differences](https://github.com/antlr/antlr4/blob/master/doc/faq/general.md)
Expand Down
2 changes: 1 addition & 1 deletion doc/IDEs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Integrating ANTLR into Development Systems

The Java target is the reference implementation mirrored by other targets. The following pages help you integrate ANTLR into development environments and build systems appropriate for your target language. As of December 2016, we have Java, C#, Python 2, Python 3, JavaScript, Go, C++, and Swift targets.
The Java target is the reference implementation mirrored by other targets. The following pages help you integrate ANTLR into development environments and build systems appropriate for your target language. As of December 2016, we have Java, C#, Python 3, JavaScript, Go, C++, and Swift targets.

The easiest thing is probably just to use an [ANTLR plug-in](http://www.antlr.org/tools.html) for your favorite development environment.
1 change: 0 additions & 1 deletion doc/antlr-project-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ In order to perform the tests on all target languages, the following tools shoul

* dotnet
* Node.js
* Python 2
* Python 3
* Go
* Swift
Expand Down
1 change: 0 additions & 1 deletion doc/csharp-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public void MyParseMethod() {
ITokenSource lexer = new MyGrammarLexer(stream);
ITokenStream tokens = new CommonTokenStream(lexer);
MyGrammarParser parser = new MyGrammarParser(tokens);
parser.BuildParseTree = true;
IParseTree tree = parser.StartRule();
}
```
Expand Down
1 change: 0 additions & 1 deletion doc/dart-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ void main(List<String> args) async {
final tokens = CommonTokenStream(lexer);
final parser = JSONParser(tokens);
parser.addErrorListener(DiagnosticErrorListener());
parser.buildParseTree = true;
final tree = parser.json();
ParseTreeWalker.DEFAULT.walk(TreeShapeListener(), tree);
}
Expand Down
2 changes: 1 addition & 1 deletion doc/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ On Windows, the `pip` command doesn't just work---you need to add the `...\local

1. Go to the Microsoft Store
2. Search in Microsoft Store for Python
3. Select the newest version of Python (3.10).
3. Select the newest version of Python (3.11).
4. Click the "Get" button. Store installs python and pip at "c:\Users...\AppData\Local\Microsoft\WindowsApps\python.exe" and "c:\Users...\AppData\Local\Microsoft\WindowsApps\pip.exe", respectively. And, it updates the search path immediately with the install.
5. Open a "cmd" terminal.
6. You can now type "python" and "pip", and "pip install antlr4-tools". 7. Unfortunately, it does not add that to the search path.
Expand Down
1 change: 0 additions & 1 deletion doc/go-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ func main() {
stream := antlr.NewCommonTokenStream(lexer,0)
p := parser.NewJSONParser(stream)
p.AddErrorListener(antlr.NewDiagnosticErrorListener(true))
p.BuildParseTrees = true
tree := p.Json()
antlr.ParseTreeWalkerDefault.Walk(NewTreeShapeListener(), tree)
}
Expand Down
2 changes: 2 additions & 0 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ For those using Java, here's a great [set of ANTLR in Intellij notes](https://do

* [Parser and lexer interpreters](interpreters.md)

* [Writing target-agnostic grammars](target-agnostic-grammars.md)

* [Resources](resources.md)

# Building / releasing ANTLR itself
Expand Down
2 changes: 0 additions & 2 deletions doc/javascript-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ const chars = new antlr4.InputStream(input);
const lexer = new MyGrammarLexer(chars);
const tokens = new antlr4.CommonTokenStream(lexer);
const parser = new MyGrammarParser(tokens);
parser.buildParseTrees = true;
const tree = parser.MyStartRule();
```

Expand Down Expand Up @@ -132,7 +131,6 @@ const chars = new antlr4.InputStream(input);
const lexer = new MyGrammarLexer(chars);
const tokens = new antlr4.CommonTokenStream(lexer);
const parser = new MyGrammarParser(tokens);
parser.buildParseTrees = true;
const tree = parser.MyQuery();

class Visitor {
Expand Down
1 change: 0 additions & 1 deletion doc/php-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ $lexer = new JSONLexer($input);
$tokens = new CommonTokenStream($lexer);
$parser = new JSONParser($tokens);
$parser->addErrorListener(new DiagnosticErrorListener());
$parser->setBuildParseTree(true);
$tree = $parser->json();

ParseTreeWalker::default()->walk(new TreeShapeListener(), $tree);
Expand Down
Loading

0 comments on commit a658835

Please sign in to comment.