main_testing3/re_test1.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Thu, 10 Nov 2022 09:52:40 +0000
changeset 438 a02e9efd7bc9
parent 430 4029552de5fc
child 472 fbff6f601370
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
403
312c9eb39ad8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 347
diff changeset
     1
import M3._
221
d061f3a94fa7 updated
Christian Urban <urbanc@in.tum.de>
parents: 215
diff changeset
     2
d061f3a94fa7 updated
Christian Urban <urbanc@in.tum.de>
parents: 215
diff changeset
     3
assert(nullable(ZERO) == false)
d061f3a94fa7 updated
Christian Urban <urbanc@in.tum.de>
parents: 215
diff changeset
     4
assert(nullable(ONE) == true)
d061f3a94fa7 updated
Christian Urban <urbanc@in.tum.de>
parents: 215
diff changeset
     5
assert(nullable(CHAR('a')) == false)
d061f3a94fa7 updated
Christian Urban <urbanc@in.tum.de>
parents: 215
diff changeset
     6
assert(nullable(ZERO | ONE) == true)
d061f3a94fa7 updated
Christian Urban <urbanc@in.tum.de>
parents: 215
diff changeset
     7
assert(nullable(ZERO | CHAR('a')) == false)
d061f3a94fa7 updated
Christian Urban <urbanc@in.tum.de>
parents: 215
diff changeset
     8
assert(nullable(ONE ~  ONE) == true)
d061f3a94fa7 updated
Christian Urban <urbanc@in.tum.de>
parents: 215
diff changeset
     9
assert(nullable(ONE ~ CHAR('a')) == false)
d061f3a94fa7 updated
Christian Urban <urbanc@in.tum.de>
parents: 215
diff changeset
    10
assert(nullable(STAR(ZERO)) == true)
430
4029552de5fc updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 403
diff changeset
    11
assert(nullable(ALTs(List(ONE, CHAR('a'), ZERO))) == true)
4029552de5fc updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 403
diff changeset
    12
assert(nullable(SEQs(List(ONE, ALTs(List(ONE, CHAR('a'), ZERO)), STAR(ZERO)))) == true)
221
d061f3a94fa7 updated
Christian Urban <urbanc@in.tum.de>
parents: 215
diff changeset
    13