Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
b.vim115 linesDownload Raw Back to syntax
1" Vim syntax file2" Language:	B (A Formal Method with refinement and mathematical proof)3" Maintainer:	Mathieu Clabaut <mathieu.clabaut@gmail.com>4" Contributor:  Csaba Hoch5" LastChange:	8 Dec 20076 7 8" quit when a syntax file was already loaded9if exists("b:current_syntax")10   finish11endif12 13 14" A bunch of useful B keywords15syn keyword bStatement	        MACHINE MODEL SEES OPERATIONS INCLUDES DEFINITIONS CONSTRAINTS CONSTANTS VARIABLES CONCRETE_CONSTANTS CONCRETE_VARIABLES ABSTRACT_CONSTANTS ABSTRACT_VARIABLES HIDDEN_CONSTANTS HIDDEN_VARIABLES ASSERT ASSERTIONS  EXTENDS IMPLEMENTATION REFINEMENT IMPORTS USES INITIALISATION INVARIANT PROMOTES PROPERTIES REFINES SETS VALUES VARIANT VISIBLE_CONSTANTS VISIBLE_VARIABLES THEORY XLS THEOREMS LOCAL_OPERATIONS16syn keyword bLabel		CASE IN EITHER OR CHOICE DO OF17syn keyword bConditional	IF ELSE SELECT ELSIF THEN WHEN18syn keyword bRepeat		WHILE FOR19syn keyword bOps		bool card conc closure closure1 dom first fnc front not or id inter iseq iseq1 iterate last max min mod perm pred prj1 prj2 ran rel rev seq seq1 size skip succ tail union20syn keyword bKeywords		LET VAR BE IN BEGIN END  POW POW1 FIN FIN1  PRE  SIGMA STRING UNION IS ANY WHERE21 22syn keyword bBoolean	TRUE FALSE bfalse btrue23syn keyword bConstant	PI MAXINT MININT User_Pass PatchProver PatchProverH0 PatchProverB0 FLAT ARI DED SUB RES24syn keyword bGuard binhyp band bnot bguard bsearch bflat bfresh bguardi bget bgethyp barith bgetresult bresult bgoal bmatch bmodr bnewv  bnum btest bpattern bprintf bwritef bsubfrm  bvrb blvar bcall bappend bclose25 26syn keyword bLogic	or not27syn match bLogic	"\(!\|#\|%\|&\|+->>\|+->\|-->>\|->>\|-->\|->\|/:\|/<:\|/<<:\|/=\|/\\\|/|\\\|::\|:\|;:\|<+\|<->\|<--\|<-\|<:\|<<:\|<<|\|<=>\|<|\|==\|=>\|>+>>\|>->\|>+>\|||\||->\)"28syn match bNothing      /:=/29 30syn keyword cTodo contained	TODO FIXME XXX31 32" String and Character constants33" Highlight special characters (those which have a backslash) differently34syn match bSpecial contained	"\\[0-7][0-7][0-7]\=\|\\."35syn region bString		start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=bSpecial36syn match bCharacter		"'[^\\]'"37syn match bSpecialCharacter	"'\\.'"38syn match bSpecialCharacter	"'\\[0-7][0-7]'"39syn match bSpecialCharacter	"'\\[0-7][0-7][0-7]'"40 41"catch errors caused by wrong parenthesis42syn region bParen		transparent start='(' end=')' contains=ALLBUT,bParenError,bIncluded,bSpecial,bTodo,bUserLabel,bBitField43syn match bParenError		")"44syn match bInParen contained	"[{}]"45 46"integer number, or floating point number without a dot and with "f".47syn case ignore48syn match bNumber		"\<[0-9]\+\>"49"syn match bIdentifier	"\<[a-z_][a-z0-9_]*\>"50syn case match51 52  syn region bComment		start="/\*" end="\*/" contains=bTodo53  syn match bComment		"//.*" contains=bTodo54syntax match bCommentError	"\*/"55 56syn keyword bType		INT INTEGER BOOL NAT NATURAL NAT1 NATURAL157 58syn region bPreCondit	start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=bComment,bString,bCharacter,bNumber,bCommentError59syn region bIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+60syn match bIncluded contained "<[^>]*>"61syn match bInclude		"^\s*#\s*include\>\s*["<]" contains=bIncluded62 63syn region bDefine		start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,bPreCondit,bIncluded,bInclude,bDefine,bInParen64syn region bPreProc		start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,bPreCondit,bIncluded,bInclude,bDefine,bInParen65 66syn sync ccomment bComment minlines=1067 68" Define the default highlighting.69" Only when an item doesn't have highlighting yet70 71 72" The default methods for highlighting.  Can be overridden later73hi def link bLabel	Label74hi def link bUserLabel	Label75hi def link bConditional	Conditional76hi def link bRepeat	Repeat77hi def link bLogic	Special78hi def link bCharacter	Character79hi def link bSpecialCharacter bSpecial80hi def link bNumber	Number81hi def link bFloat	Float82hi def link bOctalError	bError83hi def link bParenError	bError84" hi def link bInParen	bError85hi def link bCommentError	bError86hi def link bBoolean	Identifier87hi def link bConstant	Identifier88hi def link bGuard	Identifier89hi def link bOperator	Operator90hi def link bKeywords	Operator91hi def link bOps		Identifier92hi def link bStructure	Structure93hi def link bStorageClass	StorageClass94hi def link bInclude	Include95hi def link bPreProc	PreProc96hi def link bDefine	Macro97hi def link bIncluded	bString98hi def link bError	Error99hi def link bStatement	Statement100hi def link bPreCondit	PreCondit101hi def link bType		Type102hi def link bCommentError	bError103hi def link bCommentString bString104hi def link bComment2String bString105hi def link bCommentSkip	bComment106hi def link bString	String107hi def link bComment	Comment108hi def link bSpecial	SpecialChar109hi def link bTodo		Todo110"hi link bIdentifier	Identifier111 112let b:current_syntax = "b"113 114" vim: ts=8115 
codekingpro/portable-devtools · Team Ai