progs/re2.scala
changeset 513 7b9a0782a804
parent 478 dfa7b4ca199f
child 564 638663141103
equal deleted inserted replaced
512:56550ad904d8 513:7b9a0782a804
     1 // Version with explicit an explicit n-times regular expression;
     1 // Version with an explicit n-times regular expression;
     2 // this keeps the overall regular expression in the EVIL1 regular 
     2 // this keeps the size of the regular expression in the
     3 // expression small
     3 // EVIL1 test-case quite small
     4 
     4 
     5 abstract class Rexp 
     5 abstract class Rexp 
     6 case object ZERO extends Rexp
     6 case object ZERO extends Rexp
     7 case object ONE extends Rexp
     7 case object ONE extends Rexp
     8 case class CHAR(c: Char) extends Rexp
     8 case class CHAR(c: Char) extends Rexp