Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Wanted: module for syntax highlighting

by jplindstrom (Monsignor)
on Feb 25, 2003 at 01:26 UTC ( [id://238313]=perlquestion: print w/replies, xml ) Need Help??

jplindstrom has asked for the wisdom of the Perl Monks concerning the following question:

I can't find a module for syntax highlighting.

I'm gonna pretty print SQL code on web pages.

Any modules like that? Any favourites?


/J

Replies are listed 'Best First'.
Re: Wanted: module for syntax highlighting
by tachyon (Chancellor) on Feb 25, 2003 at 01:59 UTC

    perltidy will do HTML syntax highlighting for Perl. For SQL you could just use SQL::Parser or maybe SQL::Statement to do the parsing and add color as you see fit. Personally I think:

    SELECT id FROM address_book WHERE username = ? OR private_address IS NULL

    is pretty enough already.

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Re: Wanted: module for syntax highlighting
by zengargoyle (Deacon) on Feb 25, 2003 at 02:34 UTC

    if by 'pretty print' you mean 'colorize', while not Perl Vim does good by me for the coloring part. i even think i remember seeing a macro or example in the distribution for colorizing from the shell.

    but if you want to start writing a module here's what Vim uses as it's guideline, it shouldn't be to hard to check for the special words and wrap them with some color.

Re: Wanted: module for syntax highlighting
by zentara (Archbishop) on Feb 25, 2003 at 14:26 UTC
      What operating system did you want a program for? For windows there is a program in VB which keeps track off all the variables and highlights them along with loop and if statements. To find it just type perl in search in the Visual basic part at http://www.planet-source-code.com

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://238313]
Approved by FoxtrotUniform
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-19 17:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found