Skip to content

Conversation

@ecyrbe
Copy link
Collaborator

@ecyrbe ecyrbe commented Mar 5, 2023

This is a Combinator Parser with a lot of goodies:

  • advanced error handling for parsing errors
  • parser introspection to give better hints to users about the errors
  • multiple easy to understand primitives to create complex parsers
About recursive parsers (resolved) we get recursive too deep and probably infinite error. i only see trampolines as a workaround. This means complexify a lot the library. Because this implies returning a `ParserFn` in the composed parsers and calling those in a loop.

solution

was simply to remove ParserFn constraint

Combinators in this PR:

  • Helpers
    • Parse
    • ToString
  • Combinators
    • Literal
    • NotLiteral
    • Optional
    • Many
    • Many1
    • Sequence
    • EndOfInput
    • Choice
    • Or
    • Not
    • Whitespace
    • Whitespaces
    • Trim
    • TrimLeft
    • TrimRight
    • Any
    • CharRange
    • Alpha
    • AlphaNum
    • Digit
    • Digits
    • Word
    • SepBy
    • Between
  • Transformers
    • Map
    • MapError
    • Skip

@ecyrbe ecyrbe changed the title feat(parser): first impl for review feat(parser): add parser combinators Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants