![]() |
Yacc |
||||||||||||||
|
YACC the forgotten UNIX software tool"The essence of success is that it is never necessary to think of a new idea oneself. It is far better to wait until somebody else does it, and then to copy him in every detail, except his mistakes" - Aubrey Menen Example 1 - a basic expression evaluator Example 2 - a expression evaluator with built-in functions and variables Example 3 - a local application Most UNIX users have heard about the software tool yacc, and a few may read the standard documentation, fewer still will attempt to use it. The inadequate documentation and run-time error diagnostics will often thwart many potential users so that yacc may end up as an unused and forgotten resource. This section describes a simple example of an expression evaluator which is developed in two versions with increasing functionality and a local application for translating assignment grades into marks. The examples illustrates an approach that may be used with more sophisticated grammars which realise the full potential of yacc. | ||||||||||||||
|