From f134c1f96541111e111f00e620118c1813c0d412 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 17 Jun 2010 10:56:13 +0100 Subject: [PATCH] A fix at last for the lexing bug for terms that begin with digits -- thanks to Erik Hetzner for the patch. --- src/main/java/org/z3950/zing/cql/CQLLexer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- 1.7.10.4