equal
deleted
inserted
replaced
1 import M3._ |
1 import M3._ |
2 |
2 |
3 val EVIL_urban = SEQ(STAR(STAR(CHAR('a'))), CHAR('b')) |
3 assert(SEQs_smart(Nil) == ONE) |
4 |
4 assert(SEQs_smart(List(ZERO)) == ZERO) |
5 |
5 assert(SEQs_smart(List(CHAR('a'))) == CHAR('a')) |
6 assert(simp(Iterator.iterate(ONE:Rexp)(r => SEQ(r, ONE | ONE)).drop(50).next) == ONE) |
6 assert(SEQs_smart(List(ONE ~ ONE)) == ONE ~ ONE) |
7 assert(simp(Iterator.iterate(ONE:Rexp)(r => ALT(r, r)).drop(20).next) == ONE) |
7 assert(SEQs_smart(List(ONE, ONE)) == SEQs(List(ONE, ONE))) |
8 assert(matcher(EVIL_urban, "a" * 1000000) == false) |
8 assert(ALTs_smart(Nil) == ZERO) |
9 assert(matcher(EVIL_urban, "a" * 1000000 ++ "b") == true) |
9 assert(ALTs_smart(List(ONE ~ ONE)) == ONE ~ ONE) |
|
10 assert(ALTs_smart(List(ZERO, ZERO)) == ALTs(List(ZERO, ZERO))) |