Semantic Specification using Two-Level Grammars: Labels and GOTO Statements
Frank G. Pagan · The Computer Journal · 1982
The metalinguistic formalism of two-level grammars (W-grammars) is known to be capable of precisely defining the dynamic semantics of certain features of programming languages in a fairly understandable fashion. This paper demonstrates that its application to low-level control facilities—labels and goto statements—is not only possible but also reasonably straightforward and manageable. Moreover, the extra definitional complexity that arises when there is a mixture of low-level and high-level (if-then-else, while-do, etc.) facilities does not appear to be any worse than it is with other approaches to semantic specification.