Flex

Software Screenshot:
Flex
Software Details:
Version: 2.6.4 updated
Upload Date: 12 Jul 17
Developer: Vern Paxson
Distribution Type: Freeware
Downloads: 240

Rating: 5.0/5 (Total Votes: 1)

Flex is widely known as the fast lexical analyser and it’s an open source, totally free and multi-platform command-line application implemented in C/C++ and designed from the offset to be used for generating scanners.

The scanners generated by the Flex tool, which shouldn’t be confused with a non-GNU free implementation of Lex, are actually programs that can recognize lexical patterns in text, also known as applications that perform pattern-matching on text.

Flex has been designed in such a way that it can generate a C source file called "lex.yy.c" which can define the yylex() function. The software is a command-line tool, so you can use it via any terminal emulator.

Command-line options

The program’s command-line options are organized in categories like table compression, debugging, files, scanner behavior, generated code and miscellaneous. To see them at a glance, run the ‘flex --help’ command after installing the software on your system.

Among the table compression command-line options, we can mention the ability to construct equivalence and/or meta-equivalence classes, to use an alternate table representation, to use default compression, to generate a large and fast scanner, as well as to not compress tables.

Debugging command-line options include support for enabling debug mode in scanner, support for writing summary of scanner statistics to stdout, support for running Flex in trace mode, as well as support for writing backing-up information to a specific file and a performance report to stderr.

The scanner behavior can also be customized via command-line options, which include support for generating 7-bit or 8-bit scanners, support for generating a batch scanner, support for generating an interactive scanner, as well as support for tracking line count in yylineno.

Supports 32-bit/64-bit Linux and BSD platforms

The software has been written entirely in the C and C++ programming language and it is known to work well on both Linux and FreeBSD operating systems. Currently, it can be installed on computers supporting either of the 64-bit or 32-bit instruction set architectures.

What is new in this release:

  • build:
  • The indent target now knows about flex's new (as of 2.6.0) layout. The indent rules it would apply are not correct and do need to be fixed.
  • The files included in the flex distribution are now built by the version of flex that is included in the distribution.
  • The configure script has a better idea of which headers are required to build flex. It will also error when missing functions are detected.
  • We have lowered the versions of automake and gettext that configure.ac lists as required for building flex. In autogen.sh, we now check for how to call libtoolize and use what we find in the rest of the script.
  • Since files in lib/ are picked up as needed by src/, we no longer generate a Makefile for that directory.
  • Flex can be cross compiled.
  • documentation:
  • Some typos were removed from the manual.
  • scanner:
  • Some minor performance enhancements.
  • We honor user defined yy_* macros again. We are also more careful to not leak macro definitions into header files.
  • A number of portability fixes were introduced so building flex is more reliable on more platforms. Additionally, outdated function calls were removed.
  • When building the flex executable itself, %# comments from flex.skl are removed when generating the C source code array. This reduces the size of flex.
  • test suite:
  • All scripts in the test suite are now run by $(SHELL) and the needed portability fixes have been included.
  • Test suite dependencies are handled much better. This only matters if you are actively developing flex or its test suite.
  • Tests that depend on platform dependent features now properly skip when those platforms are not present.
  • When running "make check", you can now pas V=0 to silence more of the build. This is useful when you're less connncerned about the

Similar Software

Toka
Toka

3 Jun 15

make utilities
make utilities

3 Jun 15

aime
aime

19 Feb 15

Comments to Flex

Comments not found
Add Comment
Turn on images!