Complete the code to define the FIRST set of a terminal symbol.
FIRST([1]) = { { [1] } }
The FIRST set of a terminal symbol is the symbol itself.
Complete the code to add epsilon to the FIRST set when a production can derive epsilon.
If a production A -> [1] can derive epsilon, then epsilon is added to FIRST(A).If the right side of a production can produce epsilon (empty string), then epsilon is included in the FIRST set of the left side nonterminal.
Fix the error in the statement about FOLLOW sets: FOLLOW(A) contains {{BLANK_1}} if A appears before terminal b in some production.
FOLLOW(A) contains [1] if A appears before terminal b in some production.
The FOLLOW set of A includes FIRST of the symbol that follows A in a production, if that symbol is a terminal or nonterminal.
Fill both blanks to complete the rule for FOLLOW sets: If A -> αB{{BLANK_1}}β and FIRST({{BLANK_2}}) contains epsilon, then FOLLOW(B) includes FOLLOW(A).
If A -> αB[1]β and FIRST([2]) contains epsilon, then FOLLOW(B) includes FOLLOW(A).
If the symbol after B is β and FIRST(β) contains epsilon, then FOLLOW(B) includes FOLLOW(A).
Fill all three blanks to complete the dictionary comprehension for FIRST sets: first_sets = {{{BLANK_1}}: {{BLANK_2}} for {{BLANK_3}} in grammar}
first_sets = [1]: [2] for [3] in grammar}
This comprehension creates a dictionary mapping each nonterminal to its FIRST set computed by a function.
