         [ "f" format-float-fast ]
         [ [ ".0" ?tail drop ] [ drop ] if-zero ] bi
     ] [ format-decimal-simple ] if ;
-
-ERROR: unknown-printf-directive ;
 
 EBNF: parse-printf [=[
 

fmt-f     = digits "f"           => [[ first '[ _ format-decimal ] ]]
fmt-x     = "x"                  => [[ [ >integer >hex ] ]]
fmt-X     = "X"                  => [[ [ >integer >hex >upper ] ]]
unknown   = (.)*                 => [[ unknown-printf-directive ]]

strings_  = fmt-c|fmt-C|fmt-s|fmt-S|fmt-u
strings   = pad width strings_   => [[ <reversed> compose-all ]]

math.functions.integer-logs splitting multiline ;
FROM: math.parser.private => format-float ;
IN: formatting

ERROR: unknown-format-directive value ;

<PRIVATE

