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