users-prolog
[Top][All Lists]
Advanced

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

Re: GNU Prolog documentation


From: Lindsey Spratt
Subject: Re: GNU Prolog documentation
Date: Tue, 25 Jun 2013 10:13:41 -0400

Perhaps latex hackery with the pl-bips.tex file would be the quickest and most 
reliable way to get text nuggets to support a 'help' predicate.

Many (but not all) of the builtins are described starting with something like:

\subsubsection{\texttt{arg/3}}
\label{arg/3}
   \AddPBD{arg/3}

The \AddPBD{foo/N} construct specifically identifies each 
PrologBuiltinDescription in the .tex file. There ought to be some way to 
subvert the latex macros to get pl-bips.tex to emit the desired nuggets.


Lindsey

On Jun 25, 2013, at 5:56 AM, emacstheviking <address@hidden> wrote:

> Hi,
> 
> Does anybody know what would be the *best* way to slice and dice the 
> documentation source files to produce "nuggets" per predicate?

> 
> As far as I can see, the gprolog runtime doesn't have apropos or help 
> predicates like some other implementations so I have decided that as an aid 
> to learning more I am going to try to implement them but of course they need 
> access to the underlying documentation for the meat of the output.
> 
> I can see from the source distribution that the documentation is written 
> using .tex files (I have used LaTeX for many many years) BUT would it be 
> *easier* to pick apart the large single HTML file instead. The H4 tags carry 
> the predicate name which is useful as a starting point.
> 
> I would like to have something like this:
> 
>     help(predicate).
> 
> Dump the relevant part of the help file to the console.
> 
> 
> I have written a "C" extension that wraps the dynamic link library calls 
> (dlopen,dlcose etc) and so far that seems to show promise. I was toying with 
> writing the actual implementation in C using libxml or something to scour the 
> HTML file, on demand. My other approach would be to produce a "database" 
> (bunch of files called predicatename.txt) and then just interpolate the 
> filename from the help argument and do it that way. Whatever, with all 
> programs it comes down to defining the data first!
> 
> I really like GNU Prolog, I started with SWIPL but it's too big a dung-ball 
> for me right now. Ciao seems "ok" but again, too big a dung-ball. I like the 
> lean and mean approach with GNU Prolog plus the opportunity to make it better 
> with my own extensions.
> 
> Thanks,
> Sean Charles.
> 
> 
> _______________________________________________
> Users-prolog mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/users-prolog




reply via email to

[Prev in Thread] Current Thread [Next in Thread]