summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/confbase.Y9
-rw-r--r--nest/config.Y4
-rw-r--r--proto/bfd/config.Y2
-rw-r--r--proto/bgp/config.Y2
-rw-r--r--sysdep/unix/config.Y6
5 files changed, 16 insertions, 7 deletions
diff --git a/conf/confbase.Y b/conf/confbase.Y
index 8b9f206a..cba6fc56 100644
--- a/conf/confbase.Y
+++ b/conf/confbase.Y
@@ -77,6 +77,7 @@ CF_DECLS
%type <time> datetime
%type <a> ipa
%type <px> prefix prefix_or_ipa
+%type <t> text
%type <t> text_or_none
%nonassoc PREFIX_DUMMY
@@ -191,6 +192,14 @@ datetime:
}
;
+text:
+ TEXT
+ | SYM {
+ if ($1->class != (SYM_CONSTANT | T_STRING)) cf_error("String expected");
+ $$ = SYM_VAL($1).s;
+ }
+ ;
+
text_or_none:
TEXT { $$ = $1; }
| { $$ = NULL; }
diff --git a/nest/config.Y b/nest/config.Y
index 85c06e74..eef7422c 100644
--- a/nest/config.Y
+++ b/nest/config.Y
@@ -208,7 +208,7 @@ proto_item:
| IMPORT KEEP FILTERED bool { this_proto->in_keep_filtered = $4; }
| TABLE rtable { this_proto->table = $2; }
| ROUTER ID idval { this_proto->router_id = $3; }
- | DESCRIPTION TEXT { this_proto->dsc = $2; }
+ | DESCRIPTION text { this_proto->dsc = $2; }
;
imexport:
@@ -388,7 +388,7 @@ password_item:
;
password_item_begin:
- PASSWORD TEXT {
+ PASSWORD text {
if (!this_p_list) {
this_p_list = cfg_alloc(sizeof(list));
init_list(this_p_list);
diff --git a/proto/bfd/config.Y b/proto/bfd/config.Y
index 948079df..1b07495e 100644
--- a/proto/bfd/config.Y
+++ b/proto/bfd/config.Y
@@ -99,7 +99,7 @@ bfd_multihop: bfd_iface_start bfd_iface_opt_list
bfd_neigh_iface:
/* empty */ { $$ = NULL; }
| '%' SYM { $$ = if_get_by_name($2->name); }
- | DEV TEXT { $$ = if_get_by_name($2); }
+ | DEV text { $$ = if_get_by_name($2); }
;
bfd_neigh_local:
diff --git a/proto/bgp/config.Y b/proto/bgp/config.Y
index 6b885032..4d085d42 100644
--- a/proto/bgp/config.Y
+++ b/proto/bgp/config.Y
@@ -103,7 +103,7 @@ bgp_proto:
| bgp_proto ENABLE AS4 bool ';' { BGP_CFG->enable_as4 = $4; }
| bgp_proto CAPABILITIES bool ';' { BGP_CFG->capabilities = $3; }
| bgp_proto ADVERTISE IPV4 bool ';' { BGP_CFG->advertise_ipv4 = $4; }
- | bgp_proto PASSWORD TEXT ';' { BGP_CFG->password = $3; }
+ | bgp_proto PASSWORD text ';' { BGP_CFG->password = $3; }
| bgp_proto ROUTE LIMIT expr ';' {
this_proto->in_limit = cfg_allocz(sizeof(struct proto_limit));
this_proto->in_limit->limit = $4;
diff --git a/sysdep/unix/config.Y b/sysdep/unix/config.Y
index 1bba9a0d..7fd0ad2d 100644
--- a/sysdep/unix/config.Y
+++ b/sysdep/unix/config.Y
@@ -35,12 +35,12 @@ log_config: LOG log_file log_mask ';' {
;
syslog_name:
- NAME TEXT { $$ = $2; }
+ NAME text { $$ = $2; }
| { $$ = bird_name; }
;
log_file:
- TEXT {
+ text {
FILE *f = tracked_fopen(new_config->pool, $1, "a");
if (!f) cf_error("Unable to open log file `%s': %m", $1);
$$ = f;
@@ -76,7 +76,7 @@ CF_ADDTO(conf, mrtdump_base)
mrtdump_base:
MRTDUMP PROTOCOLS mrtdump_mask ';' { new_config->proto_default_mrtdump = $3; }
- | MRTDUMP TEXT ';' {
+ | MRTDUMP text ';' {
FILE *f = tracked_fopen(new_config->pool, $2, "a");
if (!f) cf_error("Unable to open MRTDump file '%s': %m", $2);
new_config->mrtdump_file = fileno(f);