<div dir="ltr">Hi Trygve,<div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 20, 2014 at 9:32 AM, Trygve Reenskaug <span dir="ltr"><<a href="mailto:trygver@ifi.uio.no" target="_blank">trygver@ifi.uio.no</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Hi,<br>
I'm relying on decomposing composite class names.<br>
An example class name is <i>BB5aBank</i><br>
I decompose it into <i>#(BB5a Bank)</i> but am using ugly and
error-prone hacks to achieve it. <br>
It would be very helpful if I could use some kind of separator in
the class name, e.g., <i>BB5a:Bank</i><br>
<br>
I've tried brute force by renaming class <i>BB5aBank </i>to <i>BB5a:Bank</i><br>
This is permitted and Smalltalk points to the renamed class.<br>
Compiling a method that is using the new class name fails:<br>
<i>bank := </i>Expression expected -><i>BB5a:Bank new</i><br>
<br>
<div>I've looked into the Parser code, but got
lost.<br></div></div></blockquote><div><br></div><div>You probably need to dive down into the Scanner. For example if you used period and modified Scanner>>xLetter to not terminate the scan if it sees a period followed by a capital letter you'll likely be able to parse e.g. BB5a.Bank as a single token. If you look at the xLetter method you'll see it already tests self allowUnderscoreSelectors to accept underscores.</div><div><br></div><div>Ah, so an alternative would be to make sure the allowUnderscoreSelecctors preference is set and use underscore as your separator.</div><div><br></div><div>HTH</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"><div>
<br>
Anybody have any ideas?<span class=""><font color="#888888"><br>
<br>
--Trygve<br>
</font></span></div>
</div>
<br><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>