summaryrefslogtreecommitdiffstats
path: root/misc/syntax/spice.syntax
blob: 86ff10e4f8ae137f7aa5d3bc01c82a1403880e6e (plain)
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
caseinsensitive

context default
    keyword linestart \**\n brown
    keyword $*\n brown
    keyword ;*\n brown
    keyword //*\n brown
    keyword linestart \+ red

    # dot commands
    keyword whole .ac brightmagenta
    keyword whole .control brightmagenta
    keyword whole .csparam brightmagenta
    keyword whole .dc brightmagenta
    keyword whole .disto brightmagenta
    keyword whole .else brightmagenta
    keyword whole .elseif brightmagenta
    keyword whole .end brightmagenta
    keyword whole .endc brightmagenta
    keyword whole .endif brightmagenta
    keyword whole .ends brightmagenta
    keyword whole .four brightmagenta
    keyword whole .func brightmagenta
    keyword whole .global brightmagenta
    keyword whole .ic brightmagenta
    keyword whole .if brightmagenta
    keyword whole .include brightmagenta
    keyword whole .lib brightmagenta
    keyword whole .meas brightmagenta
    keyword whole .model brightmagenta
    keyword whole .nodeset brightmagenta
    keyword whole .noise brightmagenta
    keyword whole .op brightmagenta
    keyword whole .options brightmagenta
    keyword whole .param brightmagenta
    keyword whole .plot brightmagenta
    keyword whole .print brightmagenta
    keyword whole .probe brightmagenta
    keyword whole .pss brightmagenta
    keyword whole .pz brightmagenta
    keyword whole .save brightmagenta
    keyword whole .sens brightmagenta
    keyword whole .subckt brightmagenta
    keyword whole .temp brightmagenta
    keyword whole .tf brightmagenta
    keyword whole .title brightmagenta
    keyword whole .tran brightmagenta
    keyword whole .width brightmagenta

    # circuit elements
    keyword wholeleft linestart A*\s brightcyan
    keyword wholeleft linestart A*\t brightcyan
    keyword wholeleft linestart B*\s brightcyan
    keyword wholeleft linestart B*\t brightcyan
    keyword wholeleft linestart C*\s brightcyan
    keyword wholeleft linestart C*\t brightcyan
    keyword wholeleft linestart D*\s brightcyan
    keyword wholeleft linestart D*\t brightcyan
    keyword wholeleft linestart E*\s brightcyan
    keyword wholeleft linestart E*\t brightcyan
    keyword wholeleft linestart F*\s brightcyan
    keyword wholeleft linestart F*\t brightcyan
    keyword wholeleft linestart G*\s brightcyan
    keyword wholeleft linestart G*\t brightcyan
    keyword wholeleft linestart H*\s brightcyan
    keyword wholeleft linestart H*\t brightcyan
    keyword wholeleft linestart I*\s brightcyan
    keyword wholeleft linestart I*\t brightcyan
    keyword wholeleft linestart J*\s brightcyan
    keyword wholeleft linestart J*\t brightcyan
    keyword wholeleft linestart K*\s brightcyan
    keyword wholeleft linestart K*\t brightcyan
    keyword wholeleft linestart L*\s brightcyan
    keyword wholeleft linestart L*\t brightcyan
    keyword wholeleft linestart M*\s brightcyan
    keyword wholeleft linestart M*\t brightcyan
    keyword wholeleft linestart N*\s brightcyan
    keyword wholeleft linestart N*\t brightcyan
    keyword wholeleft linestart O*\s brightcyan
    keyword wholeleft linestart O*\t brightcyan
    keyword wholeleft linestart P*\s brightcyan
    keyword wholeleft linestart P*\t brightcyan
    keyword wholeleft linestart Q*\s brightcyan
    keyword wholeleft linestart Q*\t brightcyan
    keyword wholeleft linestart R*\s brightcyan
    keyword wholeleft linestart R*\t brightcyan
    keyword wholeleft linestart S*\s brightcyan
    keyword wholeleft linestart S*\t brightcyan
    keyword wholeleft linestart T*\s brightcyan
    keyword wholeleft linestart T*\t brightcyan
    keyword wholeleft linestart U*\s brightcyan
    keyword wholeleft linestart U*\t brightcyan
    keyword wholeleft linestart V*\s brightcyan
    keyword wholeleft linestart V*\t brightcyan
    keyword wholeleft linestart W*\s brightcyan
    keyword wholeleft linestart W*\t brightcyan
    keyword wholeleft linestart X*\s brightcyan
    keyword wholeleft linestart X*\t brightcyan
    keyword wholeleft linestart Y*\s brightcyan
    keyword wholeleft linestart Y*\t brightcyan
    keyword wholeleft linestart Z*\s brightcyan
    keyword wholeleft linestart Z*\t brightcyan

    # model types
    keyword whole R white
    keyword whole C white
    keyword whole L white
    keyword whole SW white
    keyword whole CSW white
    keyword whole URC white
    keyword whole LTRA white
    keyword whole D white
    keyword whole NPN white
    keyword whole PNP white
    keyword whole NJF white
    keyword whole PJF white
    keyword whole NMOS white
    keyword whole PMOS white
    keyword whole NMF white
    keyword whole PMF white
    keyword whole VDMOS white

    # XSPICE models
    keyword whole gain white
    keyword whole summer white
    keyword whole mult white
    keyword whole divide white
    keyword whole limit white
    keyword whole climit white
    keyword whole pwl white
    keyword whole filesource white
    keyword whole multi_input_pwl white
    keyword whole aswitch white
    keyword whole pswitch white
    keyword whole zener white
    keyword whole ilimit white
    keyword whole hyst white
    keyword whole d_dt white
    keyword whole int white
    keyword whole s_xfer white
    keyword whole slew white
    keyword whole lcouple white
    keyword whole core white
    keyword whole sine white
    keyword whole triangle white
    keyword whole square white
    keyword whole oneshot white
    keyword whole cmeter white
    keyword whole lmeter white
    keyword whole memristor white
    keyword whole table2D white
    keyword whole table3D white
    keyword whole sidiode white
    keyword whole dac_bridge white
    keyword whole adc_bridge white
    keyword whole d_osc white
    keyword whole d_to_real white
    keyword whole real_delay white
    keyword whole real_gain white
    keyword whole real_to_v white
    keyword whole d_buffer white
    keyword whole d_inverter white
    keyword whole d_and white
    keyword whole d_nand white
    keyword whole d_or white
    keyword whole d_nor white
    keyword whole d_xor white
    keyword whole d_xnor white
    keyword whole d_tristate white
    keyword whole d_pullup white
    keyword whole d_pulldown white
    keyword whole d_dff white
    keyword whole d_jkff white
    keyword whole d_tff white
    keyword whole d_srff white
    keyword whole d_dlatch white
    keyword whole d_srlatch white
    keyword whole d_state white
    keyword whole d_fdiv white
    keyword whole d_ram white
    keyword whole d_source white
    keyword whole d_lut white
    keyword whole d_genlut white
    keyword whole xfer white

    # common model parameters
    keyword whole m white

