antlr/doc/targets.md

24 lines
1.6 KiB
Markdown
Raw Normal View History

2015-11-23 01:25:41 +08:00
# Runtime Libraries and Code Generation Targets
This page lists the available and upcoming ANTLR runtimes. Please note that you won't find here language specific code generators. This is because there is only one tool, written in Java, which is able to generate lexer and parser code for all targets, through command line options. The tool can be invoked from the command line, or any integration plugin to popular IDEs and build systems: Eclipse, IntelliJ, Visual Studio, Maven. So whatever your environment and target is, you should be able to run the tool and produce the code in the targeted language. As of writing, the available targets are the following:
2015-11-24 07:57:58 +08:00
* [Java](java-target.md)<br>
2015-11-23 01:25:41 +08:00
The [ANTLR v4 book](http://pragprog.com/book/tpantlr2/the-definitive-antlr-4-reference) has a decent summary of the runtime library. We have added a useful XPath feature since the book was printed that lets you select bits of parse trees.
<br>[Runtime API](http://www.antlr.org/api/Java/index.html)
<br>See [Getting Started with ANTLR v4](getting-started.md)
* [C#](csharp-target.md)
* [Python](python-target.md) (2 and 3)
* [JavaScript](javascript-target.md)
* Swift (not yet available)
* C++ (not yet available)
## Target feature parity
New features generally appear in the Java target and then migrate to the other targets, but these other targets don't always get updated in the same overall tool release. This section tries to identify features added to Java that have not been added to the other targets.
|Feature|Java|C&sharp;|JavaScript|Python2|Python3|Swift|C++|
|---|---|---|---|---|---|---|---|
2015-11-23 01:25:41 +08:00
|Ambiguous tree construction|4.5.1|-|-|-|-|-|-|