SOUL available?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SOUL available?

tgkuo
Hi John,
Thanks. the cause was found:
    I had the method Charactor>>isoToSqueak, which was installed by
Seaside package: "Squeak HTML Tokenizer".
    The Dolphin version  of SmaCCEdge class>>initializeIsExpressions didn't
had the test of " third letter is a capital" .
     After modifying that method to the new one, the SmaCC Development
package was reloaded normally. ..Thanks.
    By the way, <a href="http://www.iam.unibe.ch/~wuyts/smalltalk.html">Roel
Wuyts </a>told me that he had a dolphin version of SOUL, but the evaluation
was expired. He really implement this great reflective logic language and
Declarative  Smalltalk Meta language, using SmaCC. He said the Dolphin port
would be easy but how? I hoped to see it work on Dolphin, would someone
expert have the try?

Thanks.
Best regards.
Tsun-kuo Kuo.
----------------------------------------------------------------------------
---
"John Brant" <[hidden email]> wrote:

> I don't think this has anything to do with STS. I'm guessing that your
> Character class has a method that starts with "is" and that doesn't return
a
> boolean. When SmaCC generates a scanner, it prefers to use the is* methods
> on Character to test the character instead of testing each character
> separately. For example, we can use isSeparator instead of testing for a
> space, cr, lf, tab, or new page. Not only does it take less code to
generate
> the scanner, it is also normally faster to use the is* methods.
>
> Anyway, when you load SmaCC, it goes through all the is* methods and
> generates a map of their characters to the selector. If one of the methods
> doesn't return true for some character, then you'll get this error.
> Depending on what your method is named, you might try:
> -----------------
> SmaCCEdge class>>initializeIsExpressions
>  "Creates a map from sets of characters to selectors that start with 'is'
on

> Character. This allows generated scanners to take
>  full advantage of selectors that are already implemented on Character"
>
>     | selectors |
>     IsExpressions := Dictionary new.
>     selectors := Character selectors
>                 select: [:each | ('is*' match: each) and: [each
> argumentCount = 0 and: [(each at: 3) isUppercase]]].
>     selectors do:
>             [:sel |
>             | string |
>             string := self generateCharacterSetFor: sel.
>             string isEmpty ifFalse: [IsExpressions at: string put: sel]]
> -----------------
>
> In addition to testing if the selector starts with "is", it also tests
that
> the third letter is a capital. I had to make that change for Squeak --
they
> have an #isoToSqueak which returned characters.
>
>
> John Brant
>
>