PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
5.45k stars 1.13k forks source link

Specify `analyze_t` in `Xid` parsing rules #3043

Open nvmkuruc opened 1 month ago

nvmkuruc commented 1 month ago

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 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)

-

jesschimein commented 1 month ago

Filed as internal issue #USD-9553

jesschimein commented 1 month ago

/AzurePipelines run

azure-pipelines[bot] commented 1 month ago
Azure Pipelines successfully started running 1 pipeline(s).
nvmkuruc commented 1 week ago

This works with the old PEGTL implementation, but not the new one. analyze has been moved to contrib/analyze.hpp