1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

String constants could be used for string option values.

Thanks to Frederik Kriewitz for the patch.
This commit is contained in:
Ondrej Zajicek
2014-05-29 23:05:03 +02:00
parent 05476c4d04
commit 9eceab33f9
5 changed files with 16 additions and 7 deletions

View File

@@ -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; }