Closed zp-zpanda closed 3 weeks ago
Some RFCs such as RFC 5322 (Internet Message Format) allow infinite repetition in their ABNF:
(RFC 5322 3.2.5 Miscellaneous Tokens) ... unstructured = (*([FWS] VCHAR) *WSP) / obs-unstruct ... (RFC 5322 4.1 Miscellaneous Obsolete Tokens) obs-unstruct = *((*LF *CR *(obs-utext *LF *CR)) / FWS) ... (And many more)
I have tried using node-abnf to generate a full Peggy tree from the ABNF, but of course Peggy errors. Is there any method to mitigate that?
Related: #357, #367
First, see errata 1905. Making that change in the ABNF yields a Peggy grammar that compiles.
Then, check the other errata for a few more grammar changes.
In general, these sorts of errors often mean there's something wrong with the starting assumptions, so there isn't a mechanical fix for them.
I see... I will try again after incorporating those errata. Thank you so much!
I'm closing this, but please re-open it if you still have trouble.
Some RFCs such as RFC 5322 (Internet Message Format) allow infinite repetition in their ABNF:
I have tried using node-abnf to generate a full Peggy tree from the ABNF, but of course Peggy errors. Is there any method to mitigate that?
Related: #357, #367