equal
deleted
inserted
replaced
47 |
47 |
48 val r = STAR(ALT(SEQ(CHAR('a'), CHAR('b')), CHAR('b'))) |
48 val r = STAR(ALT(SEQ(CHAR('a'), CHAR('b')), CHAR('b'))) |
49 der('a', r) |
49 der('a', r) |
50 der('b', r) |
50 der('b', r) |
51 der('c', r) |
51 der('c', r) |
|
52 |
|
53 val r = SEQ(SEQ(CHAR('x'), CHAR('y')), CHAR('z')) |
|
54 der('x', r) |
|
55 der('y', der('x', r)) |
|
56 der('z', der('y', der('x', r))) |
|
57 |
52 |
58 |
53 //optional regular expression (one or zero times) |
59 //optional regular expression (one or zero times) |
54 def OPT(r: Rexp) = ALT(r, ONE) |
60 def OPT(r: Rexp) = ALT(r, ONE) |
55 |
61 |
56 //n-times regular expression (explicitly expanded) |
62 //n-times regular expression (explicitly expanded) |