main_testing3/re.scala
changeset 457 9cf317975ae7
parent 455 557d18cce0f0
child 463 0315d9983cd0
equal deleted inserted replaced
456:d076cb2e0b75 457:9cf317975ae7
    91   case rs => ALTs(rs)
    91   case rs => ALTs(rs)
    92 }
    92 }
    93 
    93 
    94 def SEQs_smart(rs: List[Rexp]) : Rexp = rs match {
    94 def SEQs_smart(rs: List[Rexp]) : Rexp = rs match {
    95   case Nil => ONE
    95   case Nil => ONE
    96   case ZERO::nil => ZERO
    96   case ZERO::Nil => ZERO
    97   case r::Nil => r
    97   case r::Nil => r
    98   case rs => SEQs(rs) 
    98   case rs => SEQs(rs) 
    99 }
    99 }
   100 
   100 
   101 // (6) 
   101 // (6)