解释 Jint 的工作原理
我想了解 Jint(用 C# 编写的 JavaScript 解释器)的工作原理。具体来说:
- 它如何利用 Antlr?
- 该项目的哪些部分(如果有)是新颖的,哪些部分代表现有 JS Intrepreter 到 C#.NET 的端口?
- 一般来说,如何用 C# 编写 Javascript Intreterpreter?例如,在技术和代码方面已有什么,以及您必须自己编写什么?
- 编写 JS 解释器最具挑战性的部分是什么?
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 technology and code, and what do you have to write yourself?
- What would be the most challenging parts of writing an interpreter of JS?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我是 Jint 的作者,在开发它之前,我写了一篇关于 Jint 中使用的技术的文章。这是另一个项目,但这是完全相同的架构。
这篇文章是最先进的表达评估
它描述了 GitHub 上的一个工具,NCalc
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 on GitHub, NCalc
当然,只是让所有该死的操作员都正确地工作。
And, of course, just getting all the darn operators down correctly.