Flex (fast lexical analyzer generator) is a tool for generating scanners. A scanner, sometimes called a tokenizer, is a program which recognizes lexical patterns in...
flex (fast lexical analyzer generator) is a tool for generating scanners. a scanner, sometimes called a tokenizer, is a program which recognizes lexical patterns in text. the flex program reads userspecified input files, or its standard input if no file names are given, for a description of a scanner to generate. the description is in the form of pairs of regular expressions and c code, called rules. flex generates a c source file named, "lex.yy.c", which defines the function yylex(). the file "lex.yy.c" can be compiled and linked to produce an executable. when the executable is run, it analyzes its input for occurrences of text matching the regular expressions for each rule. whenever it finds a match, it executes the corresponding c code.
development-tool analyzer