I fixed the PREFIX definition in QueryParser.jj, changed:
(<_TERM_START_CHAR> | "") (<_TERM_CHAR>) "*" >
("") | ( <_TERM_START_CHAR> (<_TERM_CHAR>) "*" ) >
which I think is more correct, and this solved the problem.
However this caused another parsing test (testSimple) to fail - aparently from other reasons: the standard analyzer used in that test is lower casing the query tokens, which have umlauts - and this fails, because the lower casing is done char by char (Character.lowercase). I think that the wrong definition of PREFIXTERM was masking this behavior before. I am not sure yet if this is a bug, but for testSimple to pass for now I would modify the test to use a non lowercasing analyzer when umlauts are present. Please comment if you think this is a bug.
Another tehnical issue that came up is line endings - compiling on XP, using cygwin, the javacc result files had wrong line endings.
Fixed that with
perl -p -e 's/(\r\n|\n|\r)/\n/g' QueryParser.java_fromJavacc > QueryParser,java
Do others have this problem?
Is there is a standard solution for this (other than installing *Nix?)
If not I may look into allowing to fix this by build.xml.
Will have a patch with the fix later today.