Using the Right techonology: Smacc......Re: <|
ducasse at iam.unibe.ch
Tue Feb 4 21:23:24 UTC 2003
May be this would the opportunity to throw away hand made parser and use
the right technology like Smacc. I saw that there is a scanner and
for Smalltalk so it could be extended for squeak (may be john already
I saw that the RefactoringBrowser in VW has now a color editing while
you are typing.
You can identify errors while typing. Any decent IDE now has that kind
On Tuesday, February 4, 2003, at 07:48 PM, Bill Spight wrote:
> One snag seem to happen here:
> [(tokenType _ typeTable at: hereChar asciiValue) == #xDelimiter]
> whileTrue: [self step]. "Skip delimiters fast, there almost always
> mark _ source position - 1.
> (tokenType at: 1) = $x "x as first letter"
> ifTrue: [self perform: tokenType "means perform to compute token &
> ifFalse: [token _ self step asSymbol "else just unique the first
> The token type of | is #verticalBar, which does not begin with x, and
> does not combine with other symbols to form a token. I am sure that
> there are good reasons for this. You would like |[, |(, )|, ]|, and ||
> (and maybe others) to remain unambiguous.
> I could fiddle with it to have it recognize |> and <| as tokens (best
> do without ||, I think), but I do not really know what is best.
> Any help appreciated. :-)
> Many thanks,
> Bill Spight wrote:
>> I am implementing Combinatorial Games. (Conway numbers and
>> infinitesimals are combinatorial games, FYI.) Combinatorial games are
>> partially ordered, and may be confused with each other (neither
>> than, less than, or equal to). G || H means that G is confused with
>> H, G
>> |> H means that G is greater than or confused with H, and G <| H means
>> that G is less than or confused with H.
>> The trouble is that, when I try to make any of those an operator, I
>> to run into the use of || to delimit local variables. I get an error
>> message, "Argument name expected ->". The loss of || is not so bad, as
>> <> is an alternative. But it would be nice to use <| and |>, and I do
>> not see a necessary conflict with other usage.
>> Any help much appreciated. :-)
Prof. Dr. Stéphane DUCASSE (ducasse at iam.unibe.ch)
"if you knew today was your last day on earth, what would you do
different? ... especially if, by doing something different, today
might not be your last day on earth" Calvin&Hobbes
More information about the Squeak-dev