view c/regexParser/regexParser.h @ 85:5072a44ed842

add Word
author masa
date Thu, 08 Oct 2015 20:07:32 +0900
parents 27883946b2dc
children 50a146c05192
line wrap: on
line source

typedef struct charClass {
    unsigned char table[256];
    struct utf8Range {
        unsigned char *begin;
        unsigned char *end;
        struct utf8Range *next;
    } *rangeList;
} CharClass, *CharClassPtr;

typedef struct word {
    unsigned char *word;
    long length;
} Word, *WordPtr;

typedef struct node {
    unsigned char type;
    union value {
        CharClassPtr cc;
        unsigned char character;
        WordPtr w;
    } Value, *ValuePtr;
    struct node *self;
    struct node *parent;
    struct node *left;
    struct node *right;
} Node, *NodePtr;

typedef struct regexInfo {
    unsigned char *ptr;
    unsigned char tokenType;
    int tokenValue;
} RegexInfo, *RegexInfoPtr;