equal
deleted
inserted
replaced
|
1 def rev(r: Rexp) : Rexp = r match { |
|
2 case ZERO => ZERO |
|
3 case ONE => ONE |
|
4 case CHAR(c) => CHAR(c) |
|
5 case ALT(r1, r2) => ALT(rev(r1), rev(r2)) |
|
6 case SEQ(r1, r2) => SEQ(rev(r2), rev(r1)) |
|
7 case STAR(r) => STAR(rev(r)) |
|
8 } |