I’ve searched the web and books and found similar projects but still dont quiet get it:
I am trying to build a simple boolean expression parser (like a calculator, but for boolean expressions, like: true!=true result= false )
I want do to this by building a class which works as a recursive descending Parser…and Ive got the parsing bit and everything kind of worked out, BUT:
Im trying to convert the String, which is entered by the user, into Tokens by spliting the String. I cant get that going.
Im trying this: Inputargument is for example the String expression “true||false”
String expressionSplit = expression.split("\w");
but i only mange to store an array containing: true false
or an array containing: ||
or am i completly on a wrong way to build da boolean expression evaluator?
Ive had a look at the pattern-match-methods etc. but couldnt get them working..
and for prakticing purposes i dont want to do this with jexl or similar libraries