views:

65

answers:

1

I need to create a regex parser for a project and I am using ANTLR v3 to do this. I am trying to find an up-to-date, Perl6-like regex grammar. Does anyone have a source? Googling for this has been difficult for some reason.

+1  A: 

By no means a complete coverage of Perl 6 PCRE's grammar, but it's a start: http://big-o.nl/apps/pcreparser/pcre/PCREParser.html

Bart Kiers
Perfect! I had found some ANTLR examples, but none of them actually parsed the regex functionally, more of a "char-by-char" parser. Thanks.
alphadogg
@alphadogg, no problem. Please drop me line either here or by e-mail if (or more probably, *when*) you find an error in the grammar. Thanks!
Bart Kiers