[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-java2html] single line comments and newlines
From: |
Lorenzo Bettini |
Subject: |
Re: [Help-java2html] single line comments and newlines |
Date: |
Tue, 03 Apr 2001 18:13:34 +0200 |
Robert Wetzel wrote:
>
> Hi again,
>
> > Did this problem take place only for single line comments?
>
> Long answer:
>
> scanner.ll defines different 'states' for single line and
> multi line comments. Currently the following are defined:
>
> <multi-line-comment> ::= "/*" { ... } "*/"
>
> <single-line-comment> ::= "//" { ... } "\n"
>
> This follows the definitions of the Java Language Specification,
> section 3.7 (Comments).
>
> Unfortunately, java2html handles these comments as a whole,
> adding the 'decorators' only before and after the comments.
> As the multi line comments do not end with a newline, they
> will be displayed (and rendered) correctly. Single line
> comments end with a newline, which is treated as a part of
> the comment. That's why the </span> was placed _after_ the
> newline. The patch exchanges the order of the end decoration
> and the newline for single line comments.
OK, now I see the problem, and actually another solution could be to
"put the \n back" (lex can do it); however first I'll try your patch :-)
thanks again
cheers
Lorenzo
--
+-----------------------------------------------------+
| Lorenzo Bettini ICQ# lbetto, 16080134 |
| PhD student in Computer Science |
| Florence - Italy (Linux User # 158233) |
| Home Page : http://w3.newnet.it/bettini |
| http://infostud.dsi.unifi.it/~bettini |
| Mail : address@hidden |
| http://www.mokabyte.it Java on line journal |
| http://music.dsi.unifi.it XKlaim language |
| http://w3.newnet.it/bettini/purple Cover Band |
| http://www.gnu.org/software/java2html & cpp2html |
+-----------------------------------------------------+