[java] Add ability to parse from a string (lexerInput = "char[]").
genmain=true and defaultExtension="..." generates main class for testing.
tests on genmain and char[] input