Conservative pretty printing

  • Authors:
  • Martin Ruckert

  • Affiliations:
  • State University of New York, College at New Paltz, New Paltz, NY

  • Venue:
  • ACM SIGPLAN Notices
  • Year:
  • 1997

Quantified Score

Hi-index 0.00

Visualization

Abstract

The main purpose of the pretty printing tool, presented here, is not so much the complete reformating of a program but is described better as finding and correcting formating errors.A set of relations is given describing the proper alignment of a piece of code in accordance with its syntactic structure. It is complemented by a simple algorithm to change any given source code to satisfy these relations.The relations are flexible enough to allow a variety of different formating styles while rejecting formating errors, i.e. code that is not formated according to its syntactic structure.Various examples illustrate the ideas, the problems, the goals, and the achievements.