Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Explain How Jint Works

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 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?
like image 890
Josh Pearce Avatar asked May 17 '11 01:05

Josh Pearce


1 Answers

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

like image 146
Sébastien Ros - MSFT Avatar answered Nov 14 '22 23:11

Sébastien Ros - MSFT