Grammar mapping to a string program.