[antlr-interest] Re: Bug in ANTLR C# implementation

micheal_jor open.zone at virgin.net
Wed Dec 1 02:11:06 PST 2004



--- In antlr-interest at yahoogroups.com, "Maassen, H.A.M."
<H.A.M.Maassen at s...> wrote:
> Well I've found out why I couldn't get any tree-rewriting actions to
work - it seems to be a bug in the C# version of the (generated)
treeparser.
>  
> The treeparser's method initializeASTFactory is never called. After
manually adding a call to initializeASTFactory(getASTFactory()) in the
treeparser the problems have been fixed.

Hi Harald,

I was just about to copy your previously posted grammar to see if I
could reproduce your issues with buildAST. Never mind, seems you've
fixed it in any case.

The behaviour you describe (i.e. tree parsers being created with a
default ASTFactory) is by design. Users are supposed to use the static
method named initializeASTFactory() - or similar, it's on the
generated Parsers - to ensure their tree parser's ASTFactory is in
sync with the Parser's.

I may be wrong but, I thought this was uniform behaviour across all
the codegens(?).

Cheers,

Micheal
ANTLR/C#






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list