Rule parser

Let's see if tests pass.