Grammar-parser-disambiguating-restrictions
Restrictions on parse trees that correspond to
how the parser of ABNF grammars resolves the rulelist ambiguity.
As explained in the documentation of the grammar parser implementation, the rulelist ambiguity is naturally resolved
by having parse-*cwsp parse as many c-wsps as possible,
like the other parse-*... parsing functions.
This means that the parser generates only parse trees
whose (*c-wsp c-nl) subtrees of rulelist trees
do not start with WSPs,
because such WSPs always go
under the immediately preceding rule or (*c-wsp c-nl)
during parsing;
except that if the rulelist starts with a (*c-wsp c-nl),
that subtree may start with WSP,
since there is no preceding rule or (*c-wsp c-nl).
The following predicates capture these restrictions.
They characterize the parse trees generated by the parser.
The completeness of the parser is, necessarily,
proved relatively to these restrictions.
Subtopics
- Tree-rule-/-*cwsp-cnl-restriction-p
- Restrictions on the (non-starting) ( rule / (*c-wsp c-nl) ) trees
generated by the parser.
- Tree-*cwsp-cnl-restriction-p
- Restrictions on the (non-starting) (*c-wsp c-nl) trees
generated by the parser.
- Tree-list-*-rule-/-*cwsp-cnl-restriction-p
- Restrictions on the *( rule / (*c-wsp c-nl) ) tree lists
generated by the parser,
after the starting ( rule / (*c-wsp c-nl) ).
- Tree-cwsp-restriction-p
- Restrictions on the first c-wsp subtrees
of the (non-starting) (*c-wsp c-nl) trees
generated by the parser.
- Tree-rulelist-restriction-p
- Restrictions on the rulelist trees generated by the parser.