Add utility method for holding parser readlock.

Cleans up a bit of repetition.