I apologize for the newbie question, but I'm somewhat new to ANTLR.

 

I want to build a parser for a domain-specific language. I would like to use
C++ for my implementation and understood that the C target would generate
code that compiles under C++, but I'm running into trouble. (Perhaps I've
just misunderstood. If so, I'm sorry.)

 

When I select these options:

{

                language=C;

                output=AST;

                backtrack=true;

                ASTLabelType=pANTLR3_BASE_TREE;

}

 

ANLTR generates a parser which contains lines like this:

                                        root_1 =
(pANTLR3_BASE_TREE)(ADAPTOR->becomeRootToken(ADAPTOR,
stream_oper->nextToken(stream_oper), root_1));

 

but my C++ compiler complains that the return type of stream_oper->nextToken
is "void *", which cannot be converted to 'pANTLR3_COMMON_TOKEN' without a
cast.

 

Any suggestions on how to avoid this? (Or is the answer: just use C?)

 

Thanks in advance,

Colin Fraizer

Indianapolis, IN

[EMAIL PROTECTED] // (yeah, I use a separate mailbox for this mailing list.
I'm not claiming to be "Mr. Antlr" or anything. 8-)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address

Reply via email to