Discussion:
nedit & Fortran 90
Eric Germaneau
2008-09-29 20:31:07 UTC
Permalink
Dear nedit users,
I'm new in Fortran 90 and I'm looking for a nice syntax highlighting.
What do you use?
Actually, I have one which doesn't make me satisfied:
nedit.highlightPatterns: \
Fortran90:1:30{\n\
Comment:"!":"$"::Comment::\n\
Continuation:"&":::Flag::\n\
String:"'":"'":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^ \\t]|
[^ \\t]| [ \\t0]| *\\t[^1-9])":String::\n\

Keywords:"<(ACCEPT|[Aa]ccept|ASSIGN|[Aa]ssign|AUTOMATIC|[Aa]utomatic|B
ACKSPACE|[Bb]ackspace|BLOCK|[Bb]lock|CALL|[Cc]all|CLOSE|[Cc]lose|COMMO
N|[Cc]ommon|CONTINUE|[Cc]ontinue|DATA|[Dd]ata|DECODE|[Dd]ecode|DELETE|
[Dd]elete|DIMENSION|[Dd]imension|DO|[Dd]o|ELSE|[Ee]lse|ELSEIF|[Ee]lsei
f|ENCODE|[Ee]ncode|END *FILE|[Ee]nd
*[Ff]ile|ENDFILE|[Ee]ndfile|END|[Ee]nd|ENDDO|[Ee]nddo|ENDIF|[Ee]ndif|E
NTRY|[Ee]ntry|EQUIVALENCE|[Ee]quivalence|EXIT|[Ee]xit|EXTERNAL|[Ee]xte
rnal|FORMAT|[Ff]ormat|FUNCTION|[Ff]unction|GOTO|[Gg]oto|IF|[Ii]f|IMPLI
CIT|[Ii]mplicit|INCLUDE|[Ii]nclude|INQUIRE|[Ii]nquire|INTRINSIC|[Ii]nt
rinsic|LOGICAL|[Ll]ogical|MAP|[Mm]ap|NONE|[Nn]one|ON|[Oo]n|OPEN|[Oo]pe
n|PARAMETER|[Pp]arameter|PAUSE|[Pp]ause|POINTER|[Pp]ointer|PRINT|[Pp]r
int|PROGRAM|[Pp]rogram|READ|[Rr]ead|RECORD|[Rr]ecord|RETURN|[Rr]eturn|
REWIND|[Rr]ewind|SAVE|[Ss]ave|STATIC|[Ss]tatic|STOP|[Ss]top|STRUCTURE|
[Ss]tructure|SUBROUTINE|[Ss]ubroutine|SYSTEM|[Ss]ystem|THEN|[Tt]hen|TO
|[Tt]o|TYPE|[Tt]ype|UNION|[Uu]nion|UNLOCK|[Uu]nlock|VIRTUAL|[Vv]irtual
|VOLATILE|[Vv]olatile|WHILE|[Ww]hile|WRITE|[Ww]rite)>":::Keyword::D\n\
Data
Types:"<(BYTE|[Bb]yte|CHARACTER|[Cc]haracter|COMPLEX|[Cc]omplex|DOUBLE
*COMPLEX|[Dd]ouble *[Cc]omplex|DOUBLE *PRECISION|[Dd]ouble
*[Pp]recision|DOUBLE|[Dd]ouble|INTEGER|[Ii]nteger|REAL|[Rr]eal)(\\*[0-
9]+)?>":::Keyword::D\n\
F90
Keywords:"<(ALLOCATABLE|[Aa]llocatable|ALLOCATE|[Aa]llocate|CASE|[Cc]a
se|CASE|[Cc]ase|CONTAINS|[Cc]ontains|CYCLE|[Cc]ycle|DEALLOCATE|[Dd]eal
locate|ELSEWHERE|[Ee]lsewhere|ENDWHERE|[Ee]ndwhere|INTENT|[Ii]ntent|IN
TERFACE|[Ii]nterface|MODULE|[Mm]odule|NAMELIST|[Nn]amelist|OPTIONAL|[O
o]ptional|PRIVATE|[Pp]rivate|PROCEDURE|[Pp]rocedure|PUBLIC|[Pp]ublic|R
EWRITE|[Rr]ewrite|SELECT|[Ss]elect|USE|[Uu]se|WHERE|[Ww]here)>":::Keyw
ord::D\n\
Numeric
const:"<[0-9]+(\\.[0-9]*)?([DEde][-+]?[0-9]*)?|\\.[0-9]+([DEde][-+]?[0
-9]*)?>":::Numeric Const::D\n\
}
nedit.languageModes: Fortran90:.f90::::::

--

