mjackson / citrus

Parsing Expressions for Ruby
http://mjackson.github.io/citrus
405 stars 28 forks source link

Bad predicate behavior? #26

Closed josephwecker closed 13 years ago

josephwecker commented 13 years ago

From the readme documentation:

&'a' 'b'      # match a "b" preceded by an "a"

I haven't tried the library yet but got stuck on that line - does citrus implement and-predicates so that they consume characters? In normal PEG that expression would always fail because they would be looking at the same spot in the stream.

mjackson commented 13 years ago

You're right. This is a bad example. Fixed here.