153
|
1 |
|
|
2 |
|
|
3 |
|
221
|
4 |
assert(simp(ZERO | ONE) == ONE)
|
|
5 |
assert(simp(STAR(ZERO | ONE)) == STAR(ZERO | ONE))
|
|
6 |
assert(simp(ONE ~ (ONE ~ (ONE ~ CHAR('a')))) == CHAR('a'))
|
|
7 |
assert(simp(ONE ~ (ONE ~ (ONE ~ ZERO))) == ZERO)
|
|
8 |
assert(simp(ALT(ONE ~ (ONE ~ (ONE ~ ZERO)), CHAR('a'))) == CHAR('a'))
|
|
9 |
assert(simp(CHAR('a') | CHAR('a')) == CHAR('a'))
|
|
10 |
assert(simp(ONE | CHAR('a')) == (ONE | CHAR('a')))
|
|
11 |
assert(simp(ALT((CHAR('a') | ZERO) ~ ONE,
|
|
12 |
((ONE | CHAR('b')) | CHAR('c')) ~ (CHAR('d') ~ ZERO))) == CHAR('a'))
|
153
|
13 |
|