Parsely: A cross-language tool for parsing and file manipulation

Parsely 0.1.0 is out the door!

What is Parsely?

Parsely is a tool to help write configuration tools. From the README:

The main idea behind Parsely is to expose a programmer-friendly interface to different file formats. Here's how it works.
  1. You, the programmer, decide you want to write a tool that manipulates a given file format.
  2. You write a grammar file describing the file format. For a set of extremely simple examples, look in tests/*.ply.
  3. Parsely reads the grammar file, and writes a scanner/parser for you in the language of your choice. Right now, I have the native Python scanner/parser running, and the C scanner/parser[1] on their way. Later, I hope to support at least C++, Perl, Java, Guile.
  4. Later, your program can use the generated scanner to parse files into an easily-manipulated tree structure. It can examine and modify the tree structure, and later write its changes back out to disk, preserving all comments and formatting. All you need to write is the front-end.
[1] Parsely doesn't try to reinvent the wheel; it interfaces with scanner- and parser- generators like flex and bison, rather than trying to generate efficient C scanners and parsers itself.

Parsely is licensed under the LGPL.

Current status

Version 0.1.0 is finally done! You can download it here. Please be aware that this is a hackers-only release: you'll probably need to know a fair amount about Python to get it to work.

Pending tasks

Parsely is alpha software! I'm trying to finish my Master's thesis now, but I should have a few hours here and there to hack on Parsely. These are the tasks I hope to accomplish first.

Most of all, I need good GUI hackers to help write graphical frontends for the backends Parsely provides. Give Parsely a try in your own configuration project! If you can't get it working yourself, drop me a line, and I'll help you write the .ply files and the the syntax manipulation code.

Parsely has the flexibility to handle everything from simple Key-value files to XF86Config to bash and tcsh configurations. It can probably help with your project too.

(In fact, it wouldn't be too hard to write a module to parse, if only I knew what to do with it...)

Where can I find more information?

Mailing lists

The parsely mailing list is To subscribe, send a message to with subscribe in the message body.

Or, enter your email address here to subscribe:


Contact for more information. Naturally, I'm accepting patches.