EPS	El Prado System
===	---------------

EPS is a collection of tools for working with attributed grammars.

Tools
-----
cast	A library to manage CAST (Coloured Abstract Syntax Trees)
lag	Generates a CAST generator (language processor)
rag	Evaluates a coloured CAST
alga	Assembler-Like Grammar trAnslation

Directories
===========

The following directories are below this one:
There should be some README files around ... hopefully :-)

	bin			EMPTY till you install the stuff
	doc			so far, empty; unfortunately
	exs			some examples
	lib			where you will install more stuff
	src
	..  cast		Coloured Abstract Syntax Trees
	..  lag			Language Ast Generator
	..  rag			Rule-based Attribute evaluator Gen.
	..  alga		Assembler-Like Grammar trAnslation
	..  misc		Miscellaneous

Distribution
------------
You may take already compiled versions

* See directory Sun4/ for SPARC/SunOS 4.1
  (statically linked, stripped)
* See directory PC/ for MS-DOS
  (using djgpp, gnu port to msdos)

Or you may take the sources themselves;
  (Although they are not very readable.
   Basically, they are only useful to recompile for a different system)

   WARNING: compiling in a PC is really hard,
	    you lack so many UNIX utilities ...

* See directories
	src/
	lib/
	bin/

There are examples of usage at exs/

Installation
============
If you took the compiled version, that's all.

Otherwise, execute INSTALL.
INSTALL

That should be all that is needed.
The rest should go automagically :-)
[It has been tried on
several flavours of Sun-3, Sun-4 (sparc); SunOS 4.0.3, 4.1
HP 9000/835 HP-UX 7.0 ..]

# After installation you may wish to clean up sources
./CLEANUP

# Or you may wish to remove sources,
rm -rf src

From now on,
it is a useful idea to have a few environment variables defined:

setenv EPS `pwd`
setenv EPSBIN $EPS/bin
setenv EPSLIB $EPS/lib
setenv EPSINC $EPS/lib

Now you may choose:
------------------
OPTION 1:
  Don't do anything now,
  but whenever you use EPS tools,
  remember to have somewhere in your PATH the following programs
	$EPSBIN/lag
	$EPSBIN/rag
  (A good idea is to put $EPSBIN in PATH)

  and remember to have $EPS... in your search paths (in makefiles)
  for 'includes' (-I$EPSINC)
  and 'libraries' (-L$EPSLIB)

OPTION 2:
  you need your system manager (root) to fix some links to EPS files,

  cd /usr/include
  ln -s $EPSINC/cast.hh
  ln -s $EPSINC/rag.hh
  ln -s $EPSINC/alga.hh

  cd /usr/local/lib           [HP: /usr/lib]
  ln -s $EPSLIB/libcast.a
  ln -s $EPSLIB/librag.a
  ln -s $EPSLIB/libalga.a

  cd /usr/local
  ln -s $EPSBIN/lag
  ln -s $EPSBIN/rag

Trying some simple cases
========================
In the .../exs directory you will find a number of trivial examples:
	sample.ast	a sample AST for experiments
			have a look at it if you wish,
			but it is not really for humans

	drast.c		'draws' the AST,
			just shows how to load an AST and print it
			it regards every colour as string-valued

	drast2.c	a refinement of drast.c
			to use different colour types

	copy1.c		the version of '/bin/cat' for CASTs
			just shows how to load and save a CAST
			it regards every colour as string-valued

	copy2.c		a refinement of copy1.c
			to use different colour types

	cextract.c	extracts the colours existing in a CAST
			an example on using colour ST

	cextract2.c	idm, plus frequency of use
			uses ST, IT, hash tables on ST

Try to compile any of them
	...> cc -o drast -I$EPSINC drast.c -L$EPSLIB -lcast
and play with it
	...> drast -h
	...> drast -1 sample.ast
	...> drast -2 sample.ast
	...> drast -3 sample.ast
	...> drast -4 sample.ast

The other examples work in a similar manner.

Problems and Bugs
=================

If you discover any bug,
or if you may suggest any improvements,
or if even you add something that you regard useful for other users,
or if just there is something that doesn't work,
or if you cannot find the way to make it run,
...

please, contact us at

	Lotos Tools Development Team <topo@dit.upm.es>
