copy for each terminal in the follow set of the LHS nonterminal. Each element of the follow set may be a valid lookahead terminal: [S → • E, $] [E → • T, $] [E → • T, )] [E → • ( E ), $] [E → • ( E ), )] [T → • n, $] [T → • n, +] [T → • n, )] [T → • + T, $] [T → • + T, +] [T → • + T, )] [T → • T + n, $] [T → • T + n, +] [T → • T + n, )] Creating new item sets The rest of the item sets can be created by the following algorithm 1. For each terminal and nonterminal symbol A appearing after a '•' in each already existing item set k, create a new item set m by adding to m all the rules of k where '•' is followed by A, but only if m will not be the same as an already existing item set after step 3. 2. shift all the '•'s for each rule in the new item set one symbol to the right 3. create the closure of the new item set 4. Repeat from step 1 for all newly created item sets, until no more new sets appear In the example we get 5 more sets from item set 0, item set 1 for nonterminal E, item set 2 for nonterminal T, item set 3 for terminal n, item set 4 for terminal '+' and item set 5 for '('. Item set 1 (E): [S → E •, $] Item set 2 (T): [E → T •, $] [T → T • + n, $] [T → T • + n, +] · · · Item set 3 (n): [T → n •, $] [T → n •, +] [T → n •, )] Item set 4 ('+'): [T → + • T, $] [T → + • T, +] [T → • n, $] [T → • n, +] [T → • + T, $] [T → • + T, +] [T → • T + n, $] [T → • T + n, +] · · · Item set 5 ('('): [E → ( • E ), $] [E → • T, )] [E → • ( E ), )]