The first midterm is on Wed., Apr. 25, in class at the usual class time. The exam is closed book/notes etc. but, you may bring to the exam a single "cheat sheet": an 8"X11" double-sided sheet of paper with whatever notes you want to bring to the exam. If you bring a cheat sheet, please write your name on it and turn it in with your midterm. Before noon tomorrow (4/24) I will post a sample midterm (and sample solutions for the questions on the sample midterm) on the course web site. Here is a review. We started by laying out the main goals of the course: to understand important concepts underlying languages, and to consider how languages are implemented. To this end we introduced the notions of syntax, semantics, and methdology underlying language being studied. Then we talked about compilers and interpreters as two different ways of implementing languages and relations between them and adv. and disadv. of each. We moved on to a discussion of BNF as formalism to specify the context free syntax of the language. We looked at the details of a BNF grammar consisting of terminals, non-terminals, productions corresponding to the non-terminals, etc. Then we talked about how strings may be derived from a grammar, and introduced the idea of abstract and concrete parse trees to represent such derivations. We also talked about the question of ambiguity in the grammar as well as ensuring certain order of evaluations. We talked briefly about extended BNF (and even more briefly mentioned the pictorial representation in the form of syntax graphs). Next we considered recursive descent as a way to implement languages. We defined the grammar for Core, a simple programming language and talked about how this may be implemented. We talked about executing, printing, and parsing Core programs. We saw several examples of procedures for doing these corresponding to various cases such as , , etc. We talked about details of problems related to s and how they may be addressed. We started by using an array representation of the parse tree in these discussions. After the midterm, we will talk about alternative approaches. In terms of the textbook, some of the material we talked about are in chapters 1, 3 [not including 3.4, 3.5], 4, and maybe a bit in 11. We have not discussed all of the material in all of these chapters but these are the chapters you should browse through. The questions in the midterm will mostly be conceptual and some problem solving types as well. By conceptual, I mean questions which ask you to write a brief paragraph explaining some idea or the difference between two concepts etc. If you have questions, send me mail or post on the newsgroup. Good luck! --Neelam.