문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top