开发者

Explain How Jint Works

开发者 https://www.devze.com 2023-03-06 14:53 出处:网络
I would like to understand how Jint, a JavaScript Intrepreter written in C# works. Specifically: How does it makes use of Antlr?

I would like to understand how Jint, a JavaScript Intrepreter written in C# works. Specifically:

  1. How does it makes use of Antlr?
  2. Which parts, if any, or this project are novel, and which parts represent a port of an existing JS Intrepreter to C#.NET?
  3. 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?
  4. 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


  1. Look at the page on CodePlex, it says it uses it.
  2. Nothing is really novel, they're just writing an interpreter of Javascript.
  3. See this
  4. 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.
0

精彩评论

暂无评论...
验证码 换一张
取 消