-
Notifications
You must be signed in to change notification settings - Fork 3
/
4GL.tmLanguage
172 lines (172 loc) · 5.49 KB
/
4GL.tmLanguage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>4gl</string>
</array>
<key>name</key>
<string>4GL</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\{</string>
<key>end</key>
<string>\}</string>
<key>name</key>
<string>comment.block.source.4GL</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>.</string>
</dict>
</array>
</dict>
<dict>
<key>comment</key>
<string>A comment starting with '#'</string>
<key>match</key>
<string>#.*$</string>
<key>name</key>
<string>comment.number-sign.source.4GL</string>
</dict>
<dict>
<key>comment</key>
<string>Single quoted string</string>
<key>match</key>
<string>('(?:\\'|.)*?')</string>
<key>name</key>
<string>string.single.source.4GL</string>
</dict>
<dict>
<key>comment</key>
<string>Double quoted string</string>
<key>match</key>
<string>(\"(?:\\"|.)*?\")</string>
<key>name</key>
<string>string.double.source.4GL</string>
</dict>
<dict>
<key>comment</key>
<string>Operators</string>
<key>match</key>
<string>(?i)(=|!=|\+|-|/|<|>|,|(\s(or|and|is|mod|not|initialize)(?=(\s|$)))|((\s|^)set(?=\s)))</string>
<key>name</key>
<string>keyword.operator.source.4GL</string>
</dict>
<dict>
<key>comment</key>
<string>Constants provided by de language</string>
<key>match</key>
<string>(?i)(dirty read|null|true|false|notfound)</string>
<key>name</key>
<string>constant.language.source.4GL</string>
</dict>
<dict>
<key>comment</key>
<string>Variables provided by de language</string>
<key>match</key>
<string>(?i)(isolation|today|\sstatus|pageno)</string>
<key>name</key>
<string>variable.language.source.4GL</string>
</dict>
<dict>
<key>comment</key>
<string>Control</string>
<key>match</key>
<string>(?i)((\s|^)case(\s*|$)|continue (.*)|when |otherwise|end case|while |end while|(\s|^)for(\s|$)|foreach | into |end for(each)?|(\s|^)if(?=\s+|$)|(\s+|^)then(\s+|$)|(\s+|^)else(\s+|$)|end if|return(\s+|$)|exit (.*))</string>
<key>name</key>
<string>keyword.control.source.4GL</string>
</dict>
<dict>
<key>comment</key>
<string>Keywords</string>
<key>match</key>
<string>(?i)( between |call(?=\s+|$)| clipped|(\s|^)close\s+(form|window)*|(\s|^)create\s+(temp\s+)?(table|index)(?=\s+|$)|database |\sreturning |declare |delete(?=\s|$)|display\s+|((\s|^)drop\s+(table|index)(\s|$))|((\s|^)fetch((\s+|$)|(\s+(first|last)\s+)))|(\s|^)from(\s+|$)|(\s+|^)free\s+|group by\s|(\s+|^)(desc|asc)(\s+|$)|(\s|^)insert\s+into(\s+|$)|((scroll)* cursor(?=\s)(\swith hold)*)|((top|right|bottom|left)\s+margin)|page length|(\s|^)open\s+(form|window)*|(\s|^)prepare |(^|\s)prompt\s|(^|\s)input by name(\s|$)|((start|finish)\s+report)|(\s|^)select(\s+|$)| spaces|(\s|^)update(\s+|$)|(\s|^)where(\s+|$)|(\s|^)output(?=\s|$)|(?<=\s)to(?=\s|$)|order by|format( |$)|(first\s+)*page header|before group of|on (every|last) row|after group of| using |begin\s+work|commit\s+work|rollback\s+work|(\s+|^)values(\s+|$)|((\s|^)whenever\s+(any\s+)?error\s+(continue|stop)(\s|$))|(\s|^)run\s+|end input)</string>
<key>name</key>
<string>keyword.other.source.4GL</string>
</dict>
<dict>
<key>comment</key>
<string>Constant numeric</string>
<key>match</key>
<string>(?<!\w)((0(x|X)[0-9a-fA-F]+)|([0-9]+(\.[0-9]+)?))</string>
<key>name</key>
<string>constant.numeric.source.4GL</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.type.function.source.4GL</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.function.source.4GL</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>variable.parameter.function.source.4GL</string>
</dict>
</dict>
<key>comment</key>
<string>Functions definitions</string>
<key>match</key>
<string>(?i)(?<!\w\s)(function|report)\s+(.*)\s*\((.*)\)</string>
<key>name</key>
<string>meta.function.source.4GL</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.type.function.source.4GL</string>
</dict>
</dict>
<key>comment</key>
<string>Main function definition</string>
<key>match</key>
<string>(?i)(main)(\s*|$)</string>
<key>name</key>
<string>meta.function.source.4GL</string>
</dict>
<dict>
<key>comment</key>
<string>Functions definitions</string>
<key>match</key>
<string>(?i)(end function|end main|end report)(\s*|$)</string>
<key>name</key>
<string>storage.type.function.source.4GL</string>
</dict>
<dict>
<key>comment</key>
<string>Storage types</string>
<key>match</key>
<string>(?i)(\schar(?=[\s\(,$]))|(\sdate(\s+|$)|decimal|define | smallint| integer| float|let | like |(end)* record|(((^|\s+)|(end\s+))globals))</string>
<key>name</key>
<string>storage.type.source.4GL</string>
</dict>
<dict>
<key>comment</key>
<string>Some functions</string>
<key>match</key>
<string>(?i)((?<=\s)(length|day|month|year|p_open|p_close)(?=\s*\(.*?\)))</string>
<key>name</key>
<string>support.function.source.4GL</string>
</dict>
</array>
<key>scopeName</key>
<string>source.4GL</string>
<key>uuid</key>
<string>92ff564a-23b6-471d-8a26-831d4dec08c9</string>
</dict>
</plist>