Session 11a

Catch Up


810:155
Translation of Programming Languages


Step 1: Catch Up

Today, we finish up our discussion of building tables for table-driven parsing from Session 11.

Follow-Up Exercise

Build a parsing table for the grammar from our opening exercise last time, using the FIRST and FOLLOW sets we built and the algorithm for building a parsing table we learned.

Solution: Peek ahead for a solution. The process is straightforward -- it just requires attention to detail.



Step 2: On the Design of Your Language

Port some Scheme procedures to BigRig, if possible. Trace through grammar. Are there holes in the grammar? Are there holes in the design?



A Parsing Table for the Opening Exercise



. declare identifier fixed float single double $
statement [1] . . . . . .
option-list . . [2] [2] [2] [2] [3]
option . . [4] [4] [5] [5]
scale . . [6] [7] . . .
precision . . . . [8] [9] .



Eugene Wallingford ..... wallingf@cs.uni.edu ..... February 26, 2009