© Jørgen Steensgaard-Madsen, Copenhagen, 2006
Commands to build a contribution                                                  

When a new description has been added to the syntax file the command
make incr ULCSIG=name
should be given, provided the contribution directory has been made the working directory. Here name is the name of the newly described operation. The result will affect some files, in particular
A file with an outline of a semantics exists name_sem.c
A (modified) library exists lib$(ULCSYS).so.$(VER)
An executable file exists $(ULCSYS)
The executable file is an interpreter which can check commands involving application of name . It can even translate such commands into GNU C programs. It can interpret such commands using the generated semantics, which in fact is a do-nothing semantics.
A contributor now has to modify the generated name_sem.c-file, call make , and test the new semantics. Of course this requires knowledge of the coding discipline required, as explained below.
A word of caution: try a newly described operation in commands with the do-nothing semantics. The objective is to test it for convenience in combination with other operations, not the least with respect to types. The reason for such an early test is to avoid modifications in syntax after the intended semantics has been coded in C. A discipline of work can be devised for modifying a semantics after a change in syntax, but the inherent complexity remains. A command
make update ULCSIG=name
generates a do-nothing semantics in a file update.skel which can then be compared to the actual semantics with the diff program, for instance as used through its emacs interface.
A meaning of an operator symbol can also be described in a syntax file. A slightly more complex command is needed to generate a do-nothing semantics for it
make incr ULCSIG='operator_name' ULCSEM=filename
The result is a filename_sem.c-file containing the do-nothing semantics. If several meanings of the operator symbol are described in the syntax file, the generated semantics contains a do-nothing semantics for each.
The complex command, with the explicit naming of the file to hold the semantics, can also be used for several operations when $(ULCSIG) is a list of space separated names and/or operator symbols. This makes it possible to start with a syntax file containing more than a single description.
The common attributes of an operator symbol (e.g. its association rule) should be defined in the .base-file in the top of the hierarchy. It can be defined in a syntax file, but since it will be common and redefinition is not accepted, it belongs logically at the top. Type operators that is intended to be common should likewise be described in the .base-file. As has been illustrated on page (link to point *) a new type operator can be introduced without defining it globally, and that is the recommended way to do it when sharing is not essential.

Other make-commands related to a contribution

Calls to the make-program have the form
make make-command
and the previous section presented the two most important commands for a contributor. A complete list is
new Builds the test language of a contribution and its library
lib Builds just a library of a contribution
clean Removes backup- and object files
doc Generates a program the interpretation of which is a HTML-document. After manual modification it should describes the operations of the contribution. Perhaps not very useful.
dep Meant to rebuild languages that depend on this contribution. Use it only when the syntax changes.
A strict discipline is required for this to work: the Makefile in the top of the hierarchy must reflect dependencies.


Demo language
·Implementation tool

·Interpreter construction

Contribution directory
·Make commands
Auxiliary files
Toplevel files

File translated from TEX by TTH, version 3.33.
On 18 Oct 2006, 16:47.
SourceForge.net Logo