summaryrefslogtreecommitdiffstats
path: root/lexer
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-01-07 00:23:39 +0100
committerDave Davenport <qball@gmpclient.org>2017-01-07 00:23:39 +0100
commit0d9804f108fa0610f774446fb8e69ab26dfeb374 (patch)
tree18c8c32d116dd5d729b7ce4b0330e87bca43de31 /lexer
parente388aa95c758f115188f63bb732859716dd19c65 (diff)
Don't allow global properties, need to be in a * { }
Diffstat (limited to 'lexer')
-rw-r--r--lexer/theme-lexer.l20
-rw-r--r--lexer/theme-parser.y17
2 files changed, 12 insertions, 25 deletions
diff --git a/lexer/theme-lexer.l b/lexer/theme-lexer.l
index 0df89107..5a946cae 100644
--- a/lexer/theme-lexer.l
+++ b/lexer/theme-lexer.l
@@ -237,43 +237,43 @@ if ( queue == NULL ){
}
<PROPERTIES>{CENTER} {
- yylval->sval = WL_CENTER;
+ yylval->ival = WL_CENTER;
return T_POSITION;
}
<PROPERTIES>{EAST} {
- yylval->sval = WL_EAST;
+ yylval->ival = WL_EAST;
return T_POSITION;
}
<PROPERTIES>{WEST} {
- yylval->sval = WL_WEST;
+ yylval->ival = WL_WEST;
return T_POSITION;
}
<PROPERTIES>{SOUTH}{EAST} {
- yylval->sval = WL_SOUTH_EAST;
+ yylval->ival = WL_SOUTH_EAST;
return T_POSITION;
}
<PROPERTIES>{SOUTH}{WEST} {
- yylval->sval = WL_SOUTH_WEST;
+ yylval->ival = WL_SOUTH_WEST;
return T_POSITION;
}
<PROPERTIES>{SOUTH} {
- yylval->sval = WL_SOUTH;
+ yylval->ival = WL_SOUTH;
return T_POSITION;
}
<PROPERTIES>{NORTH}{EAST} {
- yylval->sval = WL_NORTH_EAST;
+ yylval->ival = WL_NORTH_EAST;
return T_POSITION;
}
<PROPERTIES>{NORTH}{WEST} {
- yylval->sval = WL_NORTH_WEST;
+ yylval->ival = WL_NORTH_WEST;
return T_POSITION;
}
<PROPERTIES>{NORTH} {
- yylval->sval = WL_NORTH;
+ yylval->ival = WL_NORTH;
return T_POSITION;
}
<PROPERTIES>NORTH {
- yylval->sval = WL_NORTH;
+ yylval->ival = WL_NORTH;
return T_POSITION;
}
<INITIAL><<EOF>> {
diff --git a/lexer/theme-parser.y b/lexer/theme-parser.y
index 4bf811df..d0f52f50 100644
--- a/lexer/theme-parser.y
+++ b/lexer/theme-parser.y
@@ -14,7 +14,6 @@
#include <glib.h>
-#include "theme.h"
#include "lexer/theme-parser.h"
ThemeWidget *rofi_theme = NULL;
void yyerror(YYLTYPE *yylloc, const char* s);
@@ -38,7 +37,7 @@ int yylex (YYSTYPE *, YYLTYPE *);
%token <fval> T_DOUBLE
%token <sval> T_STRING
%token <sval> N_STRING
-%token <sval> T_POSITION;
+%token <ival> T_POSITION;
%token <sval> NAME_ELEMENT
%token <bval> T_BOOLEAN
%token <colorval> T_COLOR
@@ -58,23 +57,14 @@ int yylex (YYSTYPE *, YYLTYPE *);
%type <sval> entry
%type <sval> pvalue
%type <theme> entries
-%type <theme> start
%type <name_path> name_path
%type <property> property
%type <property_list> property_list
%type <property_list> optional_properties
-%start start
+%start entries
%%
-start:
- entries
- optional_properties
- {
- $$ = $1;
- rofi_theme_widget_add_properties ( $$, $2 );
- }
-;
entries:
%empty {
// There is always a base widget.
@@ -82,10 +72,7 @@ entries:
rofi_theme->name = g_strdup ( "Root" );
}
| entries
- optional_properties
entry {
- $$ = $1;
- rofi_theme_widget_add_properties ( $$, $2);
}
;