delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/16/07:18:13

Date: Thu, 16 Dec 1999 17:08:55 +0530 (IST)
From: "Vani R." <vani AT accord-soft DOT com>
X-Sender: vani AT vani
To: djgpp AT delorie DOT com
Subject: Regarding C++ parser
Message-ID: <Pine.LNX.3.96.991216170050.4766A-100000@vani>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

Hello everybody,
		I am coming up with a Simple C++ parser which goes through
the C++ source and extracts a list of classes, member functions in each
class etc., I got the C++ grammer from the gcc source code and I came  up
with my own lexer which is compatable with the grammer. Now , when I try
to parse a simple piece of code which is given below, it gives syntax
error. If i take out private or public keywords it will just parse without
giving any error message.
   The code which I tried to parse is as follows:

   class node
   {
   private:
	int int_var;
   public:
	void test_function();
   };

   Can anybody help me out in this regard. Any help would be greatly
appreciated,

Thanks in advance,
--vani--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019