The design and implementation of Object Grammarsvan der Storm, T., Cook, W. R. & Loh, A., 15-Dec-2014, In : Science of computer programming. 96, p. 460-487 28 p.
Research output: Contribution to journal › Article › Academic › peer-review
An Object Grammar is a variation on traditional BNF grammars, where the notation is extended to support declarative bidirectional mappings between text and object graphs. The two directions for interpreting Object Grammars are parsing and formatting. Parsing transforms text into an object graph by recognizing syntactic features and creating the corresponding object structure. In the reverse direction, formatting recognizes object graph features and generates an appropriate textual presentation. The key to Object Grammars is the expressive power of the mapping, which decouples the syntactic structure from the graph structure. To handle graphs, Object Grammars support declarative annotations for resolving textual names that refer to arbitrary objects in the graph structure. Predicates on the semantic structure provide additional control over the mapping. Furthermore, Object Grammars are compositional so that languages may be defined in a modular fashion. We have implemented our approach to Object Grammars as one of the foundations of the Ens (o) over bar system and illustrate the utility of our approach by showing how it enables definition and composition of domain-specific languages (DSLs). (C) 2014 Elsevier B.V. All rights reserved.
|Number of pages||28|
|Journal||Science of computer programming|
|Publication status||Published - 15-Dec-2014|
- Domain-specific languages, Model-driven development, Language composition, Syntax definition, TEXTUAL SYNTAX, LANGUAGE