Mercurial > hg > Members > masakoha > testcode
changeset 219:a8e477f1352d
add an example for subset construction
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 01 Jan 2016 00:05:57 +0900 |
parents | d10fa72d8f31 |
children | 4dc8d327cc7d |
files | regexParser/Makefile regexParser/main.cc |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/regexParser/Makefile Thu Dec 31 11:39:58 2015 +0900 +++ b/regexParser/Makefile Fri Jan 01 00:05:57 2016 +0900 @@ -77,6 +77,9 @@ ./regexParser -regex '[d-gh-ja-e]' ./regexParser -regex 'abcd' +test2: regexParser + ./regexParser -subset -regex '(a|b)*a(a|b)(a|b)' + merge_test: test/ccMerge ./test/ccMerge -regex '[f-i]' -regex 'e' ./test/ccMerge -regex '[f-i]' -regex 'f'
--- a/regexParser/main.cc Thu Dec 31 11:39:58 2015 +0900 +++ b/regexParser/main.cc Fri Jan 01 00:05:57 2016 +0900 @@ -27,7 +27,7 @@ NodePtr n = regex(&ri); // parse only printTree(n); - if (generate) { // NFA generation + if (generate && !subset) { // NFA generation TGValue tgv = generateTransitionList(n); printTree(n); printState(tgv.tg);