Perl Regex Grammar for using ANTLR

I need to create a regular expression parser for a project, and I use ANTLR v3 for this. I am trying to find an updated regular expression grammar similar to Perl6. Does anyone have a source? For some reason, a Google search for this was difficult.

+4
source share
1 answer

Not at all the full coverage of PCR Perl 6 grammar, but this is the beginning: https://github.com/bkiers/PCREParser

EDIT

A bit of a late update, I know, but it might be of interest to future visitors to this Q & A.

I updated the grammar to more closely match the PCRE specifications . Before delving into the code on Github, you can give the generated parser a test at: pcreparser.appspot.com

+3
source

Source: https://habr.com/ru/post/1303059/


All Articles