Skip to content

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

License

Notifications You must be signed in to change notification settings

unnikkedga/BooleanExpressionEvaluator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages