Jump to content

Lex/YACC: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
Lex and YACC are parser generating tools originally developed for the MULTICS operating system, basically Lex does lexical analysis while YACC handles syntax analysis. The two are always distributed together and compliment each other but are also useful on their own to a degree.
'''Lex''' and [[Yacc]] are parser generating tools originally developed for the MULTICS operating system, basically Lex does lexical analysis while Yacc handles syntax analysis. The two are always distributed together and compliment each other but are also useful on their own to a degree.


==Lex==
'''Lex''' is a tool that looks for logical units (lexemes) in sequences of characters. This is typically the first tasks a compiler does after it has when he is has to do is read the source program and group its characters into lexemes.
LEX is a tool that looks for logical units (lexemes) in sequences of characters. This is typically the first tasks a compiler does after it has when he is has to do is read the source program and group its characters into lexemes.
 
==YACC==
YACC is a Look-Ahead LR parser generator that takes Backus–Naur Form text files and generates LALR parsers from it. Primarily used as tool for generating front end parsers for compilers or formal validation for file formats in export filters and so on, so forth.


==Lex/YACC compatible tools that run under OS/2==
==Lex/YACC compatible tools that run under OS/2==
* Abraxas Software PCYACC
* MKS lex & yacc
* MKS lex & yacc
* [[flex]]
* [[flex]]
* Berkeley [http://hobbes.nmsu.edu/download/pub/os2/dev/util/byacc.zip Yacc 1.8] - LALR parser generator
* GNU [http://hobbes.nmsu.edu/download/pub/os2/dev/util/bison-2.7.91.zip bison 2.7.91]
* Thinkage YAY [http://hobbes.nmsu.edu/download/pub/os2/dev/util/yay-1_0.zip]
* Thinkage YAY [http://hobbes.nmsu.edu/download/pub/os2/dev/util/yay-1_0.zip]
* [[Turbo Pascal Lex/YACC]] - Open source tool that uses L/Y syntax but outputs [[Turbo Pascal]] compatible code.
* [[Turbo Pascal Lex/YACC]] - Open source tool that uses L/Y syntax but outputs [[Turbo Pascal]] compatible code.


===Lex/YACC related programmer's utilities===
;Editors with Lex file and YACC BNF file support
* [[Exuberant ctags]] - Creates index files out of YACC source files - Open source - Current
 
===Editors with Lex file and YACC BNF file support===
* [[jEdit]] - Java based - Lex syntax highlighting built in, YACC available as a seperate download - Current
* [[jEdit]] - Java based - Lex syntax highlighting built in, YACC available as a seperate download - Current
* [[NEdit]] - XFree86 - Autoindent, autocomplete and syntax highlighting for YACC BNF files - Open source - Discontinued
* [[NEdit]] - XFree86 - Autoindent, autocomplete and syntax highlighting for YACC BNF files - Open source - Discontinued


===Java Lex/YACC compatible tools===
==Links==
* http://byaccj.sourceforge.net/
 
==Links & publications==
* [http://www.techworld.com.au/article/252319/a-z_programming_languages_yacc The A-Z of Programming Languages: YACC] An interview with Stephen C. Johnson - From Techworld.
* [http://dinosaur.compilertools.net/ Lex & YACC homepage] at Compilertools.net
* [http://dinosaur.compilertools.net/ Lex & YACC homepage] at Compilertools.net
==Author==
* Stephen C. Johnson


[[Category:Generic Unix Tools]][[Category:Parsing Tools]][[Category:Compiler construction]]
[[Category:Generic Unix Tools]][[Category:Parsing Tools]][[Category:Compiler construction]]

Revision as of 23:02, 15 December 2017

Lex and Yacc are parser generating tools originally developed for the MULTICS operating system, basically Lex does lexical analysis while Yacc handles syntax analysis. The two are always distributed together and compliment each other but are also useful on their own to a degree.

Lex is a tool that looks for logical units (lexemes) in sequences of characters. This is typically the first tasks a compiler does after it has when he is has to do is read the source program and group its characters into lexemes.

Lex/YACC compatible tools that run under OS/2

Editors with Lex file and YACC BNF file support
  • jEdit - Java based - Lex syntax highlighting built in, YACC available as a seperate download - Current
  • NEdit - XFree86 - Autoindent, autocomplete and syntax highlighting for YACC BNF files - Open source - Discontinued

Links