Index: Makefile
===================================================================
--- Makefile	(revision 18e195291679abf861a0d789e8042605ea2f8941)
+++ Makefile	(revision 243d027267a93fc610c5c6b6e29c1a92023e46db)
@@ -100,5 +100,5 @@
 install_share: share
 	cd $(CUR_DIR)/share && make install; cd $(CUR_DIR)
-	echo grammar compilation...
+	#grammar compilation...
 	dgc
 
Index: src/tok.l/Makefile
===================================================================
--- src/tok.l/Makefile	(revision 5f4d9c3b32eea7b6643a751aa75bdb05b7d41576)
+++ src/tok.l/Makefile	(revision 243d027267a93fc610c5c6b6e29c1a92023e46db)
@@ -9,10 +9,10 @@
 
 tok: lex.yy.c
-	$(CC) $(CFLAGS) -lfl -o tok lex.yy.c $(LDFLAGS)
+	$(CC) $(CFLAGS) -o tok lex.yy.c tok_cmdline.c -lfl $(LDFLAGS)
 
 lex.yy.c: tok_cmdline.h tok_cmdline.c
 	$(FLEX) tok.l
 
-tok_cmdline.h tok_cmdline.c:
+tok_cmdline.h tok_cmdline.c: tok_cmdline.ggo
 	$(GENGETOPT) -i tok_cmdline.ggo --conf-parser --file=tok_cmdline
 
Index: src/tok.l/tok.l
===================================================================
--- src/tok.l/tok.l	(revision 5f4d9c3b32eea7b6643a751aa75bdb05b7d41576)
+++ src/tok.l/tok.l	(revision 243d027267a93fc610c5c6b6e29c1a92023e46db)
@@ -56,12 +56,13 @@
 %%
 
-/*int main(int argc, char** argv)
+int main(int argc, char** argv)
 {
-  if (cmdline_parser(argc, argv, &args) != 0) return 1;
+  if (cmdline_parser(argc, argv, &args) != 0) exit(1);
   setlocale(LC_CTYPE,"");
+
   setlocale(LC_COLLATE,"");
   yylex();
   return 0;
-}*/
+}
 
 int yywrap()
Index: src/tok.l/tok_cmdline.ggo
===================================================================
--- src/tok.l/tok_cmdline.ggo	(revision 5f4d9c3b32eea7b6643a751aa75bdb05b7d41576)
+++ src/tok.l/tok_cmdline.ggo	(revision 243d027267a93fc610c5c6b6e29c1a92023e46db)
@@ -1,4 +1,29 @@
 package "tok"
 version "0.1"
+usage   "tok [OPTIONS]"
+purpose "tok transforms raw text into UTT format."
 
-option "interactive"		i	"Interactive mode." flag off
+description "OPTIONS"
+
+option "interactive"		i	"Interactive mode (no output buffering)." flag off
+
+text "
+DESCRIPTION
+
+tok reads from standard input, identifies tokens on the basis of their orthographic form and writes a sequence of segments in UTT format to
+the standard output. The type of the token is printed as the type field.
+
+OUTPUT FORMAT
+
+UTT-file with four fields: start, length, type, and form. In the type field five types of tokens are distinguished:
+
+  W (word) - continuous sequence of letters
+  N (number) - continuous sequence of digits
+  S (space) - continuous sequence of space characters
+  P (punctuation) - single printable character other than W, N, S
+  B (unprintable character) - single unprintable character
+
+USAGE EXAMPLE
+
+      tok
+"
