0
S → Y | 0Z
Y → Y1 | 1Z | 1Z 00
Z → 1Z | 0

I know the Y is left recursive but why is the Z not left recursive?

For Y i got

Y -> 1ZF | 1Z00
F -> 1F | e

Then factoring

Y -> 1ZX | 1ZX
F -> 1F | e
X -> F | 00F

Where 'e' is empty

4

0 に答える 0