From: Mike Taylor Date: Thu, 17 Jun 2010 09:56:13 +0000 (+0100) Subject: A fix at last for the lexing bug for terms that begin with digits -- X-Git-Tag: v1.7~10 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=f134c1f96541111e111f00e620118c1813c0d412;p=cql-java-moved-to-github.git A fix at last for the lexing bug for terms that begin with digits -- thanks to Erik Hetzner for the patch. --- diff --git a/src/main/java/org/z3950/zing/cql/CQLLexer.java b/src/main/java/org/z3950/zing/cql/CQLLexer.java index 5df3822..7aca234 100644 --- a/src/main/java/org/z3950/zing/cql/CQLLexer.java +++ b/src/main/java/org/z3950/zing/cql/CQLLexer.java @@ -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; }