よだかは口を大きくひらいて、はねをまっすぐに張って、まるで矢のようにそらをよこぎりました。
からだがつちにつくかつかないうちに、よだかはひらりとまたそらへはねあがりました。
I'm having trouble parsing that 2nd sentence especially the usage of the bolded か , うちに and と.
Right now, I'm reading the か as "or" (the same way it's used when listing nouns) but I don't know if that's grammatically correct. I'm also reading うちに as "while" and とまた as "and again", which makes my current reading:
Yodaka opened his mouth wide, spread his wings straight back and moved through the sky like an arrow.
While his body was colliding or not colliding with the ground, Yodaka again nimbly flew up toward the sky.
EDIT:
I've done some reading on SE, and it seems that:
- うちに does mean "while", See: Difference between うちに and うちから.
- The と is with ひらり as the adverb's particle, See: <adv> versus <adv>+と versus <adv>+に
- And (most importantly) both か and うちに are part of a set grammatical structure as answered below.