Perhaps abnf_to_pest could check for such a condition, then output an empty property value as described in "A thoughtful introduction to the pest parser" under Writing the grammar:
Section names and property keys must not be empty, but property values may be empty (as in the line ip= above).
Edit: Realised that the above refers to the sample INI format being parsed in that example, not the grammar of Pest itself. I guess support for 0-repetitions will be required in Pest?
Some ABNF rules, such as the
path-empty
rule defined in RFC3896§3.3, resolve to the empty string via repetitions of exactly0
occurrences:Alas, repetitions of exactly
0
occurrences are (currently) invalid in pest.Perhapsabnf_to_pest
could check for such a condition, then output an empty property value as described in "A thoughtful introduction to the pest parser" under Writing the grammar:Edit: Realised that the above refers to the sample INI format being parsed in that example, not the grammar of Pest itself. I guess support for 0-repetitions will be required in Pest?