Progressive structural analysis for dynamic recognition of on-line handwritten mathematical expressions