Hi Akim, Thanks for everything again. One thing came into my mind concerning your question if there's any feature of bison I miss (though this may not belong to the scope of bison but another tool): a kind of reverse mode would be great:) I mean, generating the sequence of tokens from a grammar. I'm currently using nltk to test what my bison generated parser would accept: http://www.nltk.org/howto/generate.html
Or are you aware of any such c/c++ tool? Best regards, r0ller -------- Eredeti levél -------- Feladó: Akim Demaille < a...@lrde.epita.fr (Link -> mailto:a...@lrde.epita.fr) > Dátum: 2018 november 23 19:13:10 Tárgy: Re: bison for nlp Címzett: r0ller < r0l...@freemail.hu (Link -> mailto:r0l...@freemail.hu) > Hi r0ller, > Le 21 nov. 2018 à 11:07, r0ller <r0l...@freemail.hu> a écrit : > > Hi Akim, > > Thanks again! After your answer I felt pretty dumb as I had to realize that > the problems I mentioned came most probably due to my carelessness. :) No worries. > This is actually one thing that could be pointed out in the Simple C++ > Example. Well, I should probably not write « pay attention to the details » :) > The other thing that could be added to the C++ part is a Simplest C++ > (migration) Example for those (like me) who'd migrate from a C parser using > ints just to show that there's almost nothing to do to get a c++ parser. The > Simplest C++ Example is fine for those who have a C parser with unions as far > as I can see. Which is the typical case! It is meant to be an introductory example. > To answer your question concerning using ints: it has historical reasons. > When I started the project (with yacc) I was not familiar with parser > generators (and am still not as knowledgeable as I’d like to be) so not > knowing what is possible and what not, I created a simple parser design and > coded the rest in c (later c++) to get the functionality I needed. Ok. > But the variants will be a great help once I manage to fulfill all the > prerequisites as the migration path for me has just begun:) I don’t want to > turn everything upside down in one step. That’s reasonable :) But some steps cannot be done gradually (like changing the semantic value type). > So I first need to get rid of numbering the tokens and then I'll see what > comes afterwards. Anyway, now I'm already happy that I have a c++ parser and > 5 warnings less when compiling the project. I'm pretty sure that I'll come > back with questions during the migration. By the way, I’ve recently added > English support to the Android app so if you check out the project page and > install it (for free) via the link pointing to the play store, you'll be able > to search for contacts and make phone calls even offline via voice control > having a bison parser running under the hood:) That’s great :) But I don’t run Android. _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison