Looks simple enough. I'd read each line, throw away leading white space, and look for keywords at the start of the line. The only bugger is Rules Text which spans multiple lines and contains line feeds, but should be simple enough. Now where'd I put my 20-sided die?