First published: Feb 19, 2009, 9:25pm MST
Last edited: Feb 19, 2009, 9:25pm MST


So, I haven’t actually just been watching TV recently, as my newsletter might currently suggest. I’m trying to be productive in a few ways, and one of them is the release of PyNarcissus here.

PyNarcissus is a direct port of the Narcissus Javascript engine) by Brendan Eich. Narcissus is Javascript implemented in Javascript, and, while the evaluator does a few things metacircularly, the parser was pretty much a piece of cake to write in Python.

PyNarcissus does not introduce any new features whatsoever. Correctness using the original Narcissus as a baseline was an important priority, so even the pretty-printed string-converted output of the PyNarcissus parse tree is identical to the Javascript version. Using this feature, I simply ran both parsers on all of the Spidermonkey Javascript tests to make sure that the output was the same.

Because the port was so easy, I am considering going all the way and making a full on Javascript interpreter, but that wasn’t my main goal for this port, so I’m not sure I’ll get there soon, if at all.

Project links


comments powered by Disqus