Grammar: E' -> E E -> E + T E -> T T -> T x F T -> F F -> ( E ) F -> id Nullable: E' is not nullable E is not nullable T is not nullable F is not nullable Firsts: id = id + = + x = x ( = ( ) = ) E' = id ( E = id ( T = id ( F = id ( Follows: E' = $ E = $ + ) T = $ + x ) F = $ + x ) State 0 E' -> . E E -> . E + T E -> . T T -> . T x F T -> . F F -> . ( E ) F -> . id On E , switch to state 1 On T , switch to state 2 On F , switch to state 3 On ( , switch to state 4 On id, switch to state 5 State 1 E' -> E . E -> E . + T On + , switch to state 6 State 2 E -> T . T -> T . x F On x , switch to state 7 State 3 T -> F . State 4 E -> . E + T E -> . T T -> . T x F T -> . F F -> . ( E ) F -> ( . E ) F -> . id On E , switch to state 8 On T , switch to state 2 On F , switch to state 3 On ( , switch to state 4 On id, switch to state 5 State 5 F -> id . State 6 E -> E + . T T -> . T x F T -> . F F -> . ( E ) F -> . id On T , switch to state 9 On F , switch to state 3 On ( , switch to state 4 On id, switch to state 5 State 7 T -> T x . F F -> . ( E ) F -> . id On F , switch to state 10 On ( , switch to state 4 On id, switch to state 5 State 8 E -> E . + T F -> ( E . ) On + , switch to state 6 On ) , switch to state 11 State 9 E -> E + T . T -> T . x F On x , switch to state 7 State 10 T -> T x F . State 11 F -> ( E ) . Table: | $ | id | + | x | ( | ) | E | T | F | ------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ 0 | | Shift 5 | | | Shift 4 | | Goto 1 | Goto 2 | Goto 3 | 1 | Accept | | Shift 6 | | | | | | | 2 | Reduce 2 | | Reduce 2 | Shift 7 | | Reduce 2 | | | | 3 | Reduce 4 | | Reduce 4 | Reduce 4 | | Reduce 4 | | | | 4 | | Shift 5 | | | Shift 4 | | Goto 8 | Goto 2 | Goto 3 | 5 | Reduce 6 | | Reduce 6 | Reduce 6 | | Reduce 6 | | | | 6 | | Shift 5 | | | Shift 4 | | | Goto 9 | Goto 3 | 7 | | Shift 5 | | | Shift 4 | | | | Goto 10 | 8 | | | Shift 6 | | | Shift 11 | | | | 9 | Reduce 1 | | Reduce 1 | Shift 7 | | Reduce 1 | | | | 10 | Reduce 3 | | Reduce 3 | Reduce 3 | | Reduce 3 | | | | 11 | Reduce 5 | | Reduce 5 | Reduce 5 | | Reduce 5 | | | |

Generated by GNU enscript 1.6.3.