Submitted For Your Consideration

Howdy! I busted out flex to read some archaic config file a couple weeks ago and noticed that the C++ stuff hadn't changed all that much since the last time I looked at it (Which I think was 2005-ish.) So I thought I'd take a crack at cleaning it up. With these changes, if you specify --yyclass= to flex, it'll generate your_class.yy.h and derive your class from yyFlexLexer. If your_class.yy.h already exists, it won't touch it.

The derived scanner can than be modified to include extra stuff inside your new scanner class, and these ought not to conflict with each other if you have multiple scanners in the same program. I also included a simple example of how to use one, in the examples directory.

This feels pretty comfortable to me, so I'm kicking it over for you to take a look at. Feel free to kick it back if you don't like it.