diff -r 76a98ed71a2a -r 6589afc6789b progs/re1.scala --- 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)