A Java to HTML converter

09 Jul 2007

Over on javacc-users we've been discussing syntax highlighting; I wrote a little highlighting app last week, and I've been thinking about this a bit since then.

So, along a similar line of thought, here's a simple Java to HTML converter. It's not as fancy as java2html, but the grammar has some interesting parts, including no SPECIAL_TOKEN definitions, a conversion of Java to HTML within a COMMON_TOKEN_ACTION, and bonafide token definitions (vs SKIP tokens) for whitespace characters. It was fun to write and hopefully it'll be useful for someone.

My JavaCC book will be in stock near the end of this week, yay!