2.1 KiB
2.1 KiB
Frequently-Asked Questions (FAQ)
This is the main landing page for the ANTLR 4 FAQ. The links below will take you to the appropriate file containing all answers for that subcategory.
To add to or improve this FAQ, fork the antlr/antlr4 repo then update this doc/faq/index.md
or file(s) in that directory. Submit a pull request to get your changes incorporated into the main repository. Do not mix code and FAQ updates in the sample pull request. You must sign the contributors.txt certificate of origin with your pull request if you've not done so before.
Getting Started
Installation
- Why can't ANTLR (grun) find my lexer or parser?
- Why can't I run the ANTLR tool?
- Why doesn't my parser compile?
General
- Why do we need ANTLR v4?
- What is the difference between ANTLR 3 and 4?
- Why is my expression parser slow?
Grammar syntax
Lexical analysis
- How can I parse non-ASCII text and use characters in token rules?
- How do I replace escape characters in string tokens?
- Why are my keywords treated as identifiers?
- Why are there no whitespace tokens in the token stream?
Parse Trees
- How do I get the input text for a parse-tree subtree?
- What if I need ASTs not parse trees for a compiler, for example?
- When do I use listener/visitor vs XPath vs Tree pattern matching?