I am currently working on a test platform for regular expressions, and I need to be able to parse Java regular expressions in AST to be able to generate string patterns that match a given regular expression.
I looked at the implementation java.util.regex.Pattern, but the code looks rather cumbersome (the emphasis was on speed over readability, which I imagined), so I decided to use ANTLR to write a regular expression parser from scratch.
I am wondering if anyone knows about the ready-made ANTLR grammar for regular expression before I start beating myself.
source
share