thread-safe parser