Dervall / Piglet

An easier to use parsing and lexing tool that is configurable in fluent code without a pre-build step.
binarysculpting.com
MIT License
91 stars 11 forks source link

Make the regular expressions compatible with the (? syntax #28

Closed Dervall closed 12 years ago

Dervall commented 12 years ago

While piglet will NOT support capture groups (simply because there is no reason to do so in a lexer) it would be good idea to not choke on the very common syntax of (? to make a non-capturing group. In essence, we want to ignore this syntax since the behaviour it gives is exactly the same as our default behaviour.

There might also be more of these syntax tricks that we can make the regex engine "compatible" with so that it becomes easier to copy-paste expressions from the web.

Dervall commented 12 years ago

Actually, I am not going to fix this. Regular expression syntax is not a standardized thing, and it's OK to be different. Better write something explaining piglets behaviour.