From:	SMTP%"RELAY-INFO-VAX@CRVAX.SRI.COM"  4-AUG-1994 11:13:57.33
To:	EVERHART
CC:	
Subj:	RE: VAX SCAN equivilent for OpenVMS Alpha

Message-Id: <9408041339.AA18927@uu3.psi.com>
Date: Thu,  4 Aug 94 09:34:02 EDT
From: Jerry Leichter <leichter@lrw.com>
To: INFO-VAX@SRI.COM
Subject: RE: VAX SCAN equivilent for OpenVMS Alpha
X-Vms-Mail-To: UUCP%"gay@mprgate.mpr.ca"

	With DEC effectively retiring VAX SCAN by not targeting as a language
	to migrate to Alpha OpenVMS. We are now in need of a commercial
	replacement that compilies for the OpenVMS Alpha platform.

	Does anyone know of a good compilied pattern matching language for
	OpenVMS Alpha that can be called from other OpenVMS HLL (adheres to
	the calling standard)? Something that provides a utility that converts
	VAX SCAN would be perfect :).

I don't know of anything that really matches this description - unfortunately,
the market for such languages has never really developed.  (That's presumably
why SCAN never gathered enough of a customer base to justify an Alpha port.)

Here's a suggestion out of left field, however:  The inspiration for SCAN was
the much older SNOBOL4 language.  SNOBOL4 was originally implemented, many
years ago (late '60's), in a language called SIL (SNOBOL Implementation
Language).  SIL was designed for portability to the systems of that era; it
looks like an assembler, and was intended to be implemented as a set of macros
on top of a native macro assembler.  The design was very successful, and
highly compatible versions of SNOBOL4 existed on almost all machines of
sufficient power of that era.

Recently, Phil Budne took the (obvious, in retrospect) step to bring SNOBOL4
portability into the modern era:  He wrote a kind of "reverse compiler" that
translates SIL into stylized C.  The result is portable to any machine with
a C compiler.  I've gotten the thing working, with little trouble, on a
VMS VAX using GCC; someone else got it working (with a bit more effort) using
VAX C.  We're in contact with Mr. Budne, who's interested in maximum porta-
bility, and one way or another VMS systems will be supported.  (As far as I
know, no one has yet tried to compile the code on an Alpha VMS system, but
give the nature of the code I doubt there will be any difficulties - the
problems that have come up on the VAX have had to do with things like
naming conflicts and include files not in the same place as on Unix systems.)

SNOBOL4 is an interpreter, not a compiler.  There is no direct way to call
a SNOBOL4 program from a program written in an HLL - but SNOBOL4 *does*
provide a mechanism for going the other way:  Having a SNOBOL4 program call
an "external" program in another language.  This requires system-specific
support that hasn't been done yet for VMS, but it would not be hard.

One nice thing about SNOBOL4 is that it's completely free - not even Gnu-like
"copy-left" restrictions have been applied to the source or any port in the
past.  Mr. Budne has indicated his intention to continue that tradition.
Another nice thing about SNOBOL4, at least in the SIL implementation, is
that it has been debugged for close to 25 years, and is in very good shape.
(Because of the low-level nature of SIL, errors in implementing SIL are
virtually certain to show up very quickly, rather than be hidden as subtle
bugs within SNOBOL4.)

A second beta test version is currently in progress:  The files are
available by anonymous ftp from cs.arizona.edu in snobol4/budne and from
alpha.gnu.ai.mit.edu in budd/snobol.  The VMS-specific stuff isn't there
yet, and is pretty ad hoc on the part of the two of us who've worked on it
so far, so you're pretty much on your own there.

Other implementations of SNOBOL4, including one supported commercial one, 
have existed over the years.  For VMS VAXes, there's SPITBOL, from (I think)
Dewar Software.  SPITBOL is a true compiler, and several times faster than
SIL SNOBOL4.  I've never heard of an Alpha port, but given sufficient
interest, the company might be convinced to do one.  (SPITBOL is also
implemented in a portable macro code, but a very different one designed for
compilation and speed.)

Ralph Griswold, one of the original developers of SNOBOL4, has for many years
now been working on Icon, a more modern, much more general language that
also provides good pattern matching.  Like SNOBOL4, Icon is implemented in
a portable fashion, though in C, and the Icon project at U of Arizona main-
tains a wide variety of ports that are freely distributable.  A VMS port is
one; I just saw an announcement of the VMS version of Icon Version 9, the
"lastest and greatest".  I don't know if this version works on Alphas.  I
believe all the Icon stuff is in the anonymous FTP account on cs.arizona.edu.

	Is there anyone else out there with a similar problem? A base of VAX
	Scan and the intention to migrate to Alpha.

							-- Jerry

