" Syntax highlighting file for Maple V
"  Language:    Maple V   (I only have release 1, so newer stuff is missing -- sorry!)
"  Maintainer:  Dr Charles E. Campbell, Jr. <cec@gryphon.gsfc.nasa.gov>
"  Last change:	1997 April 23

" Remove any old syntax stuff hanging around
syntax clear

" Maple V Packages, circa Release 1
syntax keyword mvPackage  combinat  geometry  liesymm   np        orthopoly powseries simplex   student
syntax keyword mvPackage  difforms  grobner   linalg    numtheory plots     projgeom  stats     totorder
syntax keyword mvPackage  geom3d    group     logic

" Language Support
syntax region  mvString start=+`+ skip=+``+ end=+`+
syntax match mvVarAssign "[a-zA-Z_][a-zA-Z_0-9]*[ 	]*:=" contains mvAssign
syntax match mvAssign contained ":="

" set case ignore	" when this works...
syntax keyword mvStatement and break by display do done elif else end error fail fi for from if in local mod mods next
syntax keyword mvStatement not od options or Order point proc quit read readlib readstat remember return save stop then 
syntax keyword mvStatement to while with writeto
" set case match	" when this works...

" Builtin Constants
syntax keyword mvConstant gamma Pi false true Catalan E

" Number handling
syntax match mvNumber "\<[0-9][0-9.]*\>"

" Comments:
" Xmath supports #...  (like Unix shells)
"       and      #{ ... }# comment blocks
syntax match mvComment "#.*$"

" Basic Library Functions
syntax keyword mvLibrary  $             @            @@               BesselI     BesselJ    BesselK
syntax keyword mvLibrary  BesselY       Beta         Ci               Content     D          Det
syntax keyword mvLibrary  Diff          DistDeg      Divide           ERROR       Ei         Eigenvals
syntax keyword mvLibrary  Eval          Expand       Factor           Factors     FresnelC   FresnelS
syntax keyword mvLibrary  GAMMA         Gcd          Gcdex            Hermite     Int        Interp
syntax keyword mvLibrary  Irreduc       Limit        MeijerG          Normal      Nullspace  Power
syntax keyword mvLibrary  Powmod        Prem         Primitive        Primpart    Product    Psi
syntax keyword mvLibrary  Quo           RETURN       Randpoly         Rem         Resultant  RootOf
syntax keyword mvLibrary  Roots         Si           Smith            Sprem       Sqrfree    Sum
syntax keyword mvLibrary  Svd           Zeta         abs              addressof   alias      allvalues
syntax keyword mvLibrary  anames        appendto     arccos           arccosh     arccot     arccoth
syntax keyword mvLibrary  arccsc        arccsch      arcsec           arcsech     arcsin     arcsinh
syntax keyword mvLibrary  arctan        arctanh      array            assemble    assign     assigned
syntax keyword mvLibrary  asympt        bernoulli    binomial         cat         chebyshev  chrem
syntax keyword mvLibrary  coeff         coeffs       collect          combine     compoly    content
syntax keyword mvLibrary  convert       copy         cos              cosh        cot        coth
syntax keyword mvLibrary  csc           csch         define           degree      denom      diff
syntax keyword mvLibrary  dilog         disassemble  discrim          divide      dsolve     entries
syntax keyword mvLibrary  eqn           erf          euler            eval        evala      evalb
syntax keyword mvLibrary  evalc         evalf        hypergeom        evalhf      evalm      evaln
syntax keyword mvLibrary  example       exp          expand           factor      factorial  fnormal
syntax keyword mvLibrary  fortran       frac         frontend         fsolve      galois     gc
syntax keyword mvLibrary  gcd           gcdex        genpoly          has         hastype    help
syntax keyword mvLibrary  icontent      if           ifactor          igcd        igcdex     ilcm
syntax keyword mvLibrary  indets        indices      int              series      interface  interp
syntax keyword mvLibrary  intersect     iquo         irem             irreduc     isolve     isprime
syntax keyword mvLibrary  isqrt         ithprime     laplace          latex       lcm        lcoeff
syntax keyword mvLibrary  ldegree       leadterm     length           lexorder    lhs        limit
syntax keyword mvLibrary  ln            log          lprint           macro       map        match
syntax keyword mvLibrary  max           maxnorm      mellin           member      min        minus
syntax keyword mvLibrary  modp          modp1        mods             msolve      nextprime  nops
syntax keyword mvLibrary  norm          normal       numer            op          order      plot
syntax keyword mvLibrary  plot3d        plotsetup    pointto          prem        prevprime  primpart
syntax keyword mvLibrary  print         product      quo              radsimp     rand       randpoly
syntax keyword mvLibrary  readlib       readstat     rem              resultant   rhs        roots
syntax keyword mvLibrary  round         rsolve       sec              sech        select     seq
syntax keyword mvLibrary  series        sign         signum           simplify    sin        sinh
syntax keyword mvLibrary  solve         sort         sprem            sqrt        subs       subsop
syntax keyword mvLibrary  substring     sum          system           table       tan        tanh
syntax keyword mvLibrary  taylor        tcoeff       testeq           time        trace      traperror
syntax keyword mvLibrary  trunc         type         unames           unapply     union      userinfo
syntax keyword mvLibrary  whattype      with         words            writeto     zip        ztrans


