2015-10-26 06:09:29 +08:00
# Frequently-Asked Questions (FAQ)
2015-10-26 05:04:14 +08:00
2015-10-28 01:44:23 +08:00
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.
2015-10-28 08:36:22 +08:00
*To add to or improve this FAQ, [fork ](https://help.github.com/articles/fork-a-repo/ ) the [antlr/antlr4 repo ](https://github.com/antlr/antlr4 ) then update this `doc/faq/index.md` or file(s) in that directory. Submit a [pull request ](https://help.github.com/articles/creating-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.**
2015-10-28 01:44:23 +08:00
2015-10-26 05:04:14 +08:00
## Getting Started
2015-10-26 06:09:29 +08:00
* [How to I install and run a simple grammar? ](getting-started.md )
* [Why does my parser test program hang? ](getting-started.md )
2015-10-26 05:04:14 +08:00
## Installation
2015-10-26 06:23:01 +08:00
* [Why can't ANTLR (grun) find my lexer or parser? ](installation.md )
* [Why can't I run the ANTLR tool? ](installation.md )
* [Why doesn't my parser compile? ](installation.md )
2015-10-26 05:04:14 +08:00
## General
2015-10-26 06:23:01 +08:00
* [Why do we need ANTLR v4? ](general.md )
* [What is the difference between ANTLR 3 and 4? ](general.md )
* [Why is my expression parser slow? ](general.md )
2015-10-26 05:04:14 +08:00
## Grammar syntax
## Lexical analysis
2015-10-26 06:32:37 +08:00
* [How can I parse non-ASCII text and use characters in token rules? ](lexical.md )
* [How do I replace escape characters in string tokens? ](lexical.md )
* [Why are my keywords treated as identifiers? ](lexical.md )
* [Why are there no whitespace tokens in the token stream? ](lexical.md )
2015-10-26 05:04:14 +08:00
## Parse Trees
2015-10-28 01:44:23 +08:00
* [How do I get the input text for a parse-tree subtree? ](parse-trees.md )
* [What if I need ASTs not parse trees for a compiler, for example? ](parse-trees.md )
* [When do I use listener/visitor vs XPath vs Tree pattern matching? ](parse-trees.md )
2015-10-26 05:04:14 +08:00
## Translation
2015-10-28 01:44:23 +08:00
* [ASTs vs parse trees ](parse-trees.md )
* [Decoupling input walking from output generation ](parse-trees.md )
2015-10-26 05:04:14 +08:00
## Actions and semantic predicates
2015-10-28 01:44:23 +08:00
* [How do I test if an optional rule was matched? ](actions-preds.md )
2015-10-26 05:04:14 +08:00
## Error handling
2015-10-28 01:44:23 +08:00
* [How do I perform semantic checking with ANTLR? ](error-handling.md )