1. A method for hosting a programming environment and processing user input within an information retrieval system, the method comprising the steps of: (a) receiving, during a first session between a user and an information retrieval system, from the user, a definition of an expression type, the definition specifying an expression format, a response type, and a display format; (b) storing the definition of the expression type; (c) receiving, during a second session between the user and the information retrieval system, from the user, an expression having a semantic structure; (d) evaluating the semantic structure of the expression; and (e) displaying, to the user, a response to the expression in a user interface displayed according to the display format specified by the definition of the expression type.