" --  PACKAGES  -------------------------------------------------------
" There are a lot of packages; these are some of the standard ones.
" If you have a slow terminal, you may well wish to comment the
" lines between -- PACKAGES -- lines out.

" Package: combinat
syntax keyword mvPkgFunc  bell          binomial     cartprod     character
syntax keyword mvPkgFunc  Chi           combine      composition  decodepart
syntax keyword mvPkgFunc  encodepart    fibonacci    firstpart    inttovec
syntax keyword mvPkgFunc  lastpart      multinomial  nextpart     numbcomb
syntax keyword mvPkgFunc  numbcomp      numbpart     numbperm     partition
syntax keyword mvPkgFunc  permute       powerset     prevpart     randcomb
syntax keyword mvPkgFunc  randpart      randperm     stirling1    stirling2
syntax keyword mvPkgFunc  subsets       vectoint

" Package: difforms
syntax keyword mvPkgFunc  &^            d       defform     formpart
syntax keyword mvPkgFunc  mixpar        parity  scalarpart  simpform
syntax keyword mvPkgFunc  wdegree

" Package: geom3d
syntax keyword mvPkgFunc  angle         area               are_collinear  are_concurrent
syntax keyword mvPkgFunc  are_parallel  are_perpendicular  are_tangent    center
syntax keyword mvPkgFunc  centroid      coordinates        coplanar       distance
syntax keyword mvPkgFunc  inter         midpoint           onsegment      on_plane
syntax keyword mvPkgFunc  on_sphere     parallel           perpendicular  powerps
syntax keyword mvPkgFunc  projection    radius             rad_plane      reflect
syntax keyword mvPkgFunc  sphere        symmetric          tangent        tetrahedron
syntax keyword mvPkgFunc  triangle3d    volume

" Package: geometry
syntax keyword mvPkgFunc  altitude           Appolonius    area            are_collinear
syntax keyword mvPkgFunc  are_concurrent     are_harmonic  are_orthogonal  are_parallel
syntax keyword mvPkgFunc  are_perpendicular  are_similar   are_tangent     bisector
syntax keyword mvPkgFunc  center             centroid      circumcircle    conic
syntax keyword mvPkgFunc  convexhull         coordinates   detailf         diameter
syntax keyword mvPkgFunc  distance           ellipse       Eulercircle     Eulerline
syntax keyword mvPkgFunc  excircle           find_angle    Gergonnepoint   harmonic
syntax keyword mvPkgFunc  incircle           inter         inversion       is_equilateral
syntax keyword mvPkgFunc  is_right           make_square   median          midpoint
syntax keyword mvPkgFunc  Nagelpoint         onsegment     on_circle       on_line
syntax keyword mvPkgFunc  orthocenter        parallel      perpendicular   perpen_bisector
syntax keyword mvPkgFunc  polar_point        pole_line     powerpc         projection
syntax keyword mvPkgFunc  radius             rad_axis      rad_center      randpoint
syntax keyword mvPkgFunc  reflect            rotate        sides           similitude
syntax keyword mvPkgFunc  Simsonline         square        symmetric       tangent
syntax keyword mvPkgFunc  tangentpc

