Re: C preprocessor

Ervin Hegedüs <[email protected]>
Newsgroups gmane.comp.parsers.bison.general
Message-ID <[email protected]>
Hi all,

On Fri, Aug 14, 2020 at 11:09:06AM +0200, Hans Åberg wrote:
> 
> > On 13 Aug 2020, at 07:49, Giacinto Cifelli <[email protected]> wrote:
> > 
> > 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 a type-1 or even type-0.
> > Any idea how to build something like an AST from it?
> 
> There is a Yaccable C-grammar:
>   http://www.quut.com/c/ANSI-C-grammar-y.html

IMHO C macro's are not part of C grammar.


a.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.