xref: /vim-8.2.3635/runtime/syntax/mf.vim (revision 2ec618c9)
1071d4279SBram Moolenaar" Vim syntax file
2*2ec618c9SBram Moolenaar" Language:           METAFONT
3*2ec618c9SBram Moolenaar" Maintainer:         Nicola Vitacolonna <[email protected]>
4*2ec618c9SBram Moolenaar" Former Maintainers: Andreas Scherer <[email protected]>
5*2ec618c9SBram Moolenaar" Last Change:        2016 Oct 1
6071d4279SBram Moolenaar
789bcfda6SBram Moolenaarif exists("b:current_syntax")
8071d4279SBram Moolenaar  finish
9071d4279SBram Moolenaarendif
10071d4279SBram Moolenaar
11*2ec618c9SBram Moolenaarsyn iskeyword @,_
12*2ec618c9SBram Moolenaar
13*2ec618c9SBram Moolenaar" METAFONT 'primitives' as defined in chapter 25 of 'The METAFONTbook'
14071d4279SBram Moolenaar" Page 210: 'boolean expressions'
15*2ec618c9SBram Moolenaarsyn keyword mfBoolExp        and charexists false known not odd or true unknown
16071d4279SBram Moolenaar
17071d4279SBram Moolenaar" Page 210: 'numeric expression'
18*2ec618c9SBram Moolenaarsyn keyword mfNumExp         ASCII angle cosd directiontime floor hex length
19*2ec618c9SBram Moolenaarsyn keyword mfNumExp         mexp mlog normaldeviate oct sind sqrt totalweight
20*2ec618c9SBram Moolenaarsyn keyword mfNumExp         turningnumber uniformdeviate xpart xxpart xypart
21*2ec618c9SBram Moolenaarsyn keyword mfNumExp         ypart yxpart yypart
22071d4279SBram Moolenaar
23071d4279SBram Moolenaar" Page 211: 'internal quantities'
24*2ec618c9SBram Moolenaarsyn keyword mfInternal       autorounding boundarychar charcode chardp chardx
25*2ec618c9SBram Moolenaarsyn keyword mfInternal       chardy charext charht charic charwd day designsize
26*2ec618c9SBram Moolenaarsyn keyword mfInternal       fillin fontmaking granularity hppp jobname month
27*2ec618c9SBram Moolenaarsyn keyword mfInternal       pausing proofing showstopping smoothing time
28*2ec618c9SBram Moolenaarsyn keyword mfInternal       tracingcapsules tracingchoices tracingcommands
29*2ec618c9SBram Moolenaarsyn keyword mfInternal       tracingedges tracingequations tracingmacros
30*2ec618c9SBram Moolenaarsyn keyword mfInternal       tracingonline tracingoutput tracingpens
31*2ec618c9SBram Moolenaarsyn keyword mfInternal       tracingrestores tracingspecs tracingstats
32*2ec618c9SBram Moolenaarsyn keyword mfInternal       tracingtitles turningcheck vppp warningcheck
33*2ec618c9SBram Moolenaarsyn keyword mfInternal       xoffset year yoffset
34071d4279SBram Moolenaar
35071d4279SBram Moolenaar" Page 212: 'pair expressions'
36*2ec618c9SBram Moolenaarsyn keyword mfPairExp        of penoffset point postcontrol precontrol rotated
37071d4279SBram Moolenaarsyn keyword mfPairExp        scaled shifted slanted transformed xscaled yscaled
38071d4279SBram Moolenaarsyn keyword mfPairExp        zscaled
39071d4279SBram Moolenaar
40071d4279SBram Moolenaar" Page 213: 'path expressions'
41*2ec618c9SBram Moolenaarsyn keyword mfPathExp        atleast controls curl cycle makepath reverse
42*2ec618c9SBram Moolenaarsyn keyword mfPathExp        subpath tension
43071d4279SBram Moolenaar
44071d4279SBram Moolenaar" Page 214: 'pen expressions'
45*2ec618c9SBram Moolenaarsyn keyword mfPenExp         makepen nullpen pencircle
46071d4279SBram Moolenaar
47*2ec618c9SBram Moolenaar" Page 214: 'picture expressions'
48071d4279SBram Moolenaarsyn keyword mfPicExp         nullpicture
49071d4279SBram Moolenaar
50071d4279SBram Moolenaar" Page 214: 'string expressions'
51*2ec618c9SBram Moolenaarsyn keyword mfStringExp      char decimal readstring str substring
52071d4279SBram Moolenaar
53071d4279SBram Moolenaar" Page 217: 'commands and statements'
54*2ec618c9SBram Moolenaarsyn keyword mfCommand        addto also at batchmode contour cull delimiters
55*2ec618c9SBram Moolenaarsyn keyword mfCommand        display doublepath dropping dump end errhelp
56*2ec618c9SBram Moolenaarsyn keyword mfCommand        errmessage errorstopmode everyjob from interim
57*2ec618c9SBram Moolenaarsyn keyword mfCommand        inwindow keeping let message newinternal
58*2ec618c9SBram Moolenaarsyn keyword mfCommand        nonstopmode numspecial openwindow outer randomseed
59*2ec618c9SBram Moolenaarsyn keyword mfCommand        save scrollmode shipout show showdependencies
60*2ec618c9SBram Moolenaarsyn keyword mfCommand        showstats showtoken showvariable special to withpen
61*2ec618c9SBram Moolenaarsyn keyword mfCommand        withweight
62071d4279SBram Moolenaar
63071d4279SBram Moolenaar" Page 56: 'types'
64*2ec618c9SBram Moolenaarsyn keyword mfType           boolean numeric pair path pen picture string
65*2ec618c9SBram Moolenaarsyn keyword mfType           transform
66071d4279SBram Moolenaar
67071d4279SBram Moolenaar" Page 155: 'grouping'
68071d4279SBram Moolenaarsyn keyword mfStatement      begingroup endgroup
69071d4279SBram Moolenaar
70071d4279SBram Moolenaar" Page 165: 'definitions'
71*2ec618c9SBram Moolenaarsyn keyword mfDefinition     def enddef expr primary primarydef secondary
72*2ec618c9SBram Moolenaarsyn keyword mfDefinition     secondarydef suffix tertiary tertiarydef text
73*2ec618c9SBram Moolenaarsyn keyword mfDefinition     vardef
74071d4279SBram Moolenaar
75071d4279SBram Moolenaar" Page 169: 'conditions and loops'
76*2ec618c9SBram Moolenaarsyn keyword mfCondition      else elseif endfor exitif fi for forever
77*2ec618c9SBram Moolenaarsyn keyword mfCondition      forsuffixes if step until
78071d4279SBram Moolenaar
79071d4279SBram Moolenaar" Other primitives listed in the index
80*2ec618c9SBram Moolenaarsyn keyword mfPrimitive      charlist endinput expandafter extensible fontdimen
81*2ec618c9SBram Moolenaarsyn keyword mfPrimitive      headerbyte inner input intersectiontimes kern
82*2ec618c9SBram Moolenaarsyn keyword mfPrimitive      ligtable quote scantokens skipto
83*2ec618c9SBram Moolenaar
84*2ec618c9SBram Moolenaar" Implicit suffix parameters
85*2ec618c9SBram Moolenaarsyn match   mfSuffixParam    "@#\|#@\|@"
86*2ec618c9SBram Moolenaar
87*2ec618c9SBram Moolenaar" These are just tags, but given their special status, we
88*2ec618c9SBram Moolenaar" highlight them as variables
89*2ec618c9SBram Moolenaarsyn keyword mfVariable       x y
90071d4279SBram Moolenaar
91071d4279SBram Moolenaar" Keywords defined by plain.mf (defined on pp.262-278)
92*2ec618c9SBram Moolenaarif get(g:, "plain_mf_macros", 1)
93*2ec618c9SBram Moolenaar  syn keyword mfDef          addto_currentpicture beginchar capsule_def
94*2ec618c9SBram Moolenaar  syn keyword mfDef          change_width clear_pen_memory clearit clearpen
95*2ec618c9SBram Moolenaar  syn keyword mfDef          clearxy culldraw cullit cutdraw
96*2ec618c9SBram Moolenaar  syn keyword mfDef          define_blacker_pixels define_corrected_pixels
97*2ec618c9SBram Moolenaar  syn keyword mfDef          define_good_x_pixels define_good_y_pixels
98*2ec618c9SBram Moolenaar  syn keyword mfDef          define_horizontal_corrected_pixels define_pixels
99*2ec618c9SBram Moolenaar  syn keyword mfDef          define_whole_blacker_pixels define_whole_pixels
100*2ec618c9SBram Moolenaar  syn keyword mfDef          define_whole_vertical_blacker_pixels
101*2ec618c9SBram Moolenaar  syn keyword mfDef          define_whole_vertical_pixels downto draw drawdot
102*2ec618c9SBram Moolenaar  syn keyword mfDef          endchar erase exitunless fill filldraw fix_units
103*2ec618c9SBram Moolenaar  syn keyword mfDef          flex font_coding_scheme font_extra_space
104*2ec618c9SBram Moolenaar  syn keyword mfDef          font_identifier font_normal_shrink
105*2ec618c9SBram Moolenaar  syn keyword mfDef          font_normal_space font_normal_stretch font_quad
106*2ec618c9SBram Moolenaar  syn keyword mfDef          font_size font_slant font_x_height gfcorners gobble
107*2ec618c9SBram Moolenaar  syn keyword mfDef          hide imagerules interact italcorr killtext
108*2ec618c9SBram Moolenaar  syn keyword mfDef          loggingall lowres_fix makebox makegrid maketicks
109*2ec618c9SBram Moolenaar  syn keyword mfDef          mode_def mode_setup nodisplays notransforms numtok
110*2ec618c9SBram Moolenaar  syn keyword mfDef          openit penrazor pensquare penstroke pickup
111*2ec618c9SBram Moolenaar  syn keyword mfDef          proofoffset proofrule range reflectedabout
112*2ec618c9SBram Moolenaar  syn keyword mfDef          rotatedaround screenchars screenrule screenstrokes
113*2ec618c9SBram Moolenaar  syn keyword mfDef          shipit showit smode stop superellipse takepower
114*2ec618c9SBram Moolenaar  syn keyword mfDef          tracingall tracingnone undraw undrawdot unfill
115*2ec618c9SBram Moolenaar  syn keyword mfDef          unfilldraw upto z
116*2ec618c9SBram Moolenaar  syn match   mfDef          "???"
117*2ec618c9SBram Moolenaar  syn keyword mfVardef       bot byte ceiling counterclockwise cutoff decr dir
118*2ec618c9SBram Moolenaar  syn keyword mfVardef       direction directionpoint grayfont hround incr
119*2ec618c9SBram Moolenaar  syn keyword mfVardef       interpath inverse labelfont labels lft magstep
120*2ec618c9SBram Moolenaar  " Note: nodot is not a vardef, it is used as in makelabel.lft.nodot("5",z5)
121*2ec618c9SBram Moolenaar  " (METAFONT only)
122*2ec618c9SBram Moolenaar  syn keyword mfVardef       makelabel max min nodot penlabels penpos
123*2ec618c9SBram Moolenaar  syn keyword mfVardef       proofrulethickness round rt savepen slantfont solve
124*2ec618c9SBram Moolenaar  syn keyword mfVardef       tensepath titlefont top unitvector vround whatever
125*2ec618c9SBram Moolenaar  syn match   mpVardef       "\<good\.\%(x\|y\|lft\|rt\|top\|bot\)\>"
126*2ec618c9SBram Moolenaar  syn keyword mfPrimaryDef   div dotprod gobbled mod
127*2ec618c9SBram Moolenaar  syn keyword mfSecondaryDef intersectionpoint
128*2ec618c9SBram Moolenaar  syn keyword mfTertiaryDef  softjoin thru
129*2ec618c9SBram Moolenaar  syn keyword mfNewInternal  blacker currentwindow displaying eps epsilon
130*2ec618c9SBram Moolenaar  syn keyword mfNewInternal  infinity join_radius number_of_modes o_correction
131*2ec618c9SBram Moolenaar  syn keyword mfNewInternal  pen_bot pen_lft pen_rt pen_top pixels_per_inch
132*2ec618c9SBram Moolenaar  syn keyword mfNewInternal  screen_cols screen_rows tolerance
133*2ec618c9SBram Moolenaar  " Predefined constants
134*2ec618c9SBram Moolenaar  syn keyword mfConstant     base_name base_version blankpicture ditto down
135*2ec618c9SBram Moolenaar  syn keyword mfConstant     fullcircle halfcircle identity left lowres origin
136*2ec618c9SBram Moolenaar  syn keyword mfConstant     penspeck proof quartercircle right rulepen smoke
137*2ec618c9SBram Moolenaar  syn keyword mfConstant     unitpixel unitsquare up
138*2ec618c9SBram Moolenaar  " Other predefined variables
139*2ec618c9SBram Moolenaar  syn keyword mfVariable     aspect_ratio currentpen extra_beginchar
140*2ec618c9SBram Moolenaar  syn keyword mfVariable     extra_endchar currentpen_path currentpicture
141*2ec618c9SBram Moolenaar  syn keyword mfVariable     currenttransform d extra_setup h localfont mag mode
142*2ec618c9SBram Moolenaar  syn keyword mfVariable     mode_name w
143*2ec618c9SBram Moolenaar  " let statements:
144*2ec618c9SBram Moolenaar  syn keyword mfnumExp       abs
145*2ec618c9SBram Moolenaar  syn keyword mfPairExp      rotatedabout
146*2ec618c9SBram Moolenaar  syn keyword mfCommand      bye relax
147071d4279SBram Moolenaarendif
148*2ec618c9SBram Moolenaar
149*2ec618c9SBram Moolenaar" By default, METAFONT loads modes.mf, too
150*2ec618c9SBram Moolenaarif get(g:, "plain_mf_modes", 1)
151*2ec618c9SBram Moolenaar  syn keyword mfConstant     APSSixMed AgfaFourZeroZero AgfaThreeFourZeroZero
152*2ec618c9SBram Moolenaar  syn keyword mfConstant     AtariNineFive AtariNineSix AtariSLMEightZeroFour
153*2ec618c9SBram Moolenaar  syn keyword mfConstant     AtariSMOneTwoFour CItohEightFiveOneZero
154*2ec618c9SBram Moolenaar  syn keyword mfConstant     CItohThreeOneZero CanonBJCSixZeroZero CanonCX
155*2ec618c9SBram Moolenaar  syn keyword mfConstant     CanonEX CanonLBPLX CanonLBPTen CanonSX ChelgraphIBX
156*2ec618c9SBram Moolenaar  syn keyword mfConstant     CompugraphicEightSixZeroZero
157*2ec618c9SBram Moolenaar  syn keyword mfConstant     CompugraphicNineSixZeroZero DD DEClarge DECsmall
158*2ec618c9SBram Moolenaar  syn keyword mfConstant     DataDiscNew EightThree EpsonAction
159*2ec618c9SBram Moolenaar  syn keyword mfConstant     EpsonLQFiveZeroZeroLo EpsonLQFiveZeroZeroMed
160*2ec618c9SBram Moolenaar  syn keyword mfConstant     EpsonMXFX EpsonSQEightSevenZero EpsonStylusPro
161*2ec618c9SBram Moolenaar  syn keyword mfConstant     EpsonStylusProHigh EpsonStylusProLow
162*2ec618c9SBram Moolenaar  syn keyword mfConstant     EpsonStylusProMed FourFour GThreefax HPDeskJet
163*2ec618c9SBram Moolenaar  syn keyword mfConstant     HPLaserJetIIISi IBMFourTwoFiveZero IBMFourTwoOneSix
164*2ec618c9SBram Moolenaar  syn keyword mfConstant     IBMFourTwoThreeZero IBMFourZeroOneNine
165*2ec618c9SBram Moolenaar  syn keyword mfConstant     IBMFourZeroThreeNine IBMFourZeroTwoNine
166*2ec618c9SBram Moolenaar  syn keyword mfConstant     IBMProPrinter IBMSixOneFiveFour IBMSixSixSevenZero
167*2ec618c9SBram Moolenaar  syn keyword mfConstant     IBMThreeEightOneTwo IBMThreeEightTwoZero
168*2ec618c9SBram Moolenaar  syn keyword mfConstant     IBMThreeOneNineThree IBMThreeOneSevenNine
169*2ec618c9SBram Moolenaar  syn keyword mfConstant     IBMUlfHolleberg LASevenFive LNOthreR LNOthree
170*2ec618c9SBram Moolenaar  syn keyword mfConstant     LNZeroOne LNZeroThree LPSFourZero LPSTwoZero
171*2ec618c9SBram Moolenaar  syn keyword mfConstant     LexmarkFourZeroThreeNine LexmarkOptraR
172*2ec618c9SBram Moolenaar  syn keyword mfConstant     LexmarkOptraS LinotypeLThreeThreeZero
173*2ec618c9SBram Moolenaar  syn keyword mfConstant     LinotypeOneZeroZero LinotypeOneZeroZeroLo
174*2ec618c9SBram Moolenaar  syn keyword mfConstant     LinotypeThreeZeroZeroHi MacTrueSize NeXTprinter
175*2ec618c9SBram Moolenaar  syn keyword mfConstant     NeXTscreen NecTwoZeroOne Newgen NineOne
176*2ec618c9SBram Moolenaar  syn keyword mfConstant     OCESixSevenFiveZeroPS OneTwoZero OneZeroZero
177*2ec618c9SBram Moolenaar  syn keyword mfConstant     PrintwareSevenTwoZeroIQ Prism QMSOneSevenTwoFive
178*2ec618c9SBram Moolenaar  syn keyword mfConstant     QMSOneSevenZeroZero QMSTwoFourTwoFive RicohA
179*2ec618c9SBram Moolenaar  syn keyword mfConstant     RicohFortyEighty RicohFourZeroEightZero RicohLP
180*2ec618c9SBram Moolenaar  syn keyword mfConstant     SparcPrinter StarNLOneZero VAXstation VTSix
181*2ec618c9SBram Moolenaar  syn keyword mfConstant     VarityperFiveZeroSixZeroW
182*2ec618c9SBram Moolenaar  syn keyword mfConstant     VarityperFourThreeZeroZeroHi
183*2ec618c9SBram Moolenaar  syn keyword mfConstant     VarityperFourThreeZeroZeroLo
184*2ec618c9SBram Moolenaar  syn keyword mfConstant     VarityperFourTwoZeroZero VarityperSixZeroZero
185*2ec618c9SBram Moolenaar  syn keyword mfConstant     XeroxDocutech XeroxEightSevenNineZero
186*2ec618c9SBram Moolenaar  syn keyword mfConstant     XeroxFourZeroFiveZero XeroxNineSevenZeroZero
187*2ec618c9SBram Moolenaar  syn keyword mfConstant     XeroxPhaserSixTwoZeroZeroDP XeroxThreeSevenZeroZero
188*2ec618c9SBram Moolenaar  syn keyword mfConstant     Xerox_world agfafzz agfatfzz amiga aps apssixhi
189*2ec618c9SBram Moolenaar  syn keyword mfConstant     aselect atariezf atarinf atarins atariotf bitgraph
190*2ec618c9SBram Moolenaar  syn keyword mfConstant     bjtenex bjtzzex bjtzzl bjtzzs boise canonbjc
191*2ec618c9SBram Moolenaar  syn keyword mfConstant     canonex canonlbp cg cgl cgnszz citohtoz corona crs
192*2ec618c9SBram Moolenaar  syn keyword mfConstant     cthreeten cx datadisc declarge decsmall deskjet
193*2ec618c9SBram Moolenaar  syn keyword mfConstant     docutech dover dp dpdfezzz eighthre elvira epscszz
194*2ec618c9SBram Moolenaar  syn keyword mfConstant     epsdraft epsdrft epsdrftl epsfast epsfastl epshi
195*2ec618c9SBram Moolenaar  syn keyword mfConstant     epslo epsmed epsmedl epson epsonact epsonfx epsonl
196*2ec618c9SBram Moolenaar  syn keyword mfConstant     epsonlo epsonlol epsonlq epsonsq epstylus epstylwr
197*2ec618c9SBram Moolenaar  syn keyword mfConstant     epstyplo epstypmd epstypml epstypro epswlo epswlol
198*2ec618c9SBram Moolenaar  syn keyword mfConstant     esphi fourfour gpx gtfax gtfaxhi gtfaxl gtfaxlo
199*2ec618c9SBram Moolenaar  syn keyword mfConstant     gtfaxlol help hifax highfax hplaser hprugged ibm_a
200*2ec618c9SBram Moolenaar  syn keyword mfConstant     ibmd ibmega ibmegal ibmfzon ibmfztn ibmpp ibmppl
201*2ec618c9SBram Moolenaar  syn keyword mfConstant     ibmsoff ibmteot ibmtetz ibmtont ibmtosn ibmtosnl
202*2ec618c9SBram Moolenaar  syn keyword mfConstant     ibmvga ibx imagen imagewriter itoh itohl itohtoz
203*2ec618c9SBram Moolenaar  syn keyword mfConstant     itohtozl iw jetiiisi kyocera laserjet laserjetfive
204*2ec618c9SBram Moolenaar  syn keyword mfConstant     laserjetfivemp laserjetfour laserjetfourthousand
205*2ec618c9SBram Moolenaar  syn keyword mfConstant     laserjetfourzerozerozero laserjethi laserjetlo
206*2ec618c9SBram Moolenaar  syn keyword mfConstant     laserjettwoonezerozero
207*2ec618c9SBram Moolenaar  syn keyword mfConstant     laserjettwoonezerozerofastres lasermaster
208*2ec618c9SBram Moolenaar  syn keyword mfConstant     laserwriter lasf lexmarkr lexmarks lexmarku
209*2ec618c9SBram Moolenaar  syn keyword mfConstant     linohalf linohi linolo linolttz linoone linosuper
210*2ec618c9SBram Moolenaar  syn keyword mfConstant     linothree linothreelo linotzzh ljfive ljfivemp
211*2ec618c9SBram Moolenaar  syn keyword mfConstant     ljfour ljfzzz ljfzzzfr ljlo ljtozz ljtozzfr lmaster
212*2ec618c9SBram Moolenaar  syn keyword mfConstant     lnotr lnzo lps lpstz lqhires lqlores lqmed lqmedl
213*2ec618c9SBram Moolenaar  syn keyword mfConstant     lqmedres lview lviewl lwpro macmag mactrue modes_mf
214*2ec618c9SBram Moolenaar  syn keyword mfConstant     ncd nec nechi neclm nectzo newdd newddl nexthi
215*2ec618c9SBram Moolenaar  syn keyword mfConstant     nextscreen nextscrn nineone nullmode ocessfz
216*2ec618c9SBram Moolenaar  syn keyword mfConstant     okidata okidatal okifourten okifte okihi onetz
217*2ec618c9SBram Moolenaar  syn keyword mfConstant     onezz pcprevw pcscreen phaser phaserfs phasertf
218*2ec618c9SBram Moolenaar  syn keyword mfConstant     phasertfl phasertl pixpt printware prntware
219*2ec618c9SBram Moolenaar  syn keyword mfConstant     proprinter qms qmsesz qmsostf qmsoszz qmstftf ricoh
220*2ec618c9SBram Moolenaar  syn keyword mfConstant     ricoha ricohlp ricohsp sherpa sparcptr starnlt
221*2ec618c9SBram Moolenaar  syn keyword mfConstant     starnltl styletwo stylewr stylewri stylewriter sun
222*2ec618c9SBram Moolenaar  syn keyword mfConstant     supre swtwo toshiba ultre varityper vs vtftzz
223*2ec618c9SBram Moolenaar  syn keyword mfConstant     vtftzzhi vtftzzlo vtfzszw vtszz xpstzz xpstzzl
224*2ec618c9SBram Moolenaar  syn keyword mfConstant     xrxesnz xrxfzfz xrxnszz xrxtszz
225*2ec618c9SBram Moolenaar  syn keyword mfDef          BCPL_string coding_scheme font_face_byte
226*2ec618c9SBram Moolenaar  syn keyword mfDef          font_family landscape
227*2ec618c9SBram Moolenaar  syn keyword mfDef          mode_extra_info mode_help mode_param
228*2ec618c9SBram Moolenaar  syn keyword mfNewInternal  blacker_min
229071d4279SBram Moolenaarendif
230071d4279SBram Moolenaar
231071d4279SBram Moolenaar" Some other basic macro names, e.g., from cmbase, logo, etc.
232*2ec618c9SBram Moolenaarif get(g:, "other_mf_macros", 1)
233*2ec618c9SBram Moolenaar  syn keyword mfDef          beginlogochar
234*2ec618c9SBram Moolenaar  syn keyword mfDef          font_setup
235*2ec618c9SBram Moolenaar  syn keyword mfPrimitive    generate
236071d4279SBram Moolenaarendif
237071d4279SBram Moolenaar
238071d4279SBram Moolenaar" Numeric tokens
239071d4279SBram Moolenaarsyn match     mfNumeric      "[-]\=\d\+"
240071d4279SBram Moolenaarsyn match     mfNumeric      "[-]\=\.\d\+"
241071d4279SBram Moolenaarsyn match     mfNumeric      "[-]\=\d\+\.\d\+"
242071d4279SBram Moolenaar
243*2ec618c9SBram Moolenaar" METAFONT lengths
244071d4279SBram Moolenaarsyn match     mfLength       "\<\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\>"
245*2ec618c9SBram Moolenaarsyn match     mfLength       "[-]\=\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\="
246*2ec618c9SBram Moolenaarsyn match     mfLength       "[-]\=\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\="
247*2ec618c9SBram Moolenaarsyn match     mfLength       "[-]\=\d\+\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\="
248071d4279SBram Moolenaar
249071d4279SBram Moolenaar" String constants
250*2ec618c9SBram Moolenaarsyn match     mfOpenString   /"[^"]*/
251*2ec618c9SBram Moolenaarsyn region    mfString       oneline keepend start=+"+ end=+"+
252071d4279SBram Moolenaar
253071d4279SBram Moolenaar" Comments:
254*2ec618c9SBram Moolenaarsyn keyword   mfTodoComment  contained TODO FIXME XXX DEBUG NOTE
255*2ec618c9SBram Moolenaarsyn match     mfComment      "%.*$" contains=mfTodoComment,@Spell
256071d4279SBram Moolenaar
257071d4279SBram Moolenaar" synchronizing
258071d4279SBram Moolenaarsyn sync maxlines=50
259071d4279SBram Moolenaar
260071d4279SBram Moolenaar" Define the default highlighting
261f37506f6SBram Moolenaarhi def link mfBoolExp      Statement
262f37506f6SBram Moolenaarhi def link mfNumExp       Statement
263f37506f6SBram Moolenaarhi def link mfPairExp      Statement
264f37506f6SBram Moolenaarhi def link mfPathExp      Statement
265f37506f6SBram Moolenaarhi def link mfPenExp       Statement
266f37506f6SBram Moolenaarhi def link mfPicExp       Statement
267f37506f6SBram Moolenaarhi def link mfStringExp    Statement
268*2ec618c9SBram Moolenaarhi def link mfInternal     Identifier
269f37506f6SBram Moolenaarhi def link mfCommand      Statement
270f37506f6SBram Moolenaarhi def link mfType         Type
271f37506f6SBram Moolenaarhi def link mfStatement    Statement
272f37506f6SBram Moolenaarhi def link mfDefinition   Statement
273f37506f6SBram Moolenaarhi def link mfCondition    Conditional
274f37506f6SBram Moolenaarhi def link mfPrimitive    Statement
275*2ec618c9SBram Moolenaarhi def link mfDef          Function
276*2ec618c9SBram Moolenaarhi def link mfVardef       mfDef
277*2ec618c9SBram Moolenaarhi def link mfPrimaryDef   mfDef
278*2ec618c9SBram Moolenaarhi def link mfSecondaryDef mfDef
279*2ec618c9SBram Moolenaarhi def link mfTertiaryDef  mfDef
280f37506f6SBram Moolenaarhi def link mfCoord        Identifier
281f37506f6SBram Moolenaarhi def link mfPoint        Identifier
282f37506f6SBram Moolenaarhi def link mfNumeric      Number
283f37506f6SBram Moolenaarhi def link mfLength       Number
284f37506f6SBram Moolenaarhi def link mfComment      Comment
285f37506f6SBram Moolenaarhi def link mfString       String
286*2ec618c9SBram Moolenaarhi def link mfOpenString   Todo
287*2ec618c9SBram Moolenaarhi def link mfSuffixParam  Label
288*2ec618c9SBram Moolenaarhi def link mfNewInternal  mfInternal
289*2ec618c9SBram Moolenaarhi def link mfVariable     Identifier
290*2ec618c9SBram Moolenaarhi def link mfConstant     Constant
291*2ec618c9SBram Moolenaarhi def link mfTodoComment  Todo
292071d4279SBram Moolenaar
293071d4279SBram Moolenaarlet b:current_syntax = "mf"
294071d4279SBram Moolenaar
295*2ec618c9SBram Moolenaar" vim:sw=2
296