lex/yacc for C++

Posted on 1997-11-27
Last Modified: 2006-11-17
I'm looking for lex/yacc for C++. I found flex++ which serves my purpose from the parser point of view. Now yacc I found bison++ but the problem is that bison is very strict with respect to copyright. It says that if I use bison then any software created by using bison should be free. I need this in a commercial application so I can't use bison. Is there any other yacc++ which is like flex++ with respect to copying issues?
Question by:agj

Expert Comment

ID: 1174286

Expert Comment

ID: 1174287
If bison++ say you can not sell your application then flex should do the same. They are part of the same GNU project. Anyway there are several comersion lex/yacc application that can create c++ code. I don't remember any names. But I think one was called visual yacc.
LVL 15

Expert Comment

by:Tommy Hui
ID: 1174288
You should check out MKS Yacc and Lex. They provide the PC version of the UNIX tools with the same name.
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.


Author Comment

ID: 1174289
I was not looking for the PC version. I need it in unix. Anyway, I started looking more closely and they redefined the conditions on bison. As of bison 1.24 I'm able to use for non-free software. I am hence, using bison++/flex++.

Accepted Solution

os012897 earned 100 total points
ID: 1174290
Have a look at PCCTS!

You can find it at:

It does what you want and even has some nice documentation
coming with it!



PS: If you do not need an answer anymore, delete your question!

Expert Comment

ID: 1174291
Take a look at AnaGram.  It is FAR AND AWAY superior to lex/flex/YACC/Bison/PCCTS, etc.  You can find it at  It isn't free, however.



Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question