Transform grammar for repeating characters into LL(1)
-
03-11-2019 - |
Question
I have the following simple production rule:
S -> Sa | a
Which is left-recursive, and can recognize strings such as a or aa, etc
I tried to make it right-recursive, but I cannot find a way without creating ambigious grammars
(e.g.
S -> aS'
S' -> a | aS'
)
Can someone explain how to make this grammar right-recursive and LL(1) form?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with cs.stackexchange