On Thu, Jun 3, 2010 at 11:09 AM, Oliver Zeigermann < oliver.zeigerm...@gmail.com> wrote:
> Hi, I am pretty sure wildcards are *greedy* by default and ... + and * are normally greedy, except when preceded by a DOT. From "the Definitive ANTLR reference": *What you really want to type, though, and what you will see in other* *systems, is the terse notation: ’.*’ and ’.+’. Unfortunately, following the > * *usual convention that all subrules are greedy makes this notation useless.* *Such greedy subrules would match all characters until the end of* *file. Instead, ANTLR considers them idioms for “Match any symbol until* *you see what lies beyond the subrule.” ANTLR automatically makes* *these two subrules nongreedy. So, you can use ’.*’ instead of manually* *specifying the option.* See chapter 4, *Extended BNF Subrules*, page 86. Regards, Bart. List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.