aboutsummaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2019-07-30 14:28:40 +0200
committerMaria Matejka <mq@ucw.cz>2019-07-30 14:28:40 +0200
commit2de1e2062eba66893a36f5a84f922c880ab6c351 (patch)
tree26ec369d8f0eb33a608b4ae29e4407e6e5aa7bab /filter
parent48addc88be27c46d83805ec2854bf1b5e0f0ddb3 (diff)
downloadbird-2de1e2062eba66893a36f5a84f922c880ab6c351.tar.gz
Conf: Fixed symbol redefinition
Diffstat (limited to 'filter')
-rw-r--r--filter/config.Y12
1 files changed, 6 insertions, 6 deletions
diff --git a/filter/config.Y b/filter/config.Y
index 83319194..8171a7c2 100644
--- a/filter/config.Y
+++ b/filter/config.Y
@@ -467,7 +467,7 @@ CF_GRAMMAR
conf: filter_def ;
filter_def:
- FILTER CF_SYM_VOID { $2 = cf_define_symbol($2, SYM_FILTER, filter, NULL); cf_push_scope( $2 ); }
+ FILTER symbol { $2 = cf_define_symbol($2, SYM_FILTER, filter, NULL); cf_push_scope( $2 ); }
filter_body {
struct filter *f = cfg_alloc(sizeof(struct filter));
*f = (struct filter) { .sym = $2, .root = $4 };
@@ -483,7 +483,7 @@ filter_eval:
;
conf: custom_attr ;
-custom_attr: ATTRIBUTE type CF_SYM_VOID ';' {
+custom_attr: ATTRIBUTE type symbol ';' {
cf_define_symbol($3, SYM_ATTRIBUTE, attribute, ca_lookup(new_config->pool, $3->name, $2)->fda);
};
@@ -555,7 +555,7 @@ type:
function_argsn:
/* EMPTY */
- | function_argsn type CF_SYM_VOID ';' {
+ | function_argsn type symbol ';' {
if ($3->scope->slots >= 0xfe) cf_error("Too many declarations, at most 255 allowed");
cf_define_symbol($3, SYM_VARIABLE | $2, offset, $3->scope->slots++);
}
@@ -563,7 +563,7 @@ function_argsn:
function_args:
'(' ')' { $$ = 0; }
- | '(' function_argsn type CF_SYM_VOID ')' {
+ | '(' function_argsn type symbol ')' {
cf_define_symbol($4, SYM_VARIABLE | $3, offset, $4->scope->slots++);
$$ = $4->scope->slots;
}
@@ -571,7 +571,7 @@ function_args:
function_vars:
/* EMPTY */ { $$ = 0; }
- | function_vars type CF_SYM_VOID ';' {
+ | function_vars type symbol ';' {
cf_define_symbol($3, SYM_VARIABLE | $2, offset, $3->scope->slots++);
$$ = $1 + 1;
}
@@ -607,7 +607,7 @@ function_body:
conf: function_def ;
function_def:
- FUNCTION CF_SYM_VOID { DBG( "Beginning of function %s\n", $2->name );
+ FUNCTION symbol { DBG( "Beginning of function %s\n", $2->name );
$2 = cf_define_symbol($2, SYM_FUNCTION, function, NULL);
cf_push_scope($2);
} function_args function_body {