sql regen: extends hooks & compact parseTokens
move more logic to GPUB