PEGTL offers an analyze utility that can detect some errors in grammars. It requires a hint about how a grammar matches against its input via analyze_t. Rules that consume input that it matches against are classified as "any" rules.
This change updates the XidStart and XidContinue rules defined in the path parser and adds a call to analyze() in testSdfPathParser. analyze() returns 0, if there are no errors. Updating the path grammar will allow the forthcoming PEGTL parser #3005 to similarly validate against analyze().
Fixes Issue(s)
-
[ ] I have verified that all unit tests pass with the proposed changes
[x] I have submitted a signed Contributor License Agreement
Description of Change(s)
PEGTL offers an
analyze
utility that can detect some errors in grammars. It requires a hint about how a grammar matches against its input viaanalyze_t
. Rules that consume input that it matches against are classified as "any" rules.This change updates the
XidStart
andXidContinue
rules defined in the path parser and adds a call toanalyze()
intestSdfPathParser
.analyze()
returns 0, if there are no errors. Updating the path grammar will allow the forthcoming PEGTL parser #3005 to similarly validate againstanalyze()
.Fixes Issue(s)
-