Mercurial > hg > Applications > Grep
changeset 140:84a2a5209d3a pairPro
change some variable name
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 09 Dec 2015 19:57:22 +0900 |
parents | 6c258910cacb |
children | 71f36a59cf6a |
files | c/regexParser/bitVector.cc c/regexParser/bitVector.h c/regexParser/main.cc c/regexParser/subsetConstraction.h c/regexParser/transition.cc c/regexParser/transition.h |
diffstat | 6 files changed, 14 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/c/regexParser/bitVector.cc Mon Dec 07 02:20:13 2015 +0900 +++ b/c/regexParser/bitVector.cc Wed Dec 09 19:57:22 2015 +0900 @@ -2,13 +2,11 @@ #include <stdlib.h> #include <string.h> #include "bitVector.h" -const BitVectorPtr allocateBitVector(); -void bitSet(BitVectorPtr bi, int bitSetPosition); BitVectorPtr createBitVector(NodePtr n) { - BitVectorPtr nextBvl = allocateBitVector(); - bitSet(nextBvl,n->nodeNumber); - return nextBvl; + BitVectorPtr bi = allocateBitVector(); + bitSet(bi,n->nodeNumber); + return bi; } const BitVectorPtr allocateBitVector() {
--- a/c/regexParser/bitVector.h Mon Dec 07 02:20:13 2015 +0900 +++ b/c/regexParser/bitVector.h Wed Dec 09 19:57:22 2015 +0900 @@ -5,7 +5,6 @@ unsigned long bitContainer; }BitVector,*BitVectorPtr; -typedef struct bitVectorList { - bitVectorList *self; - bitVectorList *next; -}BitVectorList, *BitVectorListPtr; +BitVectorPtr createBitVector(NodePtr n); +const BitVectorPtr allocateBitVector(); +void bitSet(BitVectorPtr bi, int bitSetPosition);
--- a/c/regexParser/main.cc Mon Dec 07 02:20:13 2015 +0900 +++ b/c/regexParser/main.cc Wed Dec 09 19:57:22 2015 +0900 @@ -5,8 +5,6 @@ extern NodePtr regex(RegexInfoPtr); extern void printTree(NodePtr); -BitVectorListPtr createBitVectorList(NodePtr); - int main(int argc, char **argv) {
--- a/c/regexParser/subsetConstraction.h Mon Dec 07 02:20:13 2015 +0900 +++ b/c/regexParser/subsetConstraction.h Wed Dec 09 19:57:22 2015 +0900 @@ -1,13 +1,13 @@ #include "transition.h" typedef struct transitionGenerator { - TransitionPtr t; - StatePtr state; + TransitionPtr ts; + BitVectorPtr state; long stateMax; } TransitionGenerator, *TransitionGeneratorPtr; typedef struct tgValue { - TransitionPtr t; + TransitionPtr ts; bool asterisk; } TGValue, *TGValuePtr;
--- a/c/regexParser/transition.cc Mon Dec 07 02:20:13 2015 +0900 +++ b/c/regexParser/transition.cc Wed Dec 09 19:57:22 2015 +0900 @@ -1,10 +1,6 @@ #include <stdlib.h> #include "transition.h" -TransitionPtr createTransition(CharClass,BitVectorPtr); -TransitionPtr appendTransition0(TransitionPtr,TransitionPtr); -TransitionPtr appendTransition(TransitionPtr,TransitionPtr); - TransitionPtr createTransition(CharClassPtr cc, BitVectorPtr state) { TransitionPtr transition = (TransitionPtr)malloc(sizeof(Transition)); transition->condition = cc;
--- a/c/regexParser/transition.h Mon Dec 07 02:20:13 2015 +0900 +++ b/c/regexParser/transition.h Wed Dec 09 19:57:22 2015 +0900 @@ -10,6 +10,11 @@ TransitionPtr transition; struct state *next; } State, *StatePtr; + +TransitionPtr createTransition(CharClassPtr cc ,BitVectorPtr state); +TransitionPtr appendTransition0(TransitionPtr curr,TransitionPtr next); +TransitionPtr appendTransition(TransitionPtr curr,TransitionPtr next); + /* 正規表現木を辿って transition のList をつくる CharClass のかさなりを判定して重なりのない新しいCharClassをつくる