File: index.html

package info (click to toggle)
clig 1.1.3-4
  • links: PTS
  • area: main
  • in suites: potato
  • size: 328 kB
  • ctags: 72
  • sloc: tcl: 1,459; ansic: 253; makefile: 109; sh: 60; csh: 52
file content (127 lines) | stat: -rw-r--r-- 4,168 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>clig --- Command Line Interpreter Generator (20-Jan-1998)</TITLE>
<!-- Created by: Harald Kirsch,  1-Dec-1997 -->
<!-- Changed by: Harald Kirsch, 20-Jan-1998 -->


</HEAD>
<BODY>
<H1>clig --- Command Line Interpreter Generator</H1>

<b>... to all those still using C.</b><p>
<hr width=50, align=left>

<h3>For the impatient and those who know</h3> You can download the <a
href="./clig.ps.gz">gzipped PostScript documentation</a> or the
latest release as <a href="./|CLIGTARGZ|">|CLIGTARGZ|</a>
or as <a href="./|CLIGRPM|">|CLIGRPM|</a>, which
includes the documentation.  <p>

If you know <code>clig</code> already, you may be interested in the 
<a href="CHANGES">changes</a> since the last release.  <p>

If you feel the need to download older versions, have a look at the
<a href="http://wsd.iitb.fhg.de/software/">software-directory</a>.

<hr width=50, align=left>
<blockquote>
Remark: <b>clig is not CLIG</b>. If you were looking for the
<em>Clig Grapher for linguistic data structures</em> by Karsten
Konrad, you should go to the 
<a href="http://www.ags.uni-sb.de/~konrad/clig.html">
CLIG homepage
</a>. Both tools don't have anything to do with each other. They share
their names only due to a historical coincidence.
</blockquote>

<hr width=50, align=left>

<h3>What is clig?</h3>
Clig  uses  a simple description  to generate C-code
for a function
<BLOCKQUOTE>
<code>
   Cmdline *parseCmdline(int argc, char **argv)
</code>
</BLOCKQUOTE>
which parses the command-line of a typical  C-program  and
returns  the  result  in a structure of type <code>Cmdline</code>.
<p>


However, one of the main reasons to use clig is maybe the automatic
generation of a <CODE>usage()</CODE>-function which is always
up-to-date with respect to the options actually understood by the
program.
 

<h3>An Example</h3>

Consider the following specification:
<LISTING>
Int -rgb rgb \
    "specifies a color by its red, green and blue components"\
    count=3,3 \
    range=0,255
</LISTING>

It shows most of the features available in <code>clig</code>. Here an
option <code>-rgb</code> is declared with parameters of type
<code>int</code>. Within the C-program, it will be called
<code>rgb</code>. The next line contains in quotes a usage string to
be displayed by the generated <code>usage()</code>-function. The line
<code>count=3,3</code> specifies that the option <code>-rgb</code>
must be followed by exactly 3 integer values. Finally the allowed
range for the three values is specified.
<p>

An <a href="cmdline.cli">example</a> demonstrating most features of clig is also available.


<p>
Currently, <code>clig</code> understands the following option types:
<dl>
<dt> <CODE>Flag</CODE>
<dd> is a boolean option (or flag) without parameters.
<dt> <code>Float</code>
<dd> is an option with zero or more floating point parameters.
<dt> <code>Int</code>
<dd> accepts zero or more integer parameters.
<dt> <code>String</code>
<dd> allows arbitrary strings as parameters.
</dl>
For floating point, integer and string valued options a range can be
specified for the number of allowed parameters. The allowed range for
floating point and integer option values can also be specified.
<p>

<h3>Features missing on my todo-list</h3>
<ul>
<li> neural net type command line parser,
<li> fuzzy logic command line parser,
<li> inheritance hierarchy for command line options,
<li> visual basic support,
<li> command lines shorter than 128 characters,
<li> generation of WINDOS program group,
<li> Ole, Nils or Jens support,
<li> InactiveX-aware buzzword-recognition.
</ul>

Looks like Java is missing on the list? Yes, because Jclig is already
available for almost a year. But since I am not (yet) actively
programming in Java, it is not ready to ship.

<h3>Requirements</h3>
<code>Clig</code> is implemented in Tcl and you will not be able to
make it work without. The generated C-code is Tcl-free.

<hr>
Please send comments and suggestions to 
<a href="mailto:kir@iitb.fhg.de">Harald Kirsch</a>. Flames expressing
the opinion that <code>getopt()</code> is the only way to go are
silently ignored.

</BODY>
</HTML>