Subversion Repositories tendra.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
<!-- Crown Copyright (c) 1998 -->
2
<HTML>
3
<HEAD>
4
<TITLE>PL_TDF Definition</TITLE>
5
</HEAD>
6
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#400080" ALINK="#FF0000">
7
<A NAME=S2>
8
<H1>PL_TDF Definition</H1>
9
<H3>January 1998</H3>
10
<A HREF="pl4.html"><IMG SRC="../images/next.gif" ALT="next section">
11
</A> <A HREF="pl1.html">
12
<IMG SRC="../images/prev.gif" ALT="previous section"></A>
13
<A HREF="pl1.html"><IMG SRC="../images/top.gif" ALT="current document"></A>
14
<A HREF="../index.html"><IMG SRC="../images/home.gif" ALT="TenDRA home page">
15
</A>
16
<IMG SRC="../images/no_index.gif" ALT="document index"><P>
17
<HR>
18
<DL>
19
<DT><A HREF="#S3"><B>2.1 </B> - Syntax description</A><DD>
20
<DT><A HREF="#S4"><B>2.2 </B> - Lexical Units</A><DD>
21
<DT><A HREF="#S5"><B>2.3 </B> - Pre-processing</A><DD>
22
</DL>
23
<HR>
24
<H1>2  Notation</H1>
25
<A NAME=S3>
26
<HR><H2>2.1. Syntax description</H2>
27
Words enclosed in angle brackets, &lt; &gt;, form non-terminal symbols.
28
Other symbols and words stand for themselves as terminal symbols.
29
An expansion of a non-terminal is indicated using ::= with its expansion
30
given as a sequence (possibly empty) of terminals and non-terminals.
31
For example:<P>
32
<PRE>
33
	&lt;Exp&gt; ::= * &lt;ident&gt;
34
</PRE>
35
is a possible expansion of an EXP SORT. If the word for the non-terminal
36
starts with a capital letter then it will be totally described by
37
a set of such expansions; otherwise the expansion of the non-terminal
38
will be given by other methods in the text. <P>
39
The post-fix -Opt on a non terminal is an abreviation allowing an
40
empty expansion. For example:<P>
41
<PRE>
42
	&lt;Access&gt;-Opt
43
</PRE>
44
is equivalent to the use of another non-terminal &lt;AccessOption&gt;
45
whose expansions are:<P>
46
<PRE>
47
	&lt;AccessOption&gt; ::= 
48
	&lt;AccessOption&gt; ::= &lt;Access&gt;
49
</PRE>
50
The post-fix -List on a non terminal is an abreviation for lists of
51
objects seperated by the ,-symbol. For example:<P>
52
<PRE>
53
	&lt;Exp&gt;-List
54
</PRE>
55
is equivalent to the use of another non-terminal &lt;ExpList&gt; whose
56
expansions are:<P>
57
<PRE>
58
	&lt;ExpList&gt; ::= &lt;Exp&gt;
59
	&lt;ExpList&gt; ::= &lt;ExpList&gt; , &lt;Exp&gt;
60
</PRE>
61
Both of these post-fix notations are also used with sequences of terminals
62
and non-terminals within the angle brackets with the same kind of
63
expansion. In these cases, the expansion within the angle brackets
64
form an anonymous non-terminal.<P>
65
<A NAME=S4>
66
<HR><H2>2.2. Lexical Units</H2>
67
The terminal symbols ( ), [ ], and { } always occur as parenthetic
68
pairs and never form part of other terminal symbols.<P>
69
The terminal symbols , ; and : are similarly terminators for other
70
terminal symbols.<P>
71
White space is a terminator for other terminal symbols but is otherwise
72
ignored except in strings.<P>
73
All other terminal symbols are sequences of ACSII symbols not including
74
the above. These are divided into seven classes: keywords, TDF constructors,
75
operators, &lt;integer_denotation&gt;s, &lt;floating_denotation&gt;s,
76
&lt;string&gt;s and &lt;ident&gt;s.<P>
77
The keywords and operators are expressed directly in the syntax description.
78
The TDF constructors are those given in the TDF specification which
79
have first-class SORTs as parameters and results.<P>
80
An &lt;integer_denotatation&gt; allows one to express an integer in
81
any base less than 16, with the default being 10. <P>
82
<PRE>
83
	&lt;integer_denotation&gt; ::= &lt;digit&gt;
84
	&lt;integer_denotation&gt; ::= &lt;integer_denotation&gt; &lt;digit&gt;
85
	&lt;integer_denotation&gt; ::= &lt;base&gt; &lt;integer_denotation&gt;
86
 
87
	&lt;base&gt; ::= &lt;integer_denotation&gt; r
88
</PRE>
89
Examples are 31, 16r1f, 8r37, 2r11111 - all giving the same value.<P>
90
A &lt;floating_denotation&gt; is an &lt;integer_denotation&gt; followed
91
by the . symbol and a sequence of digits. The radix of the &lt;floating_denotation&gt;
92
is given by the base of its component &lt;integer_denotation&gt;<P>
93
A &lt;string&gt; is the same as a C string - any sequence of characters
94
within &quot; &quot;. The same C conventions hold for \ within strings
95
for single characters.<P>
96
A &lt;character&gt; is an string character within ` `. The same \
97
conventions hold.<P>
98
An &lt;ident&gt; is any other sequence of characters. They will be
99
used to form names for TAGs, TOKENs, AL_TAGs and LABELs.<P>
100
<A NAME=S5>
101
<HR><H2>2.3. Pre-processing</H2>
102
At the moment there is only one pre-processing directive. A line starting
103
with #include will textually include the following file (named within
104
string quotes), using the same path conventions as C.<P>
105
Comments may be included in the text using the /* ... */ notation;
106
this differs slightly from the C convention in that comments may be
107
nested.<P>
108
<HR>
109
<P><I>Part of the <A HREF="../index.html">TenDRA Web</A>.<BR>Crown
110
Copyright &copy; 1998.</I></P>
111
</BODY>
112
</HTML>