| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
<html> |
| 16 |
<head> |
| 17 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 18 |
<meta http-equiv="Content-Language" content="en-us"> |
| 19 |
<title>group</title> |
| 20 |
</head> |
| 21 |
<body bgcolor="#DAD3C5" vlink="#0094D2" link="#003258"> |
| 22 |
<table align="left" border="0" cellspacing="0" cellpadding="0" valign=top> |
| 23 |
<tr> |
| 24 |
<td width=105 height=40><a href="https://projects.eclipse.org/projects/tools.titan"><img src="../images/titan_transparent.gif" border=0 width=105 height=40 align="left" alt="Titan"></a></td> |
| 25 |
</tr> |
| 26 |
</table> |
| 27 |
<table border="0" align="right" cellpadding="0" cellspacing="0"> |
| 28 |
<tr> |
| 29 |
<td><a href="../titan_main.html" alt="contents"><img border="0" src="../images/ao.jpg" width="53" height="40"></a></td> |
| 30 |
<td><a href="../titan_index.html" alt="index"><img border="0" src="../images/up.jpg" width="53" height="40"></a></td> |
| 31 |
<td><a href="goto.html" alt="previous"><img border="0" src="../images/left.jpg" width="53" height="40"></a></td> |
| 32 |
<td><a href="hex2bit.html" alt="next"><img border="0" src="../images/right.jpg" width="53" height="40"></a></td> |
| 33 |
</tr> |
| 34 |
</table> |
| 35 |
<p><br clear="all"> |
| 36 |
</p> |
| 37 |
<hr> |
| 38 |
<h1>group</h1> |
| 39 |
<hr align="left" width="75%"> |
| 40 |
<p>In the module definitions part, definitions can be collected in named groups. |
| 41 |
<ul> |
| 42 |
<li>Groups may be nested i.e. groups may contain other groups;</li> |
| 43 |
<li>grouping is done to aid readability and to add logical structure to the module if required.;</li> |
| 44 |
<li>groups may have attributes;</li> |
| 45 |
<li>it is possible to selectively import definitions contained in a group.</li> |
| 46 |
</ul> |
| 47 |
<table border="0" width="100%" bgcolor="#C9C2BB" cellpadding="4"> |
| 48 |
<tr> |
| 49 |
<td width="100%"> |
| 50 |
<blockquote> |
| 51 |
<p><u>TITAN specific restriction compared to the standard:</u></p> |
| 52 |
</blockquote> |
| 53 |
<ul> |
| 54 |
<li> |
| 55 |
<p> The selective import of groups is not implemented. The keyword <a href="module.html"><b><font face="Courier New" color="#003258" size="4">import</font></b></a> is always treated as |
| 56 |
if it were <b><font face="Courier New" color="#003258" size="4">import all</font></b>.</p> |
| 57 |
</li> |
| 58 |
</ul> |
| 59 |
</td> |
| 60 |
</tr> |
| 61 |
</table> |
| 62 |
<p>Related keywords:</p> |
| 63 |
<ul> |
| 64 |
<li><a href="module.html"><b><font face="Courier New" color="#003258" size="4">module</font></b></a></li> |
| 65 |
<li><a href="with.html"><b><font face="Courier New" color="#003258" size="4">with</font></b></a></li> |
| 66 |
</ul> |
| 67 |
<hr align="left" width="50%"> |
| 68 |
<div align="center"> |
| 69 |
<center> |
| 70 |
<table border="0" width="90%" bgcolor="#FFB599" cellpadding="4"> |
| 71 |
<tr> |
| 72 |
<td width="100%"> |
| 73 |
<h3 align="center"><font face="Courier New" color="#003258" size="5"><b>group </b></font><i>group_identifier</i><font face="Courier New" color="#003258" size="5"><b>{</b></font> <i> |
| 74 |
definitions</i> <b><font face="Courier New" color="#003258" size="5">} </font></b>[ <font face="Courier New" color="#003258" size="5"><b>with </b></font><i>attributes</i> ]</h3> |
| 75 |
</td> |
| 76 |
</tr> |
| 77 |
</table> |
| 78 |
</center> |
| 79 |
</div> |
| 80 |
<ul> |
| 81 |
<li> |
| 82 |
<p>The <font face="Courier New" color="#003258" size="4"><b>group</b></font> keyword introduces the group definition.</p> |
| 83 |
</li> |
| 84 |
<li> |
| 85 |
<p><i>gropu_identifier</i> is the name used to refer to the module. Must begin with a letter, may contain letters, numbers and underscore characters.</p> |
| 86 |
</li> |
| 87 |
<li> |
| 88 |
<p><i>definitions</i> may contain any definition allowed in the <a href="module.html"><font face="Courier New" color="#003258" size="4"><b>module</b></font> </a> definition part.</p> |
| 89 |
</li> |
| 90 |
<li> |
| 91 |
<p><i>attributes:</i> see the keyword <b><font face="Courier New"><a href="with.html">with</a></font></b> for details.</p> |
| 92 |
</li> |
| 93 |
</ul> |
| 94 |
<hr align="left" width="50%"> |
| 95 |
<p><a name="parametrized">Example</a> |
| 96 |
<p><font face="Courier New">group Skupina {<br> |
| 97 |
type enumerated Examplh {pondeli, utery, streda}<br> |
| 98 |
}</font><br> |
| 99 |
<p>The group Skupina contains one type definition (Examplh).</p> |
| 100 |
<hr align="left" width="25%"> |
| 101 |
<hr align="left" width="25%"> |
| 102 |
<p><a HREF="BNF.html#groupdef">BNF definition</a> of <font face="Courier New"> group</font></p> |
| 103 |
</body> |
| 104 |
</html> |