intermedsynsumm

intermedsynsumm - The grammar and semantics of Intermediate...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
The grammar and semantics of Intermediate Student with Lambda as discussed in class CS 135 Fall 2008 1 The grammar Here are all the grammatical rules for Intermediate Student with Lambda as covered in class 1 through the end of lecture module 08. When doing traces by hand, these are the rules that are expected. h program i = h def-or-expr i ... h def-or-expr i = h def i | h exp i h def i = (define ( h id i h id i ... h id i ) h exp i ) h def i = (define h id i h exp i ) h def i = (define-struct h id i ( h id i ... h id i )) h prim-op i = built-in function names h prim-op i = c- s 1 | ... | c- s n | c? (where c is a structure with fields s 1 ...s n ) h exp i = h id i h exp i = h val i h exp i = ( h exp i h exp i ... h exp i ) h exp i = (cond [ h exp i h exp i ] ... ) h exp i = (cond [ h exp i h exp i ] ... [else h exp i ]) h exp i = (and h exp i ... ) h exp i = (or h exp i ... ) h exp i = (lambda ( h id ih id i ... ) h expr i ) h exp i = (local [ h def i ... ] h expr i ) h exp i = h
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

intermedsynsumm - The grammar and semantics of Intermediate...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online