[antlr-interest] Problem on Common C++ code for Different Parsers

Alessandro Feriani alessandro.feriani at gmail.com
Fri Aug 3 13:59:30 PDT 2007


Hi All
I am parsing a langauge( use C++) with 3 different parsers.
The problem is that those 3 parsers share some C++ code ( dumping, queries
...).
For the moment I implemented the same code for all of them but it's a very
ugly solution.
Is there another way to do it?

I would like to do

class CommonParser extends Parser
    ----no rules  (here i implemented only C++ code )

class MyParserA extends CommonParser ....rules implemented

 class MyParserB extends CommonParser ....

class MyParserC extends CommonParser ....

How can I do by using C++?
Is it possible to inherit Parser class from my CMyBAseClass?

Plese advice me
Alessandro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070803/13a307ae/attachment.html 


More information about the antlr-interest mailing list