You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by Massimo Manghi <mx...@apache.org> on 2017/07/08 11:02:20 UTC

Tcl syntax analyzer

Does anyone of you have some sort of Tcl code parser/analyzer that could 
be helpful in building an HTML view of Tcl with syntax highlighting?

  -- Massimo


---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: Tcl syntax analyzer

Posted by Massimo Manghi <ma...@biol.unipr.it>.
Thank you Rob and Ronnie, cool stuff. Good old enscript, it takes me 
back at least 20 years.... :-(

  -- Massimo

On 07/09/2017 09:59 PM, Ronnie Brunner wrote:
> Hi Massimo
> 
> At the time I used enscript to generate colored html from Tcl  as you can see in site/websh/examples/Makefile. Enscript seems to be around still: https://www.gnu.org/software/enscript/
> 
> Hth
> Ronnie
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


RE: Tcl syntax analyzer

Posted by Ronnie Brunner <Ro...@netcetera.com>.
Hi Massimo

At the time I used enscript to generate colored html from Tcl  as you can see in site/websh/examples/Makefile. Enscript seems to be around still: https://www.gnu.org/software/enscript/

Hth
Ronnie
-- 
We innovate. You win. http://netcetera.com

Ronnie Brunner | ronnie.brunner@netcetera.com | T +41 44 297 59 79 |
Netcetera AG | 8040 Zürich | Switzerland | http://netcetera.com | 

-----Original Message-----
From: Massimo Manghi [mailto:mxmanghi@apache.org] 
Sent: Samstag, 8. Juli 2017 13:02
To: Rivet_dev <ri...@tcl.apache.org>
Subject: Tcl syntax analyzer

Does anyone of you have some sort of Tcl code parser/analyzer that could 
be helpful in building an HTML view of Tcl with syntax highlighting?

  -- Massimo


---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: Tcl syntax analyzer

Posted by Rob Maris <ro...@maris-ee.eu>.
Hm, interesting question to try it out.

A neat description of several server-side and client-side methods can be found here:
https://gohugo.io/extras/highlighting
(I'm using that static site builder)

Server side requires python. Moreover, the result is quite incomplete (puts for example is not recognized, but set).
Client side I tried highlight.js and prism (see link above).

Prism delivers the best result with Tcl, see also screenshot.
Moreover, all of it is in one single .css (and a quite compact .js)

Rob


Am 08.07.2017, 13:02 Uhr, schrieb Massimo Manghi <mx...@apache.org>:

> Does anyone of you have some sort of Tcl code parser/analyzer that could
> be helpful in building an HTML view of Tcl with syntax highlighting?
>
>   -- Massimo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>
>


-- 
Dem Ingeniör ist nichts zu schwör (außer bei Force Majör)

Re: Tcl syntax analyzer

Posted by Massimo Manghi <ma...@unipr.it>.
Interesting, I didn't know emacs had reusable components. I haven't been 
using emacs for long time now, do you have a reference to a manual page 
for this type of stuff? I have to check them out and understand. The 
problem with many of these tools is that they output full fledged HTML, 
with the <html>....<head>... and the likes. My need is for something 
able to produce some form of HTML fragments to be placed within 
templates without resorting to <iframe> or other ways to embed HTML. The 
tool Ronnie suggested seems to be the closest to that. Hugo is a very 
sophisticated tool for doing what my personal website generator was 
originally designed for: static website generation. There is hope they 
can mix well together, even though I need to 'exec' a python script from 
Tcl :-(

   -- Massimo

On 07/10/2017 06:18 PM, David Welton wrote:
> Emacs has Tcl syntax highlighting, and a package to print buffers out
> as HTML, so that's one route, although I'd use it more for one-off
> kinds of things than as part of, say, automated documentation or
> website creation.
> 
> On Sat, Jul 8, 2017 at 4:02 AM, Massimo Manghi <mx...@apache.org> wrote:
>> Does anyone of you have some sort of Tcl code parser/analyzer that could be
>> helpful in building an HTML view of Tcl with syntax highlighting?
>>
>>   -- Massimo
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
>> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>>
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: Tcl syntax analyzer

Posted by Massimo Manghi <ma...@unipr.it>.
Sorry Rob suggested Hugo, not Ronnie. My usual clumsiness. I apologize 
with both of you. I'm doing this sort of blunders all the time lately: I 
need some vacation

  -- Massimo

On 07/11/2017 10:54 AM, Massimo Manghi wrote:
> Interesting, I didn't know emacs had reusable components. I haven't been 
> using emacs for long time now, do you have a reference to a manual page 
> for this type of stuff? I have to check them out and understand. The 
> problem with many of these tools is that they output full fledged HTML, 
> with the <html>....<head>... and the likes. My need is for something 
> able to produce some form of HTML fragments to be placed within 
> templates without resorting to <iframe> or other ways to embed HTML. The 
> tool Ronnie suggested seems to be the closest to that. Hugo is a very 
> sophisticated tool for doing what my personal website generator was 
> originally designed for: static website generation. There is hope they 
> can mix well together, even though I need to 'exec' a python script from 
> Tcl :-(

-- 
Università di Parma
Dipartimento di Medicina e Chirurgia
Unità di Neuroscienze
via Volturno 39
43125 Parma

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: Tcl syntax analyzer

Posted by David Welton <da...@dedasys.com>.
Emacs has Tcl syntax highlighting, and a package to print buffers out
as HTML, so that's one route, although I'd use it more for one-off
kinds of things than as part of, say, automated documentation or
website creation.

On Sat, Jul 8, 2017 at 4:02 AM, Massimo Manghi <mx...@apache.org> wrote:
> Does anyone of you have some sort of Tcl code parser/analyzer that could be
> helpful in building an HTML view of Tcl with syntax highlighting?
>
>  -- Massimo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>



-- 
David N. Welton

http://www.dedasys.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org