equal
deleted
inserted
replaced
117 case (STAR(_), Z::bs) => (Stars(Nil), bs) |
117 case (STAR(_), Z::bs) => (Stars(Nil), bs) |
118 case (RECD(x, r1), bs) => { |
118 case (RECD(x, r1), bs) => { |
119 val (v, bs1) = decode_aux(r1, bs) |
119 val (v, bs1) = decode_aux(r1, bs) |
120 (Rec(x, v), bs1) |
120 (Rec(x, v), bs1) |
121 } |
121 } |
|
122 case (r, Nil) => (Stars(Nil), Nil) |
122 } |
123 } |
123 |
124 |
124 def decode(r: Rexp, bs: Bits) = decode_aux(r, bs) match { |
125 def decode(r: Rexp, bs: Bits) = decode_aux(r, bs) match { |
125 case (v, Nil) => v |
126 case (v, Nil) => v |
126 case _ => throw new Exception("Not decodable") |
127 case _ => throw new Exception("Not decodable") |