Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Public Attributes
Token Struct Reference

A Token class for the ExprLexer. More...

#include <sqliteInt.h>

Inheritance diagram for Token:
Inheritance graph
[legend]
Collaboration diagram for Token:
Collaboration graph
[legend]

List of all members.

Public Types

enum  Type {
  NULL_TOKEN = 1, LITERAL, NUMBER, CNAME,
  FUNCTION_NAME, VAR_REFERENCE, PARENT_NODE, SELF_NODE,
  R_PAREN, R_BRACKET, COMMA, AT_SIGN,
  L_PAREN, L_BRACKET, AXIS_IDENTIFIER, AND_OP,
  OR_OP, EQUAL_OP, NOT_EQUAL_OP, LESS_THAN_OP,
  GREATER_THAN_OP, LESS_OR_EQUAL_OP, GREATER_OR_EQUAL_OP, ADDITION_OP,
  SUBTRACTION_OP, DIVIDE_OP, MULTIPLY_OP, MODULUS_OP,
  PARENT_OP, ANCESTOR_OP, UNION_OP, COMMENT,
  NODE, PROC_INST, TEXT, END
}
 Token types. More...
typedef
nsASingleFragmentString::const_char_iterator 
iterator
 Constructors.

Public Member Functions

 Token (iterator aStart, iterator aEnd, Type aType)
 Token (iterator aChar, Type aType)
const nsDependentSubstring Value ()

Public Attributes

const unsigned char * z
unsigned dyn: 1
unsigned n: 31
iterator mStart
iterator mEnd
Type mType
TokenmNext
TokenmPrevious
const char * mWord
PRUint32 mLength
PRUint32 mCount
double mProbability
double mDistance
PLDHashNumber keyHash

Detailed Description

A Token class for the ExprLexer.

This class was ported from XSL:P, an open source Java based XSLT processor, written by yours truly.

Definition at line 854 of file sqliteInt.h.


Member Typedef Documentation

typedef nsASingleFragmentString::const_char_iterator Token::iterator

Constructors.

Definition at line 125 of file ExprLexer.h.


Member Enumeration Documentation

Token types.

Enumerator:
NULL_TOKEN 
LITERAL 
NUMBER 
CNAME 
FUNCTION_NAME 
VAR_REFERENCE 
PARENT_NODE 
SELF_NODE 
R_PAREN 
R_BRACKET 
COMMA 

start of tokens for 3.7, bullet 1 ExprLexer::nextIsOperatorToken bails if the tokens aren't consecutive.

AT_SIGN 
L_PAREN 
L_BRACKET 
AXIS_IDENTIFIER 
AND_OP 

operators

OR_OP 
EQUAL_OP 
NOT_EQUAL_OP 
LESS_THAN_OP 
GREATER_THAN_OP 
LESS_OR_EQUAL_OP 
GREATER_OR_EQUAL_OP 
ADDITION_OP 
SUBTRACTION_OP 
DIVIDE_OP 
MULTIPLY_OP 
MODULUS_OP 
PARENT_OP 
ANCESTOR_OP 
UNION_OP 
COMMENT 

end of tokens for 3.7, bullet 1 -/

NODE 
PROC_INST 
TEXT 
END 

Definition at line 60 of file ExprLexer.h.

              {
        //-- Trivial Tokens
        NULL_TOKEN = 1,
        LITERAL,
        NUMBER,
        CNAME,
        FUNCTION_NAME,
        VAR_REFERENCE,
        PARENT_NODE,
        SELF_NODE,
        R_PAREN,
        R_BRACKET, // 10
        COMMA,
        AT_SIGN,
        L_PAREN,
        L_BRACKET,
        AXIS_IDENTIFIER,

        //-- boolean ops
        AND_OP, // 16
        OR_OP,

        //-- relational
        EQUAL_OP, // 18
        NOT_EQUAL_OP,
        LESS_THAN_OP,
        GREATER_THAN_OP,
        LESS_OR_EQUAL_OP,
        GREATER_OR_EQUAL_OP,
        //-- additive operators
        ADDITION_OP, // 24
        SUBTRACTION_OP,
        //-- multiplicative
        DIVIDE_OP , // 26
        MULTIPLY_OP,
        MODULUS_OP,
        //-- path operators
        PARENT_OP, // 29
        ANCESTOR_OP,
        UNION_OP,
        //-- node type tokens
        COMMENT, // 32
        NODE,
        PROC_INST,
        TEXT,
        
        //-- Special endtoken
        END // 36
    };

Constructor & Destructor Documentation

Token::Token ( iterator  aStart,
iterator  aEnd,
Type  aType 
) [inline]

Definition at line 127 of file ExprLexer.h.

        : mStart(aStart),
          mEnd(aEnd),
          mType(aType),
          mNext(nsnull),
          mPrevious(nsnull)
    {
    }
Token::Token ( iterator  aChar,
Type  aType 
) [inline]

Definition at line 135 of file ExprLexer.h.

        : mStart(aChar),
          mEnd(aChar + 1),
          mType(aType),
          mNext(nsnull),
          mPrevious(nsnull)
    {
    }

Member Function Documentation

Definition at line 144 of file ExprLexer.h.

    {
        return Substring(mStart, mEnd);
    }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

unsigned Token::dyn

Definition at line 856 of file sqliteInt.h.

Definition at line 113 of file pldhash.h.

Definition at line 108 of file nsBayesianFilter.cpp.

Definition at line 110 of file nsBayesianFilter.cpp.

Definition at line 149 of file ExprLexer.h.

Definition at line 107 of file nsBayesianFilter.cpp.

Definition at line 151 of file ExprLexer.h.

Definition at line 153 of file ExprLexer.h.

Definition at line 109 of file nsBayesianFilter.cpp.

Definition at line 149 of file ExprLexer.h.

Definition at line 150 of file ExprLexer.h.

Definition at line 106 of file nsBayesianFilter.cpp.

unsigned Token::n

Definition at line 857 of file sqliteInt.h.

const unsigned char* Token::z

Definition at line 855 of file sqliteInt.h.


The documentation for this struct was generated from the following files: