updated
authorcu
Tue, 03 Oct 2017 23:35:16 +0100
changeset 513 676e6484f29b
parent 512 a6aa52ecc1c5
child 514 bca9f8889a48
child 515 3566c8175e63
updated
progs/re1.scala
progs/re2.scala
--- a/progs/re1.scala	Tue Oct 03 23:01:06 2017 +0100
+++ b/progs/re1.scala	Tue Oct 03 23:35:16 2017 +0100
@@ -1,7 +1,5 @@
 // Simple matcher for basic regular expressions
 
-object Test {
-
 abstract class Rexp
 case object ZERO extends Rexp                    // matches nothing
 case object ONE extends Rexp                     // matches the empty string
@@ -19,10 +17,9 @@
   case ALT(r1, r2) => nullable(r1) || nullable(r2)
   case SEQ(r1, r2) => nullable(r1) && nullable(r2)
   case STAR(_) => true
-
 }
 
-}
+
 
 // derivative of a regular expression w.r.t. a character
 def der (c: Char, r: Rexp) : Rexp = r match {
--- a/progs/re2.scala	Tue Oct 03 23:01:06 2017 +0100
+++ b/progs/re2.scala	Tue Oct 03 23:35:16 2017 +0100
@@ -1,6 +1,6 @@
-// Version with explicit an explicit n-times regular expression;
-// this keeps the overall regular expression in the EVIL1 regular 
-// expression small
+// Version with an explicit n-times regular expression;
+// this keeps the size of the regular expression in the
+// EVIL1 test-case quite small
 
 abstract class Rexp 
 case object ZERO extends Rexp