progs/matcher/re1.sc
changeset 745 905b60a029bf
parent 725 cd72ba78c287
child 759 636ad159b4eb
equal deleted inserted replaced
744:a33ce6c8e2c3 745:905b60a029bf
     5 //   amm re1.sc testX
     5 //   amm re1.sc testX
     6 //
     6 //
     7 // or 
     7 // or 
     8 //
     8 //
     9 //   amm re1.sc all
     9 //   amm re1.sc all
    10 
    10  
    11 // regular expressions
    11 // regular expressions
    12 abstract class Rexp
    12 abstract class Rexp
    13 case object ZERO extends Rexp                    // matches nothing
    13 case object ZERO extends Rexp                    // matches nothing
    14 case object ONE extends Rexp                     // matches an empty string
    14 case object ONE extends Rexp                     // matches an empty string
    15 case class CHAR(c: Char) extends Rexp            // matches a character c
    15 case class CHAR(c: Char) extends Rexp            // matches a character c