Re: how to get left hand side symbol in action

2020-06-10 Thread Christian Schoenebeck
On Mittwoch, 10. Juni 2020 07:29:33 CEST Akim Demaille wrote: > > So my code looks at the individual grammar rules to decide > > whether the corresponding symbol should be interpreted as terminal or non- > > terminal accordingly. > > > > Then the other thing is that my auto completion code actuall

Re: how to get left hand side symbol in action

2020-06-09 Thread Akim Demaille
Hi Christian, Thanks for the detailed answer. > Le 9 juin 2020 à 15:14, Christian Schoenebeck a > écrit : > > On Dienstag, 9. Juni 2020 07:58:56 CEST Akim Demaille wrote: > > For instance in that linked example I was not using a scanner at all, but > instead pseudo non-terminals actually bei

Re: how to get left hand side symbol in action

2020-06-09 Thread Christian Schoenebeck
On Dienstag, 9. Juni 2020 07:58:56 CEST Akim Demaille wrote: > Hi Christian, > > > Le 8 juin 2020 à 13:32, Christian Schoenebeck > > a écrit :> > > On Montag, 8. Juni 2020 07:46:27 CEST Akim Demaille wrote: > >> YYTERROR was not a documented feature. I'm curious: how did you use it? > > > > I

Re: how to get left hand side symbol in action

2020-06-08 Thread Akim Demaille
Hi Christian, > Le 8 juin 2020 à 13:32, Christian Schoenebeck a > écrit : > > On Montag, 8. Juni 2020 07:46:27 CEST Akim Demaille wrote: >> >> >> YYTERROR was not a documented feature. I'm curious: how did you use it? > > I need it for the auto completion feature that we discussed before an

Re: how to get left hand side symbol in action

2020-06-08 Thread Christian Schoenebeck
On Montag, 8. Juni 2020 07:46:27 CEST Akim Demaille wrote: > Hi Christian, > > CC'd to help-bison FTR. > > > Le 7 juin 2020 à 18:17, Christian Schoenebeck > > a écrit : > > > > Hi Akim, > > > > I just realized that you removed YYTERROR from Bison. > > YYTERROR was not a documented feature. I

Re: how to get left hand side symbol in action

2020-06-07 Thread Akim Demaille
Hi Christian, CC'd to help-bison FTR. > Le 7 juin 2020 à 18:17, Christian Schoenebeck a > écrit : > > Hi Akim, > > I just realized that you removed YYTERROR from Bison. YYTERROR was not a documented feature. I'm curious: how did you use it? Bison 3.6 introduce symbol kinds, e.g., for Bison

Re: how to get left hand side symbol in action

