Question: I have some javascript code that includes an ANTLR-generated lexer and parser, and some associated syntax tree evaluation functionality. This code runs in the browser in my web app to support users who author code snippets which process scientific data.

Now I'd like to do some additional background processing on the server using the same generated parser. I would prefer not to have to re-implement this stuff in C# and have multiple bits of code that did the exact same thing. Performance isn't as critical to me as eliminating duplication, since this is a background process. So, how can I call into my javascript code from C#? And how can I format my script so that it plays nicely with my .NET web app?

Answer: 
Anyone who wants to do this who isn't running Windows should definitely check out [node.js](http://nodejs.org/). Unfortunately for your purposes, I don't think the Windows port is working yet.

For server-side JS usage in general, [CommonJS](http://commonjs.org/) is trying to standardize how libraries are created and used. You can also find links there to a lot of server-side Javascript implementations.

Update: node.js [will now work under CygWin](http://github.com/ry/node/commit/b3b81d67ff1bc7e795cff7baa00dd716eca95eba). I'm not sure how much work it would be to integrate it into your environment though.
You could [have a look](http://msdn.microsoft.com/en-us/library/ms974588.aspx) at [JScript.NET](http://msdn.microsoft.com/en-us/library/x85xxsf4(VS.71).aspx) although there will be (at least some) differences with traditional (client-side) JavaScript (ECMA).