Forth2HTML and Forth2XML

(new!)Forth2XML is now available!

Development of Forth2HTML

The original Forth to HTML utility was developed by Brad Eckert and donated to the public domain. He announced it on the comp.lang.forth newsgroup and a couple of people started looking at it and tinkering. Because the development was simultaneous and not centrally coordinated, multiple versions were created simultaneously. This page attempts to show all the revisions.

Using Brad Eckert's version and Dirk Busch's version as well as my own edits, I tried to merge everything back together so we can more effectively pool our efforts.

Many thanks to:
Brad Eckert -- who started this
Dirk Busch -- who made many useful enhancements

The picture below contains an imagemap. Clicking on the nodes will bring you to the HTML code that was generated by the latest version of the utility and shows the relevant Forth code for that revision. Clicking on an arrow or on the change descriptions beside the arrows will show you an HTML version of a difference between the two files.

BUG ALERT! (1 Jan 2004) Every version of this code has a bug. Most of the people using it don't see the bug, because they're apparently using a WinForth or some other Forth which has a PAD that it is large. I have used hForth and gForth (both of which happen to have an 84 byte PAD -- the minimum specified by the ANS standard) and both suffer from memory overruns as a result. I have created a word bang which is in my versions on this web site, which can be placed into various places in the code to try to figure out exactly where this overrun is happening. Unfortunately, I haven't figured it out yet, but I figured that I'd present what I've got so far in the hopes that it will accelerate progress.

BUG FIX UPDATE As of 2 January 2004, it looks like Brad Eckert has fixed the bug. Many people are testing this, so I'll update this when (if) a new version comes out.

We now have a couple of working versions. The file labelled color-brad8.f gives me a stack error when I run it on itself under gForth. I haven't had the time to figure out why yet, but apparently it runs OK under Win32Forth, which Brad uses. For me, the latest working version is the one labelled color-ed5.f but YMMV.

Rather than go much further with HTML, my inclination is to modify it to create XML next and then use XSLT to turn it into HTML or whatever else I need. Naturally, I'll post that here when I write it.

Enjoy!

versions graph Brad's version 0 Brad's version 1 added multiline comment, CHAR added multiline comment, CHAR added multiline comment, CHAR Brad's version 2 added support for LOCALS| added support for LOCALS| added support for LOCALS| Dirk's version 1 bug fixes, relative URL for ANS docs bug fixes, relative URL for ANS docs bug fixes, relative URL for ANS docs bug fixes, relative URL for ANS docs bug fixes, relative URL for ANS docs bug fixes, relative URL for ANS docs Ed's version 1 made XHTML compliant, added some defs made XHTML compliant, added some defs made XHTML compliant, added some defs Brad's version 3 incorporated some of Ed's changes incorporated some of Ed's changes incorporated some of Ed's changes Dirk's version 4b added copyright added copyright added copyright Ed's version 3 modified misctext modified misctext modified misctext Dirk's version 2 more bug fixes, features more bug fixes, features more bug fixes, features added some of Brad's changes added some of Brad's changes added some of Brad's changes Ed's version 2 included Ed's changes included Ed's changes included Ed's changes Dirk's version 4c incorporated Ed's changes incorporated Ed's changes incorporated Ed's changes file checks before nesting, better HTML, error checking file checks before nesting, better HTML, error checking file checks before nesting, better HTML, error checking included Dirk's changes included Dirk's changes included Dirk's changes modified misctext modified misctext modified misctext Dirk's version 4d cleanup of 4c changes cleanup of 4c changes cleanup of 4c changes Ed's version 4 fixed case on some words fixed case on some words fixed case on some words Brad's version 8 changes changes changes Brad's version 10 added indexing, bug fixes added indexing, bug fixes added indexing, bug fixes Ed's version 5 creates XML instead of HTML creates XML instead of HTML creates XML instead of HTML


Ed Beroset
Last modified: Sat Jul 3 11:04:51 EDT 2004
Level Double-A conformance icon, 
          W3C-WAI Web Content Accessibility Guidelines 1.0 Valid CSS! Valid XHTML 1.0!