Be the change you wish to see in the world
-- GHANDI --
[1]Dr. Éric Germaneau
Chemical Engineering Department
University of Massachusetts Amherst
159 Goessmann Laboratory
686 North Pleasant Street
Amherst, MA 01003-9303
USA
Tel: 413-545-6209 (Office)
msn: [2]aihaike-***@public.gmane.org
skype: aihaike
Please consider the environment before printing this email.
Considérez svp l'environnement avant d'imprimer cet email.

References

1. mailto:egermane-***@public.gmane.org
2. mailto:aihaike-***@public.gmane.org
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Arjan van Dijk
2008-09-30 07:09:55 UTC
Permalink
Post by Eric Germaneau
Dear nedit users,
I'm new in Fortran 90 and I'm looking for a nice syntax highlighting.
What do you use?
I use:

Fortran90:1:30{\n\
Comment:"!":"$"::Comment::\n\
Continuation:"&":::Flag::\n\
String:"'":"'":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^ \\t]|
[^ \\t]| [ \\t0]| *\\t[^1-9])":String::\n\

Keywords:"<(ACCEPT|[Aa]ccept|ASSIGN|[Aa]ssign|AUTOMATIC|[Aa]utomatic|BACKSPACE|[Bb]ackspace|BLOCK|[Bb]lock|CALL|[Cc]all|CLOSE|[Cc]lose|COMMON|[Cc]ommon|CONTINUE|[Cc]ontinue|DATA|[Dd]ata|DECODE|[Dd]ecode|DELETE|[Dd]elete|DIMENSION|[Dd]imension|[Ee][Nn][Dd][Dd][Oo]|DO|[Dd]o|ELSE|[Ee]lse|ELSEIF|[Ee]lseif|ENCODE|[Ee]ncode|END
*FILE|[Ee]nd
*[Ff]ile|ENDFILE|[Ee]ndfile|END|[Ee]nd|ENDIF|[Ee]ndif|ENTRY|[Ee]ntry|EQUIVALENCE|[Ee]quivalence|EXIT|[Ee]xit|EXTERNAL|[Ee]xternal|FORMAT|[Ff]ormat|FUNCTION|[Ff]unction|GOTO|[Gg]oto|IF|[Ii]f|IMPLICIT|[Ii]mplicit|INCLUDE|[Ii]nclude|INQUIRE|[Ii]nquire|INTRINSIC|[Ii]ntrinsic|LOGICAL|[Ll]ogical|MAP|[Mm]ap|NONE|[Nn]one|ON|[Oo]n|OPEN|[Oo]pen|PARAMETER|[Pp]arameter|PAUSE|[Pp]ause|POINTER|[Pp]ointer|PRINT|[Pp]rint|PROGRAM|[Pp]rogram|READ|[Rr]ead|RECORD|[Rr]ecord|RETURN|[Rr]eturn|REWIND|[Rr]ewind|SAVE|[Ss]ave|STATIC|[Ss]tatic|STOP|[Ss]top|STRUCTURE|[Ss]tructure|SUBROUTINE|[Ss]ubroutine|SYSTEM|[Ss]ystem|THEN|[Tt]hen|TO|[Tt]o|TYPE|[Tt]ype|UNION|[Uu]nion|UNLOCK|[Uu]nlock|VIRTUAL|[Vv]irtual|VOLATILE|[Vv]olatile|WHILE|[Ww]hile|WRITE|[Ww]rite)>":::Keyword::D\n\
Data
Types:"<(BYTE|[Bb]yte|CHARACTER|[Cc]haracter|COMPLEX|[Cc]omplex|DOUBLE
*COMPLEX|[Dd]ouble *[Cc]omplex|DOUBLE *PRECISION|[Dd]ouble
*[Pp]recision|DOUBLE|[Dd]ouble|INTEGER|[Ii]nteger|REAL|[Rr]eal)(\\*[0-9]+)?>":::Keyword::D\n\
F90
Keywords:"<(ALLOCATABLE|[Aa]llocatable|ALLOCATE|[Aa]llocate|CASE|[Cc]ase|CASE|[Cc]ase|CONTAINS|[Cc]ontains|CYCLE|[Cc]ycle|DEALLOCATE|[Dd]eallocate|ELSEWHERE|[Ee]lsewhere|ENDWHERE|[Ee]ndwhere|INTENT|[Ii]ntent|INTERFACE|[Ii]nterface|MODULE|[Mm]odule|NAMELIST|[Nn]amelist|OPTIONAL|[Oo]ptional|PRIVATE|[Pp]rivate|PROCEDURE|[Pp]rocedure|PUBLIC|[Pp]ublic|REWRITE|[Rr]ewrite|SELECT|[Ss]elect|USE|[Uu]se|WHERE|[Ww]here)>":::Keyword::D\n\
Numeric
const:"<[0-9]+(\\.[0-9]*)?([DEde][-+]?[0-9]*)?|\\.[0-9]+([DEde][-+]?[0-9]*)?>":::Numeric
Const::D\n\
}


