Nonterminal symbols of a bottom-up template grammar have the forms:
STEM STEM/LENGTH STEM-CONTEXT STEM-CONTEXT/LENGTH
The above forms use the notations listed below.
STEM ¶A stem nonterminal symbol name.
It is a sequence of English letters, digits, and the characters ‘_’ starting with an English letter or ‘_’.
Examples: S, Expr10, COPY__2.
Stem names that begin with ‘_’ are for internal use by QSMM tools.
A source PCFG learned by the adaptive bottom-up parser abu-parser uses stem names as nonterminal symbols.
CONTEXT ¶A context within a stem nonterminal symbol name.
The context is a sequence of English letters, digits, and the characters ‘_’.
The examples of a stem nonterminal symbol name followed by a context are H-15 and CombinedExpr-subgram2.
A stem nonterminal symbol name, its context, and length (see below) make up a nonterminal symbol name used for testing the equality of nonterminal symbols to find matching productions while parsing.
Nonterminal symbols in a source PCFG learned by abu-parser do not include contexts.
For this reason, contexts do not take part in calculating parse probabilities of training parse units.
LENGTH ¶Expected length of a terminal symbol sequence parsed by a nonterminal symbol.
The parser does not check whether actual length of a terminal symbol sequence is equal to its expected length.
The examples of nonterminal symbol length specification are START/12, A-17/9, and BinaryOp-domA/10.
A stem nonterminal symbol name, its context, and length make up a nonterminal symbol name used for testing the equality of nonterminal symbols to find matching productions while parsing.
Nonterminal symbols in a source PCFG learned by abu-parser do not include length specifications.