From 18cd4d5b25c3083e4ed18ce3b35f5dd0c9394c17 Mon Sep 17 00:00:00 2001 From: Bob Jamison Date: Sun, 23 Apr 2006 21:47:31 +0000 Subject: Move contextual info to Stack (bzr r578) --- src/dom/xpathparser.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/dom/xpathparser.cpp') diff --git a/src/dom/xpathparser.cpp b/src/dom/xpathparser.cpp index 6baaea9c5..f3c57f6f5 100644 --- a/src/dom/xpathparser.cpp +++ b/src/dom/xpathparser.cpp @@ -10,7 +10,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2005 Bob Jamison + * Copyright (C) 2006 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -31,6 +31,7 @@ #include "charclass.h" #include "xpathparser.h" + namespace org { namespace w3c @@ -45,6 +46,8 @@ namespace xpath //# M E S S A G E S //######################################################################### + + void XPathParser::trace(const char *fmt, ...) { if (!debug) @@ -60,6 +63,8 @@ void XPathParser::trace(const char *fmt, ...) va_end(args); } + + void XPathParser::error(const char *fmt, ...) { FILE *f = stdout; @@ -77,6 +82,8 @@ void XPathParser::error(const char *fmt, ...) fprintf(f, "^\n"); } + + void XPathParser::traceStack(const char *name, int pos, int depth) { if (!debug) @@ -94,6 +101,7 @@ void XPathParser::traceStack(const char *name, int pos, int depth) //######################################################################### //# L E X I C A L S C A N N I N G //######################################################################### + void XPathParser::lexTokAdd(int type, int loc) { LexTok tok(type, loc); @@ -296,6 +304,8 @@ int XPathParser::getNumber(int p0, double &dresult) return p; } + + int XPathParser::getLiteral(int p0, DOMString &result) { int p = p0; @@ -326,6 +336,10 @@ int XPathParser::getLiteral(int p0, DOMString &result) } + +/** + * NCName is a 'non-colonized' name + */ int XPathParser::getNCName(int p0, DOMString &result) { int p = p0; @@ -352,6 +366,11 @@ int XPathParser::getNCName(int p0, DOMString &result) return p; } + + +/** + * Name parsing with post-parsing + */ int XPathParser::getNameTest(int p0, DOMString &result) { int p = p0; -- cgit v1.2.3