Skip to content

nok-ko/bully

Repository files navigation

Bully

Truth tables for the world!

image

What?

This is Bully, my little Boolean expression calculator. I’d made a similar project in college while studying for a discrete math final, and decided to port my efforts to a TypeScript and React shell while learning a bit more about parsers. (The old one used a couple of regular expressions and eval(). I know.)

Try it on Vercel!

Supported Syntax

For more details see the tests and Peggy grammar file, but in short:

  • Variables shown in the table (A, B, C, etc.) can be referenced by their names: D
  • Boolean sums/disjunctions/OR operations are written with +: A + B
  • Literal true and false are evaluated as you might expect: true + D
  • Boolean products/conjunctions/AND operations are written with * or implicitly: A * D, AD
  • Boolean negation/NOT operations are written with a postfix ': A'D, true'
  • Parentheses work as you might expect.

About

Truth tables for the world!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published