Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
splint.vim244 linesDownload Raw Back to syntax
1" Vim syntax file2" Language:	splint (C with lclint/splint Annotations)3" Maintainer:	Ralf Wildenhues <Ralf.Wildenhues@gmx.de>4" Splint Home:	http://www.splint.org/5" Last Change:	$Date: 2004/06/13 20:08:47 $6" $Revision: 1.1 $7 8" Note:		Splint annotated files are not detected by default.9"		If you want to use this file for highlighting C code,10"		please make sure splint.vim is sourced instead of c.vim,11"		for example by putting12"			/* vim: set filetype=splint : */13"		at the end of your code or something like14"			au! BufRead,BufNewFile *.c	setfiletype splint15"		in your vimrc file or filetype.vim16 17 18" quit when a syntax file was already loaded19if exists("b:current_syntax")20  finish21endif22 23" Read the C syntax to start with24runtime! syntax/c.vim25 26 27" FIXME: uses and changes several clusters defined in c.vim28"	so watch for changes there29 30" TODO: make a little more grammar explicit31"	match flags with hyphen and underscore notation32"	match flag expanded forms33"	accept other comment char than @34 35syn case match36" splint annotations (taken from 'splint -help annotations')37syn match   splintStateAnnot	contained "\(pre\|post\):\(only\|shared\|owned\|dependent\|observer\|exposed\|isnull\|notnull\)"38syn keyword splintSpecialAnnot  contained special39syn keyword splintSpecTag	contained uses sets defines allocated releases40syn keyword splintModifies	contained modifies41syn keyword splintRequires	contained requires ensures42syn keyword splintGlobals	contained globals43syn keyword splintGlobitem	contained internalState fileSystem44syn keyword splintGlobannot	contained undef killed45syn keyword splintWarning	contained warn46 47syn keyword splintModitem	contained internalState fileSystem nothing48syn keyword splintReqitem	contained MaxSet MaxRead result49syn keyword splintIter		contained iter yield50syn keyword splintConst		contained constant51syn keyword splintAlt		contained alt52 53syn keyword splintType		contained abstract concrete mutable immutable refcounted numabstract54syn keyword splintGlobalType	contained unchecked checkmod checked checkedstrict55syn keyword splintMemMgm	contained dependent keep killref only owned shared temp56syn keyword splintAlias		contained unique returned57syn keyword splintExposure	contained observer exposed58syn keyword splintDefState	contained out in partial reldef59syn keyword splintGlobState	contained undef killed60syn keyword splintNullState	contained null notnull relnull61syn keyword splintNullPred	contained truenull falsenull nullwhentrue falsewhennull62syn keyword splintExit		contained exits mayexit trueexit falseexit neverexit63syn keyword splintExec		contained noreturn maynotreturn noreturnwhentrue noreturnwhenfalse alwaysreturns64syn keyword splintSef		contained sef65syn keyword splintDecl		contained unused external66syn keyword splintCase		contained fallthrough67syn keyword splintBreak		contained innerbreak loopbreak switchbreak innercontinue68syn keyword splintUnreach	contained notreached69syn keyword splintSpecFunc	contained printflike scanflike messagelike70 71" TODO: make these region or match72syn keyword splintErrSupp	contained i ignore end t73syn match   splintErrSupp	contained "[it]\d\+\>"74syn keyword splintTypeAcc	contained access noaccess75 76syn keyword splintMacro		contained notfunction77syn match   splintSpecType	contained "\(\|unsigned\|signed\)integraltype"78 79" Flags taken from 'splint -help flags full' divided in local and global flags80"				 Local Flags:81syn keyword splintFlag contained abstract abstractcompare accessall accessczech accessczechoslovak82syn keyword splintFlag contained accessfile accessmodule accessslovak aliasunique allblock83syn keyword splintFlag contained allempty allglobs allimponly allmacros alwaysexits84syn keyword splintFlag contained annotationerror ansi89limits assignexpose badflag bitwisesigned85syn keyword splintFlag contained boolcompare boolfalse boolint boolops booltrue86syn keyword splintFlag contained booltype bounds boundscompacterrormessages boundsread boundswrite87syn keyword splintFlag contained branchstate bufferoverflow bufferoverflowhigh bugslimit casebreak88syn keyword splintFlag contained caseinsensitivefilenames castexpose castfcnptr charindex charint89syn keyword splintFlag contained charintliteral charunsignedchar checkedglobalias checkmodglobalias checkpost90syn keyword splintFlag contained checkstrictglobalias checkstrictglobs codeimponly commentchar commenterror91syn keyword splintFlag contained compdef compdestroy compmempass constmacros constprefix92syn keyword splintFlag contained constprefixexclude constuse continuecomment controlnestdepth cppnames93syn keyword splintFlag contained csvoverwrite czech czechconsts czechfcns czechmacros94syn keyword splintFlag contained czechoslovak czechoslovakconsts czechoslovakfcns czechoslovakmacros czechoslovaktypes95syn keyword splintFlag contained czechoslovakvars czechtypes czechvars debugfcnconstraint declundef96syn keyword splintFlag contained deepbreak deparrays dependenttrans distinctexternalnames distinctinternalnames97syn keyword splintFlag contained duplicatecases duplicatequals elseifcomplete emptyret enumindex98syn keyword splintFlag contained enumint enummembers enummemuse enumprefix enumprefixexclude99syn keyword splintFlag contained evalorder evalorderuncon exitarg exportany exportconst100syn keyword splintFlag contained exportfcn exportheader exportheadervar exportiter exportlocal101syn keyword splintFlag contained exportmacro exporttype exportvar exposetrans externalnamecaseinsensitive102syn keyword splintFlag contained externalnamelen externalprefix externalprefixexclude fcnderef fcnmacros103syn keyword splintFlag contained fcnpost fcnuse fielduse fileextensions filestaticprefix104syn keyword splintFlag contained filestaticprefixexclude firstcase fixedformalarray floatdouble forblock105syn keyword splintFlag contained forcehints forempty forloopexec formalarray formatcode106syn keyword splintFlag contained formatconst formattype forwarddecl freshtrans fullinitblock107syn keyword splintFlag contained globalias globalprefix globalprefixexclude globimponly globnoglobs108syn keyword splintFlag contained globs globsimpmodsnothing globstate globuse gnuextensions109syn keyword splintFlag contained grammar hasyield hints htmlfileformat ifblock110syn keyword splintFlag contained ifempty ignorequals ignoresigns immediatetrans impabstract111syn keyword splintFlag contained impcheckedglobs impcheckedspecglobs impcheckedstatics impcheckedstrictglobs impcheckedstrictspecglobs112syn keyword splintFlag contained impcheckedstrictstatics impcheckmodglobs impcheckmodinternals impcheckmodspecglobs impcheckmodstatics113syn keyword splintFlag contained impconj implementationoptional implictconstraint impouts imptype114syn keyword splintFlag contained includenest incompletetype incondefs incondefslib indentspaces115syn keyword splintFlag contained infloops infloopsuncon initallelements initsize internalglobs116syn keyword splintFlag contained internalglobsnoglobs internalnamecaseinsensitive internalnamelen internalnamelookalike iso99limits117syn keyword splintFlag contained isoreserved isoreservedinternal iterbalance iterloopexec iterprefix118syn keyword splintFlag contained iterprefixexclude iteryield its4low its4moderate its4mostrisky119syn keyword splintFlag contained its4risky its4veryrisky keep keeptrans kepttrans120syn keyword splintFlag contained legacy libmacros likelyboundsread likelyboundswrite likelybool121syn keyword splintFlag contained likelybounds limit linelen lintcomments localprefix122syn keyword splintFlag contained localprefixexclude locindentspaces longint longintegral longsignedintegral123syn keyword splintFlag contained longunsignedintegral longunsignedunsignedintegral loopexec looploopbreak looploopcontinue124syn keyword splintFlag contained loopswitchbreak macroassign macroconstdecl macrodecl macroempty125syn keyword splintFlag contained macrofcndecl macromatchname macroparams macroparens macroredef126syn keyword splintFlag contained macroreturn macrostmt macrounrecog macrovarprefix macrovarprefixexclude127syn keyword splintFlag contained maintype matchanyintegral matchfields mayaliasunique memchecks128syn keyword splintFlag contained memimp memtrans misplacedsharequal misscase modfilesys129syn keyword splintFlag contained modglobs modglobsnomods modglobsunchecked modinternalstrict modnomods130syn keyword splintFlag contained modobserver modobserveruncon mods modsimpnoglobs modstrictglobsnomods131syn keyword splintFlag contained moduncon modunconnomods modunspec multithreaded mustdefine132syn keyword splintFlag contained mustfree mustfreefresh mustfreeonly mustmod mustnotalias133syn keyword splintFlag contained mutrep namechecks needspec nestcomment nestedextern134syn keyword splintFlag contained newdecl newreftrans nextlinemacros noaccess nocomments135syn keyword splintFlag contained noeffect noeffectuncon noparams nopp noret136syn keyword splintFlag contained null nullassign nullderef nullinit nullpass137syn keyword splintFlag contained nullptrarith nullret nullstate nullterminated138syn keyword splintFlag contained numabstract numabstractcast numabstractindex numabstractlit numabstractprint139syn keyword splintFlag contained numenummembers numliteral numstructfields observertrans obviousloopexec140syn keyword splintFlag contained oldstyle onlytrans onlyunqglobaltrans orconstraint overload141syn keyword splintFlag contained ownedtrans paramimptemp paramuse parenfileformat partial142syn keyword splintFlag contained passunknown portability predassign predbool predboolint143syn keyword splintFlag contained predboolothers predboolptr preproc protoparammatch protoparamname144syn keyword splintFlag contained protoparamprefix protoparamprefixexclude ptrarith ptrcompare ptrnegate145syn keyword splintFlag contained quiet readonlystrings readonlytrans realcompare redecl146syn keyword splintFlag contained redef redundantconstraints redundantsharequal refcounttrans relaxquals147syn keyword splintFlag contained relaxtypes repeatunrecog repexpose retalias retexpose148syn keyword splintFlag contained retimponly retval retvalbool retvalint retvalother149syn keyword splintFlag contained sefparams sefuncon shadow sharedtrans shiftimplementation150syn keyword splintFlag contained shiftnegative shortint showallconjs showcolumn showconstraintlocation151syn keyword splintFlag contained showconstraintparens showdeephistory showfunc showloadloc showscan152syn keyword splintFlag contained showsourceloc showsummary sizeofformalarray sizeoftype skipisoheaders153syn keyword splintFlag contained skipposixheaders slashslashcomment slovak slovakconsts slovakfcns154syn keyword splintFlag contained slovakmacros slovaktypes slovakvars specglobimponly specimponly155syn keyword splintFlag contained specmacros specretimponly specstructimponly specundecl specundef156syn keyword splintFlag contained stackref statemerge statetransfer staticinittrans statictrans157syn keyword splintFlag contained strictbranchstate strictdestroy strictops strictusereleased stringliterallen158syn keyword splintFlag contained stringliteralnoroom stringliteralnoroomfinalnull stringliteralsmaller stringliteraltoolong structimponly159syn keyword splintFlag contained superuser switchloopbreak switchswitchbreak syntax sysdirerrors160syn keyword splintFlag contained sysdirexpandmacros sysunrecog tagprefix tagprefixexclude temptrans161syn keyword splintFlag contained tmpcomments toctou topuse trytorecover type162syn keyword splintFlag contained typeprefix typeprefixexclude typeuse uncheckedglobalias uncheckedmacroprefix163syn keyword splintFlag contained uncheckedmacroprefixexclude uniondef unixstandard unqualifiedinittrans unqualifiedtrans164syn keyword splintFlag contained unreachable unrecog unrecogcomments unrecogdirective unrecogflagcomments165syn keyword splintFlag contained unsignedcompare unusedspecial usedef usereleased usevarargs166syn keyword splintFlag contained varuse voidabstract warnflags warnlintcomments warnmissingglobs167syn keyword splintFlag contained warnmissingglobsnoglobs warnposixheaders warnrc warnsysfiles warnunixlib168syn keyword splintFlag contained warnuse whileblock whileempty whileloopexec zerobool169syn keyword splintFlag contained zeroptr170"				       Global Flags:171syn keyword splintGlobalFlag contained csv dump errorstream errorstreamstderr errorstreamstdout172syn keyword splintGlobalFlag contained expect f help i isolib173syn keyword splintGlobalFlag contained larchpath lclexpect lclimportdir lcs lh174syn keyword splintGlobalFlag contained load messagestream messagestreamstderr messagestreamstdout mts175syn keyword splintGlobalFlag contained neverinclude nof nolib posixlib posixstrictlib176syn keyword splintGlobalFlag contained showalluses singleinclude skipsysheaders stats streamoverwrite177syn keyword splintGlobalFlag contained strictlib supcounts sysdirs timedist tmpdir178syn keyword splintGlobalFlag contained unixlib unixstrictlib warningstream warningstreamstderr warningstreamstdout179syn keyword splintGlobalFlag contained whichlib180syn match   splintFlagExpr contained "[\+\-\=]" nextgroup=splintFlag,splintGlobalFlag181 182" detect missing /*@ and wrong */183syn match	splintAnnError	"@\*/"184syn cluster	cCommentGroup	add=splintAnnError185syn match	splintAnnError2	"[^@]\*/"hs=s+1 contained186syn region	splintAnnotation start="/\*@" end="@\*/" contains=@splintAnnotElem,cType keepend187syn match	splintShortAnn	"/\*@\*/"188syn cluster	splintAnnotElem	contains=splintStateAnnot,splintSpecialAnnot,splintSpecTag,splintModifies,splintRequires,splintGlobals,splintGlobitem,splintGlobannot,splintWarning,splintModitem,splintIter,splintConst,splintAlt,splintType,splintGlobalType,splintMemMgm,splintAlias,splintExposure,splintDefState,splintGlobState,splintNullState,splintNullPred,splintExit,splintExec,splintSef,splintDecl,splintCase,splintBreak,splintUnreach,splintSpecFunc,splintErrSupp,splintTypeAcc,splintMacro,splintSpecType,splintAnnError2,splintFlagExpr189syn cluster	splintAllStuff	contains=@splintAnnotElem,splintFlag,splintGlobalFlag190syn cluster	cParenGroup	add=@splintAllStuff191syn cluster	cPreProcGroup	add=@splintAllStuff192syn cluster	cMultiGroup	add=@splintAllStuff193 194" Define the default highlighting.195" Only when an item doesn't have highlighting yet196 197hi def link splintShortAnn		splintAnnotation198hi def link splintAnnotation	Comment199hi def link splintAnnError		splintError200hi def link splintAnnError2	splintError201hi def link splintFlag		SpecialComment202hi def link splintGlobalFlag	splintError203hi def link splintSpecialAnnot	splintAnnKey204hi def link splintStateAnnot	splintAnnKey205hi def link splintSpecTag		splintAnnKey206hi def link splintModifies		splintAnnKey207hi def link splintRequires		splintAnnKey208hi def link splintGlobals		splintAnnKey209hi def link splintGlobitem		Constant210hi def link splintGlobannot	splintAnnKey211hi def link splintWarning		splintAnnKey212hi def link splintModitem		Constant213hi def link splintIter		splintAnnKey214hi def link splintConst		splintAnnKey215hi def link splintAlt		splintAnnKey216hi def link splintType		splintAnnKey217hi def link splintGlobalType	splintAnnKey218hi def link splintMemMgm		splintAnnKey219hi def link splintAlias		splintAnnKey220hi def link splintExposure		splintAnnKey221hi def link splintDefState		splintAnnKey222hi def link splintGlobState	splintAnnKey223hi def link splintNullState	splintAnnKey224hi def link splintNullPred		splintAnnKey225hi def link splintExit		splintAnnKey226hi def link splintExec		splintAnnKey227hi def link splintSef		splintAnnKey228hi def link splintDecl		splintAnnKey229hi def link splintCase		splintAnnKey230hi def link splintBreak		splintAnnKey231hi def link splintUnreach		splintAnnKey232hi def link splintSpecFunc		splintAnnKey233hi def link splintErrSupp		splintAnnKey234hi def link splintTypeAcc		splintAnnKey235hi def link splintMacro		splintAnnKey236hi def link splintSpecType		splintAnnKey237hi def link splintAnnKey		Type238hi def link splintError		Error239 240 241let b:current_syntax = "splint"242 243" vim: ts=8244 
codekingpro/portable-devtools · Team Ai