main_testing3/re_test8.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Mon, 26 Dec 2022 16:49:53 +0000
changeset 458 d9f8245d0861
parent 433 6af86ba1208f
child 475 59e005dcf163
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
403
ffce7b61b446 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 347
diff changeset
     1
import M3._ 
221
9e7897f25e13 updated
Christian Urban <urbanc@in.tum.de>
parents: 215
diff changeset
     2
val EVIL_urban = SEQ(STAR(STAR(CHAR('a'))), CHAR('b'))
153
4383809c176a updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
433
6af86ba1208f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 403
diff changeset
     4
assert(size(der('a', der('a', EVIL_urban))) == 36)
6af86ba1208f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 403
diff changeset
     5
assert(size(der('a', der('a', der('a', EVIL_urban)))) == 83)
153
4383809c176a updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
433
6af86ba1208f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 403
diff changeset
     7
assert(size(ders("aaaaaa".toList, EVIL_urban)) == 7)
6af86ba1208f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 403
diff changeset
     8
assert(size(ders(("a" * 50).toList, EVIL_urban)) == 7)