aboutsummaryrefslogtreecommitdiff
path: root/example/rules.py
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-07-09 15:43:10 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-07-09 15:43:10 +0300
commit7f1f9ec8e75b3627b795ddecd7e391a5ebe95528 (patch)
tree88efbff4d9d64f6589687a59224d245e00975d0d /example/rules.py
parent2432cb953afa8ec3063307e3a788d7126b97318b (diff)
downloadbcgen-7f1f9ec8e75b3627b795ddecd7e391a5ebe95528.tar.gz
bcgen-7f1f9ec8e75b3627b795ddecd7e391a5ebe95528.zip
change so that bcode.h and bcode.c are generated
Diffstat (limited to 'example/rules.py')
-rw-r--r--example/rules.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/example/rules.py b/example/rules.py
index 9c8d62e..90d35b1 100644
--- a/example/rules.py
+++ b/example/rules.py
@@ -1,5 +1,8 @@
g = BCGen(r = 7, f = 0)
+
g.rule('addr', '_RRR__', 'R0 = R1 + R2;')
g.rule('addi', '_RR__I', 'R0 = R1 + IMM;')
g.rule('movi', '_R___I', 'R0 = IMM;')
g.rule('bltr', 'rRR__I', 'if (R0 < R1) JUMP(IMM);')
+
+g.write()