help-java2html
[Top][All Lists]
Advanced

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

[Help-java2html] single line comments and newlines


From: Robert Wetzel
Subject: [Help-java2html] single line comments and newlines
Date: Mon, 2 Apr 2001 19:46:26 +0200 (MET DST)

Hi,

after consulting the flex man page I experimented
with scanner.ll to fix the problem with these
'misaligned' span-tags after single line comments.

Attached is a patch for scanner.ll (it's quick & dirty,
*sigh*). I hope this file is correct (did a 'diff -u'),
because I never used diff/patch before.


Explanation of the patch:

I changed the <SINGLELINE_COMMENT>\n entry from

  endComment( yytext ) ;

to

  endComment( NULL ) ;
  generate( yytext ) ;

yytext contains the newline, which is inserted into
the output _before_ the decorators are called (that
is in this case the SpanDecorator). So I tried it the
way which is shown above: let endComment() write
nothing (except the text from the decorator[s]) and
 output the newline _after_ the comment...

Maybe it's a wrong way, but it produces the wanted
HTML-output...

Cheers,
  Robert.

Attachment: scanner.patch
Description: scanner.ll.patch


reply via email to

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