-- this doesnt work, Seq Pop Pop -> emptylang (Seq l Pop) = lang (deriv Push l) -- ^-1 operation needed, to do this generaly, since Seq (_) (_ <+> Pop) doesn't work
deriv(Altlr)=constZero-- doesn't ALLWAYS exist -- \ word -> (deriv l word)<+>(deriv r word) -- WONG, doesn't exist
deriv(Seqlr)=(derivl).(derivr)
deriv(Altlr)=error"not thought about it enough"-- const Zero -- doesn't ALLWAYS exist -- \ word -> (deriv l word)<+>(deriv r word) -- WONG, doesn't exist
deriv_=error"blub"
ends_in::RegEx->[RegEx]
ends_inEmpty=[]
ends_inEmpty=[Pop]-- Push.Pop == 1
ends_inZero=[]
ends_inPush=[Push]
ends_inPop=[Pop]
...
...
@@ -103,41 +108,67 @@ ends_in (Alt l r ) = nub $ sort $ ends_in l ++ ends_in r