This directory contains a very simple example of using EPS
to produce an AST (Abstract Syntax Tree),
perform some attribute evaluation on it, and
generate code.

The target language accepts an aritmetic expression in 1 line.
A BNF-like definition may be found in ./efe/efe.spe.

Lexical analysis is based on lex(1),
and its specification may be found in ./efe/efe.l

EFE stands for Expressions Front End.
Directory ./efe contains the machinery to build an AST.
cd efe; make

Example of use:
        ...> efe/efe
        2*2 + (3-5)
        ^D

The AST is dumped onto stdout.

CALC is an example of an attribute evaluator.
It decorates every node in the AST with a 'value' colour.
It is integer valued, and hold the value of the subtree beneath.

Example of use:
        ...> efe/efe | calc/calc
        2*2 + (3-5)
        ^D

The AST is dumped onto stdout.
You may see colour value added everywhere,
and in particular to the root node, with value '2'.

HP is an example of code generation.
The target machine is an HP calculator using reverse polish notation
(e.g. HP-25). It is an stack-based machine.

Example of use:
        ...> efe/efe | calc/calc | hp/hp
        2*2 + (3-5)
        ^D

The generate code (keyboard strokes for the calculator)
appears on stdout.

In order to complete the example,
a simulator of this machine is included also.
It is an awk spec that traces the stack contents.

Example of use:
        ...> efe/efe | calc/calc | hp/hp | awk -f hp/hp.awk
        2*2 + (3-5)
        ^D

You may see the trace of program execution.

There is no much more information than this README notice.
Hope the example is simple enough to be followed by novices.
