Skip to content

Commit d3d827a

Browse files
committed
Merge branch 'main' of github.com:cmsc430/assignments
2 parents ca83e1d + 49bd052 commit d3d827a

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

hoax-plus/compile-ops.rkt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@
234234
(Mov r9 (Mem r8 (- type-vect)))
235235
(Cmp r10 r9)
236236
(Jge 'err)
237-
(Sar r10 1) ; convert to byte offset
238-
(Mov (Mem r8 r10 (- 8 type-vect)) rax)
237+
(Sar r10 1) ; convert to byte offset
238+
(Mov (Mem r8 r10 (- 8 type-vect)) rax)
239239
(Mov rax (value->bits (void))))]))
240240

241241
(define (type-pred mask type)

iniquity-plus/compile-ops.rkt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@
222222
(Mov r9 (Mem r8 (- type-vect)))
223223
(Cmp r10 r9)
224224
(Jge 'err)
225-
(Sar r10 1) ; convert to byte offset
226-
(Mov (Mem r8 r10 (- 8 type-vect)) rax)
225+
(Sar r10 1) ; convert to byte offset
226+
(Mov (Mem r8 r10 (- 8 type-vect)) rax)
227227
(Mov rax (value->bits (void))))]))
228228

229229
(define (type-pred mask type)

iniquity-plus/parse.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
(list ys (cons g gs) (App g es))])])])]
175175
[(list-rest (? symbol? g) sr)
176176
(match (parse-es/acc sr fs xs ys gs)
177-
[(list ys s es)
177+
[(list ys gs es)
178178
(list ys (if (memq g fs) gs (cons g gs)) (App g es))])]
179179
[_
180180
(error "parse error" s)]))

knock-plus/ast.rkt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
;; | (Box Pat)
5252
;; | (Cons Pat Pat)
5353
;; | (Conj Pat Pat)
54+
;; | (List [Listof Pat])
55+
;; | (Vect [Listof Pat])
56+
;; | (Pred Id)
5457

5558
(struct Eof () #:prefab)
5659
(struct Lit (d) #:prefab)

knock-plus/parse.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
(list ys (cons g gs) (App g es))])])])]
157157
[(list-rest (? symbol? g) sr)
158158
(match (parse-es/acc sr fs xs ys gs)
159-
[(list ys s es)
159+
[(list ys gs es)
160160
(list ys (if (memq g fs) gs (cons g gs)) (App g es))])]
161161
[_
162162
(error "parse error" s)]))

0 commit comments

Comments
 (0)