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