Skip to content

Commit 99c74ed

Browse files
authored
Merge pull request #31 from dvanhorn/next
Another change to assign 5.
2 parents b66cef9 + cecd30f commit 99c74ed

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

www/assignments/5.scrbl

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,19 @@ two booleans are equal.}
105105
106106
@section[#:tag-prefix "a5-" #:style 'unnumbered]{Extending your Parser, yet again!}
107107
108-
@margin-note{@bold{CHANGE:} This grammar was changed slightly on
109-
Friday 9/27 and 4:40PM. The original grammar did not have binary
110-
subtraction primitive @tt{-}, only the unary negation @tt{-}
111-
primitive. The grammar has been fixed and the code in @tt{lex.rkt}
112-
and @tt{parse.rkt} has been updated. If you clone the repository
113-
after this time, you have the changes. If you cloned before, you can
114-
download the udpated
115-
@link["https://raw.githubusercontent.com/cmsc430/assign05/master/lex.rkt"]{@tt{lex.rkt}}
116-
and
117-
@link["https://raw.githubusercontent.com/cmsc430/assign05/master/parse.rkt"]{@tt{parse.rkt}} files.
118-
You can see a diff to the files
119-
@link["https://github.com/cmsc430/assign05/commit/22f7a64f1419bc69b19d5ff1c8845e583fbf9b1c"]{here}.}
108+
@bold{CHANGE:} There have been a couple of ommissions in the grammar
109+
and the code given to you for the parser. The grammar has been
110+
(hopefully) fixed and I have decided to release the code for the
111+
parser, so you shouldn't have to make changes to it. If you have
112+
already cloned the repository and starting working on it, just replace
113+
your @tt{parse.rkt} and @tt{lex.rkt} with these files:
120114
115+
@link["https://raw.githubusercontent.com/cmsc430/assign05/master/parse.rkt"]{https://raw.githubusercontent.com/cmsc430/assign05/master/parse.rkt}
121116
117+
@link["https://raw.githubusercontent.com/cmsc430/assign05/master/lex.rkt"]{https://raw.githubusercontent.com/cmsc430/assign05/master/lex.rkt}
118+
119+
If you have not yet accepted the assignment, these changes should
120+
already be included in your code when you do.
122121
123122
124123
Extend your Fraud+ parser for the Hustle+ language based on the following
@@ -130,6 +129,7 @@ grammar:
130129
| boolean
131130
| variable
132131
| string
132+
| empty
133133
| ( <compound> )
134134
| [ <compound> ]
135135
@@ -145,7 +145,7 @@ grammar:
145145
| box | unbox | car | cdr | string-length
146146
147147
<prim2> ::= make-string | string-ref | = | < | <=
148-
| char=? | boolean=? | +
148+
| char=? | boolean=? | + | cons
149149
150150
<maybe-expr> ::=
151151
| <expr>
@@ -172,6 +172,7 @@ which are defined as follows (only the new parts are shown):
172172
(racketblock
173173
; type Token =
174174
; ...
175+
; | '()
175176
; | String
176177
177178
; type Prim = Prim1 | Prim2 | '-
@@ -205,6 +206,7 @@ which are defined as follows (only the new parts are shown):
205206
; | 'char=?
206207
; | 'boolean=?
207208
; | '+
209+
; | 'cons
208210
)
209211
210212
The lexer will take care of reading the @tt{#lang racket} header and

0 commit comments

Comments
 (0)