I'm wondering if anyone knows of a Javascript parser in Arc. Or at least, a Javascript parser that can be easily modified to add an Arc backend to it: to have it generate Arc. I would like to take existing Javascript libraries and convert them into Arc. The reason to want to do that is so you can write web applications that need to execute client-side code, but to write this code in Arc, not in Javascript. I'm aware of the irony involved here. You start as a language that serves the web in plain HTML. Then write an Arc interpreter in Javascript. You automatically port Javascript libs in Arc. Arc takes over. It's the kind of takeover any language could do to any other, like a virus spreading in a host. There's also no end to how far you could stretch these mutations. You could even automatically generate Arc interpreters for any language if you wanted to. (Or an admittedly perverse meta-programming example: to generate any interpreter for any language written in any language.) The biggest obstacle in this exercise is the effort involved. It'd be painful to write a parser in C for example. But is it really that much effort to write a Javascript parser with a Lisp? |