evaluating nesting ifLogicBegin-ifLogicElse-ifLogicEnd bricks via stack