patrickhuber / Pliant

MIT License
26 stars 4 forks source link

ABNF support as in RFC 5324 #71

Open ArsenShnurkov opened 7 years ago

ArsenShnurkov commented 7 years ago

https://tools.ietf.org/html/rfc5234

right now EBNF is implemented like ANBF. I propose to create a separate implementation for ABNF, in particular for syntax without commas as on page 6 of the rfc:

3.1.  Concatenation:  Rule1 Rule2
ArsenShnurkov commented 7 years ago

Current syntax have the same comment style as W3C EBNF described here - https://www.w3.org/TR/REC-xml/#sec-notation

patrickhuber commented 7 years ago

For all of the ABNF, EBNF and BNF code in the framework, I'm planning on pulling out these into RFC compliant assemblies and releasing them as distinct nuget packages. I'm going to rename the current EBNF to "Dsl" (Domain Specific Language) to set it apart from RFC compliance.

The original intent of the Ebnf code was to serve as a grammar DSL with regex support and a syntax for macros like "ignore" tokens. I see value in having RFC compliant parsing libraries as a feature, so I'm going to mark this as an enhancement.