Richard> But won't that break the automake rules? They expect the lex Richard> output file to be called $LEX_OUTPUT_ROOT. $LEX_OUTPUT_ROOT Richard> is different on Linux than DJGPP (lex.yy vs. lexyy). If I Richard> use %option outfile and %option prefix, it will work on one Richard> platform, but not the other. I thought about getting Richard> config.status to do some substitution on the lexer sources, Richard> but that's just horrible and it means that the user would Richard> have to have (f)lex installed.
I think a lot could be done to improve the interface provided that we require Bison and Flex. The problem here stems on the willingness to be yacc/lex portable. Richard> So, back to my original suggestion: Modify the automake Richard> rules to invoke lex with the -t option and pipe the output Richard> to $LEX_OUTPUT_FILE. Then the use -P or %option prefix will Richard> not break the automake rule. But how portable is 'lex -t'? I don't think this is the right track, since flex and bison now generate more that just one file. Relying on something like -o is saner, but stdout is a dead end.