author | Christian Urban <christian.urban@kcl.ac.uk> |
Fri, 26 Apr 2024 17:36:41 +0100 | |
changeset 487 | efad9725dfd8 |
parent 475 | 59e005dcf163 |
permissions | -rw-r--r-- |
475 | 1 |
|
2 |
def urbanmain() = { |
|
300 | 3 |
|
475 | 4 |
import M3._ |
5 |
||
6 |
val EVIL_urban = SEQ(STAR(STAR(CHAR('a'))), CHAR('b')) |
|
300 | 7 |
|
8 |
||
475 | 9 |
assert(simp(Iterator.iterate(ONE:Rexp)(r => SEQ(r, ONE | ONE)).drop(50).next) == ONE) |
10 |
assert(simp(Iterator.iterate(ONE:Rexp)(r => ALT(r, r)).drop(20).next) == ONE) |
|
11 |
assert(matcher(EVIL_urban, "a" * 1000000) == false) |
|
12 |
assert(matcher(EVIL_urban, "a" * 1000000 ++ "b") == true) |
|
13 |
} |