summaryrefslogtreecommitdiff
path: root/nest/config.Y
diff options
context:
space:
mode:
Diffstat (limited to 'nest/config.Y')
-rw-r--r--nest/config.Y6
1 files changed, 4 insertions, 2 deletions
diff --git a/nest/config.Y b/nest/config.Y
index 939bed6a..37551802 100644
--- a/nest/config.Y
+++ b/nest/config.Y
@@ -183,16 +183,18 @@ proto_name:
}
| FROM SYM {
struct symbol *s = cf_default_name(this_proto->protocol->template, &this_proto->protocol->name_counter);
+ s->class = this_proto->class;
+ s->def = this_proto;
this_proto->name = s->name;
+
if (($2->class != SYM_TEMPLATE) && ($2->class != SYM_PROTO)) cf_error("Template or protocol name expected");
proto_copy_config(this_proto, $2->def);
}
| SYM FROM SYM {
- if (($3->class != SYM_TEMPLATE) && ($3->class != SYM_PROTO)) cf_error("Template or protocol name expected");
-
cf_define_symbol($1, this_proto->class, this_proto);
this_proto->name = $1->name;
+ if (($3->class != SYM_TEMPLATE) && ($3->class != SYM_PROTO)) cf_error("Template or protocol name expected");
proto_copy_config(this_proto, $3->def);
}
;