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