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