A Family of Syntax Deenition Formalisms

In this paper we design a syntax deenition formalism as a family of formalisms. Starting with a small kernel, various features for syntax de-nition are designed orthogonally to each other. This provides a framework for constructing new formalisms by adapting and extending old ones. The formalism is developed with the algebraic speciication formalism Asf+Sdf. It provides the following features: lexical and context-free syntax, variables, disambiguation by priorities, regular expressions, character classes and modular deenitions. New are the uniform treatment of lexical syntax, context-free syntax and variables, the treatment of regular expressions by normalization yielding abstract syntax without auxiliary sorts, regular expressions as result of productions and modules with hidden imports and renamings. Note: Supported by the Dutch Organization for Scientiic Research (NWO) under grant 612-317-420: Incremental parser generation and context-dependent disambiguation, a multidisciplinary perspective.

[1]  S. M. Eker Associative matching for linear terms , 1992 .

[2]  Joseph A. Goguen,et al.  Initial Algebra Semantics and Continuous Algebras , 1977, J. ACM.

[3]  Gregor Snelting,et al.  The PSG system: from formal language definitions to interactive programming environments , 1986, TOPL.

[4]  Paul R. Hendriks,et al.  Implementation of modular algebraic specifications , 1991 .

[5]  John McCarthy,et al.  Towards a Mathematical Science of Computation , 1962, IFIP Congress.

[6]  Russell W. Quong,et al.  Adding Semantic and Syntactic Predicates To LL(k): pred-LL(k) , 1994, CC.

[7]  M. G. J. van den Brand Pretty printing in the ASF+SDF meta-environment: Past, Present and Future , 1995 .

[8]  J. Lambek The Mathematics of Sentence Structure , 1958 .

[9]  Eelco Visser,et al.  Using Filters for the Disambiguation of Context-free Grammars , 1994 .

[10]  Frédéric Voisin,et al.  CIGALE: A Tool for Interactive Grammar Construction and Expression Parsing , 1986, Sci. Comput. Program..

[11]  James R. Cordy,et al.  The TXL Programming Language Syntax and Informal Semantics , 1993 .

[12]  E. Schmidt,et al.  Lex—a lexical analyzer generator , 1990 .

[13]  John W. Backus,et al.  The syntax and semantics of the proposed international algebraic language of the Zurich ACM-GAMM Conference , 1959, IFIP Congress.

[14]  David H. D. Warren,et al.  Definite Clause Grammars for Language Analysis - A Survey of the Formalism and a Comparison with Augmented Transition Networks , 1980, Artif. Intell..

[15]  Karl Meinke,et al.  Equational Specification of Abstract Types and Combinators , 1991, CSL.

[16]  Thomas Reps,et al.  The Synthesizer Generator: A System for Constructing Language-Based Editors , 1988 .

[17]  Donald E. Knuth,et al.  Semantics of context-free languages , 1968, Mathematical systems theory.

[18]  Jay Earley,et al.  Ambiguity and precedence in syntax description , 1975, Acta Informatica.

[19]  Mikkel Thorup,et al.  Controlled grammatic ambiguity , 1994, TOPL.

[20]  Paul Klint,et al.  The syntax definition formalism SDF—reference manual— , 1989, SIGP.

[21]  Jan A. Bergstra,et al.  Algebraic specification , 1989 .

[22]  Alfred V. Aho,et al.  Deterministic parsing of ambiguous grammars , 1973, POPL.