Add utility method for holding parser readlock.

Cleans up a bit of repetition.
Merge pull request #268 from csmith/master

Add utility method for holding parser readlock.