P6 parsing + some tests