Skip to main content
Article thumbnail
Location of Repository

Invertible Syntax Descriptions: Unifying Parsing and Pretty Printing

By Tillmann Rendel and Klaus Ostermann

Abstract

Parsers and pretty-printers for a language are often quite similar, yet both are typically implemented separately, leading to redundancy and potential inconsistency. We propose a new interface of syntactic descriptions, with which both parser and pretty-printer can be described as a single program. Whether a syntactic description is used as a parser or as a pretty-printer is determined by the implementation of the interface. Syntactic descriptions enable programmers syntax once and for all, and use these descriptions for parsing or pretty-printing as needed. We also discuss the generalization of our programming technique towards an algebra of partial isomorphisms

Topics: Design, Languages Keywords embedded domain specific languages, invertible computation, parser
Year: 2011
OAI identifier: oai:CiteSeerX.psu:10.1.1.189.4433
Provided by: CiteSeerX
Download PDF:
Sorry, we are unable to provide the full text but you may find it at the following location(s):
  • http://citeseerx.ist.psu.edu/v... (external link)
  • http://www.informatik.uni-marb... (external link)
  • Suggested articles


    To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.