Abstract. Diagrams that serve as a visual input facility for programming environments have to be translated into some kind of semantic description. This paper describes such a method which is based on a specification of the translation process. The translation process starts with a diagram, which is simply represented as a collection of atomic diagram components, and it ends up with some data structure as a semantic representation of the diagram. The specification of the translation process mainly consists of two parts: the specification of spatial relationships between atomic diagram components in terms of their numeric parameters (e.g., position, size), and an attributed hypergraph grammar that describes the concrete diagram syntax as well as the rules for generating the semantic representation.