mbutterick / brag

Racket DSL for generating parsers from BNF grammars [moved to https://git.matthewbutterick.com/mbutterick/brag]
https://git.matthewbutterick.com/mbutterick/brag
MIT License
61 stars 12 forks source link

Fix make rule parser #28

Closed markuspf closed 2 years ago

markuspf commented 2 years ago

There was a bug in the brag expander handling the optional source-name argument to parsers genrated by using make-rule-parser;

No matter what rule-name one gave, the macro just expanded to use PARSE when one gave a source name, hence using the entire grammar, not the sub-grammar given by the rule.

This is an attempt at fixing this bug; includes a regression test.

mbutterick commented 2 years ago

Thanks!