On Wed, Jan 16, 2013 at 12:43 AM, Durand Jean-Damien
<
jeandami...@gmail.com> wrote:
> Interesting, indeed.
> Isn't perl6 providing a BNF for it already ? I see in the litterature a BNF
> tentative for the Perl5 regexps here.
> Or do you mean perl6 regexp as well. A popular thing will be perl5+6
> compatible.
It would be awesome to have more targets, for example JavaScript. So
one would be able to write a language (protocol) in BNF form and parse
it in JS on client side and with perl or other language on server
side. It's for sure interesting task and chalenging one.
Markdown language comes to mind as a thing I needed a parser for in JS and Perl.
Also, perl5's regexps are recursive [1].
[1]
http://www.catonmat.net/blog/recursive-regular-expressions/
> Le mardi 15 janvier 2013 20:51:25 UTC+1, Jeffrey Kegler a écrit :
>>
>> There are a number of projects that would, I think, be quite popular and
>> useful but which I simply don't have the cycles to consider doing
>> myself. One is a Regex compiler -- a compiler from some nice BNF-ish
>> format, to Perl regular expressions. I'd think this could be very
>> popular -- it would be very much in the comfort zone of some programmers
>> who otherwise would not consider using Marpa.
>>
>> To be specific, this is another specialized Marpa-to-Perl compiler. The
>> compiler would write a Perl regex, and the Perl regex would be what
>> actually runs. The value added by Marpa would be that more complex
>> regexes could be more quickly and easily written, and the output regex
>> could be nicely pretty-printed and commented.
>>
>> Sometimes not understood is that one thing regular expressions *cannot*
>> parse is the representation of a regular expression. Regular
>> expressions are defined recursively, but they do not themselves deal
>> with recursion.
>>
>> One way to think of this project is as a Marpa super-superset of
>> Regexp::Common, whose functionality could be incorporated. A related
>> effort within Perl was the DEFINE predicate for sub-patterns, but DEFINE
>> had horrific syntax and AFAIK was little or never used.
--
Best regards, Ruslan.