help-bison
[Top][All Lists]
Advanced

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

Re: How to make C++-generated parser call yylex in some polymorphic way?


From: Oleksii Taran
Subject: Re: How to make C++-generated parser call yylex in some polymorphic way?
Date: Tue, 24 Dec 2013 09:54:45 +0200

Wow, thanks, John, I didn't think about using %parse-param in that way.

On Dec 22, 2013, at 8:05 PM, John Horigan <address@hidden> wrote:

> I have used the technique described here: 
> http://panthema.net/2007/flex-bison-cpp-example/
> 
> It works with vanilla Bison from 2.3 (maybe earlier) up through 3.0.
> 
> -- john
> 
> 
> 
> On Sun, Dec 22, 2013 at 9:04 AM, Oleksii Taran <address@hidden> wrote:
> Hi all
> 
> Is there a way to not call global C-style `yylex` function in generated C++ 
> parser? Now I just patch `lalr1.cc` to add pure virtual method `yylex` in 
> parser skeleton and override it in subclass. The downside is that I can't use 
> vanilla bison, and I must reapply patch on every update.
> 
> Do you have any ideas how to overcome this issue?
> 
> --
> Best regards,
> Oleksii Taran
> _______________________________________________
> address@hidden https://lists.gnu.org/mailman/listinfo/help-bison
> 



reply via email to

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