xref: /vim-8.2.3635/runtime/syntax/xmath.vim (revision 36e294c0)
1" Vim syntax file
2" Language:	xmath (a simulation tool)
3" Maintainer:	Charles E. Campbell <[email protected]>
4" Last Change:	Sep 11, 2006
5" Version:	7
6" URL:	http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XMATH
7
8" For version 5.x: Clear all syntax items
9" For version 6.x: Quit when a syntax file was already loaded
10if version < 600
11  syntax clear
12elseif exists("b:current_syntax")
13  finish
14endif
15
16" parenthesis sanity checker
17syn region xmathZone	matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" transparent contains=ALLBUT,xmathError,xmathBraceError,xmathCurlyError
18syn region xmathZone	matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" transparent contains=ALLBUT,xmathError,xmathBraceError,xmathParenError
19syn region xmathZone	matchgroup=Delimiter start="\[" matchgroup=Delimiter end="]" transparent contains=ALLBUT,xmathError,xmathCurlyError,xmathParenError
20syn match  xmathError	"[)\]}]"
21syn match  xmathBraceError	"[)}]"	contained
22syn match  xmathCurlyError	"[)\]]"	contained
23syn match  xmathParenError	"[\]}]"	contained
24syn match  xmathComma	"[,;:]"
25syn match  xmathComma	"\.\.\.$"
26
27" A bunch of useful xmath keywords
28syn case ignore
29syn keyword xmathFuncCmd	function	endfunction	command	endcommand
30syn keyword xmathStatement	abort	beep	debug	default	define
31syn keyword xmathStatement	execute	exit	pause	return	undefine
32syn keyword xmathConditional	if	else	elseif	endif
33syn keyword xmathRepeat	while	for	endwhile	endfor
34syn keyword xmathCmd	anigraph	deletedatastore	keep	renamedatastore
35syn keyword xmathCmd	autocode	deletestd	linkhyper	renamestd
36syn keyword xmathCmd	build	deletesuperblock	linksim	renamesuperblock
37syn keyword xmathCmd	comment	deletetransition	listusertype	save
38syn keyword xmathCmd	copydatastore	deleteusertype	load	sbadisplay
39syn keyword xmathCmd	copystd	detailmodel	lock	set
40syn keyword xmathCmd	copysuperblock	display	minmax_display	setsbdefault
41syn keyword xmathCmd	createblock	documentit	modifyblock	show
42syn keyword xmathCmd	createbubble	editcatalog	modifybubble	showlicense
43syn keyword xmathCmd	createconnection	erase	modifystd	showsbdefault
44syn keyword xmathCmd	creatertf	expandsuperbubble	modifysuperblock	stop
45syn keyword xmathCmd	createstd	for	modifytransition	stopcosim
46syn keyword xmathCmd	createsuperblock	go	modifyusertype	syntax
47syn keyword xmathCmd	createsuperbubble	goto	new	unalias
48syn keyword xmathCmd	createtransition	hardcopy	next	unlock
49syn keyword xmathCmd	createusertype	help	polargraph	usertype
50syn keyword xmathCmd	delete	hyperbuild	print	whatis
51syn keyword xmathCmd	deleteblock	if	printmodel	while
52syn keyword xmathCmd	deletebubble	ifilter	quit	who
53syn keyword xmathCmd	deleteconnection	ipcwc	remove	xgraph
54
55syn keyword xmathFunc	abcd	eye	irea	querystdoptions
56syn keyword xmathFunc	abs	eyepattern	is	querysuperblock
57syn keyword xmathFunc	acos	feedback	ISID	querysuperblockopt
58syn keyword xmathFunc	acosh	fft	ISID	Models	querytransition
59syn keyword xmathFunc	adconversion	fftpdm	kronecker	querytransitionopt
60syn keyword xmathFunc	afeedback	filter	length	qz
61syn keyword xmathFunc	all	find	limit	rampinvar
62syn keyword xmathFunc	ambiguity	firparks	lin	random
63syn keyword xmathFunc	amdemod	firremez	lin30	randpdm
64syn keyword xmathFunc	analytic	firwind	linearfm	randpert
65syn keyword xmathFunc	analyze	fmdemod	linfnorm	randsys
66syn keyword xmathFunc	any	forwdiff	lintodb	rank
67syn keyword xmathFunc	append	fprintf	list	rayleigh
68syn keyword xmathFunc	argn	frac	log	rcepstrum
69syn keyword xmathFunc	argv	fracred	log10	rcond
70syn keyword xmathFunc	arma	freq	logm	rdintegrate
71syn keyword xmathFunc	arma2ss	freqcircle	lognormal	read
72syn keyword xmathFunc	armax	freqcont	logspace	real
73syn keyword xmathFunc	ascii	frequencyhop	lowpass	rectify
74syn keyword xmathFunc	asin	fsesti	lpopt	redschur
75syn keyword xmathFunc	asinh	fslqgcomp	lqgcomp	reflect
76syn keyword xmathFunc	atan	fsregu	lqgltr	regulator
77syn keyword xmathFunc	atan2	fwls	ls	residue
78syn keyword xmathFunc	atanh	gabor	ls2unc	riccati
79syn keyword xmathFunc	attach_ac100	garb	ls2var	riccati_eig
80syn keyword xmathFunc	backdiff	gaussian	lsjoin	riccati_schur
81syn keyword xmathFunc	balance	gcexp	lu	ricean
82syn keyword xmathFunc	balmoore	gcos	lyapunov	rifd
83syn keyword xmathFunc	bandpass	gdfileselection	makecontinuous	rlinfo
84syn keyword xmathFunc	bandstop	gdmessage	makematrix	rlocus
85syn keyword xmathFunc	bj	gdselection	makepoly	rms
86syn keyword xmathFunc	blknorm	genconv	margin	rootlocus
87syn keyword xmathFunc	bode	get	markoff	roots
88syn keyword xmathFunc	bpm	get_info30	matchedpz	round
89syn keyword xmathFunc	bpm2inn	get_inn	max	rref
90syn keyword xmathFunc	bpmjoin	gfdm	maxlike	rve_get
91syn keyword xmathFunc	bpmsplit	gfsk	mean	rve_info
92syn keyword xmathFunc	bst	gfskernel	mergeseg	rve_reset
93syn keyword xmathFunc	buttconstr	gfunction	min	rve_update
94syn keyword xmathFunc	butterworth	ggauss	minimal	samplehold
95syn keyword xmathFunc	cancel	giv	mkpert	schur
96syn keyword xmathFunc	canform	giv2var	mkphase	sdf
97syn keyword xmathFunc	ccepstrum	givjoin	mma	sds
98syn keyword xmathFunc	char	gpsk	mmaget	sdtrsp
99syn keyword xmathFunc	chebconstr	gpulse	mmaput	sec
100syn keyword xmathFunc	chebyshev	gqam	mod	sech
101syn keyword xmathFunc	check	gqpsk	modal	siginterp
102syn keyword xmathFunc	cholesky	gramp	modalstate	sign
103syn keyword xmathFunc	chop	gsawtooth	modcarrier	sim
104syn keyword xmathFunc	circonv	gsigmoid	mreduce	sim30
105syn keyword xmathFunc	circorr	gsin	mtxplt	simin
106syn keyword xmathFunc	clock	gsinc	mu	simin30
107syn keyword xmathFunc	clocus	gsqpsk	mulhank	simout
108syn keyword xmathFunc	clsys	gsquarewave	multipath	simout30
109syn keyword xmathFunc	coherence	gstep	musynfit	simtransform
110syn keyword xmathFunc	colorind	GuiDialogCreate	mxstr2xmstr	sin
111syn keyword xmathFunc	combinepf	GuiDialogDestroy	mxstring2xmstring	singriccati
112syn keyword xmathFunc	commentof	GuiFlush	names	sinh
113syn keyword xmathFunc	compare	GuiGetValue	nichols	sinm
114syn keyword xmathFunc	complementaryerf	GuiManage	noisefilt	size
115syn keyword xmathFunc	complexenvelope	GuiPlot	none	smargin
116syn keyword xmathFunc	complexfreqshift	GuiPlotGet	norm	sns2sys
117syn keyword xmathFunc	concatseg	GuiSetValue	numden	sort
118syn keyword xmathFunc	condition	GuiShellCreate	nyquist	spectrad
119syn keyword xmathFunc	conj	GuiShellDeiconify	obscf	spectrum
120syn keyword xmathFunc	conmap	GuiShellDestroy	observable	spline
121syn keyword xmathFunc	connect	GuiShellIconify	oe	sprintf
122syn keyword xmathFunc	conpdm	GuiShellLower	ones	sqrt
123syn keyword xmathFunc	constellation	GuiShellRaise	ophank	sqrtm
124syn keyword xmathFunc	consys	GuiShellRealize	optimize	sresidualize
125syn keyword xmathFunc	controllable	GuiShellUnrealize	optscale	ss2arma
126syn keyword xmathFunc	convolve	GuiTimer	orderfilt	sst
127syn keyword xmathFunc	correlate	GuiToolCreate	orderstate	ssv
128syn keyword xmathFunc	cos	GuiToolDestroy	orth	stable
129syn keyword xmathFunc	cosh	GuiToolExist	oscmd	stair
130syn keyword xmathFunc	cosm	GuiUnmanage	oscope	starp
131syn keyword xmathFunc	cot	GuiWidgetExist	osscale	step
132syn keyword xmathFunc	coth	h2norm	padcrop	stepinvar
133syn keyword xmathFunc	covariance	h2syn	partialsum	string
134syn keyword xmathFunc	csc	hadamard	pdm	stringex
135syn keyword xmathFunc	csch	hankelsv	pdmslice	substr
136syn keyword xmathFunc	csum	hessenberg	pem	subsys
137syn keyword xmathFunc	ctrcf	highpass	perfplots	sum
138syn keyword xmathFunc	ctrlplot	hilbert	period	svd
139syn keyword xmathFunc	daug	hilberttransform	pfscale	svplot
140syn keyword xmathFunc	dbtolin	hinfcontr	phaseshift	sweep
141syn keyword xmathFunc	dct	hinfnorm	pinv	symbolmap
142syn keyword xmathFunc	decimate	hinfsyn	plot	sys2sns
143syn keyword xmathFunc	defFreqRange	histogram	plot30	sysic
144syn keyword xmathFunc	defTimeRange	idfreq	pmdemod	Sysid
145syn keyword xmathFunc	delay	idimpulse	poisson	system
146syn keyword xmathFunc	delsubstr	idsim	poissonimpulse	tan
147syn keyword xmathFunc	det	ifft	poleplace	tanh
148syn keyword xmathFunc	detrend	imag	poles	taper
149syn keyword xmathFunc	dht	impinvar	polezero	tfid
150syn keyword xmathFunc	diagonal	impplot	poltrend	toeplitz
151syn keyword xmathFunc	differentiate	impulse	polyfit	trace
152syn keyword xmathFunc	directsequence	index	polynomial	tril
153syn keyword xmathFunc	discretize	indexlist	polyval	trim
154syn keyword xmathFunc	divide	initial	polyvalm	trim30
155syn keyword xmathFunc	domain	initmodel	prbs	triu
156syn keyword xmathFunc	dst	initx0	product	trsp
157syn keyword xmathFunc	eig	inn2bpm	psd	truncate
158syn keyword xmathFunc	ellipconstr	inn2pe	put_inn	tustin
159syn keyword xmathFunc	elliptic	inn2unc	qpopt	uniform
160syn keyword xmathFunc	erf	insertseg	qr	val
161syn keyword xmathFunc	error	int	quantize	variance
162syn keyword xmathFunc	estimator	integrate	queryblock	videolines
163syn keyword xmathFunc	etfe	integratedump	queryblockoptions	wcbode
164syn keyword xmathFunc	exist	interp	querybubble	wcgain
165syn keyword xmathFunc	exp	interpolate	querybubbleoptionswindow
166syn keyword xmathFunc	expm	inv	querycatalog	wtbalance
167syn keyword xmathFunc	extractchan	invhilbert	queryconnection	zeros
168syn keyword xmathFunc	extractseg	iqmix	querystd
169
170syn case match
171
172" Labels (supports xmath's goto)
173syn match   xmathLabel	 "^\s*<[a-zA-Z_][a-zA-Z0-9]*>"
174
175" String and Character constants
176" Highlight special characters (those which have a backslash) differently
177syn match   xmathSpecial	contained "\\\d\d\d\|\\."
178syn region  xmathString	start=+"+  skip=+\\\\\|\\"+  end=+"+ contains=xmathSpecial,@Spell
179syn match   xmathCharacter	"'[^\\]'"
180syn match   xmathSpecialChar	"'\\.'"
181
182syn match   xmathNumber	"-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
183
184" Comments:
185" xmath supports #...  (like Unix shells)
186"       and      #{ ... }# comment blocks
187syn cluster xmathCommentGroup	contains=xmathString,xmathTodo,@Spell
188syn keyword xmathTodo contained	COMBAK	DEBUG	FIXME	Todo	TODO	XXX
189syn match   xmathComment	"#.*$"		contains=@xmathCommentGroup
190syn region  xmathCommentBlock	start="#{" end="}#"	contains=@xmathCommentGroup
191
192" synchronizing
193syn sync match xmathSyncComment	grouphere xmathCommentBlock "#{"
194syn sync match xmathSyncComment	groupthere NONE "}#"
195
196" Define the default highlighting.
197" For version 5.7 and earlier: only when not done already
198" For version 5.8 and later: only when an item doesn't have highlighting yet
199if version >= 508 || !exists("did_xmath_syntax_inits")
200  if version < 508
201    let did_xmath_syntax_inits = 1
202    command -nargs=+ HiLink hi link <args>
203  else
204    command -nargs=+ HiLink hi def link <args>
205  endif
206
207  HiLink xmathBraceError	xmathError
208  HiLink xmathCmd	xmathStatement
209  HiLink xmathCommentBlock	xmathComment
210  HiLink xmathCurlyError	xmathError
211  HiLink xmathFuncCmd	xmathStatement
212  HiLink xmathParenError	xmathError
213
214  " The default methods for highlighting.  Can be overridden later
215  HiLink xmathCharacter	Character
216  HiLink xmathComma	Delimiter
217  HiLink xmathComment	Comment
218  HiLink xmathCommentBlock	Comment
219  HiLink xmathConditional	Conditional
220  HiLink xmathError	Error
221  HiLink xmathFunc	Function
222  HiLink xmathLabel	PreProc
223  HiLink xmathNumber	Number
224  HiLink xmathRepeat	Repeat
225  HiLink xmathSpecial	Type
226  HiLink xmathSpecialChar	SpecialChar
227  HiLink xmathStatement	Statement
228  HiLink xmathString	String
229  HiLink xmathTodo	Todo
230
231  delcommand HiLink
232endif
233
234let b:current_syntax = "xmath"
235
236" vim: ts=17
237