equal
deleted
inserted
replaced
17 case class Sequ(v1: Val, v2: Val) extends Val |
17 case class Sequ(v1: Val, v2: Val) extends Val |
18 case class Left(v: Val) extends Val |
18 case class Left(v: Val) extends Val |
19 case class Right(v: Val) extends Val |
19 case class Right(v: Val) extends Val |
20 case class Stars(vs: List[Val]) extends Val |
20 case class Stars(vs: List[Val]) extends Val |
21 case class Rec(x: String, v: Val) extends Val |
21 case class Rec(x: String, v: Val) extends Val |
|
22 |
22 |
23 |
23 // some convenience for typing in regular expressions |
24 // some convenience for typing in regular expressions |
24 def charlist2rexp(s : List[Char]): Rexp = s match { |
25 def charlist2rexp(s : List[Char]): Rexp = s match { |
25 case Nil => ONE |
26 case Nil => ONE |
26 case c::Nil => CHAR(c) |
27 case c::Nil => CHAR(c) |