简体   繁体   中英

LALR(1) or GLR on Windows - Alternatives to Bison++ / Flex++ that are current?

UPDATE: This question is out of date, but left for informational purposes.

Original Question

I have been using the same version of bison++ (1.21-8) and flex++ (2.3.8-7) since 2002.

I'm not looking for an alternative to LALR(1) or GLR at this time, just looking for the most current options. Is anyone aware of any later ports of these than the original that aren't Cygwin dependent?

What are other folks using in Windows environments for C++ compiler development (besides ANTLR or Boost.spirit)? Commercial options are ok, if you have firsthand experience. I do need to compile on Linux as well.

UPDATE: This old question was asked when I wasn't aware of the policies about tool recommendations (not sure if policy existed in 2010 but regardless...

I since updated to Bison 3.0 which has GLR capabilities and have begun experimenting with that.

I eventually decided that any rewrite of my parser would be a recursive descent, to improve error reporting and allow easier use in tools besides the compiler, so for now I will complete the reference version in Bison. I see little point in converting to a different PG tool at this time.

You can try Elsa (now it is a part of Oink project). But it is almost dead now. The only attractive feature of it is that there is a complete and robust C and C++ parser is written on top of it.

LLVM contains a reasonably modern parsing framework. And there is a C++ parser as well (see clang project).

Some Packrat implementations for C++ are available, sort of the most trendy thing in parsing.

I like ANTLR a lot. Boost Spirit is a bit "out there" for serious production applications.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM