1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

[Grammar] Fix parsing of calc as element name

issue: #1582
This commit is contained in:
Dave Davenport 2022-02-01 16:35:35 +01:00
parent a34c13bdb2
commit 58a5b9d277
2 changed files with 14 additions and 4 deletions

View file

@ -670,8 +670,8 @@ if ( queue == NULL ) {
BEGIN(GPOINTER_TO_INT(g_queue_pop_head ( queue )));
return T_PARENT_RIGHT;
}
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT>{S_T_PARENT_LEFT} { return T_PARENT_LEFT; }
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT>{S_T_PARENT_RIGHT} { return T_PARENT_RIGHT; }
<PROPERTIES_ARRAY,PROPERTIES,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT>{S_T_PARENT_LEFT} { return T_PARENT_LEFT; }
<PROPERTIES,PROPERTIES_ARRAY,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT>{S_T_PARENT_RIGHT} { return T_PARENT_RIGHT; }
<PROPERTIES,PROPERTIES_ARRAY,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT>{COMMA} { return T_COMMA; }
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT>{LIST_OPEN} {
g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) );

View file

@ -659,13 +659,23 @@ t_property_element_list
p->value.s = $1;
$$ = g_list_append ( NULL, p);
}
| T_CALC {
Property *p = rofi_theme_property_create ( P_STRING );
p->value.s = g_strdup("calc");
$$ = g_list_append ( NULL, p);
}
| t_property_element_list T_COMMA t_property_element {
$$ = g_list_append ( $1, $3 );
}
| t_property_element_list T_COMMA T_ELEMENT {
Property *p = rofi_theme_property_create ( P_STRING );
p->value.s = $3;
$$ = g_list_append ( $1, p);
}
| t_property_element_list T_COMMA t_property_element {
$$ = g_list_append ( $1, $3 );
| t_property_element_list T_COMMA T_CALC {
Property *p = rofi_theme_property_create ( P_STRING );
p->value.s = g_strdup("calc");
$$ = g_list_append ( $1, p);
}
;