thys2/blexer2.sc
changeset 514 036600af4c30
parent 500 4d9eecfc936a
child 516 6fecb7fe8cd0
equal deleted inserted replaced
513:ca7ca1f10f98 514:036600af4c30
     8 //   amm lexer.sc loops
     8 //   amm lexer.sc loops
     9 //   amm lexer.sc email
     9 //   amm lexer.sc email
    10 //
    10 //
    11 //   amm lexer.sc all
    11 //   amm lexer.sc all
    12 
    12 
    13 import scala.util.Try
    13 
    14 
    14 
    15 // regular expressions including records
    15 // regular expressions including records
    16 abstract class Rexp 
    16 abstract class Rexp 
    17 case object ZERO extends Rexp
    17 case object ZERO extends Rexp
    18 case object ONE extends Rexp
    18 case object ONE extends Rexp
    57 case class AALTS(bs: Bits, rs: List[ARexp]) extends ARexp 
    57 case class AALTS(bs: Bits, rs: List[ARexp]) extends ARexp 
    58 case class ASEQ(bs: Bits, r1: ARexp, r2: ARexp) extends ARexp 
    58 case class ASEQ(bs: Bits, r1: ARexp, r2: ARexp) extends ARexp 
    59 case class ASTAR(bs: Bits, r: ARexp) extends ARexp 
    59 case class ASTAR(bs: Bits, r: ARexp) extends ARexp 
    60 case class ANOT(bs: Bits, r: ARexp) extends ARexp
    60 case class ANOT(bs: Bits, r: ARexp) extends ARexp
    61 case class AANYCHAR(bs: Bits) extends ARexp
    61 case class AANYCHAR(bs: Bits) extends ARexp
       
    62 
       
    63 import scala.util.Try
    62 
    64 
    63 trait Generator[+T] {
    65 trait Generator[+T] {
    64     self => // an alias for "this"
    66     self => // an alias for "this"
    65     def generate(): T
    67     def generate(): T
    66   
    68