This work explores the use of grammars as integral parts of computer programs and presents a number of tools and methods which facilitate such integration. An embeddable interpreter for the Grammatical Framework (GF) grammar formalism, a compiler from GF grammars to speech recognition grammars, and methods for writing multimodal grammars in GF are described. It is then shown how these tools and methods can be used to build multilingual multimodal dialog systems and precise domain-specific machine translation systems for both spoken and written language.