[antlr-interest] proposal: make .* and .+ always nongreedy
antlr at shmuelhome.mine.nu
Sat Mar 21 12:51:48 PDT 2009
Terence Parr wrote:
> any objections?
Why is "." being singled out to be non-greedy (other than the idea that
it is presumably stupid for it to be greedy). It seems that it will
cause confusion if the option is not extended to all patterns.
case1: A* A B;
case2: .* A B;
Should case1 fail because it is greedy but case2 would succeed?
More information about the antlr-interest