I am building a grammar in ANTLR4
, and I am getting this warning
TL4.g4:224:12: greedy block ()* contains wildcard; the non-greedy syntax ()*? may be preferred
Here is the line of code it is referring to
block
: ( statement | functionDecl )* (Return expression ';')?
;
What does the warning mean, How can I correct it ?