Integrating Attribute Grammar and Functional Programming Language Features

نویسندگان

  • Ted Kaminski
  • Eric Van Wyk
چکیده

While attribute grammars (AGs) have several features making them advantageous for specifying language processing tools, functional programming languages offer a myriad of features also well-suited for such tasks. Much other work shows the close relationship between these two approaches, often in the form of embedding AGs into lazy functional languages. This paper continues in this tradition, but in the other direction, by integrating various functional language features into AGs. Specifically we integrate rich static types (including parametric polymorphism, typed distinctions between decorated and undecorated trees, type inference, and generalized algebraic data-types) and pattern-matching, all in a manner that maintains familiar and convenient attribute grammar notations and especially their highly extensible nature.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A pure embedding of attribute grammars

Attribute grammars are a powerful specification paradigm for many language processing tasks, particularly semantic analysis of programming languages. Recent attribute grammar systems use dynamic scheduling algorithms to evaluate attributes on demand. In this paper, we show how to remove the need for a generator, by embedding a dynamic approach in a modern, object-oriented and functional program...

متن کامل

A Pure Object-Oriented Embedding of Attribute Grammars

Attribute grammars are a powerful specification paradigm for many language processing tasks, particularly semantic analysis of programming languages. Recent attribute grammar systems use dynamic scheduling algorithms to evaluate attributes by need. In this paper, we show how to remove the need for a generator, by embedding a dynamic approach in a modern, object-oriented programming language to ...

متن کامل

First-class Attribute Grammars

This paper is a contribution to the ongoing quest for modular descriptions of language processors, with the specific aim of rapidly prototyping domain-specific languages [21]. Some might argue that this problem was solved in the eighties, with the development of a proliferation of language processors based on attribute grammars [11, 15, 22]. Others might argue that functional programming langua...

متن کامل

Comonadic functional attribute evaluation

We have previously demonstrated that dataflow computation is comonadic. Here we argue that attribute evaluation has a lot in common with dataflow computation and admits a similar analysis. We claim that this yields a new, modular way to organize both attribute evaluation programs written directly in a functional language as well as attribute grammar processors.

متن کامل

A Database Interface Based on Montague's Approach to the Interpretation of Natural Language

In this paper we describe a database interface that is loosely based upon some of the concepts proposed by Richard Montague in his approach to the interpretation of natural language. The system is implemented as an executable attribute grammar specified in a higher order, lazy, pure functional programming language. The attribute grammar formalism provides a simple means of implementing Montague...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011