-
-
Save escanda/b83aab7a1178562c546b3f637eb5fc90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro define-grammar (&rest body) | |
`(loop for rule in ,@body collect | |
(format nil "rule: ~A\\n" rule))) | |
(cl-glrp:define-grammar | |
`((rulelist ((rule_*) EOF)) # this works, but doesn't without backquotting | |
(rule_ (lhs ASSIGN rhs)) | |
(lhs "HELLO") | |
(rhs "WORLD") | |
(ASSIGN "="))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment