3 # include "../../config.h"
4 #endif // HAVE_CONFIG_H
10 #define YYPARSE_PARAM parser_obj
23 void yyerror(const char *c)
25 printf("ERROR: %s, on line %d, near %s\n", c, yylineno, yytext);
30 %token OBRACE EBRACE SEMICOLON DASH NUMBER QUOTES WORD BINDING OPTIONS TRUE FALSE
37 | commands options_block
41 action_command | chain_command
45 binding WORD parameter SEMICOLON
47 ((parser*)parser_obj)->setAction($2);
48 ((parser*)parser_obj)->endAction();
54 binding obrace commands ebrace
56 ((parser*)parser_obj)->endChain();
61 options_keyword OBRACE options EBRACE
65 binding_w_modifier bind_key
69 OBRACE { ((parser*)parser_obj)->startChain(); }
73 EBRACE { /* ((parser*)parser_obj)->endChain(); */ }
77 | BINDING DASH binding_w_modifier { ((parser*)parser_obj)->addModifier($1); }
81 OBRACE { ((parser*)parser_obj)->setKey($1); }
82 | EBRACE { ((parser*)parser_obj)->setKey($1); }
83 | DASH { ((parser*)parser_obj)->setKey($1); }
84 | SEMICOLON { ((parser*)parser_obj)->setKey($1); }
85 | NUMBER { ((parser*)parser_obj)->setKey($1); }
86 | WORD { ((parser*)parser_obj)->setKey($1); }
90 | NUMBER { ((parser*)parser_obj)->setArgumentNum($1); }
91 | DASH NUMBER { ((parser*)parser_obj)->setArgumentNegNum($2); }
92 | QUOTES { ((parser*)parser_obj)->setArgumentStr($1); }
93 | TRUE { ((parser*)parser_obj)->setArgumentTrue($1); }
94 | FALSE { ((parser*)parser_obj)->setArgumentFalse($1); }
106 WORD parameter SEMICOLON
107 { ((parser*)parser_obj)->setOption($1); }