Title
Invertible syntax descriptions: unifying parsing and pretty printing
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 to describe the connection between concrete and abstract 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.
Year
DOI
Venue
2010
10.1145/1863523.1863525
Haskell
Keywords
Field
DocType
partial isomorphisms,new interface,invertible syntax description,abstract syntax,potential inconsistency,syntactic description,programming technique,pretty printing,single program,unifying parsing,parser combinators,parser,domain specific language,design
Domain-specific language,Top-down parsing,Programming language,Syntactic predicate,Computer science,Abstract syntax tree,Natural language processing,Artificial intelligence,Parsing,Parser combinator,Abstract syntax,Syntax
Conference
Volume
Issue
ISSN
45
11
0362-1340
Citations 
PageRank 
References 
23
0.97
17
Authors
2
Name
Order
Citations
PageRank
Tillmann Rendel139216.15
Klaus Ostermann245723.97