Topic: C++ Grammar (Lex & Yacc)
Author: Charley Bay <charleyb@hpgrla.gr.hp.com>
Date: 1995/11/29 Raw View
I have a copy of the draft (28 April 1995) ANSI C++ Standard.
Appendix A has a rough grammar for the language. I've found
several (more than five) errors already, if anybody is
interested in them.
I have no doubt whatsoever that the small itallic font is to
discourage OCR scanning of the grammar. :-)
Does anybody have the parser or grammer for lex and yacc for
C++? (Ideally, for the newly proposed standard?) I could
write my own, but would rather not.
If nobody has the grammar available, I'm going to write my
own from Appendix A. It's a pain, but I'll do it anyway.
If you've found any errata in Appendix A, please let me
know and I'll summarize and post.
Also, does each vendor write its own grammar, or is this
purchased somehow from the standards committee or other vendors?
I don't want to write another compiler, but want a language
parser for documentation generation. (Academic interest).
Thanks very much.
--charley #include <stdisclaimer.h>
charleyb@gr.hp.com
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]