diff options
| author | Drahflow <drahflow@gmx.de> | 2014-01-01 23:45:00 +0100 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2014-01-01 23:45:00 +0100 |
| commit | def28d4cbac907f45ad083f01a34aca5f1c78fe8 (patch) | |
| tree | c2fad80cca96c75c0e342d6c2ac09b0144346056 /elymas/lib | |
| parent | 5427dd384017d27dc3f86fc23aa0019a9defe8e7 (diff) | |
Low-level typing by '' (free ' for day-to-day use)
Diffstat (limited to 'elymas/lib')
| -rw-r--r-- | elymas/lib/txt.ey | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/elymas/lib/txt.ey b/elymas/lib/txt.ey index 01bd495..914f0d7 100644 --- a/elymas/lib/txt.ey +++ b/elymas/lib/txt.ey @@ -4,7 +4,7 @@ # 0 <- leading digits converted to int (0, if none) { "^(\\d*)" regex -- ==n [ n { 48 sub } each ] reverse 10 math .unbase - } [ "" ] [ 0 ] ' /u deffd + } [ "" ] [ 0 ] '' /u deffd # 0 -> string # 0 <- leading hexadecimal digits converted to int (0, if none) @@ -18,7 +18,7 @@ { "^([0-9A-Fa-f]*)" regex -- ==n [ n { 48 sub hexDigitsReverse } each ] reverse 16 math .unbase - } [ "" ] [ 0 ] ' /hu deffd + } [ "" ] [ 0 ] '' /hu deffd > /consume defvd < @@ -26,13 +26,13 @@ # 0 <- decimal representation as string { _ { [ -01 10 math .base reverse "0123456789" each ] str .fromArray } { -- "0" } ? * - } [ 0 ] [ "" ] ' /u deffd + } [ 0 ] [ "" ] '' /u deffd # 0 -> positive integer (or zero) # 0 <- hexadecimal representation as string { _ { [ -01 16 math .base reverse "0123456789ABCDEF" each ] str .fromArray } { -- "0" } ? * - } [ 0 ] [ "" ] ' /hu deffd + } [ 0 ] [ "" ] '' /hu deffd > /produce defvd > /txt defvd |
