Question

How do I force ANTLR4 to accept LL(1) grammars only?

As an academic exercise, we have to make an LL(1) grammar. However, ANTLR4 just accepts LL(*) grammars without warning that it's not LL(1). I understand that usually, LL(*) is preferable, but LL(1)-ness is a requirement for the exercise.

I could not find it as an option or argument, nor in the definitive antlr4 guide...

Thanks in advance!

Was it helpful?

Solution

You don't. The entire point of ANTLR 4 is to remove traditional limitations like LL(1) from consideration during development and implementation of a new language.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top