# HG changeset patch # User Masataka Kohagura # Date 1448978753 -32400 # Node ID b930be74a16e3a5862e51d5f1591dc3296dd6bbe # Parent f827682d4687c05107ae124971b1b61baa106840 remove word.h diff -r f827682d4687 -r b930be74a16e c/regexParser/Makefile --- a/c/regexParser/Makefile Tue Dec 01 22:50:58 2015 +0900 +++ b/c/regexParser/Makefile Tue Dec 01 23:05:53 2015 +0900 @@ -3,7 +3,7 @@ CC= clang++ SRCS_TMP = $(wildcard *.cc) -SRCS_EXCLUDE = determinize.cc +SRCS_EXCLUDE = determinize.cc subsetConstraction.cc SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP)) OBJS = $(SRCS:.cc=.o) diff -r f827682d4687 -r b930be74a16e c/regexParser/main.cc --- a/c/regexParser/main.cc Tue Dec 01 22:50:58 2015 +0900 +++ b/c/regexParser/main.cc Tue Dec 01 23:05:53 2015 +0900 @@ -22,6 +22,5 @@ printf("regex : %s\n",ri->ptr); NodePtr n = regex(ri); printTree(n); - createBitVectorList(n); return 0; } diff -r f827682d4687 -r b930be74a16e c/regexParser/regexParser.cc --- a/c/regexParser/regexParser.cc Tue Dec 01 22:50:58 2015 +0900 +++ b/c/regexParser/regexParser.cc Tue Dec 01 23:05:53 2015 +0900 @@ -22,7 +22,7 @@ static NodePtr allocateNode() { - NodePtr n = (NodePtr)malloc(sizeof(node)); + NodePtr n = NEW(Node); n->cc = NULL; n->left = NULL; n->right = NULL; diff -r f827682d4687 -r b930be74a16e c/regexParser/regexParser.h --- a/c/regexParser/regexParser.h Tue Dec 01 22:50:58 2015 +0900 +++ b/c/regexParser/regexParser.h Tue Dec 01 23:05:53 2015 +0900 @@ -1,8 +1,12 @@ -#include "word.h" #include "error.h" #define NEW(type) (type*)malloc(sizeof(type)) +typedef struct word { + unsigned char *word; + int length; +} Word, *WordPtr; + typedef struct utf8Range { unsigned char *begin; unsigned char *end; @@ -11,7 +15,6 @@ typedef union condition { RangeListPtr range; - unsigned char character; WordPtr w; } Condition, *ConditionList; diff -r f827682d4687 -r b930be74a16e c/regexParser/word.h --- a/c/regexParser/word.h Tue Dec 01 22:50:58 2015 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -typedef struct word { - unsigned char *word; - int length; -} Word, *WordPtr;