Abstract
The ability to detect ambiguities in context-free grammars is vital for their use in several fields, but the problem is undecidable in the general case. We present a safe, conservative approach, where the approximations cannot result in overlooked ambiguous cases . We analyze the complexity of the verification, and provide formal comparisons with several other ambiguity detection methods.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Cheung, B.S.N., Uzgalis, R.C.: Ambiguity in context-free grammars. In: SAC 1995, pp. 272–276. ACM Press, New York (1995), doi:10.1145/315891.315991
Reeder, J., Steffen, P., Giegerich, R.: Effective ambiguity checking in biosequence analysis. BMC Bioinformatics 6, 153 (2005)
Brabrand, C., Giegerich, R., Møller, A.: Analyzing ambiguity of context-free grammars. Technical Report RS-06-09, BRICS, University of Aarhus (May 2006)
AeroSpace and Defence Industries Association of Europe: ASD Simplified Technical English, Specification ASD-STE100 (2005)
Kuich, W.: Systems of pushdown acceptors and context-free grammars. Elektronische Informationsverarbeitung und Kybernetik 6(2), 95–114 (1970)
Schröer, F.W.: AMBER, an ambiguity checker for context-free grammars. Technical report, compilertools.net (2001)
Schmitz, S.: An experimental ambiguity detection tool. In: Sloane, A., Johnstone, A., eds.: LDTA 2007, To appear in Electronic Notes in Theoretical Computer Science (2007)
Cantor, D.G.: On the ambiguity problem of Backus systems. Journal of the ACM 9(4), 477–479 (1962)
Chomsky, N., Schützenberger, M.P.: The algebraic theory of context-free languages. In: Braffort, P., Hirshberg, D. (eds.) Computer Programming and Formal Systems. Studies in Logic, pp. 118–161. North-Holland Publishing, Amsterdam (1963)
Gorn, S.: Detection of generative ambiguities in context-free mechanical languages. Journal of the ACM 10(2), 196–208 (1963)
Jampana, S.: Exploring the problem of ambiguity in context-free grammars. Master’s thesis, Oklahoma State University (July 2005)
Culik, K., Cohen, R.: LR-Regular grammars—an extension of LR(k) grammars. Journal of Computer and System Sciences 7, 66–96 (1973)
Schmitz, S.: Conservative ambiguity detection in context-free grammars. Technical Report I3S/RR-2006-30-FR, Laboratoire I3S, Université de Nice - Sophia Antipolis & CNRS (September 2006)
Ginsburg, S., Harrison, M.A.: Bracketed context-free languages. Journal of Computer and System Sciences 1, 1–23 (1967)
Nederhof, M.J.: Regular approximation of CFLs: a grammatical view. In: Bunt, H., Nijholt, A. (eds.) Advances in Probabilistic and other Parsing Technologies, pp. 221–241. Kluwer Academic Publishers, Boston, MA (2000)
Knuth, D.E.: On the translation of languages from left to right. Information and Control 8(6), 607–639 (1965)
Sikkel, K. (ed.): Parsing Schemata - a framework for specification and analysis of parsing algorithms. Texts in Theoretical Computer Science - An EATCS Series. Springer, Heidelberg (1997)
Hunt III, H.B., Szymanski, T.G., Ullman, J.D.: Operations on sparse relations and efficient algorithms for grammar problems. In: 15th Annual Symposium on Switching and Automata Theory, pp. 127–132. IEEE Computer Society, Los Alamitos (1974)
Hunt III, H.B., Szymanski, T.G., Ullman, J.D.: On the complexity of LR(k) testing. Communications of the ACM 18(12), 707–716 (1975)
Szymanski, T.G., Williams, J.H.: Noncanonical extensions of bottom-up parsing techniques. SIAM Journal on Computing 5(2), 231–250 (1976)
Sippu, S., Soisalon-Soininen, E.: Parsing Theory, Vol. II: LR(k) and LL(k) Parsing. In: Simple Program Schemes and Formal Languages. LNCS, vol. 20, Springer, Heidelberg (1990)
Heilbrunner, S.: Tests for the LR-, LL-, and LC-Regular conditions. Journal of Computer and System Sciences 27(1), 1–13 (1983)
Mohri, M., Nederhof, M.J.: Regular approximations of context-free grammars through transformation. In: Junqua, J.C., van Noord, G. (eds.) Robustness in Language and Speech Technology, pp. 153–163. Kluwer Academic Publishers, Dordrecht (2001)
Gálvez, J.F., Schmitz, S., Farré, J.: Shift-resolve parsing: Simple, linear time, unbounded lookahead. In: Ibarra, O.H., Yen, H.-C. (eds.) CIAA 2006. LNCS, vol. 4094, pp. 253–264. Springer, Heidelberg (2006)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Schmitz, S. (2007). Conservative Ambiguity Detection in Context-Free Grammars. In: Arge, L., Cachin, C., Jurdziński, T., Tarlecki, A. (eds) Automata, Languages and Programming. ICALP 2007. Lecture Notes in Computer Science, vol 4596. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-73420-8_60
Download citation
DOI: https://doi.org/10.1007/978-3-540-73420-8_60
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-73419-2
Online ISBN: 978-3-540-73420-8
eBook Packages: Computer ScienceComputer Science (R0)