EXTENSIBLE PARSING & TRANSFORMATION We present the metafront tool for specifying flexible, safe, and efficient syntactic transformations between languages defined by context-free grammars. The transformations are guaranteed to terminate and to map grammatically legal input to grammatically legal output. We rely on a novel parser algorithm, specificity parsing, that is designed to support gradual extensions of a grammar by allowing productions to remain in a natural style and by statically reporting ambiguities and errors in terms of individual productions as they are being added. Our tool may be used as a parser generator in which the resulting parser automatically supports a flexible, safe, and efficient macro processor, or as an extensible lightweight compiler generator for domain-specific languages. We show substantial examples of both kinds.
The JWIG project investigates design of high-level languages and program analyses for server-oriented Web application programming. JWIG is a Java-based descendant of <bigwig>, which in turn was inspired by MAWL. The current version of JWIG provides: * a flexible method for dynamically generating XHTML documents using a unique template mechanism based on XACT, * a convenient programming model for working with form input, including declarative form field validation using PowerForms, * an explicit language-based model of sessions, and * program analyses that at compile-time guarantee that all documents being generated dynamically are valid XHTML 1.0 and that form input fields always match the code that receives the input.
Daniel Fridlender Mia Indrika March 2001 Inspired by Danvy, we describe a technique for defining, within the Hindley-Milner type system, some functions which seem to require a language with dependent types. We illustrate this by giving a general definition of zipWith for which the Haskell library provides a family of functions, each member of the family having a different type and arity. Our technique consists in introducing ad hoc codings for natural numbers which resemble numerals in lambda-calculus