]> Dogcows Code - chaz/openbox/blobdiff - util/epist/epist.y
include the config.h header
[chaz/openbox] / util / epist / epist.y
index c1bf196dcdb748de4156a65d96fc70fd297f515f..d187e96f0c2f19c5da9222b46b0f83452df40813 100644 (file)
@@ -1,4 +1,8 @@
 %{
+#ifdef    HAVE_CONFIG_H
+#  include "../../config.h"
+#endif // HAVE_CONFIG_H
+
 #include <stdio.h>
 #include <string.h>
 #include "parser.hh"
@@ -20,12 +24,13 @@ void yyerror(const char *c) {
 
 %}
 
-%token OBRACE EBRACE SEMICOLON DASH NUMBER QUOTES WORD BINDING 
+%token OBRACE EBRACE SEMICOLON DASH NUMBER QUOTES WORD BINDING OPTIONS TRUE FALSE
 
 %%
 
 commands:
     | commands command
+    | commands options_block
     ;
 
 command:
@@ -48,6 +53,10 @@ chain_command:
     }
     ;
 
+options_block:
+    options_keyword OBRACE options EBRACE
+    ;
+
 binding:
     binding_w_modifier bind_key
     ;
@@ -77,6 +86,21 @@ parameter:
     | NUMBER      { ((parser*)parser_obj)->setArgumentNum($1); }
     | DASH NUMBER { ((parser*)parser_obj)->setArgumentNegNum($2); }
     | QUOTES      { ((parser*)parser_obj)->setArgumentStr($1); }
+    | TRUE        { ((parser*)parser_obj)->setArgumentTrue($1); }
+    | FALSE       { ((parser*)parser_obj)->setArgumentFalse($1); }
+    ;
+
+options_keyword:
+    OPTIONS
+    ;
+
+options:
+    | options option
+    ;
+
+option:
+    WORD parameter SEMICOLON
+    { ((parser*)parser_obj)->setOption($1); }
     ;
 
 %%
This page took 0.020717 seconds and 4 git commands to generate.