[antlr-interest] syntactic predicates and exceptions
Terence Parr
parrt at cs.usfca.edu
Wed Nov 16 10:39:58 PST 2005
On Nov 16, 2005, at 10:30 AM, Pete Gonzalez wrote:
> Terence Parr wrote:
>> Hi. First, are you parsing C# or are you parsing simple field/
>> value pairs?
>
> We are parsing field/value pairs, but the grammar was created by
> modifying an example grammar for C# from your web site. This may
> seem like overkill for simple field/value pairs, but the
> application requires parsers for several different languages with
> syntax similar to C#, so it made sense to use a common framework.
Ah. Makes sense.
> The exceptions I see right now are MismatchedCharException (1870
> times) and NoViableAltForCharException (3755 times).
The *LEXER* is backtracking? Oh gawd, it will kill you. See what
the java grammar does for matching numbers...I think it avoids them.
An exception per char is deadly.
>> Thanks very much for the valuable info. I'm going to try for no-
>> exceptions to see what happens. Note that v3 should make syn
>> preds MUCH less needed.
>
> How hard is it to convert 2.0 grammars for Antlr 3.0? How usable
> is the current "early access" build? What's the ETA for the
> official 3.0 release? These seem like basic questions, but I
> didn't see them in the FAQ. :-)
We don't have a faq yet ;) Gotta figure out why the wiki was
crashing and get that going again.
I'll be doing an auto-converter to 3.0. Current version I just
released is pretty usable if you ask me, but I'm going to try it out
on a real app soon to see if it does anything useful. It crashes on
bad input at the moment etc... I wouldn't bet my job on it yet ;)
3.0 eta will be next summer probably.
Ter
More information about the antlr-interest
mailing list