Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Wanted: module for syntax highlighting

by jplindstrom (Monsignor)
on Feb 25, 2003 at 01:26 UTC ( #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

Comment on Wanted: module for syntax highlighting
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
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? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2014-07-24 00:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (155 votes), past polls