A fix at last for the lexing bug for terms that begin with digits --
authorMike Taylor <mike@miketaylor.org.uk>
Thu, 17 Jun 2010 09:56:13 +0000 (10:56 +0100)
committerMike Taylor <mike@miketaylor.org.uk>
Thu, 17 Jun 2010 09:56:13 +0000 (10:56 +0100)
thanks to Erik Hetzner <erik.hetzner@ucop.edu> for the patch.

src/main/java/org/z3950/zing/cql/CQLLexer.java

index 5df3822..7aca234 100644 (file)
@@ -69,7 +69,11 @@ class CQLLexer extends StreamTokenizer {
        ordinaryChar('(');
        ordinaryChar(')');
        wordChars('\'', '\''); // prevent this from introducing strings
-       parseNumbers();
+       //parseNumbers();
+       ordinaryChar('-');
+       wordChars('-', '-');
+       ordinaryChars('0', '9');
+       wordChars('0', '9');
        DEBUG = lexdebug;
     }