I haven't checked yours, so maybe this is not any better.
Try and see!
Why did you choose for fortran-90?

Regards,


Arjan
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Eric Germaneau
2008-09-30 11:26:25 UTC
Permalink
Arjan van Dijk wrote:

Dear nedit users,
I'm new in Fortran 90 and I'm looking for a nice syntax highlighting.
What do you use?



I use:

Fortran90:1:30{\n\
Comment:"!":"$"::Comment::\n\
Continuation:"&":::Flag::\n\
String:"'":"'":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^ \\t]|
[^ \\t]| [ \\t0]| *\\t[^1-9])":String::\n\

Keywords:"<(ACCEPT|[Aa]ccept|ASSIGN|[Aa]ssign|AUTOMATIC|[Aa]utomatic|BACKSPACE|
[Bb]ackspace|BLOCK|[Bb]lock|CALL|[Cc]all|CLOSE|[Cc]lose|COMMON|[Cc]ommon|CONTIN
UE|[Cc]ontinue|DATA|[Dd]ata|DECODE|[Dd]ecode|DELETE|[Dd]elete|DIMENSION|[Dd]ime
nsion|[Ee][Nn][Dd][Dd][Oo]|DO|[Dd]o|ELSE|[Ee]lse|ELSEIF|[Ee]lseif|ENCODE|[Ee]nc
ode|END
*FILE|[Ee]nd
*[Ff]ile|ENDFILE|[Ee]ndfile|END|[Ee]nd|ENDIF|[Ee]ndif|ENTRY|[Ee]ntry|EQUIVALENC
E|[Ee]quivalence|EXIT|[Ee]xit|EXTERNAL|[Ee]xternal|FORMAT|[Ff]ormat|FUNCTION|[F
f]unction|GOTO|[Gg]oto|IF|[Ii]f|IMPLICIT|[Ii]mplicit|INCLUDE|[Ii]nclude|INQUIRE
|[Ii]nquire|INTRINSIC|[Ii]ntrinsic|LOGICAL|[Ll]ogical|MAP|[Mm]ap|NONE|[Nn]one|O
N|[Oo]n|OPEN|[Oo]pen|PARAMETER|[Pp]arameter|PAUSE|[Pp]ause|POINTER|[Pp]ointer|P
RINT|[Pp]rint|PROGRAM|[Pp]rogram|READ|[Rr]ead|RECORD|[Rr]ecord|RETURN|[Rr]eturn
|REWIND|[Rr]ewind|SAVE|[Ss]ave|STATIC|[Ss]tatic|STOP|[Ss]top|STRUCTURE|[Ss]truc
ture|SUBROUTINE|[Ss]ubroutine|SYSTEM|[Ss]ystem|THEN|[Tt]hen|TO|[Tt]o|TYPE|[Tt]y
pe|UNION|[Uu]nion|UNLOCK|[Uu]nlock|VIRTUAL|[Vv]irtual|VOLATILE|[Vv]olatile|WHIL
E|[Ww]hile|WRITE|[Ww]rite)>":::Keyword::D\n\
Data
Types:"<(BYTE|[Bb]yte|CHARACTER|[Cc]haracter|COMPLEX|[Cc]omplex|DOUBLE
*COMPLEX|[Dd]ouble *[Cc]omplex|DOUBLE *PRECISION|[Dd]ouble
*[Pp]recision|DOUBLE|[Dd]ouble|INTEGER|[Ii]nteger|REAL|[Rr]eal)(\\*[0-9]+)?>"::
:Keyword::D\n\
F90
Keywords:"<(ALLOCATABLE|[Aa]llocatable|ALLOCATE|[Aa]llocate|CASE|[Cc]ase|CASE|[
Cc]ase|CONTAINS|[Cc]ontains|CYCLE|[Cc]ycle|DEALLOCATE|[Dd]eallocate|ELSEWHERE|[
Ee]lsewhere|ENDWHERE|[Ee]ndwhere|INTENT|[Ii]ntent|INTERFACE|[Ii]nterface|MODULE
|[Mm]odule|NAMELIST|[Nn]amelist|OPTIONAL|[Oo]ptional|PRIVATE|[Pp]rivate|PROCEDU
RE|[Pp]rocedure|PUBLIC|[Pp]ublic|REWRITE|[Rr]ewrite|SELECT|[Ss]elect|USE|[Uu]se
|WHERE|[Ww]here)>":::Keyword::D\n\
Numeric
const:"<[0-9]+(\\.[0-9]*)?([DEde][-+]?[0-9]*)?|\\.[0-9]+([DEde][-+]?[0-9]*)?>":
::Numeric
Const::D\n\
}


