term_expansion/2 and other random questions...

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

term_expansion/2 and other random questions...

It says in the docs that it only works on DCG rules which is fair enough but is there a reason for this?

I am currently trying to write a minimal XML parser in GNU Prolog, I was tempted to FFI libxml2 or minixml but decided I needed to learn DCG better.

Once it is done I can resume development of my main project that requires XML parsing. I wondered if term_expansion/2 and expand_term/2 might be of use like creating macros or something?

I have returned to Prolog and want to better understand meta-programming. I have heard Prolog is really great for this as it has the homoiconicity of LISP but I am unsure how to proceed in terms of building an understanding. I am used to writing LISP macros and in Clojure but wondered

I have my books to read but I wondered if anybody knew of any good web resources that also might help?

My books are Art of Prolog, LPN, Prolog Programming In Depth and of course Clocksin & Mellish.

Between them I am sure I can get a good grounding, chapter 6 of PPID (Covington, Nute and Vellino) looks particularly interesting, that's a good book that is!



Users-prolog mailing list
[hidden email]