testing3/re1b_test.scala
author Christian Urban <urbanc@in.tum.de>
Wed, 29 Nov 2017 21:22:29 +0000
changeset 160 863feeb5c760
parent 153 4383809c176a
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
153
4383809c176a updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
160
863feeb5c760 updated
Christian Urban <urbanc@in.tum.de>
parents: 153
diff changeset
     2
//import scala.concurrent._
863feeb5c760 updated
Christian Urban <urbanc@in.tum.de>
parents: 153
diff changeset
     3
//import scala.concurrent.duration._
863feeb5c760 updated
Christian Urban <urbanc@in.tum.de>
parents: 153
diff changeset
     4
//import ExecutionContext.Implicits.global
863feeb5c760 updated
Christian Urban <urbanc@in.tum.de>
parents: 153
diff changeset
     5
//import scala.language.postfixOps 
863feeb5c760 updated
Christian Urban <urbanc@in.tum.de>
parents: 153
diff changeset
     6
//import scala.language.reflectiveCalls
153
4383809c176a updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
4383809c176a updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
160
863feeb5c760 updated
Christian Urban <urbanc@in.tum.de>
parents: 153
diff changeset
     9
//lazy val f = Future {
153
4383809c176a updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
  import CW8a._
4383809c176a updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
4383809c176a updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
  assert(der('a', ZERO | ONE) == (ZERO | ZERO))
4383809c176a updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
  assert(der('a', (CHAR('a') | ONE) ~ CHAR('a')) == ALT((ONE | ZERO) ~ CHAR('a'), ONE))
4383809c176a updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
  assert(der('a', STAR(CHAR('a'))) == (ONE ~ STAR(CHAR('a'))))
4383809c176a updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
  assert(der('b', STAR(CHAR('a'))) == (ZERO ~ STAR(CHAR('a'))))
160
863feeb5c760 updated
Christian Urban <urbanc@in.tum.de>
parents: 153
diff changeset
    16
//}
153
4383809c176a updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
160
863feeb5c760 updated
Christian Urban <urbanc@in.tum.de>
parents: 153
diff changeset
    18
//Await.result(f, 120 second)