--- a/progs/lexer/lexer.sc Wed Oct 25 13:54:11 2023 +0100
+++ b/progs/lexer/lexer.sc Thu Oct 26 14:30:20 2023 +0100
@@ -59,9 +59,6 @@
-val r : Rexp = ("a" | "b").%
-println(r)
-
def nullable(r: Rexp) : Boolean = r match {
case ZERO => false
case ONE => true
@@ -84,8 +81,6 @@
case RECD(_, r1) => der(c, r1)
}
-println(der('a', ALT(STAR("a"), "b")))
-
// extracts a string from a value
def flatten(v: Val) : String = v match {
case Empty => ""
@@ -338,7 +333,8 @@
//
// which has been removed in Scala 3.
//
-// for escaping strings in Scala 3
+// for escaping strings in Scala 3 use this equivalent code
+
import scala.quoted._
def escapeImpl(raw: Expr[String])(using Quotes): Expr[String] = {