help-bison
[Top][All Lists]
Advanced

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

Re: Parser base class (lalr1)


From: Jan Nabbefeld
Subject: Re: Parser base class (lalr1)
Date: Wed, 28 Sep 2005 21:02:30 +0200
User-agent: Mutt/1.5.11

Hello,
On 28.09.2005, Hans Aberg wrote:
> On 28 Sep 2005, at 14:37, Jan Nabbefeld wrote:
> I use a C++ polymorphic hierarchy, with a reference count at the  
> base, in order to avoid unnecessary copying.
> This approach has also the advantage of making use of C++ cleanup
> The code above then becomes:
>
> cd_list: /* empty */ {$$=0;}
>     | cd_list cd { $$ = new NRec(token, _CD_LIST, $1, $2, _CD); }
> ;
> [snip]

That's a nice solution but unfortunately no option for me. As I
mentioned, there is no way for me to change the semantic actions. My
mission is to rebuild an existing C implemented scanner/parser in C++.
The semantic actions have to be untouched (as far as possible). 

> >I know lalr1.cc skeleton is experimantal and not supported so I  
> >don't complain about that. Would be nice to have the possibility  
> >again without customize the skeleton.
> When Akim has finished the writing of %define, customizing will be
> easy.

Whats the plan? Can you give some details? The idea of defining code
snippets via the %defines statements sounds good and was nicely
implemented by %define root ... (at least for me ;-)). 





reply via email to

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