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

IronNetCybersecurity/exp

Open more actions menu
 
 

Repository files navigation

Binary Expression Tree

Package exp implements a binary expression tree which can be used to evaluate arbitrary binary expressions. You can use this package to build your own expressions however a few expressions are provided out of the box.

Installation

$ go get github.com/alexkappa/exp

Usage

conjunction := And(True, True, True)
disjunction := Or(True, False)
negation := Not(False)

complex := Or(And(conjunction, disjunction), negation)

fmt.Printf("%t\n", complex.Eval(p)) // true

Documentation

API documentation is available at godoc.

About

Binary Expression Tree

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

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