marking4/re_test2.scala
changeset 288 65731df141a5
parent 245 975d34506e88
equal deleted inserted replaced
287:c493eaba6018 288:65731df141a5
       
     1 import CW9c._
     1 
     2 
     2 assert(der('a', ZERO | ONE) == (ZERO | ZERO))
     3 assert(der('a', ZERO | ONE) == (ZERO | ZERO))
     3 assert(der('a', (CHAR('a') | ONE) ~ CHAR('a')) == ALT((ONE | ZERO) ~ CHAR('a'), ONE))
     4 assert(der('a', (CHAR('a') | ONE) ~ CHAR('a')) == ALT((ONE | ZERO) ~ CHAR('a'), ONE))
     4 assert(der('a', (CHAR('a') | CHAR('a')) ~ CHAR('a')) == (ONE | ONE) ~ CHAR('a'))
     5 assert(der('a', (CHAR('a') | CHAR('a')) ~ CHAR('a')) == (ONE | ONE) ~ CHAR('a'))
     5 assert(der('a', STAR(CHAR('a'))) == (ONE ~ STAR(CHAR('a'))))
     6 assert(der('a', STAR(CHAR('a'))) == (ONE ~ STAR(CHAR('a'))))