testing3/re1b_test.scala
changeset 160 863feeb5c760
parent 153 4383809c176a
equal deleted inserted replaced
159:92c31cbb1952 160:863feeb5c760
     1 
     1 
     2 import scala.concurrent._
     2 //import scala.concurrent._
     3 import scala.concurrent.duration._
     3 //import scala.concurrent.duration._
     4 import ExecutionContext.Implicits.global
     4 //import ExecutionContext.Implicits.global
     5 import scala.language.postfixOps 
     5 //import scala.language.postfixOps 
     6 import scala.language.reflectiveCalls
     6 //import scala.language.reflectiveCalls
     7 
     7 
     8 
     8 
     9 lazy val f = Future {
     9 //lazy val f = Future {
    10   import CW8a._
    10   import CW8a._
    11 
    11 
    12   assert(der('a', ZERO | ONE) == (ZERO | ZERO))
    12   assert(der('a', ZERO | ONE) == (ZERO | ZERO))
    13   assert(der('a', (CHAR('a') | ONE) ~ CHAR('a')) == ALT((ONE | ZERO) ~ CHAR('a'), ONE))
    13   assert(der('a', (CHAR('a') | ONE) ~ CHAR('a')) == ALT((ONE | ZERO) ~ CHAR('a'), ONE))
    14   assert(der('a', STAR(CHAR('a'))) == (ONE ~ STAR(CHAR('a'))))
    14   assert(der('a', STAR(CHAR('a'))) == (ONE ~ STAR(CHAR('a'))))
    15   assert(der('b', STAR(CHAR('a'))) == (ZERO ~ STAR(CHAR('a'))))
    15   assert(der('b', STAR(CHAR('a'))) == (ZERO ~ STAR(CHAR('a'))))
    16 }
    16 //}
    17 
    17 
    18 Await.result(f, 120 second)
    18 //Await.result(f, 120 second)