Hi, i'm new to bison and flex and i wonder how to report an libc error (maybe ENOMEM, EIO) that has occured in either yylex or yyparse to the caller of yyparse.
My current strategy is to define a token ERROR that yylex returns if it encounters such an error and sets some global variable to errno. If yyparse encounters - token ERROR, it YYABORTs - a libc error by itself it sets some global variable to errno and YYABORTs. In my bison file I have err: ERROR { YYABORT; } in my rules section and bison warns that it's useless, a fact that brings me to the question if my way is the best way of doing things? Another question that might not belong to here but maybe somebody knows it ad-hoc: Is there an automake way of telling flex to also generate a header file? Thank you very much! Regards Nicolai Stange _______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison