summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 41b1327)
raw | patch | inline | side by side (parent: 41b1327)
author | ishmal <ishmal@users.sourceforge.net> | |
Thu, 13 Jul 2006 20:08:17 +0000 (20:08 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Thu, 13 Jul 2006 20:08:17 +0000 (20:08 +0000) |
src/dom/xpathparser.cpp | patch | blob | history | |
src/dom/xpathtoken.cpp | patch | blob | history | |
src/dom/xpathtoken.h | patch | blob | history |
index cb06a0fb263d9e145e4b6812e11f102b7433484a..abbbb090060da6ec5506b4810b13e7ce6f3838dd 100644 (file)
--- a/src/dom/xpathparser.cpp
+++ b/src/dom/xpathparser.cpp
{
case ANCESTOR_OR_SELF:
tokAdd(Token::TOK_AXIS_ANCESTOR_OR_SELF);
+ break;
case ANCESTOR:
tokAdd(Token::TOK_AXIS_ANCESTOR);
+ break;
case ATTRIBUTE:
tokAdd(Token::TOK_AXIS_ATTRIBUTE);
+ break;
case CHILD:
tokAdd(Token::TOK_AXIS_CHILD);
+ break;
case DESCENDANT_OR_SELF:
tokAdd(Token::TOK_AXIS_DESCENDANT_OR_SELF);
+ break;
case DESCENDANT:
tokAdd(Token::TOK_AXIS_DESCENDANT);
+ break;
case FOLLOWING_SIBLING:
tokAdd(Token::TOK_AXIS_FOLLOWING_SIBLING);
+ break;
case FOLLOWING:
tokAdd(Token::TOK_AXIS_FOLLOWING);
+ break;
case NAMESPACE:
tokAdd(Token::TOK_AXIS_NAMESPACE);
+ break;
case PARENT:
tokAdd(Token::TOK_AXIS_PARENT);
+ break;
case PRECEDING_SIBLING:
tokAdd(Token::TOK_AXIS_PRECEDING_SIBLING);
+ break;
case PRECEDING:
tokAdd(Token::TOK_AXIS_PRECEDING);
+ break;
case SELF:
tokAdd(Token::TOK_AXIS_SELF);
+ break;
default:
{
error("unknown axis type %d", axisType);
diff --git a/src/dom/xpathtoken.cpp b/src/dom/xpathtoken.cpp
index f08dfe7e3b7498b4d586d4b5d8e5d98499eb7df8..fa81e2863a6eb13a723435251d5c80b93842b3db 100644 (file)
--- a/src/dom/xpathtoken.cpp
+++ b/src/dom/xpathtoken.cpp
//# V A L U E S
//###########################
+/**
+ * The following functions are called by a token's execute()
+ * method. These functions are what differentiate one token
+ * from another and give each its personality.
+*/
+
static bool tokStr(Token &tok, Stack &stack)
{
StackItem item;
-
-
+/**
+ * An entry for the token 'personality' table
+ */
typedef struct
{
int ival;
TokenFunc tokenFunc;
} TokenTableEntry;
+
+/**
+ * The token personality table
+ */
static TokenTableEntry tokenTable[] =
{
//### primitives
diff --git a/src/dom/xpathtoken.h b/src/dom/xpathtoken.h
index 61d6cf6efb44228fbf64ca402fc98657d68163b4..71e096d46c0b7b58d9784586993779505429ff7b 100644 (file)
--- a/src/dom/xpathtoken.h
+++ b/src/dom/xpathtoken.h
type = TOK_NOP;
ival = 0L;
dval = 0.0;
+ //sval = ""; //not necessary
}
void assign(const Token &other)