© Jørgen Steensgaard-Madsen, Copenhagen, 2006
Important files in a contribution subdirectory                                                  
 
   

A contribution subdirectory should provide a library of semantic routines that can be linked with other contributions to build a new language. It should also define a language to test the semantic routines, although it may not need to live for a long time. An overview of files in a contribution subdirectory is:
Naming parts of a contribution makefile
Syntax of contributed operations .ulc
Semantic routines in GNU C *_sem.c
Various files generated during a build     e.g. *_sem.o and types.h
The makefile is typically just a few lines obtained from the file makefile.skeleton in the top of the hierarchy:

# 1. The name of the test language
       ULCSYS = ulc_????
# 2. Contributions needed in the test language, e.g. 
       PARTS  = operators types multiprogramming
# 3. The names of `foreign' libraries that are needed, e.g.
       EXTRALL  = -lpthread
include ../makefile.include


The actual makefile contain more comments, but only the three lines shown need to be modified. Contributions are identified in $(PARTS) by the names of contribution directories. The file makefile.include contains commands for various development steps, as described below, and bindings that are characteristic for the host computer e.g. linking information.
On a Linux platform, a contribution will build a library lib$(ULCSYS).so.$(VER) in its subdirectory and make a symbolic link to it in the lib subdirectory in the top of the hierarchy. (You are assumed to understand this notation related to make.)
Descriptions of operations exist in the .ulc-file. It is essentially a sequence of bracketed descriptions identical to those used in derived definitions, cf. An example interpreter. When in doubt, just look at a .ulc-file of another contribution.
Start with a syntax file containing a single description
It is not really necessary to do this, as will be explained later, but doing so simplifies the work and consequently the following explanation.

Contents

Demo language
·Implementation tool
Copyrights


Introduction
Principles
·Interpreter construction


·Contribution directory
Make commands
Semantics
Illustration
Auxiliary files
Toplevel files
Reference
Download
Appendices



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