GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - TwoSolutions/PythonLogicParser: Parses a String to a Logic Abstract Syntax Tree.

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
LParser.py
LParser.py
 
 
Node.py
Node.py
 
 
README.md
README.md
 
 
Util.py
Util.py
 
 

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

python-logicpython-logic-parserpython-parsersyntax-tree

Resources

Readme
Activity
Custom properties

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.