Share prefixes in the grammar for runtime efficiency.