I'm currently working on a testing framework for regular expressions, and I need to be able to parse Java regular expressions into ASTs to be able to generate sample strings which match the given regex.
I looked at the implementation of java.util.regex.Pattern
but the code looks quite unwieldy (the emphasis was on speed over readability I would imagine), so I decided to use ANTLR to write a regex parser from scratch.
I'm wondering if anyone knows of a ready ANTLR grammar for regex, before I start bashing one out myself.