[antlr-interest] null pointer to ADAPTOR->setTokenBoundaries

Jim Idle jimi at temporal-wave.com
Wed May 19 12:01:04 PDT 2010


Please post more information about your grammar, what the null pointer is, etc. It is hard to interpolate, but the common mistake is not adding output=AST; to the options, so you do not get a tree adaptor created.

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Alan Condit
> Sent: Wednesday, May 19, 2010 11:25 AM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] null pointer to ADAPTOR->setTokenBoundaries
> 
> Help!!!
> 
> I am getting a null pointer to setTokenBoundaries in the following line
> of generated code.
> "ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start,
> retval.stop);"
> 
> The grammar works under Java.  In moving it back to 'C', I changed the
> language option to 'C', added option ASTLabelType=pANTLR3_BASE_TREE;
> and added the necessary includes to compile and link under Objective-C.
> 
> Is there anything obvious that I am doing wrong?
> 
> Thanks,
> Alan
> ---
> 
> Alan Condit
> 1085 Tierra Ct.
> Woodburn, OR 97071
> 
> Email -- acondit at ipns.com
> Home-Office (503) 982-0906
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address





More information about the antlr-interest mailing list