view c/regexParser/regexParser.h @ 125:4d6ac69801ad pairPro

fix createNode
author Nozomi
date Tue, 01 Dec 2015 21:11:27 +0900
parents 188d866227a4
children 639b0b437ebf
line wrap: on
line source

#include "word.h"
#include "error.h"
typedef union condition {
    struct utf8Range {
        unsigned char *begin;
        unsigned char *end;
        struct utf8Range *next;
    } *rangeList;
    unsigned char character;
    WordPtr w;
} Condition, *ConditionList;

typedef struct charClass {
    unsigned char type;
    ConditionList cond;
    struct charClass *left;
    struct charClass *right;
    unsigned char begin;
    unsigned char end;
} CharClass, *CharClassPtr;

typedef struct node {
    unsigned char tokenType;
    unsigned long nodeNumber;
    CharClassPtr cc;
    struct node *left;
    struct node *right;
} Node, *NodePtr;

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