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