" Package: grobner
syntax keyword mvPkgFunc  finduni       finite   gbasis    gsolve
syntax keyword mvPkgFunc  leadmon       normalf  solvable  spoly
syntax keyword mvPktOption plex tdeg

" Package: group
syntax keyword mvPkgFunc  centralizer   cosets      cosrep   groupmember
syntax keyword mvPkgFunc  grouporder    inter       invperm  isnormal
syntax keyword mvPkgFunc  mulperms      normalizer  permrep  pres

" Package: liesymm
syntax keyword mvPkgFunc  &mod          &^         annul     close
syntax keyword mvPkgFunc  d             determine  getcoeff  getform
syntax keyword mvPkgFunc  hasclosure    hook       Lie       Lrank
syntax keyword mvPkgFunc  makeforms     mixpar     setup     value
syntax keyword mvPkgFunc  wcollect      wdegree    wedgeset  wsubs

" Package: linalg
syntax keyword mvPkgFunc  add           addcol       addrow      adj         adjoint      angle
syntax keyword mvPkgFunc  augment       backsub      band        basis       bezout       BlockDiagonal
syntax keyword mvPkgFunc  charmat       charpoly     col         coldim      colspace     colspan
syntax keyword mvPkgFunc  companion     concat       cond        copyinto    crossprod    curl
syntax keyword mvPkgFunc  definite      delcols      delrows     det         diag         diverge
syntax keyword mvPkgFunc  dotprod       eigenvals    eigenvects  equal       exponential  extend
syntax keyword mvPkgFunc  ffgausselim   fibonacci    frobenius   gausselim   gaussjord    genmatrix
syntax keyword mvPkgFunc  grad          GramSchmidt  hadamard    hermite     hessian      hilbert
syntax keyword mvPkgFunc  htranspose    ihermite     indexfunc   innerprod   intbasis     inverse
syntax keyword mvPkgFunc  ismith        iszero       jacobian    jordan      JordanBlock  kernel
syntax keyword mvPkgFunc  laplacian     leastsqrs    linsolve    matrix      minor        minpoly
syntax keyword mvPkgFunc  mulcol        mulrow       multiply    norm        nullspace    orthog
syntax keyword mvPkgFunc  permanent     pivot        potential   randmatrix  range        rank
syntax keyword mvPkgFunc  row           rowdim       rowspace    rowspan     rref         scalarmul
syntax keyword mvPkgFunc  singularvals  smith        stack       submatrix   subvector    sumbasis
syntax keyword mvPkgFunc  swapcol       swaprow      sylvester   toeplitz    trace        transpose
syntax keyword mvPkgFunc  vandermonde   vecpotent    vectdim     vector

" Package: logic
syntax keyword mvPkgFunc  bequal   bsimp    canon    frominert
syntax keyword mvPkgFunc  MOD2     toinert  distrib  dual
syntax keyword mvPkgFunc  environ  randbool satisfy  tautology

" Package: np
syntax keyword mvPkgFunc  conj          D    eqns  suball
syntax keyword mvPkgFunc  V             V_D  X     X_D
syntax keyword mvPkgFunc  X_V           Y    Y_D   Y_V
syntax keyword mvPkgFunc  Y_X

