help-source-highlight
[Top][All Lists]
Advanced

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

[Help-source-highlight] postscript style for source-hightlight


From: jeffz
Subject: [Help-source-highlight] postscript style for source-hightlight
Date: Sat, 24 Mar 2007 21:13:17 +1100
User-agent: Mutt/1.5.13 (2006-08-11)

Hi                                                                              
                                                            
                                                                                
                                                            
I recently discovered source-highlight, it appears to be a very useful
program.                                                                        
                                                            
                                                                                
                                                            
However, when using the postscript.lang as a source language, it doesn't
handle % within strings (%) correctly.

eg, the following is treated as a comment and print is highlighted as
such, where instead because % is inside ( ) it should be treated as part
of a string. (%) print 

I first tried adding "string = '\(.*\)'" to postscript.lang, this
suceeded in highlighting strings correctly, but % inside ( ) was still
making the rest of the line a comment.

I tried changing comment start "%" to comment start "(\(.*\))*(?=)%" but
this appears to be wrong, as source-highlight prints the following:

source-highlight: /usr/include/boost/shared_ptr.hpp:253: T*
boost::shared_ptr<T>::operator->() const [with T = RegExpFormatter]:
Assertion `px != 0' failed.
Aborted

Are there any gurus able to assist?

Original message:

Lorenzo Bettini wrote:
                                                                                
                                                      
Dirk Jagdmann wrote:
Hello highlighters,

I have hacked together a style file for postscript files. It is attached
to this email. Use it along with the following lines in lang.map:
ps = postscript.lang
eps = postscript.lang

                                                                                
                                             
Thanks a lot
Dirk! :-)                                                                       
                                               
                                                                                
                                                            
I'll add this file to the source-highlight distribution!

cheers                                                                          
                                                            

Lorenzo                                                                         
                                                    
                                                                                
                                                            
--









reply via email to

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