diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-05-25 23:41:15 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-05-25 23:41:15 +0200 |
commit | c23df70aebf9d6926303b4ddb8d099a4d285949f (patch) | |
tree | 2eb4f57db7550584a032340d8f42a4492a634358 /lexer/theme-parser.y | |
parent | e387105091fb9802de474d00035a640bf06dabc3 (diff) |
Allow interface to be dynamically changed.
Diffstat (limited to 'lexer/theme-parser.y')
-rw-r--r-- | lexer/theme-parser.y | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/lexer/theme-parser.y b/lexer/theme-parser.y index d66b7cc4..fd290e85 100644 --- a/lexer/theme-parser.y +++ b/lexer/theme-parser.y @@ -141,7 +141,7 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b) WindowLocation wloc; ThemeColor colorval; ThemeWidget *theme; - GList *name_path; + GList *list; Property *property; GHashTable *property_list; Distance distance; @@ -163,6 +163,7 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b) %token <bval> T_BOOLEAN "Boolean value (true or false)" %token <colorval> T_COLOR "Hexidecimal color value" %token <sval> T_LINK "Reference" +%token <sval> T_ELEMENT "Name of element" %token T_POS_CENTER "Center" %token T_POS_EAST "East" %token T_POS_WEST "West" @@ -198,6 +199,8 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b) %token T_OPTIONAL_COMMA "Optional comma separator (',')" %token T_FORWARD_SLASH "forward slash ('/')" %token T_PERCENT "Percent sign ('%')" +%token T_LIST_OPEN "List open ('[')" +%token T_LIST_CLOSE "List close (']')" %token T_BOPEN "bracket open ('{')" %token T_BCLOSE "bracket close ('}')" @@ -213,7 +216,7 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b) %type <sval> t_entry %type <theme> t_entry_list -%type <name_path> t_entry_name_path +%type <list> t_entry_name_path %type <property> t_property %type <property_list> t_property_list %type <property_list> t_property_list_optional @@ -232,6 +235,7 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b) %type <ival> t_property_highlight_styles %type <ival> t_property_highlight_style %type <ival> t_property_line_style +%type <list> t_property_element_list %start t_entry_list %% @@ -363,6 +367,19 @@ t_property $$->name = $1; $$->value.color = $3; } +| t_property_name T_PSEP T_LIST_OPEN t_property_element_list T_LIST_CLOSE T_PCLOSE { + $$ = rofi_theme_property_create ( P_LIST ); + $$->name = $1; + $$->value.list = $4; +} +; + +/** List of elements */ +t_property_element_list +: T_ELEMENT { $$ = g_list_append ( NULL, $1); } +| t_property_element_list T_COMMA T_ELEMENT { + $$ = g_list_append ( $1, $3 ); +} ; /** |