I haven't checked yours, so maybe this is not any better.
Try and see!
Why did you choose for fortran-90?

Regards,


Arjan




Arjan,
It seems to be the same, I will live with this.
Thank you,
Eric.

--

Be the change you wish to see in the world
-- GHANDI --
[1]Dr. Éric Germaneau
Chemical Engineering Department
University of Massachusetts Amherst
159 Goessmann Laboratory
686 North Pleasant Street
Amherst, MA 01003-9303
USA
Tel: 413-545-6209 (Office)
msn: [2]aihaike-***@public.gmane.org
skype: aihaike
Please consider the environment before printing this email.
Considérez svp l'environnement avant d'imprimer cet email.

References

1. mailto:egermane-***@public.gmane.org
2. mailto:aihaike-***@public.gmane.org
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Lester M Petrie
2008-09-30 13:37:12 UTC
Permalink
Post by Eric Germaneau
Dear nedit users,
I'm new in Fortran 90 and I'm looking for a nice syntax highlighting.
What do you use?
...................................................................................
Post by Eric Germaneau
I haven't checked yours, so maybe this is not any better.
Try and see!
Why did you choose for fortran-90?
Regards,
Arjan
Arjan,
It seems to be the same, I will live with this.
Thank you,
Eric.
I took the existing Fortran and added some Fortran90 keywords. This gave me

Fortran90:2:0{\n\
Comment:"^[*!]":"$"::Comment::\n\
Bang Comment:"!":"$"::Comment::\n\
String:"'":"'":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^ \\t]| [^ \\t]| [
\\t0]| *\\t[^1-9])":String::\n\
QString:"""":"""":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^ \\t]| [^ \\t]|
[ \\t0]| *\\t[^1-9])":String1::\n\
SubAString:"'":"'":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^ \\t]| [^ \\t]|
[ \\t0]| *\\t[^1-9])":String:QString:\n\
String2:"""":"""":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^ \\t]| [^ \\t]|
[ \\t0]| *\\t[^1-9])":String2:String:\n\
Keywords:"<(?iaccept|automatic|backspace|block|call|close|common|contains|
continue|data|decode|delete|dimension|do|else|elseif|encode|enddo|end *file|
endif|end|entry|equivalence|exit|external|format|function|go *to|if|implicit|
include|inquire|intrinsic|map|none|on|open|parameter|pause|pointer|print|
program|read|record|return|rewind|save|static|stop|structure|subroutine|
system|then|type|union|unlock|virtual|volatile|while|write)>":::Keyword::D\n\
Data Types:"<(?ibyte|character|complex|double *complex|double *precision|
double|integer|logical|real)(\\*[0-9]+)?>":::Storage Type::D\n\
F90 Keywords:"<(?iallocatable|allocate|case|case|cycle|deallocate|elemental|
elsewhere|endwhere|forall|module|namelist|null|nullify|private|public|pure|
recursive|rewrite|select|target|where|intent|optional|
interface)>":::Keyword::D\n\
Continuation in string:"\\n( [^ \\t0]|( | | | )?
\\t[1-9])":::Flag:String:\n\
F90 Continuation:"(^ *&|&\\n)":::Flag::\n\
Numeric Const:"<(\\d+(\\.\\d*)?|\\d*\\.\\d+)([DEQdeq][-+]?\\d+)?
(_[\\d\\l]+)?>":::Numeric Const::D\n\
}

The virtue of this is that its case independent. The biggest complaint I have
with this is that continued strings aren't treated correctly, but that hasn't
been enough of a problem to try and figure out a fix. I believe I have
modified the Numeric Const also, but I don't remember quite what I did there.
Sorry about the wrapping, but I haven't found out how to get kmail to not do
that.
--
Lester M Petrie
Bldg 5700, MS 6170
Oak Ridge National Laboratory
Phone: (865) 574-5259
Email: petrielmjr-***@public.gmane.org
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Phillip R Smith
2008-09-30 16:58:28 UTC
Permalink
Sorry. I was asleep and then woke up realizing that I'd like to
update my FORTRAN editing customization.

But where do you put the descriptions you have noted here? I don't
see where the changes would be made....

