Also known as lex.1, lex(1), flex, flex.1, flex(1), flex++
standard UNIX utility
The lex utility shall conform to XBD Utility Syntax Guidelines , except for Guideline 9. The input files shall be text files containing lex source code, as described in the EXTENDED DESCRIPTION section. Provide a default value for the internationalization variables that are unset or null. (See XBD Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.) If set to a non-empty string value, override the values of all the other internationalization variables. Determine the locale for the behavior of ranges, equivalence classes, and multi-character collating elements within regular expressions. If this variable is not set to the POSIX locale, the results are unspecified. Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments and input files), and the behavior of character classes within regular expressions. If this variable is not set to the POSIX locale, the results are unspecified. Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error. [XSI) ] ![[Option Start]]( Determine the location of message catalogs for the processing of LC MESSAGES. ![[Option End]]( Implementation-defined informational, error, and warning messages concerning the contents of lex source code input shall be written to either the standard output or standard error. If the -t option is specified, implementation-defined informational, error, and warning messages concerning the contents of lex source code input shall be written to the standard error. 1. Implementation-defined informational, error, and warning messages concerning the contents of lex source code input shall be written to either the standard output or standard error. Each input file shall contain lex source code, which is a table of regular expressions with corresponding actions in the form of C program fragments. When lex.yy.c is compiled and linked with the lex library (using the -l l operand with c99 ), the resulting program shall read character input from the standard input and shall partition it into strings that match the given expressions. The external int yyleng shall be set to the length of the matching string. C-language code in the input shall not contain C-language trigraphs. The C-language code within "%{" and "%}" delimiter lines shall not contain any lines consisting only of "%}", or only of "%%". Definitions appear before the first "%%" delimiter. Any line in this section not contained between "%{" and "%}" lines and not beginning with a shall be assumed to define a lex substitution string. The format of these lines shall be: If a name does not meet the requirements for identifiers in the ISO C standard, the result is undefined. The string substitute shall replace the string { name } when it is used in a rule. The name string shall be recognized in this context only when the braces are provided and when it does not appear within a bracket expression or within double-quotes. Implementations shall accept declarations in the Definitions section for setting certain internal table sizes. The declarations are shown in the following table. In the table, n represents a positive decimal integer, preceded by one or more characters. The exact meaning of these table size numbers is implementation-defined. The implementation shall document how these numbers affect the lex utility and how they are related to any output that may be generated by the implementation should limitations be encountered during the execution of lex . It shall be possible to determine from this output which of the table size values needs to be modified to permit lex to successfully generate tables for the input language. The values in the column Minimum Value represent the lowest values conforming implementations shall provide. The rules in lex sour
Excerpt from a page describing this subject · 38,716 chars · not written by Vinony
via Wikidata · CC0
via Wikidata sitelinks · CC0
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).