Adding Syntax and Static Analysis to Libraries via Extensible Compilers and Language Extensions

Loading...
Thumbnail Image

View/Download File

Persistent link to this item

Statistics
View Statistics

Journal Title

Journal ISSN

Volume Title

Title

Adding Syntax and Static Analysis to Libraries via Extensible Compilers and Language Extensions

Published Date

2006

Publisher

Type

Report

Abstract

We show how new syntactic forms and static analysis can be added to a programming language to support abstractions provided by libraries. Libraries have the important characteristic that programmers can use multiple libraries in a single program. Thus, any attempt to extend a language's syntax and analysis should be done in a composable manner so that similar extensions that support other libraries can be used by the programmer in the same program. To accomplish this we have developed an extensible attribute grammar specification of Java 1.4 written in the attribute grammar specification language Silver. Library writers can specify, as an attribute grammar, new syntax and analysis that extends the language and supports their library. The Silver tools automatically compose the grammars defining the language and the programmer-selected language extensions (for their chosen libraries) into a specification for a new custom language that has language-level support for the libraries. We demonstrate how syntax and analysis are added to a language by extending Java with syntax from the query language SQL and static analysis of these constructs so that syntax and type errors in SQL queries can be detected at compile-time.

Keywords

Description

Associated research group: Minnesota Extensible Language Tools

Related to

Replaces

License

Series/Report Number

Funding information

Isbn identifier

Doi identifier

Previously Published Citation

LCSD 2006 - Library Centric Software Development Workshop

Suggested citation

Van Wyk, Eric; Bodin, Derek; Huntington, Paul. (2006). Adding Syntax and Static Analysis to Libraries via Extensible Compilers and Language Extensions. Retrieved from the University Digital Conservancy, https://hdl.handle.net/11299/217322.

Content distributed via the University Digital Conservancy may be subject to additional license and use restrictions applied by the depositor. By using these files, users agree to the Terms of Use. Materials in the UDC may contain content that is disturbing and/or harmful. For more information, please see our statement on harmful content in digital repositories.