# RFC Errata

### RFC 5234, "Augmented BNF for Syntax Specifications: ABNF", January 2008

Source of RFC: IETF - NON WORKING GROUPArea Assignment: app

Errata ID: 2968

**Status: Verified
Type: Technical
**

Reported By: Daniel van Vugt

Date Reported: 2011-09-12

Verifier Name: Pete Resnick

Date Verified: 2013-01-28

Section 4 says:

elements = alternation *c-wsp

It should say:

elements = alternation *WSP

Notes:

The grammar in section 4 of RFC 5234 is ambiguous. This was discovered by my own parsing code when trying to parse the ABNF grammar with itself. The ambiguity can be seen in a simplified form using the following 10 characters of input:

Input: X = Y \r \n ; Z \r \n

Offset: 0 1 2 3 4 5 6 7 8 9

My parser finds these two (ambiguous) solutions...

SOLUTION 1:

rulelist @ 0 len 10

rule @ 0 len 10

rulename @ 0 len 1 "X"

ALPHA @ 0 len 1

star_c_wsp @ 1 len 0

defined_as @ 1 len 1

star_c_wsp @ 2 len 0

elements @ 2 len 4

alternation @ 2 len 1

concatenation @ 2 len 1

repetition @ 2 len 1

element @ 2 len 1

rulename @ 2 len 1 "Y"

ALPHA @ 2 len 1

star_c_wsp @ 3 len 3

c_wsp @ 3 len 3

c_nl @ 3 len 2

CRLF @ 3 len 2

CR @ 3 len 1

LF @ 4 len 1

WSP @ 5 len 1

SP @ 5 len 1

c_nl @ 6 len 4

comment @ 6 len 4 ";Z

"

WSP_or_VCHAR @ 7 len 1

VCHAR @ 7 len 1

CRLF @ 8 len 2

CR @ 8 len 1

LF @ 9 len 1

SOLUTION 2:

rulelist @ 0 len 10

rule @ 0 len 5

rulename @ 0 len 1 "X"

ALPHA @ 0 len 1

star_c_wsp @ 1 len 0

defined_as @ 1 len 1

star_c_wsp @ 2 len 0

elements @ 2 len 1

alternation @ 2 len 1

concatenation @ 2 len 1

repetition @ 2 len 1

element @ 2 len 1

rulename @ 2 len 1 "Y"

ALPHA @ 2 len 1

star_c_wsp @ 3 len 0

c_nl @ 3 len 2

CRLF @ 3 len 2

CR @ 3 len 1

LF @ 4 len 1

star_c_wsp @ 5 len 1

c_wsp @ 5 len 1

WSP @ 5 len 1

SP @ 5 len 1

c_nl @ 6 len 4

comment @ 6 len 4 ";Z

"

WSP_or_VCHAR @ 7 len 1

VCHAR @ 7 len 1

CRLF @ 8 len 2

CR @ 8 len 1

LF @ 9 len 1

The solution to this ambiguity is to change:

elements = alternation *c-wsp

to:

elements = alternation *WSP

--VERIFIER NOTES--

The current document is clearly incorrect. However, though the solution appears correct, it has not been tested.