Thanks to Frederik Kriewitz for the patch.
%type <time> datetime
%type <a> ipa
%type <px> prefix prefix_or_ipa
+%type <t> text
%type <t> text_or_none
%nonassoc PREFIX_DUMMY
}
;
+text:
+ TEXT
+ | SYM {
+ if ($1->class != (SYM_CONSTANT | T_STRING)) cf_error("String expected");
+ $$ = SYM_VAL($1).s;
+ }
+ ;
+
text_or_none:
TEXT { $$ = $1; }
| { $$ = NULL; }
| 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:
;
password_item_begin:
- PASSWORD TEXT {
+ PASSWORD text {
if (!this_p_list) {
this_p_list = cfg_alloc(sizeof(list));
init_list(this_p_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:
| 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;
;
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;
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);