| However, in all cases, any syntax errors anywhere in the
| record MUST be detected.
Whatever you do, if you got no match before the "moo" you MUST
report a PermError. You cannot ignore or skip "moo" if you're
The paragraph before this also says, "If there are any syntax errors,
check_host() returns immediately with the result 'PermError'."
Since it doesn't say something more like "If any syntax errors were
found..." which would give some leniency toward whether or not I
happened to get far enough to encounter them, I interpreted it to say
that I do have to go through the entire v=spf1 record at least doing
some basic parsing.
Currently, my implementation goes left-to-right, but if it's already
found a match, then it only looks at the syntax of the remaining tokens.
Upon finding "moo" at the end, it changes the final result to PermError.