[antlr-interest] nesting rules, getting rule text

Anthony Youngman Anthony.Youngman at ECA-International.com
Tue Mar 9 03:19:22 PST 2004


The problem I find is actually FINDING all this stuff. I have a bit of
an aversion to hypertext, much prefer a linear hard copy in front of me,
and find RMS's addiction to "info" for GNU documentation highly
offensive ...

Anyway, enough of the rant ... and I know - the rule is "if you want it,
why don't you write it", but a FAQ, clearly signposted, that consists of
a mildly complicated, highly documented, teaching grammar would be well
received. There are some wonderful resources out there, but IME it's
been a case of either pointers to "get you started" stuff, or a case of
"look at the supplied grammars" (but which one do I want to study for a
"teach yourself" course?).

I'm not saying there isn't anything out there, but I am frustrated time
and time again in that I seem to find either elementary stuff aimed at
newbies, or reference stuff aimed at experts. It's almost impossible to
find stuff aimed at the "I know you're experienced but have never met
this before" level guy. When I started programming in C I went on a
"Beginning C for experienced programmers" course - the prerequisite
being you had to know one - any - computer language well but were
presumed to know nothing about C at all. Where do you find stuff like
that?

Cheers,
Wol

-----Original Message-----
From: mzukowski at yci.com [mailto:mzukowski at yci.com] 
Sent: 04 March 2004 17:57
To: antlr-interest at yahoogroups.com
Subject: RE: [antlr-interest] nesting rules, getting rule text

Yeah, it seems people need a guide to reading the code sometimes.  This
stuff is in Ter's lectures, but maybe something that pointed out
techniques
used in the examples would be helpful too for those of you who just
start
hacking away?

Monty

-----Original Message-----
From: Robin Debreuil [mailto:robin at debreuil.com] 
Sent: Thursday, March 04, 2004 9:49 AM
To: antlr-interest at yahoogroups.com
Subject: Re: [antlr-interest] nesting rules, getting rule text

Great Monty, thanks - these little tips of yours are really helpful to
those
of us running blind here : ). I will structure things that way then...

Cheers,
Robin


----- Original Message -----
From: <mzukowski at yci.com>
To: <antlr-interest at yahoogroups.com>
Sent: Thursday, March 04, 2004 11:25 AM
Subject: RE: [antlr-interest] nesting rules, getting rule text


> Yeah, typically you wouldn't nest at each DOT, you would have one root
and
> then all the DOT WHATEVERs as children.  The java grammar or C grammar
> should have examples of this.
>
> Monty
>
> -----Original Message-----
> From: Robin Debreuil [mailto:robin at debreuil.com]
> Sent: Thursday, March 04, 2004 2:30 AM
> To: antlr-interest at yahoogroups.com
> Subject: Re: [antlr-interest] nesting rules, getting rule text
>
> Hmm, I got it to work like:
>
> primary_expression!
> { AST curAst = null;}
>  :    ps:primary_start
>       {curAst = ps_AST;}
>      (
>          ma:member_access
>             {     curAst.setFirstChild(ma_AST);
>                    curAst=ma_AST;
>             }
>      )*
>     {#primary_expression = #ps;}
>  ;
>
> Maybe there is an easier way? Maybe I 'dont want' this in the first
> place...?
>
> Cheers,
> Robin
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>



 
Yahoo! Groups Links



 


 
Yahoo! Groups Links



 





***********************************************************************************

This transmission is intended for the named recipient only. It may contain private and confidential information. If this has come to you in error you must not act on anything disclosed in it, nor must you copy it, modify it, disseminate it in any way, or show it to anyone. Please e-mail the sender to inform us of the transmission error or telephone ECA International immediately and delete the e-mail from your information system.

Telephone numbers for ECA International offices are: Sydney +61 (0)2 9911 7799, Hong Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1 212 582 2333.

***********************************************************************************



 
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