Homework 1
Due 1/26/98 in class
*** Due date changed because of delay in posting homework***
 

Note: Questions or discussion should be directed to the class newsgroup.

1) Evaluate your favorite language, based on the criteria given in class.

2) Given the following grammar:
 
          <assign>     -->   <id> := <expr>
          <id>            -->   A | B | C
          <expr>        -->   <expr> + <expr>
                               |     <expr> * <expr>
                               |     (<expr>)
                               |     <id>

   show a parse tree and a leftmost derivation for each of these statements.

3) Give an unambiguous grammar that generates the same language as this one: 4) Give regular expressions for  5) Given the following virtual machine:
ident := var
ident := ident + integer
ident := ident - integer
goto label
if var relop var goto label (where relop is =, <>, <, <=, >, or >= )
    give an operational semantic definition of the following language constructs: