help-bison
[Top][All Lists]
Advanced

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

Re: What are the benefits to migrate from Bison++ to Bison


From: Timothy Madden
Subject: Re: What are the benefits to migrate from Bison++ to Bison
Date: Thu, 28 Jun 2012 18:28:20 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120607 Thunderbird/10.0.5

On 06/14/2012 04:55 PM, Fabricio Pellegrini wrote:
Hello,

I'm working in a project that long time ago decided to use Bison++ to create
its parser, mainly because at that time Bison didn't support C++ code.
So today, besides the fact that Bison++ is quite old and seems that no one
is supporting it anymore.

What would be the benefits to migrate from it to Bison?
Does Bison have a solid support for C++ today that justifies the migration?

First, it looks like you want to migrate from old bison to the newer bison++.

If that is so, it means you want to generate a bison C++ parser, instead of a bison C parser. This means your question is about whether or not to migrate from C to C++. It is not necessarily a topic for a bison discussion group, but it might still be considered somewhat related.

I am not a bison guy, but I think C++ has many more features and flexibility than plain old C (you can searh the internet for a list). I think this is a very good reason to migrate.

Still, some people claim C++ is slow compared to C. You should know this may be true only because of programmer's careless. As a more flexible language, C++ also makes it easier for the programmer to write slow code, and that is all about it.

Unfortunately as you can see sometimes that reflects badly on the language. C++ is not in itself slow, but on the contrary: sometime compilers generate faster code from C++ sources than from equivalent C sources.

Unlike in flex, the bison C++ interface is not marked as experimental, so you should be safe with it, but you should know that GLR parsers currently need the C interface from the old bison. These are parsers for languages that are sometimes ambiguous, meaning the same line of code could possible mean two different statements, depending on the following lines of code.


Have fun,
Timothy Madden




reply via email to

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