Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page



 

Linux / Unix lex command

Quick links

About lex
Syntax
Related commands
Linux / Unix main page

About lex

Generate programs for lexical tasks.

Syntax

lex [-c] [-n] [-t] [-v] [-e | -w ] [ -V -Q [y | n ] ] [file]

-c Indicate C-language action (default option).
-n Suppress the summary of statistics usually written with the -v option. If no table sizes are specified in the lex source code and the -v option is not specified, then -n is implied.
-t Write the resulting program to standard output instead of lex.yy.c.
-v Write a summary of lex statistics to the standard error. (See the discussion of lex table sizes under the heading Definitions in lex.) If table sizes are specified in the lex source code, and if the -n option is not specified, the -v option may be enabled.
-e Generate a program that can handle EUC characters (cannot be used with the -w option). yytext[] is of type unsigned char[].
-w Generate a program that can handle EUC characters (cannot be used with the -e option). Unlike the -e option, yytext[] is of type wchar_t[].
-V Print out version information on standard error.
-Q[y|n] Print out version information to output file lex.yy.c by using -Qy. The -Qn option does not print out version information and is the default.
file A pathname of an input file. If more than one such file is specified, all files will be concatenated to produce a single lex program. If no file operands are specified, or if a file operand is -, the standard input will be used.

Related commands

yacc

Index

Category:
Linux / Unix

Companies:
Click here

Related Pages:

Resolved

Were you able to locate the answer to your questions?

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope