[Scons-users] yacc vs bison

Bill Deegan bill at baddogconsulting.com
Sat Dec 7 21:06:47 EST 2019


env['YACC']='bison'
should do the trick.

Why env.Append()?
If you want to overwrite them. assign is cleaner.
env['YACCFLAGS']=['-t', '-p', 'omsf_', '-d']
env['LEXFLAGS']='-Pomsf_'



On Fri, Dec 6, 2019 at 11:50 PM Pierre-Luc Boily <pierreluc.boily at gmail.com>
wrote:

> 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
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20191207/e8aae2ef/attachment.html>


More information about the Scons-users mailing list