Ivan Sebastian CT UTS Quiz
1. Given RE (Reguler Expresion):
(a|b)+ (a+b)* ab+
Find the DFA from RE given above
2. Given RE (Reguler Expresion):
(k|l)* kl?k(kl)+
Find the DFA using Ɛ-NFA
- X -> a or b Y | XZ | a or b | Z and Y | Z or Y
Y -> do while a X | do while a Y | Y log b
Z -> a | b
a. Do Left Recursion from the grammar above
b. Do Left Factoring from the grammar above
- O -> KO’
O’-> +KO’ | Ɛ
K -> EK’
K’ -> *EK’ | Ɛ
E -> /E | (O) | y | a
a. Find the first from the grammar above
b. Find Follow from the grammar above
c. Create the Parsing Table
d. Track the parsing movement with input: y/a*y+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' =