Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Flex (lexical analyser generator)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|UNIX program for lexical analysis}} {{Infobox software | name = flex | logo = | developer = [[Vern Paxson]] | released = around {{Start date and age|1987}}<ref name=releasehistorypage9>{{cite book |last=Levine |first=John |author-link=John R. Levine |title=flex & bison |isbn=978-0-596-15597-1 |publisher=O'Reilly Media |date=August 2009 |page=9 |quote=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 {{'}}''F''ast ''Lex''ical Analyzer Generator.{{'}} |url=https://books.google.com/books?id=3Sr1V5J9_qMC&q=%22In+about+1987%2C+Vern+Paxson%22}}</ref> | latest release version = 2.6.4 | latest release date = {{Start date and age|2017|5|6}} | operating system = [[Unix-like]] | genre = [[Lexical analysis|Lexical analyzer]] generator | license = [[BSD license]] | website = {{URL|https://github.com/westes/flex}} }} '''Flex''' (fast [[lexical analyzer]] generator) is a [[free and open-source software]] alternative to [[lex programming tool|lex]].<ref>{{cite book |last1=Levine |first1=John R. |authorlink1=John R. Levine |last2=Mason |first2=Tony |last3=Brown |first3=Doug |title=lex & yacc |publisher=[[O'Reilly Media|O'Reilly]] |year=1992 |edition=2nd |isbn=1-56592-000-7 |page=279 |quote=A freely available version of lex is ''flex''. |url=https://books.google.com/books?id=YrzpxNYegEkC&q=%22a+freely+available+version+of+lex+is+flex%22}}</ref> It is a [[computer program]] that generates [[lexical analysis|lexical analyzer]]s (also known as "scanners" or "lexers").<ref>{{cite book |last1=Levine |first1=John R. | authorlink1=John R. Levine |last2=Mason |first2=Tony |last3=Brown |first3=Doug |title=lex & yacc |pages=1β2 |publisher=[[O'Reilly Media|O'Reilly]] |year=1992 |edition=2nd |isbn=1-56592-000-7 |url=https://books.google.com/books?id=YrzpxNYegEkC}}</ref><ref>{{cite book |last=Levine |first=John |author-link=John Levine |title=flex & bison |publisher=O'Reilly Media |date=August 2009 |isbn=978-0-596-15597-1 |page=304 |url=http://oreilly.com/catalog/9780596155988}}</ref> It is frequently used as the lex implementation together with [[Berkeley Yacc]] [[parser generator]] on [[Berkeley Software Distribution|BSD]]-derived operating systems (as both <code>lex</code> and <code>yacc</code> are part of [[POSIX]]),<ref>{{cite web |url=http://bxr.su/o/usr.bin/lex/ |title=src/usr.bin/lex/ |website=BSD Cross Reference |author=OpenBSD |author-link=OpenBSD |date=2015-12-11 |access-date=2015-12-26 |quote="This is flex, the fast lexical analyzer generator."}}</ref><ref>{{cite web |url=http://mdoc.su/-/flex.1 |title=<code>flex(1)</code> |website=*BSD [[man page]]s}}</ref><ref>{{cite web |url=http://mdoc.su/-/yacc.1 |title=<code>yacc(1)</code> |website=*BSD [[man page]]s}}</ref> or together with [[GNU bison]] (a version of [[yacc]]) in [[Ports collection|*BSD ports]]<ref>{{cite web |url=http://ports.su/devel/bison |title=bison-3.0.4 β GNU parser generator |work=[[OpenBSD ports]] |date=2015-11-15 |access-date=2015-12-26}}</ref> and in Linux distributions. Unlike Bison, flex is not part of the [[GNU Project]] and is not released under the [[GNU General Public License]],<ref>[https://westes.github.io/flex/manual/Is-flex-GNU-or-not_003f.html#Is-flex-GNU-or-not_003f Is flex GNU or not?], flex FAQ</ref> although a manual for Flex was produced and published by the Free Software Foundation.<ref>{{Cite web|url=https://ftp.gnu.org/old-gnu/Manuals/flex-2.5.4/flex.html|title=Flex - a scanner generator - Table of Contents - GNU Project - Free Software Foundation (FSF)|website=ftp.gnu.org|access-date=2019-12-05}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)