1
0
mirror of https://github.com/scopatz/nanorc synced 2024-11-09 11:09:59 +01:00
nanorc/fortran.nanorc

51 lines
2.3 KiB
Plaintext
Raw Normal View History

2010-07-29 00:15:43 +02:00
## Here is an example for Fortran 90/95
syntax "Fortran" "\.([Ff]|[Ff]90|[Ff]95|[Ff][Oo][Rr])$"
2010-07-29 00:15:43 +02:00
#color red "\<[A-Z_]a[0-9A-Z_]+\>"
color red "\<[0-9]+\>"
icolor green "\<(action|advance|all|allocatable|allocated|any|apostrophe)\>"
icolor green "\<(append|asis|assign|assignment|associated|character|common)\>"
icolor green "\<(complex|data|default|delim|dimension|double precision)\>"
icolor green "\<(elemental|epsilon|external|file|fmt|form|format|huge)\>"
icolor green "\<(implicit|include|index|inquire|integer|intent|interface)\>"
2010-07-29 17:41:45 +02:00
icolor green "\<(intrinsic|iostat|kind|logical|module|none|null|only)\>"
2010-07-29 00:15:43 +02:00
icolor green "\<(operator|optional|pack|parameter|pointer|position|private)\>"
icolor green "\<(program|public|real|recl|recursive|selected_int_kind)\>"
icolor green "\<(selected_real_kind|subroutine|status)\>"
icolor cyan "\<(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\>"
icolor cyan "\<(close|contains|count|cpu_time|cshift|date_and_time)\>"
icolor cyan "\<(deallocate|digits|dot_product|eor|eoshift|function|iachar)\>"
icolor cyan "\<(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\>"
icolor cyan "\<(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\>"
icolor cyan "\<(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\>"
icolor cyan "\<(open|pad|present|print|product|pure|quote|radix)\>"
icolor cyan "\<(random_number|random_seed|range|read|readwrite|replace)\>"
icolor cyan "\<(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\>"
icolor cyan "\<(spread|sum|system_clock|target|transfer|transpose|trim)\>"
icolor cyan "\<(ubound|unpack|verify|write|tiny|type|use|yes)\>"
icolor yellow "\<(.and.|case|do|else|else?if|else?where|end|end?do|end?if)\>"
icolor yellow "\<(end?select|.eqv.|forall|if|lge|lgt|lle|llt|.neqv.|.not.)\>"
icolor yellow "\<(.or.|repeat|select case|then|where|while)\>"
icolor magenta "\<(continue|cycle|exit|go?to|result|return)\>"
#Operator Color
color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
#Parenthetical Color
color magenta "[(){}]" "\[" "\]"
2012-02-06 23:36:05 +01:00
# Add preprocessor commands.
color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
2010-07-29 00:15:43 +02:00
## String highlighting.
2013-02-01 17:32:15 +01:00
icolor cyan "<[^= ]*>" ""(\\.|[^"])*""
icolor cyan "<[^= ]*>" "'(\\.|[^"])*'"
2010-07-29 00:15:43 +02:00
## Comment highlighting
2012-02-06 23:31:17 +01:00
icolor brightred "!.*$" "(^[Cc]| [Cc]) .*$"