marking4/re_test5.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Thu, 02 Nov 2023 12:37:58 +0000
changeset 473 ac79c2e534bd
parent 288 65731df141a5
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
val EVIL_urban = SEQ(STAR(STAR(CHAR('a'))), CHAR('b'))
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
assert(size(der('a', der('a', EVIL_urban))) == 28)
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
assert(size(der('a', der('a', der('a', EVIL_urban)))) == 58)
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
assert(size(ders("aaaaaa".toList, EVIL_urban)) == 8)
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
assert(size(ders(("a" * 50).toList, EVIL_urban)) == 8)