Object Grammars: Compositional & Bidirectional Mapping Between Text and Graphs
Presented at the International Conference on Software Language Engineering, Dresden
Abstract: Object Grammars define mappings between text and object graphs. Parsing recognizes syntactic features and creates 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ō system and illustrate the utility of our approach by showing how it enables definition and composition of domain-specific languages (DSLs).
|Keywords||Grammars, objects, parsing, composition, DSL|
|ACM||PROGRAMMING LANGUAGES (acm D.3), Processors (acm D.3.4)|
|THEME||Software (theme 1)|
|Editor||K. Czarnecki , G. Hedin|
|Conference||International Conference on Software Language Engineering|
van der Storm, T, Cook, W.R, & Loh, A. (2012). Object Grammars: Compositional & Bidirectional Mapping Between Text and Graphs . In K Czarnecki & G Hedin (Eds.), Proceedings of International Conference on Software Language Engineering 2012. Springer.