Re: C++ Grammar

"Aaron Gray" <>
15 Aug 2001 01:13:55 -0400

          From comp.compilers

Related articles
C++ Grammar (Aaron Gray) (2001-08-06)
Re: C++ Grammar (Mike Dimmick) (2001-08-08)
Re: C++ Grammar (Gabriel Dos Reis) (2001-08-08)
Re: C++ Grammar (Mike Dimmick) (2001-08-08)
Re: C++ Grammar (Aaron Gray) (2001-08-15)
Re: C++ Grammar (Gabriel Dos Reis) (2001-08-15)
Re: C++ Grammar (Aaron Gray) (2001-08-15)
Re: C++ Grammar (Gabriel Dos Reis) (2001-08-16)
Re: C++ Grammar (2001-08-17)
Re: C++ Grammar (Jerry Evans) (2001-08-17)
Re: C++ Grammar (Chris F Clark) (2001-08-17)
[5 later articles]
| List of all articles for this month |

From: "Aaron Gray" <>
Newsgroups: comp.compilers
Date: 15 Aug 2001 01:13:55 -0400
Organization: A Beeb User
References: 01-08-037 01-08-046 01-08-055
Keywords: C++, parse
Posted-Date: 15 Aug 2001 01:13:53 EDT

Dear All,
                LR(2+) by the looks of it then. It would be nice to have found an
upto date C++ YACC grammar, even though I am not using YACC or Bison. I am
at present porting a parser generator called Elegant it is either LL(1),
Recursive descent, or LALR(1).
                I have been looking at algorithms for generating an [LA]LR(k) parser
generator, and think that I might be able to implement one soon, the area
came into my head in a flash of realization, it is very simple, add an NFA
at the front end of the PDA, so you have the ability to "delay" deteminacy
until it is determinate, so to speak.
I am looking at creating my own YACC alike but [LA]LR(K), I call it ACC,
well why not.
                Anyway I have an older version of the C++ grammar typed in (pre
templates I think), I will have to get or burrow B. Stroustrup's third "The
C++ Programming Language", unless I have all ready brought it, cannot
remember my library !
        I would appreciate if you have a typed copy of the grammar if you could
send me a copy as an attachment, if you would not mind. Also it would be a
good idea to put it on the comp.compilers fpt site. And maybe we can create
a YACC compatible C++ grammar from the old and the new.
        Many thanks,
                Yours Sincerely,
                        Aaron Gray

"Mike Dimmick" <> wrote in message
> "Gabriel Dos Reis" <> wrote in message
> > "Aaron Gray" <> writes:
> >
> > | Dear All,
> > | does anyone happen to know or have a more up to date C++ grammar
> than
> > | the old comp.compilers one :-
> > |
> > |
> >
> > You may find one in B. Stroustrup's third "The C++ Programming
> > [Any idea how well it works with parser generators? -John]
> There's A grammar there. It's for explanation of the language, and is a
> direct duplicate of Appendix A of ISO/IEC 14882:1998 (or in other words,
> C++ standard).
> It's not LALR(1), nor is it LL(k), and it isn't suitable for direct
> implementation by any method. At least, I found that it wasn't.
> My copy of Stroustrup has now lost pages 848-9 (from memory) due to being
> overly referenced!

Post a followup to this message

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