Mercurial > hg > Applications > Grep
comparison regexParser/regexParser.cc @ 260:3f3c9902bb6d
initialize node in allocateNode()
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 26 Jan 2016 14:30:20 +0900 |
parents | 61d4d466e64c |
children | 2f3e7bba038e |
comparison
equal
deleted
inserted
replaced
259:6a6546a753cf | 260:3f3c9902bb6d |
---|---|
16 */ | 16 */ |
17 static | 17 static |
18 NodePtr allocateNode() { | 18 NodePtr allocateNode() { |
19 NodePtr n = NEW(Node); | 19 NodePtr n = NEW(Node); |
20 n->cc = NULL; | 20 n->cc = NULL; |
21 n->stateNum = 0; | |
22 n->nextStateNum = 0; | |
23 n->state = NULL; | |
24 n->nextState = NULL; | |
21 n->left = NULL; | 25 n->left = NULL; |
22 n->right = NULL; | 26 n->right = NULL; |
23 n->stateNum = 0; | |
24 n->nextStateNum = 0; | |
25 return n; | 27 return n; |
26 } | 28 } |
27 | 29 |
28 NodePtr createNode(RegexInfoPtr ri,unsigned char type,CharClassPtr cc, NodePtr left, NodePtr right) { | 30 NodePtr createNode(RegexInfoPtr ri,unsigned char type,CharClassPtr cc, NodePtr left, NodePtr right) { |
29 NodePtr n = allocateNode(); | 31 NodePtr n = allocateNode(); |