Interpreter:简单语言的口译员

时间:2021-06-13 21:50:56
【文件属性】:
文件名称:Interpreter:简单语言的口译员
文件大小:17KB
文件格式:ZIP
更新时间:2021-06-13 21:50:56
C++ 简单语言翻译 该程序演示了如何为编程语言制作解释器。 它使用来实现一种简单的、类似 Pascal 的语言。 它是用 C++ 编写的,可在 Windows、Linux 和 MacOS 下编译。 建造它 Linux 和 MacOS:输入make Windows:使用 Visual Studio 项目 用法 interpreter 其中动作是/p漂亮打印或/e执行 例子 该语言的语法类似于 Pascal。 这是一个打印前 100 个素数的示例程序。 此示例可在“示例”目录中找到。 您可以通过键入interpreter /e ../samples/compute_primes.txt来运行它(Windows 使用反斜杠) primecount := 0 testprime := 1 while primecount < 100 begin isp
【文件预览】:
Interpreter-master
----Samples()
--------compute_primes.txt(329B)
--------complex_expression.txt(216B)
--------pretty_print_me.txt(349B)
----.gitignore(3KB)
----Makefile(849B)
----Src()
--------Token.h(500B)
--------StdAfx.h(857B)
--------Expression.h(3KB)
--------Context.h(201B)
--------Interpreter.cpp(1KB)
--------StringTokenizer.h(404B)
--------Interpreter.sln(945B)
--------Statement.cpp(4KB)
--------Program.cpp(2KB)
--------Interpreter.vcxproj.filters(2KB)
--------SyntaxError.h(303B)
--------Program.h(453B)
--------StringTokenizer.cpp(1KB)
--------Interpreter.vcxproj(7KB)
--------Expression.cpp(6KB)
--------StdAfx.cpp(290B)
--------Context.cpp(377B)
--------Statement.h(2KB)
----README.md(1KB)
----.gitattributes(483B)

网友评论