Initial public commit of ISLE prototype DSL compiler.

This commit is contained in:
Chris Fallin
2021-06-29 17:00:43 -07:00
parent f2939111d9
commit 84b7612b98
13 changed files with 3201 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
(type u32 (primitive u32))
(type A (enum (A1 (x u32)) (A2 (x u32))))
(type B (enum (B1 (x u32)) (B2 (x u32))))
(decl Input (A) u32)
(extractor Input get_input) ;; fn get_input<C>(ctx: &mut C, ret: u32) -> Option<(A,)>
(decl Lower (A) B)
(rule
(Lower (A.A1 sub @ (Input (A.A2 42))))
(B.B2 sub))