Grammars with macro-like productions
- 1 October 1968
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- No. 02724847,p. 131-142
- https://doi.org/10.1109/swat.1968.12
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.Keywords
This publication has 10 references indexed in Scilit:
- Grammars with macro-like productionsPublished by Institute of Electrical and Electronics Engineers (IEEE) ,1968
- One-way stack automataJournal of the ACM, 1967
- Indexed grammars -- An extension of context free grammarsPublished by Institute of Electrical and Electronics Engineers (IEEE) ,1967
- Stack automata and compilingJournal of the ACM, 1967
- TRAC, a procedure-describing language for the reactive typewriterCommunications of the ACM, 1966
- A general purpose macrogeneratorThe Computer Journal, 1965
- Classes of languages and linear-bounded automataInformation and Control, 1964
- Three theorems on phrase structure grammars of type 1Information and Control, 1963
- Macro instruction extensions of compiler languagesCommunications of the ACM, 1960
- Finite Automata and Their Decision ProblemsIBM Journal of Research and Development, 1959