! Syntax highlighting patterns for Ch ! ! Ch is a C/C++ interpreter for scripting, shell programming, numerical ! computing, plotting and embedded scripting. The syntax below is a ! combination of C, C++ and C shell. ! ! INSTALLATION ! ! Load this pattern by starting nedit with: ! ! nedit -import ! ! Then, check that the patterns were loaded correctly, and choose Save Defaults ! from the Preferences menu. The new patterns will now be incorporated into ! your own .nedit file, so the next time you start NEdit, you will no longer ! need to use -import. ! ! These comments will not appear in your ~/.nedit nedit.highlightPatterns: Ch:1:0{\n\ comment:"/\\*":"\\*/"::Comment::\n\ cplus comment:"//":"$"::Comment::\n\ string:"L?""":"""":"\\n":String::\n\ preprocessor line:"^[ \\t]*#":"$"::Preprocessor::\n\ braces and parens:"[(){}[\\]]":::Keyword::D\n\ string escape chars:"\\\\(.|\\n)":::String1:string:\n\ preprocessor esc chars:"\\\\(.|\\n)":::Preprocessor1:preprocessor line:\n\ preprocessor comment:"/\\*":"\\*/"::Comment:preprocessor line:\n\ preproc cplus comment:"//":"$"::Comment:preprocessor line:\n\ character constant:"L?'":"'":"[^\\\\][^']":Character Const::\n\ numeric constant:"<((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?>":::Numeric Const::D\n\ keyword - control flow:"<(?:catch|do|else|for|if|return|switch|while)>":::Keyword::\n\ function call:"<[\\l_]\\w*>\\s*\\n?\\s*(?=\\()":::Subroutine::\n\ storage keyword:"<(class|public|private|inline|bool|wchar_t|string_t|array|export|const|extern|auto|register|static|unsigned|signed|volatile|char|double|float|int|long|short|void|typedef|struct|union|enum)>":::Storage Type::D\n\ variable:"<[\\l_]\\w*>":::Identifier1::D\n\ keyword:"<(new|delete|this|namespace|using|foreach|true|false|complexInf|ComplexNaN|Inf|NaN|return|goto|if|else|case|default|switch|break|continue|while|do|for|sizeof)>":::Keyword::D\n\ braces:"[{}]":::Keyword::D\n\ case:"":":"::Label::\n\ case single quoted:"'\\\\?[^']'":::Character Const:case:\n\ case numeric const:"<(?i0[X][\\dA-F]+|\\d+(:?\\.\\d*)?(?:E[+-]?[\\d]+)?F?|\\.\\d+(?:E[+-]?[\\d]+)?F?|[\\d]+L)>":::Numeric Const:case:\n\ case cast:"\\(\\s*([\\l_][\\w.]*)\\s*\\)":::Keyword:case:\n\ case cast type:"\\1":::Storage Type:case cast:C\n\ case variable:"[\\l_][\\w.]*":::Identifier1:case:\n\ case signs:"[-+*/<>^&|%()]":::Keyword:case:\n\ case error:".":::Flag:case:\n\ label:"([;{}])":"[\\l_]\\w*\\s*:":"[^\\s\\n]":Label::\n\ label qualifier:"\\1":::Keyword:label:C\n\ labelref:"<(?:break|continue)>\\s*\\n?\\s*([\\l_]\\w*)?(?=\\s*\\n?\\s*;)":::Keyword::\n\ labelref name:"\\1":::Label:labelref:C\n\ signs:"[-+*/%=,.;:<>!|&^?]":::Keyword::D\n\ } nedit.languageModes: Ch:.ch .chs .chrc .chlogin .chlogout:"^[ \\t]*#[ \\t]*![ \\t]*/bin/ch":::::".,/\\`'!|@#%^&*()-=+{}[]"":;<>?~"