fortran.nanorc 2.3 KB

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