Lift out commond static parser util code.