Re: Building a parse tree that reflects C Semantics

"Mark" <whopkins@alpha2.csd.uwm.edu>
20 Oct 2002 22:52:48 -0400

          From comp.compilers

Related articles
Building a parse tree that reflects C Semantics vbdis@aol.com (VBDis) (2002-10-13)
Re: Building a parse tree that reflects C Semantics grosch@cocolab.de (Josef Grosch) (2002-10-18)
Re: Building a parse tree that reflects C Semantics idbaxter@semdesigns.com (Ira Baxter) (2002-10-20)
Re: Building a parse tree that reflects C Semantics whopkins@alpha2.csd.uwm.edu (Mark) (2002-10-20)
Re: Building a parse tree that reflects C Semantics rbates@southwind.net (Rodney M. Bates) (2002-10-20)
Re: Building a parse tree that reflects C Semantics david.thompson1@worldnet.att.net (David Thompson) (2002-10-25)
Re: Building a parse tree that reflects C Semantics rbates@southwind.net (Rodney M. Bates) (2002-11-06)
Re: Building a parse tree that reflects C Semantics idbaxter@semdesigns.com (Ira Baxter) (2002-11-07)
| List of all articles for this month |

From: "Mark" <whopkins@alpha2.csd.uwm.edu>
Newsgroups: comp.compilers
Date: 20 Oct 2002 22:52:48 -0400
Organization: University of Wisconsin - Milwaukee, Computing Services Division
References: 02-10-058
Keywords: parse, design
Posted-Date: 20 Oct 2002 22:52:48 EDT

"Josef Grosch" <grosch@cocolab.de> writes:
>The concrete syntax of declarations in C and C++ is weird in my humble
>opinion. A declaration for a variable should specify a name, a type,
>and maybe an initial value as well as additional attributes.


What you want is an extension of the C syntax to basically allow for the
equivalence of things like this:


                            int *A[4], *B; <---> (int *) A[4], B;
                                                                <---> (int *[4]) A; (int *)B;
                                                                <---> (int *) ([4])A, B;


That is, a type specifier can now be followed by an abstract declarator,
and a declarator can now be preceded by an abstract declarator.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.