-ross-
Post by Lester M Petrie
Post by Eric Germaneau
Dear nedit users,
I'm new in Fortran 90 and I'm looking for a nice syntax
highlighting.
What do you use?
...................................................................................
Post by Eric Germaneau
I haven't checked yours, so maybe this is not any better.
Try and see!
Why did you choose for fortran-90?
Regards,
Arjan
Arjan,
It seems to be the same, I will live with this.
Thank you,
Eric.
I took the existing Fortran and added some Fortran90 keywords. This gave me
Fortran90:2:0{\n\
Comment:"^[*!]":"$"::Comment::\n\
Bang Comment:"!":"$"::Comment::\n\
String:"'":"'":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^ \\t]| [^ \
\t]| [
\\t0]| *\\t[^1-9])":String::\n\
QString:"""":"""":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^ \\t]|
[^ \\t]|
[ \\t0]| *\\t[^1-9])":String1::\n\
SubAString:"'":"'":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^ \\t]|
[^ \\t]|
[ \\t0]| *\\t[^1-9])":String:QString:\n\
String2:"""":"""":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^ \\t]|
[^ \\t]|
[ \\t0]| *\\t[^1-9])":String2:String:\n\
Keywords:"<(?iaccept|automatic|backspace|block|call|close|common|
contains|
continue|data|decode|delete|dimension|do|else|elseif|encode|enddo|
end *file|
endif|end|entry|equivalence|exit|external|format|function|go *to|if|
implicit|
include|inquire|intrinsic|map|none|on|open|parameter|pause|pointer|
print|
program|read|record|return|rewind|save|static|stop|structure|
subroutine|
system|then|type|union|unlock|virtual|volatile|while|
write)>":::Keyword::D\n\
Data Types:"<(?ibyte|character|complex|double *complex|double *precision|
double|integer|logical|real)(\\*[0-9]+)?>":::Storage Type::D\n\
F90 Keywords:"<(?iallocatable|allocate|case|case|cycle|deallocate|
elemental|
elsewhere|endwhere|forall|module|namelist|null|nullify|private|
public|pure|
recursive|rewrite|select|target|where|intent|optional|
interface)>":::Keyword::D\n\
Continuation in string:"\\n( [^ \\t0]|( | | | )?
\\t[1-9])":::Flag:String:\n\
F90 Continuation:"(^ *&|&\\n)":::Flag::\n\
Numeric Const:"<(\\d+(\\.\\d*)?|\\d*\\.\\d+)([DEQdeq][-+]?\\d+)?
(_[\\d\\l]+)?>":::Numeric Const::D\n\
}
The virtue of this is that its case independent. The biggest
complaint I have
with this is that continued strings aren't treated correctly, but that hasn't
been enough of a problem to try and figure out a fix. I believe I have
modified the Numeric Const also, but I don't remember quite what I did there.
Sorry about the wrapping, but I haven't found out how to get kmail to not do
that.
--
Lester M Petrie
Bldg 5700, MS 6170
Oak Ridge National Laboratory
Phone: (865) 574-5259
--
http://www.nedit.org/mailman/listinfo/discuss
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Tony Balinski
2008-09-30 22:32:44 UTC
Permalink
Post by Phillip R Smith
Sorry. I was asleep and then woke up realizing that I'd like to
update my FORTRAN editing customization.
But where do you put the descriptions you have noted here? I don't
see where the changes would be made....
Follow the menu:
Preferences > Default Settings > Syntax Highlighting > Recognition
Patterns...

This opens a dialog that allows you to change the regexes that syntax
highlighting uses. Once done, save these for next time using
Preferences > Save Defaults...

Tony
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Eric Germaneau
2008-10-01 09:59:37 UTC
Permalink
just type "nedit -import this-file"
Then Preferences->Save Defaults
You will see "Fortran 90" in Preferences->Language Modes.
You also can modify it in Preferences > Default Settings > Syntax
Highlighting > Recognition Patterns like said Tony.
I hope this will help you.
Best,
Eric.
Phillip R Smith wrote:

Sorry. I was asleep and then woke up realizing that I'd like to
update my FORTRAN editing customization.
But where do you put the descriptions you have noted here? I don't
see where the changes would be made....
-ross-
On Sep 30, 2008, at 9:37 AM, Lester M Petrie wrote:

On Tuesday 30 September 2008, Eric Germaneau wrote:

Arjan van Dijk wrote:
Dear nedit users,
I'm new in Fortran 90 and I'm looking for a nice syntax
highlighting.
What do you use?
I use:

..................................................................
.................

I haven't checked yours, so maybe this is not any better.
Try and see!
Why did you choose for fortran-90?
Regards,
Arjan
Arjan,
It seems to be the same, I will live with this.
Thank you,
Eric.

I took the existing Fortran and added some Fortran90 keywords.
This gave me
Fortran90:2:0{\n\
Comment:"^[*!]":"$"::Comment::\n\
Bang Comment:"!":"$"::Comment::\n\
String:"'":"'":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^
\\t]| [^ \\t]| [
\\t0]| *\\t[^1-9])":String::\n\
QString:"""":"""":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^
\\t]| [^ \\t]|
[ \\t0]| *\\t[^1-9])":String1::\n\
SubAString:"'":"'":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^
\\t]| [^ \\t]|
[ \\t0]| *\\t[^1-9])":String:QString:\n\
String2:"""":"""":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^
\\t]| [^ \\t]|
[ \\t0]| *\\t[^1-9])":String2:String:\n\

