marking4/re1b_test.scala
author Christian Urban <urbanc@in.tum.de>
Fri, 07 Dec 2018 08:54:34 +0000
changeset 241 c650a91db720
parent 227 b5f3e814a710
permissions -rw-r--r--
updated


import CW8a._

assert(der('a', ZERO | ONE) == (ZERO | ZERO))
assert(der('a', (CHAR('a') | ONE) ~ CHAR('a')) == ALT((ONE | ZERO) ~ CHAR('a'), ONE))
assert(der('a', (CHAR('a') | CHAR('a')) ~ CHAR('a')) == (ONE | ONE) ~ CHAR('a'))
assert(der('a', STAR(CHAR('a'))) == (ONE ~ STAR(CHAR('a'))))
assert(der('b', STAR(CHAR('a'))) == (ZERO ~ STAR(CHAR('a'))))