Hello all, Here is the code, but both Shout and later (on accept) OB do not like underscores. No real surprise. Hopefully this will spark a nice workaround, because I sure could use it. Bill 'From Squeak3.2 of 15 January 2002 [latest update: #4881] on 17 October 2002 at 2:30:42 pm'! "Change Set: underscoreMadness Date: 17 October 2002 Author: Ian Piumarta Makes the Scanner accept underscores in words or keywords (but not in the first position since that would require context sensitivity). Use of this changeset has been officially condemned by the Independent Board of Syntactical Aesthetics for Squeak."! !Scanner methodsFor: 'multi-character scans' stamp: 'ikp 10/17/2002 14:24'! xLetter "Form a word or keyword." | type | buffer reset. [(type _ typeTable at: hereChar asciiValue) == #xLetter or: [type == #xDigit or: [type == #leftArrow]]] whileTrue: ["open code step for speed" buffer nextPut: hereChar. hereChar _ aheadChar. source atEnd ifTrue: [aheadChar _ 30 asCharacter "doit"] ifFalse: [aheadChar _ source next]]. (type == #colon or: [type == #xColon and: [aheadChar ~= $=]]) ifTrue: [buffer nextPut: self step. ["Allow any number of embedded colons in literal symbols" (typeTable at: hereChar asciiValue) == #xColon] whileTrue: [buffer nextPut: self step]. tokenType _ #keyword] ifFalse: [tokenType _ #word]. token _ buffer contents! ! ---- Wilhelm K. Schwab, Ph.D. bschwab AT anest DOT ufl DOT edu ________________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Schwab,Wilhelm K [bschwab@anest.ufl.edu] Sent: Monday, May 18, 2009 9:06 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] Underscores in selectors Helloa all, I'd really like to second Mariano's request for a work-around, and I might even be able to post one shortly. I did not write it, but it tweaks (at least the old) scanner to accept underscores in any but the first position of a selector. That might meet Mariano's need, and would cover most of mine related to RDBs as well. For external interfacing, it would further be important to be able to use them in class names, but nobody gave me a workaround for that :) One thing that I wonder about is whether Shout will adapt with the change??? I will look for it and apply shortly and just see what happens. If it works, I'll spread it around. I should have tried it in Pharo a long time ago. I'll try to report back in an hour or two. Bill ________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Mariano Martinez Peck Sent: Monday, May 18, 2009 7:58 AM To: Pharo Development Subject: [Pharo-project] Underscores in selectors Hi folks! I am trying to make Glorp work on Pharo but I am having problems with '_' in selectors. The standard of tables with databases involve _ when having more than a word. Example TB_BANK_ACCOUNT. Glorp needs a method like this: tableForTB_BANK_ACCOUNT In pharo 250 it works, but in latests Pharo releases this doesn't work. I know Stef said it could be for 1.1 but I need to ask: is there a workaround a hack or a quick fix so that I can progress with the port of GLORP ? can this have to be with new compiler ? Thanks Mariano