2 " Language: grads (GrADS scripts)
3 " Maintainer: Stefan Fronzek (sfronzek at gmx dot net)
4 " Last change: 13 Feb 2004
6 " Grid Analysis and Display System (GrADS); http://grads.iges.org/grads
7 " This syntax file defines highlighting for only very few features of
8 " the GrADS scripting language.
10 " For version 5.x: Clear all syntax items
11 " For version 6.x: Quit when a syntax file was already loaded
14 elseif exists("b:current_syntax")
18 " GrADS is entirely case-insensitive.
23 syn keyword gradsStatement if else endif break exit return
24 syn keyword gradsStatement while endwhile say prompt pull function
25 syn keyword gradsStatement subwrd sublin substr read write close
28 syn region gradsString start=+'+ end=+'+
31 syn match gradsNumber "[+-]\=\<[0-9]\+\>"
35 "syn keyword gradsOperator | ! % & != >=
36 "syn match gradsOperator "[^\.]not[^a-zA-Z]"
40 syn keyword gradsFixVariables lat lon lev result rec rc
41 syn match gradsglobalVariables "_[a-zA-Z][a-zA-Z0-9]*"
42 syn match gradsVariables "[a-zA-Z][a-zA-Z0-9]*"
43 syn match gradsConst "#[A-Z][A-Z_]+"
47 syn match gradsComment "\*.*"
52 " syn match gradsTypos "=="
53 " syn match gradsTypos "!="
55 " Define the default highlighting.
56 " For version 5.7 and earlier: only when not done already
57 " For version 5.8 and later: only when an item doesn't hgs highlighting+yet
58 if version >= 508 || !exists("did_gs_syn_inits")
60 let did_gs_syn_inits = 1
61 command -nargs=+ HiLink hi link <args>
63 command -nargs=+ HiLink hi def link <args>
66 HiLink gradsStatement Statement
68 HiLink gradsString String
69 HiLink gradsNumber Number
71 HiLink gradsFixVariables Special
72 HiLink gradsVariables Identifier
73 HiLink gradsglobalVariables Special
74 HiLink gradsConst Special
76 HiLink gradsClassMethods Function
78 HiLink gradsOperator Operator
79 HiLink gradsComment Comment
81 HiLink gradsTypos Error
86 let b:current_syntax = "grads"