microparsec icon indicating copy to clipboard operation
microparsec copied to clipboard

Implement tricky combinators from Text.Parsec.Combinator

Open schneiderfelipe opened this issue 3 years ago • 1 comments

Or find alternatives:

  • [x] anyToken
  • [x] eof
  • [x] notFollowedBy
  • [ ] manyTill
  • [ ] lookAhead

Code can be found here.

EDIT: ensure they are tested as well.

schneiderfelipe avatar Jun 21 '21 18:06 schneiderfelipe

notFollowedBy requires revision, as it still uses the old setPosition function. We have to come up with an alternative implementation that does not require arbitrary repositioning.

One solution might be marking the stream and asking it to go back to the mark (one new function to mark and another to go back). That might or might not be merged with the lastPosition idea, etc., but it might be worth generalizing.

schneiderfelipe avatar Jun 21 '21 19:06 schneiderfelipe