1

I was watching a youtube video on a parsing library that I have an interest in that you can find here: https://www.youtube.com/watch?v=wreCg30pyts&t=1272s. What is interesting though is that at 30:57 someone new comes on and references an interesting proof claiming that all context-free grammars can be parsed using a LL(1) parser without backtracking. Is this really true? Can anyone point me to a proof of this?

FShrike
  • 46,840
  • 3
  • 35
  • 94

1 Answers1

1

What is interesting though is that at 30:57 someone new comes on and references an interesting proof claiming that all context-free grammars can be parsed using a LL(1) parser without backtracking.

That's not what he says, as far as I can hear.

He's saying that every deterministic context-free grammar can be systematically rewritten to a different grammar for the same language (i.e. one that generates the same set of token strings) which is LL(1).

"Deterministic" is an important restriction and stronger than it sounds -- the Wikipedia article notes that not every unambiguous CFG qualifies as "deterministic".

Troposphere
  • 7,637