[antlr-interest] Re: Antlr grammar to parse Java classfile?
Terence Parr
parrt at jguru.com
Thu Dec 6 12:36:02 PST 2001
On Wednesday, December 5, 2001, at 01:25 PM, jsrs701 wrote:
> <obsequiousness>
> Ye flipping gods, man, don't you just wake up in the morning full of
> pride at the amazing critter you have invented? I wouldn't be able
> to get through doorways my head would be so big! You deserve mucho
> kudos.
> </obsequiousness>
<blushing>
Aw shucks. Well, it's one of those things where once you've built
something, it's seems like no big deal. Lots of people have lent their
brain power too--I've just kept the project single-minded. Plus, any
more french fries and I'll have trouble getting my stomach through the
door not my head! ;)
</blushing>
>> Anyway, concerning the "match n times" thing. You're right...it
> would
>> be pretty useful. What syntax is appropriate and how to do you say
>> 0...n vs 1..n?
>
> I'd vote for Perl's RE syntax...
>
> {n} Match exactly n times
> {n,} Match at least n times
> {n,m} Match at least n, at most m times
>
> ...but I know the curly braces are gonna wreak havoc with the
> existing ANTLR syntax.
Yeah the curlies could be an issue. Hmm...the uncertainties of n,m also
mess with the analysis. :(
> Um, that just doesn't look quite right, but since I don't have a
> better solution, I won't press the point. :-)
Yeah, that's the problem with adding significant features requiring
syntax changes...it can get really messy. If I build ANTLR 3.0, I'll
build the complete spec first, get buy-in from everybody, and then code
it methodically. :)
Ter
--
Chief Scientist & Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list