Texinfo / parse-info stuff



I've just pushed a largish update to the parse-info branch. The commit
note that's most relevant is probably:

    Massively refactor the parse-info code to run at build time instead
    of run-time.
    
    Basically, all the complicated texinfo parsing stuff is now in
    lisp-utils/parse-info.lisp. This gets run at build time to create
    offset files, which have names of the form
    
      maxima-info-offsets-<foo>.lisp
    
    where <foo> is the name of the lisp implementation.
    
    In these offset files, for each topic, we store the list
    
      (TITLE FILENAME START LEN)
    
    where TITLE is the name of the node or index entry and START, LEN
    are suitable for FILE-POSITION on the host lisp.
    
    At run time, we load up these files (almost instantaneous - they're
    pretty simple!) and use them to load up info contents.


Making this work properly required quite a bit of hacking around on the
Makefiles in info/doc. I think I've got it right, but I haven't yet
checked the CHM generation. Note that the 'make uninstall' target for
html seems to be broken, but I think it has been broken for ages. I'll
try to fix that soonish.

I've not yet tested with Texinfo 5.

Nice things about this branch compared to master:

 (1) If something's gone horribly wrong and the info documentation
     wasn't installed, Maxima still runs. (But you don't get
     documentation)

 (2) The bug that Ray reported yesterday is fixed, I think. At least, on
     my system, everything seems to work right.

 (3) I think that, even building with all 7 supported lisps, this is
     still faster than the perl script it replaces.

Known problems:

 (1) On my machine, if I run with SCL or CLISP and try to display german
     documentation, I get an error. This isn't actually in the info
     parsing code at all (yay!), but happens when we try to output
     umlauts to the terminal.

     I think that, on the other competent lisp implementations, they are
     transcoding as necessary for the declared terminal encoding (utf8
     on my machine). On GCL, it just dumps the bytes and hopes, of
     course.

     Does anyone have any idea how to get SCL / CLISP to display
     non-ascii characters?

 (2) The code doesn't currently discard chapter starts. Eg, "? diag"
     gives two hits, one of which is just boilerplate. This will be
     quick to fix; I just haven't done so yet.

Also, now I've spent quite so long looking at the doc/info Makefiles, I
think I'll spend a little more time and tidy them up. There's an awful
lot of duplication between them, and quite a lot of evidence of changes
being made in only some of the files. Eugh.

Anyway, I'd be very grateful if people could take this for a spin and
try to find bugs.

Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20130503/94c2f14b/attachment.pgp>;