Flex (lexical analyser generator)

flex
Developer(s)Vern Paxson
Initial releasearound 1987; 37 years ago (1987)[1]
Stable release
2.6.4 / May 6, 2017; 7 years ago (2017-05-06)
Repository
Operating systemUnix-like
TypeLexical analyzer generator
LicenseBSD license
Websitegithub.com/westes/flex

Flex (fast lexical analyzer generator) is a free and open-source software alternative to lex.[2] It is a computer program that generates lexical analyzers (also known as "scanners" or "lexers").[3][4] It is frequently used as the lex implementation together with Berkeley Yacc parser generator on BSD-derived operating systems (as both lex and yacc are part of POSIX),[5][6][7] or together with GNU bison (a version of yacc) in *BSD ports[8] and in Linux distributions. Unlike Bison, flex is not part of the GNU Project and is not released under the GNU General Public License,[9] although a manual for Flex was produced and published by the Free Software Foundation.[10]

  1. ^ Levine, John (August 2009). flex & bison. O'Reilly Media. p. 9. ISBN 978-0-596-15597-1. In about 1987, Vern Paxson of the Lawrence Berkeley Lab took a version of lex written in ratfor (an extended Fortran popular at the time) and translated it into C, calling it flex, for 'Fast Lexical Analyzer Generator.'
  2. ^ Levine, John R.; Mason, Tony; Brown, Doug (1992). lex & yacc (2nd ed.). O'Reilly. p. 279. ISBN 1-56592-000-7. A freely available version of lex is flex.
  3. ^ Levine, John R.; Mason, Tony; Brown, Doug (1992). lex & yacc (2nd ed.). O'Reilly. pp. 1–2. ISBN 1-56592-000-7.
  4. ^ Levine, John (August 2009). flex & bison. O'Reilly Media. p. 304. ISBN 978-0-596-15597-1.
  5. ^ OpenBSD (2015-12-11). "src/usr.bin/lex/". BSD Cross Reference. Retrieved 2015-12-26. This is flex, the fast lexical analyzer generator.
  6. ^ "flex(1)". *BSD man pages.
  7. ^ "yacc(1)". *BSD man pages.
  8. ^ "bison-3.0.4 – GNU parser generator". OpenBSD ports. 2015-11-15. Retrieved 2015-12-26.
  9. ^ Is flex GNU or not?, flex FAQ
  10. ^ "Flex - a scanner generator - Table of Contents - GNU Project - Free Software Foundation (FSF)". ftp.gnu.org. Retrieved 2019-12-05.