Tasks related to input processing
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
This module provides specifications for the Eli's CLP tool
to achieve the effect.
This module is instantiated without generic parameters by
The module provides a function that can be used together with
calls of the
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
Hence, the examples of the two previous sections had to be rewritten
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),
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).