Re: how to get left hand side symbol in action

2019-05-06 Thread Hans Åberg
> On 6 May 2019, at 18:09, Akim Demaille wrote: > >> Le 6 mai 2019 à 14:50, Hans Åberg a écrit : >> >> >>> On 6 May 2019, at 11:28, r0ller 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

Re: how to get left hand side symbol in action

2019-05-06 Thread r0ller
Hi Akim, I bumped into this when writing the tech guide for my project last week. As you know, in my project it's possible to generate the bison source if you've set up your grammar rules in a db table (called grammar). However, in certain cases one may want to have different action implementat

Re: how to get left hand side symbol in action

2019-05-06 Thread Akim Demaille
> Le 6 mai 2019 à 14:50, Hans Åberg a écrit : > > >> On 6 May 2019, at 11:28, r0ller 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

Re: how to get left hand side symbol in action

2019-05-06 Thread r0ller
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 ->

Re: how to get left hand side symbol in action

2019-05-06 Thread Hans Åberg
> On 6 May 2019, at 15:21, uxio prego wrote: > >> On 6 May 2019, at 14:50, Hans Åberg wrote: >> >>> On 6 May 2019, at 11:28, r0ller wrote: >>> >>> 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<<"le

Re: how to get left hand side symbol in action

2019-05-06 Thread uxio prego
Sent from my iPhone > On 6 May 2019, at 14:50, Hans Åberg wrote: > > >> On 6 May 2019, at 11:28, r0ller 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 symbo

Re: how to get left hand side symbol in action

2019-05-06 Thread Hans Åberg
> On 6 May 2019, at 11:28, r0ller 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 any

Re: how to get left hand side symbol in action

2019-05-06 Thread r0ller
Yes, correct: I'd need the non terminal symbol itself. Best regards, r0ller Eredeti levél Feladó: Uxio Prego < uxio.pr...@gmail.com (Link -> mailto:uxio.pr...@gmail.com) > Dátum: 2019 május 6 14:30:10 Tárgy: Re: how to get left hand side symbol in action Címzett: Giacinto Cifel

Re: how to get left hand side symbol in action

2019-05-06 Thread Uxio Prego
I thought they mean the [non terminal] **symbol**, instead of the actual object? Regards, > On 6 May 2019, at 14:27, Giacinto Cifelli wrote: > > Hi, > > you refer to the left-hand side with $$. Provided it has a 'printable' > type (int, char *, string), it should output. > > BR, > Giacinto >

Re: how to get left hand side symbol in action

2019-05-06 Thread Giacinto Cifelli
Hi, you refer to the left-hand side with $$. Provided it has a 'printable' type (int, char *, string), it should output. BR, Giacinto On Mon, May 6, 2019 at 11:28 AM r0ller 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

Re: Bison + Flex on C++ don't work

2019-05-06 Thread uxio prego
Maybe related? /usr/local$ find . | grep -i bison | grep -i lib ./Cellar/bison/3.1/lib ./Cellar/bison/3.1/lib/liby.a [...] I miss the dynamic version but 🤷‍♀️ Cheers, Sent from my iPhone > On 6 May 2019, at 02:37, Joao Pedro Abreu De Souza wrote: > > Hi folks. My friend Nicholas and I are t

how to get left hand side symbol in action

2019-05-06 Thread r0ller
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:"