[antlr-interest] does the third argument work, for AST node constructor ?

Terence Parr parrt at jguru.com
Tue Feb 11 11:22:00 PST 2003


What language are you generating?  I have tried this for sure in Java 
output.

Terence

On Tuesday, February 11, 2003, at 10:18 AM, Anthony Brenelière wrote:

> NodeAST is an existing class, like CommonAST
>
> Here is my rule :
>
> entity! // (supplier WHERE name="Telys"):client
> 	:	(COLON)? a:entityComponent ( COLON! b:entity )?
> 		{ #entity = #( #[RENTO, "<entity>", "NodeAST"], #a, #b,
> #[RENTC, "</entity>", "NodeAST"]); }
> ;
>
> ..but #[RENTO, "<entity>", "NodeAST"] reports an error:
>
> iCIAO.g:224:34: unexpected char: ','
>
> i tried also #[RENTO, "<entity>", NodeAST], or #[RENTO, "<entity>",
> <NodeAST>]
>
> but i did not find any example for this syntax i read in the
> documentation (ANTLR Tree Construction).
>
>
> So, is it a syntax error in my code, or isnt't it implemented yed in
> ANTLR ?
>
> Cordially,
> Anonth
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/
>
>
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Lecturer in Comp. Sci., University of San Francisco


 

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



More information about the antlr-interest mailing list