On Tue, 18 Feb 2014 18:49:21 -0700, Theo de Raadt wrote: > The *.y file is the source code. the .c and .h files it generates are not > the source code, but an intermediate language. > > To stetch this to the limit, we should be shipping cpp-processed files, for > maximum portability. > > NO WAY! .y files should be the portable ones, and this entire decades old > pattern of shipping y.tab.* files has been incredibly hurtful. After yacc > became part of full operating systems, that practice served NO PURPOSE.
If only it were that simple. When I didn't ship the generated parser files I had to spend a lot of time debugging problems thast turned out to be buggy versions of flex or yacc/bison on people's systems. You always tend to suspect the code, not the tools. And don't even get me started about bison and its use of alloca() and compilers that don't really support it. It's basically impossible to support something when the actual code being compiled varies drastically from system to system. - todd