CS 4536 - Extended Interpreters Assignment CS 4536 Homework 2: Extended Basic Interpreter Due: Thursday Jan 24, 11:59pm via turnin (assignment name hwk2 ) Collaboration Policy : Solo Write a parser and interpreter for the FWAE language (discussed in class), with eager semantics and deferred substitutions, extended with the following two language features. 1. Conditionals To save the trouble of having to add boolean values and operators over them, create the construct if0 using the syntax described by the grammar below. Note that if0 has three parts: ❍ A test expression ❍ A “ then ” expression, which evaluates if the test expression evaluates to zero ❍ An “ else ” expression, which evaluates for any other number. Evaluation should signal an error for non-numeric test values. 2. Multi-argument fun Extend the fun language feature described in lecture so that functions can accept a list of zero or more arguments instead of just one. All arguments to the function must evaluate with the same deferred substitutions . To simplify your program, you may assume that the number of arguments in a function invocation always matches the number in the procedure definition. For example: {{fun {x y} {* x y}} 2 3} evaluates to 6. Specifically, this means that you do not need, nor will we try, test cases that violate this assumption. Frequently Viewed Documents for CS 4536 Interested in Homework 2: Extended Basic Interpreter

Bookmark Homework 2: Extended Basic Interpreter. Homework 2: Rudimentary Interpreters Homework 4: On Laziness Homework 3: Haskell and Laziness
[null, null, null, null, null, null, null, null, {"document_url": "https://www.coursehero.com/file/10143/Homework-2-Extended-Basic-Interpreter/", "unformatted_src": "/thumb/5f/cc/5fccf80c652a9bd36e3b0c4425c11137a922b5ef_180.jpg", "src": "https://www.coursehero.com/thumb/5f/cc/5fccf80c652a9bd36e3b0c4425c11137a922b5ef_180.jpg", "formatted_filename": "fccf c a bd e b c c a b ef", "alt_text": "Homework 2: Rudimentary Interpreters"}, null, {"document_url": "https://www.coursehero.com/file/10143/Homework-2-Extended-Basic-Interpreter/", "unformatted_src": "/thumb/32/52/32521c24a9782650fd77acc80de9180004ced211_180.jpg", "src": "https://www.coursehero.com/thumb/32/52/32521c24a9782650fd77acc80de9180004ced211_180.jpg", "formatted_filename": "c a fd acc de ced", "alt_text": "Homework 4: On Laziness"}, null, {"document_url": "https://www.coursehero.com/file/10143/Homework-2-Extended-Basic-Interpreter/", "unformatted_src": "/thumb/53/49/53493a770d34007ae479131088604b3a33b52d7c_180.jpg", "src": "https://www.coursehero.com/thumb/53/49/53493a770d34007ae479131088604b3a33b52d7c_180.jpg", "formatted_filename": "a d ae b a b d c", "alt_text": "Homework 3: Haskell and Laziness"}, null, {"document_url": "https://www.coursehero.com/file/10143/Homework-2-Extended-Basic-Interpreter/", "unformatted_src": "/thumb/f7/34/f7340ba7c2bc05fec8027a3b8348f9167f2dbe19_180.jpg", "src": "https://www.coursehero.com/thumb/f7/34/f7340ba7c2bc05fec8027a3b8348f9167f2dbe19_180.jpg", "formatted_filename": "f ba c bc fec a b f f dbe", "alt_text": "Homework 1: Basic Macros"}, null, {"document_url": "https://www.coursehero.com/file/10143/Homework-2-Extended-Basic-Interpreter/", "unformatted_src": "/thumb/8d/94/8d948ccf22fc3f9a6c2a753a01a2f6fb6692f483_180.jpg", "src": "https://www.coursehero.com/thumb/8d/94/8d948ccf22fc3f9a6c2a753a01a2f6fb6692f483_180.jpg", "formatted_filename": "d ccf fc f a c a a a f fb f", "alt_text": "PLT MzScheme-Language Manual"}, null, {"document_url": "https://www.coursehero.com/file/10143/Homework-2-Extended-Basic-Interpreter/", "unformatted_src": "/thumb/cf/b8/cfb80c219b1fa81316742daafa2e38c5ba58c24a_180.jpg", "src": "https://www.coursehero.com/thumb/cf/b8/cfb80c219b1fa81316742daafa2e38c5ba58c24a_180.jpg", "formatted_filename": "cfb c b fa daafa e c ba c a", "alt_text": "Revised^5 Report on the Algorithmic Language Scheme"}, null]