Quiz%201_02 - <id> → A | B | C...

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

View Full Document Right Arrow Icon
ICS 313-02 (022) Quiz # 1 Weight 3% 15 March, 2003 Q. 1 [5 points]: List four reasons for studying concepts of programming languages. Q. 2 [5 points]: Describe the main design criteria of ALGOL 68. ID: ___________ Name: _____________________
Background image of page 1

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

View Full DocumentRight Arrow Icon
Q. 3 [10 points]: Consider the following BNF definition of simple assignment statements: <assign> <id> = <expr>
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: &lt;id&gt; → A | B | C &lt;expr&gt; → &lt;expr&gt; + &lt;term&gt; | &lt;term&gt; &lt;term&gt; → &lt;term&gt; * &lt;factor&gt; | &lt;factor&gt; &lt;factor&gt; → ( &lt;expr&gt; ) | &lt;id&gt; a) Draw a parse tree to show that the following string is a legal assignment statement: A = (B * A) + (B * C) b) Modify the grammar to add a unary minus operator that has higher precedence than either + or * ....
View Full Document

This note was uploaded on 09/15/2010 for the course ICS ics103 taught by Professor Alvi during the Spring '07 term at King Fahd University of Petroleum & Minerals.

Page1 / 2

Quiz%201_02 - &amp;amp;lt;id&amp;amp;gt; → A | B | C...

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