[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Retrieving the last "$$"
From: |
Joel E. Denny |
Subject: |
Re: Retrieving the last "$$" |
Date: |
Thu, 23 Jul 2009 12:35:16 -0400 (EDT) |
User-agent: |
Alpine 1.00 (DEB 882 2007-12-20) |
On Thu, 23 Jul 2009, F van der Meeren wrote:
> > > But when the parser has finished parsing, I need to get a hold on the last
> > > "$$".
> >
> > By "the last $$", do you mean the semantic value of the start symbol?
> > One way is to add a new start symbol and rule:
>
> By "$$" I mean the last semantic value that has been constructed by the many
> grammar rules. The application is window-based, so there will be more than one
> instance at any given time.
>
> >
> > start_new: start_old { /* access $1 here */ } ;
You can use %parse-param to specify a pointer argument, p, for
yypush_parse. You can then set *p in the final semantic action.