Working version of a PDA checker.