megaparsec Questions
3
Solved
Using Megaparsec 5.
Following this guide, I can achieve a back-tracking user-state by combining StateT and ParsecT (non-defined types should be obvious/irrelevant):
type MyParser a = StateT UserSt...
Jemappes asked 30/9, 2016 at 19:38
1
Solved
Per megaparsec docs, "Since version 8, reporting multiple parse errors at once has become much easier." I haven't been able to find a single example of doing it. The only one I find is this. Howeve...
Tweed asked 8/1, 2020 at 5:43
1
Solved
buildExpressionParser only deals with unary and binary operators. Can it handle ternary operators like ?:? There are some discussions here and here, but none is conclusive.
Deception asked 13/9, 2019 at 21:54
1
Solved
I would like to parse a basic indented language using Megaparsec. Originally I was using Parsec which I managed to get working correctly with indentation but now I'm having quite some trouble.
I'...
Centavo asked 15/1, 2018 at 21:57
0
for a small compiler project we are currently working on implementing a compiler for a subset of C for which we decided to use Haskell and megaparsec. Overall we made good progress but there are st...
Berger asked 2/11, 2017 at 21:58
0
I am writing a parser for a custom jupter kernel using megaparsec. I was able to re-use the parser to provide completions too: the custom error message generated from the megaparsec library are tra...
Revocation asked 19/10, 2017 at 12:5
2
Solved
I'm working on a small parser using Megaparsec and trying to parse arithmetic.
-- Arithmetic expressions
data Aexp = N Num
| V Var
| Mult Aexp Aexp
| Add Aexp Aexp
| Sub Aexp Aexp
derivin...
Loos asked 8/4, 2017 at 12:56
1
Solved
I want to parse text similar to this in Haskell using Megaparsec.
# START SKIP
def foo(a,b):
c = 2*a # Foo
return a + b
# END SKIP
, where # START SKIP and # END SKIP marks the start and end ...
Gladine asked 13/11, 2016 at 23:58
1
Solved
I'm going to use megaparsec for parsing a programming language for university project. However, I searched for finding a way to report multiple errors.
I know about withRecovery and I saw this is...
Auroreaurous asked 23/9, 2016 at 18:43
1
© 2022 - 2024 — McMap. All rights reserved.