Re: Returning from Rules

2004-05-06 Thread Larry Wall
On Mon, Apr 19, 2004 at 01:06:29AM -0600, Luke Palmer wrote: : Therefore, the first syntax can be redefined to evaluate the code block : and assign the result to $0. The example now becomes: : : rule list { : , <{ make_node('list', $?term, $?list) }> : | <{ $?term

Re: Returning from Rules

2004-05-03 Thread Luke Palmer
Jeff Clites writes: > On Apr 19, 2004, at 12:06 AM, Luke Palmer wrote: > > >Therefore, the first syntax can be redefined to evaluate the code block > >and assign the result to $0. > > Would you ever want to leave $0 unaltered? That's the only concern > which comes to mind. Absoultely: if you wa

Re: Returning from Rules

2004-05-03 Thread Jeff Clites
On Apr 19, 2004, at 12:06 AM, Luke Palmer wrote: Therefore, the first syntax can be redefined to evaluate the code block and assign the result to $0. Would you ever want to leave $0 unaltered? That's the only concern which comes to mind. My argument for using this notation stems from the fact th

Re: Returning from Rules

2004-05-03 Thread Smylers
Luke Palmer writes: > <{ get_rule() }># call an anonymous rule returned by the code block > > Can also be written: > > <$( get_rule() )> > > Therefore, the first syntax can be redefined to evaluate the code block > and assign the result to $0. The example now becomes: > > rule