Language-centered software engineering requires language technology that (i) handles the full class of context-free grammars, and (ii) accepts grammars that contain syntactic information only. The syntax definition formalism SDF combined with GLR-parser generation offers such technology. We propose to make SDF and GLR-parsing available for use with various programming languages. We have done so for the functional programming language Haskell. By combining Haskell data type definitions with the syntax definition formalism SDF we have designed HASDF. HASDF is a domain-specific language in which the concrete syntax of an arbitrary context-free language can be defined in combination with the Haskell data types that represent its abstract syntax. We have implemented a tool that generates a GLR-parser and an unparser from a HASDF definition.

, , , , ,
Software Engineering [SEN]
Software Analysis and Transformation

de Jonge, M., Kuipers, T., & Visser, J. (1999). HASDF : a generalized LR-parser generator for Haskell. Software Engineering [SEN]. CWI.