Thread overview
missing d2html.kwd
Mar 30, 2003
Helmut Leitner
Mar 30, 2003
J C Calvarese
Re: missing d2html.kwd / readLine fault
Mar 30, 2003
Helmut Leitner
Mar 30, 2003
J C Calvarese
March 30, 2003
Is there a place to download the
   d2html.kwd
file that is missing for the example program
  /dmd/samples/d/d2html.d
?

--
Helmut Leitner    leitner@hls.via.at Graz, Austria   www.hls-software.com
March 30, 2003
Helmut Leitner wrote:
> Is there a place to download the
>    d2html.kwd
> file that is missing for the example program
>   /dmd/samples/d/d2html.d
> ?
> 
> --
> Helmut Leitner    leitner@hls.via.at Graz, Austria   www.hls-software.com

I looked around for that file and couldn't find it anywhere.  So I made my own from the keyword list in the documentation ("Lexical" page). Apparently, Pavel (d2html author) driften away from D-Land months ago, and no one has updated this code.  The d2html.d program didn't seem to work correctly at first so I tinkered a bit with it.  I think the attached version works now.  I think the problem was that the syntax for dynamic strings has changed since it was written.

One thing small I noticed is that d2html doesn't like the backspace character (\) when it's not in quotes.  It complains about stuff like 'print("This is the string" ~ str ~ \t \n);'

Justin


March 30, 2003

J C Calvarese wrote:
> I looked around for that file and couldn't find it anywhere.  So I made my own from the keyword list in the documentation ("Lexical" page). Apparently, Pavel (d2html author) driften away from D-Land months ago, and no one has updated this code.  The d2html.d program didn't seem to work correctly at first so I tinkered a bit with it.  I think the attached version works now.  I think the problem was that the syntax for dynamic strings has changed since it was written.
> 
> One thing small I noticed is that d2html doesn't like the backspace
> character (\) when it's not in quotes.  It complains about stuff like
> 'print("This is the string" ~ str ~ \t \n);'
> 
> Justin
> 
>   ----------------------------------------------------------------------------------------------------
>                  Name: d2html.zip
>    d2html.zip    Type: Zip Compressed Data (application/x-zip-compressed)
>              Encoding: base64

Justin, thank you for the file. I hope that Walter will include it within dmd.zip in the next release.

I notized a problem in the streams module, readLine method, which is used this way:

	File kwd = new File("d2html.kwd");
	while (!kwd.eof())
		keywords ~= kwd.readLine();
	kwd.close();

to read the keywords each on its own line. When the last line doesn't end with an EOL, the programm faults.

--
Helmut Leitner    leitner@hls.via.at Graz, Austria   www.hls-software.com
March 30, 2003
Comments embeded...

Helmut Leitner wrote:
> 
> Justin, thank you for the file. I hope that Walter will include
> it within dmd.zip in the next release.
> 

You're quite welcome.  I hope Walter does include it.

> I notized a problem in the streams module, readLine method, which
> is used this way:
> 
> 	File kwd = new File("d2html.kwd");
> 	while (!kwd.eof())
> 		keywords ~= kwd.readLine();
> 	kwd.close();
> 
> to read the keywords each on its own line. When the last line
> doesn't end with an EOL, the programm faults. 
> 

Also, it gets stuck when it's run on the chello.d example.  I sure don't know why.

> --
> Helmut Leitner    leitner@hls.via.at   Graz, Austria   www.hls-software.com