shnewto / bnf

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

EBNF? ABNF? #17

Open shnewto opened 6 years ago

shnewto commented 6 years ago

Thinking about future features that could add value somewhere down the road. Initial ideas on design might be something like the following?

extern crate bnf;
// ...
let ebnf_grammar = bnf::ebnf::parse(ebnf_input);
let abnf_grammar = bnf::abnf::parse(abnf_input);

Alternatively we might be able to just make bnf::parse smart enough to intuit the variant used.

neverfox commented 6 years ago

I would love to see this.

SKalt commented 4 years ago

I've got an extremely rough draft of w3c EBNF support open on a fork of this repo, in case anyone's interested in pushing forward on this front. It has at most 50% of the w3c EBNF production-parsers implemented.

shnewto commented 4 years ago

@SKalt oh awesome! Would you be willing to make a PR with a 'work in progress' label? That'd make it easy for anyone interested to see the changes you have so far and to ask questions if there are any.