Keywords:"<(?iaccept|automatic|backspace|block|call|close|common|co
ntains|
continue|data|decode|delete|dimension|do|else|elseif|encode|enddo|e
nd *file|
endif|end|entry|equivalence|exit|external|format|function|go
*to|if|implicit|
include|inquire|intrinsic|map|none|on|open|parameter|pause|pointer|
print|
program|read|record|return|rewind|save|static|stop|structure|subrou
tine|
system|then|type|union|unlock|virtual|volatile|while|write)>":::Key
word::D\n\
Data Types:"<(?ibyte|character|complex|double
*complex|double *precision|
double|integer|logical|real)(\\*[0-9]+)?>":::Storage Type::D\n\
F90
Keywords:"<(?iallocatable|allocate|case|case|cycle|deallocate|eleme
ntal|
elsewhere|endwhere|forall|module|namelist|null|nullify|private|publ
ic|pure|
recursive|rewrite|select|target|where|intent|optional|
interface)>":::Keyword::D\n\
Continuation in string:"\\n( [^ \\t0]|( | | | )?
\\t[1-9])":::Flag:String:\n\
F90 Continuation:"(^ *&|&\\n)":::Flag::\n\
Numeric
Const:"<(\\d+(\\.\\d*)?|\\d*\\.\\d+)([DEQdeq][-+]?\\d+)?
(_[\\d\\l]+)?>":::Numeric Const::D\n\
}
The virtue of this is that its case independent. The biggest
complaint I have
with this is that continued strings aren't treated correctly, but
that hasn't
been enough of a problem to try and figure out a fix. I believe I
have
modified the Numeric Const also, but I don't remember quite what I
did there.
Sorry about the wrapping, but I haven't found out how to get kmail
to not do
that.
--
Lester M Petrie
Bldg 5700, MS 6170
Oak Ridge National Laboratory
Phone: (865) 574-5259
Email: [1]petrielmjr-***@public.gmane.org
--
NEdit Discuss mailing list - [2]Discuss-***@public.gmane.org
[3]http://www.nedit.org/mailman/listinfo/discuss

--

Be the change you wish to see in the world
-- GANDHI --
[4]Dr. Éric Germaneau
Chemical Engineering Department
University of Massachusetts Amherst
159 Goessmann Laboratory
686 North Pleasant Street
Amherst, MA 01003-9303
USA
Tel: 413-545-6209 (Office)
msn: [5]aihaike-***@public.gmane.org
skype: aihaike
Please consider the environment before printing this email.
Considérez svp l'environnement avant d'imprimer cet email.

References

1. mailto:petrielmjr-***@public.gmane.org
2. mailto:Discuss-***@public.gmane.org
3. http://www.nedit.org/mailman/listinfo/discuss
4. mailto:egermane-***@public.gmane.org
5. mailto:aihaike-***@public.gmane.org
Phillip R Smith
2008-10-01 11:06:20 UTC
Permalink
Many thanks!!

