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 18:16:09 +0200

On 23 Jul 2009, at 17:53, Joel E. Denny wrote:

On Thu, 23 Jul 2009, Filip van der Meeren wrote:

I am using bisons yypush_parse to evaluate my text.

Given that Bison's push parsing feature is relatively new, we're eager to
find out what you're using it for.  Is it working well for you so far?

I am using it to parse csh-scripts (the shell), to create a live step through engine, that since the csh-language itself doesn't provide the features needed to debug (bash does). I am planning to launch it on Sourceforge (or alike) from the minute I have a working beta...


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 */ } ;

Do you have any idea how to retrieve the $$ when using bison 2.4.1 with the
%define api.pure, %define api.push_pull "push" defined ?

I can't think of any difference between push and pull parsing for this
issue.






reply via email to

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