Re: nedit & Fortran 90

Phillip R Smith <smithp01-Sc/[email protected]>
Newsgroups gmane.editors.nedit.user
Message-ID <[email protected]>
Many thanks!!

-ross-

On Oct 1, 2008, at 5:59 AM, Eric Germaneau wrote:

>
>    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][email protected]
>      --
>      NEdit Discuss mailing list - [2][email protected]
>      [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][email protected]
>                                skype: aihaike
>         Please consider the environment before printing this email.
>         Considérez svp l'environnement avant d'imprimer cet email.
>
> References
>
>    1. mailto:[email protected]
>    2. mailto:[email protected]
>    3. http://www.nedit.org/mailman/listinfo/discuss
>    4. mailto:[email protected]
>    5. mailto:[email protected]
> ! Fortran 90 Syntax Highlighting Patterns
> ! (submitted by Van Snyder <[email protected]>)
> !
> ! 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: \
> 	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|DO|[Dd]o|ELSE|[Ee] 
> lse|ELSEIF|[Ee]lseif|ENCODE|[Ee]ncode|END *FILE|[Ee]nd *[Ff]ile| 
> ENDFILE|[Ee]ndfile|END|[Ee]nd|ENDDO|[Ee]nddo|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\
> 	}
> nedit.languageModes: Fortran90:.f90::::::
> -- 
> NEdit Discuss mailing list - [email protected]
> http://www.nedit.org/mailman/listinfo/discuss

-- 
NEdit Discuss mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.