简体   繁体   English

解释Jint如何工作

[英]Explain How Jint Works

I would like to understand how Jint , a JavaScript Intrepreter written in C# works. 我想了解Jint是一个用C#编写的JavaScript Intrepreter是如何工作的。 Specifically: 特别:

  1. How does it makes use of Antlr? 它如何利用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? 哪些部分,如果有的话,或者这个项目是新颖的,哪些部分代表现有JS Intrepreter到C#.NET的端口?
  3. In general, how does one go about writing a Javascript Intrepreter in C#? 一般来说,如何在C#中编写Javascript Intrepreter? For instance, what's out there already in terms of technology and code, and what do you have to write yourself? 例如,在技术和代码方面已有什么,你需要自己编写什么?
  4. What would be the most challenging parts of writing an interpreter of JS? 编写JS解释器最具挑战性的部分是什么?

I am the author of Jint and before developing it I wrote an article about the techniques which are used in Jint. 我是Jint的作者,在开发它之前,我写了一篇关于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 它描述了一个也在codeplex上的工具, NCalc

  1. Look at the page on CodePlex, it says it uses it. 查看CodePlex上的页面,它说它使用它。
  2. Nothing is really novel, they're just writing an interpreter of Javascript. 没有什么是真正新颖的,他们只是写一个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. 实际上写它,让递归工作,让对象模型工作,等等。当然,只是让所有的运行正确的操作员。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM