gpc
gpc copied to clipboard
Leightweight generalized parser combinators
We cannot always be 100% sure, but it would be nice to check what we can.
If one alternative succeeds and performs an ascend and later another alternative from the same recursion depth finds a loop then the combination of that ascend and loop is missed....
If we ever push an empty continuation to the stack then we will get into an infinite loop. That can happen in cases like this: ```haskell emptyk :: Parser ()...
I think there is a lot of low hanging fruit for optimization of gigaparsec. For example: - [ ] Use `Text` or even `Addr#` instead of `String`. - [ ]...
Apparently it is possible to use data dependent grammars to implement layout parsing relatively easily. But I don't know exactly how that would work.
One promising approach is [`data-reify`](https://hackage.haskell.org/package/data-reify) described in [Type Safe Observable Sharing in Haskell](http://ku-fpg.github.io/files/Gill-09-TypeSafeReification.pdf). Unfortunately, this isn't straightforward for gigaparsec because our nonterminals might take arguments as input, such as the...
I think it is possible to make the algorithm have O(n^3) worst-case time complexity. This is not a priority for me, because it probably requires O(n^3) space as well and...
Gigaparsec is intended to be used without a separate lexer. So for practical parsers there needs to be a mechanism to handle white space. Perhaps we can implement a mechanism...
Currently, when you write something like `Plus expr
We should introduce a biased `