diff -r 115cf53a69d6 -r cd9e40280784 progs/scala/re-bit.scala --- a/progs/scala/re-bit.scala Fri Jun 24 12:35:16 2016 +0100 +++ b/progs/scala/re-bit.scala Wed Jul 20 14:30:07 2016 +0100 @@ -151,6 +151,7 @@ case c::cs => lex(der(c, r), cs) } +def pre_lexing(r: Rexp, s: String) = lex(internalise(r), s.toList) def lexing(r: Rexp, s: String) : Val = decode(r, lex(internalise(r), s.toList)) @@ -212,9 +213,13 @@ } - +val rf = ("a" | "ab") ~ ("ab" | "") +println(pre_lexing(rf, "ab")) +println(lexing(rf, "ab")) +println(lexing_simp(rf, "ab")) val r0 = ("a" | "ab") ~ ("b" | "") +println(pre_lexing(r0, "ab")) println(lexing(r0, "ab")) println(lexing_simp(r0, "ab"))