lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


You've got a nice base for XML manipulation with metalua's pattern matching:

http://metalua.blogspot.com/2007/12/pattern-matching-in-metalua.html

It's directly inspired by OCaml's pattern matching, and there are a couple of very nice extensions of OCaml's patterns intended to manipulate XML:

- CDuce: http://www.cduce.org
- OCamlDuce, a merge back of CDuce into OCaml: http://www.cduce.org/ocaml.html
- There's also the older XDuce, which I don't known very well: http://xduce.sourceforge.net

The complex parts of these compilers are dedicated to static type inference and checking, something you don't want in Lua, so it's not that hard to extend match.lua into something more XML oriented. You might want the latest version, though. The latest version compatible with metalua 0.3 should be:

 http://repo.or.cz/w/metalua.git?a=blob;f=src/lib/extension-compiler/match.mlua;hb=759c574087fee941de03ea3f6db641b8b4964e34


I'd obviously be very interested by such an extension, and would be willing to give a hand to make it happen :)

-- Fabien.