Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for the ABNF #rule #73

Open
ulsa opened this issue May 10, 2014 · 2 comments
Open

Support for the ABNF #rule #73

ulsa opened this issue May 10, 2014 · 2 comments
Assignees

Comments

@ulsa
Copy link

ulsa commented May 10, 2014

There seems to be no support for the #rule, as specified in RFC 2616, section 2.1. Is it in the works?

For now I guess I could just make the conversion from, say:

1#element

to:

( *LWS element *( *LWS "," *LWS element ))
@Engelberg
Copy link
Owner

The standard for ABNF is defined here:
http://tools.ietf.org/html/rfc5234
and I don't find any reference to this #rule construct. I think it may be a construct invented for the purpose of the particular specification you referred to. According to the standard,

"In the early days of the Arpanet, each specification contained its own definition of ABNF."

So perhaps that is what is going on here, and RFC 2616 defined the # notation for its own convenience. I've personally never seen it before. Do you have any idea how common/uncommon that particular notation is?

In general, I would say that the thrust of the ABNF syntax is to stay as true to the official specification as possible, but since the # character doesn't really interfere with the existing implementation, it would be feasible to add support for it. I would welcome more input about how useful/desirable that would be.

@ulsa
Copy link
Author

ulsa commented May 11, 2014

The #rule was, I think, originally defined in rfc822 (the email RFC) from 1982. A new RFC for email, rfc2822, was created in 2001, where the ABNF spec was moved to rfc2234 and the #rule was taken out. However, I've also seen the #rule in this HTTP/1.1 draft from Feb 2014 that is supposed to (?) obsolete rfc2616. That was the reason for my question. The rumour of the death of the #rule may be premature.

As for how common its use is, I don't know about other specs, but it seems to be very common in grammars for HTTP header fields. Many headers in rfc2616 use it. I counted 28 places there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants