[E-Lang] more on echat.e

Marc Stiegler marcs@skyhunter.com
Mon, 9 Apr 2001 07:09:26 -0700


> It turned out that the version of echat.e that I announced last Saturday
was
> correct enough to parse, but otherwise very far from running correctly,
due to
> changes in E syntax.
>
> I worked on upgrading echat.e to current syntax over the weekend, learning
> something about E syntax in practice along the way.  I made copious notes
of my
> experiences which I'll type up and publish soon.


Having worked my way through the conversion of over a thousand lines of E
code from 089 to 089t, the biggest blinkin' pain for upgrade is the required
() on parameterless method calls. Making this conversion is a terrible way
to introduce a person to E syntax :-)

Once you get it compiling syntax free, the only remaining pain is def -> var
for a small percentage of defs.

The following Elmer script spots, with a high degree of reliability, the
variables that need to be var'd, by searching for assignment statements in
which there is no keyword "def" on the lefthand side, which indicates that
somewhere above this statement, a "var" object was def'd. This script
eliminates most of the pain.

I should have published this yesterday for you, zooko, but it sounded like
you had already gone past the point where this would be useful. Sorry.

--marcs


? for lineNum => line in <c:/windows/desktop/syncBrowser.e> {
>     if (line =~ `@front := @back`) {
>         if (!(front =~`@{indent}def @name`)) {
>             println(`suspect at $lineNum is: ${front trim()}`)
>         }
>     }
> }