From 67f64c7e8fc4d7e4ca99d018fdfbaa81638d3fd5 Mon Sep 17 00:00:00 2001 From: "kvisco%ziplink.net" Date: Tue, 23 May 2000 08:30:09 +0000 Subject: [PATCH] Added changes by Marina for lang() git-svn-id: svn://10.0.0.236/trunk@70667 18797224-902f-48f8-a5cc-f745e15eee43 --- .../transformiix/source/xpath/ExprParser.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/mozilla/extensions/transformiix/source/xpath/ExprParser.cpp b/mozilla/extensions/transformiix/source/xpath/ExprParser.cpp index 6dcfd663f20..b3330e111eb 100644 --- a/mozilla/extensions/transformiix/source/xpath/ExprParser.cpp +++ b/mozilla/extensions/transformiix/source/xpath/ExprParser.cpp @@ -20,13 +20,17 @@ * Contributor(s): * Keith Visco, kvisco@ziplink.net * -- original author. + * * Olivier Gerardin, ogerardin@vo.lu + * -- added support for number function calls * -- fixed a bug in CreateExpr (@xxx=/yyy was parsed as @xxx=@xxx/yyy) + * * Marina Mechtcheriakova + * -- added support for lang() * -- fixed bug in ::parsePredicates, * made sure we continue looking for more predicates. * - * $Id: ExprParser.cpp,v 1.4 2000-04-19 10:35:52 kvisco%ziplink.net Exp $ + * $Id: ExprParser.cpp,v 1.5 2000-05-23 08:30:09 kvisco%ziplink.net Exp $ */ /** @@ -34,7 +38,7 @@ * This class is used to parse XSL Expressions * @author Keith Visco * @see ExprLexer - * @version $Revision: 1.4 $ $Date: 2000-04-19 10:35:52 $ + * @version $Revision: 1.5 $ $Date: 2000-05-23 08:30:09 $ **/ #include "ExprParser.h" @@ -411,6 +415,9 @@ FunctionCall* ExprParser::createFunctionCall(ExprLexer& lexer) { else if ( XPathNames::FALSE_FN.isEqual(tok->value) ) { fnCall = new BooleanFunctionCall(); } + else if ( XPathNames::LANG_FN.isEqual(tok->value) ) { + fnCall = new BooleanFunctionCall(BooleanFunctionCall::TX_LANG); + } else if ( XPathNames::LAST_FN.isEqual(tok->value) ) { fnCall = new NodeSetFunctionCall(NodeSetFunctionCall::LAST); } @@ -669,6 +676,11 @@ PathExpr* ExprParser::createPathExpr(ExprLexer& lexer) { case Token::R_PAREN: case Token::R_BRACKET: case Token::UNION_OP: + //Marina, addition start + // When parsing a list of parameters for a function comma should signal a spot + // without it further processing pathExpr was causing "invalid token" error + case Token::COMMA: + // Marina, addition ends lexer.pushBack(); return pathExpr; case Token::ANCESTOR_OP :