Use floats for time specification

This commit is contained in:
Matthias Schiffer 2013-07-30 04:01:37 +02:00
parent fd99a7ea34
commit 5288ee1021

View file

@ -85,7 +85,7 @@
%type <boolean> boolean
%type <boolean> maybe_default
%type <str> maybe_protocol
%type <num> time
%type <fnum> time
%type <fnum> float
%%
@ -172,11 +172,11 @@ maybe_protocol: TOK_PROTOCOL TOK_STRING { $$ = $2; }
| { $$ = nullptr; }
;
time: TOK_INTEGER TOK_DAYS { $$ = $1*86400; }
| TOK_INTEGER TOK_H { $$ = $1*3600; }
| TOK_INTEGER TOK_M { $$ = $1*60; }
| TOK_INTEGER TOK_S { $$ = $1; }
| TOK_INTEGER { $$ = $1; }
time: float TOK_DAYS { $$ = $1*86400; }
| float TOK_H { $$ = $1*3600; }
| float TOK_M { $$ = $1*60; }
| float TOK_S { $$ = $1; }
| float { $$ = $1; }
;
%%