Jump to content

Lex/YACC: Difference between revisions

From EDM2
No edit summary
Line 28: Line 28:
* Stephen C. Johnson
* Stephen C. Johnson


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

Revision as of 19:34, 28 June 2016

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.

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 related programmer's utilities

  • Exuberant ctags - Creates index files out of YACC source files - Open source - Current.

OS/2 text & programmers 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 & publications

Author

  • Stephen C. Johnson