> It turns out that `grammar` keyword generates recursive descent parsers
Yes, P6 grammars generate recursive ascent/descent parsers.
(It allows arbitrary mixes of ordinary P6 closures, using the 'Main' DSL's syntax, with parsing P6 closures, using the 'Regex' DSL's parsing syntax. Purely declarative parts of the latter are true regular expressions and are mapped to automata by the compiler.)
> and anything even a bit fancier still requires a dedicated parsing library.
Huh?
Please explain what it is about the Perl 6 grammar (the grammar for Perl 6 that is itself a Perl 6 grammar) that isn't fancy.
In my recent SO post [1] I wrote "In most cases, the practical answer when you want to parse anything beyond the most trivial of file formats -- especially a well known format that's several decades old -- is to find and use an existing parser.". Is this what led to your "bit fancier" conclusion about P6 parsing?
> Is the language itself a good place for parsing/grammar handling?
Yes.
Not only does this allow devs to more easily write and use parsing code, just as P5 made it easier to write and use regexes, but it also makes it easier to mutate Perl 6 and write DSLs.
[1] https://stackoverflow.com/questions/45172113/extracting-from...