University of Texas at El Paso
Compuer Science
Assignment 3 Minimize    

Compilers and Interpreters: Assignment 3

September 22, 2008

Problem 4.19 from our textbook (extend the scanner to allow underscore in identifiers)

Compile the following Triangle program with the Triangle compiler using your modified scanner. Run the compiled program. Use the disassembler to get the assembly code generated by the compiler. The code for the compiler can be found at code.

  const x_1 ~ 7;
  var x:Integer
    x_2 := 3;
    x_2 := x_1*x_2;

Due Wednesday, October 1, at the start of class. Hand in (or e-mail me before Wednesday class)

  1. the modified lexical grammar
  2. a printout of your revised,
  3. the TAM code generated by the compiler on the test program.