From 1a2f51e4f4ce85c47b4c802e91395f690a6a1e87 Mon Sep 17 00:00:00 2001 From: mike Date: Fri, 19 May 2006 17:45:36 +0000 Subject: [PATCH] Correctly lex numericalpha sequences such as "3d" as single tokens. Patch from Erik Hetzner --- src/org/z3950/zing/cql/CQLLexer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/z3950/zing/cql/CQLLexer.java b/src/org/z3950/zing/cql/CQLLexer.java index c5e072c..90f2167 100644 --- a/src/org/z3950/zing/cql/CQLLexer.java +++ b/src/org/z3950/zing/cql/CQLLexer.java @@ -1,4 +1,4 @@ -// $Id: CQLLexer.java,v 1.7 2006-05-05 21:39:14 mike Exp $ +// $Id: CQLLexer.java,v 1.8 2006-05-19 17:45:36 mike Exp $ package org.z3950.zing.cql; import java.io.StreamTokenizer; @@ -84,6 +84,7 @@ class CQLLexer extends StreamTokenizer { CQLLexer(String cql, boolean lexdebug) { super(new StringReader(cql)); + ordinaryChars ('0', '9'); wordChars('!', '?'); // ASCII-dependency! wordChars('[', '`'); // ASCII-dependency! quoteChar('"'); @@ -94,7 +95,6 @@ class CQLLexer extends StreamTokenizer { ordinaryChar('('); ordinaryChar(')'); wordChars('\'', '\''); // prevent this from introducing strings - parseNumbers(); DEBUG = lexdebug; } -- 1.7.10.4