On Mon, 19 Dec 2005, Akim Demaille wrote: > >>> "Joel" == Joel E Denny <[EMAIL PROTECTED]> writes: > > > If you were to add native bison support to autotools, how would automake > > know when you need yacc and when you need bison? What if you need both? > > Should automake recognize a ".bison" suffix as the bison-equivalent of > > yacc's ".y"? When I write a bison spec that isn't yacc-compatible, it's > > my habit to use ".bison" anyway... because it just seems more logical. > > Why not, that's an idea. But you need to help Automake know what the > output language is too.
I like the idea of multiple suffixes. Each time you process a file, you knock off one. For example: bison -omy_parser.c my_parser.c.bison gcc -omy_parser my_parser.c ./my_parser or: bison -omy_parser.cc my_parser.cc.bison g++ -omy_parser my_parser.cc ./my_parser Bison itself could then use the spec's filename to help select a skeleton. This scheme would scale nicely to support other output languages (Java, C#, etc) if bison were to include such skeletons one day. Joel
