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

hiding rule name cancels splice #8

Closed mbutterick closed 6 years ago

mbutterick commented 6 years ago
#lang brag

top : rule
/rule : Ø | "x" [@rule]
(parse-to-datum "xxx")

Produces

'(top ("x" ("x" ("x"))))

instead of

'(top ("x" "x" "x"))

It seems that once the rule name disappears, the splice instruction is somehow lost.