diff options
Diffstat (limited to 'tex/context/base/buff-imp-mp.lua')
-rw-r--r-- | tex/context/base/buff-imp-mp.lua | 101 |
1 files changed, 12 insertions, 89 deletions
diff --git a/tex/context/base/buff-imp-mp.lua b/tex/context/base/buff-imp-mp.lua index 6b8a26536..24ca597e7 100644 --- a/tex/context/base/buff-imp-mp.lua +++ b/tex/context/base/buff-imp-mp.lua @@ -6,98 +6,21 @@ if not modules then modules = { } end modules ['buff-imp-mp'] = { license = "see context related readme files" } +-- Now that we also use lpeg lexers in scite, we can share the keywords +-- so we have moved the keyword lists to mult-mps.lua. Don't confuse the +-- scite lexers with the ones we use here. Of course all those lexers +-- boil down to doing similar things, but here we need more control over +-- the rendering and have a different way of nesting. It is no coincidence +-- that the coloring looks similar: both are derived from earlier lexing (in +-- texedit, mkii and the c++ scite lexer). + local P, S, V, patterns = lpeg.P, lpeg.S, lpeg.V, lpeg.patterns -local primitives = table.tohash { - 'charcode', 'day', 'linecap', 'linejoin', 'miterlimit', 'month', 'pausing', - 'prologues', 'showstopping', 'time', 'tracingcapsules', 'tracingchoices', - 'tracingcommands', 'tracingequations', 'tracinglostchars', - 'tracingmacros', 'tracingonline', 'tracingoutput', 'tracingrestores', - 'tracingspecs', 'tracingstats', 'tracingtitles', 'truecorners', - 'warningcheck', 'year', 'mpprocset', - 'false', 'nullpicture', 'pencircle', 'true', - 'and', 'angle', 'arclength', 'arctime', 'ASCII', 'bluepart', 'boolean', 'bot', - 'char', 'color', 'cosd', 'cycle', 'decimal', 'directiontime', 'floor', 'fontsize', - 'greenpart', 'hex', 'infont', 'intersectiontimes', 'known', 'length', 'llcorner', - 'lrcorner', 'makepath', 'makepen', 'mexp', 'mlog', 'normaldeviate', 'not', - 'numeric', 'oct', 'odd', 'or', 'path', 'pair', 'pen', 'penoffset', 'picture', 'point', - 'postcontrol', 'precontrol', 'redpart', 'reverse', 'rotated', 'scaled', - 'shifted', 'sind', 'slanted', 'sqrt', 'str', 'string', 'subpath', 'substring', - 'transform', 'transformed', 'ulcorner', 'uniformdeviate', 'unknown', - 'urcorner', 'xpart', 'xscaled', 'xxpart', 'xypart', 'ypart', 'yscaled', 'yxpart', - 'yypart', 'zscaled', - 'addto', 'clip', 'input', 'interim', 'let', 'newinternal', 'save', 'setbounds', - 'shipout', 'show', 'showdependencies', 'showtoken', 'showvariable', - 'special', - 'begingroup', 'endgroup', 'of', 'curl', 'tension', 'and', 'controls', - 'reflectedabout', 'rotatedaround', 'interpath', 'on', 'off', 'beginfig', - 'endfig', 'def', 'vardef', 'enddef', 'epxr', 'suffix', 'text', 'primary', 'secondary', - 'tertiary', 'primarydef', 'secondarydef', 'tertiarydef', 'top', 'bottom', - 'ulft', 'urt', 'llft', 'lrt', 'randomseed', 'also', 'contour', 'doublepath', - 'withcolor', 'withpen', 'dashed', 'if', 'else', 'elseif', 'fi', 'for', 'endfor', 'forever', 'exitif', - 'forsuffixes', 'downto', 'upto', 'step', 'until', - 'charlist', 'extensible', 'fontdimen', 'headerbyte', 'kern', 'ligtable', - 'boundarychar', 'chardp', 'charext', 'charht', 'charic', 'charwd', 'designsize', - 'fontmaking', 'charexists', - 'cullit', 'currenttransform', 'gfcorners', 'grayfont', 'hround', - 'imagerules', 'lowres_fix', 'nodisplays', 'notransforms', 'openit', - 'displaying', 'currentwindow', 'screen_rows', 'screen_cols', - 'pixels_per_inch', 'cull', 'display', 'openwindow', 'numspecial', - 'totalweight', 'autorounding', 'fillin', 'proofing', 'tracingpens', - 'xoffset', 'chardx', 'granularity', 'smoothing', 'turningcheck', 'yoffset', - 'chardy', 'hppp', 'tracingedges', 'vppp', - 'extra_beginfig', 'extra_endfig', 'mpxbreak', - 'end', 'btex', 'etex', 'verbatimtex' -} +local mps = dofile(resolvers.findfile("mult-mps.lua","tex")) -local plain = table.tohash { - 'ahangle', 'ahlength', 'bboxmargin', 'defaultpen', 'defaultscale', - 'labeloffset', 'background', 'currentpen', 'currentpicture', 'cuttings', - 'defaultfont', 'extra_beginfig', 'extra_endfig', - 'beveled', 'black', 'blue', 'bp', 'butt', 'cc', 'cm', 'dd', 'ditto', 'down', 'epsilon', - 'evenly', 'fullcircle', 'green', 'halfcircle', 'identity', 'in', 'infinity', 'left', - 'mitered', 'mm', 'origin', 'pensquare', 'pt', 'quartercircle', 'red', 'right', - 'rounded', 'squared', 'unitsquare', 'up', 'white', 'withdots', - 'abs', 'bbox', 'ceiling', 'center', 'cutafter', 'cutbefore', 'dir', - 'directionpoint', 'div', 'dotprod', 'intersectionpoint', 'inverse', 'mod', 'lft', - 'round', 'rt', 'unitvector', 'whatever', - 'cutdraw', 'draw', 'drawarrow', 'drawdblarrow', 'fill', 'filldraw', 'drawdot', - 'loggingall', 'pickup', 'tracingall', 'tracingnone', 'undraw', 'unfill', - 'unfilldraw', - 'buildcycle', 'dashpattern', 'decr', 'dotlabel', 'dotlabels', 'drawoptions', - 'incr', 'label', 'labels', 'max', 'min', 'thelabel', 'z', - 'beginchar', 'blacker', 'capsule_end', 'change_width', - 'define_blacker_pixels', 'define_corrected_pixels', - 'define_good_x_pixels', 'define_good_y_pixels', - 'define_horizontal_corrected_pixels', 'define_pixels', - 'define_whole_blacker_pixels', 'define_whole_pixels', - 'define_whole_vertical_blacker_pixels', - 'define_whole_vertical_pixels', 'endchar', 'extra_beginchar', - 'extra_endchar', 'extra_setup', 'font_coding_scheme', - 'font_extra_space' -} - -local metafun = table.tohash { - 'unitcircle', 'fulldiamond', 'unitdiamond', - 'halfcircle', 'quartercircle', - 'llcircle', 'lrcircle', 'urcircle', 'ulcircle', - 'tcircle', 'bcircle', 'lcircle', 'rcircle', - 'lltriangle', 'lrtriangle', 'urtriangle', 'ultriangle', - 'smoothed', 'cornered', 'superellipsed', 'randomized', 'squeezed', - 'punked', 'curved', 'unspiked', 'simplified', 'blownup', 'stretched', - 'paralled', 'enlonged', 'shortened', - 'enlarged', 'leftenlarged', 'topenlarged', 'rightenlarged', 'bottomenlarged', - 'llenlarged', 'lrenlarged', 'urenlarged', 'ulenlarged', - 'llmoved', 'lrmoved', 'urmoved', 'ulmoved', - 'boundingbox', 'innerboundingbox', 'outerboundingbox', - 'bottomboundary', 'leftboundary', 'topboundary', 'rightboundary', - 'xsized', 'ysized', 'xysized', - 'cmyk', 'transparent', 'withshade', 'spotcolor', - 'drawfill', 'undrawfill', - 'inverted', 'uncolored', 'softened', 'grayed', - 'textext', 'graphictext', - 'loadfigure', 'externalfigure' -} +local primitives = table.tohash(mps.primitives) +local plain = table.tohash(mps.plain) +local metafun = table.tohash(mps.metafun) local context = context local verbatim = context.verbatim |