[antlr-interest] Quick Question

Prashant Deva prashant.deva at gmail.com
Mon Jul 3 06:51:11 PDT 2006


:)

-- 
Prashant Deva
Creator, ANTLR Studio
Founder, Placid Systems, www.placidsystems.com

On 7/3/06, Hill, Robert <rhill03 at eds.com> wrote:
>
>  thanks, for the quick answer Prashant, speedy as always :)
>
> --
> *Rob Hill*
> *EDS - Hallamshire Business Park*
> *F1E/045*
> *Sheffield       *
> *T:      +44 (0) 114 291 1928*
> *M:      +44 (0) 791 732 1227*
> *E:      **rhill03 at eds.com* <rhill03 at eds.com>**
>
>
>  ------------------------------
> *From:* Prashant Deva [mailto:prashant.deva at gmail.com]
> *Sent:* 03 July 2006 14:06
> *To:* Hill, Robert
> *Cc:* ANTLR Interest
> *Subject:* Re: [antlr-interest] Quick Question
>
> Seems ok to me.
> --
> Prashant Deva
> Creator, ANTLR Studio
> Founder, Placid Systems, www.placidsystems.com
>
> On 7/3/06, Hill, Robert <rhill03 at eds.com> wrote:
> >
> >  Recently revisiting an old parser, and came across this
> >
> > QUOTE   (i1:WORD | i2:IDENT)* {***if (i1==null) returnString.Append(
> > i2.getText()); else returnString.Append(i1.getText());* }*
> >
> > So, is it acceptable (good form?) to replace the above with
> >
> > QUOTE   {returnString = LT(1).getText(); } (WORD | IDENT)
> >
> > I can't see any problem with the generated code, other than possibly the
> > return string not having the correct token on a mismatch which isn't an
> > issue in this case. I just want to cut down on the clutter.
> >
> > Or am I missing something ?
> > Cheers,
> >
> > Rob
> >
> > --
> > *Rob Hill*
> > *EDS - Hallamshire Business Park*
> > *F1E/045*
> > *Sheffield       *
> > *T:      +44 (0) 114 291 1928*
> > *M:      +44 (0) 791 732 1227*
> > *E:      **rhill03 at eds.com* <rhill03 at eds.com>**
> >
> >
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060703/45233139/attachment.html


More information about the antlr-interest mailing list