[antlr-interest] Problems with C++-target

Marc klists at saphor.de
Sun Apr 29 22:36:16 PDT 2007


Jim Idle wrote:
> Do you have a specific need for C++? You could just declare the C
> functions you need as extern "C". In fact, I should really add that to
> the C output so that it just happens by including the generated .h file.
> Though I suppose the fact that you can use C++ in actions is attractive
> - I ought to play with this, perhaps you can just compile the output as
> C++ and use C++ in actions anyway... why do I keep making more work for
> myself? ;-)
>
> C examples are now up to date and include VS2005 .sln and projects and
> have been tested to death with DevPartner studio (though I don't have
> complete coverage yet). A lot of work went into getting
> backtrack/memorization to work without the enormous overhead it could be
> with 2MB java input files :-).
>
> If you are using the C target, you need to use a .jar that predates
> Ter's recent tree rewrite stuff... however you also need the latest
> template. I am working on the tree re-write stuff now, so possibly by
> the end of the weekend it will be back in sync. I will post if it is.
>   

Many thanks for this tip! That'll be a way to try out at least as an
intermediate step. I've already checked that my mini-example runs
through with the C target, and it does. Now I'll have to play around how
to compile the generated code (study README under lib/C, library
dependencies, if any, file order etc.) with gcc, but that should
hopefully not be much of a deal.

Best regards,

Marc

> Jim
>
> -----Original Message-----
> From: antlr-interest-bounces at antlr.org
> [mailto:antlr-interest-bounces at antlr.org] On Behalf Of Marc
> Sent: Saturday, April 28, 2007 6:06 AM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] Problems with C++-target
>
> Hi!
>
> Using a small grammar with antlr 3.0b7 that generates Java-files without
> problems I tried the language option Cpp. and get the following error
> message:
>
> --------
>
> error(10):  internal error: group Cpp does not satisfy interface
> ANTLRCore: missing templates [parameterSetAttributeRef,
>
> A similar error war reported on April 7th for the C target where it was
> suggested to use the latest daily build. The latest I could find on the
> page was dated April 21st and still exhibits this error.
>
> Any ideas what I should do? Thanks in advance for any advice!
>
> Best regards,
>
> Marc
>
>
>
>   





More information about the antlr-interest mailing list