Mercurial > hg > Applications > Grep
view c/regexParser/regexParser.h @ 143:32977f5a2ed0 pairPro
add charClassMerge
author | masa |
---|---|
date | Fri, 11 Dec 2015 15:04:58 +0900 |
parents | de0f332d560c |
children | d8a4922eceae |
line wrap: on
line source
#include "error.h" #define NEW(type) (type*)malloc(sizeof(type)) typedef struct word { unsigned char *word; int length; } Word, *WordPtr; typedef struct utf8Range { unsigned long begin; unsigned long end; struct utf8Range *next; // only used in the parser. } RangeList , *RangeListPtr; typedef union condition { RangeList range; Word w; } Condition, *ConditionList; typedef struct charClass { unsigned char type; struct charClass *left; struct charClass *right; Condition cond; BitVector nextState; } 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; int orNum; bool asterFlag; } RegexInfo, *RegexInfoPtr;