first usable version

This commit is contained in:
Peter
2023-11-09 09:46:07 +01:00
parent 70b3e9c722
commit 6b5ab857cb
22 changed files with 675 additions and 153 deletions

View File

@@ -0,0 +1,26 @@
module IBAF-Statements
imports
libstratego-gpp
signatures/-
pp/IBAF-parenthesize
pp/IBAF-pp
imports
cbs-gen/IBAF-Expressions
// Language "IBAFlang"
rules
to-funcons:
|[ execute[: (:Typ:)(:Id:)=(:Exp:); :] ]| ->
|[ assign (bound (id[: (:Id:) :]),
eval-exp[: (:Exp:) :]) ]|
to-funcons:
|[ execute[: print((:Exp:)); :] ]| ->
|[ print (eval-exp[: (:Exp:) :]) ]|
to-funcons:
|[ execute[: (:Stmt1:)(:Stmt2:) :] ]| ->
|[ sequential (execute[: (:Stmt1:) :],
execute[: (:Stmt2:) :]) ]|