Nasal 语言解释器

Nasal 是一种在 FlightGear 中使用的类 ECMAscript 的编程语言。 这个Nasal解释器完全由 ValKmjolnir 使用 C++(-std=c++11) 从零编写,没有复用 Andy Ross 的 Nasal 解释器中的代码。 然而,为了这个精妙的编程语言和他的解释器项目,我依然想要对Andy表示由衷的感激。 现在这个项目使用 MIT 许可证 (2021/5/4)。 如果你愿意,你可以修改它,或者使用这个项目来学习或创造更多有趣的东西(但请不要忘记我!)。

去年暑假,FGPRC的开发者告诉我,在FlightGear控制台调试代码费力费时,而且很多语法错误不会被准确报告。 所以,我试着写一个新的解释器来帮助他们检查语法错误和运行时错误。 我编写了词法分析、语法分析和运行时(字节码虚拟机/ast运行时虚拟机),大大减轻了调试Nasal代码的工作量。

Nasal is an ECMAscript-like programming language that used in FlightGear. The interpreter is totally rewritten by ValKmjolnir using C++(-std=c++11) without reusing the code in Andy Ross's nasal interpreter. But we really appreciate that Andy created this amazing programming language and his interpreter project. Now this project uses MIT license (2021/5/4). Edit it if you want, use this project to learn or create more interesting things (But don't forget me XD).

Nasal is a script language first used in Flightgear, created by Andy Ross. But in 2019 summer holiday, members in FGPRC told me that it is hard to debug with nasal-console in Flightgear, especially when checking syntax errors. So i tried to write a new interpreter to help them checking syntax error and even, runtime error. I wrote the lexer, parser and bytecode virtual machine(there was an ast-interpreter, but i deleted it after version4.0) to help checking errors. We found it much easier to check syntax and runtime errors before copying nasal-codes in nasal-console in Flightgear to test. Also, you could use this language to write some interesting programs and run them without the lib of Flightgear. You could add your own built-in functions to change this interpreter to a useful tool in your own projects (such as a script in your own game).