ParentheC
The rest of the program …
We assume the 7th assignment.
We assume you have this in the right format from the 7th assignment. If not, it’s time to get it there. To recap, let’s go get it there.
Additional changes:
- Load
parenthec
- Transform every
match
expression into aunion-case
union-case <var> <union>
. You must precede each constructor invocation w/the name of the union, w/a literal_
. I know. It’s a load-bearing underscore. let*
, and construct amain
that produces the output, and takes no parameters.(define-registers n k v)
,set!
s, thunks.(define-label
(define-program-counter pc)
(set! pc)- Don’t assign
k
in themain
, insteadmount-trampoline
w/name of constructor,k
var, andpc
(empty-k )
has to take a j, so that we can pass it along, and(dismount-trampoline j)
in end case.- Make sure you
print
out the answer you get there.
;; one additional thing to bear in mind.
;; every place you /construct/ a continuation
;; <union-name>_ . A Literal underscore ಠ_ಠ
Then
Load "pc2c.ss"
. Then, in the repl.
> (pc2c "foo.pc" "foo.c" "foo.h")
Booking meetings:
Book a meeting with one of us, perhaps on Canvas.