• Input: Extended G = (N, T, P, S’); QG
• Output: Contents(x) for all x Î QG
• Method:
• Contents(<e>) := Closure(S’ ® ·S);
• for each x Î QG  – {<e>}: Contents(x) := Æ
• Apply the following rule until no Contents set can be changed:
       if A ® y·Xz Î Contents(<x>), where X Î N  È T
       and <xX> Î QG then
       add Closure(A ® yX·z) to Contents(<xX>)
Contents(x): Algorithm
26/42
Note: For all x Î QG,Contents(x) is the set of items  defined by the following algorithm: