Hello, while diving in edge cases of ABNF grammars, I realized there are cases where bapdoes not parse valid grammars, such as the following one.
;r ( `ZD/ i
l0-23S ; , % Tb
; Rd i*
=
"!j!!`! !V!SX#!/" ; ] I H z|i
;2 oN,(^
733100338995%B100011110110000;,
;u HAU 5 F$
(
;u# <L WP9WK
; 5R?"cq U
; 8+
; K / Q?7 p -
; iZEwRK# /
*<>) ;
;
;
4225803774834863S;
;
This case, even if seems strange, is completely valid: the defined-as rule in RFC 5234 could produce a c-wsp (the second one, at the end of its definition), which itself could become a comment, producing a whitespace then a CRLF (without an actual comment produced by the repetition of VCHAR). The rule is then concatenated to elements and produce the char-val "a".
Hello, while diving in edge cases of ABNF grammars, I realized there are cases where
bap
does not parse valid grammars, such as the following one.This case, even if seems strange, is completely valid: the
defined-as
rule in RFC 5234 could produce ac-wsp
(the second one, at the end of its definition), which itself could become acomment
, producing a whitespace then aCRLF
(without an actual comment produced by the repetition ofVCHAR
). Therule
is then concatenated toelements
and produce thechar-val
"a".This makes
bap
not RFC-compliant.