[antlr-interest] Skip subtree in tree grammar

Michael micha-1 at fantasymail.de
Tue May 5 07:11:15 PDT 2009


Am Tuesday 05 May 2009 15:38:29 schrieb Martijn Reuvers:
> Hello everyone,
>

>                 // This is what I had in mind, but how to skip the
> current subtree?
>

"skip the current subtree" means reading it but doing nothing?
then write grammar rules which walk that subtree and do nothing with it, maybe 
like:
 bool_function_content[Boolean value]

 	:	{value != null && value.booleanValue()}? => function_content*
	|            {value != null && !value.booleanValue()}? => 
overread_function_content*
 	;


cheers,
 Michael


More information about the antlr-interest mailing list