Lex and Yacc

Lex is a tool used for lexical analysis and building lexical scanners. Yacc is a tool for specifying the grammar of a language and processing parts of the language so recoginized using a syntax tree. These tools provide a convenient way of building source code analyzers, debuggers, compilers, interpreters, code converters, etc. The best part is that these tools generate C code and can also incorporate user-defined C code within the code so generated. Flex is an improved version of Lex that also supports C++ and Bison is an improved version of yacc.

Course Benefits

Upon completion of this course, participants will be able to:
  • Understand how to build lexical scanners using Lex
  • Perform lexical analysis using Lex
  • Understand how to describe the syntax of a language to Yacc
  • Build language processing tools using Lex and Yacc
  • Know how to debug Lex and Yacc scripts
  • Appreciate the generated C code from Lex/Flex and Yacc/Bison

Target Audience

  • Programmers who want to build or debug tools for language processing
  • Experienced programmers who want to write compilers, code analyzers and code translators

Prerequisites

  • Knowledge of C

Course Duration

2 days