updated prolog analyzer