Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add parse bin int, fixes #8018 (#8020) | Vindaar | 2018-06-13 | 1 | -12/+26 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * clarify `parseHexInt`, `parseOctInt` docstring and exception msgs * add `parseBinInt` based on `parseutil.parseBin` implementation Adds a `parseBinInt`, which parses a binary integer string and returns it as an integer. This is based on the implementation of `parseutil.parseBin`, removing the unnecessary parts. * add tests for all `parse(Hex|Oct|Bin)Int` procs * replace `parse*Int` proc impls by call to parseutil procs Replaces the `parse(Hex|Oct|Bin)Int` procedure implementation by calls to the `parseutil` procs, which receive a mutable argument. Has the main advantage that the empty string as well as a "prefix only" string, e.g. "0x" counts as an invalid integer. Also moves the `parseOctInt` proc further up in the file so that all `parse` procs are below one another. * replace `var L` by `let L` in `parse` procs There's no reason for the usage of `var` here. * add `maxLen` optional arg for `parseutil.parse(Oct|Bin)` Plus small change to test cases. * update changelog about `parse*Int` procs * fix `rejectParse` template in `tstrutils` * make sure only `s.len` chars are parsed, if `maxLen+start` > s.len Fixes a previous bug in `parseHex` (and now affected `parseOct` and `parseBin`), which allowed to set `start + maxLen` to be larger than the strings length. This resulted in an out of bounds access. * move `parse*Int` proc change to breaking changes, add double ` | ||||
* | Fixes for parseUntil when until.len == 0 (or nil) | data-man | 2018-05-25 | 1 | -0/+3 |
| | |||||
* | remove deprecated stuff from the stdlib; introduce better deprecation warnings | Araq | 2018-05-05 | 1 | -2/+0 |
| | |||||
* | parseutils does not depend on the zero terminator anymore | Andreas Rumpf | 2018-04-29 | 1 | -53/+54 |
| | |||||
* | remove dead code elimination option (#7669) | Jacek Sieka | 2018-04-23 | 1 | -1/+1 |
| | |||||
* | Add a more number parsers to the scanf macro (#6985) | Dmitry Atamanov | 2018-01-05 | 1 | -0/+17 |
| | |||||
* | added parseutils.parseSaturatedNatural | Andreas Rumpf | 2017-11-19 | 1 | -4/+56 |
| | |||||
* | Add link to streams module | Federico Ceratto | 2017-10-21 | 1 | -0/+2 |
| | |||||
* | Add space to fix RST in captureBetween docs (#5769) | Matt Riggott | 2017-05-04 | 1 | -1/+1 |
| | |||||
* | Added BiggestUInt (#5378) | flyx | 2017-02-13 | 1 | -12/+12 |
| | |||||
* | added strscans stdlib module | Araq | 2016-05-10 | 1 | -0/+16 |
| | |||||
* | split too long lines | Araq | 2016-05-10 | 1 | -5/+9 |
| | |||||
* | Remove dead code | Anatoly Galiulin | 2016-03-31 | 1 | -11/+1 |
| | |||||
* | Add parseUInt and parseBiggestUInt functions to stdlib (parseutils, strutils) | Anatoly Galiulin | 2016-03-30 | 1 | -0/+51 |
| | |||||
* | fixes strutils.unescape; refs #3634 | Andreas Rumpf | 2016-01-17 | 1 | -2/+5 |
| | |||||
* | fixes #2909 | Araq | 2015-06-15 | 1 | -16/+16 |
| | |||||
* | Turn some test outputs into actual tests | Oleh Prypin | 2015-04-21 | 1 | -3/+5 |
| | |||||
* | Don't run non-test code when defined(testing) | Oleh Prypin | 2015-04-21 | 1 | -1/+3 |
| | |||||
* | Fix typos | Federico Ceratto | 2015-02-15 | 1 | -1/+1 |
| | |||||
* | Fix typos | Federico Ceratto | 2015-02-15 | 1 | -1/+1 |
| | |||||
* | fixes #2041 | Araq | 2015-01-31 | 1 | -2/+2 |
| | |||||
* | bugfix: don't overwrite the number value in case of a parsing error | Araq | 2015-01-27 | 1 | -2/+3 |
| | |||||
* | got rid of old code that used to be required for bootstrapping | Araq | 2014-12-08 | 1 | -90/+5 |
| | |||||
* | Nimrod renamed to Nim | Araq | 2014-08-28 | 1 | -2/+2 |
| | |||||
* | big rename | Araq | 2014-08-27 | 1 | -5/+7 |
| | |||||
* | renamefest | Araq | 2014-08-23 | 1 | -3/+3 |
| | |||||
* | parseBiggestFloat is now builtin | Araq | 2014-07-16 | 1 | -82/+84 |
| | |||||
* | Fixed parsing of float literals. | Reimer Behrends | 2014-05-23 | 1 | -44/+50 |
| | | | | | | | | | Float literals were not parsed properly when their fractional part exceeded 53 significant bits. This affected in particular math.PI and math.E. Rather than reinventing the wheel, this patch reuses C's strtod() implementation, which already does the heavy lifting with respect to correctness, though some caution is necessary to keep float parsing locale-independent. | ||||
* | 'nil' as a statement is deprecated, use an empty 'discard' instead | Araq | 2014-01-19 | 1 | -1/+1 |
| | |||||
* | case consistency part 4 | Araq | 2013-12-27 | 1 | -7/+7 |
| | |||||
* | case consistency part 1 | Araq | 2013-12-27 | 1 | -2/+2 |
| | |||||
* | Explains parseHex initialization quirk. | Grzegorz Adam Hankiewicz | 2013-07-16 | 1 | -2/+26 |
| | |||||
* | made parseBiggestFloat faster for large exponents | Araq | 2013-07-01 | 1 | -3/+12 |
| | |||||
* | Removes executable bit for text files. | Grzegorz Adam Hankiewicz | 2013-03-16 | 1 | -0/+0 |
| | |||||
* | The httpserver module now supports POST requests. Fix for captureBetween in ↵ | dom96 | 2012-05-06 | 1 | -2/+2 |
| | | | | the parseutils module. | ||||
* | added system.setControlCHook, system.writeStackTrace | Araq | 2012-02-19 | 1 | -1/+2 |
| | |||||
* | bugfix: semfold supports merging of '&' | Araq | 2012-02-19 | 1 | -1/+5 |
| | |||||
* | year 2012 for most copyright headers | Araq | 2012-01-02 | 1 | -1/+1 |
| | |||||
* | Added ftpclient module. Fixed docs in sockets module. Added dll tests to ↵ | dom96 | 2011-11-04 | 1 | -0/+7 |
| | | | | test suite. | ||||
* | bugfix: new GCC version requires -ldl to come after object files | Araq | 2011-11-03 | 1 | -2/+22 |
| | |||||
* | compilation cache: mostly working; generics not yet | Araq | 2011-10-25 | 1 | -28/+28 |
| | |||||
* | bugfix: $ escaping in interpolatedFragments | Araq | 2011-09-26 | 1 | -6/+12 |
| | |||||
* | bugfix: internal error in evalFieldAccess; parseutils.interpolatedFragments ↵ | Araq | 2011-09-26 | 1 | -86/+68 |
| | | | | optimized; tstringinterp.nim now works | ||||
* | using statement (ala C#) implemented as macro (added as test). | Zahary Karadjov | 2011-09-20 | 1 | -29/+40 |
| | | | | simplified the usage of the interpolatedFragments iterator. | ||||
* | Moved the parseAST magics to evals.nim | Zahary Karadjov | 2011-09-20 | 1 | -0/+91 |
| | | | | | | | | | | | | | | Added string interpolation helper routines in parserutils Added a proof-of-concept string interpolation user-land macros (currently, only as a test case): the interpolated expression could either be transformed to concat("literal string ", $(interpolated), " end") or "literal string $1 end" % [$(interpolated)] Added a very initial definition of Optional[T] generic type A new overload of ParseIdent was added in hope to get around the fact that the old one doesn't work correctly in macros, but the problem persists. | ||||
* | bugfix: proper cache for generic instantiations | Araq | 2011-07-21 | 1 | -1/+1 |
| | |||||
* | deprecated system.copy: use system.substr instead | Araq | 2011-05-14 | 1 | -4/+4 |
| | |||||
* | hashtables: 1st version; parseutils additions | Araq | 2011-04-18 | 1 | -1/+23 |
| | |||||
* | $ for strtabs; skipUntil, skipWhile for parseutils | Araq | 2011-04-05 | 1 | -3/+13 |
| | |||||
* | inlining of the write barrier for dlls | Andreas Rumpf | 2010-08-08 | 1 | -6/+14 |
| |