Closed sliekens closed 9 years ago
Some syntax specifications make use of a special #rule notation that denotes comma-separate lists.
#rule
Example grammar:
digits = #DIGIT at-least-one-digits = 1#DIGIT at-most-ten-digits = #10DIGIT one-to-ten-digits = 1#10DIGIT
Possible matches:
"" "1, 2, 3" "4, 5, 6, 7" "8, 9" "1, 2, 3, 4, 5, 6, 7, 8, 9"
Some specifications take this even further by allowing empty list items, or multiple white spaces.
" " "1,,, 2, 3" "4, 5, , 6, 7 ," "8 , 9" "1, 2,3,4, 5 , 6,, 7, 8 ,,9"
I think support for CSV would be nice to have, even though it is not part of ABNF.
One problem with these CSV rules is that the lower and upper bounds have to be hard-coded. ABNF is just not flexible enough.
Some syntax specifications make use of a special
#rule
notation that denotes comma-separate lists.Example grammar:
Possible matches:
Some specifications take this even further by allowing empty list items, or multiple white spaces.
I think support for CSV would be nice to have, even though it is not part of ABNF.