General Information
Tutorials
Reference Manuals
Libraries
Translation Tasks
Tools
Administration
|
Eli System Administration GuideExamples of Package Use
Each example uses a cache directory with an explicit name given by a
All of these examples assume that you have installed eli in directory `/opt/eli' (see Installing Eli).
Using a single additional packageThe Eli packages understand LALR(1) grammars and how to use them to generate deterministic parsers. Unfortunately, some languages are very difficult to describe using such grammars.
A package named
Suppose that you have downloaded the
eli -c $HOME/GLRCACHE -R -p $HOME/bisonglrNote that absolute path names are used for both the cache directory and the package directory.
If you frequently worked on languages whose grammars required the
-> $HOME/bisonglr +d_dest=(/opt/eli/lib/Eli) :installpkgAfter making this request, the next time you build a cache the standard Eli packages will include bisonglr .
Maintaining distributed packagesThe text for the Eli system is kept in a CVS repository. For the purposes of this example, assume that you have checked out a copy of the distribution directory `Elidistrib'. The name of your working directory will therefore be `Elidistrib'. The directory containing the standard Eli package collection is then `Elidistrib/Eli/pkg', and the directory containing the standard Odin package collection is `Elidistrib/Odin/pkg'. You will use your working directory to develop and test changes to the standard packages, ultimately checking in the final version. During the development process, you want to run Eli with certain package directories from your working directory substituted for the corresponding directories in `/opt/eli'.
For example, suppose that your working directory is a subdirectory of your home
directory and you need to debug the
eli -c $HOME/DBGCACHE -R -p $HOME/Elidistrib/Eli/pkg/gla If you need to work on several packages at once, a good strategy is to create a new package collection directory and populate it with symbolic links to package directories in your working directory:
mkdir $HOME/pkg ln -s $HOME/Elidistrib/Eli/pkg/gla $HOME/pkg ln -s $HOME/Elidistrib/Eli/pkg/parser $HOME/pkg ln -s $HOME/Elidistrib/Eli/pkg/pgs $HOME/pkg ...You then put the names of the packages you want to work on into `$HOME/pkg/PKGLST' and build the debug cache with the following command:
eli -c $HOME/DBGCACHE -R -p $HOME/pkgOnce you have finished debugging, you can leave the `pkg' directory with its symbolic links in place. When you need to debug other packages, you add any new links and edit `PKGLST' to name the packages on which you want to work. Links to currently-uninteresting packages remain for future debugging sessions, but because their names are not listed in `PKGLST' they are ignored.
Developing additional packagesA package being developed requires a package directory. It is often useful to make that directory a subdirectory of the `$HOME/pkg' directory (see Maintaining distributed packages). It can then be used either singly or in combination with other packages being debugged.
All of the additional packages developed to date are kept in the
|