Re: Stop using PL_strchr/strstr et al for parsing - use mozilla::Tokenizer

2015-08-14 Thread Honza Bambas
On 7/29/2015 22:51, Daniel Stenberg wrote: On Wed, 29 Jul 2015, Honza Bambas wrote: I've recently introduced a class making parsing string inputs much safer and simpler. http://www.janbambas.cz/string-parsing-made-simple-with-mozillatokenizer/ Nice! How does it act when hitting 64bit

Re: Stop using PL_strchr/strstr et al for parsing - use mozilla::Tokenizer

2015-07-29 Thread Daniel Stenberg
On Wed, 29 Jul 2015, Honza Bambas wrote: I've recently introduced a class making parsing string inputs much safer and simpler. http://www.janbambas.cz/string-parsing-made-simple-with-mozillatokenizer/ Nice! How does it act when hitting 64bit integer overflows? -- / daniel.haxx.se

Re: Stop using PL_strchr/strstr et al for parsing - use mozilla::Tokenizer

2015-07-29 Thread Honza Bambas
On 7/29/2015 19:40, Kyle Huey wrote: On Wed, Jul 29, 2015 at 7:15 AM, Honza Bambas hbam...@mozilla.com wrote: I've recently introduced a class making parsing string inputs much safer and simpler. Please see xpcom/ds/Tokenizer.h. It's simplification of a lexical analyzer and it successfully

Re: Stop using PL_strchr/strstr et al for parsing - use mozilla::Tokenizer

2015-07-29 Thread Kyle Huey
On Wed, Jul 29, 2015 at 7:15 AM, Honza Bambas hbam...@mozilla.com wrote: I've recently introduced a class making parsing string inputs much safer and simpler. Please see xpcom/ds/Tokenizer.h. It's simplification of a lexical analyzer and it successfully hides boundary checks on the input

Stop using PL_strchr/strstr et al for parsing - use mozilla::Tokenizer

2015-07-29 Thread Honza Bambas
I've recently introduced a class making parsing string inputs much safer and simpler. Please see xpcom/ds/Tokenizer.h. It's simplification of a lexical analyzer and it successfully hides boundary checks on the input buffer from consumers. From now on this simple parser class should be used