Mercurial > vim
comparison runtime/syntax/yacc.vim @ 16208:a23c883685cb
Update runtime files.
commit https://github.com/vim/vim/commit/723dd946f94856be94a943876945fb1bd8169059
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Apr 4 13:11:03 2019 +0200
Update runtime files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 04 Apr 2019 13:15:07 +0200 |
parents | 46763b01cd9a |
children | 8edf0aeb71b9 |
comparison
equal
deleted
inserted
replaced
16207:7e3a172a7f09 | 16208:a23c883685cb |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: Yacc | 2 " Language: Yacc |
3 " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> | 3 " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> |
4 " Last Change: Aug 31, 2016 | 4 " Last Change: Mar 25, 2019 |
5 " Version: 15 | 5 " Version: 16 |
6 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_YACC | 6 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_YACC |
7 " | 7 " |
8 " Options: {{{1 | 8 " Options: {{{1 |
9 " g:yacc_uses_cpp : if this variable exists, then C++ is loaded rather than C | 9 " g:yacc_uses_cpp : if this variable exists, then C++ is loaded rather than C |
10 | 10 |
41 syn cluster yaccInitCluster contains=yaccKey,yaccKeyActn,yaccBrkt,yaccType,yaccString,yaccUnionStart,yaccHeader2,yaccComment,yaccDefines,yaccParseParam,yaccParseOption | 41 syn cluster yaccInitCluster contains=yaccKey,yaccKeyActn,yaccBrkt,yaccType,yaccString,yaccUnionStart,yaccHeader2,yaccComment,yaccDefines,yaccParseParam,yaccParseOption |
42 syn cluster yaccRulesCluster contains=yaccNonterminal,yaccString,yaccComment | 42 syn cluster yaccRulesCluster contains=yaccNonterminal,yaccString,yaccComment |
43 | 43 |
44 " --------------------------------------------------------------------- | 44 " --------------------------------------------------------------------- |
45 " Yacc Sections: {{{1 | 45 " Yacc Sections: {{{1 |
46 SynFold syn region yaccInit start='.'ms=s-1,rs=s-1 matchgroup=yaccSectionSep end='^%%$'me=e-2,re=e-2 contains=@yaccInitCluster nextgroup=yaccRules skipwhite skipempty contained | 46 SynFold syn region yaccInit start='.'ms=s-1,rs=s-1 matchgroup=yaccSectionSep end='^%%\ze\(\s*/[*/].*\)\=$'me=e-2,re=e-2 contains=@yaccInitCluster nextgroup=yaccRules skipwhite skipempty contained |
47 SynFold syn region yaccInit2 start='\%^.'ms=s-1,rs=s-1 matchgroup=yaccSectionSep end='^%%$'me=e-2,re=e-2 contains=@yaccInitCluster nextgroup=yaccRules skipwhite skipempty | 47 SynFold syn region yaccInit2 start='\%^.'ms=s-1,rs=s-1 matchgroup=yaccSectionSep end='^%%\ze\(\s*/[*/].*\)\=$'me=e-2,re=e-2 contains=@yaccInitCluster nextgroup=yaccRules skipwhite skipempty |
48 SynFold syn region yaccHeader2 matchgroup=yaccSep start="^\s*\zs%{" end="^\s*%}" contains=@yaccCode nextgroup=yaccInit skipwhite skipempty contained | 48 SynFold syn region yaccHeader2 matchgroup=yaccSep start="^\s*\zs%{" end="^\s*%}" contains=@yaccCode nextgroup=yaccInit skipwhite skipempty contained |
49 SynFold syn region yaccHeader matchgroup=yaccSep start="^\s*\zs%{" end="^\s*%}" contains=@yaccCode nextgroup=yaccInit skipwhite skipempty | 49 SynFold syn region yaccHeader matchgroup=yaccSep start="^\s*\zs%{" end="^\s*%}" contains=@yaccCode nextgroup=yaccInit skipwhite skipempty |
50 SynFold syn region yaccRules matchgroup=yaccSectionSep start='^%%$' end='^%%$'me=e-2,re=e-2 contains=@yaccRulesCluster nextgroup=yaccEndCode skipwhite skipempty contained | 50 SynFold syn region yaccRules matchgroup=yaccSectionSep start='^%%\ze\(\s*/[*/].*\)\=$' end='^%%\ze\(\s*/[*/].*\)\=$'me=e-2,re=e-2 contains=@yaccRulesCluster nextgroup=yaccEndCode skipwhite skipempty contained |
51 SynFold syn region yaccEndCode matchgroup=yaccSectionSep start='^%%$' end='\%$' contains=@yaccCode contained | 51 SynFold syn region yaccEndCode matchgroup=yaccSectionSep start='^%%\ze\(\s*/[*/].*\)\=$' end='\%$' contains=@yaccCode contained |
52 | 52 |
53 " --------------------------------------------------------------------- | 53 " --------------------------------------------------------------------- |
54 " Yacc Commands: {{{1 | 54 " Yacc Commands: {{{1 |
55 syn match yaccDefines '^%define\s\+.*$' | 55 syn match yaccDefines '^%define\s\+.*$' |
56 syn match yaccParseParam '%\(parse\|lex\)-param\>' skipwhite nextgroup=yaccParseParamStr | 56 syn match yaccParseParam '%\(parse\|lex\)-param\>' skipwhite nextgroup=yaccParseParamStr |
70 syn match yaccBrkt "[<>]" contained | 70 syn match yaccBrkt "[<>]" contained |
71 syn match yaccType "<[a-zA-Z_][a-zA-Z0-9_]*>" contains=yaccBrkt contained | 71 syn match yaccType "<[a-zA-Z_][a-zA-Z0-9_]*>" contains=yaccBrkt contained |
72 | 72 |
73 SynFold syn region yaccNonterminal start="^\s*\a\w*\ze\_s*\(/\*\_.\{-}\*/\)\=\_s*:" matchgroup=yaccDelim end=";" matchgroup=yaccSectionSep end='^%%$'me=e-2,re=e-2 contains=yaccAction,yaccDelim,yaccString,yaccComment contained | 73 SynFold syn region yaccNonterminal start="^\s*\a\w*\ze\_s*\(/\*\_.\{-}\*/\)\=\_s*:" matchgroup=yaccDelim end=";" matchgroup=yaccSectionSep end='^%%$'me=e-2,re=e-2 contains=yaccAction,yaccDelim,yaccString,yaccComment contained |
74 syn region yaccComment start="/\*" end="\*/" | 74 syn region yaccComment start="/\*" end="\*/" |
75 syn region yaccComment start="//" end="$" | |
75 syn match yaccString "'[^']*'" contained | 76 syn match yaccString "'[^']*'" contained |
76 | 77 |
77 | 78 |
78 " --------------------------------------------------------------------- | 79 " --------------------------------------------------------------------- |
79 " I'd really like to highlight just the outer {}. Any suggestions??? {{{1 | 80 " I'd really like to highlight just the outer {}. Any suggestions??? {{{1 |