Wednesday, February 1, 2012

Introducing... JPlex?

When I started using JFlex six months ago, I immediately began forming ideas for how a lexer ought to work. I didn't think I'd ever have the time or expertise to write my own lexer generator. But as they say, necessity is the mother of invention!

It took me a little over month to write, but I'm extremely proud of what I've created. It is, as far as I know, the only generator of push-driven lexers for Java. And like the KFlex wrapper I created for JFlex, its actions call methods of a listener interface, making the lexer a fully reusable application component.

I've shared my changes to the Automaton library with its author. I'm going to publish those changes along with the lexer generator, but not until I've actually used it in an application. I'm a bit embarrassed by the two or three projects I've created and abandoned on SourceForge, and I don't want to clutter the site any more until I have something that's definitely worth sharing. Plus, I'd like to come up with a better name than JPlex.

My push lexers will be the heart of Weapon M's database and terminal emulation. My goal of having a prototype ready by February 4th was absurdly unachievable, but the app is taking shape. I've given myself a refresher on JPA and started designing entity classes. From here, things should proceed rather quickly.

Not too quickly, though. My code is my art, and I want it to be beautiful.

No comments:

Post a Comment