diff -r 99f4459d9bb6 -r cf169411b771 Spiral.scala --- a/Spiral.scala Wed Mar 13 13:33:54 2019 +0000 +++ b/Spiral.scala Wed Mar 13 15:27:09 2019 +0000 @@ -123,18 +123,7 @@ } } val arr_of_size = ListBuffer.empty[Int] - def spill(r: Rexp, or: Rexp): Set[Rexp] = { - if(r == or) - Set(r) - else{ - r match { - case ALTS(rs) => rs.flatMap(r1 => spill(r1, or)).toSet - case SEQ(ALTS(rs), r3) => rs.flatMap(r1 => spill(r1, or).map(a => if(a == ONE) r3 else SEQ(a, r3)) ).toSet - case ZERO => Set() - case r => Set(r) - } - } - } + def pC(r: Rexp): Set[Rexp] = {//PD's companion r match { case SEQ(r1, r2) => pC(r2) @@ -143,8 +132,6 @@ case r => Set() } } - - def aspill(ar: ARexp, or: Rexp): Set[Rexp] = spill(erase(ar), or) def illustration(r: Rexp, s: String){ var i_like_imperative_style = internalise(r) val all_chars = s.toList