bison¶
The bison program is a code generator which creates C or C++ files. The generated files are compiled into object files.
-
class
waflib.Tools.bison.bison(*k, **kw)[source]¶ Bases:
waflib.Task.TaskCompiles bison files
-
color= 'BLUE'¶
-
ext_out= ['.h']¶
-
hcode= b'${BISON} ${BISONFLAGS} ${SRC[0].abspath()} -o ${TGT[0].name}'¶
-
orig_run_str= '${BISON} ${BISONFLAGS} ${SRC[0].abspath()} -o ${TGT[0].name}'¶
-
vars= ['BISON', 'BISONFLAGS']¶
-
-
waflib.Tools.bison.big_bison(self, node)[source]¶ Creates a bison task, which must be executed from the directory of the output file.
-
waflib.Tools.bison.extension(*k)¶ Decorator that registers a task generator method which will be invoked during the processing of source files for the extension given:
from waflib import Task class mytask(Task): run_str = 'cp ${SRC} ${TGT}' @extension('.moo') def create_maa_file(self, node): self.create_task('mytask', node, node.change_ext('.maa')) def build(bld): bld(source='foo.moo')