main_testing3/re_test4.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Sun, 15 Sep 2024 12:57:59 +0100
changeset 493 244df77507c2
parent 475 59e005dcf163
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
475
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
     1
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
     2
def urbanmain() = {
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
     3
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
     4
  import M3._
153
4383809c176a updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
475
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
     6
  assert(denest(List(ONE, ZERO, ALTs(List(ONE, CHAR('a'))))) == List(ONE, ONE, CHAR('a')))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
     7
  assert(denest(List(ONE ~ ONE, ZERO, ZERO | ONE)) == List(ONE ~ ONE, ZERO, ONE))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
     8
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
     9
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
    10
}