view c/regexParser/regexParser.h @ 89:50a146c05192

add NodeNumber in Regex Parser tree
author Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
date Fri, 23 Oct 2015 17:20:54 +0900
parents 5072a44ed842
children 912d7bd51f38
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 tokenType;
    int nodeNumber;
    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;