S
Svenn Are Bjerkem
Guest
Hi,
I downloaded the skill highlight pats from www.nedit.org. This file has a
major flaw, it doesn't add syntax highlight because of one missing command
line that tells nedit about the highlight.
Here is a working version. You may need to fix some newlines because the
original is not limited to 75 characters per line.
! Syntax Highlighting Patterns for SKILL-Code (script-language of the
Cadence
! Design System).
!
! These are written for the "c" type syntax vs the lisp syntax. In these
! patterns a procedure call, "function(" will be highlighted differently
from
! a variable + paren, "function (" so you can tell if you have a white
space
! error.
!
! Contributed by Andrew Stanaski
!
! In NEdit Version 5.0.1 and beyond, load this pattern by starting nedit
with:
!
! nedit -import <name of this file>
!
! 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.
!
! In version 5.0, without -import, you must edit your .nedit file by hand
and
! add the contents of each resource below to the corresponding list in your
! .nedit file. Be sure to separate new entries with \n, and continue
resource
! strings by escaping all newlines within a resource value with \
(backslash),
! leaving only the last line of the resource value not ending in \.
!
nedit.highlightPatterns:\
Skill:1:0{\n\
comment:"/\\*":"\\*/"::Comment::\n\
skill comment:";":"$"::Comment::\n\
string:"""":"""":"\\n":String::\n\
string escape chars:"\\\\(.|\\n)":::String:string:\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)?>"::
reprocessor:
\n\
procedure calls:"<(procedure|return)\\("::
lain:
\n\
procedure color:"\\1":""::Storage Type
rocedure calls
C\n\
control calls:"<(if|when|unless|cond|case|caseq|while|for
foreach)\\("::
lain:
\n\
control color:"\\1":""::Subroutine:control calls
C\n\
control then else:"<(then|else)>":::Subroutine:
\n\
function calls:"<([a-zA-Z][a-zA-Z0-9_?]*)\\("::
lain:
\n\
function color:"\\1":""::Identifier1:function calls
C\n\
braces:"[{}]":::Comment:
\n\
}
nedit.languageModes: Skill:.il .tf::::::\n\
I downloaded the skill highlight pats from www.nedit.org. This file has a
major flaw, it doesn't add syntax highlight because of one missing command
line that tells nedit about the highlight.
Here is a working version. You may need to fix some newlines because the
original is not limited to 75 characters per line.
! Syntax Highlighting Patterns for SKILL-Code (script-language of the
Cadence
! Design System).
!
! These are written for the "c" type syntax vs the lisp syntax. In these
! patterns a procedure call, "function(" will be highlighted differently
from
! a variable + paren, "function (" so you can tell if you have a white
space
! error.
!
! Contributed by Andrew Stanaski
!
! In NEdit Version 5.0.1 and beyond, load this pattern by starting nedit
with:
!
! nedit -import <name of this file>
!
! 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.
!
! In version 5.0, without -import, you must edit your .nedit file by hand
and
! add the contents of each resource below to the corresponding list in your
! .nedit file. Be sure to separate new entries with \n, and continue
resource
! strings by escaping all newlines within a resource value with \
(backslash),
! leaving only the last line of the resource value not ending in \.
!
nedit.highlightPatterns:\
Skill:1:0{\n\
comment:"/\\*":"\\*/"::Comment::\n\
skill comment:";":"$"::Comment::\n\
string:"""":"""":"\\n":String::\n\
string escape chars:"\\\\(.|\\n)":::String:string:\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)?>"::
procedure calls:"<(procedure|return)\\("::
procedure color:"\\1":""::Storage Type
control calls:"<(if|when|unless|cond|case|caseq|while|for
foreach)\\("::
control color:"\\1":""::Subroutine:control calls
control then else:"<(then|else)>":::Subroutine:
function calls:"<([a-zA-Z][a-zA-Z0-9_?]*)\\("::
function color:"\\1":""::Identifier1:function calls
braces:"[{}]":::Comment:
}
nedit.languageModes: Skill:.il .tf::::::\n\