πŸ“— -> 10/23/25: ECS140A-L9


Lecture Slide Link

🎀 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:
    1. 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 𝐹𝐼𝑅𝑆𝑇(𝑋)
    2. If X->πœ€ is a production, add πœ€ to FIRST(X)

πŸ§ͺ -> 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?)

Resources

  • Put useful links here

Connections

  • Link all related words