changeset 546 | 6589afc6789b |
parent 513 | 676e6484f29b |
child 550 | 71fc4a7a7039 |
--- a/progs/re1.scala Mon Jan 01 15:02:03 2018 +0000 +++ b/progs/re1.scala Thu Feb 01 21:06:20 2018 +0000 @@ -50,6 +50,12 @@ der('b', r) der('c', r) +val r = SEQ(SEQ(CHAR('x'), CHAR('y')), CHAR('z')) +der('x', r) +der('y', der('x', r)) +der('z', der('y', der('x', r))) + + //optional regular expression (one or zero times) def OPT(r: Rexp) = ALT(r, ONE)