简单的绘图语言解释器 by sky
- Python 3.12.4
- matplotlib 3.8.4
- Flask 3.0.3(可选)
如果没有安装Flask框架修改Main.py
中的scanner = Scanner(test_str2)
将输入语句以字符串形式传入词法分析器,运行后输出在./static/output.png
。
如果安装了Flask框架可以运行app.py
(chatgpt常用的Flask框架文件名),在网页端进行输入与显示操作。
需要注意的是两者共享同一个输出目录,可能存在相互覆盖等问题,注意保存输出文件。
见我的博客
This code is licensed under the Creative Commons Attribution-NonCommercial 4.0 International for non-commercial use only. Please note that any commercial use of this code requires formal permission prior to use.
感谢编译原理教师王老师的教学,感谢前辈BBBBchan提供的参考文档,代码文件与开源许可。