I'd like to specify a simple text-based format as grammar in EBNF (or ABNF) and create a parser from this specification. The parser should just spit out an abstract syntax tree or an error message. The point is, I want the parser to be created automatically
from the grammar. I have looked at Marpa, Regexp::Grammars, and Pegex but all seem to want their own custom dialect of BNF with tiny, annoying limitations and required extensions. Is there a workflow to do it just like this?:
$parser = grammar_to_parser($grammar);
say Data::Dumper::Dump( $parser->parse($input) );
I don't want no custom grammar syntax but standard
BNF as defined in ISO 14977 or RFC 5234.