[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]Call for volunteers: HTML pretty printer
From: |
j_post |
Subject: |
Re: [DotGNU]Call for volunteers: HTML pretty printer |
Date: |
Tue, 27 May 2003 23:03:12 -0700 |
On Tuesday 27 May 2003 08:20 pm, Gopal wrote:
> I gotta really ask you this ... why did you write your own scanner for
> C# ?.. I think you could have gotten away with a simple flex scanner
> and saved a lot of work and code as well.
>
Because it was fun, and because I don't speak flex.
> You could have gotten away with just
> #define CLOSE_AND_OPEN(stream,type,color) \
> if(previous!=TOK_##type)\
> { \
> CSSrcGenClosingTag(previous);\
> CSSrcGenOpeningTag(TOK_##type);\
> previous = TOK_#type;\
> }\
How is that functionally different from my code? Different tactic, same
strategy.
>
> You have spent such a lot of work on the scanner , that HTML gen has
> suffered
How so?
> I can only say that I don't like the HTML it generates ..
It's standard HTML, no frills--should be viewable on any browser (which seems
to me to be an important goal).
>Your code seems to have gone too deep into <font> hell :-)
Example please? Can't change color without a <font color=...>. Where is an
unnecessary <font...> generated?
>
> Convert all \n into <br/> and all tabs into
> etc...
Not compatible with <pre>. Try it. May work on some browsers, but not on all.
Konqueror, for example, will display " " instead of a space (when within
a <pre> block). '\n' is not at all the same thing as <br> whether or not
<pre> is used.
>
> You might even define the formatting as classes and use a .css file to
> set the colors & highlights instead of hard-coding them in HTML ..
>
Yeah, that could be done. But it's a really simple program, and anyone can
modify the colors and recompile. Seems to me that having a few colors and one
highlight specified in a separate file would not be a simplification, but a
complification. Matter of opinion, I suppose.
>
> Gopal
Feel free to write your own version of cssrc2html. I'm just trying to help.
If you can do a better job, and no doubt you can, then do so.
Jeff
- [DotGNU]Call for volunteers: HTML pretty printer, Rhys Weatherley, 2003/05/24
- Re: [DotGNU]Call for volunteers: HTML pretty printer, Gopal V, 2003/05/27
- Re: [DotGNU]Call for volunteers: HTML pretty printer,
j_post <=
- Re: [DotGNU]Call for volunteers: HTML pretty printer, Rhys Weatherley, 2003/05/28
- Re: [DotGNU]Call for volunteers: HTML pretty printer, j_post, 2003/05/28
- [DotGNU]Problem under cygwin, Ian Game, 2003/05/28
- Re: [DotGNU]Problem under cygwin, Gopal V, 2003/05/28
- Re: [DotGNU]Problem under cygwin, Ian Game, 2003/05/29
- Re: [DotGNU]Call for volunteers: HTML pretty printer, Gopal V, 2003/05/28
- Re: [DotGNU]Call for volunteers: HTML pretty printer, Chris Smith, 2003/05/28
Re: [DotGNU]Call for volunteers: HTML pretty printer, j_post, 2003/05/28
Re: [DotGNU]Call for volunteers: HTML pretty printer, Chris Smith, 2003/05/28