-ross-
Post by Eric Germaneau
just type "nedit -import this-file"
Then Preferences->Save Defaults
You will see "Fortran 90" in Preferences->Language Modes.
You also can modify it in Preferences > Default Settings > Synt=
ax
Post by Eric Germaneau
Highlighting > Recognition Patterns like said Tony.
I hope this will help you.
Best,
Eric.
Sorry. I was asleep and then woke up realizing that I'd like =
to
Post by Eric Germaneau
update my FORTRAN editing customization.
But where do you put the descriptions you have noted here? I =
=20
Post by Eric Germaneau
don't
see where the changes would be made....
-ross-
Dear nedit users,
I'm new in Fortran 90 and I'm looking for a nice syntax
highlighting.
What do you use?
.............................................................=
...=20
Post by Eric Germaneau
..
.................
I haven't checked yours, so maybe this is not any better.
Try and see!
Why did you choose for fortran-90?
Regards,
Arjan
Arjan,
It seems to be the same, I will live with this.
Thank you,
Eric.
I took the existing Fortran and added some Fortran90 keywords.
This gave me
Fortran90:2:0{\n\
Comment:"^[*!]":"$"::Comment::\n\
Bang Comment:"!":"$"::Comment::\n\
String:"'":"'":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^
\\t]| [^ \\t]| [
\\t0]| *\\t[^1-9])":String::\n\
QString:"""":"""":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [=
^
Post by Eric Germaneau
\\t]| [^ \\t]|
[ \\t0]| *\\t[^1-9])":String1::\n\
SubAString:"'":"'":"\\n([^ \\t]| [^ \\t]| [^ \\t]| =
[^
Post by Eric Germaneau
\\t]| [^ \\t]|
[ \\t0]| *\\t[^1-9])":String:QString:\n\
String2:"""":"""":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [=
^
Post by Eric Germaneau
\\t]| [^ \\t]|
[ \\t0]| *\\t[^1-9])":String2:String:\n\
Keywords:"<(?iaccept|automatic|backspace|block|call|close|=
=20
Post by Eric Germaneau
common|co
ntains|
continue|data|decode|delete|dimension|do|else|elseif|encode|=
=20
Post by Eric Germaneau
enddo|e
nd *file|
endif|end|entry|equivalence|exit|external|format|function|go *to|if|implicit|
include|inquire|intrinsic|map|none|on|open|parameter|pause|=
=20
Post by Eric Germaneau
pointer|
print|
program|read|record|return|rewind|save|static|stop|structure|=
=20
Post by Eric Germaneau
subrou
tine|
system|then|type|union|unlock|virtual|volatile|while|write)=
=20
Post by Eric Germaneau
Post by Eric Germaneau
":::Key
word::D\n\
Data Types:"<(?ibyte|character|complex|double
*complex|double *precision|
double|integer|logical|real)(\\*[0-9]+)?>":::Storage Type::D\n=
\
Post by Eric Germaneau
F90
Keywords:"<(?iallocatable|allocate|case|case|cycle|deallocate|=
=20
Post by Eric Germaneau
eleme
ntal|
elsewhere|endwhere|forall|module|namelist|null|nullify|private=
|=20
Post by Eric Germaneau
publ
ic|pure|
recursive|rewrite|select|target|where|intent|optional|
interface)>":::Keyword::D\n\
Continuation in string:"\\n( [^ \\t0]|( | | =
=20
Post by Eric Germaneau
| )?
\\t[1-9])":::Flag:String:\n\
F90 Continuation:"(^ *&|&\\n)":::Flag::\n\
Numeric
Const:"<(\\d+(\\.\\d*)?|\\d*\\.\\d+)([DEQdeq][-+]?\\d+)?
(_[\\d\\l]+)?>":::Numeric Const::D\n\
}
The virtue of this is that its case independent. The biggest complaint I have
with this is that continued strings aren't treated correctly, =
but
Post by Eric Germaneau
that hasn't
been enough of a problem to try and figure out a fix. I =20
believe I
have
modified the Numeric Const also, but I don't remember quite =
=20
Post by Eric Germaneau
what I
did there.
Sorry about the wrapping, but I haven't found out how to get =
=20
Post by Eric Germaneau
kmail
to not do
that.
--
Lester M Petrie
Bldg 5700, MS 6170
Oak Ridge National Laboratory
Phone: (865) 574-5259
--
[3]http://www.nedit.org/mailman/listinfo/discuss
--
Be the change you wish to see in the world
-- GANDHI --
[4]Dr. =C9ric Germaneau
Chemical Engineering Department
University of Massachusetts Amherst
159 Goessmann Laboratory
686 North Pleasant Street
Amherst, MA 01003-9303
USA
Tel: 413-545-6209 (Office)
skype: aihaike
Please consider the environment before printing this email.
Consid=E9rez svp l'environnement avant d'imprimer cet email=
.
Post by Eric Germaneau
References
3. http://www.nedit.org/mailman/listinfo/discuss
! Fortran 90 Syntax Highlighting Patterns
!
! In NEdit Version 5.0.1 and beyond, load this pattern by starting =
=20
Post by Eric Germaneau
!
! nedit -import <name of this file>
!
! Then, check that the patterns were loaded correctly, and choose =
=20
Post by Eric Germaneau
Save Defaults
! from the Preferences menu. The new patterns will now be =20
incorporated into
! your own .nedit file, so the next time you start NEdit, you will =
=20
Post by Eric Germaneau
no longer
! need to use -import.
!
! In version 5.0, without -import, you must edit your .nedit file =
=20
Post by Eric Germaneau
by hand and
! add the contents of each resource below to the corresponding list=
=20
Post by Eric Germaneau
in your
! .nedit file. Be sure to separate new entries with \n, and =20
continue resource
! strings by escaping all newlines within a resource value with \ =
=20
Post by Eric Germaneau
(backslash),
! leaving only the last line of the resource value not ending in \.
!
nedit.highlightPatterns: \
=09Fortran90:1:30{\n\
=09=09Comment:"!":"$"::Comment::\n\
=09=09Continuation:"&":::Flag::\n\
=09=09String:"'":"'":"\\n([^ \\t]| [^ \\t]| [^ \\t]| [^ \\t]| =
[^ \=20
Post by Eric Germaneau
\t]| [ \\t0]| *\\t[^1-9])":String::\n\
=09=09Keywords:"<(ACCEPT|[Aa]ccept|ASSIGN|[Aa]ssign|AUTOMATIC|[Aa]=
=20
Post by Eric Germaneau
utomatic|BACKSPACE|[Bb]ackspace|BLOCK|[Bb]lock|CALL|[Cc]all|CLOSE|=
=20
Post by Eric Germaneau
[Cc]lose|COMMON|[Cc]ommon|CONTINUE|[Cc]ontinue|DATA|[Dd]ata|DECODE|=
=20
Post by Eric Germaneau
[Dd]ecode|DELETE|[Dd]elete|DIMENSION|[Dd]imension|DO|[Dd]o|ELSE|[Ee=
]=20
Post by Eric Germaneau
lse|ELSEIF|[Ee]lseif|ENCODE|[Ee]ncode|END *FILE|[Ee]nd *[Ff]ile|=
=20
Post by Eric Germaneau
ENDFILE|[Ee]ndfile|END|[Ee]nd|ENDDO|[Ee]nddo|ENDIF|[Ee]ndif|ENTRY|=
=20
Post by Eric Germaneau
[Ee]ntry|EQUIVALENCE|[Ee]quivalence|EXIT|[Ee]xit|EXTERNAL|[Ee]=20
xternal|FORMAT|[Ff]ormat|FUNCTION|[Ff]unction|GOTO|[Gg]oto|IF|[Ii]f=
|=20
Post by Eric Germaneau
IMPLICIT|[Ii]mplicit|INCLUDE|[Ii]nclude|INQUIRE|[Ii]nquire|=20
INTRINSIC|[Ii]ntrinsic|LOGICAL|[Ll]ogical|MAP|[Mm]ap|NONE|[Nn]one|=
=20
Post by Eric Germaneau
ON|[Oo]n|OPEN|[Oo]pen|PARAMETER|[Pp]arameter|PAUSE|[Pp]ause|POINTER=
|=20
Post by Eric Germaneau
[Pp]ointer|PRINT|[Pp]rint|PROGRAM|[Pp]rogram|READ|[Rr]ead|RECORD|=
=20
Post by Eric Germaneau
[Rr]ecord|RETURN|[Rr]eturn|REWIND|[Rr]ewind|SAVE|[Ss]ave|STATIC|[Ss=
]=20
Post by Eric Germaneau
tatic|STOP|[Ss]top|STRUCTURE|[Ss]tructure|SUBROUTINE|[Ss]ubroutine|=
=20
Post by Eric Germaneau
SYSTEM|[Ss]ystem|THEN|[Tt]hen|TO|[Tt]o|TYPE|[Tt]ype|UNION|[Uu]nion|=
=20
Post by Eric Germaneau
UNLOCK|[Uu]nlock|VIRTUAL|[Vv]irtual|VOLATILE|[Vv]olatile|WHILE|[Ww]=
=20
Post by Eric Germaneau
hile|WRITE|[Ww]rite)>":::Keyword::D\n\
=09=09Data Types:"<(BYTE|[Bb]yte|CHARACTER|[Cc]haracter|COMPLEX|[Cc=
]=20
Post by Eric Germaneau
omplex|DOUBLE *COMPLEX|[Dd]ouble *[Cc]omplex|DOUBLE *PRECISION|[Dd]=
=20
Post by Eric Germaneau
ouble *[Pp]recision|DOUBLE|[Dd]ouble|INTEGER|[Ii]nteger|REAL|[Rr]=
=20
Post by Eric Germaneau
eal)(\\*[0-9]+)?>":::Keyword::D\n\
=09=09F90 Keywords:"<(ALLOCATABLE|[Aa]llocatable|ALLOCATE|[Aa]lloca=
te|=20
Post by Eric Germaneau
CASE|[Cc]ase|CASE|[Cc]ase|CONTAINS|[Cc]ontains|CYCLE|[Cc]ycle|=20
DEALLOCATE|[Dd]eallocate|ELSEWHERE|[Ee]lsewhere|ENDWHERE|[Ee]=20
ndwhere|INTENT|[Ii]ntent|INTERFACE|[Ii]nterface|MODULE|[Mm]odule|=
=20
Post by Eric Germaneau
NAMELIST|[Nn]amelist|OPTIONAL|[Oo]ptional|PRIVATE|[Pp]rivate|=20
PROCEDURE|[Pp]rocedure|PUBLIC|[Pp]ublic|REWRITE|[Rr]ewrite|SELECT|=
=20
Post by Eric Germaneau
[Ss]elect|USE|[Uu]se|WHERE|[Ww]here)>":::Keyword::D\n\
=09=09Numeric const:"<[0-9]+(\\.[0-9]*)?([DEde][-+]?[0-9]*)?|\\.[0-=
9]+=20
Post by Eric Germaneau
([DEde][-+]?[0-9]*)?>":::Numeric Const::D\n\
=09}
--=20
http://www.nedit.org/mailman/listinfo/discuss
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Loading...