[Cuis] CSV Parser in Cuis available // issue about parsing hexadecimal number with lower case letters

H. Hirzel hannes.hirzel at gmail.com
Wed May 13 15:08:29 CDT 2015


P.S. The description of the NeoNumberParser

https://github.com/hhzl/Cuis-NeoCSV/blob/master/Neo-CSV-Core.pck.st#L69

On 5/13/15, H. Hirzel <hannes.hirzel at gmail.com> wrote:
> Hello Juan and Sven
>
> About the Cuis port of NeoCSV.
>
> I think for this failing test
>
> (1 out of 50 here
> https://github.com/hhzl/Cuis-NeoCSV/blob/master/Neo-CSV-Tests.pck.st#L635
> )
>
> we have to involve Sven van Caekenberghe, the author of the package in
> the discussion.
>
> The NeoCSV package has its own number parser called  NeoNumberParser
> to make it independent. And as you write that parser relies on $b
> digitValue = 11 by the underlying Smalltalk core.
>
> So the answer is yes, if Cuis has $b digitValue = 11, the tests Sven
> requires will work unchanged.
>
> However maybe he is willing not to require that parsing lower case
> letters a..f in hexadecimal is required, as you, Juan, write that this
> leads to ambiguity.
>
> So we have three options
>
> 1) Sven removes
>
> self
> assert:
> (NeoNumberParser
> parse: '7b'
> base: 16)
> equals: 123.
>
> from the test to facilitate future ports (there will be soon another
> one as he has updated the package last week end.
>
>
> 2) Cuis adopts
>         $b digitValue = 11
>
>
> 3) When porting I remove the requirement self
> assert:
> (NeoNumberParser
> parse: '7b'
> base: 16)
> equals: 123.
>
> from the test.
>
>
> I tend to prefer option 1 or 2.
>
> What do you think?
>
> Kind regards
>
> Hannes
>
>
> cc: to Sven
>
> On 5/13/15, Juan Vuletich <juan at jvuletich.org> wrote:
>> Cool Hannes!
>>
>> I see that #testHexadecimalIntegers is failing. Does changing
>> #digitValue so that $b digitValue = 11 fix this? If so, do you think
>> that changing this behavior is risky for the regular Cuis parser? Or
>> maybe an alternative is to change senders, and add a new method
>> #caseInsensitiveDigitValue or similar?
>>
>> Thanks,
>> Juan Vuletich
>>
>> On 5/9/2015 5:26 PM, H. Hirzel wrote:
>>> Hello
>>>
>>> I have ported the NeoCSV package from Pharo 4.0
>>>
>>> Neo-CSV-Core (SvenVanCaekenberghe.21)
>>>
>>> Neo-CSV-Tests (SvenVanCaekenberghe.18)
>>>
>>>
>>> It is available here
>>>
>>>      https://github.com/hhzl/Cuis-NeoCSV
>>>
>>> For it to work it needs the attached changeset for Cuis core.
>>> Discussion of the addition in another thread.
>>>
>>>
>>> Regards
>>>
>>> Hannes Hirzel
>>
>>
>




More information about the Cuis mailing list