2019-12-31 Thread Christian Schoenebeck
On Dienstag, 31. Dezember 2019 10:01:19 CET Akim Demaille wrote: > Well, I did drop out the thread though. And Bison 3.5 is out with still no > progress on this matter. Well, yes, there was a bit of improvement in that > I clarified the doc and the examples on the fact that string literals (and >

Re: how to get left hand side symbol in action

2019-12-31 Thread Akim Demaille
Hi all, > Le 20 mai 2019 à 14:39, Christian Schoenebeck a > écrit : > > On Sonntag, 19. Mai 2019 11:32:49 CEST Akim Demaille wrote: >> (Short note to let you know I'm not dropping out of the thread. I got busy >> this week, and there are now things I want to flush before coming back to >> this

Re: how to get left hand side symbol in action

2019-05-20 Thread Christian Schoenebeck
On Sonntag, 19. Mai 2019 11:32:49 CEST Akim Demaille wrote: > (Short note to let you know I'm not dropping out of the thread. I got busy > this week, and there are now things I want to flush before coming back to > this, soon. Cheers!) Sure! We will resume this topic when you find it an appropri

Re: how to get left hand side symbol in action

2019-05-19 Thread Akim Demaille
(Short note to let you know I'm not dropping out of the thread. I got busy this week, and there are now things I want to flush before coming back to this, soon. Cheers!) ___ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Re: how to get left hand side symbol in action

2019-05-11 Thread Christian Schoenebeck
On Freitag, 10. Mai 2019 19:43:03 CEST Akim Demaille wrote: > > Le 10 mai 2019 à 16:28, Christian Schoenebeck > > a écrit :> > > On Freitag, 10. Mai 2019 06:57:00 CEST Derek Clegg wrote: > >> In fact, I do not think error messages in the generated parser should be > >> provided by bison, except a

Re: how to get left hand side symbol in action

2019-05-10 Thread Christian Schoenebeck
On Freitag, 10. Mai 2019 19:34:54 CEST Akim Demaille wrote: > And there was nothing that could be shared? A lot of what you described > below looks like what LAC does. But I am definitely not a LAC expert, nor > one of your application, obviously :) Well, you can look at this example: http://svn

Re: how to get left hand side symbol in action

2019-05-10 Thread Derek Clegg
> On May 10, 2019, at 10:43 AM, Akim Demaille wrote: > > > >> Le 10 mai 2019 à 16:28, Christian Schoenebeck a >> écrit : >> >> On Freitag, 10. Mai 2019 06:57:00 CEST Derek Clegg wrote: >>> In fact, I do not think error messages in the generated parser should be >>> provided by bison, excep

Re: how to get left hand side symbol in action

2019-05-10 Thread Akim Demaille
> Le 10 mai 2019 à 16:28, Christian Schoenebeck a > écrit : > > On Freitag, 10. Mai 2019 06:57:00 CEST Derek Clegg wrote: >> In fact, I do not think error messages in the generated parser should be >> provided by bison, except as a trivial default. Instead, I’d like to see >> bison call a func

Re: how to get left hand side symbol in action

2019-05-10 Thread Akim Demaille
Hey Christian, Thanks a lot for taking the time to give details about your use case. > Le 10 mai 2019 à 15:11, Christian Schoenebeck a > écrit : > > On Freitag, 10. Mai 2019 07:24:51 CEST Akim Demaille wrote: > >> Aren't you referring to LA correction, as implemented in Bison? >> >> https://

Re: how to get left hand side symbol in action

2019-05-10 Thread Christian Schoenebeck
On Freitag, 10. Mai 2019 06:57:00 CEST Derek Clegg wrote: > In fact, I do not think error messages in the generated parser should be > provided by bison, except as a trivial default. Instead, I’d like to see > bison call a function (which I provide) when a syntax error occurs, with a > list of what

Re: how to get left hand side symbol in action

2019-05-10 Thread Derek Clegg
On May 10, 2019, at 6:47 AM, Hans Åberg wrote: > > >> On 10 May 2019, at 07:24, Akim Demaille wrote: >> >> 1. there is a real and valid need for the feature, which I still need >> to be convinced of, especially because symbol names are technical >> details! > > One can also write better err

Re: how to get left hand side symbol in action

2019-05-10 Thread Derek Clegg
On May 10, 2019, at 5:21 AM, Hans Åberg wrote: > > >> On 10 May 2019, at 07:24, Akim Demaille wrote: >> >>> In practice you just need the symbol name as is. Nobody needs the >>> translation, >> >> I beg to disagree. Nobody should translate the keyword "break", >> but >> >>> # bison /tmp/fo

Re: how to get left hand side symbol in action

2019-05-10 Thread Hans Åberg
> On 10 May 2019, at 07:24, Akim Demaille wrote: > > 1. there is a real and valid need for the feature, which I still need > to be convinced of, especially because symbol names are technical > details! One can also write better error messages by using these internal yytname_ table names:

Re: how to get left hand side symbol in action

2019-05-10 Thread Christian Schoenebeck
On Freitag, 10. Mai 2019 07:24:51 CEST Akim Demaille wrote: > Hi Christian, Hi Akim! > Aren't you referring to LA correction, as implemented in Bison? > > https://www.gnu.org/software/bison/manual/html_node/LAC.html Well no, it is has somewhat in common, but the use cases are differently, see

Re: how to get left hand side symbol in action

2019-05-10 Thread Hans Åberg
> On 10 May 2019, at 07:24, Akim Demaille wrote: > >> In practice you just need the symbol name as is. Nobody needs the >> translation, > > I beg to disagree. Nobody should translate the keyword "break", > but > >> # bison /tmp/foo.y >> /tmp/foo.y:1.7: erreur: erreur de syntaxe, : inattendu

Re: how to get left hand side symbol in action

2019-05-10 Thread r0ller
to use the framework) and thought about how I could make it more convenient. So I googled and finally asked the question here as I haven't found anything. The rest of the story you know:) Best regards, r0ller Eredeti levél Feladó: Akim Demaille < a...@lrde.epita.fr (Link

Re: how to get left hand side symbol in action

2019-05-09 Thread Akim Demaille
Hi r0ller, > Le 6 mai 2019 à 21:13, r0ller a écrit : > > Hi Akim, > > [...] > A : B C > { > const node_info& main_node=sparser->get_node_info($1); > const node_info& dependent_node=sparser->get_node_info($2); > sparser->add_feature_to_leaf(main_node,"main_verb"); > std::string parent_symbol="A"

Re: how to get left hand side symbol in action

2019-05-09 Thread Akim Demaille
Hi Christian, > Le 9 mai 2019 à 13:22, Christian Schoenebeck a > écrit : > > On Donnerstag, 9. Mai 2019 08:50:27 CEST Akim Demaille wrote: >>> Perhaps a variation of $ and @ that gives access to the name, >> >> I am very uncomfortable with this. Symbol names are technical details, >> most of

Re: how to get left hand side symbol in action

2019-05-09 Thread r0ller
Well, I can only agree:) Eredeti levél Feladó: Christian Schoenebeck < schoeneb...@crudebyte.com (Link -> mailto:schoeneb...@crudebyte.com) > Dátum: 2019 május 9 13:23:13 Tárgy: Re: how to get left hand side symbol in action Címzett: help-bison@gnu.org (Link ->

Re: how to get left hand side symbol in action

2019-05-09 Thread Christian Schoenebeck
On Donnerstag, 9. Mai 2019 08:50:27 CEST Akim Demaille wrote: > > Perhaps a variation of $ and @ that gives access to the name, > > I am very uncomfortable with this. Symbol names are technical details, > most of the time they are irrelevant to the end user, just like the > the user of a piece of

Re: how to get left hand side symbol in action

2019-05-09 Thread Hans Åberg
> On 9 May 2019, at 08:50, Akim Demaille wrote: > >> Le 6 mai 2019 à 22:45, Hans Åberg a écrit : >> >>> 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

Re: how to get left hand side symbol in action

2019-05-08 Thread Akim Demaille
> Le 6 mai 2019 à 22:45, Hans Åberg a écrit : > >> >> 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 s

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
g Though, as I changed it today after Hans's suggestion, you'll now find the same implementation at those two places. Thanks for any hints!:) Best regards, r0ller Eredeti levél Feladó: Akim Demaille < a...@lrde.epita.fr (Link -> mailto:a...@lrde.epita.fr) > Dá

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...@freem

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ím

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

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:"