Parsing Search for Top Down

The first stack is the start symbol and add $ BEFORE it

Input will be given and add $ AFTER it

How to determine the output?

  • By comparing the right most of the stack and the left most of the input
rules
  • Stack gets replaced by the production values or the thing that comes after the -> but reverse it
  • If stack == input POP STACK AND INPUT
  • if there is ε after -> POP STACK
  • if stack == $ and input == $ ACCEPT
  • if stack input REJECT

Status: #idea
Tags: compilation-techniquesCompilation Techniques NotesMid Exam RE to DFA RE to E-NFA to DFA Context Free Grammar Top down parsing Final Exam Bottom Up Parsing Directed Acyclic Graph TAC, Triples, Quadriples Intermediate Code Generator Annotated Parse Tree Three Address Statement https://www.youtube.com/watch?v=\_Jng5xgLxkI&list=PLB2GiO0mMjw9J_OwnDMAqtsANzWsIylQz&index=9&ab_channel=HIMTIBINUS Status: #MOC Tags:


References