[Scons-users] yacc vs bison

Pierre-Luc Boily pierreluc.boily at gmail.com
Sat Dec 7 00:05:56 EST 2019


Hello,

I am converting a quite old make build system to scons and I am trying to
figure out how to make the following happen with scons :

/usr/bin/yacc -t -o omsf_yacc.c -p omsf_ -d omsf_yacc.y
/usr/bin/lex -oomsf_lex.c -Pomsf_ omsf_lex.l

I tried this 
env.Append(YACCFLAGS=['-t', '-p', 'omsf_', '-d'],
                  LEXFLAGS=['-Pomsf_'])

env.CFile(target='omsf_lex',
               source='omsf_lex.l')

env.CFile(target='omsf_yacc',
               source='omsf_yacc.y')

to be close as possible to what we have with make system.  It looks good for
lex (/usr/bin/lex points to flex), but I have  compile errors regarding
midrule with Bison.  From my really limited understanding, bison is not
totally the same of yacc.

So, what is the best, should I just use Command builder to invoke directly
yacc?   Or there is something else I can do with yacc flag?  (Like change
YACC variable to use yacc instead of Bison)

Thx!






--
Sent from: http://scons.1086193.n5.nabble.com/Users-f16930.html


More information about the Scons-users mailing list