From 10ea9c57c3dc4dba397335e6f9201244a987a2ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandra=20Gra=C3=9F?= Date: Sun, 28 Jul 2019 15:59:12 +0200 Subject: [PATCH] 102, 140, 159 failing due to magical 'c' --- main.py | 2 +- output/slide_102.txt | 0 output/slide_114.txt | 29 +++++++++++++++++++++++++++++ output/slide_131.txt | 16 ++++++++++++++++ output/slide_140.txt | 0 output/slide_159.txt | 0 6 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 output/slide_102.txt create mode 100644 output/slide_114.txt create mode 100644 output/slide_131.txt create mode 100644 output/slide_140.txt create mode 100644 output/slide_159.txt diff --git a/main.py b/main.py index 900a437..c88b704 100644 --- a/main.py +++ b/main.py @@ -19,7 +19,7 @@ # usage: main.py [-h] [-i INPUT] [-o OUTPUT] # example: python3 main.py -i input/slide_102.ml -o output/slide_102.txt -with open(args.input) as i_f, open(args.output, 'w') as o_f: +with open(args.input) as i_f, open(args.output, 'w+') as o_f: # read input and remove whitespace expr = i_f.read() diff --git a/output/slide_102.txt b/output/slide_102.txt new file mode 100644 index 0000000..e69de29 diff --git a/output/slide_114.txt b/output/slide_114.txt new file mode 100644 index 0000000..ed74e5d --- /dev/null +++ b/output/slide_114.txt @@ -0,0 +1,29 @@ +Output: +0 loadc 5 +1 mkbasic +1 pushloc 0 +2 mkvec 1 +2 mkfunval A +2 jump B +A: +0 targ 1 +0 pushloc 0 +1 getbasic +1 pushloc 1 +2 getbasic +2 mul +1 mkbasic +1 pushloc 0 +2 getbasic +2 pushglob 0 +3 getbasic +3 add +2 mkbasic +2 return 1 +B: +2 mark C +5 pushloc 4 +6 pushloc 4 +7 apply +C: +3 slide 3 \ No newline at end of file diff --git a/output/slide_131.txt b/output/slide_131.txt new file mode 100644 index 0000000..c19e6f7 --- /dev/null +++ b/output/slide_131.txt @@ -0,0 +1,16 @@ +Output: +0 loadc 19 +1 mkbasic +1 pushloc 0 +2 getbasic +2 pushloc 1 +3 getbasic +3 mul +2 mkbasic +2 pushloc 1 +3 getbasic +3 pushloc 1 +4 getbasic +4 add +3 mkbasic +3 slide 2 \ No newline at end of file diff --git a/output/slide_140.txt b/output/slide_140.txt new file mode 100644 index 0000000..e69de29 diff --git a/output/slide_159.txt b/output/slide_159.txt new file mode 100644 index 0000000..e69de29