From: mike Date: Fri, 19 May 2006 17:45:36 +0000 (+0000) Subject: Correctly lex numericalpha sequences such as "3d" as single tokens. X-Git-Tag: v1.5~147 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=1a2f51e4f4ce85c47b4c802e91395f690a6a1e87;p=cql-java-moved-to-github.git Correctly lex numericalpha sequences such as "3d" as single tokens. Patch from Erik Hetzner --- 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; }