lex_yacc QML Type

Provides support for the lex and yacc tools. More...

Import Statement: import QbsModules .
Since: Qbs 1.6

Properties

Detailed Description

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.

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.

Property Documentation

enableCompilerWarnings : bool

Whether compiler warnings are displayed.

Because lex and yacc are known to produce files that will trigger compiler warnings, such warnings are suppressed by default. Set this property to true if you want to see them.

Default: false

This QML property was introduced in Qbs 1.8.


lexBinary : string

The file path of the lex tool.

Default: "lex"


lexFlags : stringList

Additional command-line options for the lex tool.

Default: []


outputTag : string

The file tag for the generated scanner and parser sources.

Use "cpp" if you want to use a C++ compiler on them.

Default: "c"


uniqueSymbolPrefix : bool

If this property is true, the prefix yy normally used for the generated lexer and parser functions is 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 that the associated lexer and scanner source files have the same base name. It also assumes a variant of lex that supports the non-POSIX option -P, such as flex.

Default: false


yaccBinary : string

The file path of the yacc tool.

Default: "yacc"


yaccFlags : stringList

Additional command-line options for the yacc tool.

Default: []