Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 999 Bytes

README.md

File metadata and controls

45 lines (30 loc) · 999 Bytes

BooleanExpressionEvaluator

A boolean expression evaluator project using a Recursive Descent Parser and the Interpreter Pattern

You can find a description of the project here

How to use

Clone the repository with:

git clone https://github.com/unnikked/BooleanExpressionEvaluator.git

Compile:

javac src/tk/unnikked.booleanevaluator/*.java src/tk/unnikked/booleanevaluator/*/*.java src/tk/unnikked/booleanevaluator/ast/*/*.java

And execute it with (remember to cd src):

java tk/unnikked/booleanevaluator/BooleanEvaluator

You can also pipe in a file using -f directive

cat yourfile | java tk/unnikked/booleanevaluator/BooleanEvaluator -f

Here an execution example:

$ cat test | java tk/unnikked/booleanevaluator/BooleanEvaluator -f
(true & ((true | false) & !(true & false)))
AST: (true & ((true | false) & !(true & false)))
RES: true

##License

Check LICENSE