Journal of the ACM (JACM)
Simple deterministic languages
SWAT '66 Proceedings of the 7th Annual Symposium on Switching and Automata Theory (swat 1966)
Bracketed context-free languages
Journal of Computer and System Sciences
On the equivalence, containment, and covering problems for the regular and context-free languages
Journal of Computer and System Sciences
Hi-index | 0.00 |
Two context-free grammars are defined as being structurally-equivalent if they generate the same sentences and assign similar parse trees (differing only in the labelling of the nodes) to each. It is argued that this type of equivalence is more significant than weak equivalence, which requires only that the same sentences be generated. While the latter type of equivalence is in general undecidable, it is shown here that there exists a finite algorithm for determining if two arbitrary context-free grammars are structurally equivalent. A related result is a procedure for converting an arbitrary context-free grammar into a structurally equivalent ''simple'' grammar (S-grammar) where this is possible, or else indicating that no such grammar exists. The question of structural ambiguity is also studied and a procedure is given for determining if an arbitrary context-free grammar can generate the same string in 2 different ways with similar parse trees.