Using DCGs (https://en.wikipedia.org/wiki/Definite_clause_grammar), you can easily create grammars for automated document parsing and generation.
You could even write a compiler (http://comjnl.oxfordjournals.org/content/34/1/64.full.pdf) or disassembler (http://www.dtic.mil/dtic/tr/fulltext/u2/a242987.pdf) in Prolog fairly easy. All thanks to the really smooth support of tree-like structures.
I do wonder why all this seems to be a little forgotten. Granted, the syntax and semantics are a bit unusual, but the expressive power can hardly be matched.