Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
pccts.vim90 linesDownload Raw Back to syntax
1" Vim syntax file2" Language:	PCCTS3" Maintainer:	Scott Bigham <dsb@killerbunnies.org>4" Last Change:	10 Aug 19995 6" quit when a syntax file was already loaded7if exists("b:current_syntax")8  finish9endif10 11" Read the C++ syntax to start with12syn include @cppTopLevel syntax/cpp.vim13 14syn region pcctsAction matchgroup=pcctsDelim start="<<" end=">>?\=" contains=@cppTopLevel,pcctsRuleRef15 16syn region pcctsArgBlock matchgroup=pcctsDelim start="\(>\s*\)\=\[" end="\]" contains=@cppTopLevel,pcctsRuleRef17 18syn region pcctsString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=pcctsSpecialChar19syn match  pcctsSpecialChar "\\\\\|\\\"" contained20 21syn region pcctsComment start="/\*" end="\*/" contains=cTodo22syn match  pcctsComment "//.*$" contains=cTodo23 24syn region pcctsDirective start="^\s*#header\s\+<<" end=">>" contains=pcctsAction keepend25syn match  pcctsDirective "^\s*#parser\>.*$" contains=pcctsString,pcctsComment26syn match  pcctsDirective "^\s*#tokdefs\>.*$" contains=pcctsString,pcctsComment27syn match  pcctsDirective "^\s*#token\>.*$" contains=pcctsString,pcctsAction,pcctsTokenName,pcctsComment28syn region pcctsDirective start="^\s*#tokclass\s\+[A-Z]\i*\s\+{" end="}" contains=pcctsString,pcctsTokenName29syn match  pcctsDirective "^\s*#lexclass\>.*$" contains=pcctsTokenName30syn region pcctsDirective start="^\s*#errclass\s\+[^{]\+\s\+{" end="}" contains=pcctsString,pcctsTokenName31syn match pcctsDirective "^\s*#pred\>.*$" contains=pcctsTokenName,pcctsAction32 33syn cluster pcctsInRule contains=pcctsString,pcctsRuleName,pcctsTokenName,pcctsAction,pcctsArgBlock,pcctsSubRule,pcctsLabel,pcctsComment34 35syn region pcctsRule start="\<[a-z][A-Za-z0-9_]*\>\(\s*\[[^]]*\]\)\=\(\s*>\s*\[[^]]*\]\)\=\s*:" end=";" contains=@pcctsInRule36 37syn region pcctsSubRule matchgroup=pcctsDelim start="(" end=")\(+\|\*\|?\(\s*=>\)\=\)\=" contains=@pcctsInRule contained38syn region pcctsSubRule matchgroup=pcctsDelim start="{" end="}" contains=@pcctsInRule contained39 40syn match pcctsRuleName  "\<[a-z]\i*\>" contained41syn match pcctsTokenName "\<[A-Z]\i*\>" contained42 43syn match pcctsLabel "\<\I\i*:\I\i*" contained contains=pcctsLabelHack,pcctsRuleName,pcctsTokenName44syn match pcctsLabel "\<\I\i*:\"\([^\\]\|\\.\)*\"" contained contains=pcctsLabelHack,pcctsString45syn match pcctsLabelHack "\<\I\i*:" contained46 47syn match pcctsRuleRef "\$\I\i*\>" contained48syn match pcctsRuleRef "\$\d\+\(\.\d\+\)\>" contained49 50syn keyword pcctsClass     class   nextgroup=pcctsClassName skipwhite51syn match   pcctsClassName "\<\I\i*\>" contained nextgroup=pcctsClassBlock skipwhite skipnl52syn region pcctsClassBlock start="{" end="}" contained contains=pcctsRule,pcctsComment,pcctsDirective,pcctsAction,pcctsException,pcctsExceptionHandler53 54syn keyword pcctsException exception nextgroup=pcctsExceptionRuleRef skipwhite55syn match pcctsExceptionRuleRef "\[\I\i*\]" contained contains=pcctsExceptionID56syn match pcctsExceptionID "\I\i*" contained57syn keyword pcctsExceptionHandler	catch default58syn keyword pcctsExceptionHandler	NoViableAlt NoSemViableAlt59syn keyword pcctsExceptionHandler	MismatchedToken60 61syn sync clear62syn sync match pcctsSyncAction grouphere pcctsAction "<<"63syn sync match pcctsSyncAction "<<\([^>]\|>[^>]\)*>>"64syn sync match pcctsSyncRule grouphere pcctsRule "\<[a-z][A-Za-z0-9_]*\>\s*\[[^]]*\]\s*:"65syn sync match pcctsSyncRule grouphere pcctsRule "\<[a-z][A-Za-z0-9_]*\>\(\s*\[[^]]*\]\)\=\s*>\s*\[[^]]*\]\s*:"66 67" Define the default highlighting.68" Only when an item doesn't have highlighting yet69 70hi def link pcctsDelim		Special71hi def link pcctsTokenName		Identifier72hi def link pcctsRuleName		Statement73hi def link pcctsLabelHack		Label74hi def link pcctsDirective		PreProc75hi def link pcctsString		String76hi def link pcctsComment		Comment77hi def link pcctsClass		Statement78hi def link pcctsClassName		Identifier79hi def link pcctsException		Statement80hi def link pcctsExceptionHandler	Keyword81hi def link pcctsExceptionRuleRef	pcctsDelim82hi def link pcctsExceptionID	Identifier83hi def link pcctsRuleRef		Identifier84hi def link pcctsSpecialChar	SpecialChar85 86 87let b:current_syntax = "pccts"88 89" vim: ts=890 
codekingpro/portable-devtools · Team Ai