Hi Hans,

Works like a charm! Thanks!

Best regards,
r0ller

-------- Eredeti levél --------
Feladó: Hans Åberg < haber...@telia.com (Link -> mailto:haber...@telia.com) >
Dátum: 2019 május 6 14:50:48
Tárgy: Re: how to get left hand side symbol in action
Címzett: r0ller < r0l...@freemail.hu (Link -> mailto:r0l...@freemail.hu) >
> On 6 May 2019, at 11:28, r0ller <r0l...@freemail.hu> wrote:
>
> Hi All,
>
> Is it possible in *any* way to get the left hand side symbol in an action of 
> a rule? Say, I have:
>
> A : B C
> {<!-- -->
> std:cout<<"left hand side symbol is:"<<???
> };
>
> I tried to find it out myself and googled a lot but didn't find anything:(
In the C++ parser, one can write:
std::cout << “LHS: " << yytname_[yylhs.type_get()] << std::endl;
Used for debugging, perhaps there is a more reliable macro.
 
_______________________________________________
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to