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
Lex (software)
(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|Lexical analyzer generator}} {{Infobox software | name = Lex | logo = | screenshot = | screenshot size = | caption = | author = [[Mike Lesk]], [[Eric Schmidt]] | developer = | released = {{Start date and age|1975}} | latest release version = | latest release date = | programming language = [[C (programming language)|C]] | operating system = [[Unix]], [[Unix-like]], [[Plan 9 from Bell Labs|Plan 9]] | platform = [[Cross-platform]] | genre = [[Command (computing)|Command]] | license = Plan 9: [[MIT License]] | website = }} '''Lex''' is a [[computer program]] that generates [[lexical analysis|lexical analyzer]]s ("scanners" or "lexers").<ref>{{cite book |last1=Levine |first1=John R. | author-link1=John R. Levine |last2=Mason |first2=Tony |last3=Brown |first3=Doug |title=lex & yacc |pages=[https://archive.org/details/lexyacc00levi/page/1 1]β2 |publisher=[[O'Reilly Media|O'Reilly]] |year=1992 |edition=2 |isbn=1-56592-000-7 |url=https://archive.org/details/lexyacc00levi|url-access=registration }}</ref><ref>{{Cite book | last=Levine | first=John | author-link=John Levine | title =flex & bison | publisher=O'Reilly Media | date=August 2009 | page=304 | url=http://oreilly.com/catalog/9780596155988 | isbn=978-0-596-15597-1}}</ref> It is commonly used with the [[yacc]] [[parser generator]] and is the standard lexical analyzer generator on many [[Unix]] and [[Unix-like]] systems. An equivalent tool is specified as part of the [[POSIX]] standard.<ref>[https://pubs.opengroup.org/onlinepubs/9699919799/utilities/lex.html The Open Group Base Specifications Issue 7, 2018 edition Β§ Shell & Utilities Β§ Utilities Β§ lex]</ref> Lex reads an input [[stream (computing)|stream]] specifying the lexical analyzer and writes [[source code]] which implements the lexical analyzer in the [[C (programming language)|C programming language]]. In addition to C, some old versions of Lex could generate a lexer in [[Ratfor]].<ref>{{cite book|title=Lex & Yacc |url=https://archive.org/details/lexyacc00levi |url-access=registration |author1=John R. Levine |author2=John Mason |author3=Doug Brown |publisher=O'Reilly |date=1992 |isbn=9781565920002 }}</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)