antlr/doc/faq/index.md

1.3 KiB

Frequently-Asked Questions (FAQ)

Getting Started

Installation

General

Grammar syntax

Lexical analysis

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?