[net.usoft] Pattern Matching macro processor

mwm@ucbvax.ARPA (Mike (I'll be mellow when I'm dead) Meyer) (06/09/85)

Having been nudged about this recently, I've been contemplating writing
a pattern-matching macro processor (ala MORTRAN) for Unix. Before
starting such a beast, I'd like to know if someone already written such
a beast. Replies by mail to ucbvax!mwm preferred.

	Thanx,
	<mike

-- 

	<mike

After 5 years, a quote worthy of Netnews (and it works as disclaimer!):
"Truth is variable."

luscher@nicmad.UUCP (06/13/85)

> 
> Having been nudged about this recently, I've been contemplating writing
> a pattern-matching macro processor (ala MORTRAN) for Unix. Before
> starting such a beast, I'd like to know if someone already written such
> a beast. Replies by mail to ucbvax!mwm preferred.
>
	It has been a while since I've used it, but an interesting,
"machine independent", standalone 'template' (I found this style of
pattern matching very interesting) pattern matching macro processor
exists called STAGE2.  It is written in FLUB (first language under
bootstrap) which is easily implemented (we did it on a Datacraft, now
Harris, 24 bit machine).  It was written by Waite (?) at U. Colorado
(?).  Good luck in finding it.  You might try the Univ. Wisconsin
as they used to support it on their large machind and had some
documentation available in the Computer Science offices.
 
-- 
Jim Luscher / Nicolet Instruments / Oscilloscope Div.
5225 Verona Rd Bldg-2 / Madison Wi 53711 USA / 608/271-3333x2274

tower@inmet.UUCP (06/14/85)

Re: STAGE2 and FLUB

1) STAGE2 runs over FLUB which runs over SIMCMP (written in Fortran).

2) The text of the whole system is in the appendixes of a booK:
	"Implementing Software for Non-Numeric Applications",
	by William M. Waite, Prentice Hall, Englewood Cliffs, NJ.

3) A letter to Waite c/o the Publisher, might scarce up electronic
   source.

Len Tower
Intermetrics, Inc.

UUCP:     {bellcore,ima,ihnp4}!inmet!tower
INTERNET: ima!inmet!tower@CCA-UNIX.ARPA
USPS:     733 Concord Ave., Cambridge, MA  02138, USA
PHONE:    +1 (617) 661-1840

dww@stl.UUCP (David Wright) (06/18/85)

In article <209@nicmad.UUCP> luscher@nicmad.UUCP writes:
>> 
>> Having been nudged about this recently, I've been contemplating writing
>> a pattern-matching macro processor (ala MORTRAN) for Unix. Before
...
>	It has been a while since I've used it, but an interesting,
>"machine independent", standalone 'template' (I found this style of
>pattern matching very interesting) pattern matching macro processor
>exists called STAGE2.
>-- 
>Jim Luscher / Nicolet Instruments / Oscilloscope Div.


See "The STAGE2 Macroprocessor User Reference Manual",  P.C.Poole, W.M.Waite,
UK Atomic Energy Authority Research Group publication CLM-PDN 6/70
Culham Laboratory
Abindon
Berkshire
UK

Publication date 1970.    Yes that makes it pretty old, but then so is UNIX.

W.M. Poole is shown as "Dept of Electrical Engineering, University of
Colorado" so maybe they still supply the distribution tape.   An aditional
European source back in 1972 was the Dept of Electrical Engineering Science 
at the University of Essex (Colchester England).

I used to use STAGE2 a few years ago when I was doing some crude compiler work.
It wasn't really up to it, because my language was free-format whereas STAGE2
is easiest to use on input grammars where line endings are significant - but 
for something less than a compiler-sized task that was not hard to get round. 
STAGE2 is good for translating one set of patterns into another - indeed that's
all it does, but then that's all compilers do really!  Probably a good use
would be for translating between different but not totally alien computer
languages, esp. if a human-edit to tidy up semantic differences is acceptable.

I once did a sort of AI-ish program that built up definitions of English words
in STAGE2 so it's pretty flexible.

I have also implemented it on various machines (eg IBM360 and Intel 8080 - well
it was a long time ago) and languages.  The standard distribution tape version
is in Fortran, once you have this up you can use STAGE2 to re-translate itself
into assembler,  PL/M, C, etc..