The Definitive ANTLR Reference

The Definitive ANTLR Reference

I’m trying to build a programm that will check if PL/SQL’s input are conform with my companies own rules regarding Pl/SQL scripts. If not, the program have to indicate which expression (at which line) didn’t pass the test.

I’ve decided to use the PL/SQL grammar available on the ANTLR website. This grammar will check if there is syntaxic error. Then, i will apply different Tree grammar to check on the inner rules (company’s own rule).

But to do that, I need information regarding token! So here come the question :

How to keep information (such as position line) regarding tokens parsed in a grammar parser to a tree parser ?