~ubuntu-branches/ubuntu/trusty/styx/trusty

« back to all changes in this revision

Viewing changes to doc/legend_cfg_cfg.html

  • Committer: Bazaar Package Importer
  • Author(s): Frederik Schüler
  • Date: 2007-07-01 23:06:53 UTC
  • mfrom: (0.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070701230653-8tcr3ow0d49alwj2
Tags: 1.7.5-1
* New upstream version.
* Bump standard to 2.7.2, no changes needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
 
2
<html>
 
3
<head>
 
4
<meta name="robots" content="noindex">
 
5
<title>Legend Context Free Grammar</title>
 
6
</head>
 
7
<H1>Legend Context Free Grammar</H1></center>
 
8
<p>
 
9
<font color="#000000">The syntax rules are described in
 
10
<b><i>EBNF</i></b> ( Extended Backus-Naur-Form ). 
 
11
A startsymbol must exist for each source file type. That means the syntax
 
12
of each file must match the corresponding start rule.
 
13
The other are internal helper rules. </font><font color="#000000"></font>
 
14
<p><font color="#000000">Each <b><i><font size="+1">rule</font></i></b>
 
15
is structured as follows: &lt;Rule Type: <b><i>start</i></b> or <b><i>let</i></b>>&nbsp;</font>
 
16
&lt;<font color="#B22222">Rule Identifier</font>> :: &lt;EBNF-konform Expression>
 
17
<br>An <b><i><font size="+1">EBNF-konform expression</font></i></b> defines a part
 
18
of the language syntax. It consists of a set of alternative productions i.e.
 
19
partial expressions, separated by the character '|'.
 
20
<p>A production is specified with the help of the following elements and operators:
 
21
<br>&nbsp;
 
22
<ul>
 
23
<li>
 
24
<b><i><font size="+1">Expression1 Expression2 ... ExpressionN</font></i></b></li>
 
25
 
 
26
<br>Concatenation of partial expressions
 
27
<li>
 
28
<b><i><font size="+1">Expression1 | Expression2 | ... | ExpressionN</font></i></b></li>
 
29
 
 
30
<br>Union of partial expressions ( alternatives )
 
31
<li>
 
32
<b><i><font size="+1">[ Expression ]</font></i></b></li>
 
33
 
 
34
<br>Optional partial expression
 
35
<li>
 
36
<b><i><font size="+1">{ Expression }</font></i></b></li>
 
37
 
 
38
<br>Iteration of a partial expression ( 0 .. )
 
39
<li>
 
40
<b><i><font size="+1">Expression +</font></i></b></li>
 
41
 
 
42
<br>Iteration of a partial expression ( 1 .. )
 
43
<li>
 
44
<b><i><font size="+1">( Expression )</font></i></b></li>
 
45
 
 
46
<br>Combination of a partial expression ( subexpression )
 
47
<li>
 
48
<b><i><font color="#3366FF"><font size="+1">Token Identifier</font></font></i></b></li>
 
49
 
 
50
<br><font color="#000000">... from the regular grammar</font>
 
51
<li>
 
52
<b><i><font color="#3366FF"><font size="+1">Rule Identifier<br>
 
53
</font></font></i></b><font color="#000000">... from the context-free grammar</font></li>
 
54
<li>
 
55
<b><i><font color="#009900"><font size="+1">Keyword<br>
 
56
</font></font></i></b><font color="#000000">Constant string / character sequence</font><br>
 
57
</li>
 
58
<li>
 
59
<b><i><font color="#000000"><font size="+1">[other]<br>
 
60
</font></font></i></b><font color="#000000">Special keyword denoting the
 
61
character sequences from the set 'Sigma* \ Tokenset'</font><br>
 
62
<BR></li>
 
63
 
 
64
<br><font color="#000000"></font>&nbsp;</ul>
 
65
<br>