کد مقاله کد نشریه سال انتشار مقاله انگلیسی نسخه تمام متن
433712 1441663 2014 28 صفحه PDF دانلود رایگان
عنوان انگلیسی مقاله ISI
The design and implementation of Object Grammars
موضوعات مرتبط
مهندسی و علوم پایه مهندسی کامپیوتر نظریه محاسباتی و ریاضیات
پیش نمایش صفحه اول مقاله
The design and implementation of Object Grammars
چکیده انگلیسی


• We introduce Object Grammars to parse textual syntax into object graphs.
• Cross references in the object structure are resolved using declarative paths.
• Complex mappings can be further controlled using predicates.
• We show that Object Grammars are both compositional and bidirectional.
• The entire system is self-describing and bootstrapped within itself.

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ō system and illustrate the utility of our approach by showing how it enables definition and composition of domain-specific languages (DSLs).

ناشر
Database: Elsevier - ScienceDirect (ساینس دایرکت)
Journal: Science of Computer Programming - Volume 96, Part 4, 15 December 2014, Pages 460–487
نویسندگان
, , ,