We’re on Forbes, that’s so cool.
Super fun chat with Paul Kemp, check it out!
There aren’t too many examples of Clojure’s instaparse use out there, so if you’re working on parsing a little language of your own, I hope this might come in handy.
I’ve been working on a little interpreter for some internal stuff part of the Front Row stack, mainly for validating student answers in the more complex middle school math domains. The interpreting the answer becomes pretty much mandatory for validating things like equivalence of two polynomials. This is what came out from the early efforts.
The EBNF grammar itself can be found here, the implementation of the parser is here (still blows my mind it’s under 50 lines), and the tests are all here. Wouldn’t have touched this with a ten foot pole without testing every single incremental addition.
A couple of resources I found useful, in addition to instaparse’s official docs:
The author of instaparse himself was also generous with a few tips on the library’s Google Groups.
Another great little guide on understanding differences between traditional Regular Expression engines. Greg’s wiki is generally considered a real goldmine.
Front Row Classroom has been out for less than a week and already the visionaries at FCPS are experiencing the power of adaptive math practice and teacher analytics to improve teacher effectiveness and quality of education.
Very satisfying to see the hard work paying off when students across the country have a much better time with math.
Back to work now!