Behind even the simplest of conversations lies complex cognitive processing. In order to understand a comment or a question, and to respond appropriately, a person must recognize the type of utterance (whether, for example, it is a question, a statement, or a request), extract the correct meaning (from one or more possible interpretations), and form a reply that is matched to the context of the conversation. Syntax is that part of linguistics which deals with the structure of language: how words form into phrases and sentences, and how parts of words form into words. One aspect of computational linguistics is writing parsers: programs that can identify syntactically well-formed strings of words -- that is, words which we, as English speakers, recognize as forming grammatical phrases and sentences. Normally, a parser will produce a description of the syntactic structure of the phrase or sentence; in this chapter we described one method of representing this, as phrase-structure rules. In tandem with the syntactic analysis, a parsing program will normally produce a semantic description. We described the method of compositional semantics, in which the semantic value, or meaning, of a sentence is built up from the semantic values of its sub-parts, which in turn are composed of the semantic values of individual words. In order to give an acceptable response, a natural language program may need to represent the pragmatics of an utterance: the identity of the person who produced the sentence; the physical surroundings; the business in hand, and so on. Finally, it must construct a grammatically well-formed and meaningful reply.