" Package: numtheory
syntax keyword mvPkgFunc  B             bernoulli   cfrac      cyclotomic
syntax keyword mvPkgFunc  divisors      E           euler      F
syntax keyword mvPkgFunc  factorset     fermat      GIgcd      ifactor
syntax keyword mvPkgFunc  imagunit      isolve      isprime    issqrfree
syntax keyword mvPkgFunc  ithprime      J           jacobi     L
syntax keyword mvPkgFunc  lambda        legendre    M          mcombine
syntax keyword mvPkgFunc  mersenne      mipolys     mlog       mobius
syntax keyword mvPkgFunc  mroot         msqrt       nextprime  nthpow
syntax keyword mvPkgFunc  order         phi         pprimroot  prevprime
syntax keyword mvPkgFunc  primroot      rootsunity  safeprime  sigma
syntax keyword mvPkgFunc  tau

" Package: orthopoly
syntax keyword mvPkgFunc  G  H  L  P T  U

" Package: plots
syntax keyword mvPkgFunc  conformal     cylinderplot      display     display3d
syntax keyword mvPkgFunc  matrixplot    pointplot         polarplot   replot
syntax keyword mvPkgFunc  spacecurve    sparsematrixplot  sphereplot  tubeplot

" Package: powseries
syntax keyword mvPkgFunc  add           compose   evalpow   inverse
syntax keyword mvPkgFunc  multconst     multiply  negative  powcreate
syntax keyword mvPkgFunc  powdiff       powexp    powint    powlog
syntax keyword mvPkgFunc  powpoly       powsolve  quotient  reversion
syntax keyword mvPkgFunc  subtract      tpsform

" Package: projgeom
syntax keyword mvPkgFunc  collinear     concur     conjugate  ctangent
syntax keyword mvPkgFunc  fpconic       harmonic   inter      join
syntax keyword mvPkgFunc  lccutc        lccutr     lccutr2p   linemeet
syntax keyword mvPkgFunc  midpoint      onsegment  polarp     poleline
syntax keyword mvPkgFunc  ptangent      rtangent   tangentte  tharmonic

" Package: simplex
syntax keyword mvPkgFunc  basis        convexhull  cterm     dual
syntax keyword mvPkgFunc  feasible     maximize    minimize  pivot
syntax keyword mvPkgFunc  pivoteqn     pivotvar    ratio     setup
syntax keyword mvPkgFunc  standardize

" Package: stats
syntax keyword mvPkgFunc  addrecord        average        ChiSquare    correlation
syntax keyword mvPkgFunc  covariance       evalstat       Exponential  Fdist
syntax keyword mvPkgFunc  Ftest            getkey         linregress   median
syntax keyword mvPkgFunc  mode             multregress    N            projection
syntax keyword mvPkgFunc  putkey           Q              RandBeta     RandChiSquare
syntax keyword mvPkgFunc  RandExponential  RandFdist      RandGamma    RandNormal
syntax keyword mvPkgFunc  RandPoisson      RandStudentsT  RandUniform  regression
syntax keyword mvPkgFunc  removekey        Rsquared       sdev         serr
syntax keyword mvPkgFunc  statplot         StudentsT      Uniform      variance

" Package: student
syntax keyword mvPkgFunc  changevar     combine   completesquare  D
syntax keyword mvPkgFunc  distance      Int       intercept       intparts
syntax keyword mvPkgFunc  isolate       leftbox   leftsum         Limit
syntax keyword mvPkgFunc  makeproc      maximize  middlesum       midpoint
syntax keyword mvPkgFunc  minimize      powsubs   rightbox        rightsum
syntax keyword mvPkgFunc  showtangent   simpson   slope           Sum
syntax keyword mvPkgFunc  trapezoid     value

" Package: totorder
syntax keyword mvPkgFunc  assume is forget ordering
" --  PACKAGES  -------------------------------------------------------

if !exists("did_maplev_syntax_inits")
  let did_maplev_syntax_inits = 1

  highlight link mvComment   Comment
  highlight link mvPackage   Type
  highlight link mvLibrary   Statement
  highlight link mvPkgFunc   Type
  highlight link mvPktOption Special
  highlight link mvStatement Statement
  highlight link mvConstant  Number
  highlight link mvNumber    Number
  highlight link mvString    String
  highlight link mvAssign    Delimiter 
endif
