Re: semantic actions

2007-03-01 Thread Hans Aberg
On 1 Mar 2007, at 21:25, Bob Rossi wrote: This way, invocation can take place as: std::ifstream ifs(...); semantic_value sv; parser p(...); ... ifs >> p >> sv; // Read and parse semantic value which I think is intuitive. Wow, that's a neat trick. I'll keep that in mind! Yeah, I li

Re: semantic actions

2007-03-01 Thread Bob Rossi
On Tue, Feb 27, 2007 at 07:20:31PM +0100, Hans Aberg wrote: > On 27 Feb 2007, at 16:51, Bob Rossi wrote: > > >I'm using bison along with it's semantic actions. In particular, I'm > >using the $$, $1, $2 constructs in order to help me build a parse > >tree. > > > >In the past, I've place the top

Re: semantic actions

2007-03-01 Thread Bob Rossi
On Tue, Feb 27, 2007 at 04:15:39PM -0500, Joel E. Denny wrote: > On Tue, 27 Feb 2007, Bob Rossi wrote: > > > However, I'm wondering if it's possible, after the parse is done, to ask > > bison to give you back the top level's rule $$ variable. That way, I > > don't have to keep around an extra glob