| 
									
										
										
										
											2012-10-05 22:26:30 +02:00
										 |  |  | " Vim syntax file | 
					
						
							|  |  |  | " Language:	dts/dtsi (device tree files) | 
					
						
							|  |  |  | " Maintainer:	Daniel Mack <vim@zonque.org> | 
					
						
							| 
									
										
										
										
											2022-06-17 15:42:40 +01:00
										 |  |  | " Last Change:	2022 Jun 14 | 
					
						
							| 
									
										
										
										
											2012-10-05 22:26:30 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | if exists("b:current_syntax") | 
					
						
							|  |  |  |   finish | 
					
						
							|  |  |  | endif | 
					
						
							| 
									
										
										
										
											2022-06-17 15:42:40 +01:00
										 |  |  | let b:current_syntax = 'dts' | 
					
						
							| 
									
										
										
										
											2012-10-05 22:26:30 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | syntax region dtsComment        start="/\*"  end="\*/" | 
					
						
							|  |  |  | syntax match  dtsReference      "&[[:alpha:][:digit:]_]\+" | 
					
						
							| 
									
										
										
										
											2021-05-16 12:39:47 +02:00
										 |  |  | syntax region dtsBinaryProperty start="\[" end="\]" | 
					
						
							| 
									
										
										
										
											2012-10-05 22:26:30 +02:00
										 |  |  | syntax match  dtsStringProperty "\".*\"" | 
					
						
							| 
									
										
										
										
											2013-11-03 21:14:31 +01:00
										 |  |  | syntax match  dtsKeyword        "/.\{-1,\}/" | 
					
						
							| 
									
										
										
										
											2012-10-05 22:26:30 +02:00
										 |  |  | syntax match  dtsLabel          "^[[:space:]]*[[:alpha:][:digit:]_]\+:" | 
					
						
							| 
									
										
										
										
											2013-04-05 22:26:15 +02:00
										 |  |  | syntax match  dtsNode           /[[:alpha:][:digit:]-_]\+\(@[0-9a-fA-F]\+\|\)[[:space:]]*{/he=e-1 | 
					
						
							| 
									
										
										
										
											2012-10-05 22:26:30 +02:00
										 |  |  | syntax region dtsCellProperty   start="<" end=">" contains=dtsReference,dtsBinaryProperty,dtsStringProperty,dtsComment | 
					
						
							|  |  |  | syntax region dtsCommentInner   start="/\*"  end="\*/" | 
					
						
							| 
									
										
										
										
											2013-11-03 21:14:31 +01:00
										 |  |  | syntax match  dtsCommentLine    "//.*$" | 
					
						
							| 
									
										
										
										
											2012-10-05 22:26:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-16 12:39:47 +02:00
										 |  |  | " Accept %: for # (C99) | 
					
						
							|  |  |  | syn region	cPreCondit	start="^\s*\zs\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError | 
					
						
							|  |  |  | syn match	cPreConditMatch	display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>" | 
					
						
							|  |  |  | if !exists("c_no_if0") | 
					
						
							|  |  |  |   syn cluster	cCppOutInGroup	contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip | 
					
						
							|  |  |  |   syn region	cCppOutWrapper	start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold | 
					
						
							|  |  |  |   syn region	cCppOutIf	contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse | 
					
						
							|  |  |  |   if !exists("c_no_if0_fold") | 
					
						
							|  |  |  |     syn region	cCppOutIf2	contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold | 
					
						
							|  |  |  |   else | 
					
						
							|  |  |  |     syn region	cCppOutIf2	contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell | 
					
						
							|  |  |  |   endif | 
					
						
							|  |  |  |   syn region	cCppOutElse	contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit | 
					
						
							|  |  |  |   syn region	cCppInWrapper	start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold | 
					
						
							|  |  |  |   syn region	cCppInIf	contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit | 
					
						
							|  |  |  |   if !exists("c_no_if0_fold") | 
					
						
							|  |  |  |     syn region	cCppInElse	contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold | 
					
						
							|  |  |  |   else | 
					
						
							|  |  |  |     syn region	cCppInElse	contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 | 
					
						
							|  |  |  |   endif | 
					
						
							|  |  |  |   syn region	cCppInElse2	contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell | 
					
						
							|  |  |  |   syn region	cCppOutSkip	contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip | 
					
						
							|  |  |  |   syn region	cCppInSkip	contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | syn region	cIncluded	display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ | 
					
						
							|  |  |  | syn match	cIncluded	display contained "<[^>]*>" | 
					
						
							|  |  |  | syn match	cInclude	display "^\s*\zs\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded | 
					
						
							|  |  |  | "syn match cLineSkip	"\\$" | 
					
						
							|  |  |  | syn cluster	cPreProcGroup	contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti,cBadBlock | 
					
						
							|  |  |  | syn region	cDefine		start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell | 
					
						
							|  |  |  | syn region	cPreProc	start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-10-05 22:26:30 +02:00
										 |  |  | hi def link dtsCellProperty     Number | 
					
						
							|  |  |  | hi def link dtsBinaryProperty   Number | 
					
						
							|  |  |  | hi def link dtsStringProperty   String | 
					
						
							|  |  |  | hi def link dtsKeyword          Include | 
					
						
							|  |  |  | hi def link dtsLabel            Label | 
					
						
							| 
									
										
										
										
											2013-03-19 11:35:58 +01:00
										 |  |  | hi def link dtsNode             Structure | 
					
						
							| 
									
										
										
										
											2012-10-05 22:26:30 +02:00
										 |  |  | hi def link dtsReference        Macro | 
					
						
							|  |  |  | hi def link dtsComment          Comment | 
					
						
							| 
									
										
										
										
											2021-05-16 12:39:47 +02:00
										 |  |  | hi def link dtsCommentInner     Comment | 
					
						
							| 
									
										
										
										
											2013-11-03 21:14:31 +01:00
										 |  |  | hi def link dtsCommentLine      Comment | 
					
						
							| 
									
										
										
										
											2021-05-16 12:39:47 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | hi def link cInclude		Include | 
					
						
							|  |  |  | hi def link cPreProc		PreProc | 
					
						
							|  |  |  | hi def link cDefine		Macro | 
					
						
							|  |  |  | hi def link cIncluded		cString | 
					
						
							|  |  |  | hi def link cString		String | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | hi def link cCppInWrapper	cCppOutWrapper | 
					
						
							|  |  |  | hi def link cCppOutWrapper	cPreCondit | 
					
						
							|  |  |  | hi def link cPreConditMatch	cPreCondit | 
					
						
							|  |  |  | hi def link cPreCondit		PreCondit | 
					
						
							|  |  |  | hi def link cCppOutSkip		cCppOutIf2 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | hi def link cCppInElse2		cCppOutIf2 | 
					
						
							|  |  |  | hi def link cCppOutIf2		cCppOut | 
					
						
							|  |  |  | hi def link cCppOut		Comment |