On 24 March 2011 22:12, Eliot Miranda <[email protected]> wrote: > Hi All, > the following won't parse because of support for positional messages > (whatever they are; I'll come to that later).
http://www.lazarevic.de/PositionalArgs.html > #(word()) should be equal to { #word. #() } > but because of the type == #leftParenthesis clause in the below it causes a > syntax error: > Scanner methods for multi-character scans > xLetter > "Form a word or keyword." > | type | > buffer reset. > [(type := self typeTableAt: hereChar) == #xLetter > or: [type == #xDigit > or: [type == #xUnderscore and:[self allowUnderscoreSelectors]]]] whileTrue: > ["open code step for speed" > buffer nextPut: hereChar. > hereChar := aheadChar. > aheadChar := source atEnd > ifTrue: [30 asCharacter "doit"] > ifFalse: [source next]]. > tokenType := (type == #colon or: [type == #xColon and: [aheadChar ~~ $=]]) > ifTrue: > [buffer nextPut: self step. > "Allow any number of embedded colons in literal symbols" > [(self typeTableAt: hereChar) == #xColon] whileTrue: > [buffer nextPut: self step]. > #keyword] > ifFalse: > [type == #leftParenthesis > ifTrue: > [buffer nextPut: self step; nextPut: $). > #positionalMessage] > ifFalse:[#word]]. > token := buffer contents > e.g. evaluate any of the following: > #(word()) > Compiler evaluate: '#(word())' > Scanner new scanTokens: '#(word())' > What is this support for? Is it for those funky ffi calls in the OpenGL > code? Can it not be hoisted out of the scanner and into the parser proper? > [and optimistically anyone have a fix already?] > best, > Eliot > > > -- Best regards, Igor Stasenko AKA sig.
