ANTLR 4.6 now generates parsers in Swift

Dear Swift-users! Just a quick note that I finally got the Swift code generation target for the ANTLR 4 parser generator integrated and released! You can see the release notes here:

To get Swift ANTLR runtime, clone the ANTLR repository.[2] Open it in finder. From the root directory of the repo, go to runtime/Swift folder. You will see the Xcode project manifest file: Antlr4.xcodeproj. Drag it into your project. See Swift target notes[2] for more info.

You also need to download the tool itself (which is still in java) here:

http://www.antlr.org/download.html

Or, if use Jetbrain’s AppCode, you can use the ANTLR 4 plugin:

Enjoy!
Terence Parr
The ANTLR guy

[1] GitHub - antlr/antlr4: ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
[2] https://github.com/antlr/antlr4/blob/master/doc/swift-target.md

6 Likes

Awesome!

···

On Dec 15, 2016, at 22:11 , Terence Parr via swift-users <swift-users@swift.org> wrote:

Dear Swift-users! Just a quick note that I finally got the Swift code generation target for the ANTLR 4 parser generator integrated and released! You can see the release notes here:

Release 4.6 · antlr/antlr4 · GitHub

To get Swift ANTLR runtime, clone the ANTLR repository.[2] Open it in finder. From the root directory of the repo, go to runtime/Swift folder. You will see the Xcode project manifest file: Antlr4.xcodeproj. Drag it into your project. See Swift target notes[2] for more info.

You also need to download the tool itself (which is still in java) here:

Download ANTLR

Or, if use Jetbrain’s AppCode, you can use the ANTLR 4 plugin:

<Cy9bVsQWQAAxT1J.jpeg>

Enjoy!
Terence Parr
The ANTLR guy

[1] GitHub - antlr/antlr4: ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
[2] https://github.com/antlr/antlr4/blob/master/doc/swift-target.md

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

--
Rick Mann
rmann@latencyzero.com

I was waiting for 3 years. Thank you!

Yes, thanks. In the last month I've used an Antlr lexer+parser to
replace a hand-coded lexer and parser in a symbolic calculator. It is
much, much easier to extend and maintain the Antlr version.

Dave