From 9a7314a6076f0f6090cae9967d50db9032d951a6 Mon Sep 17 00:00:00 2001 From: thurston Date: Thu, 25 Jan 2007 02:36:29 +0000 Subject: [PATCH] Improved the sync patterns. git-svn-id: http://svn.complang.org/ragel/trunk@11 052ea7fc-9027-0410-9066-f65837a77df0 --- ragel.vim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ragel.vim b/ragel.vim index acb5b47..2f09b60 100644 --- a/ragel.vim +++ b/ragel.vim @@ -132,9 +132,11 @@ syntax keyword rlWriteOptions noerror nofinal noprefix noend 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 -- 2.7.4