Skip to content

Implementation of Kiselyov et al's pretty printing algorithm in Go.

License

Notifications You must be signed in to change notification settings

gchpaco/gopprint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gopprint

An implementation of Kiselyov et al's pretty printing algorithm in Go.

Pretty printing occurs in two global phases. Rather than try to print some random tree directly, which could get quite ugly quite quickly, we build a "pretty printer document" out of some very simple primitives. These primitives (and our algorithm) are due to D.C. Oppen originally and later Kiselyov et al. Oppen's original formulation had Text, LineBreak, Concat, and Group. I generalized LineBreak to cond_t which became our cond_t because we need to do more sophisticated breaks, and I added nest_t for controllable indentation.

About

Implementation of Kiselyov et al's pretty printing algorithm in Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages