Context Free Grammar

Order as Follows

  1. Left FactoringLeft FactoringS -> aa | ab S -> aX X -> a | b C -> Dab | Dac | D | f C -> DC' | f C' -> ab | ac | ε C' -> aC'' | ε C'' -> b | c Status: #idea Tags: compilation-techniques References
  2. Left RecursiveLeft RecursiveA -> Aα | β A -> βA' A' -> αA' | ε E -> E + T | E - T | T | C A -> A α A α β β E -> TE' | CE' E' -> +TE' | -TE' | ε A no longer exists and is now A' placed at the end of β at the top and α at the bottom min 1 α and 1 β Status: #idea Tags: compilation-techniques References

Only when A is the leftmost in A -> Aα | β

Status: #idea
Tags: compilation-techniques > Mid ExamCompilation 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 Code Generator Annotated Parse Tree Three Address Statement resources: https://www.youtube.com/watch?v=6yRB6dszSUo&ab_channel=HIMTIBINUS * [x] watch all alvina aulia vids * [x] watch responsi (after OS) * [ ] try example questions from kenny * [ ] try example questions from others * [ ] practice weak


References