Be very careful before you make this leap. I've been dealing with
document formats for years, and if there's one thing I've learned,
it's that making documents into programs is fraught with peril.
Keep in mind that as long as the document format is "non-procedural,"
that is, less expressive than a turing machine, you maintain the
possiblity of translating the document to another representation
reliably.
The _instant_ your documents become programs (e.g. nroff, TeX),
document conversion (back to a non-turning-complete language) is as
difficult as the halting problem, and only heuristic solutions are
possible.
It's very difficult to keep system dependencies out of programming
languages. Python does a pretty darn good job, but it still requires a
certain class of machine to run, and many of the useful modules have
to be ported to each new system.
I encourage folks to explore "declarative" ways to express the
features they need. (and use an SGML DTD as a way to specify
the language... it's kinda ugly, but it works...)
Dan