I\'m currently in the process of implementing a dialect of prolog in python. I\'m using the wonderful pyparsing module for this purpose and I\'ve found it to work very well