2016-08-29 11:23 GMT+02:00 Nicolai Hess <nicolaih...@gmail.com>:

>
>
> 2016-08-28 13:41 GMT+02:00 monty <mon...@programmer.net>:
>
>> See RBParserTest>>#testBinarySelectors
>>
>> It's based on the draft ANSI Smalltalk-80 standard. You integrated it. It
>> tests the RBParser's parsing of binary method definitions and message sends
>> of all binary selectors from 1 char upto 3 chars. (The Blue Book is more
>> restrictive than ANSI, limiting them to 2 chars max IIRC.)
>>
>> I wrote the test because of issues I had with the OldCompiler's handling
>> of selectors containing "|" and issues on other platforms like GemStone, so
>> the behavior I need and think is correct won't get broken without warning.
>>
>>
> Hi Monty,
> yes, but I am just wondering why the scanner interprets some characters as
> binary selector token, whereas they are not allowed as binary selectors.
> In the old scanner, the initialization of the type table just sets "
> binary token" as the default for all characters and changes some of them
> explicit to for example
>
>  ($0 asciiValue to: $9 asciiValue) -> digit tokens
>  #(9 10 12 13 32 )  -> delimiter  token
> ...
>
> But RBScanner on the other hand explicitly sets some non-ascii characters
> to be used as "binary tokens"
>
>     classificationTable at: 177 put: #binary.    "plus-or-minus"
>     classificationTable at: 183 put: #binary.    "centered dot"
>     classificationTable at: 215 put: #binary.    "times"
>     classificationTable at: 247 put: #binary.    "divide"
>
> It looks like someone ( or somewhere )  it should be allowed to use these
> characters as a binary selector
>  "#($± $· $× $÷)"
> Although later at the parsing step, using this tokens for binary message
> selectors isn't allowed.
>
> I think I will exclude these characters as binary selector tokens.
>
>

Now back ontopic :)

Anyone knows why RefactoringBrowsers smalltalk scanner (RBScanner) explicit
allowes
 "#($± $· $× $÷)" to be binary selector characters ?
Is there any smalltalk dialect that uses these characters ?

I think I 'll remove the support for this in Pharo (it actually isn't
really supported, althought the scanner scannes these characters
as binary selector tokens, the parser finally does not allow these
characters as binary selector symbols.

Reply via email to