[antlr-interest] on parsers look and feel + #["="]

Cristian Amitroaie cristian at amiq.ro
Mon Dec 1 08:51:06 PST 2003

On Monday 01 December 2003 15:18, Ric Klaren wrote:
> Hi,
> On Fri, Nov 28, 2003 at 05:57:39PM +0200, Cristian Amitroaie wrote:
> > We still have an issue, that is #[] constructs when building ASTs. It's
> > not straightforward. You need to write #[EQ, "="]. Why not #["="]?
> > Afterall antlr computes a token table with enum_type/string/numbers
> > associations...
> >
> > Maybe we should ask Terr for an enhancement?
> Doing this in the tree construction stuff is probably not a good idea.
> There's no unique mapping from AST type (e.g. as returned by getType()
> (first parameter of #[x,y]) and the text (as returned by getText(), 2nd
> parameter). So this can easily blow up. (As Thomas Brandon already pointed
> out if I recall right)

It could warn if not unique...

> Another reason against it is the crummy action parser interface in antlr
> I'd rather not see this added on top of that (at least I won't touch it
> with a 100ft pole after that happens unless its completely rewritten :)
> that piece of code is enough of a horror already :(

OK, than maybe a future enhancement (maniac :)? 

Yet, if you feel it can easily break, I'll take your word for that (hope as 
time goes I'll get it ;).

Thanks a lot,

> Cheers,
> Ric


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

More information about the antlr-interest mailing list