configfile: make whitespace optional for modes (Thanks tsdh)

This commit is contained in:
Michael Stapelberg 2009-11-06 15:42:03 +01:00
parent c6d1b68a9b
commit 6aab45e7a4

View File

@ -276,7 +276,7 @@ word_or_number:
;
mode:
TOKMODE WHITESPACE QUOTEDSTRING WHITESPACE '{' WHITESPACE modelines WHITESPACE '}'
TOKMODE WHITESPACE QUOTEDSTRING WHITESPACE '{' optional_whitespace modelines optional_whitespace '}'
{
if (strcasecmp($<string>3, "default") == 0) {
printf("You cannot use the name \"default\" for your mode\n");
@ -298,6 +298,11 @@ mode:
}
;
optional_whitespace:
/* empty */
| WHITESPACE
;
modelines:
/* empty */
| modelines WHITESPACE modeline