From 2e5cbc2e53144505167f986eadc7efda37f9c2de Mon Sep 17 00:00:00 2001 From: Terence Parr Date: Sun, 25 Oct 2015 14:04:14 -0700 Subject: [PATCH] add index of faq --- .gitignore | 1 - doc/faq/index.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 doc/faq/index.md diff --git a/.gitignore b/.gitignore index 94ae7d588..2684429fc 100644 --- a/.gitignore +++ b/.gitignore @@ -45,7 +45,6 @@ nbactions*.xml # Generated files /out/ -/doc/ /gen/ /gen3/ /gen4/ diff --git a/doc/faq/index.md b/doc/faq/index.md new file mode 100644 index 000000000..aa543ba48 --- /dev/null +++ b/doc/faq/index.md @@ -0,0 +1,46 @@ +# Frequently-Asked Questions + +## Getting Started + +* How to I install and run a simple grammar? +* Why does my parser test program hang? + +## 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? + +## Translation + +* ASTs vs parse trees +* Decoupling input walking from output generation + +## Actions and semantic predicates + +* How do I test if an optional rule was matched? + +## Error handling + +* How do I perform semantic checking with ANTLR?