summaryrefslogtreecommitdiff
path: root/runtime/syntax/yacc.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-04-04 13:11:03 +0200
committerBram Moolenaar <Bram@vim.org>2019-04-04 13:11:03 +0200
commit723dd946f94856be94a943876945fb1bd8169059 (patch)
treebbccfb567f3565a0a5bd2eb06b3c7e90181ef4ee /runtime/syntax/yacc.vim
parent7a66627cf43412604a28e0d99df8f96a29ff1c3a (diff)
downloadvim-git-723dd946f94856be94a943876945fb1bd8169059.tar.gz
Update runtime files.
Diffstat (limited to 'runtime/syntax/yacc.vim')
-rw-r--r--runtime/syntax/yacc.vim17
1 files changed, 9 insertions, 8 deletions
diff --git a/runtime/syntax/yacc.vim b/runtime/syntax/yacc.vim
index 01e342ee2..8e4a225ff 100644
--- a/runtime/syntax/yacc.vim
+++ b/runtime/syntax/yacc.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Yacc
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: Aug 31, 2016
-" Version: 15
+" Last Change: Mar 25, 2019
+" Version: 16
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_YACC
"
" Options: {{{1
@@ -43,12 +43,12 @@ syn cluster yaccRulesCluster contains=yaccNonterminal,yaccString,yaccComment
" ---------------------------------------------------------------------
" Yacc Sections: {{{1
-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
-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
-SynFold syn region yaccHeader2 matchgroup=yaccSep start="^\s*\zs%{" end="^\s*%}" contains=@yaccCode nextgroup=yaccInit skipwhite skipempty contained
-SynFold syn region yaccHeader matchgroup=yaccSep start="^\s*\zs%{" end="^\s*%}" contains=@yaccCode nextgroup=yaccInit skipwhite skipempty
-SynFold syn region yaccRules matchgroup=yaccSectionSep start='^%%$' end='^%%$'me=e-2,re=e-2 contains=@yaccRulesCluster nextgroup=yaccEndCode skipwhite skipempty contained
-SynFold syn region yaccEndCode matchgroup=yaccSectionSep start='^%%$' end='\%$' contains=@yaccCode contained
+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
+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
+SynFold syn region yaccHeader2 matchgroup=yaccSep start="^\s*\zs%{" end="^\s*%}" contains=@yaccCode nextgroup=yaccInit skipwhite skipempty contained
+SynFold syn region yaccHeader matchgroup=yaccSep start="^\s*\zs%{" end="^\s*%}" contains=@yaccCode nextgroup=yaccInit skipwhite skipempty
+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
+SynFold syn region yaccEndCode matchgroup=yaccSectionSep start='^%%\ze\(\s*/[*/].*\)\=$' end='\%$' contains=@yaccCode contained
" ---------------------------------------------------------------------
" Yacc Commands: {{{1
@@ -72,6 +72,7 @@ syn match yaccType "<[a-zA-Z_][a-zA-Z0-9_]*>" contains=yaccBrkt contained
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
syn region yaccComment start="/\*" end="\*/"
+syn region yaccComment start="//" end="$"
syn match yaccString "'[^']*'" contained