" Keywords
" FIXME: Enable the range keyword post 5.17.
" syntax keyword rlKeywords machine action context include range contained
-syntax keyword rlKeywords machine action context include contained
-syntax keyword rlExprKeywords when err lerr eof from to contained
+syntax keyword rlKeywords machine action context include import export prepush postpop contained
+syntax keyword rlExprKeywords when inwhen outwhen err lerr eof from to contained
" Case Labels
syntax keyword caseLabelKeyword case contained
syntax region rlWrite matchgroup=Type start="\<write\>" matchgroup=NONE end=";" contained contains=rlWriteKeywords,rlWriteOptions
-syntax keyword rlWriteKeywords init data exec eof contained
-syntax keyword rlWriteOptions noerror nofinal noprefix noend contained
+syntax keyword rlWriteKeywords init data exec exports contained
+syntax keyword rlWriteOptions noerror nofinal noprefix noend nocs contained
"
" Sync at the start of machine specs.
"
-syntax sync match ragelSyncPat grouphere NONE "%%{&"
-syntax sync match ragelSyncPat grouphere NONE "%%[^{]&"
-syntax sync match ragelSyncPat grouphere NONE "}%%"
+" Match The ragel delimiters only if there quotes no ahead on the same line.
+" On the open marker, use & to consume the leader.
+syntax sync match ragelSyncPat grouphere NONE "^[^\'\"%]*%%{&^[^\'\"%]*"
+syntax sync match ragelSyncPat grouphere NONE "^[^\'\"%]*%%[^{]&^[^\'\"%]*"
+syntax sync match ragelSyncPat grouphere NONE "^[^\'\"]*}%%"
"
" Specifying Groups