[antlr-interest] PEG-style "and" predicates

David Piepgrass qwertie256 at gmail.com
Mon Jul 2 13:08:39 PDT 2007


> 1. Is there a better way of doing this than using an ugly helper method?

Not that I know of, but thanks for the analysis (I've been having a
related problem.)

> If an "&" notation were to be added then it would be good to add a
> "!" notation for completeness as well. I know that you can use "~" in
> ANTLR but I don't think it's exactly equivalent to the PEG "not".

Right, ~ consumes input whereas ! would not. Also, in a lexer, ~ can
only be used with a single character, whereas ! should support an
arbitrary expression.

-- 
- David


More information about the antlr-interest mailing list