lex.1

来自「unix v7是最后一个广泛发布的研究型UNIX版本」· 1 代码 · 共 65 行

1
65
字号
.TH LEX 1 .SH NAMElex \- generator of lexical analysis programs.SH SYNOPSIS.B lex[.B \-tvfn] [ file ] ....SH DESCRIPTION.I Lexgenerates programs to be used in simple lexical analyis of text.The input.I files(standard input default)contain regular expressionsto be searched for, and actions written in C to be executed whenexpressions are found..PPA C source program, `lex.yy.c' is generated, to be compiled thus:.IPcc lex.yy.c \-ll.LPThis program, when run, copies unrecognized portions ofthe input to the output,and executes the associatedC action for each regular expression that is recognized..PPThe following .I lexprogram converts upper case to lower,removes blanks at the end of lines,and replaces multiple blanks by single blanks..IP "".nf.ta \w'[A\-Z] 'u%%[A\-Z]	putchar(yytext[0]+\'a\'\-\'A\');[ ]+$[ ]+	putchar(\' \');.fi.PPThe options have the following meanings..TP.B \-tPlace the result on the standard output instead of in file`lex.yy.c'..TP.B \-vPrint a one-line summary of statistics of the generated analyzer..TP.B \-nOpposite of.BR \-v ;.B \-nis default..TP.B \-f`Faster' compilation: don't bother to packthe resulting tables; limited to small programs..SH "SEE ALSO"yacc(1).brM. E. Lesk and E. Schmidt,.I LEX \- Lexical Analyzer Generator

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?