π -> 10/23/25: ECS140A-L9
π€ Vocab
βοΈ -> Scratch Notes
Top-Down Parsing
Constructs parse tree for input string starting from the root
Finds the leftmost derivation for an input string
Recursive Descent Parsing -
Predictive Parser
LL(1) Parser
- Predictive parser that only looks at the next input symbol
- Derives the leftmost derivation
FIRST Sets
- First(a) is the set of terminals that begin strings derived from the string of grammar symbol a
- If X is a terminal FIRST(X) = {X}
- Else:
- If X->Y1β¦Yk is a production
Then everything in πΉπΌπ ππ π1 is in πΉπΌπ ππ π .
If π1 derives π, then add πΉπΌπ ππ π2 to πΉπΌπ ππ π , and so on.
If π is in all πΉπΌπ ππ ππ then add π to πΉπΌπ ππ(π) - If X->π is a production, add π to FIRST(X)
- If X->Y1β¦Yk is a production
π§ͺ -> Refresh the Info
Did you generally find the overall content understandable or compelling or relevant or not, and why, or which aspects of the content were most novel or challenging for you and which aspects were most familiar or straightforward?)
Did a specific aspect of the content raise questions for you or relate to other ideas and findings youβve encountered, or are there other related issues you wish had been covered?)
π -> Links
Resources
- Put useful links here
Connections
- Link all related words