Mail Archives: djgpp/1999/12/17/01:03:16
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--
- Raw text -