ADPfusion icon indicating copy to clipboard operation
ADPfusion copied to clipboard

Support char parser from Haskell-ADP

Open letmaik opened this issue 12 years ago • 2 comments

I hope I didn't miss it, but I think at the moment ADPfusion doesn't have a char parser which matches a given char (or element, to be more general). What I mean is this one from Haskell-ADP:

char'           ::  Eq a => Array Int a -> a -> Parser a
char' z c (i,j) =  [c | i+1 == j, z!j == c]

Any chance of adding that?

letmaik avatar Apr 08 '13 12:04 letmaik

I'll probably add it with the next update. The parser will work like the one above. A set-based version is possible as well, with O(k) cost, with k the number of possibilities.

choener avatar Apr 08 '13 13:04 choener

Want! :)

letmaik avatar Feb 04 '15 11:02 letmaik