diff options
author | Ondrej Filip <feela@network.cz> | 2015-03-09 23:59:26 +0100 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2015-03-09 23:59:26 +0100 |
commit | a5a5a41e2ee51ad6dfef0ab24e07d6d9b16a4215 (patch) | |
tree | 9d0584259fb60b5df03ac489967e1cf65180f881 /nest | |
parent | 509aab5debef5b4710d8983da6ef076a226fd7ea (diff) |
Possibility to define unnamed protocols from template added.
Diffstat (limited to 'nest')
-rw-r--r-- | nest/config.Y | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nest/config.Y b/nest/config.Y index 8e1e9880..939bed6a 100644 --- a/nest/config.Y +++ b/nest/config.Y @@ -181,6 +181,12 @@ proto_name: cf_define_symbol($1, this_proto->class, this_proto); this_proto->name = $1->name; } + | FROM SYM { + struct symbol *s = cf_default_name(this_proto->protocol->template, &this_proto->protocol->name_counter); + 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"); |