Thanks all, that was very helpful.
On Dec 27, 2016 10:06 AM, "John Levine" wrote:
> >forvalues_cmd:
> >FORVALUES IDENT "=" NUMBER "(" NUMBER ")" NUMBER "{" STRING_LITERAL "}"
> >{
> >// do I need to free() or del tokens $3, $5, $7, $9 and $11?
>
> No. Bison tokens live in an array,
>forvalues_cmd:
>FORVALUES IDENT "=" NUMBER "(" NUMBER ")" NUMBER "{" STRING_LITERAL "}"
>{
>// do I need to free() or del tokens $3, $5, $7, $9 and $11?
No. Bison tokens live in an array, no allocation or deallocation needed.
If the lexer or parser puts a pointer to an allocated thi
> On 27 Dec 2016, at 00:48, William Brannon wrote:
> My question is: do the actions for these productions need to
> explicitly deallocate memory associated with the unused tokens? I
> believe not, because:
> o) the tokens don't have types, so they're just #define'd to integers,
> o) which is why