Re: bison/flex: Best practice to report an libc error to caller of yyparse

2009-06-13 Thread Hans Aberg
On 13 Jun 2009, at 17:55, Nicolai Stange wrote: i wonder how to report an libc error (maybe ENOMEM, EIO) that has occured in either yylex or yyparse to the caller of yyparse. As for the first error, memory allocation error, your program is likely unrecoverable, so just write an error messag

Re: bison/flex: Best practice to report an libc error to caller of yyparse

2009-06-13 Thread Nicolai Stange
Hi, first of all: Thank you for your reply Hans. > > i wonder how to report an libc error > > (maybe ENOMEM, EIO) that has occured in either yylex or yyparse to the > > caller of yyparse. > > As for the first error, memory allocation error, your program is > likely unrecoverable, so just write

Re: bison/flex: Best practice to report an libc error to caller of yyparse

2009-06-13 Thread Hans Aberg
On 13 Jun 2009, at 13:40, Nicolai Stange wrote: i wonder how to report an libc error (maybe ENOMEM, EIO) that has occured in either yylex or yyparse to the caller of yyparse. As for the first error, memory allocation error, your program is likely unrecoverable, so just write an error message