Subversion Repositories tendra.SVN

Rev

Blame | Last modification | View Log | RSS feed

<!-- Crown Copyright (c) 1998 -->
<HTML>
<HEAD>
<TITLE>PL_TDF Definition</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#400080" ALINK="#FF0000">
<A NAME=S2>
<H1>PL_TDF Definition</H1>
<H3>January 1998</H3>
<A HREF="pl4.html"><IMG SRC="../images/next.gif" ALT="next section">
</A> <A HREF="pl1.html">
<IMG SRC="../images/prev.gif" ALT="previous section"></A>
<A HREF="pl1.html"><IMG SRC="../images/top.gif" ALT="current document"></A>
<A HREF="../index.html"><IMG SRC="../images/home.gif" ALT="TenDRA home page">
</A>
<IMG SRC="../images/no_index.gif" ALT="document index"><P>
<HR>
<DL>
<DT><A HREF="#S3"><B>2.1 </B> - Syntax description</A><DD>
<DT><A HREF="#S4"><B>2.2 </B> - Lexical Units</A><DD>
<DT><A HREF="#S5"><B>2.3 </B> - Pre-processing</A><DD>
</DL>
<HR>
<H1>2  Notation</H1>
<A NAME=S3>
<HR><H2>2.1. Syntax description</H2>
Words enclosed in angle brackets, &lt; &gt;, form non-terminal symbols.
Other symbols and words stand for themselves as terminal symbols.
An expansion of a non-terminal is indicated using ::= with its expansion
given as a sequence (possibly empty) of terminals and non-terminals.
For example:<P>
<PRE>
        &lt;Exp&gt; ::= * &lt;ident&gt;
</PRE>
is a possible expansion of an EXP SORT. If the word for the non-terminal
starts with a capital letter then it will be totally described by
a set of such expansions; otherwise the expansion of the non-terminal
will be given by other methods in the text. <P>
The post-fix -Opt on a non terminal is an abreviation allowing an
empty expansion. For example:<P>
<PRE>
        &lt;Access&gt;-Opt
</PRE>
is equivalent to the use of another non-terminal &lt;AccessOption&gt;
whose expansions are:<P>
<PRE>
        &lt;AccessOption&gt; ::= 
        &lt;AccessOption&gt; ::= &lt;Access&gt;
</PRE>
The post-fix -List on a non terminal is an abreviation for lists of
objects seperated by the ,-symbol. For example:<P>
<PRE>
        &lt;Exp&gt;-List
</PRE>
is equivalent to the use of another non-terminal &lt;ExpList&gt; whose
expansions are:<P>
<PRE>
        &lt;ExpList&gt; ::= &lt;Exp&gt;
        &lt;ExpList&gt; ::= &lt;ExpList&gt; , &lt;Exp&gt;
</PRE>
Both of these post-fix notations are also used with sequences of terminals
and non-terminals within the angle brackets with the same kind of
expansion. In these cases, the expansion within the angle brackets
form an anonymous non-terminal.<P>
<A NAME=S4>
<HR><H2>2.2. Lexical Units</H2>
The terminal symbols ( ), [ ], and { } always occur as parenthetic
pairs and never form part of other terminal symbols.<P>
The terminal symbols , ; and : are similarly terminators for other
terminal symbols.<P>
White space is a terminator for other terminal symbols but is otherwise
ignored except in strings.<P>
All other terminal symbols are sequences of ACSII symbols not including
the above. These are divided into seven classes: keywords, TDF constructors,
operators, &lt;integer_denotation&gt;s, &lt;floating_denotation&gt;s,
&lt;string&gt;s and &lt;ident&gt;s.<P>
The keywords and operators are expressed directly in the syntax description.
The TDF constructors are those given in the TDF specification which
have first-class SORTs as parameters and results.<P>
An &lt;integer_denotatation&gt; allows one to express an integer in
any base less than 16, with the default being 10. <P>
<PRE>
        &lt;integer_denotation&gt; ::= &lt;digit&gt;
        &lt;integer_denotation&gt; ::= &lt;integer_denotation&gt; &lt;digit&gt;
        &lt;integer_denotation&gt; ::= &lt;base&gt; &lt;integer_denotation&gt;

        &lt;base&gt; ::= &lt;integer_denotation&gt; r
</PRE>
Examples are 31, 16r1f, 8r37, 2r11111 - all giving the same value.<P>
A &lt;floating_denotation&gt; is an &lt;integer_denotation&gt; followed
by the . symbol and a sequence of digits. The radix of the &lt;floating_denotation&gt;
is given by the base of its component &lt;integer_denotation&gt;<P>
A &lt;string&gt; is the same as a C string - any sequence of characters
within &quot; &quot;. The same C conventions hold for \ within strings
for single characters.<P>
A &lt;character&gt; is an string character within ` `. The same \
conventions hold.<P>
An &lt;ident&gt; is any other sequence of characters. They will be
used to form names for TAGs, TOKENs, AL_TAGs and LABELs.<P>
<A NAME=S5>
<HR><H2>2.3. Pre-processing</H2>
At the moment there is only one pre-processing directive. A line starting
with #include will textually include the following file (named within
string quotes), using the same path conventions as C.<P>
Comments may be included in the text using the /* ... */ notation;
this differs slightly from the C convention in that comments may be
nested.<P>
<HR>
<P><I>Part of the <A HREF="../index.html">TenDRA Web</A>.<BR>Crown
Copyright &copy; 1998.</I></P>
</BODY>
</HTML>