Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

TwoSolutions/PythonLogicParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PythonLogicParser

Parses a String to a Logic Abstract Syntax Tree.

from LParser import LogicParser

logic = "(x and (y or x)) or (o or (not (b and (a and a))))"
parser = LogicParser(logic)
tree = parser.tree

This tree has a standard node implementation with Node.node is "or" , "and", "not" or name_of_variable. For testing you could use

from Util import print_level_order
printLevelOrder(tree)

About

Parses a String to a Logic Abstract Syntax Tree.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.