Parser Needed #7
j-mie6
started this conversation in
Show and tell
Replies: 2 comments
-
|
Hi @zenzike! Thanks for taking this up, I look forward to reviewing your PR 😄. If you get stuck at all just let me know and we can figure it out! |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Check out #6 to see how this all went down :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We've got almost everything we need before we're good to launch the beta version of our product, but we're missing a parser!
We suggest using the AST defined in
WeakASTfor simplicity, but the pretty-printing code needed aStrongAST, which would also be available if required. The parser needs to adhere to the following grammar:This grammar specifies that addition, subtraction, and multiplication are all left-associative. There are some unit tests drafted with
quickcheckthat should verify this property, as the pretty printer only inserts brackets around right-associated expressions (this is why the guy who did pretty printing made the strongly-typed AST, carefully matching the grammar here). The test just needs to be uncommented: we disabled it so we don't fail those tests prematurely.In the spirit of our company ethos: that everything should be done purely in Haskell to demonstrate its Real-World Usefulness, we'd appreciate it if it was implemented using parser combinators. Our resident parser combinator expert @j-mie6 has made a small library for us to use, but he is far too busy with his other project to implement this parser himself. He is more than happy to help out if this is more tricky than anticipated!
Beta Was this translation helpful? Give feedback.
All reactions