Comp_314_quiz_04 - http/cs.bilgi.edu.tr Name Surname Number(ID

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

View Full Document Right Arrow Icon
http://cs.bilgi.edu.tr Name Surname . ................................................................. Number (ID) . ................................................................... Comp 314 — Quiz ( Week 04) Question 1 Give formal definitions for 1. A language 2. A grammar 3. A context free grammar 4. A regular grammar Define a regular grammar for the language defined by this grammar S ABCD A a A aA B ± B Bb C c C cC D ± D Dd Document last compiled on March 9, 2009 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
http://cs.bilgi.edu.tr In the next four questions, consider the small interpreter an the end of the ques- tion paper. The interpreter evaluates programs in the abstract syntax defined in the code. You will note, if you compare this interpreter with the PLAI interpreter, that the interpreter has been made extensible to allow any number of binary operators. The symbols for the operators and the scheme functions that carry out the arith- metic operation corresponding to each operator symbol are in the list of two element lists op-def-list. You will note that this makes both the parser and calculators code shorter, by eliminating repetition. The interpreter differs from the PLAI interpreter in various small ways, but is the same in principle. In several of the functions, the examples have been deleted, as they are the focus of the questions.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/03/2009 for the course COMPUTER S Comp 314 taught by Professor Chrisstephenson during the Spring '09 term at Istanbul Bilgi University.

Page1 / 6

Comp_314_quiz_04 - http/cs.bilgi.edu.tr Name Surname Number(ID

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

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