Mercurial > hg > Members > masakoha > testcode
changeset 129:b930be74a16e pairPro
remove word.h
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 01 Dec 2015 23:05:53 +0900 |
parents | f827682d4687 |
children | 7925e9abb078 |
files | c/regexParser/Makefile c/regexParser/main.cc c/regexParser/regexParser.cc c/regexParser/regexParser.h c/regexParser/word.h |
diffstat | 5 files changed, 7 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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; }
--- 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;
--- 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;