一种面向表达式、以工具为中心的语言,可以编译成python。
pytch的Python项目详细描述
开发
设置
pytch编译器目前是用python 3.7编写的。
要安装开发环境,请运行
$ poetry install
运行
启动REPL:
$ poetry run pytch repl
将文件作为pytch脚本执行:
$ poetry run pytch run file.pytch
更新语法树
要修改语法树节点类型,请更新pytch/syntax_tree.txt
,然后运行:
$ ./bin/generate_syntax_trees.sh
模糊化解析器
要在pytch解析器上运行fuzzer,首先确保安装了the AFL
fuzzer(例如,使用brew install afl-fuzz
)。接下来,
安装模糊依赖项:
$ poetry install --extras fuzz
然后您可以运行:
$ ./bin/fuzz.sh