Next: Listing Earley sets, Previous: Listing symbols, Up: Tracing and diagnosing parses [Contents][Index]
The parse diagnostics should include a facility for displaying
the rules in a grammar.
The rules will have IDs from 0 to the highest rule ID,
which can be found using the
marpa_g_highest_rule_id()
method
(see marpa_g_highest_rule_id).
It is up to the application whether to have names for rules.
In some grammar generators,
the LHS of a rule serves as its name,
but does not produce unique names for each rule in Libmarpa,
since many rules may have the same LHS.
Currently the most used upper layer for Libmarpa,
Marpa::R2
, does not have rule names.
An application that does want to name its rules must
decide on a rule naming convention.
At the highest verbosity level, the rule listing facility should display
Next: Listing Earley sets, Previous: Listing symbols, Up: Tracing and diagnosing parses [Contents][Index]