Changeset 243d027 for src


Ignore:
Timestamp:
01/18/13 18:46:38 (12 years ago)
Author:
Tomasz Obrebski <to@…>
Branches:
master
Children:
e0cd003
Parents:
18e1952
git-author:
Tomasz Obrebski <to@…> (01/18/13 18:46:38)
git-committer:
Tomasz Obrebski <to@…> (01/18/13 18:46:38)
Message:

tok accepts options and prints help message now

Location:
src/tok.l
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/tok.l/Makefile

    r5f4d9c3 r243d027  
    99 
    1010tok: lex.yy.c 
    11         $(CC) $(CFLAGS) -lfl -o tok lex.yy.c $(LDFLAGS) 
     11        $(CC) $(CFLAGS) -o tok lex.yy.c tok_cmdline.c -lfl $(LDFLAGS) 
    1212 
    1313lex.yy.c: tok_cmdline.h tok_cmdline.c 
    1414        $(FLEX) tok.l 
    1515 
    16 tok_cmdline.h tok_cmdline.c: 
     16tok_cmdline.h tok_cmdline.c: tok_cmdline.ggo 
    1717        $(GENGETOPT) -i tok_cmdline.ggo --conf-parser --file=tok_cmdline 
    1818 
  • src/tok.l/tok.l

    r5f4d9c3 r243d027  
    5656%% 
    5757 
    58 /*int main(int argc, char** argv) 
     58int main(int argc, char** argv) 
    5959{ 
    60   if (cmdline_parser(argc, argv, &args) != 0) return 1; 
     60  if (cmdline_parser(argc, argv, &args) != 0) exit(1); 
    6161  setlocale(LC_CTYPE,""); 
     62 
    6263  setlocale(LC_COLLATE,""); 
    6364  yylex(); 
    6465  return 0; 
    65 }*/ 
     66} 
    6667 
    6768int yywrap() 
  • src/tok.l/tok_cmdline.ggo

    r5f4d9c3 r243d027  
    11package "tok" 
    22version "0.1" 
     3usage   "tok [OPTIONS]" 
     4purpose "tok transforms raw text into UTT format." 
    35 
    4 option "interactive"            i       "Interactive mode." flag off 
     6description "OPTIONS" 
     7 
     8option "interactive"            i       "Interactive mode (no output buffering)." flag off 
     9 
     10text " 
     11DESCRIPTION 
     12 
     13tok reads from standard input, identifies tokens on the basis of their orthographic form and writes a sequence of segments in UTT format to 
     14the standard output. The type of the token is printed as the type field. 
     15 
     16OUTPUT FORMAT 
     17 
     18UTT-file with four fields: start, length, type, and form. In the type field five types of tokens are distinguished: 
     19 
     20  W (word) - continuous sequence of letters 
     21  N (number) - continuous sequence of digits 
     22  S (space) - continuous sequence of space characters 
     23  P (punctuation) - single printable character other than W, N, S 
     24  B (unprintable character) - single unprintable character 
     25 
     26USAGE EXAMPLE 
     27 
     28      tok 
     29" 
Note: See TracChangeset for help on using the changeset viewer.