Author: | Maxim Savchenko |
---|---|
Mode: | factor |
Date: | Fri, 20 Mar 2009 17:11:01 |
ERROR: bad-hex-bytes ; : hex-bytes ( accum end -- accum ) scan { { [ 2dup = ] [ 2drop ] } { [ dup length even? ] [ swapd 2 <groups> [ hex> [ parsed ] [ bad-hex-bytes ] if* ] each swap hex-bytes ] } [ bad-hex-bytes ] } cond ; : HEX{ byte-vector new "}" hex-bytes >byte-array parsed ; parsing