4.3 Generating LL(1) Parsing Tables

Constructing LL(1) parsing tables is relatively easy (compared to constructing the tables for lexical analysis). The table is constructed using the following algorithm:

EXAMPLE 5 Constructing an LL(1) parse table entry using rule 1

EXAMPLE 6 Constructing an LL(1) parse table entry using rule 2

LL(1) parsing tables may be generated automatically by writing procedures for FIRST () and FOLLOW(A). Then, when the grammar is input, A and are identified for each production and the two steps above followed to create the table.

Send questions and comments to: Karen Lemone