progs/re2.scala
changeset 513 676e6484f29b
parent 478 48b842c997c7
child 564 b5d57d7064bb
equal deleted inserted replaced
512:a6aa52ecc1c5 513:676e6484f29b
     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