This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
Python3 Release of 0.0.0.1
Pre-release
Pre-release
·
19 commits
to master
since this release
See README.md
, test_run.py
in tptp-parser-python3-0.0.0.1.zip
for a working example.
The Python3 target of version 0.0.0.1 is supporting:
- simple THF-parsing
ast = tptp_parser.parse(argv[1])
- access childs, print nodes, print node-types:
print(ast)
print(ast[0])
print(ast[0].typeString())
- child iteration:
for n in ast:
print(n)
- a simple parse-tree iteration
for n in tptp_parser.traverse(ast):
do stuff with n
- simple filtered parse-tree iteration
for n in tptp_parser.traverse(ast, filter=tptp_parser.nodetype_thf_binary_formula):
do stuff with n
- render a parse tree
tptp_parser.tree(ast)
- a filtered tree render
tptp_parser.tree(ast, filter=tptp_parser.nodetype_thf_binary_formula)