Mercurial > hg > Members > masakoha > testcode
changeset 77:7f53a587bf97
add regexParser.h
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 28 Sep 2015 16:51:13 +0900 |
parents | d98a036441e2 |
children | 23a96fefa643 |
files | c/regexParser/main.cc c/regexParser/regexParser.h |
diffstat | 2 files changed, 21 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/c/regexParser/main.cc Fri Aug 28 20:36:16 2015 +0900 +++ b/c/regexParser/main.cc Mon Sep 28 16:51:13 2015 +0900 @@ -9,28 +9,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> - -typedef struct node { - unsigned char type; - union value { - charClass *cc; - unsigned char character; - } Value, *ValuePtr; - struct node *self; - struct node *parent; - struct node *left; - struct node *right; -} Node, *NodePtr; - -typedef struct charClass { - NodePtr nextState[256]; - struct utf8Range { - unsigned char *begin; - unsigned char *end; - struct utf8Range *next; - NodePtr nextState; - } *rangeList; -} CharClass, *CharClassPtr; +#include "regexParser.h" unsigned char *ptr; unsigned char tokenType;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/c/regexParser/regexParser.h Mon Sep 28 16:51:13 2015 +0900 @@ -0,0 +1,20 @@ +typedef struct charClass { + unsigned char table[256]; + struct utf8Range { + unsigned char *begin; + unsigned char *end; + struct utf8Range *next; + } *rangeList; +} CharClass, *CharClassPtr; + +typedef struct node { + unsigned char type; + union value { + charClass cc; + unsigned char character; + } Value, *ValuePtr; + struct node *self; + struct node *parent; + struct node *left; + struct node *right; +} Node, *NodePtr;