1. Why was the slowness of interpretation of programs acceptable in the early 1950s?
2. What two important features first appeared in the IBM 704 computer and explain why they are important?
3. In what way are Scheme and COMMON LISP opposites of each other?
4. What missing language element of ALGOL 60 damaged its chances for widespread use?
5. What features of SIMULA 67 are now important parts of some object-oriented languages?
6. What language introduced the case statement?
7. What three concepts are the basis for object-oriented programming?
8. What are two reasons why Java is safer than C++
<stmt> a statement
<expr> an expression
<const_expr> a constant expression
<s> --> <s> | ( <s> ) | ( )
a. Describe (in English) the language that this grammar generates.
b. Show that this grammar is ambiguous for some string w in the language.
c. Modify this grammar so that it is not ambiguous. Write the parse tree for string w.
<exp> --> <exp> + <mulexp> | <mulexp>
<mulexp> --> <mulexp> * <rootexp> | <rootexp>
<rootexp> --> ( <exp> ) | a | b | c | d
a. In G, which of the '+' and the '*' operator has the highest
precedence? Demonstrate with a parse tree for some string in
the language.
b. Generate a new grammar J by adding to G subtraction and
division operators ('-' and '/') with the customary precedence
and associativity. Write the parse tree for the string "a * b + c / a * b + d"
to check that both precedence and associativity work.
c. Generate a new grammar H by adding to G a left-associative
operator '%', which is between '+' and '*' in precedence. Write the parse tree
for the string "a % b * d + a % c % b * a" to check that both precedence and
associativity work.
d. Generate a new grammar K by adding to G a right-associative operator
'=', which as lower precedence than any of the other operators. Only
single variables can appear on the left side of an '=' operator.
Write the parse tree for the string "a = b = a * c" to check that
both precedence and associativity work.