2 points · by coderdude · 17y ago · 3 comments
http://javascript.crockford.com/tdop/tdop.html
John Resig's port of processing is also well looking into.
Both the above are not python but can give you an indication of how people attacked similar problems in terms of parsing.
let us know when you finished:)
I started work on this project a few months back and revisited it last night to get a very early version up. (Release early!)
Live demo: http://www.avatrion.com/pystachio/index.html
So far the project consists mainly of a port of Python 2.5's tokenize.py and does not yet perform any actual translation. Pystachio looks for embedded and external scripts with type="text/python" and proceeds to parse the code. The comments in the demo page tell a little more about what's going on and what you can do.
Inline python (inside event attributes) is also planned, and an example of how it would be used is included in the demo as well.
I'm posting this early to hopefully gather some thoughts from you guys on how to go about translating Python to JavaScript.