Use floats for time specification
This commit is contained in:
parent
fd99a7ea34
commit
5288ee1021
1 changed files with 6 additions and 6 deletions
|
@ -85,7 +85,7 @@
|
||||||
%type <boolean> boolean
|
%type <boolean> boolean
|
||||||
%type <boolean> maybe_default
|
%type <boolean> maybe_default
|
||||||
%type <str> maybe_protocol
|
%type <str> maybe_protocol
|
||||||
%type <num> time
|
%type <fnum> time
|
||||||
%type <fnum> float
|
%type <fnum> float
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
@ -172,11 +172,11 @@ maybe_protocol: TOK_PROTOCOL TOK_STRING { $$ = $2; }
|
||||||
| { $$ = nullptr; }
|
| { $$ = nullptr; }
|
||||||
;
|
;
|
||||||
|
|
||||||
time: TOK_INTEGER TOK_DAYS { $$ = $1*86400; }
|
time: float TOK_DAYS { $$ = $1*86400; }
|
||||||
| TOK_INTEGER TOK_H { $$ = $1*3600; }
|
| float TOK_H { $$ = $1*3600; }
|
||||||
| TOK_INTEGER TOK_M { $$ = $1*60; }
|
| float TOK_M { $$ = $1*60; }
|
||||||
| TOK_INTEGER TOK_S { $$ = $1; }
|
| float TOK_S { $$ = $1; }
|
||||||
| TOK_INTEGER { $$ = $1; }
|
| float { $$ = $1; }
|
||||||
;
|
;
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
Reference in a new issue