Re: ‘void free(void*)’ called on unall ocated object ‘yyssa’ [-Wfree-nonheap-object]

Christoph Grüninger <[email protected]> Tue, 19 Jan 2021 08:21:16 +0100
Newsgroups gmane.comp.parsers.bison.general
Message-ID <[email protected]>
Hi Akim,
thanks for sharing your thoughts! Being in charge is kind of a stretch 
for an open source project like CMake. You can write a patch, open an 
issue yourself, or I can try to take your advice and create a merge request.

https://gitlab.kitware.com/cmake

Bye
Christoph

Am 19.01.21 um 06:47 schrieb Akim Demaille:
> Christoph,
> 
> FWIW, it appears that Bison is vastly underused in this grammar.
> For instance, all these occurrences of $<str> should just read
> $$ or $1.  Who is in charge of maintaining the parsers in there?
> 
> Start:
>    GoalWithOptionalBackSlash {
>      $<str>$ = 0;
>      yyGetParser->SetResult($<str>1);
>    }
> 
> GoalWithOptionalBackSlash:
>    Goal {
>      $<str>$ = $<str>1;
>    }
> | Goal cal_BSLASH {
>      $<str>$ = yyGetParser->CombineUnions($<str>1, $<str>2);
>    }
> 
> Goal:
>    {
>      $<str>$ = 0;
>    }
> | String Goal {
>      $<str>$ = yyGetParser->CombineUnions($<str>1, $<str>2);
>    }
> 
> 
> Not to below that here the actions are simply useless.
> 
> String:
>    OuterText {
>      $<str>$ = $<str>1;
>    }
> | Variable {
>      $<str>$ = $<str>1;
>    }
> 
> it should be
> 
> String:
>    OuterText
> | Variable
> ;
> 
> 
> 
> 
> OuterText:
>    cal_NAME {
>      $<str>$ = $<str>1;
>    }
> | cal_AT {
>      $<str>$ = $<str>1;
>    }
> | cal_DOLLAR {
>      $<str>$ = $<str>1;
>    }
> [and so on and so on...]
> 

-- 
Als wär es nix, leb' ich von [IT] und mach' nur, was ich lieb'
Lebe wie im Paradies, womit hab' ich das verdient?
Die Wahrheit ist: Hab' ich nicht, ich bin nur reicher beschenkt
Als jemand in einem armen Land mit dem gleichen Talent
[frei nach Tua von Die Orsons - Oioioiropa]