3 # include "../../config.h"
4 #endif // HAVE_CONFIG_H
10 #define YYPARSE_PARAM parser_obj
20 void yyerror(const char *c) {
21 printf("ERROR: %s\n", c);
27 %token OBRACE EBRACE SEMICOLON DASH NUMBER QUOTES WORD BINDING OPTIONS TRUE FALSE
33 | commands options_block
37 action_command | chain_command
41 binding WORD parameter SEMICOLON
43 ((parser*)parser_obj)->setAction($2);
44 ((parser*)parser_obj)->endAction();
50 binding obrace commands ebrace
52 ((parser*)parser_obj)->endChain();
57 options_keyword OBRACE options EBRACE
61 binding_w_modifier bind_key
65 OBRACE { ((parser*)parser_obj)->startChain(); }
69 EBRACE { /* ((parser*)parser_obj)->endChain(); */ }
73 | BINDING DASH binding_w_modifier { ((parser*)parser_obj)->addModifier($1); }
77 OBRACE { ((parser*)parser_obj)->setKey($1); }
78 | EBRACE { ((parser*)parser_obj)->setKey($1); }
79 | DASH { ((parser*)parser_obj)->setKey($1); }
80 | SEMICOLON { ((parser*)parser_obj)->setKey($1); }
81 | NUMBER { ((parser*)parser_obj)->setKey($1); }
82 | WORD { ((parser*)parser_obj)->setKey($1); }
86 | NUMBER { ((parser*)parser_obj)->setArgumentNum($1); }
87 | DASH NUMBER { ((parser*)parser_obj)->setArgumentNegNum($2); }
88 | QUOTES { ((parser*)parser_obj)->setArgumentStr($1); }
89 | TRUE { ((parser*)parser_obj)->setArgumentTrue($1); }
90 | FALSE { ((parser*)parser_obj)->setArgumentFalse($1); }
102 WORD parameter SEMICOLON
103 { ((parser*)parser_obj)->setOption($1); }