Hi All, I try to develop a syntax highlighter for the input files of cp2k (a science sw).
I did few steps into that direction and solved some issues with the help of people in #vim http://gitorious.org/cp2k-vim/ In short I try to highlight 3 main categories Sections, Keywords and Constants Sections come precedeed by & (open) or &end (close) keywords can appear only as the first word on a line constants can appear after both sections (open) and keywords as second or more word. There is no restrictions on the names of sections/constants/keywords so that ammounts to the case that an identifier eg Charge can be all of them depending where on the line is. Now I have the following case that fails to be correctly highlighted (charge is wrongly highlighted as a keyword when it should be a constant). Any ideas welcomed. a...@felix:~/playground/cp2k-vim> cat example/fail.inp !!cp2k!! &charge charge charge charge &end charge !!!! when charge has & or &end should be a section !!!! when charge is the first word on a line should be a keyword !!!! when charge second or more should be a constant -- Without Questions there are no Answers! _____________________________________________________________________ Alin Marin ELENA http://alin.elenaworld.net http://www.google.com/profiles/alinm.elena [email protected] ______________________________________________________________________
signature.asc
Description: This is a digitally signed message part.
