Run htncalc.exe and input expressions for calculation. For exit input "q" or "quit" command.
- Integer and decimal positive numbers
- Arithmetic operations
+
,-
,*
,/
- Brackets
abs()
function
ExpressionParser
performs lexical analysis of an input string expression.PermutationsBuilder
builds a terms tree considering sub-expressions priority with different "permutations services" which implementsITermPermuter
interface. The order is important:BracketTermPermuter
- distinguishes bracketsFunctionTermPermuter
- works with functions likeabs(...)
MulDivTermPermuter
- for multiplication and division operationsAddSubTermPermuter
- for addition and subtraction operations
ExpressionTreeBuilder
builds an expression tree, consists ofIExpressionNode
elements which can calculate their own value.