Convex-Dev / bounties

Repository for the Convex Bounty programme. Earn Convex Coins for solving problems and building new capabilties!
2 stars 0 forks source link

Replacement Reader (2000 Gold) #7

Closed mikera closed 3 years ago

mikera commented 3 years ago

Currently Convex uses Parboiled (https://github.com/sirthias/parboiled) as a Reader. While parboiled does its job well as a fast PEG Parser, it has a few problems:

Objective of this bounty it to replace Parboiled with a dedicated Convex reader. Requirements:

Engelberg commented 3 years ago

Can you post some links to the current convex grammar and parsing code? I'm interested in seeing what the existing code looks like to get a feeling for what would be involved in modifying it. Thanks.

mikera commented 3 years ago

It's pretty self-contained in the Reader file: https://github.com/Convex-Dev/convex/blob/master/src/main/java/convex/core/lang/Reader.java

Should be plenty of tests to verify the equivalence of any replacement.

As mentioned in the call, I think ANTLR may be a good choice.

mikera commented 3 years ago

https://github.com/antlr/grammars-v4/blob/master/clojure/Clojure.g4

Clojure grammar example!

mikera commented 3 years ago

@Engelberg are you interested in taking a crack at this? Would be nice to get it in for the Alpha Release

Engelberg commented 3 years ago

I do find the challenge interesting, but I'm deep into a puzzle project right now that is taking all my time. I'm glad to see Bill is making rapid progress on this!

mikera commented 3 years ago

OK thanks for letting me know @Engelberg .

@billbsing I think this is potentially a blocker for alpha so I'm going to take a crack at it myself. Let me know if you want to collab!

mikera commented 3 years ago

Closing because already completed! ANTLR Reader now ready for use.