Explain How Jint Works
I would like to understand how Jint, a JavaScript Intrepreter written in C# works. Specifically:
- How does it makes use of Antlr?
- Which parts, if any, or this project are novel, and which parts represent a port of an existing JS Intrepreter to C#.NET?
- In general, how does one go about writing a Javascript Intrepreter in C#? For instance, what's out there already in terms of tech开发者_JS百科nology and code, and what do you have to write yourself?
- What would be the most challenging parts of writing an interpreter of JS?
I am the author of Jint and before developing it I wrote an article about the techniques which are used in Jint. It was for another project, but this is the exact same architecture.
The article is State of the Art Expression Evaluation
It describes a tool which is also on codeplex, NCalc
- Look at the page on CodePlex, it says it uses it.
- Nothing is really novel, they're just writing an interpreter of Javascript.
- See this
- Actually writing it, getting recursion to work, getting the object model to work, etc. And, of course, just getting all the darn operators down correctly.
精彩评论