Sign in to follow this  

Parsing for C++ on Windows

This topic is 2844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone. I've looked into Lex/Yacc/Flex/Bison, and I for the life of me cannot figure out how they're supposed to work. They seem to be for some CLI OS, and I don't know how to work them. Is there anything that I can use on Windows, or is this just a stupid question altogether? Thanks all

Share this post


Link to post
Share on other sites
You write your grammar/lexeme file, as per the instructions you can find just about anywhere, then open up a console window (try Start->Run->"cmd.exe"), and type
lex/flex/yacc/bison/whatever your_file_here

For example, to create the lexer from a file called "tokens.l", you type
lex tokens.l
, and the program creates a C file which is saved in the folder you called the command from.

Share this post


Link to post
Share on other sites
antlr
Boost.Spirit
I can't say much about the first but I have a little experience with spirit, it's a nice and easy library which as far as I found has 1 downside: it creates many and very complicated compile errors.

[Edited by - flammable on March 2, 2010 10:54:51 AM]

Share this post


Link to post
Share on other sites

This topic is 2844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this