context " " green

context exclusive .control .endc
    keyword linestart \**\n brown
    keyword $*\n brown
    keyword ;*\n brown
    keyword //*\n brown
    keyword linestart \+ red

    # commands
    keyword whole ac yellow
    keyword whole alias yellow
    keyword whole alter yellow
    keyword whole altermod yellow
    keyword whole alterparam yellow
    keyword whole asciiplot yellow
    keyword whole aspice yellow
    keyword whole bug yellow
    keyword whole cd yellow
    keyword whole cdump yellow
    keyword whole circbyline yellow
    keyword whole codemodel yellow
    keyword whole compose yellow
    keyword whole cutout yellow
    keyword whole dc yellow
    keyword whole define yellow
    keyword whole deftype yellow
    keyword whole delete yellow
    keyword whole destroy yellow
    keyword whole devhelp yellow
    keyword whole diff yellow
    keyword whole display yellow
    keyword whole echo yellow
    keyword whole edit yellow
    keyword whole edisplay yellow
    keyword whole eprint yellow
    keyword whole eprvcd yellow
    keyword whole fft yellow
    keyword whole fourier yellow
    keyword whole getcwd yellow
    keyword whole gnuplot yellow
    keyword whole hardcopy yellow
    keyword whole help yellow
    keyword whole history yellow
    keyword whole inventory yellow
    keyword whole iplot yellow
    keyword whole jobs yellow
    keyword whole let yellow
    keyword whole linearize yellow
    keyword whole listing yellow
    keyword whole load yellow
    keyword whole mc_source yellow
    keyword whole meas yellow
    keyword whole mdump yellow
    keyword whole mrdump yellow
    keyword whole noise yellow
    keyword whole op yellow
    keyword whole option yellow
    keyword whole plot yellow
    # FIXME: other pre_* keywords?
    keyword whole pre_codemodel yellow
    keyword whole pre_set yellow
    keyword whole pre_unset yellow
    keyword whole print yellow
    keyword whole psd yellow
    keyword whole quit yellow
    keyword whole rehash yellow
    keyword whole remcirc yellow
    keyword whole remzerovec yellow
    keyword whole reset yellow
    keyword whole reshape yellow
    keyword whole resume yellow
    keyword whole rspice yellow
    keyword whole run yellow
    keyword whole rusage yellow
    keyword whole save yellow
    keyword whole sens yellow
    keyword whole set yellow
    keyword whole setcs yellow
    keyword whole setcirc yellow
    keyword whole setplot yellow
    keyword whole setscale yellow
    keyword whole setseed yellow
    keyword whole settype yellow
    keyword whole shell yellow
    keyword whole shift yellow
    keyword whole show yellow
    keyword whole showmod yellow
    keyword whole snload yellow
    keyword whole snsave yellow
    keyword whole source yellow
    keyword whole spec yellow
    keyword whole status yellow
    keyword whole step yellow
    keyword whole stop yellow
    keyword whole strcmp yellow
    keyword whole sysinfo yellow
    keyword whole tf yellow
    keyword whole trace yellow
    keyword whole tran yellow
    keyword whole transpose yellow
    keyword whole unalias yellow
    keyword whole undefine yellow
    keyword whole unlet yellow
    keyword whole unset yellow
    keyword whole version yellow
    keyword whole where yellow
    keyword whole wrdata yellow
    keyword whole write yellow
    keyword whole wrs2p yellow

    # control structures
    keyword whole break brightred
    keyword whole continue brightred
    keyword whole dowhile brightred
    keyword whole else brightred
    keyword whole end brightred
    keyword whole foreach brightred
    keyword whole goto brightred
    keyword whole if brightred
    keyword whole label brightred
    keyword whole repeat brightred
    keyword whole then brightred
    keyword whole while brightred

    # internally predefined variables
    keyword whole appendwrite white
    keyword whole askquit white
    keyword whole batchmode white
    # FIXME: N between 0 and 22
    keyword wholeleft color*\s white
    keyword wholeleft color*\t white
    keyword whole controlswait white
    keyword whole cpdebug white
    keyword whole curplot white
    keyword whole curplotdate white
    keyword whole curplotname white
    keyword whole curplottitle white
    keyword whole debug white
    keyword whole device white
    keyword whole diff_abstol white
    keyword whole diff_reltol white
    keyword whole diff_vntol white
    keyword whole echo white
    keyword whole editor white
    keyword whole filetype white
    keyword whole fourgridsize white
    keyword whole gridsize white
    keyword whole gridstyle white
    keyword whole hcopydev white
    keyword whole hcopyfont white
    keyword whole hcopyfontsize white
    keyword whole hcopydevtype white
    keyword whole hcopyscale white
    keyword whole hcopywidth white
    keyword whole hcopyheight white
    keyword whole hcopypscolor white
    keyword whole hcopypstxcolor white
    keyword whole height white
    keyword whole history white
    keyword whole inputdir white
    keyword whole interactive white
    keyword whole lprplot5 white
    keyword whole lprps white
    keyword whole modelcard white
    keyword whole moremode white
    keyword whole nfreqs white
    keyword whole ngbehavior white
    keyword whole ngdebug white
    keyword whole ng_nomodcheck white
    keyword whole no_auto_gnd white
    keyword whole nobjthack white
    keyword whole nobreak white
    keyword whole noasciiplotvalue white
    keyword whole noclobber white
    keyword whole noglob white
    keyword whole nolegend white
    keyword whole nonomatch white
    keyword whole noparse white
    keyword whole noprintscale white
    keyword whole nosavecurrents white
    keyword whole nosort white
    keyword whole nostepsizelimit white
    keyword whole nosubckt white
    keyword whole notrnoise white
    keyword whole nounits white
    keyword whole numdgt white
    keyword whole num_threads white
    keyword whole oscompiled white
    keyword whole plainlet white
    keyword whole plainplot white
    keyword whole plainwrite white
    keyword whole plainstyle white
    keyword whole pointchars white
    keyword whole polydegree white
    keyword whole polysteps white
    keyword whole program white
    keyword whole prompt white
    keyword whole rawfile white
    keyword whole remote_shell white
    keyword whole renumber white
    keyword whole rndseed white
    keyword whole rhost white
    keyword whole rprogram white
    keyword whole sharedmode white
    keyword whole sim_status white
    keyword whole sourcepath white
    keyword whole specwindow white
    keyword whole specwindoworder white
    keyword whole spicepath white
    keyword whole sqrnoise white
    keyword whole strict_errorhandling white
    keyword whole subend white
    keyword whole subinvoke white
    keyword whole substart white
    keyword whole term white
    keyword whole ticchar white
    keyword whole ticmarks white
    keyword whole ticlist white
    keyword whole units white
    keyword whole unixcom white
    keyword whole wfont white
    keyword whole wfont_size white
    keyword whole width white
    keyword whole win_console white
    keyword whole wr_singlescale white
    keyword whole wr_vecnames white
    keyword whole x11lineararcs white
    keyword whole xbrushwidth white
    keyword whole xgridwidth white
    keyword whole xfont white
    keyword whole xtrtol white