>>
> Once you have created the parser, just install a pointer to your own
> adaptor. You can also do this in @apifuncs I think. As in:
>
> ADAPTOR = pointerToMyAdaptor;
>

OK, thank you. This worked for me, but I end up with code like:

    ADAPTOR     = ANTLR3_TREE_ADAPTORNew(...);
    ctx->vectors        = antlr3VectorFactoryNew(64);

    ADAPTOR = MY_CUSTOM_TREE_ADAPTORNew(...);

Which works, but calls the ANTLR3_TREE_ADAPTORNew unnecessarily.
Is there a way to avoid that?
>
> To be honest with you, even in Java I have found it easier just to call
> my own functions directly from actions and not try and create an
> adaptor, thoguh this is essentially because of what type of tree is
> needed in the case of errors and so on.
>

You mean to use the actions instead of the re-write rules? I can see
that being true, but it does end up tying your grammar in to a specific
generated code. Ideally, I'd like my grammar to be as target-language
agnostic as possible.

thanks for your help,
Robert

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

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to