[Tools-discuss] Bug in the Perl ABNF parser?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tools-discuss] Bug in the Perl ABNF parser?



[Is the Perl ABNF still parser still maintained? The email address in
the source bounces. If it is not maintained any more, wouldn't it be a
good idea to indicate it on the Web page at tools.ietf.org?]

The attached grammar, extracted from draft-ietf-imapext-sort-18.txt
seems perfectly legal (and is accepted by all the other tools) but
make the Perl parser protest:

...
Rule: subj-trailer    = "(fwd)" / WSP
Rule: subj-base       = NONWSP *(*WSP NONWSP)
                     ; can be a subj-blob
Not OK
Syntax error: BLOBCHAR        = %x01-5a<*> / %x5c / 

sort            = ["UID" SP] "SORT" SP sort-criteria SP search-criteria

sort-criteria   = "(" sort-criterion *(SP sort-criterion) ")"

sort-criterion  = ["REVERSE" SP] sort-key

sort-key        = "ARRIVAL" / "CC" / "DATE" / "FROM" / "SIZE" /
                   "SUBJECT" / "TO"

thread          = ["UID" SP] "THREAD" SP thread-alg SP search-criteria

thread-alg      = "ORDEREDSUBJECT" / "REFERENCES" / thread-alg-ext

thread-alg-ext  = atom
                     ; New algorithms MUST be registered with IANA

search-criteria = charset 1*(SP search-key)

charset         = atom / quoted
                     ; CHARSET values MUST be registered with IANA

sort-data       = "SORT" *(SP nz-number)

thread-data     = "THREAD" [SP 1*thread-list]

thread-list     = "(" (thread-members / thread-nested) ")"

thread-members  = nz-number *(SP nz-number) [SP thread-nested]

thread-nested   = 2*thread-list



subject         = *subj-leader [subj-middle] *subj-trailer

subj-refwd      = ("re" / ("fw" ["d"])) *WSP [subj-blob] ":"

subj-blob       = "[" *BLOBCHAR "]" *WSP

subj-fwd        = subj-fwd-hdr subject subj-fwd-trl

subj-fwd-hdr    = "[fwd:"

subj-fwd-trl    = "]"

subj-leader     = (*subj-blob subj-refwd) / WSP

subj-middle     = *subj-blob (subj-base / subj-fwd)
                     ; last subj-blob is subj-base if subj-base would
                     ; otherwise be empty

subj-trailer    = "(fwd)" / WSP

subj-base       = NONWSP *(*WSP NONWSP)
                     ; can be a subj-blob

BLOBCHAR        = %x01-5a / %x5c / %x5e-ff
                     ; any CHAR8 except '[' and ']'

NONWSP          = %x01-08 / %x0a-1f / %x21-ff
                     ; any CHAR8 other than WSP


_______________________________________________
Tools-discuss mailing list
Tools-discuss at ietf.org
https://www1.ietf.org/mailman/listinfo/tools-discuss

Note: Messages sent to this list are the opinions of the senders and do not imply endorsement by the IETF.