Fixed "dot" bug with CNAME reported by Nathan Pride

This commit is contained in:
kvisco%ziplink.net 2000-03-27 22:32:20 +00:00
Родитель 6c441bce14
Коммит b08adb781b
2 изменённых файлов: 18 добавлений и 13 удалений

Просмотреть файл

@ -25,13 +25,13 @@
* Bob Miller, Oblix Inc., kbob@oblix.com
* -- fixed bug with single quotes inside double quotes
*
* $Id: ExprLexer.cpp,v 1.4 2000-02-17 03:30:31 kvisco%ziplink.net Exp $
* $Id: ExprLexer.cpp,v 1.5 2000-03-27 22:31:56 kvisco%ziplink.net Exp $
*/
/**
* Lexical analyzer for XPath expressions
* @author <a href="mailto:kvisco@ziplink.net">Keith Visco</a>
* @version $Revision: 1.4 $ $Date: 2000-02-17 03:30:31 $
* @version $Revision: 1.5 $ $Date: 2000-03-27 22:31:56 $
**/
#include <iostream.h>
@ -569,6 +569,8 @@ void ExprLexer::parse(const String& pattern) {
else if ( prevToken->type == Token::SELF_NODE ) {
prevToken->type = Token::PARENT_NODE;
}
else if ( tokenBuffer.length() > 0 )
tokenBuffer.append(ch);
else matchDelimiter(ch);
break;
case COLON:

Просмотреть файл

@ -3,39 +3,40 @@
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is TransforMiiX XSLT processor.
*
*
* The Initial Developer of the Original Code is The MITRE Corporation.
* Portions created by MITRE are Copyright (C) 1999 The MITRE Corporation.
*
* Portions created by Keith Visco as a Non MITRE employee,
* (C) 1999 Keith Visco. All Rights Reserved.
*
* Contributor(s):
*
* Contributor(s):
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
* $Id: Parser.cpp,v 1.2 1999-11-15 07:13:13 nisheeth%netscape.com Exp $
*
* $Id: Parser.cpp,v 1.3 2000-03-27 22:32:20 kvisco%ziplink.net Exp $
*/
/**
* Test App for Expressions
* @author <A HREF="mailto:kvisco@ziplink.net">Keith Visco</A>
* @version $Revision: 1.2 $ $Date: 1999-11-15 07:13:13 $
* @version $Revision: 1.3 $ $Date: 2000-03-27 22:32:20 $
**/
#include <iostream.h>
#include "String.h"
#include "Expr.h"
#include "ExprLexer.h"
#include "ExprParser.h"
#include "String.h"
#include "NamedMap.h"
#include <iomanip.h>
#include "ExprResult.h"
void main(int argc, char** argv) {
@ -43,7 +44,9 @@ void main(int argc, char** argv) {
cout <<endl;
//String pattern("element[position()=1]");
//String pattern("*[text()='foo']");
String pattern("@*|node()");
//String pattern("@*|node()");
String pattern("tag.dot");
cout <<"Lexically Analyzing: "<<pattern<<endl;
cout<<endl;