configfile: make whitespace optional for modes (Thanks tsdh)

next
Michael Stapelberg 2009-11-06 15:42:03 +01:00
parent c6d1b68a9b
commit 6aab45e7a4
1 changed files with 6 additions and 1 deletions

View File

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