BenHanson / parsertl14

C++14 version of parsertl
32 stars 4 forks source link

Check for already generated rules for EBNF grammars #19

Open mingodad opened 2 months ago

mingodad commented 2 months ago

While testing several EBNF grammars I noticed that actually parsertl generates a lot of duplicated rules and I suggest checking for already generated rules and reuse then. I have an experimental change that seems to be working fine here https://github.com/mingodad/parsertl-playground/commit/0e83506e4b25b68d2f243e45fa45d512b0fd15cb .

Any feedback is welcome !

BenHanson commented 2 months ago

Please include a small EBNF grammar that exercises this new code.

mingodad commented 2 months ago

It's not small but it's the one that made me look at this issue and try fix it. dafny-lang-last0.g.zip