[antlr-interest] Re: Indeterminacies
Lubos Vnuk
lubos.vnuk at rts.at
Tue Feb 17 05:53:10 PST 2004
Hi Chris,
I've just had a quick look and your nondeterminism may be avoided by
changing the params rule:
params
:
( SEMI ( WS )* param )+
;
Note the change from * to +
Your original params rule could have matched nothing, which is
usually to be avoided.
HTH,
Lubos.
--- In antlr-interest at yahoogroups.com, "offline314159" <offline at s...>
wrote:
> I've gotten a lot more done on that grammar i was asking about, but
> i'm still stuck on two points, and i was hoping that someone would
be
> willing to take the time to examine what i do have done and perhaps
> offer some critiques on it overall, and also help me with the two
> sticking points i have.
>
> The grammar is a bit large, so for politeness' sake i put it on my
> site at http://offline.pointclark.net/vcard.g , Feel free to snag it
> and look at it.
>
> Anyway, first thing is the two problems i'm having specifically:
>
> First, there are indeterminacies in the grammar on lines 39-51 (5 of
> them) that i don't get - i can't seem to get rid of them.
>
> Second, there's a part of the vcard spec that essentially allows the
> value for an item to be pretty much any format, so how do i look for
> that? When i reach the point in the line where there can be a
value,
> it could be plain text, quoted-printable, base64 encoded, or some
> other as-yet unknown arbitrary encoding. The only thing i do know
at
> this point is that i can pretty much be assured that everything
> following a colon in the line will be a value of some kind, and
> there's nothing else that comes after it.
>
> With respect to other critiques, as far as i'm concerned, if you're
> kind enough to take the time to examine this novice's work, i will
be
> more than happy to learn from you.
>
> Thanks in advance.
>
> --
> Chris
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list