-
Notifications
You must be signed in to change notification settings - Fork 29
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 RFC2616-style ABNFs #3
Comments
@reschke fyi |
@resche After looking at this code a bit, I think I would rather optionally replace the list with the equivalent tokens in the in-memory version, rather than change it on output. i.e., have a phase that replaces the one object* representing a list with the appropriate group and concatentation tokens, and then let the optimizer have its chance at reducing it, instead of having to have different cases for lists in |
WFM; the patch reflects what I could do back then given my limited knowledge of lex/yacc. |
(Maybe this is the wrong place for this comment, but nevertheless...) I find this "feature" to be a disturbing hack. The problem is that it elevates "," to exulted status. Why is "," so special? Often lists use other separators. (Ones that are commonly seen are ";" and " ", but also sometimes "|" and "/".) So why would we special-case "," in ABNF? It would be different if the operator could be parameterized with the desired separator. But ABNF doesn't have trinary operators. As a result I consider this a waste of a precious "nice" operator symbol that could be used for some more general-purpose feature. I agree that a concise representation for lists would be nice to have. Perhaps it could be accomplished by incorporating some sort of macro or function mechanism into abnf. |
Paul, I imagine using "-o RFC7230", defaulting to off, to enable this support. Since it's defined in a standards-track document, https://tools.ietf.org/html/rfc7230#section-7 , I don't think that there's an argument to be had about the syntax. Since it defaults to off, I don't think it affects the "normal" case. |
Bill - OK, if it is considered a "deviant" branch then I don't have any problem with it. It won't present any issues until some hypothetical time in the future when somebody wants to use "#" for some other extension. Then I guess there might be some objection on the basis that it would be incompatible with past practice. |
Original issue reported on code.google.com by
[email protected]
on 20 Nov 2007 at 1:02Attachments:
The text was updated successfully, but these errors were encountered: