Re: ANSI C grammar "pointer" production (Arthur Watson)
Fri, 14 Oct 1994 22:27:38 GMT

          From comp.compilers

Related articles
ANSI C grammar "pointer" production (Steven Gollery) (1994-10-12)
Re: ANSI C grammar "pointer" production (1994-10-14)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Arthur Watson)
Summary: qualifier not specifier, see K&R 2
Keywords: C, parse, comment
Organization: Express Access Online Communications, Greenbelt, MD USA
References: 94-10-102
Date: Fri, 14 Oct 1994 22:27:38 GMT

Steven Gollery <> wrote:
>Every ANSI-C grammar I've found on the net has a production like this
> : '*'
> | '*' type_specifier_list
>They appear to allow token strings like:
> * int

It should be "type_qualifier_list", not "type_specifier_list".
It allows token strings like:
                * const

The 2nd edition of Kernighan and Ritchie's _The C Programming Language_
gives the type of annotated grammer you ask about as appendix A.
You can navigate it using the index -- for example, looking up
"type specifier" should verify the above information.

Arthur Watson
[There's a book by Herbert Schildt which has the ISO C standard on even
numbered pages and annotations on the odd pages, but I don't recall whether
he had anything useful to say about this part of the grammar. -John]

Post a followup to this message

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