[antlr-interest] The Classic else (Non-)Ambiguity

Andreas Stefik stefika at gmail.com
Tue May 4 11:18:36 PDT 2010


> I think "specified language" is the key here. What I specify and what
> I mean are often two different things, especially in early
> development. The more a tool can help me with "did you really mean
> that", the better.
>
> I've gotta say you have an interesting argument here, but I always get
> afeared of the "slippery slope" and "trickle-down" effects. After
> this, what would be the next "only reasonable way" that we move into
> the tool? It makes the tool less general-purpose, and could end up
> having some unintended consequences.
>
> Of course there is another option: you can create your own parser
> generator that does this. If this feature and others prove more
> helpful and easier to understand, natural selection should take its
> course...
>
> I prefer to have tools be a wee-bit less clever so I don't need to
> understand their cleverness to use them, though it's a fine line to
> find...
>

Well said, Scott. I know in our case, the grammars we define often have a
plethora of complex cases, which aren't always easy to find or diagnose, let
alone fix. All else being equal, those extra warnings can be very helpful
sometimes. In the few cases where are sort of extraneous, I can deal with
that.

Stefik


More information about the antlr-interest mailing list