Grammar restrictions on token look ahead

Viewed 1733

I know that there are two types of restriction on grammars that are used with recursive descent parsers.

  1. the grammar cannot have any left recursive productions
  2. the grammar must not require more than on token look ahead.

I understand the first one but am a little lost on the second restriction. Why is this restriction necessary and can production even exist without it?

1 Answers
Related