in reply to Re^2: converting context free grammar to BNF
in thread converting context free grammar to BNF

Hi nido203,

I'm using perl5.

Grammar::BNF is a module for Perl 6 (see modules.perl6.org) which won't work under Perl 5.

A quick search of CPAN (= Perl 5 modules) doesn't seem to show me any modules which directly support BNF (Update: choroba showed how to use a form of BNF with Marpa::R2 here), modules for ABNF and EBNF appear to be available though. May I ask why you need to convert to BNF instead of just continuing to use Parse::RecDescent?

Should i have perl6?

Perl 6 is strongly related to, but not directly compatible with, Perl 5. So whether you want to switch to Perl 6 depends on several factors, like if you have the time to spend learning it, whether this script is intended for production use (as Perl 6 is not yet as widespread and stable as Perl 5), whether you already have a Perl 5 codebase, etc.

Maybe if you could describe the bigger picture of what you're trying to do, that would allow us to give some better advice.

Regards,
-- Hauke D

  • Comment on Re^3: converting context free grammar to BNF