Klaus,
you will find an explanation and link to possible workaround into note attached at http://bugs.impara.de/view.php?id=3993
Nicolas
Klaus D. Witzel:
Entered
The following statement works:
Number readFrom: '1.0e-10 .txt' readStream
But when reading the same string from a file
Number readFrom: (FileStream readOnlyFileNamed: 'Number1.0e-10 .txt')
it fails with the attached DNU. Note that in order to reproduce, the string '1.0e-10 .txt' must be put into the file named 'Number1.0e-10 .txt'.
/Klaus
P.S. I stumbled over this when using Scanner for scanning all the tokens in the .changes file.
________________________________________________________________________ iFRANCE, exprimez-vous ! http://web.ifrance.com
Hi Nicolas,
on Mon, 03 Jul 2006 18:01:32 +0200, you wrote:
Klaus,
you will find an explanation and link to possible workaround into note attached at http://bugs.impara.de/view.php?id=3993
Thank you Nicolas for pointing me to the symptom. Sames happens in Number class>>canParseAsScaledDecimal:... :(
Attached a fix for both methods, now Scanner scans all the tokens from the .changes file. It should be able to do so because at the time the .changes where recorded they where syntactically correct.
BTW: didn't look at how to integrate into Scanner the possible workaround you mentioned, I think that Scanner just asks Number readFrom: aStream.
Klaus
Nicolas
Klaus D. Witzel:
Entered
The following statement works:
Number readFrom: '1.0e-10 .txt' readStream
But when reading the same string from a file
Number readFrom: (FileStream readOnlyFileNamed: 'Number1.0e-10 .txt')
it fails with the attached DNU. Note that in order to reproduce, the string '1.0e-10 .txt' must be put into the file named 'Number1.0e-10 .txt'.
/Klaus
P.S. I stumbled over this when using Scanner for scanning all the tokens in the .changes file.
iFRANCE, exprimez-vous ! http://web.ifrance.com
Le Lundi 03 Juillet 2006 19:30, Klaus D. Witzel a écrit :
Hi Nicolas,
etc...
BTW: didn't look at how to integrate into Scanner the possible workaround you mentioned, I think that Scanner just asks Number readFrom: aStream.
Klaus
That's exactly that. Scanner uses Number readFrom: You just have to redirect Number class>>readFrom: to a call to NumberParser alternative.
Nicolas
On Mon, Jul 03, 2006 at 11:00:54PM +0200, nicolas cellier wrote:
Le Lundi 03 Juillet 2006 19:30, Klaus D. Witzel a ?crit :
BTW: didn't look at how to integrate into Scanner the possible workaround ? you mentioned, I think that Scanner just asks Number readFrom: aStream.
Klaus
That's exactly that. Scanner uses Number readFrom: You just have to redirect Number class>>readFrom: to a call to NumberParser alternative.
I put a cleanup and fix for the the original problem in Mantis 3993 (I was the cause of the original bug). But I think that NumberParser (Mantis 3512) is a better solution. It is better organized, it solves several other number parsing problems, and it is faster than the current parser even after my cleanup.
Dave
squeak-dev@lists.squeakfoundation.org