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


Accessing the Current Token

This module provides a function GetCurrTok that can be used to access the string of the current token read from input. The function is used for example to access the name of a file to be included if the switching computation is issued by the parser as specified in the concrete grammar.

This module is instantiated without generic parameters by

   $/Input/CurrTok.gnrc:inst

The signature of the function is

char *GetCurrTok (void)
It accesses the string of the current token, stores it in memory, and yields a pointer to the stored string as result.

In our running example we could achieve the same effect of file inclusion as described in (see Insert a File into the Input Stream), by specifying a computation in the concrete grammar rather than in a .lido specification:

   Declaration: 'include' 
                &'ChkFileOpnd(NewInput(GetCurrTok()), GetCurrTok());' 
                FileName ';'.
The token of FileName that immediatly follows the computation is accessed. The call of ChkFileOpnd is assumed to check for success of the NewInput call.


Previous Chapter Next Chapter Table of Contents