On Mon March 7 2005 20:00, Bill Fenner wrote:
http://www.ops.ietf.org/abnf/parser.tar.gz
[...]
appears to only
accept at most two characters in %x00.00.00.00 style string and because
you only accept uppercase hex digits in %x constructs.
I believe that implementation also fails to recognize %D, %X, and %B.
[i.e. upper-case letters introducing decimal, hexadecimal, and binary
character literals]
I'll also note that your parser doesn't permit either blank lines
or multi-line prose-vals;
forbin% cat blankline
a = b
c
If the "blank" line contains whitespace, then it is an RFC 2234
continuation line:
c-wsp = WSP / (c-nl WSP)
N.B. the WSP after c-nl. If the "blank" line does not contain WSP,
then it terminates the rule, and indeed the line beginning " c" is
a syntax error:
rule = rulename defined-as elements c-nl
; continues if next line starts
; with white space
c-nl = comment / CRLF
; comment or newline
comment = ";" *(WSP / VCHAR) CRLF
[ignoring the bogus CR requirement].
forbin% ./parser blankline
Rule: a = b
Not OK
Syntax error: c<*>
forbin% cat proseval
proseval = <This is a multi-line prose-val,
which rfc2234 does not permit.>
forbin% ./parser proseval
Not OK
Syntax error: proseval = <This is a multi-line prose-val,
<*>
Note that there is (or was) a published erratum which would make
that legal. As discussed on the rfc-interest mailing list [
consensus appeared to be that that erratum is itself an error].