help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C preprocessor


From: Ervin Hegedüs
Subject: Re: C preprocessor
Date: Thu, 13 Aug 2020 23:34:59 +0200
User-agent: NeoMutt/20171215

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

There is a very old project, called mccp:

http://mcpp.sourceforge.net/

I'm afraid that's not active but may be useful. Eg. that has a
very good background documentation:

https://kumisystems.dl.sourceforge.net/project/mcpp/mcpp/V.2.7.2/mcpp-summary-272.pdf

Note that IMHO it doesn't use any LR or LALR parser, but I
didn't jumped into the source...

The another project - just found now - which could be interest
for you is this:

https://github.com/facebookarchive/warp

It was written in D, but there is a lexer, which can helps you.


Hope this helps.



a.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]