author | Christian Urban <urbanc@in.tum.de> |
Sun, 03 Nov 2019 14:42:17 +0000 | |
changeset 308 | e86add5a6961 |
parent 300 | 72688efdf17c |
permissions | -rw-r--r-- |
300 | 1 |
import CW9c._ |
2 |
||
3 |
val EVIL_urban = SEQ(STAR(STAR(CHAR('a'))), CHAR('b')) |
|
4 |
||
5 |
||
6 |
assert(simp(Iterator.iterate(ONE:Rexp)(r => SEQ(r, ONE | ONE)).drop(50).next) == ONE) |
|
7 |
assert(simp(Iterator.iterate(ONE:Rexp)(r => ALT(r, r)).drop(20).next) == ONE) |
|
8 |
assert(matcher(EVIL_urban, "a" * 1000000) == false) |
|
9 |
assert(matcher(EVIL_urban, "a" * 1000000 ++ "b") == true) |