[antlr-interest] wildcard in tree grammar

Oliver Zeigermann oliver.zeigermann at gmail.com
Sat Nov 29 12:58:13 PST 2008


Hmmm. Just checked that with the latest snapshot of ANTLR 3.2, but it
really does not work, but it should, right? Why can "." not be a tree
root?

Grammar:
treee
	: ^(. treee* )
	;


Command line:
ANTLR Parser Generator  Version 3.2-2008-10-21
error(166): OCLWalker.g:27:6: Wildcard invalid as root; wildcard can
itself be a tree

Can you fix that?

Cheers Oliver

2008/11/26 Terence Parr <parrt at cs.usfca.edu>:
> Hi gang, I've recently fixed how this wildcard thing works in tree
> grammars.
>
> October 21, 2008
> * Made . in tree grammar look like ^(. .*) to analysis, though ^(. foo)
>   is illegal (can't have . at root). Wildcard is subtree or node.
>   Fixed bugs:
>     http://www.antlr.org:8888/browse/ANTLR-248
>     http://www.antlr.org:8888/browse/ANTLR-344
>
> Not sure why ^(. foo) is illegal...hmm...weird.
> Ter
>
> 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