comparison regexParser/regexParser.cc @ 183:7ae0a3070647 pairPro

implement generateTransitionList
author Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
date Thu, 24 Dec 2015 20:02:09 +0900
parents d97bcab546e8
children d25f4f3b4c34
comparison
equal deleted inserted replaced
182:dbe004d03ef0 183:7ae0a3070647
26 } 26 }
27 27
28 static 28 static
29 NodePtr createNode(RegexInfoPtr ri,unsigned char type,CharClassPtr cc, NodePtr left, NodePtr right) { 29 NodePtr createNode(RegexInfoPtr ri,unsigned char type,CharClassPtr cc, NodePtr left, NodePtr right) {
30 NodePtr n = allocateNode(); 30 NodePtr n = allocateNode();
31
32 n->tokenType = type; 31 n->tokenType = type;
33 n->cc = cc; 32 n->cc = cc;
33 n->state = NULL;
34 n->left = left; 34 n->left = left;
35 n->right = right; 35 n->right = right;
36 n->nodeNumber = ri->stateNumber;
37 ri->stateNumber++;
38
39 return n; 36 return n;
40 } 37 }
41 38
42 CharClassPtr createCharClassWord(RegexInfoPtr ri) { 39 CharClassPtr createCharClassWord(RegexInfoPtr ri) {
43 CharClassPtr cc = NEW(CharClass); 40 CharClassPtr cc = NEW(CharClass);