I've got a 3 week break between school and my next co-op term. I picture a very boring 3 weeks (aside from Christmas stuff).
I had this idea a long time ago but never really looked into it much: Parse any Java file and output the result in a perfectly indented and spaced program. All the braces, one space before and after operators, truncate extraneous space, etc...
On the face of it, this is a very simple program. But there are lots of intricacies in Java. And I plan on not using lexical analysis aids, like JLex.
What am I getting myself into? I don't see this as being any less than a thousand lines of code since there are "groups" of Java keywords that require different things in terms of braces (as an example), like "try", "for", "if", etc...
I'll probably need a small database for the keywords and a tokenizer method of some sort. Probably parsing one character at a time and some sort of (non-)deterministic finite automaton.