Message-ID: <3859C6D6.37BF1EB2@accord-soft.com> Date: Fri, 17 Dec 1999 10:45:03 +0530 From: Vani R Organization: accord software and systems pvt. ltd., X-Mailer: Mozilla 4.6 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Regarding C++ grammer Content-Type: multipart/mixed; boundary="------------E11AFFACFC358A01D7D5956F" Reply-To: djgpp AT delorie DOT com This is a multi-part message in MIME format. --------------E11AFFACFC358A01D7D5956F Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello everybody, I am coming up with a simple C++ parser which goes through the C++ source code and gives a list of all the classes , member functions in each class etc., I got the C++ grammer from the gcc source code. I came up with my own lexer which is compatable with the grammer available. Now, when i tried to parse a simple C++ code which is given below, it is flagging out 'suntax error' and if i remove the keywords private, public within the class, it just parses the code without any error message. An example code for this is as follows: class trial { private: int int_var; public: void trial_func(); }; gives error whereas class trial { int int_var; void trial_func(); }; won't give any error. can anybody help me out in this regard. Any help would be greatly appreciated. Thanks in advance, --vani-- -- ------------------------------------------------------------------------------------------------- Purity, patience and perseverence are the three essentials to success,and above all, love. --Swami vivekananda ------------------------------------------------------------------------------------------------- Vani R. mailto:vani AT accord-soft DOT com --------------E11AFFACFC358A01D7D5956F Content-Type: text/x-vcard; charset=us-ascii; name="vani.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Vani R Content-Disposition: attachment; filename="vani.vcf" begin:vcard n:R;Vani x-mozilla-html:FALSE org:Accord Software & Systems Pvt. Ltd., version:2.1 email;internet:vani AT accord-soft DOT com note:No.37,K.R.colony, Domlur layout,BANGALORE-71 x-mozilla-cpt:;0 fn:Vani R end:vcard --------------E11AFFACFC358A01D7D5956F--