Re: Reporting malloc failure in actions

2020-12-29 Thread Akim Demaille
Hi Joe, > Le 29 déc. 2020 à 05:37, Joe Nelson a écrit : > > Hi, is there a recommended way to fail parsing when an action cannot > allocate memory? I could use YYABORT, but the caller could mistake this > for a problem in the input, when it's really an internal problem. I never though about tha

Re: %merge confusion

2020-12-29 Thread Akim Demaille
Hi Jot, > Le 28 déc. 2020 à 10:09, Jot Dot a écrit : > > I'm not trying to irritate you with all of this. I'm sure you are not. > Alright. I took out the 'api.value.type union' and put in: > %union { > gen::index_t index; > merge_t merge; // A struct to hold my merge info > } > > All

Reporting malloc failure in actions

2020-12-29 Thread Joe Nelson
Hi, is there a recommended way to fail parsing when an action cannot allocate memory? I could use YYABORT, but the caller could mistake this for a problem in the input, when it's really an internal problem. Looking at the generated foo.tab.c file for my parser, I see these macros: #define