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
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
|
" Vim syntax file
" Language: Maple V (based on release 4)
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Aug 19, 2004
" Version: 5
" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax
"
" Package Function Selection: {{{1
" Because there are a lot of packages, and because of the potential for namespace
" clashes, this version of <maple.vim> needs the user to select which, if any,
" package functions should be highlighted. Select your packages and put into your
" <.vimrc> none or more of the lines following let ...=1 lines:
"
" if exists("mvpkg_all")
" ...
" endif
"
" *OR* let mvpkg_all=1
" This syntax file contains all the keywords and top-level packages of Maple 9.5
" but only the contents of packages of Maple V Release 4, and the top-level
" routines of Release 4. <Jacques Carette - carette@mcmaster.ca>
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" Iskeyword Effects: {{{1
if version < 600
set iskeyword=$,48-57,_,a-z,@-Z
else
setlocal iskeyword=$,48-57,_,a-z,@-Z
endif
" Package Selection: {{{1
" allow user to simply select all packages for highlighting
if exists("mvpkg_all")
let mv_DEtools = 1
let mv_Galois = 1
let mv_GaussInt = 1
let mv_LREtools = 1
let mv_combinat = 1
let mv_combstruct = 1
let mv_difforms = 1
let mv_finance = 1
let mv_genfunc = 1
let mv_geometry = 1
let mv_grobner = 1
let mv_group = 1
let mv_inttrans = 1
let mv_liesymm = 1
let mv_linalg = 1
let mv_logic = 1
let mv_networks = 1
let mv_numapprox = 1
let mv_numtheory = 1
let mv_orthopoly = 1
let mv_padic = 1
let mv_plots = 1
let mv_plottools = 1
let mv_powseries = 1
let mv_process = 1
let mv_simplex = 1
let mv_stats = 1
let mv_student = 1
let mv_sumtools = 1
let mv_tensor = 1
let mv_totorder = 1
endif
" Parenthesis/curly/brace sanity checker: {{{1
syn case match
" parenthesis/curly/brace sanity checker
syn region mvZone matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" transparent contains=ALLBUT,mvError,mvBraceError,mvCurlyError
syn region mvZone matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" transparent contains=ALLBUT,mvError,mvBraceError,mvParenError
syn region mvZone matchgroup=Delimiter start="\[" matchgroup=Delimiter end="]" transparent contains=ALLBUT,mvError,mvCurlyError,mvParenError
syn match mvError "[)\]}]"
syn match mvBraceError "[)}]" contained
syn match mvCurlyError "[)\]]" contained
syn match mvParenError "[\]}]" contained
syn match mvComma "[,;:]"
syn match mvSemiError "[;:]" contained
syn match mvDcolon "::"
" Maple Packages, updated for Maple 9.5
syn keyword mvPackage algcurves ArrayTools Cache codegen
syn keyword mvPackage CodeGeneration CodeTools combinat combstruct
syn keyword mvPackage ContextMenu CurveFitting DEtools diffalg
syn keyword mvPackage difforms DiscreteTransforms Domains ExternalCalling
syn keyword mvPackage FileTools finance GaussInt genfunc
syn keyword mvPackage geom3d geometry gfun Groebner
syn keyword mvPackage group hashmset IntegerRelations inttrans
syn keyword mvPackage LargeExpressions LibraryTools liesymm linalg
syn keyword mvPackage LinearAlgebra LinearFunctionalSystems LinearOperators
syn keyword mvPackage ListTools Logic LREtools Maplets
syn keyword mvPackage MathematicalFunctions MathML Matlab
syn keyword mvPackage MatrixPolynomialAlgebra MmaTranslator networks
syn keyword mvPackage numapprox numtheory Optimization OreTools
syn keyword mvPackage Ore_algebra OrthogonalSeries orthopoly padic
syn keyword mvPackage PDEtools plots plottools PolynomialIdeals
syn keyword mvPackage PolynomialTools powseries process QDifferenceEquations
syn keyword mvPackage RandomTools RationalNormalForms RealDomain RootFinding
syn keyword mvPackage ScientificConstants ScientificErrorAnalysis simplex
syn keyword mvPackage Slode SNAP Sockets SoftwareMetrics
syn keyword mvPackage SolveTools Spread stats StringTools
syn keyword mvPackage Student student sumtools SumTools
syn keyword mvPackage tensor TypeTools Units VariationalCalculus
syn keyword mvPackage VectorCalculus Worksheet XMLTools
" Language Support: {{{1
syn keyword mvTodo contained TODO
if exists("g:mapleversion") && g:mapleversion < 9
syn region mvString start=+`+ skip=+``+ end=+`+ keepend contains=mvTodo
syn region mvDelayEval start=+'+ end=+'+ keepend contains=ALLBUT,mvError,mvBraceError,mvCurlyError,mvParenError,mvSemiError
syn match mvVarAssign "[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:=" contains=mvAssign
syn match mvAssign ":=" contained
else
syn region mvName start=+`+ skip=+``+ end=+`+ keepend contains=mvTodo
syn region mvString start=+"+ skip=+""+ end=+"+ keepend
syn region mvDelayEval start=+'+ end=+'+ keepend contains=ALLBUT,mvError,mvBraceError,mvCurlyError,mvParenError
syn match mvDelim "[;:]" display
syn match mvAssign ":="
endif
" Lower-Priority Operators: {{{1
syn match mvOper "\."
" Number handling: {{{1
syn match mvNumber "\<\d\+" " integer
syn match mvNumber "[-+]\=\.\d\+" " . integer
syn match mvNumber "\<\d\+\.\d\+" " integer . integer
syn match mvNumber "\<\d\+\." " integer .
syn match mvNumber "\<\d\+\.\." contains=mvRange " integer ..
syn match mvNumber "\<\d\+e[-+]\=\d\+" " integer e [-+] integer
syn match mvNumber "[-+]\=\.\d\+e[-+]\=\d\+" " . integer e [-+] integer
syn match mvNumber "\<\d\+\.\d*e[-+]\=\d\+" " integer . [integer] e [-+] integer
syn match mvNumber "[-+]\d\+" " integer
syn match mvNumber "[-+]\d\+\.\d\+" " integer . integer
syn match mvNumber "[-+]\d\+\." " integer .
syn match mvNumber "[-+]\d\+\.\." contains=mvRange " integer ..
syn match mvNumber "[-+]\d\+e[-+]\=\d\+" " integer e [-+] integer
syn match mvNumber "[-+]\d\+\.\d*e[-+]\=\d\+" " integer . [integer] e [-+] integer
syn match mvRange "\.\."
" Operators: {{{1
syn keyword mvOper and not or xor implies union intersect subset minus mod
syn match mvOper "<>\|[<>]=\|[<>]\|="
syn match mvOper "&+\|&-\|&\*\|&\/\|&"
syn match mvError "\.\.\."
" MapleV Statements: ? statement {{{1
" MapleV Statements: ? statement
" Split into booleans, conditionals, operators, repeat-logic, etc
syn keyword mvBool true false FAIL
syn keyword mvCond elif else fi if then
syn keyword mvRepeat by for in to
syn keyword mvRepeat do from od while
syn keyword mvSpecial NULL
syn match mvSpecial "\[\]\|{}"
if exists("g:mapleversion") && g:mapleversion < 9
syn keyword mvStatement Order fail options read save
syn keyword mvStatement break local point remember stop
syn keyword mvStatement done mod proc restart with
syn keyword mvStatement end mods quit return
syn keyword mvStatement error next
else
syn keyword mvStatement option options read save
syn keyword mvStatement break local remember stop
syn keyword mvStatement done mod proc restart
syn keyword mvStatement end mods quit return
syn keyword mvStatement error next try catch
syn keyword mvStatement finally assuming global export
syn keyword mvStatement module description use
endif
" Builtin Constants: ? constants {{{1
syn keyword mvConstant Catalan I gamma infinity
syn keyword mvConstant Pi
" Comments: DEBUG, if in a comment, is specially highlighted. {{{1
syn keyword mvDebug contained DEBUG
syn cluster mvCommentGroup contains=mvTodo,mvDebug,@Spell
syn match mvComment "#.*$" contains=@mvCommentGroup
" Basic Library Functions: ? index[function]
syn keyword mvLibrary $ @ @@ ERROR
syn keyword mvLibrary AFactor KelvinHer arctan factor log rhs
syn keyword mvLibrary AFactors KelvinKei arctanh factors log10 root
syn keyword mvLibrary AiryAi KelvinKer argument fclose lprint roots
syn keyword mvLibrary AiryBi LambertW array feof map round
syn keyword mvLibrary AngerJ Lcm assign fflush map2 rsolve
syn keyword mvLibrary Berlekamp LegendreE assigned filepos match savelib
syn keyword mvLibrary BesselI LegendreEc asspar fixdiv matrix scanf
syn keyword mvLibrary BesselJ LegendreEc1 assume float max searchtext
syn keyword mvLibrary BesselK LegendreF asubs floor maximize sec
syn keyword mvLibrary BesselY LegendreKc asympt fnormal maxnorm sech
syn keyword mvLibrary Beta LegendreKc1 attribute fopen maxorder select
syn keyword mvLibrary C LegendrePi bernstein forget member seq
syn keyword mvLibrary Chi LegendrePic branches fortran min series
syn keyword mvLibrary Ci LegendrePic1 bspline fprintf minimize setattribute
syn keyword mvLibrary CompSeq Li cat frac minpoly shake
syn keyword mvLibrary Content Linsolve ceil freeze modp showprofile
syn keyword mvLibrary D MOLS chrem fremove modp1 showtime
syn keyword mvLibrary DESol Maple_floats close frontend modp2 sign
syn keyword mvLibrary Det MeijerG close fscanf modpol signum
syn keyword mvLibrary Diff Norm coeff fsolve mods simplify
syn keyword mvLibrary Dirac Normal coeffs galois msolve sin
syn keyword mvLibrary DistDeg Nullspace coeftayl gc mtaylor singular
syn keyword mvLibrary Divide Power collect gcd mul sinh
syn keyword mvLibrary Ei Powmod combine gcdex nextprime sinterp
syn keyword mvLibrary Eigenvals Prem commutat genpoly nops solve
syn keyword mvLibrary EllipticCE Primfield comparray harmonic norm sort
syn keyword mvLibrary EllipticCK Primitive compoly has normal sparse
syn keyword mvLibrary EllipticCPi Primpart conjugate hasfun numboccur spline
syn keyword mvLibrary EllipticE ProbSplit content hasoption numer split
syn keyword mvLibrary EllipticF Product convergs hastype op splits
syn keyword mvLibrary EllipticK Psi convert heap open sprem
syn keyword mvLibrary EllipticModulus Quo coords history optimize sprintf
syn keyword mvLibrary EllipticNome RESol copy hypergeom order sqrfree
syn keyword mvLibrary EllipticPi Randpoly cos iFFT parse sqrt
syn keyword mvLibrary Eval Randprime cosh icontent pclose sscanf
syn keyword mvLibrary Expand Ratrecon cost identity pclose ssystem
syn keyword mvLibrary FFT Re cot igcd pdesolve stack
syn keyword mvLibrary Factor Rem coth igcdex piecewise sturm
syn keyword mvLibrary Factors Resultant csc ilcm plot sturmseq
syn keyword mvLibrary FresnelC RootOf csch ilog plot3d subs
syn keyword mvLibrary FresnelS Roots csgn ilog10 plotsetup subsop
syn keyword mvLibrary Fresnelf SPrem dawson implicitdiff pochhammer substring
syn keyword mvLibrary Fresnelg Searchtext define indets pointto sum
syn keyword mvLibrary Frobenius Shi degree index poisson surd
syn keyword mvLibrary GAMMA Si denom indexed polar symmdiff
syn keyword mvLibrary GaussAGM Smith depends indices polylog symmetric
syn keyword mvLibrary Gaussejord Sqrfree diagonal inifcn polynom system
syn keyword mvLibrary Gausselim Ssi diff ininame powmod table
syn keyword mvLibrary Gcd StruveH dilog initialize prem tan
syn keyword mvLibrary Gcdex StruveL dinterp insert prevprime tanh
syn keyword mvLibrary HankelH1 Sum disassemble int primpart testeq
syn keyword mvLibrary HankelH2 Svd discont interface print testfloat
syn keyword mvLibrary Heaviside TEXT discrim interp printf thaw
syn keyword mvLibrary Hermite Trace dismantle invfunc procbody thiele
syn keyword mvLibrary Im WeberE divide invztrans procmake time
syn keyword mvLibrary Indep WeierstrassP dsolve iostatus product translate
syn keyword mvLibrary Interp WeierstrassPPrime eliminate iperfpow proot traperror
syn keyword mvLibrary Inverse WeierstrassSigma ellipsoid iquo property trigsubs
syn keyword mvLibrary Irreduc WeierstrassZeta entries iratrecon protect trunc
syn keyword mvLibrary Issimilar Zeta eqn irem psqrt type
syn keyword mvLibrary JacobiAM abs erf iroot quo typematch
syn keyword mvLibrary JacobiCD add erfc irreduc radnormal unames
syn keyword mvLibrary JacobiCN addcoords eulermac iscont radsimp unapply
syn keyword mvLibrary JacobiCS addressof eval isdifferentiable rand unassign
syn keyword mvLibrary JacobiDC algebraic evala isolate randomize unload
syn keyword mvLibrary JacobiDN algsubs evalapply ispoly randpoly unprotect
syn keyword mvLibrary JacobiDS alias evalb isqrfree range updatesR4
syn keyword mvLibrary JacobiNC allvalues evalc isqrt rationalize userinfo
syn keyword mvLibrary JacobiND anames evalf issqr ratrecon value
syn keyword mvLibrary JacobiNS antisymm evalfint latex readbytes vector
syn keyword mvLibrary JacobiSC applyop evalgf lattice readdata verify
syn keyword mvLibrary JacobiSD arccos evalhf lcm readlib whattype
syn keyword mvLibrary JacobiSN arccosh evalm lcoeff readline with
syn keyword mvLibrary JacobiTheta1 arccot evaln leadterm readstat writebytes
syn keyword mvLibrary JacobiTheta2 arccoth evalr length realroot writedata
syn keyword mvLibrary JacobiTheta3 arccsc exp lexorder recipoly writeline
syn keyword mvLibrary JacobiTheta4 arccsch expand lhs rem writestat
syn keyword mvLibrary JacobiZeta arcsec expandoff limit remove writeto
syn keyword mvLibrary KelvinBei arcsech expandon ln residue zip
syn keyword mvLibrary KelvinBer arcsin extract lnGAMMA resultant ztrans
syn keyword mvLibrary KelvinHei arcsinh
" == PACKAGES ======================================================= {{{1
" Note: highlighting of package functions is now user-selectable by package.
" Package: DEtools differential equations tools {{{2
if exists("mv_DEtools")
syn keyword mvPkg_DEtools DEnormal Dchangevar autonomous dfieldplot reduceOrder untranslate
syn keyword mvPkg_DEtools DEplot PDEchangecoords convertAlg indicialeq regularsp varparam
syn keyword mvPkg_DEtools DEplot3d PDEplot convertsys phaseportrait translate
endif
" Package: Domains: create domains of computation {{{2
if exists("mv_Domains")
endif
" Package: GF: Galois Fields {{{2
if exists("mv_GF")
syn keyword mvPkg_Galois galois
endif
" Package: GaussInt: Gaussian Integers {{{2
if exists("mv_GaussInt")
syn keyword mvPkg_GaussInt GIbasis GIfactor GIissqr GInorm GIquadres GIsmith
syn keyword mvPkg_GaussInt GIchrem GIfactors GIlcm GInormal GIquo GIsqrfree
syn keyword mvPkg_GaussInt GIdivisor GIgcd GImcmbine GIorder GIrem GIsqrt
syn keyword mvPkg_GaussInt GIfacpoly GIgcdex GInearest GIphi GIroots GIunitnormal
syn keyword mvPkg_GaussInt GIfacset GIhermite GInodiv GIprime GIsieve
endif
" Package: LREtools: manipulate linear recurrence relations {{{2
if exists("mv_LREtools")
syn keyword mvPkg_LREtools REcontent REprimpart REtodelta delta hypergeomsols ratpolysols
syn keyword mvPkg_LREtools REcreate REreduceorder REtoproc dispersion polysols shift
syn keyword mvPkg_LREtools REplot REtoDE constcoeffsol
endif
" Package: combinat: combinatorial functions {{{2
if exists("mv_combinat")
syn keyword mvPkg_combinat Chi composition graycode numbcomb permute randperm
syn keyword mvPkg_combinat bell conjpart inttovec numbcomp powerset stirling1
syn keyword mvPkg_combinat binomial decodepart lastpart numbpart prevpart stirling2
syn keyword mvPkg_combinat cartprod encodepart multinomial numbperm randcomb subsets
syn keyword mvPkg_combinat character fibonacci nextpart partition randpart vectoint
syn keyword mvPkg_combinat choose firstpart
endif
" Package: combstruct: combinatorial structures {{{2
if exists("mv_combstruct")
syn keyword mvPkg_combstruct allstructs draw iterstructs options specification structures
syn keyword mvPkg_combstruct count finished nextstruct
endif
" Package: difforms: differential forms {{{2
if exists("mv_difforms")
syn keyword mvPkg_difforms const defform formpart parity scalarpart wdegree
syn keyword mvPkg_difforms d form mixpar scalar simpform wedge
endif
" Package: finance: financial mathematics {{{2
if exists("mv_finance")
syn keyword mvPkg_finance amortization cashflows futurevalue growingperpetuity mv_finance presentvalue
syn keyword mvPkg_finance annuity effectiverate growingannuity levelcoupon perpetuity yieldtomaturity
syn keyword mvPkg_finance blackscholes
endif
" Package: genfunc: rational generating functions {{{2
if exists("mv_genfunc")
syn keyword mvPkg_genfunc rgf_charseq rgf_expand rgf_hybrid rgf_pfrac rgf_sequence rgf_term
syn keyword mvPkg_genfunc rgf_encode rgf_findrecur rgf_norm rgf_relate rgf_simp termscale
endif
" Package: geometry: Euclidean geometry {{{2
if exists("mv_geometry")
syn keyword mvPkg_geometry circle dsegment hyperbola parabola segment triangle
syn keyword mvPkg_geometry conic ellipse line point square
endif
" Package: grobner: Grobner bases {{{2
if exists("mv_grobner")
syn keyword mvPkg_grobner finduni gbasis leadmon normalf solvable spoly
syn keyword mvPkg_grobner finite gsolve
endif
" Package: group: permutation and finitely-presented groups {{{2
if exists("mv_group")
syn keyword mvPkg_group DerivedS areconjugate cosets grouporder issubgroup permrep
syn keyword mvPkg_group LCS center cosrep inter mulperms pres
syn keyword mvPkg_group NormalClosure centralizer derived invperm normalizer subgrel
syn keyword mvPkg_group RandElement convert grelgroup isabelian orbit type
syn keyword mvPkg_group Sylow core groupmember isnormal permgroup
endif
" Package: inttrans: integral transforms {{{2
if exists("mv_inttrans")
syn keyword mvPkg_inttrans addtable fouriercos hankel invfourier invlaplace mellin
syn keyword mvPkg_inttrans fourier fouriersin hilbert invhilbert laplace
endif
" Package: liesymm: Lie symmetries {{{2
if exists("mv_liesymm")
syn keyword mvPkg_liesymm &^ TD depvars getform mixpar vfix
syn keyword mvPkg_liesymm &mod annul determine hasclosure prolong wcollect
syn keyword mvPkg_liesymm Eta autosimp dvalue hook reduce wdegree
syn keyword mvPkg_liesymm Lie close extvars indepvars setup wedgeset
syn keyword mvPkg_liesymm Lrank d getcoeff makeforms translate wsubs
endif
" Package: linalg: Linear algebra {{{2
if exists("mv_linalg")
syn keyword mvPkg_linalg GramSchmidt coldim equal indexfunc mulcol singval
syn keyword mvPkg_linalg JordanBlock colspace exponential innerprod multiply smith
syn keyword mvPk
|