help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Retrieving the last "$$"


From: F van der Meeren
Subject: Re: Retrieving the last "$$"
Date: Thu, 23 Jul 2009 19:11:23 +0200

Thank you, that worked.
If you want I can keep you updated about the project...

On 23 Jul 2009, at 18:35, Joel E. Denny wrote:

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]