[antlr-interest] Re: Antlr grammar to parse Java classfile?

John D. Mitchell johnm-antlr at non.net
Thu Dec 6 16:32:54 PST 2001

>>>>> "Terence" == Terence Parr <parrt at jguru.com> writes:
>>>>>> On Wednesday, December 5, 2001, at 04:01 PM, John D. Mitchell writes:
>>> Let's see.  Well, it's close, but it wouldn't give you an error if you
>>> have less than blockCount.  You need that "did I get enough" check at
>>> the end of the loop.  Could do with a simple "validating" sem pred
>>> after loop.

>> Hmm... How is that going to be safe in the face of hoisting?

> Hmm...not sure if it's an issue or not.  I just realized though that the
> code gen is easy but the analysis might not be so easy to enhance.  There
> is no concept of repeated grammatical item in my internal data structure.

Ah, yeah, right, *now* I remember!

IMHO, this gets to the more general point of allowing at least some amount
of grammar analysis and parser/walker generation at run-time rather than
the current "static" analysis.  This would be at least nasty in the current
system but in the predicated v3.0, I don't think it would be that onerous
to support this since it's basically just the equivalent of run-time loop
unrolling in a JITC.

Take care,


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

More information about the antlr-interest mailing list