summaryrefslogtreecommitdiffstats
path: root/lexer
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2020-04-26 11:43:14 +0200
committerDave Davenport <qball@gmpclient.org>2020-04-26 11:43:14 +0200
commit9a3d4b1d2ecbc0746c49ca7d822a17e8a5c44f44 (patch)
tree122c28710cd8c426d87cecc5463d54712f6b6b28 /lexer
parent09704eb49c6cc9cbd694377d00474bb67b5da059 (diff)
[Test] Fix compiler warning, theme test (bug in lexer) and more.
Diffstat (limited to 'lexer')
-rw-r--r--lexer/theme-lexer.l2
-rw-r--r--lexer/theme-parser.y7
2 files changed, 3 insertions, 6 deletions
diff --git a/lexer/theme-lexer.l b/lexer/theme-lexer.l
index ec1ccc0b..61b099f2 100644
--- a/lexer/theme-lexer.l
+++ b/lexer/theme-lexer.l
@@ -185,7 +185,6 @@ ENV $\{[[:alnum:]]*\}
MODIFIER_ADD \+
MODIFIER_SUBTRACT -
-MODIFIER_DIVIDE \/
MODIFIER_MULTIPLY \*
/* Position */
@@ -459,7 +458,6 @@ if ( queue == NULL ){
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT>{MODIFIER_ADD} { return T_MODIFIER_ADD; }
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT>{MODIFIER_SUBTRACT} { return T_MODIFIER_SUBTRACT; }
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT>{MODIFIER_MULTIPLY} { return T_MODIFIER_MULTIPLY; }
-<PROPERTIES,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT>{MODIFIER_DIVIDE} { return T_MODIFIER_DIVIDE; }
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT>{CALC} { return T_CALC; }
<PROPERTIES,PROPERTIES_ENV,PROPERTIES_VAR_DEFAULT>{ENV} {
diff --git a/lexer/theme-parser.y b/lexer/theme-parser.y
index c93e8c7f..8bc0b5fa 100644
--- a/lexer/theme-parser.y
+++ b/lexer/theme-parser.y
@@ -213,7 +213,6 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b)
%token T_MODIFIER_ADD "Add ('+')"
%token T_MODIFIER_SUBTRACT "Subtract ('-')"
-%token T_MODIFIER_DIVIDE "Divide ('/')"
%token T_MODIFIER_MULTIPLY "Multiply ('*')"
%token T_CALC "calc"
@@ -649,7 +648,7 @@ t_property_distance_unit
| T_PARENT_LEFT t_property_distance_unit_math2 T_PARENT_RIGHT {
$$ = g_slice_new0(RofiDistanceUnit);
$$->distance = 0;
- $$->type = ROFI_DISTANCE_MODIFIER_NONE;
+ $$->type = ROFI_PU_PX;
$$->left = $2;
$$->right = 0;
$$->modtype = ROFI_DISTANCE_MODIFIER_GROUP;
@@ -666,7 +665,7 @@ t_property_distance_unit_math
$$->right = $3;
$$->modtype = ROFI_DISTANCE_MODIFIER_MULTIPLY;
}
-| t_property_distance_unit_math T_MODIFIER_DIVIDE t_property_distance_unit {
+| t_property_distance_unit_math T_FORWARD_SLASH t_property_distance_unit {
$$ = g_slice_new0(RofiDistanceUnit);
$$->left = $1;
$$->right = $3;
@@ -723,7 +722,7 @@ t_property_distance
}
| T_CALC T_PARENT_LEFT t_property_distance_unit_math2 T_PARENT_RIGHT t_property_line_style {
$$.base.distance = 0;
- $$.base.type = ROFI_DISTANCE_MODIFIER_NONE;
+ $$.base.type = ROFI_PU_PX;
$$.base.left = $3;
$$.base.right = NULL;
$$.base.modtype = ROFI_DISTANCE_MODIFIER_GROUP;