-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hey > > To be completely portable (not depending on flex options) I don't > think either the prefix/outfile options or the prefix commandline > option can be given to lex (they are not mentioned in lex(1p) at > least). > Yeah your right about that! There are so many implmentations at least bison and flex are the most common now ;). > > > In that case the manual would only need to be updated on how that > is accomplished but should otherwise still be correct. That, and > maybe an update to the listed defines since that is only really > about just using yacc, not in tandem with lex, as I had to extend > the list with these (lex?) symbols: > > #define yyin fooyy_in #define yyout > fooyy_out #define yywrap fooyy_wrap #define yylineno > fooyy_lineno #define yy_flex_debug fooyy_flex_debug #define > yy_create_buffer fooyy_create_buffer #define yy_flush_buffer > fooyy_flush_buffer #define yy_switch_to_buffer > fooyy_switch_to_buffer #define yy_delete_buffer > fooyy_delete_buffer #define yypush_buffer_state > fooyy_push_buffer_state #define yypop_buffer_state > fooyy_pop_buffer_state #define yy_scan_buffer > fooyy_scan_buffer #define yy_scan_string fooyy_scan_string > #define yy_scan_bytes fooyy_scan_bytes #define yylex_destroy > fooyy_lex_destroy #define yyget_lineno fooyy_get_lineno > #define yyget_in fooyy_get_in #define yyget_out > fooyy_get_out #define yyget_leng fooyy_get_leng #define > yyget_text fooyy_get_text #define yyget_debug > fooyy_get_debug #define yyset_lineno fooyy_set_lineno > #define yyset_in fooyy_set_in #define yyset_out > fooyy_set_out #define yyset_debug fooyy_set_debug #define > yyrestart fooyy_restart #define yyalloc > fooyy_alloc #define yyrealloc fooyy_realloc #define > yyfree fooyy_free Ah yeah i tried to get that whole re-define to work that gdb uses but i couldn't ever get it working. I see what you mean! It takes alot of playing around that you would really want though.
There are so many different ways of doing it, but if we think from automakes perspective, it would be really nice to keep it so as you dont care about automake compiles your code. so as your still able to just add in the sources. Do you think there is a way to make ylwrap generate this whole redefine of symbols to make the -prefix option standard within automake and ylwrap! So maby we could have a AM_YFLAGS = -d -p prefix AM_LFLAGS = -pprefix So we make sure ylwrap is able to accept the prefix by generating a header with the red-define of symbols and add it to each of the sources could be a way to go. Hmm i might make up a test case for this just to keep my head on straight :P - --Phil -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkoQQuEACgkQAhcOgIaQQ2FnoQCfUrlk1YkoDZb+0rH87berZ3EU rVYAn1xR2+LVL/UKCGys/V6+WiSLZaDY =LW74 -----END PGP SIGNATURE-----