implements a condition parser - see tests in tests/units/lib/
Merge branch 'condition-parser' into dev