Mercurial > hg > Applications > Grep
comparison regexParser/regexParser.h @ 188:109d22faf7b5 pairPro
remove errors and warnings
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 25 Dec 2015 02:57:21 +0900 |
parents | ef798db705e9 |
children | 3e8e5780ad4a |
comparison
equal
deleted
inserted
replaced
187:ef798db705e9 | 188:109d22faf7b5 |
---|---|
1 #include "error.h" | 1 #include "error.h" |
2 | |
3 #define NEW(type) (type*)malloc(sizeof(type)) | 2 #define NEW(type) (type*)malloc(sizeof(type)) |
4 #define SYNTAX_NODENUMBER 100 | 3 #define SYNTAX_NODENUMBER 100 |
5 | 4 |
5 #ifndef INCLUDED_STRUCT | |
6 #define INCLUDED_STRUCT | |
6 typedef struct bitVector { | 7 typedef struct bitVector { |
7 unsigned long bitContainer; | 8 unsigned long bitContainer; |
8 }BitVector,*BitVectorPtr; | 9 }BitVector,*BitVectorPtr; |
9 | 10 |
10 typedef struct word { | 11 typedef struct word { |
56 long stateMax; | 57 long stateMax; |
57 StateStackPtr stack; | 58 StateStackPtr stack; |
58 node::StatePtr state; | 59 node::StatePtr state; |
59 node::StatePtr stateArray; | 60 node::StatePtr stateArray; |
60 node::StatePtr currentState; | 61 node::StatePtr currentState; |
62 node::StatePtr startState; | |
63 node::StatePtr endState; | |
61 } TransitionGenerator, *TransitionGeneratorPtr; | 64 } TransitionGenerator, *TransitionGeneratorPtr; |
62 | 65 |
63 typedef struct tgValue { | 66 typedef struct tgValue { |
64 bool asterisk; | 67 bool asterisk; |
65 int stateNum; | 68 int stateNum; |
91 unsigned char *ptr; | 94 unsigned char *ptr; |
92 unsigned char tokenType; | 95 unsigned char tokenType; |
93 unsigned char *tokenValue; | 96 unsigned char *tokenValue; |
94 int stateNumber; | 97 int stateNumber; |
95 } RegexInfo, *RegexInfoPtr; | 98 } RegexInfo, *RegexInfoPtr; |
96 | 99 #endif |
97 NodePtr createNode(RegexInfoPtr ri,unsigned char type,CharClassPtr cc, NodePtr left, NodePtr right); | 100 NodePtr createNode(RegexInfoPtr ri,unsigned char type,CharClassPtr cc, NodePtr left, NodePtr right); |
98 CharClassPtr createCharClassRange(unsigned long begin, unsigned long end, CharClassPtr left, CharClassPtr right); | 101 extern CharClassPtr createCharClassRange(unsigned long begin, unsigned long end,unsigned long state, CharClassPtr left, CharClassPtr right); |