Skip to main content

Extended Context-Free Grammars and Normal Form Algorithms

  • Conference paper
  • First Online:
Book cover Automata Implementation (WIA 1998)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1660))

Included in the following conference series:

Abstract

We investigate the complexity of a variety of normal-form transformations for extended context-free grammars, where by extended we mean that the set of right-hand sides for each nonterminal in such a grammar is a regular set. The study is motivated by the implementation project GraMa which will provide a C++ toolkit for the symbolic manipulation of context-free objects just as Grail does for regular objects. The results are that all transformations of interest take time linear in the size of the given grammar giving resulting grammars that are larger by a constant factor than the original grammar. Our results generalize known bounds for context-free grammars but do so in nontrivial ways. Specifically, we introduce a new representation scheme for extended context-free grammars (the symbol-threaded expression forest), a new normal form for these grammars (dot normal form) and new regular expression algorithms.

This research was supported under a grant from the Research Grants Council of Hong Kong SAR. It was carried out while the first and second authors were visiting HKUST.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A.V. Aho and J.D. Ullman. The Theory of Parsing, Translation, and Compiling, Vol. I: Parsing. Prentice-Hall, Inc., Englewood Cliffs, NJ, 1972.

    Google Scholar 

  2. K.R. Barnes. Exploratory steps towards a grammatical manipulation package (GRAMPA). Master’s thesis, McMaster University, Hamilton, Ontario, Canada, 1972.

    Google Scholar 

  3. H.A. Cameron and D. Wood. Structural equivalence of extended context-free and extended E0L grammars. In preparation, 1998.

    Google Scholar 

  4. D.J. Cohen and C.C. Gotlieb. A list structure form of grammars for syntactic analysis. Computing Surveys, 2:65–82, 1970.

    Article  Google Scholar 

  5. D. Connolly. W3C web page on XML. http://www.w3.org/XML/, 1997.

  6. A. Ehrenfeucht and G. Rozenberg. An easy proof of Greibach normal form. Information and Control, 63:190–199, 1984.

    Article  MATH  MathSciNet  Google Scholar 

  7. D. Giammarresi and D. Wood. Transition diagram systems and normal form transformations. In Proceedings of the Sixth Italian Conference on Theoretical Computer Science, Singapore, 1998. World Scientific Publishing Co. Pte. Ltd.

    Google Scholar 

  8. S.A. Greibach. A new normal form theorem for context-free phrase structure grammars. Journal of the ACM, 12:42–52, 1965.

    Article  MATH  MathSciNet  Google Scholar 

  9. S.A. Greibach. A simple proof of the standard-form theorem for context-free grammars. Technical report, Harvard University, Cambridge, MA, 1967.

    Google Scholar 

  10. M.A. Harrison. Introduction to Formal Language Theory. Addison-Wesley, Reading, MA, 1978.

    MATH  Google Scholar 

  11. M.A. Harrison and A. Yehudai. Eliminating null rules in linear time. Computer Journal, 24:156–161, 1981.

    Article  MATH  MathSciNet  Google Scholar 

  12. G. Hotz. Normal-form transformations of context-free grammars. Acta Cybernetica, 4:65–84, 1978.

    MATH  MathSciNet  Google Scholar 

  13. H.B. Hunt III, D.J. Rosenkrantz, and T.G. Szymanski. On the equivalence, containment and covering problems for the regular and context-free languages. Journal of Computer and System Sciences, 12:222–268, 1976.

    MATH  MathSciNet  Google Scholar 

  14. ISO 8879: Information processing—Text and office systems— Standard Generalized Markup Language (SGML), October 1986. International Organization for Standardization.

    Google Scholar 

  15. P. Kilpeläinen and D. Wood. SGML and exceptions. In C. Nicholas and D. Wood, editors, Proceedings of the Third International Workshop on Principles of Document Processing (PODP 96), pages 39–49, Heidelberg, 1997. Springer-Verlag. Lecture Notes in Computer Science 1293.

    Google Scholar 

  16. R. Koch and N. Blum. Greibach normal form transformation revisited. In Reischuk and Morvan, editors, STACS’97 Proceedings, pages 47–54, New York, NY, 1997. Springer-Verlag. Lecture Notes in Computer Science 1200.

    Google Scholar 

  17. D. R. Raymond and D. Wood. Grail: Engineering automata in C++, version 2.5. Technical Report HKUST-CS96-24, Department of Computer Science, Hong Kong University of Science & Technology, Clear Water Bay, Kowloon, Hong Kong, 1996.

    Google Scholar 

  18. D.R. Raymond and D. Wood. Grail: A C++ library for automata and expressions. Journal of Symbolic Computation, 17:341–350, 1994.

    Article  MATH  Google Scholar 

  19. R.J. Ross. Grammar Transformations Based on Regular Decompositions of Context-Free Derivations. PhD thesis, Department of Computer Science, Washington State University, Pullman, WA, USA, 1978.

    Google Scholar 

  20. R.J. Ross, G. Hotz, and D.B. Benson. A general Greibach normal form transformation. Technical Report CS-78-048, Department of Computer Science, Washington State University, Pullman, WA, USA, 1978.

    Google Scholar 

  21. A. Salomaa. Formal Languages. Academic Press, New York, NY, 1973.

    MATH  Google Scholar 

  22. D. Wood. Theory of Computation. John Wiley & Sons, Inc., New York, NY, 1987.

    MATH  Google Scholar 

  23. D. Wood. Theory of Computation. JohnWiley & Sons, Inc., New York, NY, second edition, 1998. In preparation.

    Google Scholar 

  24. A. Yehudai. On the Complexity of Grammar and Language Problems. PhD thesis, University of California, Berkeley, CA, 1977.

    Google Scholar 

  25. D. Ziadi. Regular expression for a language without empty word. Theoretical Computer Science, 163:309–315, 1996.

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Albert, J., Giammaressi, D., Wood, D. (1999). Extended Context-Free Grammars and Normal Form Algorithms. In: Champarnaud, JM., Ziadi, D., Maurel, D. (eds) Automata Implementation. WIA 1998. Lecture Notes in Computer Science, vol 1660. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48057-9_1

Download citation

  • DOI: https://doi.org/10.1007/3-540-48057-9_1

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-66652-3

  • Online ISBN: 978-3-540-48057-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics