Return to: U of M Home

Gold University of Minnesota M. Skip
    to main cozntent.University of Minnesota. Home page.
 

  Silver Attribute Grammar Specification Language

What's inside.

MELT Home

People

Papers

Software
- Silver
- ableJ - Java 1.4

Melt public wiki
   

Department of Computer Science and Engineering

University of Minnesota Software Engineering Center

Institute of Technology

University of Minnesota

 
 

Silver - an Attribute Grammar Specification Language

[ Info | Downloads | User Manual | Publications | Bugzilla site ]

Silver is an attribute grammar specification language that we have developed to investigate highly-modular attribute grammar-based language specifications.

Our LDTA 2007 paper "Silver: an Extensible Attribute Grammar System" is available here

Silver version 0.1 supports many extensions to D. E. Knuth's original specification of attribute grammars. This include:

  • Forwarding: In our paper "Forwarding in Attribute Grammars for Modular Language Design" we show how the notion of forwarding is integrated into attribute grammars. This feature is very useful in defining modular language extensions because it allows some aspects of a new constructs semantics to be specified implicitly via a translation to the host language. Semantics can be explicitly specified using traditional attribute definitions.

  • Higher-order attributes as defined by Vogt and a form of reference attributes that are similar in spirit to Hedin's.

  • Collections as specified by Boyland are also supported in Silver.

  • Pattern matching over syntax trees. This is similar to what is found in ML and Haskell. Syntax trees correspond to algebraic data type values and productions correspond to value constructors.

  • Polymorphic lists are also included and are similar to what is found in ML and Haskell. Silver version 0.2 will support parametric polymorphism in general.

Silver evaluates attributes by translating Silver specifications to Haskell. As a lazy functional language, Haskell is well suited to this sort of task. The translator to Haskell is implemented in Silver and thus we have utilized the extensible nature of Silver specification to extend Silver itself.

Silver has been tested on ubuntu linux for both 32 and 64 bit systems. It should run on any *nix system that has the Glasgow Haskell Compiler. Please see the downloads page for source specification, executables, installation instructions and demos. More details are available in the User Manual.

Parser Generators

The downloads include source (and for Copper, executables) for different versions of Silver that use different parser generators. The first is silver.happy - it uses Haskell-based alex and happy, the Haskell versions of lex and yacc. The second is silver.copper - it is a parser and scanner generator that we have developed that uses "context aware scanning". This technique is particularly useful in extensible languages and is described in our GPCE 2007 paper Context-Aware Scanning for Parsing Extensible Languages. Some information on specifications in Silver of Copper grammars can be found here: Copper.
 
The University of Minnesota is an equal opportunity educator and employer.