# HG changeset patch # User Christian Urban # Date 1476785617 -3600 # Node ID 010237a7dae737a7bd14d93409968877fe61d5c5 # Parent a5525c780b96fae68ccb1e9cef782ce6f33190b8 updated diff -r a5525c780b96 -r 010237a7dae7 progs/re1.scala --- a/progs/re1.scala Tue Oct 18 10:43:26 2016 +0100 +++ b/progs/re1.scala Tue Oct 18 11:13:37 2016 +0100 @@ -5,12 +5,6 @@ case class ALT(r1: Rexp, r2: Rexp) extends Rexp case class SEQ(r1: Rexp, r2: Rexp) extends Rexp case class STAR(r: Rexp) extends Rexp -case class RANGE(cs: List[Char]) extends Rexp -case class PLUS(r: Rexp) extends Rexp -case class OPT(r: Rexp) extends Rexp -case class NTIMES(r: Rexp, n : Int) extends Rexp -case class NMTIMES(r: Rexp, n : Int, m : Int) extends Rexp - // nullable function: tests whether the regular // expression can recognise the empty string diff -r a5525c780b96 -r 010237a7dae7 progs/re2.scala --- a/progs/re2.scala Tue Oct 18 10:43:26 2016 +0100 +++ b/progs/re2.scala Tue Oct 18 11:13:37 2016 +0100 @@ -56,11 +56,11 @@ //test: (a?{n}) (a{n}) -for (i <- 1 to 1001 by 100) { +for (i <- 1 to 1001 by 10) { println(i + " " + "%.5f".format(time_needed(2, matches(EVIL1(i), "a" * i)))) } -for (i <- 1 to 1001 by 100) { +for (i <- 1 to 1001 by 10) { println(i + " " + "%.5f".format(time_needed(2, matches(EVIL1(i), "a" * i)))) } diff -r a5525c780b96 -r 010237a7dae7 progs/re3.scala --- a/progs/re3.scala Tue Oct 18 10:43:26 2016 +0100 +++ b/progs/re3.scala Tue Oct 18 11:13:37 2016 +0100 @@ -80,7 +80,7 @@ //test: (a?{n}) (a{n}) -for (i <- 1 to 9001 by 1000) { +for (i <- 1 to 9001 by 10) { println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL1(i), "a" * i)))) }