I see a pattern where rascal's greedy matches (a+ !>> a) are mapped to non greedy regexes with a follow guard. a+? (?!a).
We could optimize this as: a+ in regex.
Some heuristics on when A+ or A* is greedy:
- it's followed by a non optional literal that does not match
A. example: [0-9]+ "e"
- it has a a follow restriction with same chars as itself: example:
[0-9]+ !>> [0-9]