goodjava.parser

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

goodjava.parser

fschmidt
Administrator
This post was updated on .
In computer science, parsing is a big deal.  They make it complicated, of course.  But it shouldn't be.  I developed a new approach to parsing which is implemented here.  It is based on a simple stack of integers that are positions in what is effectively recursive descent parsing.  I use this idea to compile Luan but also to parse JSON, Lucene queries, HTTP requests, BBCode, CSS, CSV, HTML, and other things.

When I wrote the JSON parser, it worked on the first run.  It is so much simpler than any other JSON parser.  I dare you to look for any JSON parser as simple as this one.  All my other parsers are similar.  My approach to parsing reflects my anti-modern values.  I hate theoretical bullshit and I hate needless complexity.  Think deeply about a problem (like parsing) until you see the essence of it.  Then write clean simple code to solve the problem.