Language - (Grammar|Production) Rule
Table of Contents
About
Recursive rules (known as production):
- are essential for describing the syntax of programming languages, and are a part of every compiler.
- play an important role in describing the syntax of natural languages (machine translation and natural-language processing)
Each production rule references others and thus makes up the grammar of the language.
Each rule is either matched or not so every rule expression is a boolean expression:
- True means some part of an input sequence is matched,
- False means nothing is matched even if some part of the input was matched.
Syntax
See rule expression
Production are rules for replacing (or rewriting) nonterminal symbols (on the left side of the production) in a string with other nonterminal or terminal symbols (on the right side of the production).
Type
Parsing Steps:
- Antlr - Parser Rule: Then, the parser creates an AST from the created tokens with the definition of parser rule.