parser: solve shift/reduce conflict by moving WHITESPACE token to the right place
This commit is contained in:
parent
e86fb42891
commit
8e1945a990
|
@ -276,7 +276,7 @@ word_or_number:
|
||||||
;
|
;
|
||||||
|
|
||||||
mode:
|
mode:
|
||||||
TOKMODE WHITESPACE QUOTEDSTRING WHITESPACE '{' optional_whitespace modelines optional_whitespace '}'
|
TOKMODE WHITESPACE QUOTEDSTRING WHITESPACE '{' modelines '}'
|
||||||
{
|
{
|
||||||
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,19 +298,15 @@ mode:
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
optional_whitespace:
|
|
||||||
/* empty */
|
|
||||||
| WHITESPACE
|
|
||||||
;
|
|
||||||
|
|
||||||
modelines:
|
modelines:
|
||||||
/* empty */
|
/* empty */
|
||||||
| modelines WHITESPACE modeline
|
|
||||||
| modelines modeline
|
| modelines modeline
|
||||||
;
|
;
|
||||||
|
|
||||||
modeline:
|
modeline:
|
||||||
comment
|
WHITESPACE
|
||||||
|
| comment
|
||||||
| binding
|
| binding
|
||||||
{
|
{
|
||||||
if (current_bindings == NULL) {
|
if (current_bindings == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue