Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Size differences between yacc and bison



On Thu, Oct 31, 2019 at 09:00:53AM +0100, Anders Magnusson wrote:
> Here are the results, using gcc as the compiler:
> 
> bison:
> nbi386:/home/ragge/pcc/cc/ccom >size cgram.o
>    text    data     bss     dec     hex filename
>   25637       0       0   25637    6425 cgram.o
> 
> yacc:
> nbi386:/home/ragge/pcc/cc/ccom >size cgram.o
>    text    data     bss     dec     hex filename
>   57914       0      24   57938    e252 cgram.o

The generated automatons seem to be nearly identical, but the table encoding
differs: bison uses uint8 and uint16 types in a lot of static tables, while
yacc seems to generically use YYINT (which is typedef'd to int).

Not sure if that explains it all though, but maybe a good first thing to check.

Martin


Home | Main Index | Thread Index | Old Index