Question

Is it possible to create a LL(1) table-driven (non-recursive) compiler with ANTLR or ANTLR3 ?

Was it helpful?

Solution

No.

However since ANTLR is open source you could modify a fork of ANTLR to do it.

ANTLR builds lexers and parsers as recursive descent source code. This is why ANTLR is easy to use and popular because people can look at the source code and understand how the lexer and parser work versus looking at table entries. Because it is source code, one can also use tools to debug the source code. If ANTLR used tables instead of source code output it would lose its ease of understanding and usefulness for those learning lexing and parsing on their own.

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