onsdag den 19 oktober 2011 klockan 13:24 skrev Sergey Poznyakoff detta: > Mats Erik Andersson <[email protected]> ha escrit: > > > We could perhaps convince Yacc to delay the preamble somewhat > > Does it support "%top"? If so, placing the following at the start of > the *.y file should suffice: > > %top { > #include <config.h> > }
Neither OpenBSD, nor FreeBSD, allows this. The preamble is hardcoded in the executable, and includes "<stdlib.h>" as the very first action. This breaks our use case immediately. The only good news is that both systems do fine as soon as Bison is installed properly, leading to full build success from a bootstrapped source tree. > If not, there's no way other than to postprocess the yacc output by > e.g. a sed script. Do we want to add such complexity? I am unsure about it. Regards, Mats
