Module lex_yacc

The lex_yacc module allows you to create scanners and parsers via the POSIX tools lex and yacc, respectively. These tools are closely related and share a number of properties, which is why they are represented by a single module.

General Properties

PropertyTypeSinceDefaultDescription
lexBinarystring1.6"lex"The file path of the lex tool.
lexFlagsstringList1.6emptyAdditional command-line options for the lex tool.
outputTagstring1.6"c"The file tag for the generated scanner and parser sources. Use "cpp" if you want to use a C++ compiler on them.
uniqueSymbolPrefixbool1.6falseIf this property is true, the normal prefix yy used for the generated lexer and parser functions will be replaced by the base name of the file provided as input to lex and yacc, respectively. Enable this property if you want to use more than one lexer or parser in a single product.

Note: Enabling this property requires associated lexer and scanner source files to have the same base name. It also assumes a variant of lex that supports the non-POSIX option -P, such as flex.

yaccBinarystring1.6"yacc"The file path of the yacc tool.
yaccFlagsstringList1.6emptyAdditional command-line options for the yacc tool.

Relevant File Tags

TagAuto-tagged File NamesSinceDescription
"lex.input"*.l1.6Source files with this tag serve as inputs to the lex tool.
"yacc.input"*.y1.6Source files with this tag serve as inputs to the yacc tool.