[antlr-interest] ANTLR 3 using k=0, any info on doing this?

The Researcher researcher0x00 at gmail.com
Mon Feb 28 18:12:11 PST 2011


I tried searching the interest group with k=0 but that wasn't productive,
and Google doesn't do any better.

Yes I know setting k=0 is not what one normally if ever does with ANTLR, but
I am researching what it will take to get ANTLR to validate a Microsoft
Common Language Infrastructure file. I did write a separate validator by
hand and that works great.

One of my goals out of this is to have a way to write binary file readers
and validators using ANTLR. Yes I know that I will have to modify ANTLR.g to
do this correctly, but before that, I have to know what the current ANTLR.g
is capable of doing and what needs to be modified or enhanced.

So far I have only fond the ANTLR 2 Java .class file reader by Andreas
Rueckert and the few mentions of using Bytes in "Definitive ANTLR
Reference". I am getting the other book.

Using gated semantic predicates is working out great, but ANTLR is
determined to check for multiple alternatives. I was hoping that K=0 would
shut that whole process down  and using the gated semantic predicates to
dynamically shut off the options would leave ANTLR not trying alternatives.

Any clues or references are welcome.

Thanks Eric


More information about the antlr-interest mailing list