add 'leaf.bool' argument to optionally skip gating terminal bool gates to speed up parsing