rebuild of the parser

Almost have nested while (only) loops working