Created
June 24, 2013 20:29
-
-
Save eholk/5853341 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| ;; The first language in the middle end. | |
| (define-language M0 | |
| (terminals | |
| (region-var (r)) | |
| (variable (x name))) | |
| (Rho-Type | |
| (t) | |
| x) | |
| (Module | |
| (m) | |
| (module decl ...)) | |
| (Decl | |
| (decl) | |
| (extern name (t* ...) -> t) | |
| (fn name (x ...) t body)) | |
| (Body | |
| (body) | |
| (begin stmt ... body)) | |
| (Stmt | |
| (stmt) | |
| (let ((x t e) ...) stmt)) | |
| (Expr | |
| (e) | |
| (var t x))) |
Author
Just to compete the thought here... (extern name (t* ...) -> t) is not a legal production in the current grammar, because literals are not allowed in the middle of a production (here the -> is treated as a meta-variable, but since it is not defined, the nanopass framework gets confused.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This gives me this error: