author | Christian Urban <christian.urban@kcl.ac.uk> |
Fri, 15 Jan 2021 02:47:51 +0000 | |
changeset 385 | 44383203970f |
parent 347 | 4de31fdc0d67 |
child 403 | ffce7b61b446 |
permissions | -rw-r--r-- |
347 | 1 |
import CW8c._ |
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) |