author | Christian Urban <christian.urban@kcl.ac.uk> |
Fri, 25 Nov 2022 00:03:15 +0000 | |
changeset 448 | db2a3e3287a9 |
parent 433 | 6af86ba1208f |
child 475 | 59e005dcf163 |
permissions | -rw-r--r-- |
403 | 1 |
import M3._ |
300 | 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) |