Re: C preprocessor

2020-08-17 Thread Giacinto Cifelli
Hi Christian, On Fri, Aug 14, 2020 at 11:11 AM Christian Schoenebeck < schoeneb...@crudebyte.com> wrote: > On Donnerstag, 13. August 2020 07:49:52 CEST Giacinto Cifelli wrote: > > Hi all, > > > > I am wondering if it is possible to interpret a c-preprocessor (the >

Re: Parsing included files

2020-08-17 Thread Giacinto Cifelli
Hi Ervin, according to the lex&yacc manual, there should be a yy_create_buffer called at the beginning, corresponding to the yy_delete_buffer. I don't see it in your code. the example is here: https://github.com/mbbill/flexbison/blob/master/flexbison/fb2-3.l Regards. Giacinto On Mon,

Re: C preprocessor

2020-08-13 Thread Giacinto Cifelli
wrote: > > Hi Giacinto, > > > may be this will not the exact answer what you're waiting for, > but perhaps will help... :) > > On Thu, Aug 13, 2020 at 07:49:52AM +0200, Giacinto Cifelli wrote: > > Hi all, > > > > I am wondering if it is possible to int

C preprocessor

2020-08-12 Thread Giacinto Cifelli
Hi all, I am wondering if it is possible to interpret a c-preprocessor (the second preprocessor, not the one expanding trigrams and removing "\\\n") or an m4 grammar through bison, and in case if it has already been done. I think this kind of tool does not produce a type-2 Chomsky grammar, rather

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: Regular Expression String Search With Bison

2019-03-13 Thread Giacinto Cifelli
Hello Ricardo, On Tue, Mar 12, 2019 at 2:21 PM Ricardo Grant wrote: > > Hello, > > I am struggling to understand bison, and parser in general, so I hope I you are in the right place! >From what I see below, you have already a good notion of what bison does (parsing of a context-free grammar), and