antlr/doc/index.md

73 lines
3.5 KiB
Markdown
Raw Normal View History

2015-10-28 08:12:01 +08:00
# ANTLR 4 Documentation
2015-10-28 08:36:22 +08:00
Please check [Frequently asked questions (FAQ)](faq/index.md) before asking questions on stackoverflow or antlr-discussion list.
2015-10-28 08:12:01 +08:00
2015-10-28 08:36:22 +08:00
Notes:
<ul>
2015-11-27 03:04:58 +08:00
<li>To add to or improve this documentation, <a href=https://help.github.com/articles/fork-a-repo>fork</a> the <a href=https://github.com/antlr/antlr4>antlr/antlr4 repo</a> then update this `doc/index.md` or file(s) in that directory. Submit a <a href=https://help.github.com/articles/creating-a-pull-request>pull request</a> to get your changes incorporated into the main repository. Do not mix code and documentation updates in the sample pull request. <b>You must sign the contributors.txt certificate of origin with your pull request if you've not done so before.</b></li>
2015-10-28 08:12:01 +08:00
2015-10-29 08:24:15 +08:00
<li>Copyright © 2012, The Pragmatic Bookshelf. Pragmatic Bookshelf grants a nonexclusive, irrevocable, royalty-free, worldwide license to reproduce, distribute, prepare derivative works, and otherwise use this contribution as part of the ANTLR project and associated documentation.</li>
2015-10-28 08:36:22 +08:00
2015-11-01 05:34:00 +08:00
<li>This text was copied with permission from the <a href=http://pragprog.com/book/tpantlr2/the-definitive-antlr-4-reference>The Definitive ANTLR 4 Reference</a>, though it is being morphed over time as the tool changes.</li>
2015-10-28 08:36:22 +08:00
</ul>
Links in the documentation refer to various sections of the book but have been redirected to the general book page on the publisher's site. There are two excerpts on the publisher's website that might be useful to you without having to purchase the book: [Let's get Meta](http://media.pragprog.com/titles/tpantlr2/picture.pdf) and [Building a Translator with a Listener](http://media.pragprog.com/titles/tpantlr2/listener.pdf). You should also consider reading the following books (the vid describes the reference book):
2015-10-28 08:12:01 +08:00
2015-10-28 08:19:06 +08:00
<a href=""><img src=images/tpantlr2.png width=120></a>
<a href=""><img src=images/tpdsl.png width=120></a>
<a href="https://www.youtube.com/watch?v=OAoA3E-cyug"><img src=images/teronbook.png width=250></a>
2015-10-28 08:12:01 +08:00
This documentation is a reference and summarizes grammar syntax and the key semantics of ANTLR grammars. The source code for all examples in the book, not just this chapter, are free at the publisher's website. The following video is a general tour of ANTLR 4 and includes a description of how to use parse tree listeners to process Java files easily:
2015-10-28 08:19:06 +08:00
<a href="https://vimeo.com/59285751"><img src=images/tertalk.png width=200></a>
2015-10-28 08:12:01 +08:00
## Sections
2015-10-28 08:36:22 +08:00
* [Getting Started with ANTLR v4](getting-started.md)
2015-10-28 08:19:06 +08:00
2015-10-29 08:24:15 +08:00
* [Grammar Lexicon](lexicon.md)
2015-10-28 08:19:06 +08:00
2015-10-29 08:43:18 +08:00
* [Grammar Structure](grammars.md)
2015-10-28 08:19:06 +08:00
2015-11-01 05:30:36 +08:00
* [Parser Rules](parser-rules.md)
2015-10-28 08:19:06 +08:00
2015-11-01 08:31:25 +08:00
* [Left-recursive rules](left-recursion.md)
2015-10-28 08:19:06 +08:00
2015-11-01 08:31:25 +08:00
* [Actions and Attributes](actions.md)
2015-10-28 08:19:06 +08:00
2015-11-05 08:51:42 +08:00
* [Lexer Rules](lexer-rules.md)
2015-10-28 08:19:06 +08:00
2015-11-05 09:22:26 +08:00
* [Wildcard Operator and Nongreedy Subrules](wildcard.md)
2015-10-28 08:19:06 +08:00
2015-11-16 09:47:49 +08:00
* [Parse Tree Listeners](listeners.md)
2015-10-28 08:19:06 +08:00
2015-11-16 09:47:49 +08:00
* [Parse Tree Matching and XPath](tree-matching.md)
2015-10-28 08:19:06 +08:00
2015-11-16 09:47:49 +08:00
* [Semantic Predicates](predicates.md)
2015-10-28 08:19:06 +08:00
2015-11-20 04:47:28 +08:00
* [Options](options.md)
2015-10-28 08:19:06 +08:00
2015-11-20 04:47:28 +08:00
* [ANTLR Tool Command Line Options](tool-options.md)
2015-10-28 08:19:06 +08:00
2015-11-23 01:25:41 +08:00
* [Runtime Libraries and Code Generation Targets](targets.md)
2015-10-28 08:19:06 +08:00
2017-03-31 00:49:45 +08:00
* [Unicode U+FFFF, U+10FFFF character streams](unicode.md)
* [Parsing binary streams](parsing-binary-files.md)
2015-11-24 07:57:58 +08:00
* [Parser and lexer interpreters](interpreters.md)
2015-10-28 08:19:06 +08:00
2015-11-24 08:06:04 +08:00
* [Resources](resources.md)
2015-10-29 08:06:40 +08:00
# Building / releasing ANTLR itself
* [Building ANTLR itself](building-antlr.md)
2015-10-29 07:03:49 +08:00
* [Contributing to ANTLR](/CONTRIBUTING.md)
2017-01-25 02:08:09 +08:00
2015-10-29 07:03:49 +08:00
* [Cutting an ANTLR Release](releasing-antlr.md)
2015-10-29 08:06:40 +08:00
* [ANTLR project unit tests](antlr-project-testing.md)
2015-11-20 07:59:04 +08:00
* [Creating an ANTLR Language Target](creating-a-language-target.md)