File: index.html

package info (click to toggle)
clig 1.9.10-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 540 kB
  • ctags: 114
  • sloc: tcl: 1,908; ansic: 497; sh: 232; makefile: 117
file content (156 lines) | stat: -rw-r--r-- 5,151 bytes parent folder | download | duplicates (2)
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> 
<HTML>
<HEAD>
<TITLE>clig --- Command Line Interpreter Generator</TITLE>
<!-- $Revsion$, $Date: 2001/01/21 15:06:08 $ -->


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

<h3>For the impatient and those who know</h3> 

<p>You can download the <a href="./clig.ps.gz">gzipped PostScript
documentation</a> or the latest release as <a
href="./clig-|VERSION|.tar.gz">clig-|VERSION|.tar.gz</a> or as <a
href="./clig-|VERSION|-0.noarch.rpm">clig-|VERSION|-0.noarch.rpm</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>You can also download <a href="./dir.ttml">older versions</a> of clig.

<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>

    <p>Clig creates for your C-Program or lets you use in your
      Tcl-script 
    <ul>
      <li>a command line interpreter with those features:
	<ul>
	  <li>Flag, Int, Long, Float, Double or String options
	  <li>no. of parameters of options can be specified
	  <li>a range can be specified for the numerical options
	  <li>options can have defaults
	  <li>options can be mandatory (not really optional then :-)
	</ul>
	The command line interpreter will check for your C-program
	or Tcl-script the existence of mandatory options, correct
	range of numerical option arguments and correct number of
	arguments. Violation results in readable error messages.
	
	Parsed results are delivered to your C-program in a
	custum-built structure or as directly accessible variables
	to your Tcl-script.
	
      <li>a readable, up-to-date usage-message
	
      <li>a basic manual page
    </ul>
    
    <p>Clig takes as input a simple description file.

    <p>Clig generates standard C (well, I tried as hard as I can :-)
    It is reported to work well with C++. Within a Tcl-script, code
    generation is not necessary. Just declare your command line
    arguments and then run the parser.

    <p>The resulting code is self contained and does not depend on a
    library (except for libc, of course).

    <p>Clig is written in Tcl
	

    <p>Clig is free software. Its licence is the GPL.
 

<h3>An Example</h3>

Consider the following specification:
<LISTING>
Int -rgb rgb \
    "specifies a color by its red, green and blue components"\
    -c 3 3 \
    -r 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 or Tcl-script, 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>-c 3 3</code> specifies that the option <code>-rgb</code>
must be followed by at least 3 but no more than three (i.e. 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>Double</code>
<dd> is an option with zero or more <code>double</code> parameters.
<dt> <code>Int</code>
<dd> accepts zero or more int parameters.
<dt> <code>Long</code>
<dd> accepts zero or more long (i.e. 8 byte int on some machines) 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>

<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:kirschh@lionbioscience.com">Harald Kirsch</a>. Flames expressing
the opinion that <code>getopt()</code> is the only way to go are
silently ignored.

  <p>
    <a href="http://validator.w3.org/check/referer"><img border=0
        src="vh32"
        alt="Valid HTML 3.2!" height=31 width=88></a>
  </p>
</BODY>
</HTML>