We have been using regex for our grammar requirement. However there are about 20+ patterns that needs to be supported and maintaining RegEx has become very difficult when the patterns started becoming recursive. We tried migrating to ANTLR, and looked at the following two critical points required for us.
Performance Performance seems to be a concern whens some of the expressions were migrated. RegEx with compiled assembly is about 2x or 3x faster for some expressions.
Manageability ANTLR grammar seems to be lot easier to manage and develop. Accomodating new expressions/constructs was much simpler than RegEx.
Did anybody have similar experience of such a migration. Should we look at it or work with RegEx?