Context Free Grammar
Order as Follows
- 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
- 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-techniquesCompilation Techniques Notes* [ ] Assigments
RE to DFA
Example Kenny Jingga CT UTS Quiz
kennydfa1.png
kennydfa2.png
kennydfa3.png
Example Ivan Sebastian CT UTS Quiz
RE to E-NFA to DFA
Example Kenny Jingga CT UTS Quiz
kenny1.png
Example Ivan Sebastian CT UTS Quiz
ivan2.png WRONGGGG
Context Free Grammar
Top down parsing
Example Alvina Aulia Top Down Parsing
1. E -> TE'
1. E' -> +TE' | ε
1. T -> FT'
1. T' -> \FT'* | ε
1. F -> (E) | id
First Values:
1. First E = (, id (this is from E -> T -> F)
1. First E' =