You can write a simple parser for your file format using DCGs. For a nice tutorial, see:
http://www.pathwayslms.com/swipltuts/dcg/