Skip to main content

Part of the book series: The Kluwer International Series in Engineering and Computer Science ((SECS,volume 732))

  • 122 Accesses

Abstract

Parsing is the core of the front end of a compiler. The predictive recursive-descent parsing technology is most widely used in a traditional compiler design. It is straightforward and easy to implement. But since predictive recursive-descent parsing degrades into a structural programming, it results in a parser that is very hard to change, extend and maintain.

A pattern language is a set of related patterns that solve a common problem in a problem domain. This paper presents a pattern language for developing a framework for parsing in object-oriented compiler design based on the principle of the predictive recursive-descent parsing technology. It describes four patterns that address three design aspects in developing an object-oriented parser. Two alternative patterns are presented to provide alternative solutions to solve the recursion problem in the object-oriented software design. One is based on the Builder design pattern, and the other is based on the meta-programming technology. The parsers developed from this pattern language are easy to implement, easy to extend, and easy to maintain. This pattern language is intended to express a flexible and extensible design for parsing that can accommodate variations to its most extent.

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 109.99
Price excludes VAT (USA)
  • Durable hardcover 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. Frank Buschmann, Regine Meunier, Hans Rohnert, Peter Sommerlad, and Michael Stal. Pattern-Oriented Software Architecture: A System of Patterns. John Wiley & Sons, 1996.

    Google Scholar 

  2. Martin Fowler. Analysis Pattern: Reusable Object Models. Addison-Wesley, 1997.

    Google Scholar 

  3. Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1995.

    Google Scholar 

  4. Yun Mai and Michel de Champlain. An Extensible One-Pass Assembler Framework. Technical Report, Department of Electrical and Computer Engineering, Concordia University, Montreal, Canada, June 2000.

    Google Scholar 

  5. Yun Mai and Michel de Champlain. Design A Compiler Framework in Java. Technical Report, Department of Electrical and Computer Engineering, Concordia University, Montreal, Canada, November 2000.

    Google Scholar 

  6. Yun Mai and Michel de Champlain. A Pattern Language to Visitors. The 8th Conference PLoP ′2001, Monticello, Illinois, USA, September 2001.

    Google Scholar 

  7. Yun Mai and Michel de Champlain. Reflective Visitor Pattern. EuroPLoP ′2001 Writer’s workshop, Irsee, Germany, July 2001.

    Google Scholar 

  8. Thomas W. Parsons. Introduction To Compiler Construction. Freeman, 1992.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer Science+Business Media New York

About this chapter

Cite this chapter

Mai, Y., de Champlain, M. (2003). A Pattern Language For Parsing. In: D’Hondt, T. (eds) Technology of Object-Oriented Languages, Systems and Architectures. The Kluwer International Series in Engineering and Computer Science, vol 732. Springer, Boston, MA. https://doi.org/10.1007/978-1-4615-0413-9_7

Download citation

  • DOI: https://doi.org/10.1007/978-1-4615-0413-9_7

  • Publisher Name: Springer, Boston, MA

  • Print ISBN: 978-1-4613-5064-4

  • Online ISBN: 978-1-4615-0413-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics