summaryrefslogtreecommitdiff
path: root/conf/confbase.Y
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2014-05-29 23:05:03 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2014-05-29 23:05:03 +0200
commit9eceab33f97724be148f9f05614d7551940e85f1 (patch)
tree0d7867c13fc96a80c6c21051a2c4f376a6a05b43 /conf/confbase.Y
parent05476c4d04a24bdb26fa64e05ab31bc36118f34e (diff)
String constants could be used for string option values.
Thanks to Frederik Kriewitz for the patch.
Diffstat (limited to 'conf/confbase.Y')
-rw-r--r--conf/confbase.Y9
1 files changed, 9 insertions, 0 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; }