diff --git a/src/dom/xpathparser.h b/src/dom/xpathparser.h
index 25001016e64bfa4dae5c3a7e4f8907a75059b106..1ad4b5f549025d0b459b68bb7181467632cab5e5 100644 (file)
--- a/src/dom/xpathparser.h
+++ b/src/dom/xpathparser.h
* Authors:
* Bob Jamison
*
- * Copyright (C) 2005 Bob Jamison
+ * Copyright (C) 2005-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
typedef struct
{
int ival;
- char *sval;
+ char const *sval;
} LookupEntry;
{
if (type == OPERATOR)
{
- char *tokenStr = "unknown";
- for (LookupEntry *entry = operatorTable; entry->sval ; entry++)
+ char const *tokenStr = "unknown";
+ for (LookupEntry const *entry = operatorTable; entry->sval ; entry++)
{
if (entry->ival == ival)
{
}
else if (type == NODE_TYPE)
{
- char *tokenStr = "unknown";
+ char const *tokenStr = "unknown";
for (LookupEntry *entry = nodeTypeTable; entry->sval ; entry++)
{
if (entry->ival == ival)
}
else if (type == AXIS_NAME)
{
- char *tokenStr = "unknown";
+ char const *tokenStr = "unknown";
for (LookupEntry *entry = axisNameTable; entry->sval ; entry++)
{
if (entry->ival == ival)
printf("#%f\n", dval);
else
{
- char *tokenStr = "unknown";
+ char const *tokenStr = "unknown";
for (LookupEntry *entry = exprTokenTable; entry->sval ; entry++)
{
if (entry->ival == type)
*/
XPathParser()
{
- debug = false;
+ debug = false;
}
/**
*
*/
- ~XPathParser() {}
+ virtual ~XPathParser() {}
/**
*
* This is the big one. Called by the xpath-dom api to fetch
* nodes from a DOM tree.
*/
- NodeList evaluate(const Node *root, const DOMString &str);
+ NodeList evaluate(const NodePtr root, const DOMString &str);
/**
*
*/
- void trace(const char *fmt, ...);
+ void trace(const char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
/**
*
/**
*
*/
- void error(const char *fmt, ...);
+ void error(const char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
//#################################
//# LEXICAL SCANNING
/**
* Add a newly derived token to the token list;
*/
- void tokAdd(Token *token);
+ void tokAdd(const Token &token);
+
+ void tokAdd(int type);
+
+ void tokAdd(int type, long val);
+
+ void tokAdd(int type, double val);
+
+ void tokAdd(int type, const DOMString &val);
+
/**
* The grammar definitions marked [1]-[39] are directly