A Library for Processing Ad hoc Data in Haskell
Ad hoc data formats, i.e. semistructured non-standard data formats, are pervasive in many domains that need software tools — bioinformatics, demographic surveys, geophysics and network software are just a few. Building tools becomes easier if parsing and other standard input-output processing can be automated. Modern approaches for dealing with ad hoc data formats consist of domain specific languages based on type systems. Compilers for these languages generate data structures and parsing functions in a target programming language in which tools and applications are then written. We present a monadic library in Haskell that implements a data description language. Using our library, Haskell programmers have access to data description primitives that can be used for parsing and that can be integrated with other libraries and application programs without the need of yet another compiler.
KeywordsTarget Language Input Stream Semantic Constraint Physical Layout Parser Generator
Unable to display preview. Download preview PDF.
- 1.Pads, http://www.padsproj.org ( [Online]; accessed June 22, 2008)
- 2.Pcap, http://www.tcpdump.org/pcap.htm ( [Online]; accessed October 10, 2008)
- 6.Fisher, K., Mandelbaum, Y., Walker, D.: The next 700 data description languages. In: POPL 2006, pp. 2–15. ACM Press, New York (2006)Google Scholar
- 7.Fisher, K., Walker, D., Zhu, K.Q., White, P.: From dirt to shovels: fully automatic tool generation from ad hoc data. In: POPL 2008, pp. 421–434. ACM, New York (2008)Google Scholar
- 8.Hughes, J.: The design of a pretty-printing library. In: First International Spring School on Advanced Functional Programming Techniques-Tutorial Text, pp. 53–96. Springer, London (1995)Google Scholar
- 9.Hutton, G., Meijer, E.: Monadic parsing in Haskell. Journal of Functional Programming 8(4), 437–444 (1998)Google Scholar
- 10.Kennedy, A.J.: Pickler combinators. Journal of Functional Programming 14(6), 727–739 (2004)Google Scholar
- 11.Leijen, D., Meijer, E.: Parsec: Direct style monadic parser combinators for the real world. Tech. Rep. UU-CS-2001-27, Department of Computer Science, Universiteit Utrecht (2001)Google Scholar