News for hackers. Stuff that matters.
Re:Show HN: How to write a tiny compiler by akkartik on Thursday February 09, 2017 @11:51PM (#13613309)
To elaborate on userbinator's comment, you want to think of your format as a set of definitions:

A clause consists of a '{', one or more key-value pairs, and a '}'.

A key-value pair consists of a string and a value.

A value is either a string or a clause.

Now turn each definition into a function.

Here's a nice-looking article from Googling for "writing a recursive descent parser": http://weblog.jamisbuck.org/2015/7/30/writing-a-simple-recur...

There are no comments on this comment yet.