1 " Interactive Data Language syntax file (IDL, too [:-)]
2 " Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com>
3 " Last change: 2003 Apr 25
4 " Created by: Hermann Rochholz <Hermann.Rochholz AT gmx.de>
6 " Remove any old syntax stuff hanging around
7 " For version 5.x: Clear all syntax items
8 " For version 6.x: Quit when a syntax file was already loaded
11 elseif exists("b:current_syntax")
17 syn match idlangStatement "^\s*pro\s"
18 syn match idlangStatement "^\s*function\s"
19 syn keyword idlangStatement return continue mod do break
20 syn keyword idlangStatement compile_opt forward_function goto
21 syn keyword idlangStatement begin common end of
22 syn keyword idlangStatement inherits on_ioerror begin
24 syn keyword idlangConditional if else then for while case switch
25 syn keyword idlangConditional endcase endelse endfor endswitch
26 syn keyword idlangConditional endif endrep endwhile repeat until
28 syn match idlangOperator "\ and\ "
29 syn match idlangOperator "\ eq\ "
30 syn match idlangOperator "\ ge\ "
31 syn match idlangOperator "\ gt\ "
32 syn match idlangOperator "\ le\ "
33 syn match idlangOperator "\ lt\ "
34 syn match idlangOperator "\ ne\ "
35 syn match idlangOperator /\(\ \|(\)not\ /hs=e-3
36 syn match idlangOperator "\ or\ "
37 syn match idlangOperator "\ xor\ "
39 syn keyword idlangStop stop pause
41 syn match idlangStrucvar "\h\w*\(\.\h\w*\)\+"
42 syn match idlangStrucvar "[),\]]\(\.\h\w*\)\+"hs=s+1
44 syn match idlangSystem "\!\a\w*\(\.\w*\)\="
46 syn match idlangKeyword "\([(,]\s*\(\$\_s*\)\=\)\@<=/\h\w*"
47 syn match idlangKeyword "\([(,]\s*\(\$\_s*\)\=\)\@<=\h\w*\s*="
49 syn keyword idlangTodo contained TODO
51 syn region idlangString start=+"+ end=+"+
52 syn region idlangString start=+'+ end=+'+
54 syn match idlangPreCondit "^\s*@\w*\(\.\a\{3}\)\="
56 syn match idlangRealNumber "\<\d\+\(\.\=\d*e[+-]\=\d\+\|\.\d*d\|\.\d*\|d\)"
57 syn match idlangRealNumber "\.\d\+\(d\|e[+-]\=\d\+\)\="
59 syn match idlangNumber "\<\.\@!\d\+\.\@!\(b\|u\|us\|s\|l\|ul\|ll\|ull\)\=\>"
61 syn match idlangComment "[\;].*$" contains=idlangTodo
63 syn match idlangContinueLine "\$\s*\($\|;\)"he=s+1 contains=idlangComment
64 syn match idlangContinueLine "&\s*\(\h\|;\)"he=s+1 contains=ALL
66 syn match idlangDblCommaError "\,\s*\,"
68 " List of standard routines as of IDL version 5.4.
69 syn match idlangRoutine "EOS_\a*"
70 syn match idlangRoutine "HDF_\a*"
71 syn match idlangRoutine "CDF_\a*"
72 syn match idlangRoutine "NCDF_\a*"
73 syn match idlangRoutine "QUERY_\a*"
74 syn match idlangRoutine "\<MAX\s*("he=e-1
75 syn match idlangRoutine "\<MIN\s*("he=e-1
77 syn keyword idlangRoutine A_CORRELATE ABS ACOS ADAPT_HIST_EQUAL ALOG ALOG10
78 syn keyword idlangRoutine AMOEBA ANNOTATE ARG_PRESENT ARRAY_EQUAL ARROW
79 syn keyword idlangRoutine ASCII_TEMPLATE ASIN ASSOC ATAN AXIS BAR_PLOT
80 syn keyword idlangRoutine BESELI BESELJ BESELK BESELY BETA BILINEAR BIN_DATE
81 syn keyword idlangRoutine BINARY_TEMPLATE BINDGEN BINOMIAL BLAS_AXPY BLK_CON
82 syn keyword idlangRoutine BOX_CURSOR BREAK BREAKPOINT BROYDEN BYTARR BYTE
83 syn keyword idlangRoutine BYTEORDER BYTSCL C_CORRELATE CALDAT CALENDAR
84 syn keyword idlangRoutine CALL_EXTERNAL CALL_FUNCTION CALL_METHOD
85 syn keyword idlangRoutine CALL_PROCEDURE CATCH CD CEIL CHEBYSHEV CHECK_MATH
86 syn keyword idlangRoutine CHISQR_CVF CHISQR_PDF CHOLDC CHOLSOL CINDGEN
87 syn keyword idlangRoutine CIR_3PNT CLOSE CLUST_WTS CLUSTER COLOR_CONVERT
88 syn keyword idlangRoutine COLOR_QUAN COLORMAP_APPLICABLE COMFIT COMMON
89 syn keyword idlangRoutine COMPLEX COMPLEXARR COMPLEXROUND
90 syn keyword idlangRoutine COMPUTE_MESH_NORMALS COND CONGRID CONJ
91 syn keyword idlangRoutine CONSTRAINED_MIN CONTOUR CONVERT_COORD CONVOL
92 syn keyword idlangRoutine COORD2TO3 CORRELATE COS COSH CRAMER CREATE_STRUCT
93 syn keyword idlangRoutine CREATE_VIEW CROSSP CRVLENGTH CT_LUMINANCE CTI_TEST
94 syn keyword idlangRoutine CURSOR CURVEFIT CV_COORD CVTTOBM CW_ANIMATE
95 syn keyword idlangRoutine CW_ANIMATE_GETP CW_ANIMATE_LOAD CW_ANIMATE_RUN
96 syn keyword idlangRoutine CW_ARCBALL CW_BGROUP CW_CLR_INDEX CW_COLORSEL
97 syn keyword idlangRoutine CW_DEFROI CW_FIELD CW_FILESEL CW_FORM CW_FSLIDER
98 syn keyword idlangRoutine CW_LIGHT_EDITOR CW_LIGHT_EDITOR_GET
99 syn keyword idlangRoutine CW_LIGHT_EDITOR_SET CW_ORIENT CW_PALETTE_EDITOR
100 syn keyword idlangRoutine CW_PALETTE_EDITOR_GET CW_PALETTE_EDITOR_SET
101 syn keyword idlangRoutine CW_PDMENU CW_RGBSLIDER CW_TMPL CW_ZOOM DBLARR
102 syn keyword idlangRoutine DCINDGEN DCOMPLEX DCOMPLEXARR DEFINE_KEY DEFROI
103 syn keyword idlangRoutine DEFSYSV DELETE_SYMBOL DELLOG DELVAR DERIV DERIVSIG
104 syn keyword idlangRoutine DETERM DEVICE DFPMIN DIALOG_MESSAGE
105 syn keyword idlangRoutine DIALOG_PICKFILE DIALOG_PRINTERSETUP
106 syn keyword idlangRoutine DIALOG_PRINTJOB DIALOG_READ_IMAGE
107 syn keyword idlangRoutine DIALOG_WRITE_IMAGE DIGITAL_FILTER DILATE DINDGEN
108 syn keyword idlangRoutine DISSOLVE DIST DLM_LOAD DLM_REGISTER
109 syn keyword idlangRoutine DO_APPLE_SCRIPT DOC_LIBRARY DOUBLE DRAW_ROI EFONT
110 syn keyword idlangRoutine EIGENQL EIGENVEC ELMHES EMPTY ENABLE_SYSRTN EOF
111 syn keyword idlangRoutine ERASE ERODE ERRORF ERRPLOT EXECUTE EXIT EXP EXPAND
112 syn keyword idlangRoutine EXPAND_PATH EXPINT EXTRAC EXTRACT_SLICE F_CVF
113 syn keyword idlangRoutine F_PDF FACTORIAL FFT FILE_CHMOD FILE_DELETE
114 syn keyword idlangRoutine FILE_EXPAND_PATH FILE_MKDIR FILE_TEST FILE_WHICH
115 syn keyword idlangRoutine FILEPATH FINDFILE FINDGEN FINITE FIX FLICK FLOAT
116 syn keyword idlangRoutine FLOOR FLOW3 FLTARR FLUSH FOR FORMAT_AXIS_VALUES
117 syn keyword idlangRoutine FORWARD_FUNCTION FREE_LUN FSTAT FULSTR FUNCT
118 syn keyword idlangRoutine FV_TEST FX_ROOT FZ_ROOTS GAMMA GAMMA_CT
119 syn keyword idlangRoutine GAUSS_CVF GAUSS_PDF GAUSS2DFIT GAUSSFIT GAUSSINT
120 syn keyword idlangRoutine GET_DRIVE_LIST GET_KBRD GET_LUN GET_SCREEN_SIZE
121 syn keyword idlangRoutine GET_SYMBOL GETENV GOTO GRID_TPS GRID3 GS_ITER
122 syn keyword idlangRoutine H_EQ_CT H_EQ_INT HANNING HEAP_GC HELP HILBERT
123 syn keyword idlangRoutine HIST_2D HIST_EQUAL HISTOGRAM HLS HOUGH HQR HSV
124 syn keyword idlangRoutine IBETA IDENTITY IDL_Container IDLanROI
125 syn keyword idlangRoutine IDLanROIGroup IDLffDICOM IDLffDXF IDLffLanguageCat
126 syn keyword idlangRoutine IDLffShape IDLgrAxis IDLgrBuffer IDLgrClipboard
127 syn keyword idlangRoutine IDLgrColorbar IDLgrContour IDLgrFont IDLgrImage
128 syn keyword idlangRoutine IDLgrLegend IDLgrLight IDLgrModel IDLgrMPEG
129 syn keyword idlangRoutine IDLgrPalette IDLgrPattern IDLgrPlot IDLgrPolygon
130 syn keyword idlangRoutine IDLgrPolyline IDLgrPrinter IDLgrROI IDLgrROIGroup
131 syn keyword idlangRoutine IDLgrScene IDLgrSurface IDLgrSymbol
132 syn keyword idlangRoutine IDLgrTessellator IDLgrText IDLgrView
133 syn keyword idlangRoutine IDLgrViewgroup IDLgrVolume IDLgrVRML IDLgrWindow
134 syn keyword idlangRoutine IGAMMA IMAGE_CONT IMAGE_STATISTICS IMAGINARY
135 syn keyword idlangRoutine INDGEN INT_2D INT_3D INT_TABULATED INTARR INTERPOL
136 syn keyword idlangRoutine INTERPOLATE INVERT IOCTL ISHFT ISOCONTOUR
137 syn keyword idlangRoutine ISOSURFACE JOURNAL JULDAY KEYWORD_SET KRIG2D
138 syn keyword idlangRoutine KURTOSIS KW_TEST L64INDGEN LABEL_DATE LABEL_REGION
139 syn keyword idlangRoutine LADFIT LAGUERRE LEEFILT LEGENDRE LINBCG LINDGEN
140 syn keyword idlangRoutine LINFIT LINKIMAGE LIVE_CONTOUR LIVE_CONTROL
141 syn keyword idlangRoutine LIVE_DESTROY LIVE_EXPORT LIVE_IMAGE LIVE_INFO
142 syn keyword idlangRoutine LIVE_LINE LIVE_LOAD LIVE_OPLOT LIVE_PLOT
143 syn keyword idlangRoutine LIVE_PRINT LIVE_RECT LIVE_STYLE LIVE_SURFACE
144 syn keyword idlangRoutine LIVE_TEXT LJLCT LL_ARC_DISTANCE LMFIT LMGR LNGAMMA
145 syn keyword idlangRoutine LNP_TEST LOADCT LOCALE_GET LON64ARR LONARR LONG
146 syn keyword idlangRoutine LONG64 LSODE LU_COMPLEX LUDC LUMPROVE LUSOL
147 syn keyword idlangRoutine M_CORRELATE MACHAR MAKE_ARRAY MAKE_DLL MAP_2POINTS
148 syn keyword idlangRoutine MAP_CONTINENTS MAP_GRID MAP_IMAGE MAP_PATCH
149 syn keyword idlangRoutine MAP_PROJ_INFO MAP_SET MATRIX_MULTIPLY MD_TEST MEAN
150 syn keyword idlangRoutine MEANABSDEV MEDIAN MEMORY MESH_CLIP MESH_DECIMATE
151 syn keyword idlangRoutine MESH_ISSOLID MESH_MERGE MESH_NUMTRIANGLES MESH_OBJ
152 syn keyword idlangRoutine MESH_SMOOTH MESH_SURFACEAREA MESH_VALIDATE
153 syn keyword idlangRoutine MESH_VOLUME MESSAGE MIN_CURVE_SURF MK_HTML_HELP
154 syn keyword idlangRoutine MODIFYCT MOMENT MORPH_CLOSE MORPH_DISTANCE
155 syn keyword idlangRoutine MORPH_GRADIENT MORPH_HITORMISS MORPH_OPEN
156 syn keyword idlangRoutine MORPH_THIN MORPH_TOPHAT MPEG_CLOSE MPEG_OPEN
157 syn keyword idlangRoutine MPEG_PUT MPEG_SAVE MSG_CAT_CLOSE MSG_CAT_COMPILE
158 syn keyword idlangRoutine MSG_CAT_OPEN MULTI N_ELEMENTS N_PARAMS N_TAGS
159 syn keyword idlangRoutine NEWTON NORM OBJ_CLASS OBJ_DESTROY OBJ_ISA OBJ_NEW
160 syn keyword idlangRoutine OBJ_VALID OBJARR ON_ERROR ON_IOERROR ONLINE_HELP
161 syn keyword idlangRoutine OPEN OPENR OPENW OPLOT OPLOTERR P_CORRELATE
162 syn keyword idlangRoutine PARTICLE_TRACE PCOMP PLOT PLOT_3DBOX PLOT_FIELD
163 syn keyword idlangRoutine PLOTERR PLOTS PNT_LINE POINT_LUN POLAR_CONTOUR
164 syn keyword idlangRoutine POLAR_SURFACE POLY POLY_2D POLY_AREA POLY_FIT
165 syn keyword idlangRoutine POLYFILL POLYFILLV POLYSHADE POLYWARP POPD POWELL
166 syn keyword idlangRoutine PRIMES PRINT PRINTF PRINTD PROFILE PROFILER
167 syn keyword idlangRoutine PROFILES PROJECT_VOL PS_SHOW_FONTS PSAFM PSEUDO
168 syn keyword idlangRoutine PTR_FREE PTR_NEW PTR_VALID PTRARR PUSHD QROMB
169 syn keyword idlangRoutine QROMO QSIMP R_CORRELATE R_TEST RADON RANDOMN
170 syn keyword idlangRoutine RANDOMU RANKS RDPIX READ READF READ_ASCII
171 syn keyword idlangRoutine READ_BINARY READ_BMP READ_DICOM READ_IMAGE
172 syn keyword idlangRoutine READ_INTERFILE READ_JPEG READ_PICT READ_PNG
173 syn keyword idlangRoutine READ_PPM READ_SPR READ_SRF READ_SYLK READ_TIFF
174 syn keyword idlangRoutine READ_WAV READ_WAVE READ_X11_BITMAP READ_XWD READS
175 syn keyword idlangRoutine READU REBIN RECALL_COMMANDS RECON3 REDUCE_COLORS
176 syn keyword idlangRoutine REFORM REGRESS REPLICATE REPLICATE_INPLACE
177 syn keyword idlangRoutine RESOLVE_ALL RESOLVE_ROUTINE RESTORE RETALL RETURN
178 syn keyword idlangRoutine REVERSE REWIND RK4 ROBERTS ROT ROTATE ROUND
179 syn keyword idlangRoutine ROUTINE_INFO RS_TEST S_TEST SAVE SAVGOL SCALE3
180 syn keyword idlangRoutine SCALE3D SEARCH2D SEARCH3D SET_PLOT SET_SHADING
181 syn keyword idlangRoutine SET_SYMBOL SETENV SETLOG SETUP_KEYS SFIT
182 syn keyword idlangRoutine SHADE_SURF SHADE_SURF_IRR SHADE_VOLUME SHIFT SHOW3
183 syn keyword idlangRoutine SHOWFONT SIN SINDGEN SINH SIZE SKEWNESS SKIPF
184 syn keyword idlangRoutine SLICER3 SLIDE_IMAGE SMOOTH SOBEL SOCKET SORT SPAWN
185 syn keyword idlangRoutine SPH_4PNT SPH_SCAT SPHER_HARM SPL_INIT SPL_INTERP
186 syn keyword idlangRoutine SPLINE SPLINE_P SPRSAB SPRSAX SPRSIN SPRSTP SQRT
187 syn keyword idlangRoutine STANDARDIZE STDDEV STOP STRARR STRCMP STRCOMPRESS
188 syn keyword idlangRoutine STREAMLINE STREGEX STRETCH STRING STRJOIN STRLEN
189 syn keyword idlangRoutine STRLOWCASE STRMATCH STRMESSAGE STRMID STRPOS
190 syn keyword idlangRoutine STRPUT STRSPLIT STRTRIM STRUCT_ASSIGN STRUCT_HIDE
191 syn keyword idlangRoutine STRUPCASE SURFACE SURFR SVDC SVDFIT SVSOL
192 syn keyword idlangRoutine SWAP_ENDIAN SWITCH SYSTIME T_CVF T_PDF T3D
193 syn keyword idlangRoutine TAG_NAMES TAN TANH TAPRD TAPWRT TEK_COLOR
194 syn keyword idlangRoutine TEMPORARY TETRA_CLIP TETRA_SURFACE TETRA_VOLUME
195 syn keyword idlangRoutine THIN THREED TIME_TEST2 TIMEGEN TM_TEST TOTAL TRACE
196 syn keyword idlangRoutine TRANSPOSE TRI_SURF TRIANGULATE TRIGRID TRIQL
197 syn keyword idlangRoutine TRIRED TRISOL TRNLOG TS_COEF TS_DIFF TS_FCAST
198 syn keyword idlangRoutine TS_SMOOTH TV TVCRS TVLCT TVRD TVSCL UINDGEN UINT
199 syn keyword idlangRoutine UINTARR UL64INDGEN ULINDGEN ULON64ARR ULONARR
200 syn keyword idlangRoutine ULONG ULONG64 UNIQ USERSYM VALUE_LOCATE VARIANCE
201 syn keyword idlangRoutine VAX_FLOAT VECTOR_FIELD VEL VELOVECT VERT_T3D VOIGT
202 syn keyword idlangRoutine VORONOI VOXEL_PROJ WAIT WARP_TRI WATERSHED WDELETE
203 syn keyword idlangRoutine WEOF WF_DRAW WHERE WIDGET_BASE WIDGET_BUTTON
204 syn keyword idlangRoutine WIDGET_CONTROL WIDGET_DRAW WIDGET_DROPLIST
205 syn keyword idlangRoutine WIDGET_EVENT WIDGET_INFO WIDGET_LABEL WIDGET_LIST
206 syn keyword idlangRoutine WIDGET_SLIDER WIDGET_TABLE WIDGET_TEXT WINDOW
207 syn keyword idlangRoutine WRITE_BMP WRITE_IMAGE WRITE_JPEG WRITE_NRIF
208 syn keyword idlangRoutine WRITE_PICT WRITE_PNG WRITE_PPM WRITE_SPR WRITE_SRF
209 syn keyword idlangRoutine WRITE_SYLK WRITE_TIFF WRITE_WAV WRITE_WAVE WRITEU
210 syn keyword idlangRoutine WSET WSHOW WTN WV_APPLET WV_CW_WAVELET WV_CWT
211 syn keyword idlangRoutine WV_DENOISE WV_DWT WV_FN_COIFLET WV_FN_DAUBECHIES
212 syn keyword idlangRoutine WV_FN_GAUSSIAN WV_FN_HAAR WV_FN_MORLET WV_FN_PAUL
213 syn keyword idlangRoutine WV_FN_SYMLET WV_IMPORT_DATA WV_IMPORT_WAVELET
214 syn keyword idlangRoutine WV_PLOT3D_WPS WV_PLOT_MULTIRES WV_PWT
215 syn keyword idlangRoutine WV_TOOL_DENOISE XBM_EDIT XDISPLAYFILE XDXF XFONT
216 syn keyword idlangRoutine XINTERANIMATE XLOADCT XMANAGER XMNG_TMPL XMTOOL
217 syn keyword idlangRoutine XOBJVIEW XPALETTE XPCOLOR XPLOT3D XREGISTERED XROI
218 syn keyword idlangRoutine XSQ_TEST XSURFACE XVAREDIT XVOLUME XVOLUME_ROTATE
219 syn keyword idlangRoutine XVOLUME_WRITE_IMAGE XYOUTS ZOOM ZOOM_24
221 " Define the default highlighting.
222 " For version 5.7 and earlier: only when not done already
223 " For version 5.8 and later: only when an item doesn't have highlighting yet
224 if version >= 508 || !exists("did_idlang_syn_inits")
226 let did_idlang_syn_inits = 1
227 command -nargs=+ HiLink hi link <args>
229 command -nargs=+ HiLink hi def link <args>
232 HiLink idlangConditional Conditional
233 HiLink idlangRoutine Type
234 HiLink idlangStatement Statement
235 HiLink idlangContinueLine Todo
236 HiLink idlangRealNumber Float
237 HiLink idlangNumber Number
238 HiLink idlangString String
239 HiLink idlangOperator Operator
240 HiLink idlangComment Comment
241 HiLink idlangTodo Todo
242 HiLink idlangPreCondit Identifier
243 HiLink idlangDblCommaError Error
244 HiLink idlangStop Error
245 HiLink idlangStrucvar PreProc
246 HiLink idlangSystem Identifier
247 HiLink idlangKeyword Special
252 let b:current_syntax = "idlang"