391
|
1 " Vim syntax file
|
|
2 " Language: MuPAD source
|
|
3 " Maintainer: Dave Silvia <dsilvia@mchsi.com>
|
|
4 " Filenames: *.mu
|
|
5 " Date: 6/30/2004
|
|
6
|
|
7
|
|
8 " For version 5.x: Clear all syntax items
|
|
9 " For version 6.x: Quit when a syntax file was already loaded
|
|
10 if version < 600
|
|
11 syntax clear
|
|
12 elseif exists("b:current_syntax")
|
|
13 finish
|
|
14 endif
|
|
15
|
|
16 " Set default highlighting to Win2k
|
|
17 if !exists("mupad_cmdextversion")
|
|
18 let mupad_cmdextversion = 2
|
|
19 endif
|
|
20
|
|
21 syn case match
|
|
22
|
|
23 syn match mupadComment "//\p*$"
|
|
24 syn region mupadComment start="/\*" end="\*/"
|
|
25
|
|
26 syn region mupadString start="\"" skip=/\\"/ end="\""
|
|
27
|
|
28 syn match mupadOperator "(\|)\|:=\|::\|:\|;"
|
|
29 " boolean
|
|
30 syn keyword mupadOperator and or not xor
|
|
31 syn match mupadOperator "==>\|\<=\>"
|
|
32
|
|
33 " Informational
|
|
34 syn keyword mupadSpecial FILEPATH NOTEBOOKFILE NOTEBOOKPATH
|
|
35 " Set-able, e.g., DIGITS:=10
|
|
36 syn keyword mupadSpecial DIGITS HISTORY LEVEL
|
|
37 syn keyword mupadSpecial MAXLEVEL MAXDEPTH ORDER
|
|
38 syn keyword mupadSpecial TEXTWIDTH
|
|
39 " Set-able, e.g., PRETTYPRINT:=TRUE
|
|
40 syn keyword mupadSpecial PRETTYPRINT
|
|
41 " Set-able, e.g., LIBPATH:="C:\\MuPAD Pro\\mylibdir" or LIBPATH:="/usr/MuPAD Pro/mylibdir"
|
|
42 syn keyword mupadSpecial LIBPATH PACKAGEPATH
|
|
43 syn keyword mupadSpecial READPATH TESTPATH WRITEPATH
|
|
44 " Symbols and Constants
|
|
45 syn keyword mupadDefine FAIL NIL
|
|
46 syn keyword mupadDefine TRUE FALSE UNKNOWN
|
|
47 syn keyword mupadDefine complexInfinity infinity
|
|
48 syn keyword mupadDefine C_ CATALAN E EULER I PI Q_ R_
|
|
49 syn keyword mupadDefine RD_INF RD_NINF undefined unit universe Z_
|
|
50 " print() directives
|
|
51 syn keyword mupadDefine Unquoted NoNL KeepOrder Typeset
|
|
52 " domain specifics
|
|
53 syn keyword mupadStatement domain begin end_domain end
|
|
54 syn keyword mupadIdentifier inherits category axiom info doc interface
|
|
55 " basic programming statements
|
|
56 syn keyword mupadStatement proc begin end_proc
|
|
57 syn keyword mupadUnderlined name local option save
|
|
58 syn keyword mupadConditional if then elif else end_if
|
|
59 syn keyword mupadConditional case of do break end_case
|
|
60 syn keyword mupadRepeat for do next break end_for
|
|
61 syn keyword mupadRepeat while do next break end_while
|
|
62 syn keyword mupadRepeat repeat next break until end_repeat
|
|
63 " domain packages/libraries
|
|
64 syn keyword mupadType detools import linalg numeric numlib plot polylib
|
|
65 syn match mupadType '\<DOM_\w*\>'
|
|
66
|
|
67 "syn keyword mupadFunction contains
|
|
68 " Functions dealing with prime numbers
|
|
69 syn keyword mupadFunction phi invphi mersenne nextprime numprimedivisors
|
|
70 syn keyword mupadFunction pollard prevprime primedivisors
|
|
71 " Functions operating on Lists, Matrices, Sets, ...
|
|
72 syn keyword mupadFunction array _index
|
|
73 " Evaluation
|
|
74 syn keyword mupadFunction float contains
|
|
75 " stdlib
|
|
76 syn keyword mupadFunction _exprseq _invert _lazy_and _lazy_or _negate
|
|
77 syn keyword mupadFunction _stmtseq _invert intersect minus union
|
|
78 syn keyword mupadFunction Ci D Ei O Re Im RootOf Si
|
|
79 syn keyword mupadFunction Simplify
|
|
80 syn keyword mupadFunction abs airyAi airyBi alias unalias anames append
|
|
81 syn keyword mupadFunction arcsin arccos arctan arccsc arcsec arccot
|
|
82 syn keyword mupadFunction arcsinh arccosh arctanh arccsch arcsech arccoth
|
|
83 syn keyword mupadFunction arg args array assert assign assignElements
|
|
84 syn keyword mupadFunction assume assuming asympt bernoulli
|
|
85 syn keyword mupadFunction besselI besselJ besselK besselY beta binomial bool
|
|
86 syn keyword mupadFunction bytes card
|
|
87 syn keyword mupadFunction ceil floor round trunc
|
|
88 syn keyword mupadFunction coeff coerce collect combine copyClosure
|
|
89 syn keyword mupadFunction conjugate content context contfrac
|
|
90 syn keyword mupadFunction debug degree degreevec delete _delete denom
|
|
91 syn keyword mupadFunction densematrix diff dilog dirac discont div _div
|
|
92 syn keyword mupadFunction divide domtype doprint erf erfc error eval evalassign
|
|
93 syn keyword mupadFunction evalp exp expand export unexport expose expr
|
|
94 syn keyword mupadFunction expr2text external extnops extop extsubsop
|
|
95 syn keyword mupadFunction fact fact2 factor fclose finput fname fopen fprint
|
|
96 syn keyword mupadFunction fread ftextinput readbitmap readdata pathname
|
|
97 syn keyword mupadFunction protocol read readbytes write writebytes
|
|
98 syn keyword mupadFunction float frac frame _frame frandom freeze unfreeze
|
|
99 syn keyword mupadFunction funcenv gamma gcd gcdex genident genpoly
|
|
100 syn keyword mupadFunction getpid getprop ground has hastype heaviside help
|
|
101 syn keyword mupadFunction history hold hull hypergeom icontent id
|
|
102 syn keyword mupadFunction ifactor igamma igcd igcdex ilcm in _in
|
|
103 syn keyword mupadFunction indets indexval info input int int2text
|
|
104 syn keyword mupadFunction interpolate interval irreducible is
|
|
105 syn keyword mupadFunction isprime isqrt iszero ithprime kummerU lambertW
|
|
106 syn keyword mupadFunction last lasterror lcm lcoeff ldegree length
|
|
107 syn keyword mupadFunction level lhs rhs limit linsolve lllint
|
|
108 syn keyword mupadFunction lmonomial ln loadmod loadproc log lterm
|
|
109 syn keyword mupadFunction match map mapcoeffs maprat matrix max min
|
|
110 syn keyword mupadFunction mod modp mods monomials multcoeffs new
|
|
111 syn keyword mupadFunction newDomain _next nextprime nops
|
|
112 syn keyword mupadFunction norm normal nterms nthcoeff nthmonomial nthterm
|
|
113 syn keyword mupadFunction null numer ode op operator package
|
|
114 syn keyword mupadFunction pade partfrac patchlevel pdivide
|
|
115 syn keyword mupadFunction piecewise plot plotfunc2d plotfunc3d
|
|
116 syn keyword mupadFunction poly poly2list polylog powermod print
|
|
117 syn keyword mupadFunction product protect psi quit _quit radsimp random rationalize
|
|
118 syn keyword mupadFunction rec rectform register reset return revert
|
|
119 syn keyword mupadFunction rewrite select series setuserinfo share sign signIm
|
|
120 syn keyword mupadFunction simplify
|
|
121 syn keyword mupadFunction sin cos tan csc sec cot
|
|
122 syn keyword mupadFunction sinh cosh tanh csch sech coth
|
|
123 syn keyword mupadFunction slot solve
|
|
124 syn keyword mupadFunction pdesolve matlinsolve matlinsolveLU toeplitzSolve
|
|
125 syn keyword mupadFunction vandermondeSolve fsolve odesolve odesolve2
|
|
126 syn keyword mupadFunction polyroots polysysroots odesolveGeometric
|
|
127 syn keyword mupadFunction realroot realroots mroots lincongruence
|
|
128 syn keyword mupadFunction msqrts
|
|
129 syn keyword mupadFunction sort split sqrt strmatch strprint
|
|
130 syn keyword mupadFunction subs subset subsex subsop substring sum
|
|
131 syn keyword mupadFunction surd sysname sysorder system table taylor tbl2text
|
|
132 syn keyword mupadFunction tcoeff testargs testeq testtype text2expr
|
|
133 syn keyword mupadFunction text2int text2list text2tbl rtime time
|
|
134 syn keyword mupadFunction traperror type unassume unit universe
|
|
135 syn keyword mupadFunction unloadmod unprotect userinfo val version
|
|
136 syn keyword mupadFunction warning whittakerM whittakerW zeta zip
|
|
137
|
|
138 " graphics plot::
|
|
139 syn keyword mupadFunction getDefault setDefault copy modify Arc2d Arrow2d
|
|
140 syn keyword mupadFunction Arrow3d Bars2d Bars3d Box Boxplot Circle2d Circle3d
|
|
141 syn keyword mupadFunction Cone Conformal Curve2d Curve3d Cylinder Cylindrical
|
|
142 syn keyword mupadFunction Density Ellipse2d Function2d Function3d Hatch
|
|
143 syn keyword mupadFunction Histogram2d HOrbital Implicit2d Implicit3d
|
|
144 syn keyword mupadFunction Inequality Iteration Line2d Line3d Lsys Matrixplot
|
|
145 syn keyword mupadFunction MuPADCube Ode2d Ode3d Parallelogram2d Parallelogram3d
|
|
146 syn keyword mupadFunction Piechart2d Piechart3d Point2d Point3d Polar
|
|
147 syn keyword mupadFunction Polygon2d Polygon3d Raster Rectangle Sphere
|
|
148 syn keyword mupadFunction Ellipsoid Spherical Sum Surface SurfaceSet
|
|
149 syn keyword mupadFunction SurfaceSTL Tetrahedron Hexahedron Octahedron
|
|
150 syn keyword mupadFunction Dodecahedron Icosahedron Text2d Text3d Tube Turtle
|
|
151 syn keyword mupadFunction VectorField2d XRotate ZRotate Canvas CoordinateSystem2d
|
|
152 syn keyword mupadFunction CoordinateSystem3d Group2d Group3d Scene2d Scene3d ClippingBox
|
|
153 syn keyword mupadFunction Rotate2d Rotate3d Scale2d Scale3d Transform2d
|
|
154 syn keyword mupadFunction Transform3d Translate2d Translate3d AmbientLight
|
|
155 syn keyword mupadFunction Camera DistantLight PointLight SpotLight
|
|
156
|
|
157 " graphics Attributes
|
|
158 " graphics Output Attributes
|
|
159 syn keyword mupadIdentifier OutputFile OutputOptions
|
|
160 " graphics Defining Attributes
|
|
161 syn keyword mupadIdentifier Angle AngleRange AngleBegin AngleEnd
|
|
162 syn keyword mupadIdentifier Area Axis AxisX AxisY AxisZ Base Top
|
|
163 syn keyword mupadIdentifier BaseX TopX BaseY TopY BaseZ TopZ
|
|
164 syn keyword mupadIdentifier BaseRadius TopRadius Cells
|
|
165 syn keyword mupadIdentifier Center CenterX CenterY CenterZ
|
|
166 syn keyword mupadIdentifier Closed ColorData CommandList Contours CoordinateType
|
|
167 syn keyword mupadIdentifier Data DensityData DensityFunction From To
|
|
168 syn keyword mupadIdentifier FromX ToX FromY ToY FromZ ToZ
|
|
169 syn keyword mupadIdentifier Function FunctionX FunctionY FunctionZ
|
|
170 syn keyword mupadIdentifier Function1 Function2 Baseline
|
|
171 syn keyword mupadIdentifier Generations RotationAngle IterationRules StartRule StepLength
|
|
172 syn keyword mupadIdentifier TurtleRules Ground Heights Moves Inequalities
|
|
173 syn keyword mupadIdentifier InputFile Iterations StartingPoint
|
|
174 syn keyword mupadIdentifier LineColorFunction FillColorFunction
|
|
175 syn keyword mupadIdentifier Matrix2d Matrix3d
|
|
176 syn keyword mupadIdentifier MeshList MeshListType MeshListNormals
|
|
177 syn keyword mupadIdentifier MagneticQuantumNumber MomentumQuantumNumber PrincipalQuantumNumber
|
|
178 syn keyword mupadIdentifier Name Normal NormalX NormalY NormalZ
|
|
179 syn keyword mupadIdentifier ParameterName ParameterBegin ParameterEnd ParameterRange
|
|
180 syn keyword mupadIdentifier Points2d Points3d Radius RadiusFunction
|
|
181 syn keyword mupadIdentifier Position PositionX PositionY PositionZ
|
|
182 syn keyword mupadIdentifier Scale ScaleX ScaleY ScaleZ Shift ShiftX ShiftY ShiftZ
|
|
183 syn keyword mupadIdentifier SemiAxes SemiAxisX SemiAxisY SemiAxisZ
|
|
184 syn keyword mupadIdentifier Tangent1 Tangent1X Tangent1Y Tangent1Z
|
|
185 syn keyword mupadIdentifier Tangent2 Tangent2X Tangent2Y Tangent2Z
|
|
186 syn keyword mupadIdentifier Text TextOrientation TextRotation
|
|
187 syn keyword mupadIdentifier UName URange UMin UMax VName VRange VMin VMax
|
|
188 syn keyword mupadIdentifier XName XRange XMin XMax YName YRange YMin YMax
|
|
189 syn keyword mupadIdentifier ZName ZRange ZMin ZMax ViewingBox
|
|
190 syn keyword mupadIdentifier ViewingBoxXMin ViewingBoxXMax ViewingBoxXRange
|
|
191 syn keyword mupadIdentifier ViewingBoxYMin ViewingBoxYMax ViewingBoxYRange
|
|
192 syn keyword mupadIdentifier ViewingBoxZMin ViewingBoxZMax ViewingBoxZRange
|
|
193 syn keyword mupadIdentifier Visible
|
|
194 " graphics Axis Attributes
|
|
195 syn keyword mupadIdentifier Axes AxesInFront AxesLineColor AxesLineWidth
|
|
196 syn keyword mupadIdentifier AxesOrigin AxesOriginX AxesOriginY AxesOriginZ
|
|
197 syn keyword mupadIdentifier AxesTips AxesTitleAlignment
|
|
198 syn keyword mupadIdentifier AxesTitleAlignmentX AxesTitleAlignmentY AxesTitleAlignmentZ
|
|
199 syn keyword mupadIdentifier AxesTitles XAxisTitle YAxisTitle ZAxisTitle
|
|
200 syn keyword mupadIdentifier AxesVisible XAxisVisible YAxisVisible ZAxisVisible
|
|
201 syn keyword mupadIdentifier YAxisTitleOrientation
|
|
202 " graphics Tick Marks Attributes
|
|
203 syn keyword mupadIdentifier TicksAnchor XTicksAnchor YTicksAnchor ZTicksAnchor
|
|
204 syn keyword mupadIdentifier TicksAt XTicksAt YTicksAt ZTicksAt
|
|
205 syn keyword mupadIdentifier TicksBetween XTicksBetween YTicksBetween ZTicksBetween
|
|
206 syn keyword mupadIdentifier TicksDistance XTicksDistance YTicksDistance ZTicksDistance
|
|
207 syn keyword mupadIdentifier TicksNumber XTicksNumber YTicksNumber ZTicksNumber
|
|
208 syn keyword mupadIdentifier TicksVisible XTicksVisible YTicksVisible ZTicksVisible
|
|
209 syn keyword mupadIdentifier TicksLength TicksLabelStyle
|
|
210 syn keyword mupadIdentifier XTicksLabelStyle YTicksLabelStyle ZTicksLabelStyle
|
|
211 syn keyword mupadIdentifier TicksLabelsVisible
|
|
212 syn keyword mupadIdentifier XTicksLabelsVisible YTicksLabelsVisible ZTicksLabelsVisible
|
|
213 " graphics Grid Lines Attributes
|
|
214 syn keyword mupadIdentifier GridInFront GridLineColor SubgridLineColor
|
|
215 syn keyword mupadIdentifier GridLineStyle SubgridLineStyle GridLineWidth SubgridLineWidth
|
|
216 syn keyword mupadIdentifier GridVisible XGridVisible YGridVisible ZGridVisible
|
|
217 syn keyword mupadIdentifier SubgridVisible XSubgridVisible YSubgridVisible ZSubgridVisible
|
|
218 " graphics Animation Attributes
|
|
219 syn keyword mupadIdentifier Frames TimeRange TimeBegin TimeEnd
|
|
220 syn keyword mupadIdentifier VisibleAfter VisibleBefore VisibleFromTo
|
|
221 syn keyword mupadIdentifier VisibleAfterEnd VisibleBeforeBegin
|
|
222 " graphics Annotation Attributes
|
|
223 syn keyword mupadIdentifier Footer Header FooterAlignment HeaderAlignment
|
|
224 syn keyword mupadIdentifier HorizontalAlignment TitleAlignment VerticalAlignment
|
|
225 syn keyword mupadIdentifier Legend LegendEntry LegendText
|
|
226 syn keyword mupadIdentifier LegendAlignment LegendPlacement LegendVisible
|
|
227 syn keyword mupadIdentifier Title Titles
|
|
228 syn keyword mupadIdentifier TitlePosition TitlePositionX TitlePositionY TitlePositionZ
|
|
229 " graphics Layout Attributes
|
|
230 syn keyword mupadIdentifier Bottom Left Height Width Layout Rows Columns
|
|
231 syn keyword mupadIdentifier Margin BottomMargin TopMargin LeftMargin RightMargin
|
|
232 syn keyword mupadIdentifier OutputUnits Spacing
|
|
233 " graphics Calculation Attributes
|
|
234 syn keyword mupadIdentifier AdaptiveMesh DiscontinuitySearch Mesh SubMesh
|
|
235 syn keyword mupadIdentifier UMesh USubMesh VMesh VSubMesh
|
|
236 syn keyword mupadIdentifier XMesh XSubMesh YMesh YSubMesh Zmesh
|
|
237 " graphics Camera and Lights Attributes
|
|
238 syn keyword mupadIdentifier CameraCoordinates CameraDirection
|
|
239 syn keyword mupadIdentifier CameraDirectionX CameraDirectionY CameraDirectionZ
|
|
240 syn keyword mupadIdentifier FocalPoint FocalPointX FocalPointY FocalPointZ
|
|
241 syn keyword mupadIdentifier LightColor Lighting LightIntensity OrthogonalProjection
|
|
242 syn keyword mupadIdentifier SpotAngle ViewingAngle
|
|
243 syn keyword mupadIdentifier Target TargetX TargetY TargetZ
|
|
244 " graphics Presentation Style and Fonts Attributes
|
|
245 syn keyword mupadIdentifier ArrowLength
|
|
246 syn keyword mupadIdentifier AxesTitleFont FooterFont HeaderFont LegendFont
|
|
247 syn keyword mupadIdentifier TextFont TicksLabelFont TitleFont
|
|
248 syn keyword mupadIdentifier BackgroundColor BackgroundColor2 BackgroundStyle
|
|
249 syn keyword mupadIdentifier BackgroundTransparent Billboarding BorderColor BorderWidth
|
|
250 syn keyword mupadIdentifier BoxCenters BoxWidths DrawMode Gap XGap YGap
|
|
251 syn keyword mupadIdentifier Notched NotchWidth Scaling YXRatio ZXRatio
|
|
252 syn keyword mupadIdentifier VerticalAsymptotesVisible VerticalAsymptotesStyle
|
|
253 syn keyword mupadIdentifier VerticalAsymptotesColor VerticalAsymptotesWidth
|
|
254 " graphics Line Style Attributes
|
|
255 syn keyword mupadIdentifier LineColor LineColor2 LineColorType LineStyle
|
|
256 syn keyword mupadIdentifier LinesVisible ULinesVisible VLinesVisible XLinesVisible
|
|
257 syn keyword mupadIdentifier YLinesVisible LineWidth MeshVisible
|
|
258 " graphics Point Style Attributes
|
|
259 syn keyword mupadIdentifier PointColor PointSize PointStyle PointsVisible
|
|
260 " graphics Surface Style Attributes
|
|
261 syn keyword mupadIdentifier BarStyle Shadows Color Colors FillColor FillColor2
|
|
262 syn keyword mupadIdentifier FillColorTrue FillColorFalse FillColorUnknown FillColorType
|
|
263 syn keyword mupadIdentifier Filled FillPattern FillPatterns FillStyle
|
|
264 syn keyword mupadIdentifier InterpolationStyle Shading UseNormals
|
|
265 " graphics Arrow Style Attributes
|
|
266 syn keyword mupadIdentifier TipAngle TipLength TipStyle TubeDiameter
|
|
267 syn keyword mupadIdentifier Tubular
|
|
268 " graphics meta-documentation Attributes
|
|
269 syn keyword mupadIdentifier objectGroupsListed
|
|
270
|
|
271 if version >= 508 || !exists("did_mupad_syntax_inits")
|
|
272 if version < 508
|
|
273 let did_mupad_syntax_inits = 1
|
|
274 command -nargs=+ HiLink hi link <args>
|
|
275 else
|
|
276 command -nargs=+ HiLink hi def link <args>
|
|
277 endif
|
|
278
|
|
279 HiLink mupadComment Comment
|
|
280 HiLink mupadString String
|
|
281 HiLink mupadOperator Operator
|
|
282 HiLink mupadSpecial Special
|
|
283 HiLink mupadStatement Statement
|
|
284 HiLink mupadUnderlined Underlined
|
|
285 HiLink mupadConditional Conditional
|
|
286 HiLink mupadRepeat Repeat
|
|
287 HiLink mupadFunction Function
|
|
288 HiLink mupadType Type
|
|
289 HiLink mupadDefine Define
|
|
290 HiLink mupadIdentifier Identifier
|
|
291
|
|
292 delcommand HiLink
|
|
293 endif
|
|
294
|
|
295 " TODO More comprehensive listing.
|