Re: yacc vs bison
Bill Deegan <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <CAEyG4CEg7jzrPcxZT7O5fp4_rYTPjhPGd=Xjieo2ZTPz0Soejw@mail.gmail.com> |
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 <[email protected]> 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 > [email protected] > https://pairlist4.pair.net/mailman/listinfo/scons-users > _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users