3 ms·
When your top-down parser gets caught in an infinite loop, you'll need to convert the left recursion to right recursion. See here: https://en.wikipedia.org/wiki
by emmab 12y ago
When your top-down parser gets caught in an infinite loop, you'll need to convert the left recursion to right recursion. See here: https://en.wikipedia.org/wiki/Left_recursion#Removing_left_recursion https://en.wikipedia.org/wiki/Left_recursion#Removing_left_r...
Writing a compiler is a significant amount of work and should be pre-researched to avoid issues like the above.