1# Copyright 2003 Vladimir Prus 2# Distributed under the Boost Software License, Version 1.0. 3# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 4 5import generators ; 6import feature ; 7import type ; 8import property ; 9 10feature.feature bison.prefix : : free ; 11type.register Y : y ; 12type.register YY : yy ; 13generators.register-standard bison.bison : Y : C H ; 14generators.register-standard bison.bison : YY : CPP HPP ; 15 16rule init ( ) 17{ 18} 19 20rule bison ( dst dst_header : src : properties * ) 21{ 22 local r = [ property.select bison.prefix : $(properties) ] ; 23 if $(r) 24 { 25 PREFIX_OPT on $(<) = -p $(r:G=) ; 26 } 27} 28 29actions bison 30{ 31 bison $(PREFIX_OPT) -d -o $(<[1]) $(>) 32} 33