summaryrefslogtreecommitdiffstats
path: root/src/parser_bison.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r--src/parser_bison.y16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y
index b86381d9..cd4e096a 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -396,6 +396,8 @@ static void location_update(struct location *loc, struct location *rhs, int n)
%type <string> identifier string comment_spec
%destructor { xfree($$); } identifier string comment_spec
+%type <val> time_spec
+
%type <val> type_identifier
%type <datatype> data_type
@@ -1093,6 +1095,20 @@ string : STRING
| QUOTED_STRING
;
+time_spec : STRING
+ {
+ struct error_record *erec;
+ uint64_t res;
+
+ erec = time_parse(&@1, $1, &res);
+ if (erec != NULL) {
+ erec_queue(erec, state->msgs);
+ YYERROR;
+ }
+ $$ = res;
+ }
+ ;
+
family_spec : /* empty */ { $$ = NFPROTO_IPV4; }
| family_spec_explicit
;