A survey of adaptable grammars

Henning Christiansen · ACM SIGPLAN Notices · 1990

This paper is a comment on two recent contributions to Sigplan Notices. In his paperC QThe static semantics!leRC no. 25/4C Brian Meek discusses the relevance of the notion of Qstatic semanticsR. The relation between a variable’s declaration and the restrictions on its useC for exampleC is usually classi!ed as static semantics. Meek!nds the designation rather misleading since it is applied for concepts concerned with contextdependent syntax. The term QsemanticsR should properly only be used for aspects that have to do with real meaningC e.g.C the association between program statements and their intended computation. Here I will show that this distinction between syntax and semantics can be made clearer using grammars which adapt themselves to the current program contexts. For exampleC declarations of new items can be described by adding new rules to the grammar and thusC within a given scope of a programC the set of valid phrases can be derived freely by means of the current set of grammar rules. This wayC we get rid of some of those X often quite complicated X context constraints that are called static semantics. In no. 25/5C Boris Buhrsteyn presents an articleC Q=n the modi!cation of the formal grammar at parse timeR. The author suggests an approach to language recognition in which

Read the paper · More papers on PaperTik