Eli   Documents Get Eli: Translator Construction Made Easy at SourceForge.net.
    Fast, secure and Free Open Source software downloads

General Information

 o Eli: Translator Construction Made Easy
 o Global Index
 o Frequently Asked Questions
 o Typical Eli Usage Errors

Tutorials

 o Quick Reference Card
 o Guide For new Eli Users
 o Release Notes of Eli
 o Tutorial on Name Analysis
 o Tutorial on Type Analysis
 o Typical Eli Usage Errors

Reference Manuals

 o User Interface
 o Eli products and parameters
 o LIDO Reference Manual
 o Typical Eli Usage Errors

Libraries

 o Eli library routines
 o Specification Module Library

Translation Tasks

 o Lexical analysis specification
 o Syntactic Analysis Manual
 o Computation in Trees

Tools

 o LIGA Control Language
 o Debugging Information for LIDO
 o Graphical ORder TOol

 o FunnelWeb User's Manual

 o Pattern-based Text Generator
 o Property Definition Language
 o Operator Identification Language
 o Tree Grammar Specification Language
 o Command Line Processing
 o COLA Options Reference Manual

 o Generating Unparsing Code

 o Monitoring a Processor's Execution

Administration

 o System Administration Guide

Mail Home

Tasks related to input processing

Previous Chapter Next Chapter Table of Contents


Command Line Arguments for Included Files

Using this module introduces processing of a command line option into the generated processor: If the processor is called

    processor.exe -Idirname filename
then files to be included are searched in the current directory and in dirname. This module provides specifications for the Eli's CLP tool to achieve the effect.

This module is instantiated without generic parameters by

   $/Input/CmdLineIncl.gnrc:inst

The module provides a function that can be used together with calls of the NewInput function:

char * FindFile (char *name)
It searches the file named name in the current directory and in the directories given by -I command line arguments.

In order to use this facility the FindFile function has to be applied to the argument of the function NewInput. Hence, the examples of the two previous sections had to be rewritten as

   ATTR InpFileEx: int;
   RULE: FileInclusion ::= 'include' FileName COMPUTE
     .InpFileEx = NewInput (FindFile (StringTable (FileName))) BOTTOMUP;

     IF (NOT (.InpFileEx),
     message (ERROR, CatStrInd ("can not open file ", FileName),
              0, COORDREF));
   END;
for the case of the .lido specification of input switching as shown in (see Insert a File into the Input Stream), or
   Declaration: 'include' &'NewInput(FindFile (GetCurrTok()));' FileName ';'.
for the case of the concrete grammar specification of input switching as shown in (see Accessing the Current Token).


Previous Chapter Next Chapter Table of Contents