no-context / moo

Optimised tokenizer/lexer generator! 🐄 Uses /y for performance. Moo.
BSD 3-Clause "New" or "Revised" License
826 stars 66 forks source link

Remove support for capturing groups #58

Closed tjvr closed 7 years ago

tjvr commented 7 years ago

Does anyone actually use these?

nathan commented 7 years ago

Seems useful for string literals: /"((?:[^"\\]|\\.)*)"/

tjvr commented 7 years ago

Since strings are usually backslash-escaped, you have to transform their value afterwards anyway.

Capturing groups add a fair amount of complexity to moo, and I’m not convinced they’re worth it.

Perhaps we should support general-purpose transform functions? But that sounds like a performance nightmare.

nathan commented 7 years ago

Fair enough; you can always do these transformations after the fact. I'd vote to remove, then.

tjvr commented 7 years ago

Closed via #61.

nathan commented 7 years ago

Thank goodness for push -f, right? :P

tjvr commented 7 years ago

Shush, you. :P