[antlr-interest] Re: ANTLR C++ Parser

David Wigg wiggjd at lsbu.ac.uk
Thu May 12 09:52:03 PDT 2005


Hello Desiree,

As the latest author of CPP_parser.g I think I can say that it
parses most of C++.

Our version does produce a parser written in C++.

Not being a genius, I think ANTLR is much easier to understand
than Lex/Yacc (top-down instead of bottom-up) but if you are
familiar with Yacc then I think you will some unlearning to
do.

If you are still interested in this version then I suggest you
try compiling and running it with our test data to get a feel
for how ANTLR works.

If you are then still interested please let me know as I am
working on an updated version which I hope will be ready in
the summer.

Best of luck,

David.

Message: 7
Date: Thu, 12 May 2005 15:44:44 +0200 (MEST)
From: "Desiree Kraus" <desiree.kraus at gmx.de>
Subject: [antlr-interest] ANTLR C++ Parser
To: antlr-interest at antlr.org
Message-ID: <29039.1115905484 at www34.gmx.net>
Content-Type: text/plain; charset="us-ascii"

Hello,

I'm working on my master thesis in computer science at the
moment. I have a tool that can read C and do some
optimazations and other stuff with it. My job is it now to
expand this tool, so that it can cope with C++ (or at least a
subset of C++).

A part of it, is a parser of course. The Parser the tool uses
right now is lex/yacc based and generates C++ output. I tried
expanding this parser so that it can read C++, but I didn't
really cope with that (after some googling on the net, I guess
I'm not the only one having this problem).

Now I've found ANTLR and wonder if I could use it for my
purposes. But I'm not quite sure if what I'm thinking about
would work. "My" tool is C++ based and as I've read, ANTLR is
Java-based. At the moment, I don't really know how to put that
together, because I need a parser that can work with and
instatiate my C++-classes I have built. Is something like this
possible?

I have found an C++ grammar on the ANTLR website. Does anyone
of you know, if this grammar works and if it can parse all
C++-Features? If there are features, that aren't supported,
which ones are that?

I hope someone can give me a hint.

Bye,
Desiree

-- 
+++ Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS
+++
GMX bietet bis zu 100 FreeSMS/Monat:
http://www.gmx.net/de/go/mail


------------------------------





More information about the antlr-interest mailing list