Flex and Bison for CodeWarrior


What are they?

Flex is a tool for generating "lexers", software that scans a stream of text and breaks it into tokens. Similarly Bison generates "parsers", which examine a series of tokens and perform actions according to rules in a "grammar". The upshot is that programmers can define a language and set of rules, then parse a text file and execute code based on the contents -- such as counting words or compiling source code into an executable.


What's special about these?

These plugins bring Flex and Bison to Metrowerks CodeWarrior for the MacOS. Please note that there are several other ports of Flex and Bison to the MacOS, and may even be other implementations of these plugins.

Where do I get them?

That's easy enough. You can download the Bison/Flex Plugins (296k) right now. I've also uploaded the sources (1280k) to build them as well, but they are based on a very old version of the Dropin API. If you want to compile them, you need to download the latest Dropin API) and perform some heavy surgery to get them to work.

I don't mind if you repost the plugins, source, or modified source to other sites, but I'd appreciate a pointer back here and an email so I can track them. I'm eager to keep my copies up to date.


Notes

  • b2 (1/22/99): Fixed bad 'Flag' resource in Flex plugin, and cleaned up other resource issues.
  • b1 (9/19/98): My initial port and public release.

  • Disclaimer

    I needed Flex and Bison tools for a project, and the only CodeWarrior plugins I found were woefully out of date and buggy. When I finally got access to the source, I just massaged them to compile and run. They seem to work for me me and that's all I care about at this time -- still, they really need alot more work.

    I do not support these plugins. I don't have the time to handle bug reports, act as a reference manual, or otherwise bother with them. I've simply placed the sources online so that others can have access to them. As mentioned above, everything is based on old APIs and will require lots of work to compile again.

    That said, eventually I would like to see these edits merged into the main Flex and Bison distributions, but that's going to require a fair bit of gruntwork. If anyone does take the time to fix bugs, add features, or otherwise cleanup the code -- I'd love to see the changes. While I don't have any time to do the work, I'm still interested in keeping up with the latest version.


    Credits

    These people worked hard to bring Bison and Flex to CodeWarrior:
    Christian Lehner
    Original port to CodeWarrior plugins.
    Loic Vandereyken
    Worked to support on CWPro for Windows.
    Andrew Cunningham, andrewc@vasci.com
    Ported to CWPro3 plugin APIs, updated to Flex 2.5.4 and Bison 1.25, fixed bugs in prefs panels.
    Matt Slot, fprefect@ambrosiasw.com
    Converted multiple projects to single project with multiple targets, reorganized the source tree, fixed 680x0 plugins, posted to public Web site.
    These plugins are in no way associated with Metrowerks, so don't bother them with your troubles.

    More Info

    If you really want to learn about Flex and Bison, pick up the O'Reilly book on "Lex and Yacc" which details the many variants of these lexers and parsers. If you want to learn more about Metrowerks, CodeWarrior, or making plugins for CodeWarrior, go to their Web site or the newsgroup csmp.cw.

    Last updated on 1/22/99.