marking4/re_test6.scala
author Christian Urban <urbanc@in.tum.de>
Wed, 30 Oct 2019 14:07:58 +0000
changeset 288 65731df141a5
parent 245 975d34506e88
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
288
65731df141a5 updated
Christian Urban <urbanc@in.tum.de>
parents: 245
diff changeset
     1
import CW9c._
168
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
val EVIL_urban = SEQ(STAR(STAR(CHAR('a'))), CHAR('b'))
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
245
975d34506e88 added marking
Christian Urban <urbanc@in.tum.de>
parents: 227
diff changeset
     6
assert(simp(Iterator.iterate(ONE:Rexp)(r => SEQ(r, ONE | ONE)).drop(50).next) == ONE)
975d34506e88 added marking
Christian Urban <urbanc@in.tum.de>
parents: 227
diff changeset
     7
assert(simp(Iterator.iterate(ONE:Rexp)(r => ALT(r, r)).drop(20).next) == ONE)
975d34506e88 added marking
Christian Urban <urbanc@in.tum.de>
parents: 227
diff changeset
     8
assert(matcher(EVIL_urban, "a" * 1000000) == false)
975d34506e88 added marking
Christian Urban <urbanc@in.tum.de>
parents: 227
diff changeset
     9
assert(matcher(EVIL_urban, "a" * 1000000 ++ "b") == true)