Context-Aware Scanning And Determinism-Preserving Grammar Composition, In Theory And Practice