Skip to content

Commit 36da8ff

Browse files
authored
Merge pull request #16 from dvanhorn/next
Fix bug in parser suggestion.
2 parents f04467e + a7bf26e commit 36da8ff

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

www/assignments/3.scrbl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,14 @@ If you want to set things up as done in 330, you can do the following:
231231
;; -> Token
232232
;; Produce (but don't consume) the next token
233233
(define (look-ahead)
234-
(match *input*
234+
(match (unbox *input*)
235235
['() (error "no look ahead available")]
236236
[(cons t _) t]))
237237

238238
;; Token -> Token
239239
;; EFFECT: consumes one token of input
240240
(define (match-tok! t)
241-
(match *input*
241+
(match (unbox *input*)
242242
['() (error "no token available")]
243243
[(cons next ts)
244244
(set-box! *input* ts)

0 commit comments

Comments
 (0)