shnewto / bnf

Parse BNF grammar definitions
MIT License
256 stars 22 forks source link

(Incomplete) Implementation of ISO 14977 compliant EBNF parser #64

Closed hbina closed 1 year ago

hbina commented 3 years ago

Implementation of ISO 14977 compliant EBNF parser

Prior to this PR, this crate only supports BNF parser. It also didn't use lingos that align with EBNF. I needed something more "official" and also more powerful since EBNF contains more operators than just defining-separator-symbol.

Admittedly, I am quite sure that BNF can do everything that EBNF can do. It just requires a bit manual work.

Another functionality that I wanted is the ability to validate a given string and not just generate them. I will leave that to another PR.

Note

  1. Figure out why when parsing for definition_list in something like (5 * {"abcde"} - "xyz") | "fghi"; we will get the following single_definition => (5 * {"abcde"} - "xyz") (with the space included). This should have been detected by the implicit whitespaces...
coveralls commented 3 years ago

Coverage Status

Coverage decreased (-7.09%) to 76.895% when pulling 139917fe4c75e2e9dd2d26a5d4c31ee782b03da6 on hbina:iso_14977_take_3 into 08a19f887abcd1f0b00d8a5c15616de3f81e53b3 on shnewto:main.

shnewto commented 1 year ago

@hbina thanks for keeping this open for reference for so long! the code base has changed quite a bit since the last activity here so I'm going to close this but I still think ebnf would be a very cool thing to see implemented!