Updated the prolog DCG code