Let's make a shit JavaScript interpreter Part one.
renesd.blogspot.com
renesd.blogspot.com
The article's goals are noble, but in this one spot, we seem to be flirting with flaunting one's ignorance and thinking it wit.
Anyhow, here's a slicker way of doing it. Grab an ANTLR grammar for ecmascript. A quick Google for "ANTLR ecmascript grammar" yields:
http://www.antlr.org/grammar/1153976512034/ecmascriptA3.g
In addition, there is a (somewhat buggy) Python target for ANTLR 3 which is probably good enough for a project like this.
http://www.antlr.org/wiki/display/ANTLR3/Antlr3PythonTarget
Voila, a way to generate a parser in Python.
There are plenty of valid reasons to not be a member of the lisp cult.
"Anyhow, here's a slicker way of doing it."
Which entirely misses the point of the article, which is to DIY, not rely on some tool to generate it for him.
And Lisp doesn't even use commas (very much).
((l i) (s p))
would have been better. Would have emphasized that functions are first-class citizens. (I know, this syntax works only in Scheme.)