3 058b0118 2005-01-03 devnull lex \- generator of lexical analysis programs
4 058b0118 2005-01-03 devnull .SH SYNOPSIS
10 058b0118 2005-01-03 devnull .I file ...
12 058b0118 2005-01-03 devnull .SH DESCRIPTION
14 058b0118 2005-01-03 devnull generates programs to be used in simple lexical analysis of text.
15 058b0118 2005-01-03 devnull The input
17 058b0118 2005-01-03 devnull (standard input default)
18 058b0118 2005-01-03 devnull contain regular expressions
19 058b0118 2005-01-03 devnull to be searched for and actions written in C to be executed when
20 058b0118 2005-01-03 devnull expressions are found.
22 058b0118 2005-01-03 devnull A C source program,
23 058b0118 2005-01-03 devnull .B lex.yy.c
24 058b0118 2005-01-03 devnull is generated.
25 058b0118 2005-01-03 devnull This program, when run, copies unrecognized portions of
26 058b0118 2005-01-03 devnull the input to the output,
27 058b0118 2005-01-03 devnull and executes the associated
28 058b0118 2005-01-03 devnull C action for each regular expression that is recognized.
30 058b0118 2005-01-03 devnull The options have the following meanings.
33 058b0118 2005-01-03 devnull Place the result on the standard output instead of in file
34 058b0118 2005-01-03 devnull .BR lex.yy.c .
37 058b0118 2005-01-03 devnull Print a one-line summary of statistics of the generated analyzer.
40 058b0118 2005-01-03 devnull Opposite of
43 058b0118 2005-01-03 devnull is default.
46 058b0118 2005-01-03 devnull Adds code to be able to compile through the native C compilers.
47 058b0118 2005-01-03 devnull .SH EXAMPLES
48 058b0118 2005-01-03 devnull This program converts upper case to lower,
49 058b0118 2005-01-03 devnull removes blanks at the end of lines,
50 058b0118 2005-01-03 devnull and replaces multiple blanks by single blanks.
54 058b0118 2005-01-03 devnull [A-Z] putchar(yytext[0]+\'a\'-\'A\');
56 058b0118 2005-01-03 devnull [ ]+ putchar(\' \');
58 058b0118 2005-01-03 devnull .SH FILES
59 058b0118 2005-01-03 devnull .TF /sys/lib/lex/ncform
61 058b0118 2005-01-03 devnull .B lex.yy.c
64 058b0118 2005-01-03 devnull .B /sys/lib/lex/ncform
66 058b0118 2005-01-03 devnull .SH "SEE ALSO"
67 058b0118 2005-01-03 devnull .IR yacc (1),
68 058b0118 2005-01-03 devnull .IR sed (1)
70 058b0118 2005-01-03 devnull M. E. Lesk and E. Schmidt,
71 058b0118 2005-01-03 devnull `LEX\(emLexical Analyzer Generator',
73 058b0118 2005-01-03 devnull Unix Research System Programmer's Manual,
74 058b0118 2005-01-03 devnull Tenth Edition, Volume 2.
75 058b0118 2005-01-03 devnull .SH SOURCE
76 c3674de4 2005-01-11 devnull .B \*9/src/cmd/lex
78 058b0118 2005-01-03 devnull Cannot handle
81 058b0118 2005-01-03 devnull The asteroid to kill this dinosaur is still in orbit.