Chapter 4:Syntax Analysis

Example

. Consider the grammar

E T E'

E' +T E' | ε

T F T'

T' * F T' | ε

F ( E ) | id

As an example, we shall consider the grammar shown. A predictive parsing table for this grammar is shown in the next slide. We shall see how to construct this table later.