Closed MarkusH closed 9 years ago
Are all flags processed at regex compile time, or are they needed at evaluation time as well? (I'm thinking about the RPython specific regex paths)
This probably needs a note somewhere in the docs, but assuming the flags are all handled at re.compile
time, this patch looks great to me. Thanks!
It looks like you do need to pass flags down through the RPython layer, let me know if there are any questions about that.
I believe the places you need to update are:
RuleRepr.__init__
: add a flags field to the structRuleRepr.convert_const
: pass the flags through to the instanceLLRule.ll_matches
: pass the flags along where 0
is passed now.Hey @alex . I have absolutely no clue about RPython, but I'll try my best :)
Can you add a note to the docs somewhere? After that, I can merge it, thanks!
Done. Thank you for your support.
Thanks!
This commit allows specifying regex flags when adding new rules to a lexer generator, for both, token and ignore patterns