Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1) Zadani
- E -> T | E|T
- T -> F | T.F
- F -> G | G*
- G -> (E) | i
- 2) Odstraneni jednoduchych pravidel
- E -> (E) | i | (E)* | i* | T.F | E|T
- T -> (E) | i | (E)* | i* | T.F
- F -> (E) | i | (E)* | i*
- 3) Odstraneni leve rekurze
- E -> (E)E' | iE' | (E)*E' | i*E' | T.FE'
- E' -> |TE' | eps
- T -> (E)T' | iT' | (E)*T' | i*T'
- T' -> .FT' | eps
- F -> (E) | i | (E)* | i*
- 4) Dosazeni T do posledniho pravidla od E
- E -> (E)E' | iE' | (E)*E' | i*E' | (E)T'.FE' | iT'.FE' | (E)*T'.FE' | i*T'.FE'
- E' -> |TE' | eps
- T -> (E)T' | iT' | (E)*T' | i*T'
- T' -> .FT' | eps
- F -> (E) | i | (E)* | i*
- 5) levá faktorizace E
- E -> (E)X | iX
- X -> *E' | E' | T'.FE' | *T'.FE'
- 6) levá faktorizace X
- X -> *W | W
- W -> E' | T'.FE'
- 7) Dosazení do W
- W -> |TE' | eps | .FT'.FE' | .FE'
- 8) leva faktorizace
- W -> |TE' | eps | .FX
- X -> T'.FE' | E'
- a konecna..... porad dokola
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement