Grammars with macro-like productions

  • Authors:
  • Michael J. Fischer

  • Affiliations:
  • -

  • Venue:
  • SWAT '68 Proceedings of the 9th Annual Symposium on Switching and Automata Theory (swat 1968)
  • Year:
  • 1968

Quantified Score

Hi-index 0.00

Visualization

Abstract

Two new classes of grammars based on programming macros are studied. Both involve appending arguments to the intermediate symbols of a context-free grammar. They differ only in the order in which nested terms may be expanded: IO is expansion from the inside-out; OI from the outside-in. Both classes, in common with the context-free, have decidable emptiness and derivation problems, and both are closed under the operations of union, concatenation, Kleene closure (star), reversal, intersection with a regular set, and arbitrary homomorphism. OI languages are also closed under inverse homomorphism while IO languages are not. We exhibit two languages, one of which is IO but not OI and the other OI but not IO, showing that neither class contains the other. However, both trivially contain the class of context-free languages, and both are contained in the class of contextsensitive languages. Finally, the class of OI languages is identical to the class of indexed languages studied by Aho, and indeed many of the above. theorems about OI languages follow directly from the equivalence.