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

Maassen, H.A.M. H.A.M.Maassen at student.tue.nl
Wed Dec 1 02:37:56 PST 2004


The Java generated treeparser doesn't seem to have an initializeASTFactory method.
 
Since I'm running initializeASTFactory on the treeparser's own getASTFactory, there isn't much synching being done (by me, anyway). And all it does is set the factory's maximum anyway!
 

	-----Original Message----- 
	From: micheal_jor [mailto:open.zone at virgin.net] 
	Sent: Wed 12/1/2004 11:11 AM 
	To: antlr-interest at yahoogroups.com 
	Cc: 
	Subject: [antlr-interest] Re: Bug in ANTLR C# implementation
	
	



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



 
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/
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 5566 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20041201/4dd148dc/attachment.bin


More information about the antlr-interest mailing list