Eli   Documents

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 Scope Graphs
 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

New Features of Eli Version 4.9

Previous Chapter Next Chapter Table of Contents


Allow symbols to be ignored in rule mappings

A rule map can arbitrarily rewrite a concrete rule for the purpose of matching it to an abstract rule (see Rewriting a concrete rule of Syntactic Analysis Manual).

The concrete rule to be rewritten is specified exactly as it appears in the concrete syntax, and is followed by a description of the right-hand side of the abstract rule enclosed in angle brackets. Any literal symbols in the abstract rule are represented in the description by themselves. Literal symbols appearing in the abstract rule need not have counterparts in the concrete rule, and literal symbols in the concrete rule need not appear in the abstract rule.

Nonliteral symbols (both nonterminals and nonliteral terminals) in the right-hand side of the abstract rule must have counterparts in the right-hand side of the concrete rule. Each nonliteral symbol in the right-hand side of the abstract rule is represented by a `$' followed by the index of its counterpart in the right-hand side of the concrete rule. There is no requirement that all nonliteral symbols from the concrete rule appear in the abstract rule, and no requirement on the order of appearance, but duplicates are not allowed.

Here is an example of a concrete rule:

Exp: Lambda Idn '.' Exp .
This rule has three nonliteral symbols: Lambda, Idn, and Exp. Lambda and Idn are terminals; Exp is a nonterminal.

Suppose that our abstract syntax has the following rules:

RULE: IdDef ::= Idn END;

RULE: Exp ::= IdDef 'is bound in' Exp END;
The first abstract rule tells us that an Idn may be interpreted as an IdDef in certain contexts (such as that represented by the second abstract rule). We can map the concrete rule given above into the second abstract rule, since the second abstract rule expresses the semantics of the concrete rule:

MAPRULE
Exp: Lambda Idn '.' Exp < $2 'is bound in' $3 > .
Here the concrete rule is given, and the right-hand side of the abstract rule is described in the angle brackets. The nonliteral terminal symbol Lambda is dropped (positional parameter $1 does not appear in the angle brackets), and the literal terminal symbol '.' is replaced by 'is bound in'.


Previous Chapter Next Chapter Table of Contents