News for hackers. Stuff that matters.
Re:On the Complexity and Performance of Parsing with Derivat... by SamReidHughes on Saturday June 25, 2016 @05:26PM (#11978068)
Step 1. Begin writing a parser.

Step 2. Notice that writing functions parsing "expressions," "expressions without equals signs," "expressions without equals signs or plus/minus signs," ... is very repetitive.

Step 3. Being a competent programmer, find a way to solve that problem. (Instead of N functions, make one function that takes a parameter specifying the precedence level. Edit: Durr, I'm a moron, this doesn't really describe how to solve the problem of making N recursive calls. But still, you just figure it out, see my other post for how I actually tend to do it. Edit: Or judofyr's post describes it too.)

There are no comments on this comment yet.