equal
deleted
inserted
replaced
60 case CHAR(d) => if (c == d) ONE else ZERO |
60 case CHAR(d) => if (c == d) ONE else ZERO |
61 case ALTs(rs) => ALTs(rs.map(der(c, _))) |
61 case ALTs(rs) => ALTs(rs.map(der(c, _))) |
62 case SEQs(Nil) => ZERO |
62 case SEQs(Nil) => ZERO |
63 case SEQs(r1::rs) => |
63 case SEQs(r1::rs) => |
64 if (nullable(r1)) ALT(SEQs(der(c, r1)::rs), der(c, SEQs(rs))) |
64 if (nullable(r1)) ALT(SEQs(der(c, r1)::rs), der(c, SEQs(rs))) |
65 else SEQs(der(c, r1):: rs) |
65 else SEQs(der(c, r1) :: rs) |
66 case STAR(r1) => SEQ(der(c, r1), STAR(r1)) |
66 case STAR(r1) => SEQ(der(c, r1), STAR(r1)) |
67 } |
67 } |
68 |
68 |
69 |
69 |
70 // (3) |
70 // (3) |