cl-walker

Lisp sexp code to CLOS AST parser and unparser

Introduction

Sometimes it happens that you need to transform Common Lisp code with full access to the lexical environment. The most usual examples are a CPS transformer, a #L reader, a complex iterator macro like Iterate (which is using its own code walker at the time of writing and lacks support for updating the lexical environment with its own bindings. It can cause headaches if you want to use a macro inside its body that wants to inspect the lexical environment).

To help dealing with these things, cl-walker parses a Common Lisp sexp into a tree of AST nodes. These nodes are CLOS instances that you can easily process using generic methods. It also provides an unwalker that converts back the CLOS instances to sexps.

cl-walker is maintained by the authors of cl-dwim.

Mailing Lists

Repo

You can browse the cl-walker darcs repository or get the tree with

darcs get --partial http://common-lisp.net/project/cl-walker/darcs/cl-walker

License

cl-walker was originally written by Marco Baringer and distributed as part of his Arnesi library which is distributed under the BSD license, just like the factored out cl-walker.