xref: /vim-8.2.3635/runtime/syntax/grads.vim (revision f37506f6)
1" Vim syntax file
2" Language:	grads (GrADS scripts)
3" Maintainer:	Stefan Fronzek (sfronzek at gmx dot net)
4" Last change: 13 Feb 2004
5
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.
9
10" quit when a syntax file was already loaded
11if exists("b:current_syntax")
12  finish
13endif
14
15" GrADS is entirely case-insensitive.
16syn case ignore
17
18" The keywords
19
20syn keyword gradsStatement	if else endif break exit return
21syn keyword gradsStatement	while endwhile say prompt pull function
22syn keyword gradsStatement subwrd sublin substr read write close
23" String
24
25syn region gradsString		start=+'+ end=+'+
26
27" Integer number
28syn match  gradsNumber		"[+-]\=\<[0-9]\+\>"
29
30" Operator
31
32"syn keyword gradsOperator	| ! % & != >=
33"syn match gradsOperator		"[^\.]not[^a-zA-Z]"
34
35" Variables
36
37syn keyword gradsFixVariables	lat lon lev result rec rc
38syn match gradsglobalVariables	"_[a-zA-Z][a-zA-Z0-9]*"
39syn match gradsVariables		"[a-zA-Z][a-zA-Z0-9]*"
40syn match gradsConst		"#[A-Z][A-Z_]+"
41
42" Comments
43
44syn match gradsComment	"\*.*"
45
46" Typical Typos
47
48" for C programmers:
49" syn match gradsTypos	"=="
50" syn match gradsTypos	"!="
51
52" Define the default highlighting.
53" Only when an item doesn't hgs highlighting+yet
54
55hi def link gradsStatement		Statement
56
57hi def link gradsString		String
58hi def link gradsNumber		Number
59
60hi def link gradsFixVariables	Special
61hi def link gradsVariables		Identifier
62hi def link gradsglobalVariables	Special
63hi def link gradsConst		Special
64
65hi def link gradsClassMethods	Function
66
67hi def link gradsOperator		Operator
68hi def link gradsComment		Comment
69
70hi def link gradsTypos		Error
71
72
73let b:current_syntax = "grads"
74